mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
解决选择多个权限情况下会跳第一个的问题
This commit is contained in:
parent
31d65496e6
commit
64e766f758
@ -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(","));
|
||||
|
Loading…
Reference in New Issue
Block a user