@wfrog/vc-ui 1.9.0 → 1.9.1
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-column-table/explorer-column-table.mjs +13 -1
- package/dist/es/components/explorer-table/explorer-table.d.ts +1 -0
- package/dist/es/components/explorer-table/explorer-table.mjs +45 -17
- package/dist/es/components/explorer-table/explorer-table.vue.d.ts +9 -1
- package/dist/es/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -2730,6 +2730,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2730
2730
|
return { width: 260, data: 200, fixed: 140, truncate: 76 };
|
|
2731
2731
|
});
|
|
2732
2732
|
const isFullMode = computed(() => props.mode === "full");
|
|
2733
|
+
function getLabel(row) {
|
|
2734
|
+
if (row.label) {
|
|
2735
|
+
return row.label;
|
|
2736
|
+
}
|
|
2737
|
+
if (row.prop === "index") {
|
|
2738
|
+
return "序号";
|
|
2739
|
+
}
|
|
2740
|
+
if (row.prop.startsWith("expand")) {
|
|
2741
|
+
return "展开行";
|
|
2742
|
+
}
|
|
2743
|
+
return "-";
|
|
2744
|
+
}
|
|
2733
2745
|
function handleWidthChange(row) {
|
|
2734
2746
|
if (row.widthType === "width") {
|
|
2735
2747
|
row.width = row.minWidth;
|
|
@@ -2806,7 +2818,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2806
2818
|
createVNode(_component_ElCheckbox, {
|
|
2807
2819
|
modelValue: row.visible,
|
|
2808
2820
|
"onUpdate:modelValue": ($event) => row.visible = $event,
|
|
2809
|
-
label: row
|
|
2821
|
+
label: getLabel(row),
|
|
2810
2822
|
size: __props.size
|
|
2811
2823
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "size"])
|
|
2812
2824
|
], 2)
|
|
@@ -6,7 +6,7 @@ import '../../chunk/BqMf3xBl.mjs';
|
|
|
6
6
|
/* empty css */
|
|
7
7
|
import '../../chunk/D1Ki7NcP.mjs';
|
|
8
8
|
import '../../chunk/Dh_zpmSz.mjs';
|
|
9
|
-
import { defineComponent, h, computed, watch, withDirectives, createElementBlock, openBlock, normalizeClass, createVNode, mergeProps, withCtx, createBlock, createCommentVNode, renderSlot, unref, Fragment, renderList,
|
|
9
|
+
import { defineComponent, h, computed, watch, withDirectives, createElementBlock, openBlock, normalizeClass, createVNode, mergeProps, withCtx, createBlock, createCommentVNode, renderSlot, unref, Fragment, renderList, createSlots, createTextVNode, toDisplayString, resolveDynamicComponent } from 'vue';
|
|
10
10
|
import { ElTableColumn } from 'element-plus';
|
|
11
11
|
import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
|
|
12
12
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
@@ -26,12 +26,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
loadingText: { default: "数据加载中..." },
|
|
27
27
|
size: {},
|
|
28
28
|
columnRender: { type: Function, default: (row, column) => h("span", row[column.prop]) },
|
|
29
|
-
columnConfig: {}
|
|
29
|
+
columnConfig: {},
|
|
30
|
+
startIndex: { default: 0 }
|
|
30
31
|
},
|
|
31
32
|
setup(__props, { expose: __expose }) {
|
|
32
33
|
const props = __props;
|
|
33
34
|
const state = injectExplorerPanelState();
|
|
34
35
|
const columns = computed(() => state.columnConfig.value.filter((item) => item.visible !== false));
|
|
36
|
+
function columnType(item) {
|
|
37
|
+
if (item.prop.startsWith("expand")) {
|
|
38
|
+
return "expand";
|
|
39
|
+
}
|
|
40
|
+
return "default";
|
|
41
|
+
}
|
|
35
42
|
watch(() => props.columnConfig, (val) => {
|
|
36
43
|
if (Array.isArray(state.columnConfig.value) && state.columnConfig.value.length) {
|
|
37
44
|
return;
|
|
@@ -81,23 +88,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
88
|
width: __props.size === "large" ? 50 : 38,
|
|
82
89
|
align: "center"
|
|
83
90
|
}, null, 8, ["width"])) : createCommentVNode("", true),
|
|
84
|
-
|
|
85
|
-
__props.index ? (openBlock(), createBlock(unref(ElTableColumn), {
|
|
86
|
-
key: 1,
|
|
87
|
-
type: "index",
|
|
88
|
-
width: __props.size === "large" ? 80 : 60,
|
|
89
|
-
align: "center",
|
|
90
|
-
fixed: "left"
|
|
91
|
-
}, null, 8, ["width"])) : createCommentVNode("", true),
|
|
92
|
-
unref(columns).length ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(unref(columns), (item) => {
|
|
91
|
+
unref(columns).length ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(columns), (item) => {
|
|
93
92
|
return openBlock(), createBlock(unref(ElTableColumn), mergeProps({
|
|
94
93
|
key: item.prop
|
|
95
|
-
}, { ref_for: true }, item
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
}, { ref_for: true }, item, {
|
|
95
|
+
type: columnType(item)
|
|
96
|
+
}), createSlots({ _: 2 }, [
|
|
97
|
+
item.prop.startsWith("expand") ? {
|
|
98
|
+
name: "default",
|
|
99
|
+
fn: withCtx(({ row, $index }) => [
|
|
100
|
+
renderSlot(_ctx.$slots, "expand", {
|
|
101
|
+
row,
|
|
102
|
+
index: $index
|
|
103
|
+
})
|
|
104
|
+
]),
|
|
105
|
+
key: "0"
|
|
106
|
+
} : item.prop === "index" ? {
|
|
107
|
+
name: "default",
|
|
108
|
+
fn: withCtx(({ $index }) => [
|
|
109
|
+
createTextVNode(toDisplayString(__props.startIndex + $index + 1), 1)
|
|
110
|
+
]),
|
|
111
|
+
key: "1"
|
|
112
|
+
} : item.prop === "operation" ? {
|
|
113
|
+
name: "default",
|
|
114
|
+
fn: withCtx(({ row, $index }) => [
|
|
115
|
+
renderSlot(_ctx.$slots, "operation", {
|
|
116
|
+
row,
|
|
117
|
+
index: $index
|
|
118
|
+
})
|
|
119
|
+
]),
|
|
120
|
+
key: "2"
|
|
121
|
+
} : {
|
|
122
|
+
name: "default",
|
|
123
|
+
fn: withCtx(({ row, $index }) => [
|
|
124
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.columnRender(row, item, $index))))
|
|
125
|
+
]),
|
|
126
|
+
key: "3"
|
|
127
|
+
}
|
|
128
|
+
]), 1040, ["type"]);
|
|
101
129
|
}), 128)) : createCommentVNode("", true),
|
|
102
130
|
renderSlot(_ctx.$slots, "default")
|
|
103
131
|
]),
|
|
@@ -3,7 +3,14 @@ import { IExplorerTableProps } from './explorer-table';
|
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: {
|
|
6
|
-
expand?(_: {
|
|
6
|
+
expand?(_: {
|
|
7
|
+
row: any;
|
|
8
|
+
index: any;
|
|
9
|
+
}): any;
|
|
10
|
+
operation?(_: {
|
|
11
|
+
row: any;
|
|
12
|
+
index: any;
|
|
13
|
+
}): any;
|
|
7
14
|
default?(_: {}): any;
|
|
8
15
|
};
|
|
9
16
|
refs: {};
|
|
@@ -18,6 +25,7 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTableProps
|
|
|
18
25
|
emptyText: string;
|
|
19
26
|
highlightCurrent: boolean;
|
|
20
27
|
columnRender: (row: any, column: IColumnConfig, index: number) => VNode;
|
|
28
|
+
startIndex: number;
|
|
21
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
22
30
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
31
|
export default _default;
|
package/dist/es/index.mjs
CHANGED
|
@@ -156,7 +156,7 @@ const __vite_glob_0_47 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
|
|
|
156
156
|
default: _sfc_main$8
|
|
157
157
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
158
158
|
|
|
159
|
-
const version = "1.9.
|
|
159
|
+
const version = "1.9.1";
|
|
160
160
|
|
|
161
161
|
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-switcher/color-switcher.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-switcher/dark-switcher.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/icon-picker/icon-picker.vue": __vite_glob_0_34,"./components/icon/icon.vue": __vite_glob_0_35,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_36,"./components/image/image.vue": __vite_glob_0_37,"./components/input-number/input-number.vue": __vite_glob_0_38,"./components/input/input.vue": __vite_glob_0_39,"./components/pca-picker/pca-picker.vue": __vite_glob_0_40,"./components/qr-code/qr-code.vue": __vite_glob_0_41,"./components/screenfull/screenfull.vue": __vite_glob_0_42,"./components/scrollbar/scrollbar.vue": __vite_glob_0_43,"./components/select/select.vue": __vite_glob_0_44,"./components/single-player/single-player.vue": __vite_glob_0_45,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_46,"./components/splitter/splitter.vue": __vite_glob_0_47,"./components/svg-icon/svg-icon.vue": __vite_glob_0_48,"./components/switch/switch.vue": __vite_glob_0_49,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_50,"./components/tags/tags.vue": __vite_glob_0_51,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_52,"./components/thousand-input/thousand-input.vue": __vite_glob_0_53,"./components/tinymce/tinymce.vue": __vite_glob_0_54,"./components/transfer-panel/transfer-panel.vue": __vite_glob_0_55,"./components/transfer/transfer.vue": __vite_glob_0_56,"./components/tree-picker/tree-picker.vue": __vite_glob_0_57,"./components/upload-file/upload-file.vue": __vite_glob_0_58});
|
|
162
162
|
const upper = (_, letter) => letter.toUpperCase();
|