@ftjs/antd 0.2.1 → 0.3.0

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/index.js CHANGED
@@ -1129,7 +1129,7 @@ const FtVxeTable = defineFtTable((_, ctx) => {
1129
1129
  const {
1130
1130
  formColumns,
1131
1131
  tableColumns,
1132
- internalTableProps,
1132
+ internalTableProps: _internalTableProps,
1133
1133
  internalFormProps,
1134
1134
  tableData,
1135
1135
  loading,
@@ -1141,11 +1141,6 @@ const FtVxeTable = defineFtTable((_, ctx) => {
1141
1141
  fitFlexHeight,
1142
1142
  minHeight,
1143
1143
  hidePagination,
1144
- rowConfig: _rowConfig,
1145
- customConfig: _customConfig,
1146
- toolbarConfig: _toolbarConfig,
1147
- columnConfig: _columnConfig,
1148
- treeConfig,
1149
1144
  onSearch,
1150
1145
  "onUpdate:exposed": onUpdateExposed
1151
1146
  } = useTableInject();
@@ -1170,12 +1165,6 @@ const FtVxeTable = defineFtTable((_, ctx) => {
1170
1165
  handleSearch();
1171
1166
  }
1172
1167
  });
1173
- const rowConfig = computed(() => {
1174
- return {
1175
- keyField: keyField.value,
1176
- ..._rowConfig.value
1177
- };
1178
- });
1179
1168
  const enableEdit = computed(() => {
1180
1169
  return tableColumns.value.some((column) => {
1181
1170
  var _a;
@@ -1250,34 +1239,42 @@ const FtVxeTable = defineFtTable((_, ctx) => {
1250
1239
  };
1251
1240
  });
1252
1241
  });
1253
- const customConfig = computed(() => {
1254
- return {
1255
- storage: true,
1256
- enabled: cache.value != null,
1257
- ..._customConfig.value
1258
- };
1259
- });
1260
- const toolbarConfig = computed(() => {
1261
- return {
1262
- custom: true,
1263
- zoom: true,
1264
- ..._toolbarConfig.value
1265
- };
1266
- });
1267
- const editConfig = computed(() => {
1268
- if (!enableEdit.value) return void 0;
1269
- return {
1270
- mode: "row",
1271
- showStatus: true,
1272
- trigger: "manual",
1273
- autoClear: false,
1274
- autoPos: true
1275
- };
1276
- });
1277
- const columnConfig = computed(() => {
1242
+ const internalTableProps = computed(() => {
1243
+ const {
1244
+ columnConfig,
1245
+ editConfig,
1246
+ toolbarConfig,
1247
+ customConfig,
1248
+ rowConfig
1249
+ } = _internalTableProps.value ?? {};
1278
1250
  return {
1279
- resizable: true,
1280
- ..._columnConfig.value
1251
+ ..._internalTableProps.value,
1252
+ columnConfig: {
1253
+ resizable: true,
1254
+ ...columnConfig
1255
+ },
1256
+ editConfig: enableEdit.value ? {
1257
+ mode: "row",
1258
+ showStatus: true,
1259
+ trigger: "manual",
1260
+ autoClear: false,
1261
+ autoPos: true,
1262
+ ...editConfig
1263
+ } : void 0,
1264
+ toolbarConfig: {
1265
+ custom: true,
1266
+ zoom: true,
1267
+ ...toolbarConfig
1268
+ },
1269
+ customConfig: {
1270
+ storage: true,
1271
+ enabled: cache.value != null,
1272
+ ...customConfig
1273
+ },
1274
+ rowConfig: {
1275
+ keyField: keyField.value,
1276
+ ...rowConfig
1277
+ }
1281
1278
  };
1282
1279
  });
1283
1280
  let containerStyle = {
@@ -1335,14 +1332,8 @@ const FtVxeTable = defineFtTable((_, ctx) => {
1335
1332
  "loading": loading.value,
1336
1333
  "data": tableData.value,
1337
1334
  "minHeight": minHeight.value ?? 310,
1338
- "rowConfig": rowConfig.value,
1339
- "treeConfig": treeConfig.value,
1340
1335
  "id": cache.value,
1341
- "toolbarConfig": toolbarConfig.value,
1342
- "customConfig": customConfig.value,
1343
- "columnConfig": columnConfig.value,
1344
- "keepSource": enableEdit.value,
1345
- "editConfig": editConfig.value
1336
+ "keepSource": enableEdit.value
1346
1337
  }, internalTableProps.value), {
1347
1338
  pager() {
1348
1339
  return hidePagination.value ? null : createVNode("div", {
@@ -1379,7 +1370,7 @@ const FtVxeTable = defineFtTable((_, ctx) => {
1379
1370
  default: true
1380
1371
  }], "fitFlexHeight", "minHeight", ["hidePagination", {
1381
1372
  type: Boolean
1382
- }], "exposed", "onUpdate:exposed", "rowConfig", "treeConfig", "customConfig", "toolbarConfig", "columnConfig"]);
1373
+ }], "exposed", "onUpdate:exposed"]);
1383
1374
  export {
1384
1375
  FtForm,
1385
1376
  FtFormSearch,
@@ -46,7 +46,7 @@ type VxeTableColumn<TableData extends Record<string, any>> = FtTableColumn<Table
46
46
  /**
47
47
  * 内部表格 props
48
48
  */
49
- interface InternalVxeTableProps<TableData extends Record<string, any>> extends Omit<VxeGridProps<TableData>, "columns" | "minHeight" | "treeConfig" | "rowConfig" | "customConfig" | "toolbarConfig" | "columnConfig"> {
49
+ interface InternalVxeTableProps<TableData extends Record<string, any>> extends Omit<VxeGridProps<TableData>, "columns" | "minHeight"> {
50
50
  }
51
51
  /**
52
52
  * 表格插槽
@@ -72,26 +72,6 @@ interface VxeExtendedProps<TableData extends Record<string, any>, SearchData ext
72
72
  * @default 310
73
73
  */
74
74
  minHeight?: number;
75
- /**
76
- * vxe-table 树形配置
77
- */
78
- treeConfig?: VxeGridProps<TableData>["treeConfig"];
79
- /**
80
- * vxe-table 行配置
81
- */
82
- rowConfig?: VxeGridProps<TableData>["rowConfig"];
83
- /**
84
- * vxe-table 自定义配置
85
- */
86
- customConfig?: VxeGridProps<TableData>["customConfig"];
87
- /**
88
- * vxe-table 工具栏配置
89
- */
90
- toolbarConfig?: VxeGridProps<TableData>["toolbarConfig"];
91
- /**
92
- * vxe-table 列配置
93
- */
94
- columnConfig?: VxeGridProps<TableData>["columnConfig"];
95
75
  /**
96
76
  * 是否隐藏分页
97
77
  * @default false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftjs/antd",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "keywords": [],
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
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.2.1"
33
+ "@ftjs/core": "0.3.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@ant-design/icons-vue": ">=7.0.0",