init commit & 混料程序模块
This commit is contained in:
7
src/components/ren-radio-group/index.js
Normal file
7
src/components/ren-radio-group/index.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import RenRadioGroup from './src/ren-radio-group'
|
||||
|
||||
RenRadioGroup.install = function (Vue) {
|
||||
Vue.component(RenRadioGroup.name, RenRadioGroup)
|
||||
}
|
||||
|
||||
export default RenRadioGroup
|
||||
20
src/components/ren-radio-group/src/ren-radio-group.vue
Normal file
20
src/components/ren-radio-group/src/ren-radio-group.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<el-radio-group :value="value+''" @input="$emit('input', $event)">
|
||||
<el-radio :label="data.dictValue" v-for="data in dataList" :key="data.dictValue">{{data.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<script>
|
||||
import { getDictDataList } from '@/utils'
|
||||
export default {
|
||||
name: 'RenRadioGroup',
|
||||
data () {
|
||||
return {
|
||||
dataList: getDictDataList(this.dictType)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: [Number, String],
|
||||
dictType: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user