no message
Former-commit-id: d4346fbea964b5c710c832199d67e29cdb71e320 Former-commit-id: 4f9f1fe29a82fcea6ab46f0f33dd2d7e4fe0de63 Former-commit-id: 17b1df4eb37e05fcefabb2cc54faf3a9b8611238
This commit is contained in:
54
src/pages/demo/components/icon/list.vue
Normal file
54
src/pages/demo/components/icon/list.vue
Normal file
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<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="dd-m-10"
|
||||
style="width: auto;">
|
||||
</el-alert>
|
||||
<el-col v-for="(iconItem, iconIndex) in iconShow.icon" :key="iconIndex" :span="6" class="dd-p-10">
|
||||
<IconCell :icon="iconItem"></IconCell>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import icon from '@/assets/library/font-awesome-4.7.0-icon/icon.js'
|
||||
import IconCell from './components/IconCell'
|
||||
export default {
|
||||
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>
|
||||
Reference in New Issue
Block a user