Support Card
This commit is contained in:
parent
bb71140e7b
commit
a8cb711cb8
5 changed files with 32 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div :class="classes">
|
||||
<div :class="headClasses" v-if="showHead" v-el:head><slot name="title"></slot></div>
|
||||
<div :class="extraClasses" v-if="showExtra" v-el:extra><slot name="extra"></slot></div>
|
||||
<div :class="headClasses" v-if="showHead" ref="head"><slot name="title"></slot></div>
|
||||
<div :class="extraClasses" v-if="showExtra" ref="extra"><slot name="extra"></slot></div>
|
||||
<div :class="bodyClasses"><slot></slot></div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -50,9 +50,13 @@
|
|||
return `${prefixCls}-body`;
|
||||
}
|
||||
},
|
||||
compiled () {
|
||||
this.showHead = this.$els.head.innerHTML != '';
|
||||
this.showExtra = this.$els.extra.innerHTML != '';
|
||||
mounted () {
|
||||
if (this.$refs.head) {
|
||||
this.showHead = this.$refs.head.innerHTML != '';
|
||||
}
|
||||
if (this.$refs.extra) {
|
||||
this.showExtra = this.$refs.extra.innerHTML != '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,7 @@ import Alert from './components/alert';
|
|||
import Badge from './components/badge';
|
||||
// import Breadcrumb from './components/breadcrumb';
|
||||
import Button from './components/button';
|
||||
// import Card from './components/card';
|
||||
import Card from './components/card';
|
||||
import Carousel from './components/carousel';
|
||||
// import Cascader from './components/cascader';
|
||||
import Checkbox from './components/checkbox';
|
||||
|
@ -56,7 +56,7 @@ const iview = {
|
|||
// iButton: Button,
|
||||
Button,
|
||||
ButtonGroup: Button.Group,
|
||||
// Card,
|
||||
Card,
|
||||
Carousel,
|
||||
CarouselItem: Carousel.Item,
|
||||
// Cascader,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue