Former-commit-id: 4c6a0a1f72e1f512b919b934d8483ed430b54766 [formerly f1a4641c19751caddc88308bd8e29fb337f88982] [formerly 4c6a0a1f72e1f512b919b934d8483ed430b54766 [formerly f1a4641c19751caddc88308bd8e29fb337f88982] [formerly 4c6a0a1f72e1f512b919b934d8483ed430b54766 [formerly f1a4641c19751caddc88308bd8e29fb337f88982] [formerly f1a4641c19751caddc88308bd8e29fb337f88982 [formerly 065fde485c713b3ae79131d9da1234dfcbc73cc4 [formerly 470fef55bcb2073a14b6fcc998caabcb83a1097c]]]]] Former-commit-id: c239db922bd8bd06fb68041118a2d25a9c7b475d Former-commit-id: ac5808e62e6ac021da35462b59a04004d62db2dc Former-commit-id: 7890270a60f4db69526403a56cb2dd4feb662e27 [formerly 7b8dd27f1eb72f5e3748d8174fa69c801a73ce1a] Former-commit-id: 027ba79fa86ad1be42f14ef03afebde0cc6ed924 Former-commit-id: 0425a72d2e2b3536fb2ac74199ede23a1e4bea96 Former-commit-id: 96bdce03185ba3befec93d08016d63c7c3c2030a Former-commit-id: e988828be9b03917a9579651a2912d2ed840fb7d Former-commit-id: 07646c36ed91ea4e1efac1bdf1b16b84d8d32eaa
57 lines
1.1 KiB
Vue
57 lines
1.1 KiB
Vue
<template>
|
|
<d2-container>
|
|
<template slot="header">图标选择器</template>
|
|
<div class="title-group">
|
|
<p class="title">一般用法</p>
|
|
<p class="sub-title">
|
|
<template v-if="icon">
|
|
选择的图标 {{icon}}
|
|
<i :class="'fa fa-' + icon"></i>
|
|
</template>
|
|
<template v-else>未选择</template>
|
|
</p>
|
|
</div>
|
|
<d2-icon-select v-model="icon"/>
|
|
<div class="title-group">
|
|
<p class="title">用户可以输入</p>
|
|
<p class="sub-title">
|
|
<template v-if="icon2">
|
|
选择的图标 {{icon2}}
|
|
<i :class="'fa fa-' + icon2"></i>
|
|
</template>
|
|
<template v-else>未选择</template>
|
|
</p>
|
|
</div>
|
|
<d2-icon-select v-model="icon2" :user-input="true"/>
|
|
</d2-container>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data () {
|
|
return {
|
|
icon: '',
|
|
icon2: ''
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.title-group {
|
|
margin-top: 20px;
|
|
margin-bottom: 10px;
|
|
&:first-child {
|
|
margin-top: 0px;
|
|
}
|
|
.title {
|
|
margin: 0px;
|
|
}
|
|
.sub-title {
|
|
margin: 0px;
|
|
color: $color-text-sub;
|
|
font-size: 10px;
|
|
}
|
|
}
|
|
</style>
|