mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
优化字典
This commit is contained in:
parent
66580ada12
commit
376b8d8b13
@ -1,4 +1,3 @@
|
||||
import { sortBy } from "lodash";
|
||||
import { defineStore } from "pinia";
|
||||
import { computed, reactive } from "vue";
|
||||
import { isDev, useCool } from "/@/cool";
|
||||
@ -28,7 +27,7 @@ export const useDictStore = defineStore("dict", () => {
|
||||
const d: any = {};
|
||||
|
||||
for (const i in res) {
|
||||
d[i] = sortBy(res[i], "orderNum").map((e) => {
|
||||
d[i] = res[i].map((e: any) => {
|
||||
return {
|
||||
label: e.name,
|
||||
value: e.id
|
||||
|
@ -24,7 +24,7 @@
|
||||
ref="Table"
|
||||
:default-sort="{
|
||||
prop: 'orderNum',
|
||||
order: 'descending'
|
||||
order: 'ascending'
|
||||
}"
|
||||
/>
|
||||
</el-row>
|
||||
|
Loading…
Reference in New Issue
Block a user