tabula-vue 1.0.1 → 1.0.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/es/component.mjs +2 -0
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +1 -0
- package/es/components/page/index.d.ts +8861 -5128
- package/es/components/page/src/index.vue.d.ts +1470 -268
- package/es/components/page/src/index.vue2.mjs +13 -3
- package/es/components/table-lite/index.d.ts +1783 -0
- package/es/components/table-lite/index.mjs +6 -0
- package/es/components/table-lite/src/display-value.d.ts +26 -0
- package/es/components/table-lite/src/display-value.mjs +82 -0
- package/es/components/table-lite/src/index.vue.d.ts +672 -0
- package/es/components/table-lite/src/index.vue.mjs +6 -0
- package/es/components/table-lite/src/index.vue2.mjs +690 -0
- package/es/components/table-lite/src/type.d.ts +91 -0
- package/es/components/table-lite/src/type.mjs +1 -0
- package/es/components/table-lite/style/css.d.ts +16 -0
- package/es/components/table-lite/style/css.mjs +16 -0
- package/es/components/table-lite/style/index.d.ts +16 -0
- package/es/components/table-lite/style/index.mjs +16 -0
- package/es/index.mjs +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +845 -84
- package/index.min.js +7 -3
- package/index.min.mjs +7 -3
- package/index.mjs +845 -85
- package/lib/component.js +42 -40
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +43 -41
- package/lib/components/page/index.d.ts +8861 -5128
- package/lib/components/page/src/index.vue.d.ts +1470 -268
- package/lib/components/page/src/index.vue2.js +15 -5
- package/lib/components/table-lite/index.d.ts +1783 -0
- package/lib/components/table-lite/index.js +8 -0
- package/lib/components/table-lite/src/display-value.d.ts +26 -0
- package/lib/components/table-lite/src/display-value.js +86 -0
- package/lib/components/table-lite/src/index.vue.d.ts +672 -0
- package/lib/components/table-lite/src/index.vue.js +10 -0
- package/lib/components/table-lite/src/index.vue2.js +694 -0
- package/lib/components/table-lite/src/type.d.ts +91 -0
- package/lib/components/table-lite/src/type.js +2 -0
- package/lib/components/table-lite/style/css.d.ts +16 -0
- package/lib/components/table-lite/style/css.js +19 -0
- package/lib/components/table-lite/style/index.d.ts +16 -0
- package/lib/components/table-lite/style/index.js +19 -0
- package/lib/index.js +43 -41
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-hk.js +1 -1
- package/locale/zh-hk.min.js +1 -1
- package/locale/zh-hk.min.mjs +1 -1
- package/locale/zh-hk.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-table-lite.css +1 -0
- package/theme-chalk/src/index.scss +1 -0
- package/theme-chalk/src/table-lite.scss +53 -0
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tabula-vue v1.0.
|
|
1
|
+
/*! tabula-vue v1.0.3 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus'], factory) :
|
|
@@ -2247,7 +2247,7 @@
|
|
|
2247
2247
|
var Promise$1 = getNative(root$1, 'Promise');
|
|
2248
2248
|
|
|
2249
2249
|
/* Built-in method references that are verified to be native. */
|
|
2250
|
-
var Set = getNative(root$1, 'Set');
|
|
2250
|
+
var Set$1 = getNative(root$1, 'Set');
|
|
2251
2251
|
|
|
2252
2252
|
/** `Object#toString` result references. */
|
|
2253
2253
|
var mapTag$4 = '[object Map]',
|
|
@@ -2262,7 +2262,7 @@
|
|
|
2262
2262
|
var dataViewCtorString = toSource(DataView),
|
|
2263
2263
|
mapCtorString = toSource(Map$1),
|
|
2264
2264
|
promiseCtorString = toSource(Promise$1),
|
|
2265
|
-
setCtorString = toSource(Set),
|
|
2265
|
+
setCtorString = toSource(Set$1),
|
|
2266
2266
|
weakMapCtorString = toSource(WeakMap);
|
|
2267
2267
|
|
|
2268
2268
|
/**
|
|
@@ -2278,7 +2278,7 @@
|
|
|
2278
2278
|
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
|
|
2279
2279
|
(Map$1 && getTag(new Map$1) != mapTag$4) ||
|
|
2280
2280
|
(Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
|
|
2281
|
-
(Set && getTag(new Set) != setTag$4) ||
|
|
2281
|
+
(Set$1 && getTag(new Set$1) != setTag$4) ||
|
|
2282
2282
|
(WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
|
|
2283
2283
|
getTag = function(value) {
|
|
2284
2284
|
var result = baseGetTag(value),
|
|
@@ -4481,8 +4481,8 @@
|
|
|
4481
4481
|
};
|
|
4482
4482
|
}
|
|
4483
4483
|
|
|
4484
|
-
const _hoisted_1$
|
|
4485
|
-
var _sfc_main$
|
|
4484
|
+
const _hoisted_1$l = { class: "plus-dialog-body" };
|
|
4485
|
+
var _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
4486
4486
|
...{
|
|
4487
4487
|
name: "PlusDialog",
|
|
4488
4488
|
inheritAttrs: false
|
|
@@ -4532,7 +4532,7 @@
|
|
|
4532
4532
|
class: "plus-dialog"
|
|
4533
4533
|
}, _ctx.$attrs), vue.createSlots({
|
|
4534
4534
|
default: vue.withCtx(() => [
|
|
4535
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
4535
|
+
vue.createElementVNode("div", _hoisted_1$l, [
|
|
4536
4536
|
vue.renderSlot(_ctx.$slots, "default")
|
|
4537
4537
|
])
|
|
4538
4538
|
]),
|
|
@@ -4604,25 +4604,25 @@
|
|
|
4604
4604
|
return target;
|
|
4605
4605
|
};
|
|
4606
4606
|
|
|
4607
|
-
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4607
|
+
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "index.vue"]]);
|
|
4608
4608
|
|
|
4609
4609
|
const PlusDialog = Dialog;
|
|
4610
4610
|
|
|
4611
|
-
const _hoisted_1$
|
|
4611
|
+
const _hoisted_1$k = /* @__PURE__ */ vue.createElementVNode(
|
|
4612
4612
|
"span",
|
|
4613
4613
|
null,
|
|
4614
4614
|
null,
|
|
4615
4615
|
-1
|
|
4616
4616
|
/* HOISTED */
|
|
4617
4617
|
);
|
|
4618
|
-
const _hoisted_2$
|
|
4618
|
+
const _hoisted_2$a = /* @__PURE__ */ vue.createElementVNode(
|
|
4619
4619
|
"span",
|
|
4620
4620
|
null,
|
|
4621
4621
|
null,
|
|
4622
4622
|
-1
|
|
4623
4623
|
/* HOISTED */
|
|
4624
4624
|
);
|
|
4625
|
-
var _sfc_main$
|
|
4625
|
+
var _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
4626
4626
|
...{
|
|
4627
4627
|
name: "PlusPagination"
|
|
4628
4628
|
},
|
|
@@ -4664,7 +4664,7 @@
|
|
|
4664
4664
|
},
|
|
4665
4665
|
[
|
|
4666
4666
|
_ctx.align === "right" || _ctx.align === "center" ? vue.renderSlot(_ctx.$slots, "pagination-left", { key: 0 }, () => [
|
|
4667
|
-
_hoisted_1$
|
|
4667
|
+
_hoisted_1$k
|
|
4668
4668
|
]) : vue.createCommentVNode("v-if", true),
|
|
4669
4669
|
vue.createVNode(vue.unref(elementPlus.ElPagination), vue.mergeProps({
|
|
4670
4670
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
@@ -4678,7 +4678,7 @@
|
|
|
4678
4678
|
onCurrentChange: handleCurrentChange
|
|
4679
4679
|
}), null, 16, ["current-page", "page-size", "total", "page-sizes"]),
|
|
4680
4680
|
_ctx.align === "left" || _ctx.align === "center" ? vue.renderSlot(_ctx.$slots, "pagination-right", { key: 1 }, () => [
|
|
4681
|
-
_hoisted_2$
|
|
4681
|
+
_hoisted_2$a
|
|
4682
4682
|
]) : vue.createCommentVNode("v-if", true)
|
|
4683
4683
|
],
|
|
4684
4684
|
2
|
|
@@ -4688,11 +4688,11 @@
|
|
|
4688
4688
|
}
|
|
4689
4689
|
});
|
|
4690
4690
|
|
|
4691
|
-
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4691
|
+
var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "index.vue"]]);
|
|
4692
4692
|
|
|
4693
4693
|
const PlusPagination = Pagination;
|
|
4694
4694
|
|
|
4695
|
-
var _sfc_main$
|
|
4695
|
+
var _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
4696
4696
|
...{
|
|
4697
4697
|
name: "PlusRadio"
|
|
4698
4698
|
},
|
|
@@ -4877,7 +4877,7 @@
|
|
|
4877
4877
|
}
|
|
4878
4878
|
});
|
|
4879
4879
|
|
|
4880
|
-
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4880
|
+
var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "index.vue"]]);
|
|
4881
4881
|
|
|
4882
4882
|
const PlusRadio = Radio;
|
|
4883
4883
|
|
|
@@ -5118,13 +5118,13 @@
|
|
|
5118
5118
|
// src/components/user.vue
|
|
5119
5119
|
var user_default = user_vue_vue_type_script_setup_true_lang_default;
|
|
5120
5120
|
|
|
5121
|
-
const _hoisted_1$
|
|
5121
|
+
const _hoisted_1$j = {
|
|
5122
5122
|
key: 0,
|
|
5123
5123
|
class: "plus-table-action-bar__dropdown__link"
|
|
5124
5124
|
};
|
|
5125
|
-
const _hoisted_2$
|
|
5125
|
+
const _hoisted_2$9 = { class: "plus-table-action-bar__dropdown__link" };
|
|
5126
5126
|
const _hoisted_3$4 = { class: "plus-table-action-bar__more-text" };
|
|
5127
|
-
var _sfc_main$
|
|
5127
|
+
var _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
5128
5128
|
...{
|
|
5129
5129
|
name: "PlusTableActionBarContent"
|
|
5130
5130
|
},
|
|
@@ -5445,7 +5445,7 @@
|
|
|
5445
5445
|
)
|
|
5446
5446
|
]),
|
|
5447
5447
|
default: vue.withCtx(() => [
|
|
5448
|
-
_ctx.moreType === "icon" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
5448
|
+
_ctx.moreType === "icon" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$j, [
|
|
5449
5449
|
vue.renderSlot(_ctx.$slots, "action-bar-more-icon", {}, () => [
|
|
5450
5450
|
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
5451
5451
|
default: vue.withCtx(() => [
|
|
@@ -5460,7 +5460,7 @@
|
|
|
5460
5460
|
{ key: 1 },
|
|
5461
5461
|
[
|
|
5462
5462
|
vue.createCommentVNode(" \u9ED8\u8BA4 "),
|
|
5463
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
5463
|
+
vue.createElementVNode("span", _hoisted_2$9, [
|
|
5464
5464
|
vue.createElementVNode(
|
|
5465
5465
|
"span",
|
|
5466
5466
|
_hoisted_3$4,
|
|
@@ -5502,9 +5502,9 @@
|
|
|
5502
5502
|
}
|
|
5503
5503
|
});
|
|
5504
5504
|
|
|
5505
|
-
var PlusTableActionBarContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5505
|
+
var PlusTableActionBarContent = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "table-action-bar-content.vue"]]);
|
|
5506
5506
|
|
|
5507
|
-
var _sfc_main$
|
|
5507
|
+
var _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
5508
5508
|
...{
|
|
5509
5509
|
name: "PlusTableActionBar"
|
|
5510
5510
|
},
|
|
@@ -5569,9 +5569,9 @@
|
|
|
5569
5569
|
}
|
|
5570
5570
|
});
|
|
5571
5571
|
|
|
5572
|
-
var PlusTableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5572
|
+
var PlusTableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "table-action-bar.vue"]]);
|
|
5573
5573
|
|
|
5574
|
-
var _sfc_main$
|
|
5574
|
+
var _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
5575
5575
|
...{
|
|
5576
5576
|
name: "PlusRender"
|
|
5577
5577
|
},
|
|
@@ -5641,12 +5641,12 @@
|
|
|
5641
5641
|
}
|
|
5642
5642
|
});
|
|
5643
5643
|
|
|
5644
|
-
var Render = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5644
|
+
var Render = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "index.vue"]]);
|
|
5645
5645
|
|
|
5646
5646
|
const PlusRender = Render;
|
|
5647
5647
|
|
|
5648
|
-
const _hoisted_1$
|
|
5649
|
-
var _sfc_main$
|
|
5648
|
+
const _hoisted_1$i = { class: "plus-date-picker__middle" };
|
|
5649
|
+
var _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
5650
5650
|
...{
|
|
5651
5651
|
name: "PlusDatePicker"
|
|
5652
5652
|
},
|
|
@@ -5751,7 +5751,7 @@
|
|
|
5751
5751
|
}), null, 16, ["modelValue", "type", "value-format", "placeholder", "disabled"]),
|
|
5752
5752
|
vue.createElementVNode(
|
|
5753
5753
|
"span",
|
|
5754
|
-
_hoisted_1$
|
|
5754
|
+
_hoisted_1$i,
|
|
5755
5755
|
vue.toDisplayString(_ctx.rangeSeparator),
|
|
5756
5756
|
1
|
|
5757
5757
|
/* TEXT */
|
|
@@ -5782,11 +5782,11 @@
|
|
|
5782
5782
|
}
|
|
5783
5783
|
});
|
|
5784
5784
|
|
|
5785
|
-
var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5785
|
+
var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "index.vue"]]);
|
|
5786
5786
|
|
|
5787
5787
|
const PlusDatePicker = DatePicker;
|
|
5788
5788
|
|
|
5789
|
-
var _sfc_main$
|
|
5789
|
+
var _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
5790
5790
|
...{
|
|
5791
5791
|
name: "PlusInputTag"
|
|
5792
5792
|
},
|
|
@@ -5923,7 +5923,7 @@
|
|
|
5923
5923
|
}
|
|
5924
5924
|
});
|
|
5925
5925
|
|
|
5926
|
-
var InputTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5926
|
+
var InputTag = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "index.vue"]]);
|
|
5927
5927
|
|
|
5928
5928
|
const PlusInputTag = InputTag;
|
|
5929
5929
|
|
|
@@ -6020,9 +6020,9 @@
|
|
|
6020
6020
|
);
|
|
6021
6021
|
const getFieldComponent = (valueType) => Reflect.get(FieldComponentMap, valueType) || {};
|
|
6022
6022
|
|
|
6023
|
-
const _hoisted_1$
|
|
6024
|
-
const _hoisted_2$
|
|
6025
|
-
var _sfc_main$
|
|
6023
|
+
const _hoisted_1$h = { class: "el-form-item__error" };
|
|
6024
|
+
const _hoisted_2$8 = { class: "plus-form-item__label" };
|
|
6025
|
+
var _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
6026
6026
|
...{
|
|
6027
6027
|
name: "PlusFormItem"
|
|
6028
6028
|
},
|
|
@@ -6577,7 +6577,7 @@
|
|
|
6577
6577
|
vue.unref(isFunction)(_ctx.renderErrorMessage) ? {
|
|
6578
6578
|
name: "error",
|
|
6579
6579
|
fn: vue.withCtx(({ error }) => [
|
|
6580
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
6580
|
+
vue.createElementVNode("div", _hoisted_1$h, [
|
|
6581
6581
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.renderErrorMessage), vue.mergeProps(props, {
|
|
6582
6582
|
value: state.value,
|
|
6583
6583
|
error,
|
|
@@ -6590,7 +6590,7 @@
|
|
|
6590
6590
|
_ctx.hasLabel ? {
|
|
6591
6591
|
name: "label",
|
|
6592
6592
|
fn: vue.withCtx(({ label: currentLabel }) => [
|
|
6593
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
6593
|
+
vue.createElementVNode("span", _hoisted_2$8, [
|
|
6594
6594
|
_ctx.renderLabel && vue.unref(isFunction)(_ctx.renderLabel) ? (vue.openBlock(), vue.createElementBlock(
|
|
6595
6595
|
vue.Fragment,
|
|
6596
6596
|
{ key: 0 },
|
|
@@ -6648,11 +6648,11 @@
|
|
|
6648
6648
|
}
|
|
6649
6649
|
});
|
|
6650
6650
|
|
|
6651
|
-
var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6651
|
+
var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "index.vue"]]);
|
|
6652
6652
|
|
|
6653
6653
|
const PlusFormItem = FormItem;
|
|
6654
6654
|
|
|
6655
|
-
var _sfc_main$
|
|
6655
|
+
var _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
6656
6656
|
...{
|
|
6657
6657
|
name: "PlusCollapseTransition"
|
|
6658
6658
|
},
|
|
@@ -6703,17 +6703,17 @@
|
|
|
6703
6703
|
}
|
|
6704
6704
|
});
|
|
6705
6705
|
|
|
6706
|
-
var PlusCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6706
|
+
var PlusCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "collapse-transition.vue"]]);
|
|
6707
6707
|
|
|
6708
|
-
const _hoisted_1$
|
|
6708
|
+
const _hoisted_1$g = {
|
|
6709
6709
|
key: 0,
|
|
6710
6710
|
class: "plus-form-item-previous"
|
|
6711
6711
|
};
|
|
6712
|
-
const _hoisted_2$
|
|
6712
|
+
const _hoisted_2$7 = {
|
|
6713
6713
|
key: 1,
|
|
6714
6714
|
class: "plus-form-item-extra"
|
|
6715
6715
|
};
|
|
6716
|
-
var _sfc_main$
|
|
6716
|
+
var _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
6717
6717
|
...{
|
|
6718
6718
|
name: "PlusFormContent"
|
|
6719
6719
|
},
|
|
@@ -6778,7 +6778,7 @@
|
|
|
6778
6778
|
{
|
|
6779
6779
|
default: vue.withCtx(() => [
|
|
6780
6780
|
vue.createCommentVNode(" el-form-item\u4E0A\u4E00\u884C\u7684\u5185\u5BB9 "),
|
|
6781
|
-
item.renderPrevious || _ctx.$slots[vue.unref(getPreviousSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6781
|
+
item.renderPrevious || _ctx.$slots[vue.unref(getPreviousSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
6782
6782
|
vue.unref(isFunction)(item.renderPrevious) ? (vue.openBlock(), vue.createBlock(
|
|
6783
6783
|
vue.resolveDynamicComponent(item.renderPrevious),
|
|
6784
6784
|
vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
|
|
@@ -6820,7 +6820,7 @@
|
|
|
6820
6820
|
} : void 0
|
|
6821
6821
|
]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
|
|
6822
6822
|
vue.createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
|
|
6823
|
-
item.renderExtra || _ctx.$slots[vue.unref(getExtraSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6823
|
+
item.renderExtra || _ctx.$slots[vue.unref(getExtraSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
|
|
6824
6824
|
item.renderExtra && vue.unref(isFunction)(item.renderExtra) ? (vue.openBlock(), vue.createBlock(
|
|
6825
6825
|
vue.resolveDynamicComponent(item.renderExtra),
|
|
6826
6826
|
vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
|
|
@@ -6857,10 +6857,10 @@
|
|
|
6857
6857
|
}
|
|
6858
6858
|
});
|
|
6859
6859
|
|
|
6860
|
-
var PlusFormContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6860
|
+
var PlusFormContent = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "form-content.vue"]]);
|
|
6861
6861
|
|
|
6862
|
-
const _hoisted_1$
|
|
6863
|
-
var _sfc_main$
|
|
6862
|
+
const _hoisted_1$f = { class: "plus-form__group__item__icon" };
|
|
6863
|
+
var _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
6864
6864
|
...{
|
|
6865
6865
|
name: "PlusForm",
|
|
6866
6866
|
inheritAttrs: false
|
|
@@ -7010,7 +7010,7 @@
|
|
|
7010
7010
|
icon: groupItem.icon,
|
|
7011
7011
|
index
|
|
7012
7012
|
}, () => [
|
|
7013
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
7013
|
+
vue.createElementVNode("div", _hoisted_1$f, [
|
|
7014
7014
|
groupItem.icon ? (vue.openBlock(), vue.createBlock(
|
|
7015
7015
|
vue.unref(elementPlus.ElIcon),
|
|
7016
7016
|
{ key: 0 },
|
|
@@ -7155,7 +7155,7 @@
|
|
|
7155
7155
|
}
|
|
7156
7156
|
});
|
|
7157
7157
|
|
|
7158
|
-
var Form = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7158
|
+
var Form = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "index.vue"]]);
|
|
7159
7159
|
|
|
7160
7160
|
const PlusForm = Form;
|
|
7161
7161
|
|
|
@@ -7198,8 +7198,8 @@
|
|
|
7198
7198
|
const hasDisplayComponent = (valueType) => Object.keys(DisplayComponentMap).includes(valueType);
|
|
7199
7199
|
const getDisplayComponent = (valueType) => Reflect.get(DisplayComponentMap, valueType) || {};
|
|
7200
7200
|
|
|
7201
|
-
const _hoisted_1$
|
|
7202
|
-
const _hoisted_2$
|
|
7201
|
+
const _hoisted_1$e = ["innerHTML"];
|
|
7202
|
+
const _hoisted_2$6 = { class: "plus-display-item" };
|
|
7203
7203
|
const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode(
|
|
7204
7204
|
"svg",
|
|
7205
7205
|
{
|
|
@@ -7219,7 +7219,7 @@
|
|
|
7219
7219
|
-1
|
|
7220
7220
|
/* HOISTED */
|
|
7221
7221
|
);
|
|
7222
|
-
var _sfc_main$
|
|
7222
|
+
var _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
7223
7223
|
...{
|
|
7224
7224
|
name: "PlusDisplayItem"
|
|
7225
7225
|
},
|
|
@@ -7590,7 +7590,7 @@
|
|
|
7590
7590
|
vue.createElementVNode("span", {
|
|
7591
7591
|
class: "plus-display-item",
|
|
7592
7592
|
innerHTML: _ctx.column.renderHTML(displayValue.value, renderParams.value)
|
|
7593
|
-
}, null, 8, _hoisted_1$
|
|
7593
|
+
}, null, 8, _hoisted_1$e)
|
|
7594
7594
|
],
|
|
7595
7595
|
2112
|
|
7596
7596
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -7719,7 +7719,7 @@
|
|
|
7719
7719
|
{ key: 5 },
|
|
7720
7720
|
[
|
|
7721
7721
|
vue.createCommentVNode(" \u590D\u5236 "),
|
|
7722
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
7722
|
+
vue.createElementVNode("span", _hoisted_2$6, [
|
|
7723
7723
|
vue.createTextVNode(
|
|
7724
7724
|
vue.toDisplayString(formatterValue.value) + " ",
|
|
7725
7725
|
1
|
|
@@ -7857,12 +7857,12 @@
|
|
|
7857
7857
|
}
|
|
7858
7858
|
});
|
|
7859
7859
|
|
|
7860
|
-
var DisplayItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7860
|
+
var DisplayItem = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "index.vue"]]);
|
|
7861
7861
|
|
|
7862
7862
|
const PlusDisplayItem = DisplayItem;
|
|
7863
7863
|
|
|
7864
|
-
const _hoisted_1$
|
|
7865
|
-
var _sfc_main$
|
|
7864
|
+
const _hoisted_1$d = { class: "plus-table-column__header" };
|
|
7865
|
+
var _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
7866
7866
|
...{
|
|
7867
7867
|
name: "PlusTableColumn"
|
|
7868
7868
|
},
|
|
@@ -7960,7 +7960,7 @@
|
|
|
7960
7960
|
"min-width": item.minWidth
|
|
7961
7961
|
}), {
|
|
7962
7962
|
header: vue.withCtx((scoped) => [
|
|
7963
|
-
vue.createElementVNode("span", _hoisted_1$
|
|
7963
|
+
vue.createElementVNode("span", _hoisted_1$d, [
|
|
7964
7964
|
item.renderHeader && vue.unref(isFunction)(item.renderHeader) ? (vue.openBlock(), vue.createBlock(vue.unref(PlusRender), {
|
|
7965
7965
|
key: 0,
|
|
7966
7966
|
render: item.renderHeader,
|
|
@@ -8091,9 +8091,9 @@
|
|
|
8091
8091
|
}
|
|
8092
8092
|
});
|
|
8093
8093
|
|
|
8094
|
-
var PlusTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8094
|
+
var PlusTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "table-column.vue"]]);
|
|
8095
8095
|
|
|
8096
|
-
var _sfc_main$
|
|
8096
|
+
var _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
8097
8097
|
...{
|
|
8098
8098
|
name: "PlusTableTableColumnIndex"
|
|
8099
8099
|
},
|
|
@@ -8167,7 +8167,7 @@
|
|
|
8167
8167
|
}
|
|
8168
8168
|
});
|
|
8169
8169
|
|
|
8170
|
-
var PlusTableTableColumnIndex = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8170
|
+
var PlusTableTableColumnIndex = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "table-column-index.vue"]]);
|
|
8171
8171
|
|
|
8172
8172
|
/**!
|
|
8173
8173
|
* Sortable 1.15.0
|
|
@@ -11189,8 +11189,8 @@
|
|
|
11189
11189
|
Sortable.mount(new AutoScrollPlugin());
|
|
11190
11190
|
Sortable.mount(Remove, Revert);
|
|
11191
11191
|
|
|
11192
|
-
const _hoisted_1$
|
|
11193
|
-
var _sfc_main$
|
|
11192
|
+
const _hoisted_1$c = { class: "plus-table-column-drag-icon" };
|
|
11193
|
+
var _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
11194
11194
|
...{
|
|
11195
11195
|
name: "PlusTableColumnDragSort"
|
|
11196
11196
|
},
|
|
@@ -11241,7 +11241,7 @@
|
|
|
11241
11241
|
"class-name": "plus-table-column-drag-sort"
|
|
11242
11242
|
}, _ctx.dragSortableTableColumnProps), {
|
|
11243
11243
|
default: vue.withCtx(() => [
|
|
11244
|
-
vue.createElementVNode("span", _hoisted_1$
|
|
11244
|
+
vue.createElementVNode("span", _hoisted_1$c, [
|
|
11245
11245
|
vue.renderSlot(_ctx.$slots, "drag-sort-icon", {}, () => [
|
|
11246
11246
|
vue.createTextVNode("\u2637")
|
|
11247
11247
|
])
|
|
@@ -11254,13 +11254,13 @@
|
|
|
11254
11254
|
}
|
|
11255
11255
|
});
|
|
11256
11256
|
|
|
11257
|
-
var PlusTableColumnDragSort = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11257
|
+
var PlusTableColumnDragSort = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "table-column-drag-sort.vue"]]);
|
|
11258
11258
|
|
|
11259
|
-
const _hoisted_1$
|
|
11259
|
+
const _hoisted_1$b = {
|
|
11260
11260
|
key: 0,
|
|
11261
11261
|
style: { "padding-top": "12px" }
|
|
11262
11262
|
};
|
|
11263
|
-
var _sfc_main$
|
|
11263
|
+
var _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
11264
11264
|
...{
|
|
11265
11265
|
name: "PlusPopover"
|
|
11266
11266
|
},
|
|
@@ -11306,7 +11306,7 @@
|
|
|
11306
11306
|
]),
|
|
11307
11307
|
default: vue.withCtx(() => [
|
|
11308
11308
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
11309
|
-
_ctx.hasShowBottomButton ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11309
|
+
_ctx.hasShowBottomButton ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
11310
11310
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
11311
11311
|
size: "small",
|
|
11312
11312
|
plain: "",
|
|
@@ -11347,12 +11347,12 @@
|
|
|
11347
11347
|
}
|
|
11348
11348
|
});
|
|
11349
11349
|
|
|
11350
|
-
var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11350
|
+
var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "index.vue"]]);
|
|
11351
11351
|
|
|
11352
11352
|
const PlusPopover = Popover;
|
|
11353
11353
|
|
|
11354
|
-
const _hoisted_1$
|
|
11355
|
-
const _hoisted_2$
|
|
11354
|
+
const _hoisted_1$a = { class: "plus-table-title-bar" };
|
|
11355
|
+
const _hoisted_2$5 = { class: "plus-table-title-bar__title" };
|
|
11356
11356
|
const _hoisted_3$2 = { class: "plus-table-title-bar__toolbar" };
|
|
11357
11357
|
const _hoisted_4$2 = { class: "plus-table-title-bar__toolbar__density" };
|
|
11358
11358
|
const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode(
|
|
@@ -11377,7 +11377,7 @@
|
|
|
11377
11377
|
};
|
|
11378
11378
|
const _hoisted_8$1 = { key: 1 };
|
|
11379
11379
|
const _hoisted_9$1 = { key: 1 };
|
|
11380
|
-
var _sfc_main$
|
|
11380
|
+
var _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
11381
11381
|
...{
|
|
11382
11382
|
name: "PlusTableToolbar"
|
|
11383
11383
|
},
|
|
@@ -11528,8 +11528,8 @@
|
|
|
11528
11528
|
});
|
|
11529
11529
|
return (_ctx, _cache) => {
|
|
11530
11530
|
var _a, _b, _c;
|
|
11531
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11532
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
11531
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
11532
|
+
vue.createElementVNode("div", _hoisted_2$5, [
|
|
11533
11533
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
11534
11534
|
vue.createTextVNode(
|
|
11535
11535
|
vue.toDisplayString(titleBarConfig.value.title),
|
|
@@ -11830,7 +11830,7 @@
|
|
|
11830
11830
|
}
|
|
11831
11831
|
});
|
|
11832
11832
|
|
|
11833
|
-
var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11833
|
+
var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "table-title-bar.vue"]]);
|
|
11834
11834
|
|
|
11835
11835
|
const useTableColumns = ({ columns, skipEqual = true }) => {
|
|
11836
11836
|
const filterColumns = vue.shallowRef([]);
|
|
@@ -11868,8 +11868,8 @@
|
|
|
11868
11868
|
};
|
|
11869
11869
|
};
|
|
11870
11870
|
|
|
11871
|
-
const _hoisted_1$
|
|
11872
|
-
var _sfc_main$
|
|
11871
|
+
const _hoisted_1$9 = { class: "plus-table-expand-col" };
|
|
11872
|
+
var _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
11873
11873
|
...{
|
|
11874
11874
|
name: "PlusTable",
|
|
11875
11875
|
inheritAttrs: false
|
|
@@ -12230,7 +12230,7 @@
|
|
|
12230
12230
|
}, _ctx.expandTableColumnProps),
|
|
12231
12231
|
{
|
|
12232
12232
|
default: vue.withCtx((scoped) => [
|
|
12233
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
12233
|
+
vue.createElementVNode("div", _hoisted_1$9, [
|
|
12234
12234
|
vue.renderSlot(_ctx.$slots, "expand", vue.mergeProps({
|
|
12235
12235
|
index: scoped.$index
|
|
12236
12236
|
}, scoped))
|
|
@@ -12341,10 +12341,760 @@
|
|
|
12341
12341
|
}
|
|
12342
12342
|
});
|
|
12343
12343
|
|
|
12344
|
-
var _Table = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12344
|
+
var _Table = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "index.vue"]]);
|
|
12345
12345
|
|
|
12346
12346
|
const PlusTable = _Table;
|
|
12347
12347
|
|
|
12348
|
+
const SELECT_TYPES = /* @__PURE__ */ new Set(["select", "radio", "checkbox"]);
|
|
12349
|
+
const DATE_TYPES = /* @__PURE__ */ new Set(["date-picker"]);
|
|
12350
|
+
const MONEY_TYPES = /* @__PURE__ */ new Set(["money"]);
|
|
12351
|
+
const MULTIPLE_SEPARATOR = "\u3001";
|
|
12352
|
+
const resolveOptions = (options) => {
|
|
12353
|
+
if (!options) return [];
|
|
12354
|
+
if (vue.isRef(options)) {
|
|
12355
|
+
return Array.isArray(options.value) ? options.value : [];
|
|
12356
|
+
}
|
|
12357
|
+
if (Array.isArray(options)) return options;
|
|
12358
|
+
if (isFunction(options)) {
|
|
12359
|
+
const result = options();
|
|
12360
|
+
return Array.isArray(result) ? result : [];
|
|
12361
|
+
}
|
|
12362
|
+
return [];
|
|
12363
|
+
};
|
|
12364
|
+
const resolveFieldProps = (column) => {
|
|
12365
|
+
const fieldProps = column.fieldProps;
|
|
12366
|
+
if (!fieldProps) return {};
|
|
12367
|
+
if (vue.isRef(fieldProps)) return fieldProps.value || {};
|
|
12368
|
+
if (typeof fieldProps === "object") return fieldProps;
|
|
12369
|
+
return {};
|
|
12370
|
+
};
|
|
12371
|
+
const isEmpty = (value) => value === null || value === void 0 || value === "";
|
|
12372
|
+
const createValueTypeText = (column) => {
|
|
12373
|
+
const valueType = column.valueType;
|
|
12374
|
+
if (valueType && SELECT_TYPES.has(valueType)) {
|
|
12375
|
+
const list = resolveOptions(column.options);
|
|
12376
|
+
if (!list.length) return void 0;
|
|
12377
|
+
const labelMap = /* @__PURE__ */ new Map();
|
|
12378
|
+
list.forEach((item) => {
|
|
12379
|
+
if (!isEmpty(item.value)) labelMap.set(String(item.value), item);
|
|
12380
|
+
});
|
|
12381
|
+
const fieldProps = resolveFieldProps(column);
|
|
12382
|
+
const multiple = valueType === "checkbox" || fieldProps.multiple === true;
|
|
12383
|
+
return (value) => {
|
|
12384
|
+
var _a;
|
|
12385
|
+
if (isEmpty(value)) return "";
|
|
12386
|
+
if (multiple && Array.isArray(value)) {
|
|
12387
|
+
return value.map((item) => {
|
|
12388
|
+
var _a2, _b;
|
|
12389
|
+
return (_b = (_a2 = labelMap.get(String(item))) == null ? void 0 : _a2.label) != null ? _b : String(item);
|
|
12390
|
+
}).join(MULTIPLE_SEPARATOR);
|
|
12391
|
+
}
|
|
12392
|
+
const label = (_a = labelMap.get(String(value))) == null ? void 0 : _a.label;
|
|
12393
|
+
return label === void 0 || label === null ? String(value) : String(label);
|
|
12394
|
+
};
|
|
12395
|
+
}
|
|
12396
|
+
if (valueType && DATE_TYPES.has(valueType)) {
|
|
12397
|
+
const fieldProps = resolveFieldProps(column);
|
|
12398
|
+
const format = fieldProps.format || "YYYY-MM-DD";
|
|
12399
|
+
return (value) => isEmpty(value) ? "" : formatDate(value, format);
|
|
12400
|
+
}
|
|
12401
|
+
if (valueType && MONEY_TYPES.has(valueType)) {
|
|
12402
|
+
const fieldProps = resolveFieldProps(column);
|
|
12403
|
+
const prefix = fieldProps.format || "\uFFE5";
|
|
12404
|
+
return (value) => {
|
|
12405
|
+
if (isEmpty(value)) return "";
|
|
12406
|
+
const num = Number(value);
|
|
12407
|
+
return Number.isNaN(num) ? String(value) : `${prefix}${num.toFixed(2)}`;
|
|
12408
|
+
};
|
|
12409
|
+
}
|
|
12410
|
+
return void 0;
|
|
12411
|
+
};
|
|
12412
|
+
const createValueTypeCellRender = (column) => {
|
|
12413
|
+
if (column.valueType !== "tag") return void 0;
|
|
12414
|
+
const fieldProps = resolveFieldProps(column);
|
|
12415
|
+
const text = createValueTypeText(column);
|
|
12416
|
+
return (value) => {
|
|
12417
|
+
if (isEmpty(value)) return vue.h("span");
|
|
12418
|
+
const label = text ? text(value) : String(value);
|
|
12419
|
+
return vue.h(elementPlus.ElTag, { type: fieldProps.type }, () => label);
|
|
12420
|
+
};
|
|
12421
|
+
};
|
|
12422
|
+
|
|
12423
|
+
const _hoisted_1$8 = { class: "plus-table-lite__header" };
|
|
12424
|
+
const _hoisted_2$4 = ["innerHTML"];
|
|
12425
|
+
var _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
12426
|
+
...{
|
|
12427
|
+
name: "PlusTableLite",
|
|
12428
|
+
inheritAttrs: false
|
|
12429
|
+
},
|
|
12430
|
+
__name: "index",
|
|
12431
|
+
props: {
|
|
12432
|
+
tableData: { default: void 0 },
|
|
12433
|
+
data: { default: void 0 },
|
|
12434
|
+
columns: { default: () => [] },
|
|
12435
|
+
defaultSize: { default: "default" },
|
|
12436
|
+
pagination: { type: [Boolean, Object], default: false },
|
|
12437
|
+
actionBar: { type: [Boolean, Object], default: false },
|
|
12438
|
+
hasIndexColumn: { type: Boolean, default: false },
|
|
12439
|
+
titleBar: { type: [Boolean, Object], default: true },
|
|
12440
|
+
isSelection: { type: Boolean, default: false },
|
|
12441
|
+
specialColumnsOrder: { default: void 0 },
|
|
12442
|
+
loadingStatus: { type: Boolean, default: false },
|
|
12443
|
+
rowKey: { type: [String, Function], default: "id" },
|
|
12444
|
+
defaultSelectedKeys: { default: () => [] },
|
|
12445
|
+
selectionTableColumnProps: { default: () => ({ width: 40 }) },
|
|
12446
|
+
indexTableColumnProps: { default: () => ({}) },
|
|
12447
|
+
indexContentStyle: { type: [Object, Function], default: () => ({}) },
|
|
12448
|
+
headerCellStyle: { default: () => ({
|
|
12449
|
+
"background-color": "var(--el-fill-color-light)"
|
|
12450
|
+
}) },
|
|
12451
|
+
emptyValue: { default: void 0 },
|
|
12452
|
+
size: {},
|
|
12453
|
+
width: {},
|
|
12454
|
+
height: {},
|
|
12455
|
+
maxHeight: {},
|
|
12456
|
+
fit: { type: Boolean },
|
|
12457
|
+
stripe: { type: Boolean },
|
|
12458
|
+
border: { type: Boolean, default: true },
|
|
12459
|
+
context: {},
|
|
12460
|
+
showHeader: { type: Boolean },
|
|
12461
|
+
showSummary: { type: Boolean },
|
|
12462
|
+
sumText: {},
|
|
12463
|
+
summaryMethod: {},
|
|
12464
|
+
rowClassName: {},
|
|
12465
|
+
rowStyle: {},
|
|
12466
|
+
cellClassName: {},
|
|
12467
|
+
cellStyle: {},
|
|
12468
|
+
headerRowClassName: {},
|
|
12469
|
+
headerRowStyle: {},
|
|
12470
|
+
headerCellClassName: {},
|
|
12471
|
+
highlightCurrentRow: { type: Boolean },
|
|
12472
|
+
currentRowKey: {},
|
|
12473
|
+
emptyText: {},
|
|
12474
|
+
expandRowKeys: {},
|
|
12475
|
+
defaultExpandAll: { type: Boolean },
|
|
12476
|
+
defaultSort: {},
|
|
12477
|
+
tooltipEffect: {},
|
|
12478
|
+
tooltipOptions: {},
|
|
12479
|
+
spanMethod: {},
|
|
12480
|
+
selectOnIndeterminate: { type: Boolean },
|
|
12481
|
+
indent: {},
|
|
12482
|
+
treeProps: {},
|
|
12483
|
+
lazy: { type: Boolean },
|
|
12484
|
+
load: {},
|
|
12485
|
+
className: {},
|
|
12486
|
+
style: {},
|
|
12487
|
+
tableLayout: {},
|
|
12488
|
+
scrollbarAlwaysOn: { type: Boolean },
|
|
12489
|
+
flexible: { type: Boolean },
|
|
12490
|
+
showOverflowTooltip: { type: [Boolean, Object] }
|
|
12491
|
+
},
|
|
12492
|
+
emits: ["selection-change", "paginationChange", "clickAction", "clickActionConfirmCancel", "refresh", "filterTableHeader"],
|
|
12493
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12494
|
+
var _a, _b;
|
|
12495
|
+
const props = __props;
|
|
12496
|
+
const emit = __emit;
|
|
12497
|
+
const { t } = useLocale();
|
|
12498
|
+
const tableInstance = vue.shallowRef(null);
|
|
12499
|
+
const wrapperInstance = vue.ref(null);
|
|
12500
|
+
const paginationInstance = vue.ref(null);
|
|
12501
|
+
const state = vue.reactive({
|
|
12502
|
+
size: props.defaultSize,
|
|
12503
|
+
subPageInfo: {
|
|
12504
|
+
...((_a = props.pagination) == null ? void 0 : _a.modelValue) || DefaultPageInfo
|
|
12505
|
+
}
|
|
12506
|
+
});
|
|
12507
|
+
const __tableData = vue.computed(() => {
|
|
12508
|
+
var _a2, _b2;
|
|
12509
|
+
return (_b2 = (_a2 = props.tableData) != null ? _a2 : props.data) != null ? _b2 : [];
|
|
12510
|
+
});
|
|
12511
|
+
const { subColumns, filterColumns, columnsIsChange, setFilterColumns } = useTableColumns({
|
|
12512
|
+
columns: () => props.columns || []
|
|
12513
|
+
});
|
|
12514
|
+
const resolveEmptyText = (column) => {
|
|
12515
|
+
var _a2, _b2;
|
|
12516
|
+
return (_b2 = (_a2 = column.emptyValue) != null ? _a2 : props.emptyValue) != null ? _b2 : "";
|
|
12517
|
+
};
|
|
12518
|
+
const toVNode = (result) => {
|
|
12519
|
+
if (result === null || result === void 0 || result === "") return vue.createTextVNode("");
|
|
12520
|
+
if (isString(result) || typeof result === "number") return vue.createTextVNode(String(result));
|
|
12521
|
+
if (vue.isVNode(result)) return result;
|
|
12522
|
+
return vue.h(result);
|
|
12523
|
+
};
|
|
12524
|
+
const getByPath = (target, path) => {
|
|
12525
|
+
const keys = path.replace(/\[(\w+)\]/g, ".$1").split(".").filter(Boolean);
|
|
12526
|
+
let current = target;
|
|
12527
|
+
for (const key of keys) {
|
|
12528
|
+
if (current === null || current === void 0) return void 0;
|
|
12529
|
+
current = current[key];
|
|
12530
|
+
}
|
|
12531
|
+
return current;
|
|
12532
|
+
};
|
|
12533
|
+
const preparedColumns = vue.computed(
|
|
12534
|
+
() => subColumns.value.map((column) => {
|
|
12535
|
+
const prop = column.prop;
|
|
12536
|
+
const label = getLabel(column.label);
|
|
12537
|
+
const isSimpleProp = !prop.includes(".") && !prop.includes("[");
|
|
12538
|
+
const readValue = isSimpleProp ? (row) => row == null ? void 0 : row[prop] : (row) => getByPath(row, prop);
|
|
12539
|
+
const valueTypeText = createValueTypeText(column);
|
|
12540
|
+
const valueTypeCellRender = createValueTypeCellRender(column);
|
|
12541
|
+
const cellText = (row, index) => {
|
|
12542
|
+
const value = readValue(row);
|
|
12543
|
+
if (isFunction(column.formatter)) {
|
|
12544
|
+
const formatted = column.formatter(value, { row, column, index });
|
|
12545
|
+
return String(
|
|
12546
|
+
formatted === null || formatted === void 0 ? resolveEmptyText(column) : formatted
|
|
12547
|
+
);
|
|
12548
|
+
}
|
|
12549
|
+
if (valueTypeText) {
|
|
12550
|
+
const text = valueTypeText(value);
|
|
12551
|
+
if (text !== "") return text;
|
|
12552
|
+
}
|
|
12553
|
+
return value === null || value === void 0 || value === "" ? String(resolveEmptyText(column)) : String(value);
|
|
12554
|
+
};
|
|
12555
|
+
const prepared = {
|
|
12556
|
+
key: getTableKey(column, true),
|
|
12557
|
+
prop,
|
|
12558
|
+
column,
|
|
12559
|
+
tableColumnProps: column.tableColumnProps || {},
|
|
12560
|
+
label,
|
|
12561
|
+
width: column.width,
|
|
12562
|
+
minWidth: column.minWidth,
|
|
12563
|
+
headerSlotName: getTableHeaderSlotName(prop),
|
|
12564
|
+
cellSlotName: getTableCellSlotName(prop),
|
|
12565
|
+
tooltip: !!column.tooltip,
|
|
12566
|
+
tooltipProps: getTooltip(column.tooltip),
|
|
12567
|
+
readValue,
|
|
12568
|
+
cellText
|
|
12569
|
+
};
|
|
12570
|
+
if (isFunction(column.renderHeader)) {
|
|
12571
|
+
prepared.headerRender = () => {
|
|
12572
|
+
var _a2;
|
|
12573
|
+
return toVNode((_a2 = column.renderHeader) == null ? void 0 : _a2.call(column, label, column));
|
|
12574
|
+
};
|
|
12575
|
+
}
|
|
12576
|
+
if (isFunction(column.render)) {
|
|
12577
|
+
prepared.cellRender = ({ row, index }) => {
|
|
12578
|
+
var _a2;
|
|
12579
|
+
return toVNode((_a2 = column.render) == null ? void 0 : _a2.call(column, readValue(row), { row, column, index }));
|
|
12580
|
+
};
|
|
12581
|
+
} else if (isFunction(column.renderHTML)) {
|
|
12582
|
+
prepared.cellHTML = (row, index) => {
|
|
12583
|
+
var _a2, _b2;
|
|
12584
|
+
return String((_b2 = (_a2 = column.renderHTML) == null ? void 0 : _a2.call(column, readValue(row), { row, column, index })) != null ? _b2 : "");
|
|
12585
|
+
};
|
|
12586
|
+
} else if (valueTypeCellRender) {
|
|
12587
|
+
prepared.cellRender = ({ row }) => valueTypeCellRender(readValue(row));
|
|
12588
|
+
}
|
|
12589
|
+
return prepared;
|
|
12590
|
+
})
|
|
12591
|
+
);
|
|
12592
|
+
const getRowKeyValue = (row) => {
|
|
12593
|
+
const { rowKey } = props;
|
|
12594
|
+
if (isFunction(rowKey)) return rowKey(row);
|
|
12595
|
+
return row == null ? void 0 : row[rowKey];
|
|
12596
|
+
};
|
|
12597
|
+
const selectedKeys = vue.ref(new Set(props.defaultSelectedKeys));
|
|
12598
|
+
let selectedRowCache = /* @__PURE__ */ new Map();
|
|
12599
|
+
function isRowSelectable(row, index) {
|
|
12600
|
+
var _a2;
|
|
12601
|
+
const selectable = (_a2 = props.selectionTableColumnProps) == null ? void 0 : _a2.selectable;
|
|
12602
|
+
return isFunction(selectable) ? selectable(row, index) !== false : true;
|
|
12603
|
+
}
|
|
12604
|
+
const selectableRows = vue.computed(
|
|
12605
|
+
() => __tableData.value.filter((row, index) => isRowSelectable(row, index))
|
|
12606
|
+
);
|
|
12607
|
+
const isRowSelected = (row) => {
|
|
12608
|
+
const key = getRowKeyValue(row);
|
|
12609
|
+
return key === void 0 ? false : selectedKeys.value.has(key);
|
|
12610
|
+
};
|
|
12611
|
+
const isAllSelected = vue.computed(
|
|
12612
|
+
() => selectableRows.value.length > 0 && selectableRows.value.every((row) => selectedKeys.value.has(getRowKeyValue(row)))
|
|
12613
|
+
);
|
|
12614
|
+
const isIndeterminate = vue.computed(
|
|
12615
|
+
() => !isAllSelected.value && selectableRows.value.some((row) => selectedKeys.value.has(getRowKeyValue(row)))
|
|
12616
|
+
);
|
|
12617
|
+
const getSelectedRows = () => {
|
|
12618
|
+
const rows = [];
|
|
12619
|
+
selectedRowCache.forEach((row, key) => {
|
|
12620
|
+
if (selectedKeys.value.has(key)) rows.push(row);
|
|
12621
|
+
});
|
|
12622
|
+
return rows;
|
|
12623
|
+
};
|
|
12624
|
+
const handleToggleRow = (row, checked) => {
|
|
12625
|
+
const key = getRowKeyValue(row);
|
|
12626
|
+
if (key === void 0) return;
|
|
12627
|
+
if (checked) {
|
|
12628
|
+
selectedKeys.value.add(key);
|
|
12629
|
+
selectedRowCache.set(key, row);
|
|
12630
|
+
} else {
|
|
12631
|
+
selectedKeys.value.delete(key);
|
|
12632
|
+
selectedRowCache.delete(key);
|
|
12633
|
+
}
|
|
12634
|
+
emit("selection-change", getSelectedRows());
|
|
12635
|
+
};
|
|
12636
|
+
const handleToggleAll = () => {
|
|
12637
|
+
const nextAllSelected = !isAllSelected.value;
|
|
12638
|
+
selectableRows.value.forEach((row) => {
|
|
12639
|
+
const key = getRowKeyValue(row);
|
|
12640
|
+
if (key === void 0) return;
|
|
12641
|
+
if (nextAllSelected) {
|
|
12642
|
+
selectedKeys.value.add(key);
|
|
12643
|
+
selectedRowCache.set(key, row);
|
|
12644
|
+
} else {
|
|
12645
|
+
selectedKeys.value.delete(key);
|
|
12646
|
+
selectedRowCache.delete(key);
|
|
12647
|
+
}
|
|
12648
|
+
});
|
|
12649
|
+
emit("selection-change", getSelectedRows());
|
|
12650
|
+
};
|
|
12651
|
+
const clearSelection = () => {
|
|
12652
|
+
selectedKeys.value = /* @__PURE__ */ new Set();
|
|
12653
|
+
selectedRowCache = /* @__PURE__ */ new Map();
|
|
12654
|
+
};
|
|
12655
|
+
const syncSelectedRowCache = (rows) => {
|
|
12656
|
+
if (!selectedKeys.value.size || !(rows == null ? void 0 : rows.length)) return;
|
|
12657
|
+
rows.forEach((row) => {
|
|
12658
|
+
const key = getRowKeyValue(row);
|
|
12659
|
+
if (key !== void 0 && selectedKeys.value.has(key)) {
|
|
12660
|
+
selectedRowCache.set(key, row);
|
|
12661
|
+
}
|
|
12662
|
+
});
|
|
12663
|
+
};
|
|
12664
|
+
vue.watch(
|
|
12665
|
+
() => __tableData.value,
|
|
12666
|
+
(rows) => syncSelectedRowCache(rows || []),
|
|
12667
|
+
{ immediate: true }
|
|
12668
|
+
);
|
|
12669
|
+
vue.watch(
|
|
12670
|
+
() => props.defaultSelectedKeys,
|
|
12671
|
+
(keys) => {
|
|
12672
|
+
if (!(keys == null ? void 0 : keys.length)) return;
|
|
12673
|
+
keys.forEach((key) => selectedKeys.value.add(key));
|
|
12674
|
+
syncSelectedRowCache(__tableData.value);
|
|
12675
|
+
}
|
|
12676
|
+
);
|
|
12677
|
+
const specialColumns = vue.computed(() => {
|
|
12678
|
+
const active = [];
|
|
12679
|
+
if (props.isSelection) active.push("selection");
|
|
12680
|
+
if (props.hasIndexColumn) active.push("index");
|
|
12681
|
+
const defaultOrder = ["selection", "index"];
|
|
12682
|
+
const order = [...props.specialColumnsOrder || [], ...defaultOrder].filter(
|
|
12683
|
+
(item, index, array) => array.indexOf(item) === index
|
|
12684
|
+
);
|
|
12685
|
+
return order.filter((item) => active.includes(item));
|
|
12686
|
+
});
|
|
12687
|
+
const selectionProps = vue.computed(() => props.selectionTableColumnProps || {});
|
|
12688
|
+
const selectionWidth = vue.computed(() => selectionProps.value.width || 40);
|
|
12689
|
+
const selectionAlign = vue.computed(() => selectionProps.value.align || "center");
|
|
12690
|
+
const selectionFixed = vue.computed(
|
|
12691
|
+
() => {
|
|
12692
|
+
var _a2;
|
|
12693
|
+
return (_a2 = selectionProps.value.fixed) != null ? _a2 : "left";
|
|
12694
|
+
}
|
|
12695
|
+
);
|
|
12696
|
+
const indexProps = vue.computed(() => props.indexTableColumnProps || {});
|
|
12697
|
+
const indexFixed = vue.computed(
|
|
12698
|
+
() => indexProps.value.fixed || "left"
|
|
12699
|
+
);
|
|
12700
|
+
const getIndexValue = (index) => {
|
|
12701
|
+
const customIndex = indexProps.value.index;
|
|
12702
|
+
if (isFunction(customIndex)) return customIndex(index);
|
|
12703
|
+
if (typeof customIndex === "number") return customIndex;
|
|
12704
|
+
const { page, pageSize } = state.subPageInfo;
|
|
12705
|
+
return (page - 1) * pageSize + index + 1;
|
|
12706
|
+
};
|
|
12707
|
+
const getIndexStyle = (row, index) => {
|
|
12708
|
+
const style = props.indexContentStyle;
|
|
12709
|
+
if (isFunction(style)) return style(row, index);
|
|
12710
|
+
if (isPlainObject(style)) return style;
|
|
12711
|
+
return {};
|
|
12712
|
+
};
|
|
12713
|
+
const actionBarLabel = vue.computed(
|
|
12714
|
+
() => props.actionBar ? vue.unref(props.actionBar.label) || t("plus.table.action") : ""
|
|
12715
|
+
);
|
|
12716
|
+
const actionBarFixed = vue.computed(
|
|
12717
|
+
() => (props.actionBar ? props.actionBar.fixed : void 0) || "right"
|
|
12718
|
+
);
|
|
12719
|
+
const handlePaginationChange = () => {
|
|
12720
|
+
emit("paginationChange", { ...state.subPageInfo });
|
|
12721
|
+
};
|
|
12722
|
+
const handleRefresh = () => emit("refresh");
|
|
12723
|
+
const handleClickDensity = (size) => {
|
|
12724
|
+
state.size = size;
|
|
12725
|
+
};
|
|
12726
|
+
const handleFilterTableConfirm = (list, eventType) => {
|
|
12727
|
+
setFilterColumns(list);
|
|
12728
|
+
emit("filterTableHeader", list, eventType);
|
|
12729
|
+
};
|
|
12730
|
+
const adaptiveHeight = vue.ref();
|
|
12731
|
+
const resolvedHeight = vue.computed(() => {
|
|
12732
|
+
const height = props.height;
|
|
12733
|
+
return height !== void 0 ? height : adaptiveHeight.value;
|
|
12734
|
+
});
|
|
12735
|
+
const hasAdaptive = vue.computed(() => props.height === void 0 && !!props.adaptive);
|
|
12736
|
+
const calcAdaptiveHeight = () => {
|
|
12737
|
+
var _a2;
|
|
12738
|
+
if (!wrapperInstance.value) return;
|
|
12739
|
+
let offsetBottom = 20;
|
|
12740
|
+
if (isPlainObject(props.adaptive)) {
|
|
12741
|
+
offsetBottom = (_a2 = props.adaptive.offsetBottom) != null ? _a2 : offsetBottom;
|
|
12742
|
+
}
|
|
12743
|
+
const paginationHeight = paginationInstance.value && props.pagination ? paginationInstance.value.$el.offsetHeight : 0;
|
|
12744
|
+
const top = wrapperInstance.value.getBoundingClientRect().top;
|
|
12745
|
+
adaptiveHeight.value = Math.max(window.innerHeight - top - offsetBottom - paginationHeight, 100);
|
|
12746
|
+
};
|
|
12747
|
+
const debounceCalcAdaptiveHeight = debounce(
|
|
12748
|
+
calcAdaptiveHeight,
|
|
12749
|
+
isPlainObject(props.adaptive) ? (_b = props.adaptive.timeout) != null ? _b : 60 : 60
|
|
12750
|
+
);
|
|
12751
|
+
vue.onMounted(() => {
|
|
12752
|
+
if (hasAdaptive.value) {
|
|
12753
|
+
calcAdaptiveHeight();
|
|
12754
|
+
window.addEventListener("resize", debounceCalcAdaptiveHeight);
|
|
12755
|
+
}
|
|
12756
|
+
});
|
|
12757
|
+
vue.onBeforeUnmount(() => {
|
|
12758
|
+
window.removeEventListener("resize", debounceCalcAdaptiveHeight);
|
|
12759
|
+
});
|
|
12760
|
+
vue.provide(TableFormRefInjectionKey, vue.shallowRef({}));
|
|
12761
|
+
__expose({
|
|
12762
|
+
/** el-table 实例,可用于 doLayout 等 */
|
|
12763
|
+
tableInstance,
|
|
12764
|
+
/** 获取所有已选行(跨页累计) */
|
|
12765
|
+
getSelectedRows,
|
|
12766
|
+
/** 清空所有已选(跨页) */
|
|
12767
|
+
clearSelection,
|
|
12768
|
+
/** 当前已选 rowKey 列表 */
|
|
12769
|
+
getSelectedKeys: () => Array.from(selectedKeys.value)
|
|
12770
|
+
});
|
|
12771
|
+
return (_ctx, _cache) => {
|
|
12772
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
12773
|
+
"div",
|
|
12774
|
+
{
|
|
12775
|
+
ref_key: "wrapperInstance",
|
|
12776
|
+
ref: wrapperInstance,
|
|
12777
|
+
class: "plus-table-lite"
|
|
12778
|
+
},
|
|
12779
|
+
[
|
|
12780
|
+
vue.createCommentVNode(" \u6807\u9898\u680F\uFF1A\u5237\u65B0 / \u5BC6\u5EA6 / \u5217\u8BBE\u7F6E\uFF0C\u4E0E PlusTable \u5171\u7528\u540C\u4E00\u4EFD\u5B9E\u73B0 "),
|
|
12781
|
+
_ctx.titleBar ? (vue.openBlock(), vue.createBlock(vue.unref(PlusTableTitleBar), {
|
|
12782
|
+
key: 0,
|
|
12783
|
+
"origin-columns": _ctx.columns || [],
|
|
12784
|
+
columns: vue.unref(filterColumns),
|
|
12785
|
+
"default-size": state.size,
|
|
12786
|
+
"columns-is-change": vue.unref(columnsIsChange),
|
|
12787
|
+
"title-bar": _ctx.titleBar,
|
|
12788
|
+
onClickDensity: handleClickDensity,
|
|
12789
|
+
onFilterTableHeader: handleFilterTableConfirm,
|
|
12790
|
+
onRefresh: handleRefresh
|
|
12791
|
+
}, vue.createSlots({
|
|
12792
|
+
title: vue.withCtx(() => [
|
|
12793
|
+
vue.renderSlot(_ctx.$slots, "title")
|
|
12794
|
+
]),
|
|
12795
|
+
toolbar: vue.withCtx(() => [
|
|
12796
|
+
vue.renderSlot(_ctx.$slots, "toolbar")
|
|
12797
|
+
]),
|
|
12798
|
+
_: 2
|
|
12799
|
+
/* DYNAMIC */
|
|
12800
|
+
}, [
|
|
12801
|
+
_ctx.$slots["drag-sort-icon"] ? {
|
|
12802
|
+
name: "drag-sort-icon",
|
|
12803
|
+
fn: vue.withCtx(() => [
|
|
12804
|
+
vue.renderSlot(_ctx.$slots, "drag-sort-icon")
|
|
12805
|
+
]),
|
|
12806
|
+
key: "0"
|
|
12807
|
+
} : void 0,
|
|
12808
|
+
_ctx.$slots["column-settings-icon"] ? {
|
|
12809
|
+
name: "column-settings-icon",
|
|
12810
|
+
fn: vue.withCtx(() => [
|
|
12811
|
+
vue.renderSlot(_ctx.$slots, "column-settings-icon")
|
|
12812
|
+
]),
|
|
12813
|
+
key: "1"
|
|
12814
|
+
} : void 0,
|
|
12815
|
+
_ctx.$slots["density-icon"] ? {
|
|
12816
|
+
name: "density-icon",
|
|
12817
|
+
fn: vue.withCtx(() => [
|
|
12818
|
+
vue.renderSlot(_ctx.$slots, "density-icon")
|
|
12819
|
+
]),
|
|
12820
|
+
key: "2"
|
|
12821
|
+
} : void 0
|
|
12822
|
+
]), 1032, ["origin-columns", "columns", "default-size", "columns-is-change", "title-bar"])) : vue.createCommentVNode("v-if", true),
|
|
12823
|
+
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTable), vue.mergeProps({
|
|
12824
|
+
ref_key: "tableInstance",
|
|
12825
|
+
ref: tableInstance,
|
|
12826
|
+
data: __tableData.value,
|
|
12827
|
+
border: _ctx.border,
|
|
12828
|
+
height: resolvedHeight.value,
|
|
12829
|
+
"header-cell-style": _ctx.headerCellStyle,
|
|
12830
|
+
size: state.size,
|
|
12831
|
+
"row-key": _ctx.rowKey
|
|
12832
|
+
}, _ctx.$attrs), {
|
|
12833
|
+
empty: vue.withCtx(() => [
|
|
12834
|
+
vue.renderSlot(_ctx.$slots, "empty")
|
|
12835
|
+
]),
|
|
12836
|
+
default: vue.withCtx(() => [
|
|
12837
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
12838
|
+
vue.Fragment,
|
|
12839
|
+
null,
|
|
12840
|
+
vue.renderList(specialColumns.value, (type) => {
|
|
12841
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
12842
|
+
vue.Fragment,
|
|
12843
|
+
{ key: type },
|
|
12844
|
+
[
|
|
12845
|
+
vue.createCommentVNode("\n \u591A\u9009\u5217\n \u52FE\u9009\u72B6\u6001\u7531\u7EC4\u4EF6\u81EA\u8EAB\u7684 selectedKeys \u7EF4\u62A4\uFF0C\u56E0\u6B64\u7FFB\u9875\u540E\u4F9D\u7136\u4FDD\u7559\uFF1B\n \u4E0D\u4F7F\u7528 el-table \u5185\u7F6E\u7684 reserve-selection\uFF08\u5176\u884C\u4E3A\u4F9D\u8D56 selection \u5185\u90E8\u72B6\u6001\uFF0C\u8DE8\u9875\u4E0D\u53EF\u9760\uFF09\u3002\n "),
|
|
12846
|
+
type === "selection" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), {
|
|
12847
|
+
key: "selection",
|
|
12848
|
+
"class-name": "plus-table-lite-selection",
|
|
12849
|
+
width: selectionWidth.value,
|
|
12850
|
+
align: selectionAlign.value,
|
|
12851
|
+
fixed: selectionFixed.value
|
|
12852
|
+
}, {
|
|
12853
|
+
header: vue.withCtx(() => [
|
|
12854
|
+
vue.createVNode(vue.unref(elementPlus.ElCheckbox), {
|
|
12855
|
+
"model-value": isAllSelected.value,
|
|
12856
|
+
indeterminate: isIndeterminate.value,
|
|
12857
|
+
onChange: handleToggleAll
|
|
12858
|
+
}, null, 8, ["model-value", "indeterminate"])
|
|
12859
|
+
]),
|
|
12860
|
+
default: vue.withCtx(({ row, $index }) => [
|
|
12861
|
+
vue.createVNode(vue.unref(elementPlus.ElCheckbox), {
|
|
12862
|
+
"model-value": isRowSelected(row),
|
|
12863
|
+
disabled: !isRowSelectable(row, $index),
|
|
12864
|
+
onChange: (checked) => handleToggleRow(row, !!checked)
|
|
12865
|
+
}, null, 8, ["model-value", "disabled", "onChange"])
|
|
12866
|
+
]),
|
|
12867
|
+
_: 1
|
|
12868
|
+
/* STABLE */
|
|
12869
|
+
}, 8, ["width", "align", "fixed"])) : (vue.openBlock(), vue.createElementBlock(
|
|
12870
|
+
vue.Fragment,
|
|
12871
|
+
{ key: 1 },
|
|
12872
|
+
[
|
|
12873
|
+
vue.createCommentVNode(" \u5E8F\u53F7\u5217 "),
|
|
12874
|
+
vue.createVNode(vue.unref(elementPlus.ElTableColumn), {
|
|
12875
|
+
key: "index",
|
|
12876
|
+
type: "index",
|
|
12877
|
+
label: "#",
|
|
12878
|
+
"class-name": "plus-table-lite-index",
|
|
12879
|
+
width: indexProps.value.width || 60,
|
|
12880
|
+
fixed: indexFixed.value,
|
|
12881
|
+
align: "center",
|
|
12882
|
+
index: getIndexValue
|
|
12883
|
+
}, {
|
|
12884
|
+
default: vue.withCtx(({ $index }) => [
|
|
12885
|
+
vue.createElementVNode(
|
|
12886
|
+
"div",
|
|
12887
|
+
{
|
|
12888
|
+
class: "plus-table-lite-index__content",
|
|
12889
|
+
style: vue.normalizeStyle(getIndexStyle(__tableData.value[$index], $index))
|
|
12890
|
+
},
|
|
12891
|
+
vue.toDisplayString(getIndexValue($index)),
|
|
12892
|
+
5
|
|
12893
|
+
/* TEXT, STYLE */
|
|
12894
|
+
)
|
|
12895
|
+
]),
|
|
12896
|
+
_: 1
|
|
12897
|
+
/* STABLE */
|
|
12898
|
+
}, 8, ["width", "fixed"])
|
|
12899
|
+
],
|
|
12900
|
+
2112
|
|
12901
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
12902
|
+
))
|
|
12903
|
+
],
|
|
12904
|
+
64
|
|
12905
|
+
/* STABLE_FRAGMENT */
|
|
12906
|
+
);
|
|
12907
|
+
}),
|
|
12908
|
+
128
|
|
12909
|
+
/* KEYED_FRAGMENT */
|
|
12910
|
+
)),
|
|
12911
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
12912
|
+
vue.Fragment,
|
|
12913
|
+
null,
|
|
12914
|
+
vue.renderList(preparedColumns.value, (col) => {
|
|
12915
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), vue.mergeProps({
|
|
12916
|
+
key: col.key
|
|
12917
|
+
}, col.tableColumnProps, {
|
|
12918
|
+
prop: col.prop,
|
|
12919
|
+
label: col.label,
|
|
12920
|
+
width: col.width,
|
|
12921
|
+
"min-width": col.minWidth
|
|
12922
|
+
}), {
|
|
12923
|
+
header: vue.withCtx((scoped) => [
|
|
12924
|
+
vue.createElementVNode("span", _hoisted_1$8, [
|
|
12925
|
+
vue.renderSlot(_ctx.$slots, col.headerSlotName, vue.mergeProps(scoped, {
|
|
12926
|
+
prop: col.prop,
|
|
12927
|
+
label: col.label,
|
|
12928
|
+
column: col.column
|
|
12929
|
+
}), () => [
|
|
12930
|
+
col.headerRender ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(col.headerRender), { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
|
|
12931
|
+
vue.Fragment,
|
|
12932
|
+
{ key: 1 },
|
|
12933
|
+
[
|
|
12934
|
+
vue.createTextVNode(
|
|
12935
|
+
vue.toDisplayString(col.label),
|
|
12936
|
+
1
|
|
12937
|
+
/* TEXT */
|
|
12938
|
+
)
|
|
12939
|
+
],
|
|
12940
|
+
64
|
|
12941
|
+
/* STABLE_FRAGMENT */
|
|
12942
|
+
))
|
|
12943
|
+
]),
|
|
12944
|
+
col.tooltip ? (vue.openBlock(), vue.createBlock(
|
|
12945
|
+
vue.unref(elementPlus.ElTooltip),
|
|
12946
|
+
vue.mergeProps({
|
|
12947
|
+
key: 0,
|
|
12948
|
+
placement: "top"
|
|
12949
|
+
}, col.tooltipProps),
|
|
12950
|
+
{
|
|
12951
|
+
default: vue.withCtx(() => [
|
|
12952
|
+
vue.renderSlot(_ctx.$slots, "tooltip-icon", {}, () => [
|
|
12953
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
12954
|
+
class: "plus-table-lite__header__icon",
|
|
12955
|
+
size: 16
|
|
12956
|
+
}, {
|
|
12957
|
+
default: vue.withCtx(() => [
|
|
12958
|
+
vue.createVNode(vue.unref(question_filled_default))
|
|
12959
|
+
]),
|
|
12960
|
+
_: 1
|
|
12961
|
+
/* STABLE */
|
|
12962
|
+
})
|
|
12963
|
+
])
|
|
12964
|
+
]),
|
|
12965
|
+
_: 2
|
|
12966
|
+
/* DYNAMIC */
|
|
12967
|
+
},
|
|
12968
|
+
1040
|
|
12969
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
12970
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
12971
|
+
])
|
|
12972
|
+
]),
|
|
12973
|
+
default: vue.withCtx(({ row, $index }) => [
|
|
12974
|
+
vue.renderSlot(_ctx.$slots, col.cellSlotName, {
|
|
12975
|
+
row,
|
|
12976
|
+
index: $index,
|
|
12977
|
+
value: col.readValue(row),
|
|
12978
|
+
column: col.column
|
|
12979
|
+
}, () => [
|
|
12980
|
+
vue.createCommentVNode(" \u81EA\u5B9A\u4E49 render\uFF1A\u552F\u4E00\u9700\u8981\u7EC4\u4EF6\u7684\u4F4D\u7F6E\uFF0C\u6309\u5217\u521B\u5EFA\u4E00\u6B21 "),
|
|
12981
|
+
col.cellRender ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(col.cellRender), {
|
|
12982
|
+
key: 0,
|
|
12983
|
+
row,
|
|
12984
|
+
index: $index
|
|
12985
|
+
}, null, 8, ["row", "index"])) : col.cellHTML ? (vue.openBlock(), vue.createElementBlock(
|
|
12986
|
+
vue.Fragment,
|
|
12987
|
+
{ key: 1 },
|
|
12988
|
+
[
|
|
12989
|
+
vue.createCommentVNode(" renderHTML "),
|
|
12990
|
+
vue.createElementVNode("span", {
|
|
12991
|
+
innerHTML: col.cellHTML(row, $index)
|
|
12992
|
+
}, null, 8, _hoisted_2$4)
|
|
12993
|
+
],
|
|
12994
|
+
2112
|
|
12995
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
12996
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
12997
|
+
vue.Fragment,
|
|
12998
|
+
{ key: 2 },
|
|
12999
|
+
[
|
|
13000
|
+
vue.createCommentVNode(" \u7EAF\u6587\u672C\uFF1A\u96F6\u5B9E\u4F8B "),
|
|
13001
|
+
vue.createTextVNode(
|
|
13002
|
+
vue.toDisplayString(col.cellText(row, $index)),
|
|
13003
|
+
1
|
|
13004
|
+
/* TEXT */
|
|
13005
|
+
)
|
|
13006
|
+
],
|
|
13007
|
+
64
|
|
13008
|
+
/* STABLE_FRAGMENT */
|
|
13009
|
+
))
|
|
13010
|
+
])
|
|
13011
|
+
]),
|
|
13012
|
+
_: 2
|
|
13013
|
+
/* DYNAMIC */
|
|
13014
|
+
}, 1040, ["prop", "label", "width", "min-width"]);
|
|
13015
|
+
}),
|
|
13016
|
+
128
|
|
13017
|
+
/* KEYED_FRAGMENT */
|
|
13018
|
+
)),
|
|
13019
|
+
_ctx.actionBar ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), vue.mergeProps({
|
|
13020
|
+
key: 0,
|
|
13021
|
+
"class-name": "plus-table-action-bar",
|
|
13022
|
+
label: actionBarLabel.value,
|
|
13023
|
+
fixed: actionBarFixed.value,
|
|
13024
|
+
width: _ctx.actionBar.width || 200
|
|
13025
|
+
}, _ctx.actionBar.actionBarTableColumnProps), {
|
|
13026
|
+
default: vue.withCtx(({ row, $index }) => [
|
|
13027
|
+
vue.createVNode(vue.unref(PlusTableActionBarContent), {
|
|
13028
|
+
row,
|
|
13029
|
+
index: $index,
|
|
13030
|
+
type: _ctx.actionBar.type,
|
|
13031
|
+
buttons: _ctx.actionBar.buttons,
|
|
13032
|
+
"show-number": _ctx.actionBar.showNumber,
|
|
13033
|
+
"show-limit-include-more": _ctx.actionBar.showLimitIncludeMore,
|
|
13034
|
+
"confirm-type": _ctx.actionBar.confirmType,
|
|
13035
|
+
"more-type": _ctx.actionBar.moreType,
|
|
13036
|
+
onClickAction: _cache[0] || (_cache[0] = (data) => emit("clickAction", data)),
|
|
13037
|
+
onClickActionConfirmCancel: _cache[1] || (_cache[1] = (data) => emit("clickActionConfirmCancel", data))
|
|
13038
|
+
}, vue.createSlots({
|
|
13039
|
+
_: 2
|
|
13040
|
+
/* DYNAMIC */
|
|
13041
|
+
}, [
|
|
13042
|
+
_ctx.$slots["action-bar-more-icon"] ? {
|
|
13043
|
+
name: "action-bar-more-icon",
|
|
13044
|
+
fn: vue.withCtx(() => [
|
|
13045
|
+
vue.renderSlot(_ctx.$slots, "action-bar-more-icon")
|
|
13046
|
+
]),
|
|
13047
|
+
key: "0"
|
|
13048
|
+
} : void 0
|
|
13049
|
+
]), 1032, ["row", "index", "type", "buttons", "show-number", "show-limit-include-more", "confirm-type", "more-type"])
|
|
13050
|
+
]),
|
|
13051
|
+
_: 3
|
|
13052
|
+
/* FORWARDED */
|
|
13053
|
+
}, 16, ["label", "fixed", "width"])) : vue.createCommentVNode("v-if", true)
|
|
13054
|
+
]),
|
|
13055
|
+
_: 3
|
|
13056
|
+
/* FORWARDED */
|
|
13057
|
+
}, 16, ["data", "border", "height", "header-cell-style", "size", "row-key"])), [
|
|
13058
|
+
[vue.unref(elementPlus.vLoading), _ctx.loadingStatus]
|
|
13059
|
+
]),
|
|
13060
|
+
vue.createCommentVNode(" \u5206\u9875 "),
|
|
13061
|
+
_ctx.pagination ? (vue.openBlock(), vue.createBlock(vue.unref(PlusPagination), vue.mergeProps({
|
|
13062
|
+
key: 1,
|
|
13063
|
+
ref_key: "paginationInstance",
|
|
13064
|
+
ref: paginationInstance,
|
|
13065
|
+
modelValue: state.subPageInfo,
|
|
13066
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => state.subPageInfo = $event)
|
|
13067
|
+
}, _ctx.pagination, { onChange: handlePaginationChange }), vue.createSlots({
|
|
13068
|
+
_: 2
|
|
13069
|
+
/* DYNAMIC */
|
|
13070
|
+
}, [
|
|
13071
|
+
_ctx.$slots["pagination-left"] ? {
|
|
13072
|
+
name: "pagination-left",
|
|
13073
|
+
fn: vue.withCtx(() => [
|
|
13074
|
+
vue.renderSlot(_ctx.$slots, "pagination-left")
|
|
13075
|
+
]),
|
|
13076
|
+
key: "0"
|
|
13077
|
+
} : void 0,
|
|
13078
|
+
_ctx.$slots["pagination-right"] ? {
|
|
13079
|
+
name: "pagination-right",
|
|
13080
|
+
fn: vue.withCtx(() => [
|
|
13081
|
+
vue.renderSlot(_ctx.$slots, "pagination-right")
|
|
13082
|
+
]),
|
|
13083
|
+
key: "1"
|
|
13084
|
+
} : void 0
|
|
13085
|
+
]), 1040, ["modelValue"])) : vue.createCommentVNode("v-if", true)
|
|
13086
|
+
],
|
|
13087
|
+
512
|
|
13088
|
+
/* NEED_PATCH */
|
|
13089
|
+
);
|
|
13090
|
+
};
|
|
13091
|
+
}
|
|
13092
|
+
});
|
|
13093
|
+
|
|
13094
|
+
var TableLite = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "index.vue"]]);
|
|
13095
|
+
|
|
13096
|
+
const PlusTableLite = TableLite;
|
|
13097
|
+
|
|
12348
13098
|
const _hoisted_1$7 = { class: "plus-table-v2-header" };
|
|
12349
13099
|
var _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
12350
13100
|
...{
|
|
@@ -13968,6 +14718,7 @@
|
|
|
13968
14718
|
table: { default: () => ({}) },
|
|
13969
14719
|
tableType: { default: "table" },
|
|
13970
14720
|
tableV2: { default: void 0 },
|
|
14721
|
+
tableLite: { default: void 0 },
|
|
13971
14722
|
params: { default: () => ({}) },
|
|
13972
14723
|
postData: { type: Function, default: void 0 },
|
|
13973
14724
|
beforeSearchSubmit: { type: Function, default: void 0 },
|
|
@@ -13986,7 +14737,7 @@
|
|
|
13986
14737
|
searchSlot: { type: Boolean, default: false },
|
|
13987
14738
|
resetSearch: { type: Boolean, default: true }
|
|
13988
14739
|
},
|
|
13989
|
-
emits: ["update:searchValues", "search", "reset", "searchChange", "paginationChange", "requestError", "requestComplete"],
|
|
14740
|
+
emits: ["update:searchValues", "search", "reset", "searchChange", "paginationChange", "selectionChange", "requestError", "requestComplete"],
|
|
13990
14741
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
13991
14742
|
var _a, _b;
|
|
13992
14743
|
const props = __props;
|
|
@@ -14023,13 +14774,17 @@
|
|
|
14023
14774
|
);
|
|
14024
14775
|
const tableComponentMap = /* @__PURE__ */ new Map([
|
|
14025
14776
|
["table", PlusTable],
|
|
14026
|
-
["table-v2", PlusTableV2]
|
|
14777
|
+
["table-v2", PlusTableV2],
|
|
14778
|
+
["table-lite", PlusTableLite]
|
|
14027
14779
|
]);
|
|
14028
14780
|
const tableComponent = vue.computed(() => tableComponentMap.get(props.tableType) || PlusTable);
|
|
14029
14781
|
const tableProps = vue.computed(() => {
|
|
14030
14782
|
if (props.tableType === "table-v2") {
|
|
14031
14783
|
return { ...props.table, ...props.tableV2 };
|
|
14032
14784
|
}
|
|
14785
|
+
if (props.tableType === "table-lite") {
|
|
14786
|
+
return { ...props.table, ...props.tableLite };
|
|
14787
|
+
}
|
|
14033
14788
|
return props.table;
|
|
14034
14789
|
});
|
|
14035
14790
|
const tablePagination = vue.computed(() => {
|
|
@@ -14093,6 +14848,9 @@
|
|
|
14093
14848
|
const handleTablePaginationChange = (data) => {
|
|
14094
14849
|
handlePaginationChange(data);
|
|
14095
14850
|
};
|
|
14851
|
+
const handleTableSelectionChange = (data) => {
|
|
14852
|
+
emit("selectionChange", data || []);
|
|
14853
|
+
};
|
|
14096
14854
|
const handleSearchChange = (val, column) => {
|
|
14097
14855
|
emit("update:searchValues", val);
|
|
14098
14856
|
emit("searchChange", val, column);
|
|
@@ -14217,7 +14975,8 @@
|
|
|
14217
14975
|
columns: _ctx.columns,
|
|
14218
14976
|
pagination: tablePagination.value,
|
|
14219
14977
|
onPaginationChange: handleTablePaginationChange,
|
|
14220
|
-
onRefresh: handleRefresh
|
|
14978
|
+
onRefresh: handleRefresh,
|
|
14979
|
+
onSelectionChange: handleTableSelectionChange
|
|
14221
14980
|
}), vue.createSlots({
|
|
14222
14981
|
_: 2
|
|
14223
14982
|
/* DYNAMIC */
|
|
@@ -15660,6 +16419,7 @@
|
|
|
15660
16419
|
PlusDialog,
|
|
15661
16420
|
PlusPagination,
|
|
15662
16421
|
PlusTable,
|
|
16422
|
+
PlusTableLite,
|
|
15663
16423
|
PlusTableV2,
|
|
15664
16424
|
PlusRadio,
|
|
15665
16425
|
PlusDatePicker,
|
|
@@ -15684,7 +16444,7 @@
|
|
|
15684
16444
|
|
|
15685
16445
|
var installer = makeInstaller([...plugins]);
|
|
15686
16446
|
|
|
15687
|
-
const version = "1.0.
|
|
16447
|
+
const version = "1.0.3";
|
|
15688
16448
|
|
|
15689
16449
|
const install = installer.install;
|
|
15690
16450
|
|
|
@@ -15715,6 +16475,7 @@
|
|
|
15715
16475
|
exports.PlusStepsForm = PlusStepsForm;
|
|
15716
16476
|
exports.PlusTable = PlusTable;
|
|
15717
16477
|
exports.PlusTableActionBarContent = PlusTableActionBarContent;
|
|
16478
|
+
exports.PlusTableLite = PlusTableLite;
|
|
15718
16479
|
exports.PlusTableTitleBar = PlusTableTitleBar;
|
|
15719
16480
|
exports.PlusTableV2 = PlusTableV2;
|
|
15720
16481
|
exports.TableFormFieldRefInjectionKey = TableFormFieldRefInjectionKey;
|