Former-commit-id: afef3af60139bd559aa150052fc3a72ec2f384a4 Former-commit-id: e2b324d8476ca2a52c625f2aee16972708a43bec Former-commit-id: ab3a3d9097c684c0fb1b54b1a5f228157b2f81ff
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">
|
|
<IconCell :icon="iconItem"></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>
|