@94ai/nf-table 100.1.21 → 100.1.23
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/lib/index.d.ts +2 -0
- package/lib/nf-table.cjs.js +17 -5
- package/lib/nf-table.esm-bundler.js +17 -5
- package/lib/nf-table.vue.d.ts +1 -0
- package/package/nf-table.vue +21 -5
- package/package.json +7 -7
package/lib/index.d.ts
CHANGED
|
@@ -928,6 +928,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
928
928
|
'filtered-value'?: string[] | undefined;
|
|
929
929
|
} | undefined;
|
|
930
930
|
}[]>;
|
|
931
|
+
calcTableHeight: () => void;
|
|
931
932
|
syncLocalShowColumnToCookies: () => void;
|
|
932
933
|
syncCookiesToLocalShowColumn: () => Promise<void>;
|
|
933
934
|
syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
|
|
@@ -1529,6 +1530,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
1529
1530
|
'filtered-value'?: string[] | undefined;
|
|
1530
1531
|
} | undefined;
|
|
1531
1532
|
}[]>;
|
|
1533
|
+
calcTableHeight: () => void;
|
|
1532
1534
|
syncLocalShowColumnToCookies: () => void;
|
|
1533
1535
|
syncCookiesToLocalShowColumn: () => Promise<void>;
|
|
1534
1536
|
syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
|
package/lib/nf-table.cjs.js
CHANGED
|
@@ -6566,7 +6566,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6566
6566
|
console.log(e);
|
|
6567
6567
|
}
|
|
6568
6568
|
};
|
|
6569
|
-
|
|
6569
|
+
const calcTableHeight = () => {
|
|
6570
6570
|
var _a2, _b;
|
|
6571
6571
|
if (props.calHeight && nfTableContent.value) {
|
|
6572
6572
|
const tableContentH = (_a2 = nfTableContent.value) == null ? void 0 : _a2.offsetHeight;
|
|
@@ -6578,6 +6578,14 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6578
6578
|
} else {
|
|
6579
6579
|
elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
|
|
6580
6580
|
}
|
|
6581
|
+
};
|
|
6582
|
+
vueDemi.onMounted(() => {
|
|
6583
|
+
calcTableHeight();
|
|
6584
|
+
props.columns.forEach((i) => {
|
|
6585
|
+
if (i.singleHeadMutiColSlot) {
|
|
6586
|
+
console.log("🔅 ~ onMounted ~ props.columns:", props.columns);
|
|
6587
|
+
}
|
|
6588
|
+
});
|
|
6581
6589
|
});
|
|
6582
6590
|
return Object.assign({
|
|
6583
6591
|
elTableRef,
|
|
@@ -6717,6 +6725,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6717
6725
|
* 渲染表格项数据
|
|
6718
6726
|
*/
|
|
6719
6727
|
tableColumns,
|
|
6728
|
+
/**
|
|
6729
|
+
* 计算表格高度
|
|
6730
|
+
*/
|
|
6731
|
+
calcTableHeight,
|
|
6720
6732
|
/**
|
|
6721
6733
|
* 列编辑同步组件到cookies
|
|
6722
6734
|
*/
|
|
@@ -6803,7 +6815,7 @@ var _sfc_render = function render3() {
|
|
|
6803
6815
|
}
|
|
6804
6816
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
6805
6817
|
return [_vm.isShow(column) ? [column.type ? [column.render || column.prop || column.slot ? _c("el-table-column", _vm._b({
|
|
6806
|
-
key: column.
|
|
6818
|
+
key: column.key || column.prop,
|
|
6807
6819
|
attrs: {
|
|
6808
6820
|
"type": column.type,
|
|
6809
6821
|
"label": column.label
|
|
@@ -6823,13 +6835,13 @@ var _sfc_render = function render3() {
|
|
|
6823
6835
|
}
|
|
6824
6836
|
}], null, true)
|
|
6825
6837
|
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
6826
|
-
key: column.
|
|
6838
|
+
key: column.key || column.prop,
|
|
6827
6839
|
attrs: {
|
|
6828
6840
|
"type": column.type,
|
|
6829
6841
|
"label": column.label
|
|
6830
6842
|
}
|
|
6831
6843
|
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6832
|
-
key: column.
|
|
6844
|
+
key: column.key || column.prop,
|
|
6833
6845
|
attrs: {
|
|
6834
6846
|
"prop": column.prop,
|
|
6835
6847
|
"label": column.label
|
|
@@ -6844,7 +6856,7 @@ var _sfc_render = function render3() {
|
|
|
6844
6856
|
}
|
|
6845
6857
|
}], null, true)
|
|
6846
6858
|
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
|
|
6847
|
-
key: column.
|
|
6859
|
+
key: column.key || column.prop,
|
|
6848
6860
|
attrs: {
|
|
6849
6861
|
"prop": column.prop,
|
|
6850
6862
|
"label": column.label
|
|
@@ -6564,7 +6564,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6564
6564
|
console.log(e);
|
|
6565
6565
|
}
|
|
6566
6566
|
};
|
|
6567
|
-
|
|
6567
|
+
const calcTableHeight = () => {
|
|
6568
6568
|
var _a2, _b;
|
|
6569
6569
|
if (props.calHeight && nfTableContent.value) {
|
|
6570
6570
|
const tableContentH = (_a2 = nfTableContent.value) == null ? void 0 : _a2.offsetHeight;
|
|
@@ -6576,6 +6576,14 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6576
6576
|
} else {
|
|
6577
6577
|
elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
|
|
6578
6578
|
}
|
|
6579
|
+
};
|
|
6580
|
+
onMounted(() => {
|
|
6581
|
+
calcTableHeight();
|
|
6582
|
+
props.columns.forEach((i) => {
|
|
6583
|
+
if (i.singleHeadMutiColSlot) {
|
|
6584
|
+
console.log("🔅 ~ onMounted ~ props.columns:", props.columns);
|
|
6585
|
+
}
|
|
6586
|
+
});
|
|
6579
6587
|
});
|
|
6580
6588
|
return Object.assign({
|
|
6581
6589
|
elTableRef,
|
|
@@ -6715,6 +6723,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6715
6723
|
* 渲染表格项数据
|
|
6716
6724
|
*/
|
|
6717
6725
|
tableColumns,
|
|
6726
|
+
/**
|
|
6727
|
+
* 计算表格高度
|
|
6728
|
+
*/
|
|
6729
|
+
calcTableHeight,
|
|
6718
6730
|
/**
|
|
6719
6731
|
* 列编辑同步组件到cookies
|
|
6720
6732
|
*/
|
|
@@ -6801,7 +6813,7 @@ var _sfc_render = function render3() {
|
|
|
6801
6813
|
}
|
|
6802
6814
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
6803
6815
|
return [_vm.isShow(column) ? [column.type ? [column.render || column.prop || column.slot ? _c("el-table-column", _vm._b({
|
|
6804
|
-
key: column.
|
|
6816
|
+
key: column.key || column.prop,
|
|
6805
6817
|
attrs: {
|
|
6806
6818
|
"type": column.type,
|
|
6807
6819
|
"label": column.label
|
|
@@ -6821,13 +6833,13 @@ var _sfc_render = function render3() {
|
|
|
6821
6833
|
}
|
|
6822
6834
|
}], null, true)
|
|
6823
6835
|
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
6824
|
-
key: column.
|
|
6836
|
+
key: column.key || column.prop,
|
|
6825
6837
|
attrs: {
|
|
6826
6838
|
"type": column.type,
|
|
6827
6839
|
"label": column.label
|
|
6828
6840
|
}
|
|
6829
6841
|
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6830
|
-
key: column.
|
|
6842
|
+
key: column.key || column.prop,
|
|
6831
6843
|
attrs: {
|
|
6832
6844
|
"prop": column.prop,
|
|
6833
6845
|
"label": column.label
|
|
@@ -6842,7 +6854,7 @@ var _sfc_render = function render3() {
|
|
|
6842
6854
|
}
|
|
6843
6855
|
}], null, true)
|
|
6844
6856
|
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
|
|
6845
|
-
key: column.
|
|
6857
|
+
key: column.key || column.prop,
|
|
6846
6858
|
attrs: {
|
|
6847
6859
|
"prop": column.prop,
|
|
6848
6860
|
"label": column.label
|
package/lib/nf-table.vue.d.ts
CHANGED
|
@@ -335,6 +335,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
|
|
|
335
335
|
'filtered-value'?: string[] | undefined;
|
|
336
336
|
} | undefined;
|
|
337
337
|
}[]>;
|
|
338
|
+
calcTableHeight: () => void;
|
|
338
339
|
syncLocalShowColumnToCookies: () => void;
|
|
339
340
|
syncCookiesToLocalShowColumn: () => Promise<void>;
|
|
340
341
|
syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
|
package/package/nf-table.vue
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<template v-for="column in tableColumns">
|
|
55
55
|
<template v-if="isShow(column)">
|
|
56
56
|
<template v-if="column.type">
|
|
57
|
-
<el-table-column :key="column.
|
|
57
|
+
<el-table-column :key="column.key || column.prop" :type="column.type" :label="column.label" v-bind="column.attr"
|
|
58
58
|
v-if="column.render || column.prop || column.slot">
|
|
59
59
|
<template slot-scope="scope">
|
|
60
60
|
<render-component v-if="column.render" :render="column.render" :row="scope.row" />
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
</template>
|
|
65
65
|
</template>
|
|
66
66
|
</el-table-column>
|
|
67
|
-
<el-table-column :key="column.
|
|
67
|
+
<el-table-column :key="column.key || column.prop" :type="column.type" :label="column.label" v-bind="column.attr"
|
|
68
68
|
v-else />
|
|
69
69
|
</template>
|
|
70
70
|
<template v-else>
|
|
71
71
|
<el-table-column
|
|
72
72
|
v-if="column.attr&&column.attr.formatter"
|
|
73
|
-
:key="column.
|
|
73
|
+
:key="column.key || column.prop"
|
|
74
74
|
:prop="column.prop"
|
|
75
75
|
:label="column.label"
|
|
76
76
|
v-bind="column.attr"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</span>
|
|
86
86
|
</template>
|
|
87
87
|
</el-table-column>
|
|
88
|
-
<el-table-column v-else :key="column.
|
|
88
|
+
<el-table-column v-else :key="column.key || column.prop" :prop="column.prop" :label="column.label"
|
|
89
89
|
v-bind="column.attr">
|
|
90
90
|
<slot v-if="column.singleHeadMutiColSlot" :name="column.singleHeadMutiColSlot" />
|
|
91
91
|
<template slot="header" slot-scope="scope">
|
|
@@ -1154,7 +1154,10 @@ const columnCheckConfirm = async (cb, error) => {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
|
-
|
|
1157
|
+
/**
|
|
1158
|
+
* 计算表格高度
|
|
1159
|
+
*/
|
|
1160
|
+
const calcTableHeight = () => {
|
|
1158
1161
|
if (
|
|
1159
1162
|
props.calHeight && nfTableContent.value
|
|
1160
1163
|
) {
|
|
@@ -1167,6 +1170,15 @@ onMounted(() => {
|
|
|
1167
1170
|
} else {
|
|
1168
1171
|
elTableHeight.value = props.tableAttrs?.height
|
|
1169
1172
|
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
onMounted(() => {
|
|
1176
|
+
calcTableHeight()
|
|
1177
|
+
props.columns.forEach(i => {
|
|
1178
|
+
if (i.singleHeadMutiColSlot) {
|
|
1179
|
+
console.log('🔅 ~ onMounted ~ props.columns:', props.columns)
|
|
1180
|
+
}
|
|
1181
|
+
})
|
|
1170
1182
|
})
|
|
1171
1183
|
|
|
1172
1184
|
|
|
@@ -1283,6 +1295,10 @@ defineExpose({
|
|
|
1283
1295
|
* 渲染表格项数据
|
|
1284
1296
|
*/
|
|
1285
1297
|
tableColumns,
|
|
1298
|
+
/**
|
|
1299
|
+
* 计算表格高度
|
|
1300
|
+
*/
|
|
1301
|
+
calcTableHeight,
|
|
1286
1302
|
/**
|
|
1287
1303
|
* 列编辑同步组件到cookies
|
|
1288
1304
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-table",
|
|
3
|
-
"version": "100.1.
|
|
3
|
+
"version": "100.1.23",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^100.1.
|
|
18
|
-
"@94ai/nf-drawer": "^100.1.
|
|
19
|
-
"@94ai/nf-message": "^100.1.
|
|
20
|
-
"@94ai/nf-search-form": "^100.1.
|
|
21
|
-
"@94ai/nf-theme-chalk": "^100.1.
|
|
17
|
+
"@94ai/common-utils": "^100.1.23",
|
|
18
|
+
"@94ai/nf-drawer": "^100.1.23",
|
|
19
|
+
"@94ai/nf-message": "^100.1.23",
|
|
20
|
+
"@94ai/nf-search-form": "^100.1.23",
|
|
21
|
+
"@94ai/nf-theme-chalk": "^100.1.23",
|
|
22
22
|
"idb-keyval": "^6.2.1",
|
|
23
23
|
"vue-demi": "^0.14.5",
|
|
24
24
|
"vuedraggable": "^2.24.3"
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"types": "lib/index.d.ts",
|
|
37
37
|
"main": "lib/nf-table.cjs.js",
|
|
38
38
|
"module": "lib/nf-table.esm-bundler.js",
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "afcd14101f617ec64d20d834d67d055c6e8dd548"
|
|
40
40
|
}
|