mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-13 17:30:27 +08:00
Merge branch 'main' into pages
This commit is contained in:
@@ -68,7 +68,7 @@ const shortcuts1 = [
|
|||||||
|
|
||||||
const value3 = ref("");
|
const value3 = ref("");
|
||||||
const datePickerRef = ref();
|
const datePickerRef = ref();
|
||||||
const placement = ref("auto");
|
const placement = ref("auto") as any;
|
||||||
const checkTag = ref([
|
const checkTag = ref([
|
||||||
{
|
{
|
||||||
title: "auto", // https://popper.js.org/docs/v2/constructors/#options
|
title: "auto", // https://popper.js.org/docs/v2/constructors/#options
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {
|
|||||||
getNodeByUniqueId,
|
getNodeByUniqueId,
|
||||||
appendFieldByUniqueId
|
appendFieldByUniqueId
|
||||||
} from "@/utils/tree";
|
} from "@/utils/tree";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDetail } from "./hooks";
|
import { useDetail } from "./hooks";
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { clone } from "@pureadmin/utils";
|
import { clone } from "@pureadmin/utils";
|
||||||
@@ -15,6 +16,7 @@ defineOptions({
|
|||||||
name: "Tabs"
|
name: "Tabs"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { locale } = useI18n();
|
||||||
const { toDetail, router } = useDetail();
|
const { toDetail, router } = useDetail();
|
||||||
const menusTree = clone(usePermissionStoreHook().wholeMenus, true);
|
const menusTree = clone(usePermissionStoreHook().wholeMenus, true);
|
||||||
|
|
||||||
@@ -30,6 +32,12 @@ const multiTags = computed(() => {
|
|||||||
return useMultiTagsStoreHook()?.multiTags;
|
return useMultiTagsStoreHook()?.multiTags;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const treeSelectProps = {
|
||||||
|
label: (data: any) => transformI18n(data.meta.title),
|
||||||
|
children: "children",
|
||||||
|
disabled: "disabled"
|
||||||
|
};
|
||||||
|
|
||||||
function onCloseTags() {
|
function onCloseTags() {
|
||||||
if (currentValues.value.length === 0) return;
|
if (currentValues.value.length === 0) return;
|
||||||
currentValues.value.forEach(uniqueId => {
|
currentValues.value.forEach(uniqueId => {
|
||||||
@@ -92,6 +100,7 @@ function onCloseTags() {
|
|||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
|
:key="locale"
|
||||||
v-model="currentValues"
|
v-model="currentValues"
|
||||||
class="w-[300px]!"
|
class="w-[300px]!"
|
||||||
node-key="uniqueId"
|
node-key="uniqueId"
|
||||||
@@ -100,11 +109,7 @@ function onCloseTags() {
|
|||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:props="{
|
:props="treeSelectProps"
|
||||||
label: data => transformI18n(data.meta.title),
|
|
||||||
children: 'children',
|
|
||||||
disabled: 'disabled'
|
|
||||||
}"
|
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
>
|
>
|
||||||
<template #default="{ data }">
|
<template #default="{ data }">
|
||||||
|
|||||||
Reference in New Issue
Block a user