@wfrog/vc-ui 1.11.14 → 1.11.16
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/es/components/explorer-table/explorer-table.d.ts +5 -0
- package/dist/es/components/explorer-table/explorer-table.mjs +16 -7
- package/dist/es/components/explorer-table/explorer-table.vue.d.ts +1 -0
- package/dist/es/components/explorer-table/index.css +1 -1
- package/dist/es/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,11 @@ export interface IExplorerTableProps {
|
|
|
15
15
|
size?: 'small' | 'default' | 'large';
|
|
16
16
|
columnRender?: (column: IColumnConfig, row: Record<string, any>, emits: IExplorerTableEmits, index: number) => VNode;
|
|
17
17
|
columnConfig?: IColumnConfig[];
|
|
18
|
+
columnFilter?: (column: IColumnConfig) => boolean;
|
|
19
|
+
rowClassName?: ((data: {
|
|
20
|
+
row: Record<string, any>;
|
|
21
|
+
rowIndex: number;
|
|
22
|
+
}) => string) | string;
|
|
18
23
|
startIndex?: number;
|
|
19
24
|
rowKey?: string | ((row: any) => string);
|
|
20
25
|
}
|
|
@@ -28,20 +28,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
size: {},
|
|
29
29
|
columnRender: { type: Function, default: (column, row) => h("span", row[column.prop]) },
|
|
30
30
|
columnConfig: {},
|
|
31
|
+
columnFilter: { type: Function, default: (column) => column.visible !== false },
|
|
32
|
+
rowClassName: {},
|
|
31
33
|
startIndex: { default: 0 },
|
|
32
34
|
rowKey: { type: [String, Function], default: "id" }
|
|
33
35
|
},
|
|
34
36
|
emits: ["columnEvent", "singleSelectionChange", "multipleSelectionChange", "selectionChange", "selectAll"],
|
|
35
37
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
36
38
|
useCssVars((_ctx) => ({
|
|
37
|
-
"
|
|
39
|
+
"v2bf7e3e4": `${_ctx.empty ? "flex" : "none"}`
|
|
38
40
|
}));
|
|
39
41
|
const props = __props;
|
|
40
42
|
const emits = __emit;
|
|
41
43
|
const state = injectExplorerPanelState();
|
|
42
44
|
const $style = useCssModule();
|
|
43
45
|
const tableRef = useTemplateRef("tableRef");
|
|
44
|
-
const columns = computed(() => state.columnConfig.value.filter(
|
|
46
|
+
const columns = computed(() => state.columnConfig.value.filter(props.columnFilter));
|
|
45
47
|
const selectedValue = ref();
|
|
46
48
|
const selectedValues = computed(() => new Set(props.data.filter((item) => item[props.multipleCheckedKey]).map(getRowValue)));
|
|
47
49
|
const isSingleSelection = computed(() => props.customSelection === "radio");
|
|
@@ -97,12 +99,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
99
|
}
|
|
98
100
|
return "default";
|
|
99
101
|
}
|
|
100
|
-
function
|
|
101
|
-
const value = getRowValue(row);
|
|
102
|
+
function myRowClassName(data) {
|
|
103
|
+
const value = getRowValue(data.row);
|
|
104
|
+
let clsName = "";
|
|
105
|
+
if (typeof props.rowClassName === "function") {
|
|
106
|
+
clsName = props.rowClassName(data);
|
|
107
|
+
}
|
|
108
|
+
if (typeof props.rowClassName === "string") {
|
|
109
|
+
clsName = props.rowClassName;
|
|
110
|
+
}
|
|
102
111
|
if (value === selectedValue.value || selectedValues.value.has(value)) {
|
|
103
|
-
return $style["selected-row"]
|
|
112
|
+
return `${clsName} ${$style["selected-row"]}`;
|
|
104
113
|
}
|
|
105
|
-
return
|
|
114
|
+
return clsName;
|
|
106
115
|
}
|
|
107
116
|
watch(() => props.columnConfig, (val) => {
|
|
108
117
|
if (Array.isArray(state.columnConfig.value) && state.columnConfig.value.length) {
|
|
@@ -154,7 +163,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
163
|
border: "",
|
|
155
164
|
"allow-drag-last-column": true,
|
|
156
165
|
"row-key": __props.rowKey,
|
|
157
|
-
"row-class-name":
|
|
166
|
+
"row-class-name": myRowClassName,
|
|
158
167
|
onHeaderDragend
|
|
159
168
|
}), createSlots({
|
|
160
169
|
empty: withCtx(() => [
|
|
@@ -2985,6 +2985,7 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTableProps
|
|
|
2985
2985
|
empty: boolean;
|
|
2986
2986
|
multipleCheckedKey: string;
|
|
2987
2987
|
columnRender: (column: IColumnConfig, row: Record<string, any>, emits: IExplorerTableEmits, index: number) => VNode;
|
|
2988
|
+
columnFilter: (column: IColumnConfig) => boolean;
|
|
2988
2989
|
startIndex: number;
|
|
2989
2990
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
2990
2991
|
tableRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
@@ -21,7 +21,7 @@ div._table_p2qu9_7 .el-table__column-resize-proxy {
|
|
|
21
21
|
border-color: var(--el-color-primary);
|
|
22
22
|
}
|
|
23
23
|
div._table_p2qu9_7 .el-table__empty-block {
|
|
24
|
-
display: var(--
|
|
24
|
+
display: var(--v2bf7e3e4);
|
|
25
25
|
}
|
|
26
26
|
._selection_p2qu9_27 .cell {
|
|
27
27
|
display: flex;
|
package/dist/es/index.mjs
CHANGED
|
@@ -160,7 +160,7 @@ const __vite_glob_0_49 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
|
|
|
160
160
|
default: _sfc_main$8
|
|
161
161
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
162
162
|
|
|
163
|
-
const version = "1.11.
|
|
163
|
+
const version = "1.11.16";
|
|
164
164
|
|
|
165
165
|
const modules = /* #__PURE__ */ Object.assign({"./components/awesome-icon/awesome-icon.vue": __vite_glob_0_0,"./components/backbottom/backbottom.vue": __vite_glob_0_1,"./components/button/button.vue": __vite_glob_0_2,"./components/chat-container/chat-container.vue": __vite_glob_0_3,"./components/choice-boolean/choice-boolean.vue": __vite_glob_0_4,"./components/choice/choice.vue": __vite_glob_0_5,"./components/color-switch/color-switch.vue": __vite_glob_0_6,"./components/config-provider/config-provider.vue": __vite_glob_0_7,"./components/cropper/cropper.vue": __vite_glob_0_8,"./components/currency/currency.vue": __vite_glob_0_9,"./components/dark-switch/dark-switch.vue": __vite_glob_0_10,"./components/daterange-picker/daterange-picker.vue": __vite_glob_0_11,"./components/dialog-camera-upload/dialog-camera-upload.vue": __vite_glob_0_12,"./components/dialog-map-point/dialog-map-point.vue": __vite_glob_0_13,"./components/dialog-upload-images/dialog-upload-images.vue": __vite_glob_0_14,"./components/dialog/dialog.vue": __vite_glob_0_15,"./components/drag-verify/drag-verify.vue": __vite_glob_0_16,"./components/drawer/drawer.vue": __vite_glob_0_17,"./components/easy-pagination/easy-pagination.vue": __vite_glob_0_18,"./components/el-icon/el-icon.vue": __vite_glob_0_19,"./components/explorer-column-table/explorer-column-table.vue": __vite_glob_0_20,"./components/explorer-container/explorer-container.vue": __vite_glob_0_21,"./components/explorer-filter/explorer-filter.vue": __vite_glob_0_22,"./components/explorer-footer/explorer-footer.vue": __vite_glob_0_23,"./components/explorer-form/explorer-form.vue": __vite_glob_0_24,"./components/explorer-list/explorer-list.vue": __vite_glob_0_25,"./components/explorer-modal-form/explorer-modal-form.vue": __vite_glob_0_26,"./components/explorer-panel/explorer-panel.vue": __vite_glob_0_27,"./components/explorer-query/explorer-query.vue": __vite_glob_0_28,"./components/explorer-table/explorer-table.vue": __vite_glob_0_29,"./components/explorer-tools/explorer-tools.vue": __vite_glob_0_30,"./components/explorer-tree/explorer-tree.vue": __vite_glob_0_31,"./components/explorer/explorer.vue": __vite_glob_0_32,"./components/flag/flag.vue": __vite_glob_0_33,"./components/form-item/form-item.vue": __vite_glob_0_34,"./components/icon-picker/icon-picker.vue": __vite_glob_0_35,"./components/icon/icon.vue": __vite_glob_0_36,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_37,"./components/image/image.vue": __vite_glob_0_38,"./components/info-tooltip/info-tooltip.vue": __vite_glob_0_39,"./components/input-number/input-number.vue": __vite_glob_0_40,"./components/input/input.vue": __vite_glob_0_41,"./components/pca-picker/pca-picker.vue": __vite_glob_0_42,"./components/qr-code/qr-code.vue": __vite_glob_0_43,"./components/screenfull/screenfull.vue": __vite_glob_0_44,"./components/scrollbar/scrollbar.vue": __vite_glob_0_45,"./components/select/select.vue": __vite_glob_0_46,"./components/single-player/single-player.vue": __vite_glob_0_47,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_48,"./components/splitter/splitter.vue": __vite_glob_0_49,"./components/svg-icon/svg-icon.vue": __vite_glob_0_50,"./components/switch/switch.vue": __vite_glob_0_51,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_52,"./components/tags/tags.vue": __vite_glob_0_53,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_54,"./components/thousand-input/thousand-input.vue": __vite_glob_0_55,"./components/tinymce/tinymce.vue": __vite_glob_0_56,"./components/transfer-panel/transfer-panel.vue": __vite_glob_0_57,"./components/transfer/transfer.vue": __vite_glob_0_58,"./components/tree-picker/tree-picker.vue": __vite_glob_0_59,"./components/upload-file/upload-file.vue": __vite_glob_0_60});
|
|
166
166
|
const upper = (_, letter) => letter.toUpperCase();
|
package/dist/index.css
CHANGED
|
@@ -828,7 +828,7 @@ div._table_p2qu9_7 .el-table__column-resize-proxy {
|
|
|
828
828
|
border-color: var(--el-color-primary);
|
|
829
829
|
}
|
|
830
830
|
div._table_p2qu9_7 .el-table__empty-block {
|
|
831
|
-
display: var(--
|
|
831
|
+
display: var(--v2bf7e3e4);
|
|
832
832
|
}
|
|
833
833
|
._selection_p2qu9_27 .cell {
|
|
834
834
|
display: flex;
|