Former-commit-id: e56d52ae1e817adb053f6d20bad490379bf6b8b7 Former-commit-id: b6641ea988e7dab68cc11ae212c32f32923e1cf3 Former-commit-id: a4e3d1e9d3998e7fb34266719f8d55980078dcfd
54 lines
1.2 KiB
Vue
54 lines
1.2 KiB
Vue
<template>
|
|
<d2-container type="ghost">
|
|
<el-card>
|
|
<template slot="header">
|
|
<el-radio-group v-model="showIndex" size="mini">
|
|
<el-radio-button
|
|
v-for="(item, index) in radioOptions"
|
|
:key="index"
|
|
:label="item.value">
|
|
{{item.label}}
|
|
</el-radio-button>
|
|
</el-radio-group>
|
|
</template>
|
|
<el-row style="margin: -10px;">
|
|
<el-alert
|
|
title="点击图标复制代码"
|
|
type="info"
|
|
class="d2-m-10"
|
|
style="width: auto;">
|
|
</el-alert>
|
|
<el-col v-for="(iconItem, iconIndex) in iconShow.icon" :key="iconIndex" :span="6" class="d2-p-10">
|
|
<d2-iconCell :icon="iconItem"></d2-iconCell>
|
|
</el-col>
|
|
</el-row>
|
|
</el-card>
|
|
</d2-container>
|
|
</template>
|
|
|
|
<script>
|
|
import icon from '@/assets/library/font-awesome-4.7.0-icon/icon.js'
|
|
export default {
|
|
components: {
|
|
IconCell: () => import('./components/IconCell')
|
|
},
|
|
data () {
|
|
return {
|
|
icon,
|
|
showIndex: 12
|
|
}
|
|
},
|
|
computed: {
|
|
iconShow () {
|
|
return this.icon[this.showIndex]
|
|
},
|
|
radioOptions () {
|
|
return this.icon.map((e, index) => ({
|
|
label: e.title,
|
|
value: index
|
|
}))
|
|
}
|
|
}
|
|
}
|
|
</script>
|