Browse Source

修改项目列表

ZaiZai 1 năm trước cách đây
mục cha
commit
b962d862ba

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240506152112"
+  "value": "20240506163146"
 }

+ 6 - 6
src/components/dropdown/dropdown.vue

@@ -54,6 +54,7 @@ const curKey = defineModel('modelValue', {
 const menuData = ref(define_props.datas)
 watch(() => define_props.datas, (data) => {
     menuData.value = data
+    getItemLabel()
 }, { deep: true })
 
 //监听数据
@@ -83,13 +84,12 @@ const setPropsa = (obj) => {
 
 //获取名称
 const getItemLabel = () => {
-    if (!curKey.value) return
-    const { key, label } = propsa.value
-    const data = menuData.value
+    const { key, label } = propsa.value, data = menuData.value
+    if (!curKey.value || data.length <= 0) return
     for (let i = 0; i < data.length; i++) {
-        if (data[i][key].toString() === curKey.value.toString()) {
-            labels.value = data[i][label]
-        }
+        const name = data[i][key].toString()
+        const cur = curKey.value.toString()
+        if (name === cur) labels.value = data[i][label]
     }
 }
 

+ 1 - 1
src/views/project/modules/gist-list.vue

@@ -229,7 +229,7 @@ const examine = (row) => {
 }
 
 //数据详情
-const yearKey = ref('2023')
+const yearKey = ref('')
 const yearIndex = ref(-1)
 const yearChange = (_, index) => {
     yearIndex.value = index

+ 1 - 1
src/views/project/modules/project-list.vue

@@ -422,7 +422,7 @@ const deriveTableItem = async ({ item }, resolve) => {
 }
 
 //年数据
-const yearKey = ref('2023')
+const yearKey = ref('')
 const yearData = ref({})
 const yearIndex = ref(-1)
 const yearChange = (_, index) => {