diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index ca9f37c87..98488d09a 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -38,6 +38,7 @@ const props = defineProps({ default: () => ({}) } }) +const schema = ref(props.schema) const { getPrefixCls } = useDesign() @@ -82,6 +83,20 @@ const showAll = () =>{ isShow.value = !isShow.value } + +// 默认排序 +const updateSort = (val) => { + console.log(999,val) + val.forEach(item=>{ + if(!item.sortDetailDefault){ + item.sortDetailDefault = 999 // 默认999 + } + }) + val.sort((column1,column2)=>{ + return column1.sortDetailDefault - column2.sortDetailDefault + }) +} +updateSort(schema.value)