Modify the directory structure
Modify the directory structure
This commit is contained in:
parent
31fbef10e4
commit
4b05d84ea2
175 changed files with 48 additions and 46 deletions
27
src/components/icon/icon.vue
Normal file
27
src/components/icon/icon.vue
Normal file
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<i :class="classes" :style="styles"></i>
|
||||
</template>
|
||||
<script>
|
||||
const prefixCls = 'ivu-icon';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
type: String,
|
||||
size: [Number, String]
|
||||
},
|
||||
computed: {
|
||||
classes () {
|
||||
return `${prefixCls} ${prefixCls}-${this.type}`
|
||||
},
|
||||
styles () {
|
||||
if (!!this.size) {
|
||||
return {
|
||||
'font-size': `${this.size}px`
|
||||
}
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
2
src/components/icon/index.js
Normal file
2
src/components/icon/index.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
import Icon from './icon.vue';
|
||||
export default Icon;
|
Loading…
Add table
Add a link
Reference in a new issue