mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
perf: update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { clone } from "@pureadmin/utils";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import ElTreeLine from "@/components/ReTreeLine";
|
||||
import { extractPathList, deleteChildren } from "@pureadmin/utils";
|
||||
@@ -10,7 +10,7 @@ defineOptions({
|
||||
name: "LineTree"
|
||||
});
|
||||
|
||||
const menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
|
||||
const menusTree = clone(usePermissionStoreHook().wholeMenus, true);
|
||||
const menusData = computed(() => {
|
||||
return deleteChildren(menusTree);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from "vue";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { clone } from "@pureadmin/utils";
|
||||
import type { ElTreeV2 } from "element-plus";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
@@ -24,7 +24,7 @@ const dataProps = ref({
|
||||
children: "children"
|
||||
});
|
||||
const treeRef = ref<InstanceType<typeof ElTreeV2>>();
|
||||
const menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
|
||||
const menusTree = clone(usePermissionStoreHook().wholeMenus, true);
|
||||
|
||||
const menusData = computed(() => {
|
||||
return deleteChildren(menusTree);
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, unref } from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import SeamlessScroll from "@/components/ReSeamlessScroll";
|
||||
|
||||
defineOptions({
|
||||
name: "SeamlessScroll"
|
||||
});
|
||||
|
||||
const scroll = templateRef<ElRef | null>("scroll", null);
|
||||
const scroll = ref();
|
||||
|
||||
const listData = ref([
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { FormInstance, FormItemProp } from "element-plus";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { clone } from "@pureadmin/utils";
|
||||
import { ref } from "vue";
|
||||
|
||||
const isDisabled = ref(false);
|
||||
@@ -13,7 +13,7 @@ export const useVerifyCode = () => {
|
||||
time = 60
|
||||
) => {
|
||||
if (!formEl) return;
|
||||
const initTime = cloneDeep(time);
|
||||
const initTime = clone(time, true);
|
||||
await formEl.validateField(props, isValid => {
|
||||
if (isValid) {
|
||||
clearInterval(timer.value);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import XEUtils from "xe-utils";
|
||||
import Config from "./config.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { clone } from "@pureadmin/utils";
|
||||
import { reactive, ref, unref, nextTick } from "vue";
|
||||
import { useCopyToClipboard } from "@pureadmin/utils";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
@@ -92,7 +92,7 @@ const dictData = reactive({
|
||||
] as VxeFormPropTypes.Items
|
||||
});
|
||||
|
||||
const originData = cloneDeep(dictData.tableData);
|
||||
const originData = clone(dictData.tableData, true);
|
||||
|
||||
const xTree = ref<TablePublicMethods>();
|
||||
const xForm = ref<FormMethods>();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from "vue";
|
||||
import { cloneDeep } from "lodash-unified";
|
||||
import { clone } from "@pureadmin/utils";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { TreeSelect } from "@pureadmin/components";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
@@ -17,7 +17,7 @@ defineOptions({
|
||||
});
|
||||
|
||||
const { toDetail, router } = useDetail();
|
||||
const menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
|
||||
const menusTree = clone(usePermissionStoreHook().wholeMenus, true);
|
||||
|
||||
const treeData = computed(() => {
|
||||
return appendFieldByUniqueId(deleteChildren(menusTree), 0, {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import SeamlessScroll from "@/components/ReSeamlessScroll";
|
||||
|
||||
const scroll = templateRef<ElRef | null>("scroll", null);
|
||||
const scroll = ref();
|
||||
|
||||
const listData = ref([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user