2018-01-17 10:19:35 +08:00
|
|
|
<template>
|
2018-01-17 10:28:04 +08:00
|
|
|
<Container type="ghost">
|
2018-01-17 11:16:31 +08:00
|
|
|
<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>
|
2018-01-17 10:28:04 +08:00
|
|
|
<el-row style="margin: -10px;">
|
2018-01-17 11:16:31 +08:00
|
|
|
<el-col v-for="(iconItem, iconIndex) in iconShow.icon" :key="iconIndex" :span="6" class="dd-p-10">
|
|
|
|
|
<IconCell :icon="iconItem"></IconCell>
|
2018-01-17 10:28:04 +08:00
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-card>
|
2018-01-17 10:19:35 +08:00
|
|
|
</Container>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import icon from '@/assets/library/font-awesome-4.7.0-icon/icon.js'
|
2018-01-17 11:16:31 +08:00
|
|
|
import IconCell from './components/IconCell'
|
2018-01-17 10:19:35 +08:00
|
|
|
export default {
|
2018-01-17 11:16:31 +08:00
|
|
|
components: {
|
|
|
|
|
IconCell
|
|
|
|
|
},
|
2018-01-17 10:19:35 +08:00
|
|
|
data () {
|
|
|
|
|
return {
|
2018-01-17 11:16:31 +08:00
|
|
|
icon,
|
|
|
|
|
showIndex: 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
iconShow () {
|
|
|
|
|
return this.icon[this.showIndex]
|
|
|
|
|
},
|
|
|
|
|
radioOptions () {
|
|
|
|
|
return this.icon.map((e, index) => ({
|
|
|
|
|
label: e.title,
|
|
|
|
|
value: index
|
|
|
|
|
}))
|
2018-01-17 10:19:35 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|