Explorar el Código

解决选择多个权限情况下会跳第一个的问题

神仙都没用 hace 1 año
padre
commit
64e766f758
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      src/modules/base/components/menu/perms.vue

+ 5 - 2
src/modules/base/components/menu/perms.vue

@@ -9,14 +9,14 @@
 			collapse-tags-tooltip
 			:disabled="disabled"
 			:options="data"
-			:props="{ multiple: true }"
+			:props="cascaderProps"
 			@change="onChange"
 		/>
 	</div>
 </template>
 
 <script lang="ts" name="cl-menu-perms" setup>
-import { onMounted, ref, watch } from "vue";
+import { onMounted, ref, watch, reactive } from "vue";
 import { useCool } from "/@/cool";
 import { deepPaths } from "/@/cool/utils";
 
@@ -38,6 +38,9 @@ const value = ref<string[][]>([]);
 // 权限列表
 const data = ref<any[]>([]);
 
+// elm BUG
+const cascaderProps = reactive({ multiple: true });
+
 // 监听改变
 function onChange(arr: any) {
 	emit("update:modelValue", arr.map((e: string[]) => e.join(":")).join(","));