mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-02-03 22:38:12 +00:00
解决选择多个权限情况下会跳第一个的问题
This commit is contained in:
parent
31d65496e6
commit
64e766f758
@ -9,14 +9,14 @@
|
|||||||
collapse-tags-tooltip
|
collapse-tags-tooltip
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:options="data"
|
:options="data"
|
||||||
:props="{ multiple: true }"
|
:props="cascaderProps"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" name="cl-menu-perms" setup>
|
<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 { useCool } from "/@/cool";
|
||||||
import { deepPaths } from "/@/cool/utils";
|
import { deepPaths } from "/@/cool/utils";
|
||||||
|
|
||||||
@ -38,6 +38,9 @@ const value = ref<string[][]>([]);
|
|||||||
// 权限列表
|
// 权限列表
|
||||||
const data = ref<any[]>([]);
|
const data = ref<any[]>([]);
|
||||||
|
|
||||||
|
// elm BUG
|
||||||
|
const cascaderProps = reactive({ multiple: true });
|
||||||
|
|
||||||
// 监听改变
|
// 监听改变
|
||||||
function onChange(arr: any) {
|
function onChange(arr: any) {
|
||||||
emit("update:modelValue", arr.map((e: string[]) => e.join(":")).join(","));
|
emit("update:modelValue", arr.map((e: string[]) => e.join(":")).join(","));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user