mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
end: 新增字典组件<dict></dict>
This commit is contained in:
parent
f30cd229cb
commit
9014d8ed2c
@ -136,7 +136,7 @@ module.exports = {
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
'yoda': [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
'prefer-const': 0,
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'object-curly-spacing': [2, 'always', { objectsInObjects: false }],
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
|
31
src/components/Dict/index.vue
Normal file
31
src/components/Dict/index.vue
Normal file
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select class="filter-item" placeholder="请选择" v-model="dict">
|
||||
<el-option v-for="item in dicts" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
</el-select>
|
||||
{{dict}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fetch from '@/utils/fetch'
|
||||
|
||||
export default {
|
||||
name: 'dict',
|
||||
props: ['type'],
|
||||
data() {
|
||||
return {
|
||||
dict: undefined,
|
||||
dicts : [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
fetch({
|
||||
url: '/admin/dict/type/' + this.type,
|
||||
method: 'get'
|
||||
}).then(response => {
|
||||
this.dicts = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
@ -20,13 +20,19 @@
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="页面访问使用" name="6">
|
||||
<div>wiki:<a href="https://gitee.com/log4j/pig/wikis/页面访问使用" target="_blank">https://gitee.com/log4j/pig/wikis/页面访问使用</a></div>
|
||||
<dict type="lengleng"></dict>
|
||||
</el-collapse-item>
|
||||
|
||||
</el-collapse>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import Dict from '@/components/Dict'
|
||||
export default {
|
||||
components: {
|
||||
Dict
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: '1'
|
||||
|
@ -19,7 +19,7 @@
|
||||
<a target='_blank' href="https://github.com/PanJiaChen/vue-element-admin/">
|
||||
<el-dropdown-item>
|
||||
项目地址
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-item>
|
||||
</a>
|
||||
<el-dropdown-item divided><span @click="logout" style="display:block;">退出登录</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
Loading…
Reference in New Issue
Block a user