yc-pro-components 0.0.74 → 0.0.76
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/components/form-item/src/index.vue2.mjs +2 -2
- package/es/components/table/src/table-title-bar.vue.mjs +1 -1
- package/es/components/table/src/table-title-bar.vue2.mjs +79 -40
- package/es/components/table/src/type.d.ts +17 -0
- package/es/components/yc-drawer/src/index.vue.mjs +1 -1
- package/es/components/yc-drawer/src/index.vue2.mjs +2 -3
- package/es/index.css +11 -9
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/yc-components/version.d.ts +1 -1
- package/index.js +86 -48
- package/index.min.css +3 -1
- package/index.min.js +11 -11
- package/index.min.mjs +11 -11
- package/index.mjs +87 -49
- package/lib/components/form-item/src/index.vue2.js +2 -2
- package/lib/components/table/src/table-title-bar.vue.js +1 -1
- package/lib/components/table/src/table-title-bar.vue2.js +78 -39
- package/lib/components/table/src/type.d.ts +17 -0
- package/lib/components/yc-drawer/src/index.vue.js +1 -1
- package/lib/components/yc-drawer/src/index.vue2.js +2 -3
- package/lib/index.css +12 -10
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/yc-components/version.d.ts +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-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/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! yc-pro-components v0.0.
|
|
2
|
-
import { unref, isRef, ref, inject, isReactive, watch, computed, shallowRef, provide, onMounted, nextTick, onBeforeUnmount, defineComponent, useAttrs, watchEffect, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, normalizeStyle, createVNode, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createCommentVNode, reactive, Fragment, renderList, resolveDynamicComponent, normalizeProps, guardReactiveProps, h, withDirectives, isVNode, withKeys, withModifiers, TransitionGroup, toHandlers, getCurrentInstance, resolveComponent, toRefs, useSlots, onUnmounted, resolveDirective,
|
|
1
|
+
/*! yc-pro-components v0.0.76 */
|
|
2
|
+
import { unref, isRef, ref, inject, isReactive, watch, computed, shallowRef, provide, onMounted, nextTick, onBeforeUnmount, defineComponent, useAttrs, watchEffect, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, normalizeStyle, createVNode, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createCommentVNode, reactive, Fragment, renderList, resolveDynamicComponent, normalizeProps, guardReactiveProps, h, withDirectives, isVNode, withKeys, withModifiers, TransitionGroup, toHandlers, getCurrentInstance, resolveComponent, pushScopeId, popScopeId, toRefs, useSlots, onUnmounted, resolveDirective, onBeforeMount, getCurrentScope, onScopeDispose, toRef, mergeModels, useModel, vShow, createStaticVNode, hasInjectionContext, markRaw, effectScope, toRaw } from 'vue';
|
|
3
3
|
import { dayjs, localeContextKey, ElDialog, ElButton, ElPagination, ElRadioGroup, ElRadio, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElTooltip, ElPopconfirm, ElLink, ElMessageBox, useFormDisabled, ElDatePicker, ClickOutside, ElTag, ElInput, ElAutocomplete, ElCascader, ElCheckboxGroup, ElCheckbox, ElColorPicker, ElInputNumber, ElRate, ElSelect, ElOption, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElTreeSelect, ElSelectV2, ElText, ElDivider, ElFormItem, ElOptionGroup, ElRow, ElCol, ElForm, ElCard, ElMessage, ElImage, ElProgress, ElAvatar, ElPopover, ElTable, vLoading, ElDescriptions, ElDescriptionsItem, ElDrawer, TableV2FixedDir, ElAutoResizer, ElTableV2, ElSteps, ElStep, ElBreadcrumb, ElBreadcrumbItem, ElMenuItem, ElSubMenu, ElMenu, ElScrollbar, ElHeader, ElContainer, ElMain, ElBacktop, ElUpload } from 'element-plus';
|
|
4
4
|
|
|
5
5
|
const makeInstaller = (components = [], directives = {}) => {
|
|
@@ -16140,7 +16140,7 @@ var _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
16140
16140
|
ref: formItemInstance,
|
|
16141
16141
|
label: _ctx.hasLabel ? labelValue.value : "",
|
|
16142
16142
|
prop: _ctx.prop,
|
|
16143
|
-
class: "plus-form-item"
|
|
16143
|
+
class: ["plus-form-item", { "plus-form-item--no-label": !_ctx.hasLabel }]
|
|
16144
16144
|
}, customFormItemProps.value, {
|
|
16145
16145
|
"label-width": _ctx.hasLabel ? (_a = customFormItemProps.value) == null ? void 0 : _a.labelWidth : "0px"
|
|
16146
16146
|
}), createSlots({
|
|
@@ -16548,7 +16548,7 @@ var _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
16548
16548
|
]),
|
|
16549
16549
|
key: "1"
|
|
16550
16550
|
} : void 0
|
|
16551
|
-
]), 1040, ["label", "prop", "label-width"])) : createCommentVNode("v-if", true);
|
|
16551
|
+
]), 1040, ["label", "prop", "class", "label-width"])) : createCommentVNode("v-if", true);
|
|
16552
16552
|
};
|
|
16553
16553
|
}
|
|
16554
16554
|
});
|
|
@@ -18337,11 +18337,12 @@ var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__file", "index.vue"]]
|
|
|
18337
18337
|
|
|
18338
18338
|
const PlusPopover = Popover;
|
|
18339
18339
|
|
|
18340
|
+
const _withScopeId$4 = (n) => (pushScopeId("data-v-d1506155"), n = n(), popScopeId(), n);
|
|
18340
18341
|
const _hoisted_1$k = { class: "plus-table-title-bar" };
|
|
18341
18342
|
const _hoisted_2$e = { class: "plus-table-title-bar__title" };
|
|
18342
18343
|
const _hoisted_3$c = { class: "plus-table-title-bar__toolbar" };
|
|
18343
18344
|
const _hoisted_4$a = { class: "plus-table-title-bar__toolbar__density" };
|
|
18344
|
-
const _hoisted_5$9 = /* @__PURE__ */ createElementVNode(
|
|
18345
|
+
const _hoisted_5$9 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode(
|
|
18345
18346
|
"svg",
|
|
18346
18347
|
{
|
|
18347
18348
|
viewBox: "0 0 1024 1024",
|
|
@@ -18355,14 +18356,15 @@ const _hoisted_5$9 = /* @__PURE__ */ createElementVNode(
|
|
|
18355
18356
|
],
|
|
18356
18357
|
-1
|
|
18357
18358
|
/* HOISTED */
|
|
18358
|
-
);
|
|
18359
|
+
));
|
|
18359
18360
|
const _hoisted_6$7 = { class: "plus-table-checkbox-checkAll" };
|
|
18360
|
-
const _hoisted_7$5 = {
|
|
18361
|
+
const _hoisted_7$5 = { class: "plus-table-checkbox-actions" };
|
|
18362
|
+
const _hoisted_8$4 = {
|
|
18361
18363
|
key: 0,
|
|
18362
18364
|
class: "plus-table-checkbox-handle"
|
|
18363
18365
|
};
|
|
18364
|
-
const _hoisted_8$4 = { key: 1 };
|
|
18365
18366
|
const _hoisted_9$4 = { key: 1 };
|
|
18367
|
+
const _hoisted_10$3 = { key: 1 };
|
|
18366
18368
|
var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
18367
18369
|
...{
|
|
18368
18370
|
name: "PlusTableToolbar"
|
|
@@ -18402,6 +18404,12 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18402
18404
|
var _a;
|
|
18403
18405
|
return ((_a = columnSetting.value) == null ? void 0 : _a.overflowLabelLength) || 6;
|
|
18404
18406
|
});
|
|
18407
|
+
const confirmTextValue = computed(
|
|
18408
|
+
() => {
|
|
18409
|
+
var _a;
|
|
18410
|
+
return ((_a = columnSetting.value) == null ? void 0 : _a.confirmText) || String(t("plus.table.confirmText"));
|
|
18411
|
+
}
|
|
18412
|
+
);
|
|
18405
18413
|
const sortable = ref(null);
|
|
18406
18414
|
const buttonNameDensity = [
|
|
18407
18415
|
{
|
|
@@ -18423,6 +18431,20 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18423
18431
|
}
|
|
18424
18432
|
return props.columns.filter((item) => unref(item.headerIsChecked) !== false).map((item) => getTableKey(item));
|
|
18425
18433
|
};
|
|
18434
|
+
const buildFilterColumns = () => {
|
|
18435
|
+
return props.columns.map((item) => {
|
|
18436
|
+
if (state.checkList.includes(getTableKey(item))) {
|
|
18437
|
+
return { ...item, headerIsChecked: true };
|
|
18438
|
+
}
|
|
18439
|
+
return { ...item, headerIsChecked: false };
|
|
18440
|
+
});
|
|
18441
|
+
};
|
|
18442
|
+
const buildConfirmPayload = () => {
|
|
18443
|
+
const columns = buildFilterColumns();
|
|
18444
|
+
const order = columns.map((item) => String(item.prop || "")).filter(Boolean);
|
|
18445
|
+
const checked = columns.filter((item) => item.headerIsChecked !== false).map((item) => String(item.prop || "")).filter(Boolean);
|
|
18446
|
+
return { columns, order, checked };
|
|
18447
|
+
};
|
|
18426
18448
|
const state = reactive({
|
|
18427
18449
|
checkAll: true,
|
|
18428
18450
|
isIndeterminate: false,
|
|
@@ -18451,13 +18473,11 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18451
18473
|
handleFilterTableConfirm("allCheck");
|
|
18452
18474
|
};
|
|
18453
18475
|
const handleFilterTableConfirm = (type) => {
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
});
|
|
18460
|
-
emit("filterTableHeader", filterColumns, type);
|
|
18476
|
+
emit("filterTableHeader", buildFilterColumns(), type);
|
|
18477
|
+
};
|
|
18478
|
+
const handleConfirmClick = async () => {
|
|
18479
|
+
var _a, _b;
|
|
18480
|
+
await ((_b = (_a = columnSetting.value) == null ? void 0 : _a.onConfirm) == null ? void 0 : _b.call(_a, buildConfirmPayload()));
|
|
18461
18481
|
};
|
|
18462
18482
|
const handleCheckGroupChange = (value) => {
|
|
18463
18483
|
setCheckAllState(value);
|
|
@@ -18522,10 +18542,10 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18522
18542
|
1
|
|
18523
18543
|
/* TEXT */
|
|
18524
18544
|
)
|
|
18525
|
-
])
|
|
18545
|
+
], true)
|
|
18526
18546
|
]),
|
|
18527
18547
|
createElementVNode("div", _hoisted_3$c, [
|
|
18528
|
-
renderSlot(_ctx.$slots, "toolbar"),
|
|
18548
|
+
renderSlot(_ctx.$slots, "toolbar", {}, void 0, true),
|
|
18529
18549
|
((_a = titleBarConfig.value) == null ? void 0 : _a.refresh) === true ? (openBlock(), createElementBlock("span", {
|
|
18530
18550
|
key: 0,
|
|
18531
18551
|
class: "plus-table-title-bar__toolbar__refresh",
|
|
@@ -18549,7 +18569,7 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18549
18569
|
_: 1
|
|
18550
18570
|
/* STABLE */
|
|
18551
18571
|
}, 8, ["size", "color"])
|
|
18552
|
-
])
|
|
18572
|
+
], true)
|
|
18553
18573
|
]),
|
|
18554
18574
|
_: 3
|
|
18555
18575
|
/* FORWARDED */
|
|
@@ -18582,7 +18602,7 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18582
18602
|
_: 1
|
|
18583
18603
|
/* STABLE */
|
|
18584
18604
|
}, 8, ["size", "color"])
|
|
18585
|
-
])
|
|
18605
|
+
], true)
|
|
18586
18606
|
]),
|
|
18587
18607
|
_: 3
|
|
18588
18608
|
/* FORWARDED */
|
|
@@ -18647,14 +18667,14 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18647
18667
|
_: 1
|
|
18648
18668
|
/* STABLE */
|
|
18649
18669
|
}, 8, ["size", "color"])
|
|
18650
|
-
])
|
|
18670
|
+
], true)
|
|
18651
18671
|
]),
|
|
18652
18672
|
_: 3
|
|
18653
18673
|
/* FORWARDED */
|
|
18654
18674
|
}, 8, ["content"])
|
|
18655
18675
|
]),
|
|
18656
18676
|
default: withCtx(() => {
|
|
18657
|
-
var _a2, _b2, _c2;
|
|
18677
|
+
var _a2, _b2, _c2, _d;
|
|
18658
18678
|
return [
|
|
18659
18679
|
createElementVNode("div", _hoisted_6$7, [
|
|
18660
18680
|
createVNode(unref(ElCheckbox), {
|
|
@@ -18673,24 +18693,43 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18673
18693
|
_: 1
|
|
18674
18694
|
/* STABLE */
|
|
18675
18695
|
}, 8, ["modelValue", "indeterminate"]),
|
|
18676
|
-
(
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18696
|
+
createElementVNode("div", _hoisted_7$5, [
|
|
18697
|
+
((_a2 = columnSetting.value) == null ? void 0 : _a2.confirm) ? (openBlock(), createBlock(unref(ElLink), {
|
|
18698
|
+
key: 0,
|
|
18699
|
+
type: "primary",
|
|
18700
|
+
underline: unref(versionIsLessThan299) ? false : "never",
|
|
18701
|
+
href: "javaScript:;",
|
|
18702
|
+
onClick: withModifiers(handleConfirmClick, ["stop", "prevent"])
|
|
18703
|
+
}, {
|
|
18704
|
+
default: withCtx(() => [
|
|
18705
|
+
createTextVNode(
|
|
18706
|
+
toDisplayString(confirmTextValue.value),
|
|
18707
|
+
1
|
|
18708
|
+
/* TEXT */
|
|
18709
|
+
)
|
|
18710
|
+
]),
|
|
18711
|
+
_: 1
|
|
18712
|
+
/* STABLE */
|
|
18713
|
+
}, 8, ["underline"])) : createCommentVNode("v-if", true),
|
|
18714
|
+
((_b2 = columnSetting.value) == null ? void 0 : _b2.reset) !== false ? (openBlock(), createBlock(unref(ElLink), mergeProps({
|
|
18715
|
+
key: 1,
|
|
18716
|
+
type: "primary",
|
|
18717
|
+
underline: unref(versionIsLessThan299) ? false : "never",
|
|
18718
|
+
href: "javaScript:;"
|
|
18719
|
+
}, unref(isPlainObject$1)((_c2 = columnSetting.value) == null ? void 0 : _c2.reset) ? (_d = columnSetting.value) == null ? void 0 : _d.reset : {}, {
|
|
18720
|
+
onClick: withModifiers(resetCheckBoxList, ["stop", "prevent"])
|
|
18721
|
+
}), {
|
|
18722
|
+
default: withCtx(() => [
|
|
18723
|
+
createTextVNode(
|
|
18724
|
+
toDisplayString(unref(t)("plus.table.resetText")),
|
|
18725
|
+
1
|
|
18726
|
+
/* TEXT */
|
|
18727
|
+
)
|
|
18728
|
+
]),
|
|
18729
|
+
_: 1
|
|
18730
|
+
/* STABLE */
|
|
18731
|
+
}, 16, ["underline"])) : createCommentVNode("v-if", true)
|
|
18732
|
+
])
|
|
18694
18733
|
]),
|
|
18695
18734
|
createVNode(unref(ElCheckboxGroup), {
|
|
18696
18735
|
modelValue: state.checkList,
|
|
@@ -18715,10 +18754,10 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18715
18754
|
key: item.prop,
|
|
18716
18755
|
class: "plus-table-checkbox-item"
|
|
18717
18756
|
}, [
|
|
18718
|
-
((_a3 = columnSetting.value) == null ? void 0 : _a3.dragSort) !== false ? (openBlock(), createElementBlock("div",
|
|
18757
|
+
((_a3 = columnSetting.value) == null ? void 0 : _a3.dragSort) !== false ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
|
|
18719
18758
|
renderSlot(_ctx.$slots, "drag-sort-icon", {}, () => [
|
|
18720
18759
|
createTextVNode("\u2637")
|
|
18721
|
-
])
|
|
18760
|
+
], true)
|
|
18722
18761
|
])) : createCommentVNode("v-if", true),
|
|
18723
18762
|
createCommentVNode(" element-plus \u7248\u672C\u53F7\u5C0F\u4E8E2.6.0 "),
|
|
18724
18763
|
unref(versionIsLessThan260) ? (openBlock(), createBlock(unref(ElCheckbox), {
|
|
@@ -18744,7 +18783,7 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18744
18783
|
/* DYNAMIC */
|
|
18745
18784
|
}, 1032, ["content"])) : (openBlock(), createElementBlock(
|
|
18746
18785
|
"span",
|
|
18747
|
-
|
|
18786
|
+
_hoisted_9$4,
|
|
18748
18787
|
toDisplayString(item.label ? getLabelValue(item.label) : ""),
|
|
18749
18788
|
1
|
|
18750
18789
|
/* TEXT */
|
|
@@ -18779,7 +18818,7 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18779
18818
|
/* DYNAMIC */
|
|
18780
18819
|
}, 1032, ["content"])) : (openBlock(), createElementBlock(
|
|
18781
18820
|
"span",
|
|
18782
|
-
|
|
18821
|
+
_hoisted_10$3,
|
|
18783
18822
|
toDisplayString(item.label ? getLabelValue(item.label) : ""),
|
|
18784
18823
|
1
|
|
18785
18824
|
/* TEXT */
|
|
@@ -18816,7 +18855,7 @@ var _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
18816
18855
|
}
|
|
18817
18856
|
});
|
|
18818
18857
|
|
|
18819
|
-
var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "table-title-bar.vue"]]);
|
|
18858
|
+
var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-d1506155"], ["__file", "table-title-bar.vue"]]);
|
|
18820
18859
|
|
|
18821
18860
|
const _hoisted_1$j = { class: "plus-table-expand-col" };
|
|
18822
18861
|
var _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
@@ -60376,8 +60415,7 @@ const closeAllDrawer = () => {
|
|
|
60376
60415
|
drawerStore.value = [];
|
|
60377
60416
|
};
|
|
60378
60417
|
|
|
60379
|
-
const
|
|
60380
|
-
const _withScopeId$3 = (n) => (pushScopeId("data-v-eb9ddafc"), n = n(), popScopeId(), n);
|
|
60418
|
+
const _withScopeId$3 = (n) => (pushScopeId("data-v-80cac14a"), n = n(), popScopeId(), n);
|
|
60381
60419
|
const _hoisted_1$6 = { class: "custom-drawer-header" };
|
|
60382
60420
|
const _hoisted_2$6 = { class: "header-content" };
|
|
60383
60421
|
const _hoisted_3$6 = ["id"];
|
|
@@ -60396,7 +60434,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
60396
60434
|
__name: "index",
|
|
60397
60435
|
setup(__props) {
|
|
60398
60436
|
const shouldRender = claimDrawerInstance();
|
|
60399
|
-
if (!shouldRender &&
|
|
60437
|
+
if (!shouldRender && process.env.NODE_ENV !== "production") {
|
|
60400
60438
|
console.warn(
|
|
60401
60439
|
"[YcDrawer] Multiple <YcDrawer /> instances detected. Only the first instance renders drawers. Remove duplicate <YcDrawer /> from your component \u2014 it only needs to be placed once in the root App."
|
|
60402
60440
|
);
|
|
@@ -60638,7 +60676,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
60638
60676
|
}
|
|
60639
60677
|
});
|
|
60640
60678
|
|
|
60641
|
-
var YcDrawerComponent = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
60679
|
+
var YcDrawerComponent = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-80cac14a"], ["__file", "index.vue"]]);
|
|
60642
60680
|
|
|
60643
60681
|
const YcDrawer = YcDrawerComponent;
|
|
60644
60682
|
const ReDrawer = YcDrawerComponent;
|
|
@@ -64262,7 +64300,7 @@ function createDictStore(config) {
|
|
|
64262
64300
|
});
|
|
64263
64301
|
}
|
|
64264
64302
|
|
|
64265
|
-
const version = "0.0.
|
|
64303
|
+
const version = "0.0.76";
|
|
64266
64304
|
|
|
64267
64305
|
const install = installer.install;
|
|
64268
64306
|
|
|
@@ -233,7 +233,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
233
233
|
ref: formItemInstance,
|
|
234
234
|
label: _ctx.hasLabel ? labelValue.value : "",
|
|
235
235
|
prop: _ctx.prop,
|
|
236
|
-
class: "plus-form-item"
|
|
236
|
+
class: ["plus-form-item", { "plus-form-item--no-label": !_ctx.hasLabel }]
|
|
237
237
|
}, customFormItemProps.value, {
|
|
238
238
|
"label-width": _ctx.hasLabel ? (_a = customFormItemProps.value) == null ? void 0 : _a.labelWidth : "0px"
|
|
239
239
|
}), vue.createSlots({
|
|
@@ -641,7 +641,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
641
641
|
]),
|
|
642
642
|
key: "1"
|
|
643
643
|
} : void 0
|
|
644
|
-
]), 1040, ["label", "prop", "label-width"])) : vue.createCommentVNode("v-if", true);
|
|
644
|
+
]), 1040, ["label", "prop", "class", "label-width"])) : vue.createCommentVNode("v-if", true);
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
});
|
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tableTitleBar_vue_vue_type_script_setup_true_lang = require('./table-title-bar.vue2.js');
|
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
7
|
|
|
8
|
-
var PlusTableTitleBar = /* @__PURE__ */ _pluginVue_exportHelper.default(tableTitleBar_vue_vue_type_script_setup_true_lang.default, [["__file", "table-title-bar.vue"]]);
|
|
8
|
+
var PlusTableTitleBar = /* @__PURE__ */ _pluginVue_exportHelper.default(tableTitleBar_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-d1506155"], ["__file", "table-title-bar.vue"]]);
|
|
9
9
|
|
|
10
10
|
exports.default = PlusTableTitleBar;
|
|
@@ -11,11 +11,12 @@ var Sortable = require('sortablejs');
|
|
|
11
11
|
var elementPlus = require('element-plus');
|
|
12
12
|
var is = require('../../utils/is.js');
|
|
13
13
|
|
|
14
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-d1506155"), n = n(), vue.popScopeId(), n);
|
|
14
15
|
const _hoisted_1 = { class: "plus-table-title-bar" };
|
|
15
16
|
const _hoisted_2 = { class: "plus-table-title-bar__title" };
|
|
16
17
|
const _hoisted_3 = { class: "plus-table-title-bar__toolbar" };
|
|
17
18
|
const _hoisted_4 = { class: "plus-table-title-bar__toolbar__density" };
|
|
18
|
-
const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode(
|
|
19
|
+
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode(
|
|
19
20
|
"svg",
|
|
20
21
|
{
|
|
21
22
|
viewBox: "0 0 1024 1024",
|
|
@@ -29,14 +30,15 @@ const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode(
|
|
|
29
30
|
],
|
|
30
31
|
-1
|
|
31
32
|
/* HOISTED */
|
|
32
|
-
);
|
|
33
|
+
));
|
|
33
34
|
const _hoisted_6 = { class: "plus-table-checkbox-checkAll" };
|
|
34
|
-
const _hoisted_7 = {
|
|
35
|
+
const _hoisted_7 = { class: "plus-table-checkbox-actions" };
|
|
36
|
+
const _hoisted_8 = {
|
|
35
37
|
key: 0,
|
|
36
38
|
class: "plus-table-checkbox-handle"
|
|
37
39
|
};
|
|
38
|
-
const _hoisted_8 = { key: 1 };
|
|
39
40
|
const _hoisted_9 = { key: 1 };
|
|
41
|
+
const _hoisted_10 = { key: 1 };
|
|
40
42
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
41
43
|
...{
|
|
42
44
|
name: "PlusTableToolbar"
|
|
@@ -76,6 +78,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
76
78
|
var _a;
|
|
77
79
|
return ((_a = columnSetting.value) == null ? void 0 : _a.overflowLabelLength) || 6;
|
|
78
80
|
});
|
|
81
|
+
const confirmTextValue = vue.computed(
|
|
82
|
+
() => {
|
|
83
|
+
var _a;
|
|
84
|
+
return ((_a = columnSetting.value) == null ? void 0 : _a.confirmText) || String(t("plus.table.confirmText"));
|
|
85
|
+
}
|
|
86
|
+
);
|
|
79
87
|
const sortable = vue.ref(null);
|
|
80
88
|
const buttonNameDensity = [
|
|
81
89
|
{
|
|
@@ -97,6 +105,20 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
97
105
|
}
|
|
98
106
|
return props.columns.filter((item) => vue.unref(item.headerIsChecked) !== false).map((item) => index$1.getTableKey(item));
|
|
99
107
|
};
|
|
108
|
+
const buildFilterColumns = () => {
|
|
109
|
+
return props.columns.map((item) => {
|
|
110
|
+
if (state.checkList.includes(index$1.getTableKey(item))) {
|
|
111
|
+
return { ...item, headerIsChecked: true };
|
|
112
|
+
}
|
|
113
|
+
return { ...item, headerIsChecked: false };
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const buildConfirmPayload = () => {
|
|
117
|
+
const columns = buildFilterColumns();
|
|
118
|
+
const order = columns.map((item) => String(item.prop || "")).filter(Boolean);
|
|
119
|
+
const checked = columns.filter((item) => item.headerIsChecked !== false).map((item) => String(item.prop || "")).filter(Boolean);
|
|
120
|
+
return { columns, order, checked };
|
|
121
|
+
};
|
|
100
122
|
const state = vue.reactive({
|
|
101
123
|
checkAll: true,
|
|
102
124
|
isIndeterminate: false,
|
|
@@ -125,13 +147,11 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
125
147
|
handleFilterTableConfirm("allCheck");
|
|
126
148
|
};
|
|
127
149
|
const handleFilterTableConfirm = (type) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
emit("filterTableHeader", filterColumns, type);
|
|
150
|
+
emit("filterTableHeader", buildFilterColumns(), type);
|
|
151
|
+
};
|
|
152
|
+
const handleConfirmClick = async () => {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
await ((_b = (_a = columnSetting.value) == null ? void 0 : _a.onConfirm) == null ? void 0 : _b.call(_a, buildConfirmPayload()));
|
|
135
155
|
};
|
|
136
156
|
const handleCheckGroupChange = (value) => {
|
|
137
157
|
setCheckAllState(value);
|
|
@@ -196,10 +216,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
196
216
|
1
|
|
197
217
|
/* TEXT */
|
|
198
218
|
)
|
|
199
|
-
])
|
|
219
|
+
], true)
|
|
200
220
|
]),
|
|
201
221
|
vue.createElementVNode("div", _hoisted_3, [
|
|
202
|
-
vue.renderSlot(_ctx.$slots, "toolbar"),
|
|
222
|
+
vue.renderSlot(_ctx.$slots, "toolbar", {}, void 0, true),
|
|
203
223
|
((_a = titleBarConfig.value) == null ? void 0 : _a.refresh) === true ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
204
224
|
key: 0,
|
|
205
225
|
class: "plus-table-title-bar__toolbar__refresh",
|
|
@@ -223,7 +243,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
223
243
|
_: 1
|
|
224
244
|
/* STABLE */
|
|
225
245
|
}, 8, ["size", "color"])
|
|
226
|
-
])
|
|
246
|
+
], true)
|
|
227
247
|
]),
|
|
228
248
|
_: 3
|
|
229
249
|
/* FORWARDED */
|
|
@@ -256,7 +276,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
256
276
|
_: 1
|
|
257
277
|
/* STABLE */
|
|
258
278
|
}, 8, ["size", "color"])
|
|
259
|
-
])
|
|
279
|
+
], true)
|
|
260
280
|
]),
|
|
261
281
|
_: 3
|
|
262
282
|
/* FORWARDED */
|
|
@@ -321,14 +341,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
321
341
|
_: 1
|
|
322
342
|
/* STABLE */
|
|
323
343
|
}, 8, ["size", "color"])
|
|
324
|
-
])
|
|
344
|
+
], true)
|
|
325
345
|
]),
|
|
326
346
|
_: 3
|
|
327
347
|
/* FORWARDED */
|
|
328
348
|
}, 8, ["content"])
|
|
329
349
|
]),
|
|
330
350
|
default: vue.withCtx(() => {
|
|
331
|
-
var _a2, _b2, _c2;
|
|
351
|
+
var _a2, _b2, _c2, _d;
|
|
332
352
|
return [
|
|
333
353
|
vue.createElementVNode("div", _hoisted_6, [
|
|
334
354
|
vue.createVNode(vue.unref(elementPlus.ElCheckbox), {
|
|
@@ -347,24 +367,43 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
347
367
|
_: 1
|
|
348
368
|
/* STABLE */
|
|
349
369
|
}, 8, ["modelValue", "indeterminate"]),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
370
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
371
|
+
((_a2 = columnSetting.value) == null ? void 0 : _a2.confirm) ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElLink), {
|
|
372
|
+
key: 0,
|
|
373
|
+
type: "primary",
|
|
374
|
+
underline: vue.unref(index$1.versionIsLessThan299) ? false : "never",
|
|
375
|
+
href: "javaScript:;",
|
|
376
|
+
onClick: vue.withModifiers(handleConfirmClick, ["stop", "prevent"])
|
|
377
|
+
}, {
|
|
378
|
+
default: vue.withCtx(() => [
|
|
379
|
+
vue.createTextVNode(
|
|
380
|
+
vue.toDisplayString(confirmTextValue.value),
|
|
381
|
+
1
|
|
382
|
+
/* TEXT */
|
|
383
|
+
)
|
|
384
|
+
]),
|
|
385
|
+
_: 1
|
|
386
|
+
/* STABLE */
|
|
387
|
+
}, 8, ["underline"])) : vue.createCommentVNode("v-if", true),
|
|
388
|
+
((_b2 = columnSetting.value) == null ? void 0 : _b2.reset) !== false ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElLink), vue.mergeProps({
|
|
389
|
+
key: 1,
|
|
390
|
+
type: "primary",
|
|
391
|
+
underline: vue.unref(index$1.versionIsLessThan299) ? false : "never",
|
|
392
|
+
href: "javaScript:;"
|
|
393
|
+
}, vue.unref(is.isPlainObject)((_c2 = columnSetting.value) == null ? void 0 : _c2.reset) ? (_d = columnSetting.value) == null ? void 0 : _d.reset : {}, {
|
|
394
|
+
onClick: vue.withModifiers(resetCheckBoxList, ["stop", "prevent"])
|
|
395
|
+
}), {
|
|
396
|
+
default: vue.withCtx(() => [
|
|
397
|
+
vue.createTextVNode(
|
|
398
|
+
vue.toDisplayString(vue.unref(t)("plus.table.resetText")),
|
|
399
|
+
1
|
|
400
|
+
/* TEXT */
|
|
401
|
+
)
|
|
402
|
+
]),
|
|
403
|
+
_: 1
|
|
404
|
+
/* STABLE */
|
|
405
|
+
}, 16, ["underline"])) : vue.createCommentVNode("v-if", true)
|
|
406
|
+
])
|
|
368
407
|
]),
|
|
369
408
|
vue.createVNode(vue.unref(elementPlus.ElCheckboxGroup), {
|
|
370
409
|
modelValue: state.checkList,
|
|
@@ -389,10 +428,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
389
428
|
key: item.prop,
|
|
390
429
|
class: "plus-table-checkbox-item"
|
|
391
430
|
}, [
|
|
392
|
-
((_a3 = columnSetting.value) == null ? void 0 : _a3.dragSort) !== false ? (vue.openBlock(), vue.createElementBlock("div",
|
|
431
|
+
((_a3 = columnSetting.value) == null ? void 0 : _a3.dragSort) !== false ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
393
432
|
vue.renderSlot(_ctx.$slots, "drag-sort-icon", {}, () => [
|
|
394
433
|
vue.createTextVNode("\u2637")
|
|
395
|
-
])
|
|
434
|
+
], true)
|
|
396
435
|
])) : vue.createCommentVNode("v-if", true),
|
|
397
436
|
vue.createCommentVNode(" element-plus \u7248\u672C\u53F7\u5C0F\u4E8E2.6.0 "),
|
|
398
437
|
vue.unref(index$1.versionIsLessThan260) ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElCheckbox), {
|
|
@@ -418,7 +457,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
418
457
|
/* DYNAMIC */
|
|
419
458
|
}, 1032, ["content"])) : (vue.openBlock(), vue.createElementBlock(
|
|
420
459
|
"span",
|
|
421
|
-
|
|
460
|
+
_hoisted_9,
|
|
422
461
|
vue.toDisplayString(item.label ? getLabelValue(item.label) : ""),
|
|
423
462
|
1
|
|
424
463
|
/* TEXT */
|
|
@@ -453,7 +492,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
453
492
|
/* DYNAMIC */
|
|
454
493
|
}, 1032, ["content"])) : (vue.openBlock(), vue.createElementBlock(
|
|
455
494
|
"span",
|
|
456
|
-
|
|
495
|
+
_hoisted_10,
|
|
457
496
|
vue.toDisplayString(item.label ? getLabelValue(item.label) : ""),
|
|
458
497
|
1
|
|
459
498
|
/* TEXT */
|
|
@@ -322,6 +322,14 @@ export interface PlusTableState {
|
|
|
322
322
|
* 列设置类型
|
|
323
323
|
* @version v0.1.20 新增reset,默认:true
|
|
324
324
|
*/
|
|
325
|
+
/**
|
|
326
|
+
* 列设置确认回调 payload
|
|
327
|
+
*/
|
|
328
|
+
export type ColumnSettingConfirmPayload = {
|
|
329
|
+
columns: PlusColumn[];
|
|
330
|
+
order: string[];
|
|
331
|
+
checked: string[];
|
|
332
|
+
};
|
|
325
333
|
export type ColumnSetting = {
|
|
326
334
|
dragSort?: boolean | Partial<SortableOptions>;
|
|
327
335
|
/**
|
|
@@ -342,6 +350,15 @@ export type ColumnSetting = {
|
|
|
342
350
|
* @default 6
|
|
343
351
|
*/
|
|
344
352
|
overflowLabelLength?: number;
|
|
353
|
+
/**
|
|
354
|
+
* 是否显示「确认」按钮;默认 false 不展示
|
|
355
|
+
* 不影响勾选/拖拽/重置的即时生效行为,点击确认仅触发 onConfirm 回调(如发起保存请求)
|
|
356
|
+
*/
|
|
357
|
+
confirm?: boolean;
|
|
358
|
+
/** 确认按钮文案 */
|
|
359
|
+
confirmText?: string;
|
|
360
|
+
/** 点击确认时回调,payload 为当前列设置快照 */
|
|
361
|
+
onConfirm?: (payload: ColumnSettingConfirmPayload) => void | Promise<void>;
|
|
345
362
|
};
|
|
346
363
|
/**
|
|
347
364
|
* 标题栏
|
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var index_vue_vue_type_script_setup_true_lang = require('./index.vue2.js');
|
|
6
6
|
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
|
7
7
|
|
|
8
|
-
var YcDrawerComponent = /* @__PURE__ */ _pluginVue_exportHelper.default(index_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-
|
|
8
|
+
var YcDrawerComponent = /* @__PURE__ */ _pluginVue_exportHelper.default(index_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-80cac14a"], ["__file", "index.vue"]]);
|
|
9
9
|
|
|
10
10
|
exports.default = YcDrawerComponent;
|
|
@@ -8,8 +8,7 @@ var ElementPlusIconsVue = require('@element-plus/icons-vue');
|
|
|
8
8
|
var store = require('../store.js');
|
|
9
9
|
var dict = require('../../../constants/dict.js');
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-eb9ddafc"), n = n(), vue.popScopeId(), n);
|
|
11
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-80cac14a"), n = n(), vue.popScopeId(), n);
|
|
13
12
|
const _hoisted_1 = { class: "custom-drawer-header" };
|
|
14
13
|
const _hoisted_2 = { class: "header-content" };
|
|
15
14
|
const _hoisted_3 = ["id"];
|
|
@@ -28,7 +27,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
28
27
|
__name: "index",
|
|
29
28
|
setup(__props) {
|
|
30
29
|
const shouldRender = store.claimDrawerInstance();
|
|
31
|
-
if (!shouldRender &&
|
|
30
|
+
if (!shouldRender && process.env.NODE_ENV !== "production") {
|
|
32
31
|
console.warn(
|
|
33
32
|
"[YcDrawer] Multiple <YcDrawer /> instances detected. Only the first instance renders drawers. Remove duplicate <YcDrawer /> from your component \u2014 it only needs to be placed once in the root App."
|
|
34
33
|
);
|