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