first
This commit is contained in:
8
packages/card/index.js
Normal file
8
packages/card/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import Card from './src/main';
|
||||
|
||||
/* istanbul ignore next */
|
||||
Card.install = function(Vue) {
|
||||
Vue.component(Card.name, Card);
|
||||
};
|
||||
|
||||
export default Card;
|
23
packages/card/src/main.vue
Normal file
23
packages/card/src/main.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="el-card" :class="shadow ? 'is-' + shadow + '-shadow' : 'is-always-shadow'">
|
||||
<div class="el-card__header" v-if="$slots.header || header">
|
||||
<slot name="header">{{ header }}</slot>
|
||||
</div>
|
||||
<div class="el-card__body" :style="bodyStyle">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ElCard',
|
||||
props: {
|
||||
header: {},
|
||||
bodyStyle: {},
|
||||
shadow: {
|
||||
type: String
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user