Преглед на файлове

文武列表页 筛选菜单初始值逻辑

任一存 преди 1 година
родител
ревизия
d3bd3d8596
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 3
      src/views/RelicList.vue

+ 2 - 3
src/views/RelicList.vue

@@ -83,9 +83,8 @@ const route = useRoute()
 const router = useRouter()
 const store = useStore()
 
-const cascaderValue = ref([
-  'all'
-])
+const cascaderValueInit = (route.query.sceneIdx && route.query.cameraIdx) ? [route.query.sceneIdx, route.query.cameraIdx] : ['all']
+const cascaderValue = ref(cascaderValueInit)
 const cameraTree = ref([
   {
     value: 'all',