diff --git a/src/components/RayCollapseGrid/src/index.tsx b/src/components/RayCollapseGrid/src/index.tsx index 966c746d..b495b569 100644 --- a/src/components/RayCollapseGrid/src/index.tsx +++ b/src/components/RayCollapseGrid/src/index.tsx @@ -17,12 +17,13 @@ import { NCard, NGrid, NGridItem, NSpace } from 'naive-ui' import RayIcon from '@/components/RayIcon' import { call } from '@/utils/vue/index' +import { cloneDeep } from 'lodash-es' const RayCollapseGrid = defineComponent({ name: 'RayCollapseGrid', props: collapseGridProps, setup(props) { - const modelCollapsed = ref(props.value) + const modelCollapsed = ref(cloneDeep(props.open)) const handleCollapse = () => { modelCollapsed.value = !modelCollapsed.value diff --git a/src/components/RayCollapseGrid/src/props.ts b/src/components/RayCollapseGrid/src/props.ts index fd9a4537..d4cfbf23 100644 --- a/src/components/RayCollapseGrid/src/props.ts +++ b/src/components/RayCollapseGrid/src/props.ts @@ -5,7 +5,7 @@ import type { CollapseToggleText } from './type' import type { AnyFC, MaybeArray } from '@/types/modules/utils' export const collapseGridProps = { - value: { + open: { /** * * 是否折叠操作栏 diff --git a/src/components/RayTable/src/index.tsx b/src/components/RayTable/src/index.tsx index fa6a903a..deb094bb 100644 --- a/src/components/RayTable/src/index.tsx +++ b/src/components/RayTable/src/index.tsx @@ -46,6 +46,7 @@ import props from './props' import print from 'print-js' import { uuid } from '@use-utils/hook' import { exportFileToXLSX } from '@use-utils/xlsx' +import { cloneDeep } from 'lodash-es' import type { ActionOptions } from './type' import type { WritableComputedRef } from 'vue' @@ -83,7 +84,7 @@ const RayTable = defineComponent({ return cssVar }) - const tableSize = ref(props.size) + const tableSize = ref(cloneDeep(props.size)) const tableMethods = ref>() /** 注入相关属性 */