提交“
This commit is contained in:
1 parent
69ee0f505c
commit
9b88581450
614 files changed
+90318
-689022
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { computed } from 'vue'
|
||||
import { useDictStore } from '@/store/modules/dict'
|
||||
|
||||
export function useDictTag(dictType: string) {
|
||||
const dictStore = useDictStore()
|
||||
|
||||
const getLabel = (value: string): string => {
|
||||
return dictStore.getLabel(dictType, value)
|
||||
}
|
||||
|
||||
const getTagType = (value: string): string => {
|
||||
return dictStore.getTagType(dictType, value)
|
||||
}
|
||||
|
||||
const options = computed(() => dictStore.getOptions(dictType))
|
||||
|
||||
return { getLabel, getTagType, options }
|
||||
}
|
||||
Reference in new issue
Block a user