快乐的梦鱼 преди 2 месеца
родител
ревизия
c57f745a18
променени са 3 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 4 1
      src/components/form/Field.vue
  2. 2 2
      src/pages/dig/forms/forms.ts
  3. 3 1
      src/pages/user/login.vue

+ 4 - 1
src/components/form/Field.vue

@@ -750,7 +750,10 @@ function onClick() {
 
 const tagInputString = ref('');
 const tagSplited = computed<string[]>(() => {
-  return (props.modelValue  as string|| '').split(props.tagJoinType).filter(x => x);
+  let str = props.modelValue;
+  if (typeof str === 'string')
+    return (props.modelValue  as string|| '').split(props.tagJoinType).filter(x => x);
+  return [];
 });
 
 function onTagDelete(tag: string) {

+ 2 - 2
src/pages/dig/forms/forms.ts

@@ -157,7 +157,7 @@ export function mergeFormItems(group: GroupForm) {
         }],
       });
     }
-    if (needType) {
+    if (needType || isOverview) {
       let i = 0;
       for (const it of groupArray) {
         const op = it[1](formRef);
@@ -168,7 +168,7 @@ export function mergeFormItems(group: GroupForm) {
           type: 'flat-group', 
           childrenColProps: { span: 24 },
           children: op.formItems, 
-          show: { callback: (_, m) => m[info.typeName] === ex.id }
+          show: isOverview ? undefined : { callback: (_, m) => m[info.typeName] === ex.id }
         });
         i++;
       }

+ 3 - 1
src/pages/user/login.vue

@@ -61,6 +61,7 @@
 <script setup lang="ts">
 import baseLogo from '/static/logo.png';
 import { useAuthStore } from '@/store/auth';
+import { useCollectStore } from '@/store/collect';
 import { onMounted, ref } from 'vue';
 import { showError } from '@/common/composeabe/ErrorDisplay';
 import FlexCol from '@/components/layout/FlexCol.vue';
@@ -74,10 +75,10 @@ import type { Rules } from 'async-validator';
 import { closeToast, toast } from '@/components/dialog/CommonRoot';
 import FlexRow from '@/components/layout/FlexRow.vue';
 import CommonRoot from '@/components/dialog/CommonRoot.vue';
-import { navTo } from '@/components/utils/PageAction';
 
 const type = ref('wechat');
 const authStore = useAuthStore();
+const collectStore = useCollectStore();
 
 const loginFormModel = ref({
   mobile: '',
@@ -118,6 +119,7 @@ function loginWechat() {
           type: 'success',  
           content: '登录成功',
         });
+        collectStore.loadCollectableModules();
         setTimeout(() => redirectToIndex(), 200);
       }).catch(showError);
     })