Commit ca2cdc031ddd9e2a1534d8650853386391463097

Authored by xingyu
1 parent 6b35f5c6

perf: 添加可配置高度

yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
@@ -11,6 +11,7 @@ const message = useMessage() // 消息弹窗 @@ -11,6 +11,7 @@ const message = useMessage() // 消息弹窗
11 11
12 interface UseVxeGridConfig<T = any> { 12 interface UseVxeGridConfig<T = any> {
13 allSchemas: VxeAllSchemas 13 allSchemas: VxeAllSchemas
  14 + height?: number // 高度 默认730
14 topActionSlots?: boolean // 是否开启表格内顶部操作栏插槽 15 topActionSlots?: boolean // 是否开启表格内顶部操作栏插槽
15 treeConfig?: VxeTablePropTypes.TreeConfig // 树形表单配置 16 treeConfig?: VxeTablePropTypes.TreeConfig // 树形表单配置
16 isList?: boolean // 是否不带分页的list 17 isList?: boolean // 是否不带分页的list
@@ -48,7 +49,7 @@ export const useVxeGrid = &lt;T = any&gt;(config?: UseVxeGridConfig&lt;T&gt;) =&gt; { @@ -48,7 +49,7 @@ export const useVxeGrid = &lt;T = any&gt;(config?: UseVxeGridConfig&lt;T&gt;) =&gt; {
48 const gridOptions = reactive<VxeGridProps<any>>({ 49 const gridOptions = reactive<VxeGridProps<any>>({
49 loading: true, 50 loading: true,
50 size: currentSize as any, 51 size: currentSize as any,
51 - height: 730, // 1080高度 52 + height: config?.height ? config.height : 730,
52 rowConfig: { 53 rowConfig: {
53 isCurrent: true, // 当鼠标点击行时,是否要高亮当前行 54 isCurrent: true, // 当鼠标点击行时,是否要高亮当前行
54 isHover: true // 当鼠标移到行时,是否要高亮当前行 55 isHover: true // 当鼠标移到行时,是否要高亮当前行