@ftjs/antd 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/antd-table/type.d.ts +6 -3
- package/dist/index.js +10 -9
- package/dist/vxe-table/types.d.ts +6 -3
- package/package.json +3 -3
|
@@ -25,12 +25,15 @@ export interface FtAntdTableProps<T extends Record<string, any>, S extends Recor
|
|
|
25
25
|
*/
|
|
26
26
|
initSearch?: boolean;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* 是否自适应高度
|
|
29
29
|
*
|
|
30
|
-
*
|
|
30
|
+
* 1. 父元素(flex column布局)剩余高度
|
|
31
|
+
* 2. 普通布局,占据父元素 100% 高度
|
|
32
|
+
*
|
|
33
|
+
* 可以通过 {@link minHeight} 控制最小高度,避免高度不够展示内容
|
|
31
34
|
* @default true
|
|
32
35
|
*/
|
|
33
|
-
|
|
36
|
+
autoHeight?: boolean;
|
|
34
37
|
/**
|
|
35
38
|
* 自适应父元素(flex布局)剩余高度时,最小高度
|
|
36
39
|
* @default 210
|
package/dist/index.js
CHANGED
|
@@ -699,13 +699,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
699
699
|
const settingModal = ref(false);
|
|
700
700
|
let oldSortList = [];
|
|
701
701
|
const createColumnsTree = () => {
|
|
702
|
-
var _a;
|
|
703
702
|
const treeData = [{ title: "全选", key: "__all", children: [] }];
|
|
704
703
|
const children = [];
|
|
705
704
|
for (const column of props.columns) {
|
|
706
|
-
const key =
|
|
705
|
+
const key = getField(column);
|
|
707
706
|
children.push({
|
|
708
|
-
title: column.title,
|
|
707
|
+
title: toValue(column.title),
|
|
709
708
|
key,
|
|
710
709
|
isLeaf: true
|
|
711
710
|
});
|
|
@@ -1033,7 +1032,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1033
1032
|
type: Boolean,
|
|
1034
1033
|
default: true
|
|
1035
1034
|
},
|
|
1036
|
-
|
|
1035
|
+
autoHeight: {
|
|
1037
1036
|
type: Boolean,
|
|
1038
1037
|
default: true
|
|
1039
1038
|
},
|
|
@@ -1137,11 +1136,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1137
1136
|
if (y < minHeightValue) y = minHeightValue;
|
|
1138
1137
|
_scrollY.value = y;
|
|
1139
1138
|
};
|
|
1140
|
-
if (props.
|
|
1139
|
+
if (props.autoHeight) {
|
|
1141
1140
|
containerStyle = {
|
|
1142
1141
|
...containerStyle,
|
|
1143
1142
|
flex: "1",
|
|
1144
|
-
minHeight: 0
|
|
1143
|
+
minHeight: 0,
|
|
1144
|
+
height: "100%"
|
|
1145
1145
|
};
|
|
1146
1146
|
tableStyle = {
|
|
1147
1147
|
flex: "1",
|
|
@@ -1323,7 +1323,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1323
1323
|
type: Boolean,
|
|
1324
1324
|
default: true
|
|
1325
1325
|
},
|
|
1326
|
-
|
|
1326
|
+
autoHeight: {
|
|
1327
1327
|
type: Boolean,
|
|
1328
1328
|
default: true
|
|
1329
1329
|
},
|
|
@@ -1484,11 +1484,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1484
1484
|
let tableStyle;
|
|
1485
1485
|
const containerRef = ref();
|
|
1486
1486
|
let height;
|
|
1487
|
-
if (props.
|
|
1487
|
+
if (props.autoHeight) {
|
|
1488
1488
|
containerStyle = {
|
|
1489
1489
|
...containerStyle,
|
|
1490
1490
|
flex: "1",
|
|
1491
|
-
minHeight: 0
|
|
1491
|
+
minHeight: 0,
|
|
1492
|
+
height: "100%"
|
|
1492
1493
|
};
|
|
1493
1494
|
tableStyle = {
|
|
1494
1495
|
flex: "1",
|
|
@@ -25,12 +25,15 @@ export interface FtVxeTableProps<T extends Record<string, any>, S extends Record
|
|
|
25
25
|
*/
|
|
26
26
|
initSearch?: boolean;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* 是否自适应高度
|
|
29
29
|
*
|
|
30
|
-
*
|
|
30
|
+
* 1. 父元素(flex column布局)剩余高度
|
|
31
|
+
* 2. 普通布局,占据父元素 100% 高度
|
|
32
|
+
*
|
|
33
|
+
* 可以通过 {@link minHeight} 控制最小高度,避免高度不够展示内容
|
|
31
34
|
* @default true
|
|
32
35
|
*/
|
|
33
|
-
|
|
36
|
+
autoHeight?: boolean;
|
|
34
37
|
/**
|
|
35
38
|
* 最小高度
|
|
36
39
|
* @default 310
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ftjs/antd",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"vxe-table": "4.11.15",
|
|
27
27
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
28
28
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
29
|
-
"typescript": "^5.
|
|
29
|
+
"typescript": "^5.8.3",
|
|
30
30
|
"vite": "^6.1.0",
|
|
31
31
|
"vite-plugin-dts": "^4.5.0",
|
|
32
32
|
"vue-tsc": "2.2.0",
|
|
33
|
-
"@ftjs/core": "0.5.
|
|
33
|
+
"@ftjs/core": "0.5.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@ant-design/icons-vue": ">=7.0.0",
|