更新完善字典相关功能
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import systemApi from '@/api/system'
|
||||
import dictionaryCache from '@/utils/dictionaryCache'
|
||||
import { useDictionaryStore } from '@/stores/modules/dictionary'
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@@ -146,9 +146,12 @@ const valueChecked = computed({
|
||||
}
|
||||
})
|
||||
|
||||
// 初始化字典 store
|
||||
const dictionaryStore = useDictionaryStore()
|
||||
|
||||
// 加载配置分组
|
||||
const loadGroups = async () => {
|
||||
const groups = await dictionaryCache.getItemsByCode('config_group')
|
||||
const groups = await dictionaryStore.getDictionary('config_group')
|
||||
groupOptions.value = groups.map(item => ({
|
||||
label: item.label,
|
||||
value: item.value
|
||||
|
||||
Reference in New Issue
Block a user