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

This commit is contained in:
神仙都没用 2023-11-29 17:40:34 +08:00
parent 31d65496e6
commit 64e766f758

View File

@ -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(","));