3h1-ui 3.0.0-next.62 → 3.0.0-next.63
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/index.js +141 -107
- package/es/style.css +141 -153
- package/lib/index.js +140 -106
- package/lib/style.css +141 -153
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, nextTick, createVNode, defineComponent, ref, computed, unref, watchEffect, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createSlots, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, onMounted, normalizeClass, createCommentVNode, normalizeStyle as normalizeStyle$1, Transition, toHandlers, useSlots, withDirectives, vShow, getCurrentInstance, inject, onUnmounted, provide, onBeforeUnmount,
|
|
1
|
+
import { h, nextTick, createVNode, defineComponent, ref, computed, unref, watchEffect, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createSlots, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, onMounted, normalizeClass, createCommentVNode, normalizeStyle as normalizeStyle$1, Transition, toHandlers, useSlots, resolveDynamicComponent, withDirectives, vShow, getCurrentInstance, inject, onUnmounted, provide, onBeforeUnmount, reactive, toRef, toRefs, TransitionGroup, getCurrentScope, onScopeDispose, defineAsyncComponent, isRef, toRaw, shallowRef, isVNode, readonly, useAttrs as useAttrs$2, shallowReactive, withKeys, render as render$1, resolveDirective, pushScopeId, popScopeId, useCssVars, triggerRef, Comment, Text, withModifiers } from "vue";
|
|
2
2
|
import { Radio, Select, Tree, TreeSelect, Cascader, Transfer, Input, Tooltip, Skeleton, Popover, Pagination as Pagination$1, Empty as Empty$3, Button as Button$1, Table as Table$2, FormItem, DatePicker as DatePicker$1, InputNumber, Modal as Modal$3, ConfigProvider, Popconfirm, Menu, Dropdown, Divider as Divider$1, Image, Progress, Tag, Alert, Upload, Space, AutoComplete, Switch, Checkbox, Slider, Rate, TimePicker as TimePicker$1, Col, Form, Row, Spin, PageHeader, CheckboxGroup, TableSummaryRow, TableSummaryCell, TableSummary, Badge, FormItemRest, Drawer, Avatar, Descriptions, DescriptionsItem, theme, Breadcrumb, Timeline, TimelineItem } from "ant-design-vue";
|
|
3
3
|
import { isFunction as isFunction$4, isString as isString$4, isArray as isArray$4, getSlot as getSlot$1, addClass as addClass$1, removeClass as removeClass$1, getPopupContainer as getPopupContainer$1, triggerWindowResize, off, on, addResizeListener, removeResizeListener, buildUUID, extendSlots as extendSlots$1, withInstall as withInstall$8, isBoolean as isBoolean$1, isNumber as isNumber$2, isDef as isDef$1, warn as warn$1, downloadByUrl, isObject as isObject$4, isNull, dateUtil, isNullOrUnDef, error as error$1, deepMerge as deepMerge$1, getDynamicProps, buildProps, createBEM, forEach as forEach$1, isClient as isClient$1, filter, treeToList, eachTree, isEmpty, isServer, formatToDate, isMap as isMap$2, findNodeAll, getViewportOffset, isNullAndUnDef, dataURLtoBlob, deepMergeObjects } from "@shy-plugins/utils";
|
|
4
4
|
import { useAttrs as useAttrs$1, useRuleFormItem, useDesign as useDesign$1, useTimeoutFn as useTimeoutFn$2, useScrollTo as useScrollTo$1, useIntersectionObserver, useCopyToClipboard, useMessage, usePagination as usePagination$3, useI18n as useI18n$1, useSortable, createContext as createContext$1, useContext as useContext$2, useBreakpoint, useContentHeight, useWindowSizeFn as useWindowSizeFn$1, onMountedOrActivated, useEventListener as useEventListener$1 } from "@shy-plugins/use";
|
|
@@ -5911,61 +5911,37 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
|
5911
5911
|
* Whether the color block on the left side of the title
|
|
5912
5912
|
* @default: false
|
|
5913
5913
|
*/
|
|
5914
|
-
span: { type: Boolean, default: true }
|
|
5915
|
-
/**
|
|
5916
|
-
* Whether show to expand
|
|
5917
|
-
* @default: false
|
|
5918
|
-
*/
|
|
5919
|
-
expand: {
|
|
5920
|
-
type: Boolean,
|
|
5921
|
-
default: false
|
|
5922
|
-
}
|
|
5914
|
+
span: { type: Boolean, default: true }
|
|
5923
5915
|
},
|
|
5924
|
-
|
|
5925
|
-
setup(__props, { emit: __emit }) {
|
|
5916
|
+
setup(__props) {
|
|
5926
5917
|
const props2 = __props;
|
|
5927
|
-
const emit = __emit;
|
|
5928
|
-
const handleExpand = () => {
|
|
5929
|
-
isExpand.value = !isExpand.value;
|
|
5930
|
-
emit("handleExpand");
|
|
5931
|
-
};
|
|
5932
5918
|
const { prefixCls: prefixCls2 } = useDesign$1("basic-title");
|
|
5933
5919
|
const slots = useSlots();
|
|
5934
5920
|
const getClass = computed(() => [
|
|
5935
5921
|
prefixCls2,
|
|
5936
5922
|
{ [`${prefixCls2}-show-span`]: props2.span && slots.default }
|
|
5937
5923
|
]);
|
|
5938
|
-
const isExpand = ref(false);
|
|
5939
5924
|
return (_ctx, _cache) => {
|
|
5925
|
+
var _a2, _b, _c;
|
|
5940
5926
|
return openBlock(), createElementBlock("span", {
|
|
5941
5927
|
class: normalizeClass(getClass.value)
|
|
5942
5928
|
}, [
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
__props.helpMessage ? (openBlock(), createBlock(_sfc_main$1A, {
|
|
5946
|
-
key: 0,
|
|
5947
|
-
class: normalizeClass(`${unref(prefixCls2)}-help`),
|
|
5948
|
-
text: __props.helpMessage
|
|
5949
|
-
}, null, 8, ["class", "text"])) : createCommentVNode("", true)
|
|
5950
|
-
]),
|
|
5951
|
-
__props.expand ? (openBlock(), createElementBlock("div", {
|
|
5929
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
5930
|
+
__props.helpMessage ? (openBlock(), createBlock(_sfc_main$1A, {
|
|
5952
5931
|
key: 0,
|
|
5953
|
-
class: normalizeClass(`${unref(prefixCls2)}-
|
|
5954
|
-
|
|
5955
|
-
}, [
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
}, null, 8, ["expand", "class"]),
|
|
5961
|
-
createElementVNode("span", null, toDisplayString(isExpand.value ? "收起" : "展开"), 1)
|
|
5962
|
-
], 2)) : createCommentVNode("", true)
|
|
5932
|
+
class: normalizeClass(`${unref(prefixCls2)}-help`),
|
|
5933
|
+
text: __props.helpMessage
|
|
5934
|
+
}, null, 8, ["class", "text"])) : createCommentVNode("", true),
|
|
5935
|
+
renderSlot(_ctx.$slots, "extra", {}, void 0, true),
|
|
5936
|
+
((_a2 = _ctx.$attrs) == null ? void 0 : _a2.extra) ? (openBlock(), createBlock(resolveDynamicComponent(
|
|
5937
|
+
unref(isFunction$4)(_ctx.$attrs.extra) ? (_c = (_b = _ctx.$attrs).extra) == null ? void 0 : _c.call(_b) : h("span", _ctx.$attrs.extra)
|
|
5938
|
+
), { key: 1 })) : createCommentVNode("", true)
|
|
5963
5939
|
], 2);
|
|
5964
5940
|
};
|
|
5965
5941
|
}
|
|
5966
5942
|
});
|
|
5967
|
-
const
|
|
5968
|
-
const BasicTitle$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["__scopeId", "data-v-
|
|
5943
|
+
const BasicTitle_vue_vue_type_style_index_0_scoped_b0cf71c3_lang = "";
|
|
5944
|
+
const BasicTitle$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["__scopeId", "data-v-b0cf71c3"]]);
|
|
5969
5945
|
const props$b = {
|
|
5970
5946
|
prefixCls: { type: String },
|
|
5971
5947
|
helpMessage: {
|
|
@@ -5982,6 +5958,7 @@ const _sfc_main$1y = defineComponent({
|
|
|
5982
5958
|
props: props$b,
|
|
5983
5959
|
emits: ["expand"]
|
|
5984
5960
|
});
|
|
5961
|
+
const CollapseHeader_vue_vue_type_style_index_0_lang = "";
|
|
5985
5962
|
function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5986
5963
|
const _component_BasicTitle = resolveComponent("BasicTitle");
|
|
5987
5964
|
const _component_BasicArrow = resolveComponent("BasicArrow");
|
|
@@ -6003,12 +5980,17 @@ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6003
5980
|
class: normalizeClass(`${_ctx.prefixCls}__action`)
|
|
6004
5981
|
}, [
|
|
6005
5982
|
renderSlot(_ctx.$slots, "action"),
|
|
6006
|
-
_ctx.canExpan ? (openBlock(),
|
|
5983
|
+
_ctx.canExpan ? (openBlock(), createElementBlock("div", {
|
|
6007
5984
|
key: 0,
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
5985
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("expand")),
|
|
5986
|
+
class: normalizeClass(`${_ctx.prefixCls}-arrow`)
|
|
5987
|
+
}, [
|
|
5988
|
+
createVNode(_component_BasicArrow, {
|
|
5989
|
+
down: "",
|
|
5990
|
+
expand: _ctx.show
|
|
5991
|
+
}, null, 8, ["expand"]),
|
|
5992
|
+
createElementVNode("span", null, toDisplayString(_ctx.show ? "收起" : "展开"), 1)
|
|
5993
|
+
], 2)) : createCommentVNode("", true)
|
|
6012
5994
|
], 2)
|
|
6013
5995
|
], 2);
|
|
6014
5996
|
}
|
|
@@ -6060,7 +6042,11 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
|
6060
6042
|
createVNode(CollapseHeader, mergeProps(props2, {
|
|
6061
6043
|
prefixCls: prefixCls$5,
|
|
6062
6044
|
show: show.value,
|
|
6063
|
-
onExpand: handleExpand
|
|
6045
|
+
onExpand: handleExpand,
|
|
6046
|
+
class: [
|
|
6047
|
+
`${prefixCls$5}__header`,
|
|
6048
|
+
show.value ? "" : `${prefixCls$5}__header-action`
|
|
6049
|
+
]
|
|
6064
6050
|
}), {
|
|
6065
6051
|
title: withCtx(() => [
|
|
6066
6052
|
renderSlot(_ctx.$slots, "title")
|
|
@@ -6069,7 +6055,7 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
|
6069
6055
|
renderSlot(_ctx.$slots, "action")
|
|
6070
6056
|
]),
|
|
6071
6057
|
_: 3
|
|
6072
|
-
}, 16, ["show"]),
|
|
6058
|
+
}, 16, ["show", "class"]),
|
|
6073
6059
|
createElementVNode("div", _hoisted_1$E, [
|
|
6074
6060
|
createVNode(unref(CollapseTransition), { enable: __props.canExpan }, {
|
|
6075
6061
|
default: withCtx(() => [
|
|
@@ -8908,8 +8894,8 @@ function useTransition(source, options = {}) {
|
|
|
8908
8894
|
}
|
|
8909
8895
|
const _hoisted_1$B = { class: "flex justify-between" };
|
|
8910
8896
|
const _hoisted_2$f = { key: 0 };
|
|
8911
|
-
const _hoisted_3$
|
|
8912
|
-
const _hoisted_4$
|
|
8897
|
+
const _hoisted_3$a = { class: "flex flex-wrap px-2" };
|
|
8898
|
+
const _hoisted_4$8 = ["onClick", "title"];
|
|
8913
8899
|
const _hoisted_5$6 = {
|
|
8914
8900
|
key: 0,
|
|
8915
8901
|
class: "flex py-2 items-center justify-center"
|
|
@@ -9027,7 +9013,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
9027
9013
|
unref(getPaginationList).length ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
|
|
9028
9014
|
createVNode(unref(ScrollContainer$1), { class: "border border-solid border-t-0" }, {
|
|
9029
9015
|
default: withCtx(() => [
|
|
9030
|
-
createElementVNode("ul", _hoisted_3$
|
|
9016
|
+
createElementVNode("ul", _hoisted_3$a, [
|
|
9031
9017
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getPaginationList), (icon) => {
|
|
9032
9018
|
return openBlock(), createElementBlock("li", {
|
|
9033
9019
|
key: icon,
|
|
@@ -9042,7 +9028,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
9042
9028
|
key: 1,
|
|
9043
9029
|
icon
|
|
9044
9030
|
}, null, 8, ["icon"]))
|
|
9045
|
-
], 10, _hoisted_4$
|
|
9031
|
+
], 10, _hoisted_4$8);
|
|
9046
9032
|
}), 128))
|
|
9047
9033
|
])
|
|
9048
9034
|
]),
|
|
@@ -9252,8 +9238,8 @@ const _hoisted_2$e = {
|
|
|
9252
9238
|
key: 0,
|
|
9253
9239
|
class: "table-children-required"
|
|
9254
9240
|
};
|
|
9255
|
-
const _hoisted_3$
|
|
9256
|
-
const _hoisted_4$
|
|
9241
|
+
const _hoisted_3$9 = { class: "text-red-500" };
|
|
9242
|
+
const _hoisted_4$7 = {
|
|
9257
9243
|
key: 0,
|
|
9258
9244
|
class: "table-children-delete-index"
|
|
9259
9245
|
};
|
|
@@ -9483,7 +9469,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
9483
9469
|
content: withCtx(() => {
|
|
9484
9470
|
var _a3;
|
|
9485
9471
|
return [
|
|
9486
|
-
createElementVNode("span", _hoisted_3$
|
|
9472
|
+
createElementVNode("span", _hoisted_3$9, toDisplayString((_a3 = rulesRef[`${column2.dataIndex}-${record.uuid}Info`]) == null ? void 0 : _a3.msg), 1)
|
|
9487
9473
|
];
|
|
9488
9474
|
}),
|
|
9489
9475
|
default: withCtx(() => [
|
|
@@ -9535,7 +9521,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
9535
9521
|
class: "table-children-delete-wrapper",
|
|
9536
9522
|
key: record[__props.rowKey]
|
|
9537
9523
|
}, [
|
|
9538
|
-
__props.isShowAction ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
9524
|
+
__props.isShowAction ? (openBlock(), createElementBlock("span", _hoisted_4$7, toDisplayString(index2 + 1), 1)) : createCommentVNode("", true),
|
|
9539
9525
|
__props.isShowAction ? (openBlock(), createElementBlock("div", {
|
|
9540
9526
|
key: 1,
|
|
9541
9527
|
class: "table-children-delete-item",
|
|
@@ -12282,7 +12268,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
12282
12268
|
});
|
|
12283
12269
|
const _hoisted_1$v = { key: 0 };
|
|
12284
12270
|
const _hoisted_2$c = { style: { "margin-top": "8px" } };
|
|
12285
|
-
const _hoisted_3$
|
|
12271
|
+
const _hoisted_3$8 = ["src"];
|
|
12286
12272
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
12287
12273
|
__name: "ImageUpload",
|
|
12288
12274
|
props: {
|
|
@@ -12451,7 +12437,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
12451
12437
|
alt: "",
|
|
12452
12438
|
style: { "width": "100%" },
|
|
12453
12439
|
src: previewImage.value
|
|
12454
|
-
}, null, 8, _hoisted_3$
|
|
12440
|
+
}, null, 8, _hoisted_3$8)
|
|
12455
12441
|
]),
|
|
12456
12442
|
_: 1
|
|
12457
12443
|
}, 8, ["open", "title"])
|
|
@@ -14395,7 +14381,8 @@ const treeProps = buildProps({
|
|
|
14395
14381
|
type: Boolean,
|
|
14396
14382
|
default: false
|
|
14397
14383
|
},
|
|
14398
|
-
checkable: { type: Boolean, default:
|
|
14384
|
+
checkable: { type: Boolean, default: false },
|
|
14385
|
+
addable: { type: Boolean, default: false },
|
|
14399
14386
|
defaultExpandLevel: {
|
|
14400
14387
|
type: [String, Number],
|
|
14401
14388
|
default: ""
|
|
@@ -14476,6 +14463,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
14476
14463
|
type: Boolean,
|
|
14477
14464
|
default: false
|
|
14478
14465
|
},
|
|
14466
|
+
addable: {
|
|
14467
|
+
type: Boolean,
|
|
14468
|
+
default: false
|
|
14469
|
+
},
|
|
14479
14470
|
search: {
|
|
14480
14471
|
type: Boolean,
|
|
14481
14472
|
default: false
|
|
@@ -14552,14 +14543,15 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
14552
14543
|
]),
|
|
14553
14544
|
_: 1
|
|
14554
14545
|
}, 8, ["helpMessage"])) : createCommentVNode("", true),
|
|
14555
|
-
|
|
14546
|
+
_ctx.addable ? (openBlock(), createBlock(unref(Icon2), {
|
|
14547
|
+
key: 1,
|
|
14556
14548
|
icon: "ant-design:plus-square-outlined",
|
|
14557
14549
|
style: {
|
|
14558
14550
|
color: "#2da44e"
|
|
14559
14551
|
},
|
|
14560
14552
|
class: "cursor-pointer",
|
|
14561
14553
|
onClick: handleMenuClick
|
|
14562
|
-
})
|
|
14554
|
+
})) : createCommentVNode("", true)
|
|
14563
14555
|
]),
|
|
14564
14556
|
_ctx.search || _ctx.toolbar ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
14565
14557
|
_ctx.search ? (openBlock(), createElementBlock("div", {
|
|
@@ -14578,8 +14570,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
14578
14570
|
};
|
|
14579
14571
|
}
|
|
14580
14572
|
});
|
|
14581
|
-
const
|
|
14582
|
-
const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-
|
|
14573
|
+
const TreeHeader_vue_vue_type_style_index_0_scoped_743e62ba_lang = "";
|
|
14574
|
+
const TreeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-743e62ba"]]);
|
|
14583
14575
|
process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
14584
14576
|
process.env.NODE_ENV !== "production" ? Object.freeze([]) : [];
|
|
14585
14577
|
const isString$1 = (val) => typeof val === "string";
|
|
@@ -15363,7 +15355,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
15363
15355
|
helpMessage,
|
|
15364
15356
|
toolbar,
|
|
15365
15357
|
search,
|
|
15366
|
-
checkable
|
|
15358
|
+
checkable,
|
|
15359
|
+
addable
|
|
15367
15360
|
} = props2;
|
|
15368
15361
|
const showTitle = title || toolbar || search || slots.headerTitle;
|
|
15369
15362
|
const scrollStyle = {
|
|
@@ -15382,7 +15375,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
15382
15375
|
"onStrictlyChange": onStrictlyChange,
|
|
15383
15376
|
"onSearch": handleSearch,
|
|
15384
15377
|
"searchText": searchState.searchText,
|
|
15385
|
-
"onPlusClick": handlePlusClick
|
|
15378
|
+
"onPlusClick": handlePlusClick,
|
|
15379
|
+
"addable": addable
|
|
15386
15380
|
}, _isSlot$4(_slot = extendSlots$1(slots)) ? _slot : {
|
|
15387
15381
|
default: () => [_slot]
|
|
15388
15382
|
}), createVNode(Spin, {
|
|
@@ -18217,11 +18211,11 @@ const getGlobalAdvancedType = (fieldList, value) => {
|
|
|
18217
18211
|
};
|
|
18218
18212
|
const _hoisted_1$q = { class: "shy-ui-advanced-search-add" };
|
|
18219
18213
|
const _hoisted_2$a = { class: "shy-ui-advanced-search-item-wrapper" };
|
|
18220
|
-
const _hoisted_3$
|
|
18214
|
+
const _hoisted_3$7 = {
|
|
18221
18215
|
key: 0,
|
|
18222
18216
|
class: "shy-ui-advanced-search-item-value-range"
|
|
18223
18217
|
};
|
|
18224
|
-
const _hoisted_4$
|
|
18218
|
+
const _hoisted_4$6 = /* @__PURE__ */ createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
|
|
18225
18219
|
const _hoisted_5$4 = {
|
|
18226
18220
|
key: 0,
|
|
18227
18221
|
class: "shy-ui-advanced-search-item-value-range"
|
|
@@ -18443,7 +18437,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
18443
18437
|
}, {
|
|
18444
18438
|
default: withCtx(() => [
|
|
18445
18439
|
getTypeByField(schema == null ? void 0 : schema.field) === "number" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
18446
|
-
schema.op === "bt" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
18440
|
+
schema.op === "bt" ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
18447
18441
|
createVNode(unref(FormItem), null, {
|
|
18448
18442
|
default: withCtx(() => [
|
|
18449
18443
|
createVNode(unref(InputNumber), {
|
|
@@ -18454,7 +18448,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
18454
18448
|
]),
|
|
18455
18449
|
_: 2
|
|
18456
18450
|
}, 1024),
|
|
18457
|
-
_hoisted_4$
|
|
18451
|
+
_hoisted_4$6,
|
|
18458
18452
|
createVNode(unref(FormItem), null, {
|
|
18459
18453
|
default: withCtx(() => [
|
|
18460
18454
|
createVNode(unref(InputNumber), {
|
|
@@ -18747,14 +18741,14 @@ const _hoisted_2$9 = {
|
|
|
18747
18741
|
key: 0,
|
|
18748
18742
|
style: { "margin": "5px" }
|
|
18749
18743
|
};
|
|
18750
|
-
const _hoisted_3$
|
|
18744
|
+
const _hoisted_3$6 = { class: "flex items-center" };
|
|
18751
18745
|
function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18752
18746
|
const _component_TableSetting = resolveComponent("TableSetting");
|
|
18753
18747
|
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
18754
18748
|
_ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
18755
18749
|
renderSlot(_ctx.$slots, "headerTop")
|
|
18756
18750
|
])) : createCommentVNode("", true),
|
|
18757
|
-
createElementVNode("div", _hoisted_3$
|
|
18751
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
18758
18752
|
_ctx.$slots.tableTitle ? renderSlot(_ctx.$slots, "tableTitle", { key: 0 }) : createCommentVNode("", true),
|
|
18759
18753
|
createElementVNode("div", {
|
|
18760
18754
|
class: normalizeClass(`${_ctx.prefixCls}__toolbar`)
|
|
@@ -19504,8 +19498,8 @@ const TableGlobalSearch_vue_vue_type_style_index_0_scoped_90331d26_lang = "";
|
|
|
19504
19498
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-90331d26"), n = n(), popScopeId(), n);
|
|
19505
19499
|
const _hoisted_1$m = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "搜索全部", -1));
|
|
19506
19500
|
const _hoisted_2$8 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "搜索特定字段", -1));
|
|
19507
|
-
const _hoisted_3$
|
|
19508
|
-
const _hoisted_4$
|
|
19501
|
+
const _hoisted_3$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
|
|
19502
|
+
const _hoisted_4$5 = { class: "shy-basic-table-global-search-checkbox-wrapper" };
|
|
19509
19503
|
const _hoisted_5$3 = { style: { "color": "#131415", "font-size": "12px" } };
|
|
19510
19504
|
function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19511
19505
|
const _component_CheckOutlined = resolveComponent("CheckOutlined");
|
|
@@ -19530,8 +19524,8 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19530
19524
|
_hoisted_2$8,
|
|
19531
19525
|
_ctx.curSelected === 2 ? (openBlock(), createBlock(_component_CheckOutlined, { key: 0 })) : createCommentVNode("", true)
|
|
19532
19526
|
], 2),
|
|
19533
|
-
_hoisted_3$
|
|
19534
|
-
createElementVNode("div", _hoisted_4$
|
|
19527
|
+
_hoisted_3$5,
|
|
19528
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
19535
19529
|
createVNode(_component_CheckboxGroup, {
|
|
19536
19530
|
value: _ctx.fieldList,
|
|
19537
19531
|
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => _ctx.fieldList = $event),
|
|
@@ -25193,8 +25187,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
25193
25187
|
});
|
|
25194
25188
|
const _hoisted_1$c = { key: 0 };
|
|
25195
25189
|
const _hoisted_2$5 = { key: 1 };
|
|
25196
|
-
const _hoisted_3$
|
|
25197
|
-
const _hoisted_4$
|
|
25190
|
+
const _hoisted_3$4 = { key: 2 };
|
|
25191
|
+
const _hoisted_4$4 = { style: { "display": "flex", "justify-content": "space-between" } };
|
|
25198
25192
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
25199
25193
|
__name: "TableColGroup",
|
|
25200
25194
|
props: {
|
|
@@ -25266,7 +25260,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
25266
25260
|
}), null, 16, ["value", "onUpdate:value"])
|
|
25267
25261
|
])) : (c == null ? void 0 : c.isEdit) && ((_e = c == null ? void 0 : c.editComponentProps) == null ? void 0 : _e.component) === "Switch" ? (openBlock(), createElementBlock("span", _hoisted_2$5, [
|
|
25268
25262
|
createElementVNode("span", null, toDisplayString(getSwitchShowText(c, config.row)), 1)
|
|
25269
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_3$
|
|
25263
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(config.row[c.field]), 1))
|
|
25270
25264
|
], 64))
|
|
25271
25265
|
];
|
|
25272
25266
|
})
|
|
@@ -25275,7 +25269,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
25275
25269
|
renderSlot(_ctx.$slots, `${c.field}Header`, normalizeProps(guardReactiveProps({ c })), () => {
|
|
25276
25270
|
var _a2;
|
|
25277
25271
|
return [
|
|
25278
|
-
createElementVNode("div", _hoisted_4$
|
|
25272
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
25279
25273
|
createElementVNode("div", null, toDisplayString(c.title), 1),
|
|
25280
25274
|
((_a2 = _ctx.column) == null ? void 0 : _a2.sortable) ? (openBlock(), createBlock(_sfc_main$w, {
|
|
25281
25275
|
key: 0,
|
|
@@ -25916,8 +25910,8 @@ const useSort = () => {
|
|
|
25916
25910
|
};
|
|
25917
25911
|
const _hoisted_1$8 = { key: 0 };
|
|
25918
25912
|
const _hoisted_2$4 = { key: 1 };
|
|
25919
|
-
const _hoisted_3$
|
|
25920
|
-
const _hoisted_4$
|
|
25913
|
+
const _hoisted_3$3 = { key: 2 };
|
|
25914
|
+
const _hoisted_4$3 = { style: { "display": "flex", "justify-content": "space-between" } };
|
|
25921
25915
|
const _hoisted_5$2 = { class: "flex items-center" };
|
|
25922
25916
|
const prefixCls = "shy-basic-table-plus";
|
|
25923
25917
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
@@ -26264,14 +26258,14 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
26264
26258
|
}), null, 16, ["value", "onUpdate:value"])
|
|
26265
26259
|
])) : (column2 == null ? void 0 : column2.isEdit) && ((_d2 = column2 == null ? void 0 : column2.editComponentProps) == null ? void 0 : _d2.component) === "Switch" ? (openBlock(), createElementBlock("span", _hoisted_2$4, [
|
|
26266
26260
|
createElementVNode("span", null, toDisplayString(getSwitchShowText(column2, config.row)), 1)
|
|
26267
|
-
])) : (openBlock(), createElementBlock("span", _hoisted_3$
|
|
26261
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_3$3, toDisplayString(config.row[column2.field]), 1))
|
|
26268
26262
|
], 64))
|
|
26269
26263
|
];
|
|
26270
26264
|
})
|
|
26271
26265
|
]),
|
|
26272
26266
|
header: withCtx(() => [
|
|
26273
26267
|
renderSlot(_ctx.$slots, `${column2.field}Header`, normalizeProps(guardReactiveProps({ column: column2 })), () => [
|
|
26274
|
-
createElementVNode("div", _hoisted_4$
|
|
26268
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
26275
26269
|
createElementVNode("div", null, toDisplayString(column2.title), 1),
|
|
26276
26270
|
(column2 == null ? void 0 : column2.sortable) ? (openBlock(), createBlock(_sfc_main$w, {
|
|
26277
26271
|
key: 0,
|
|
@@ -31867,7 +31861,7 @@ const componentSetting = {
|
|
|
31867
31861
|
// Number of pages that can be selected
|
|
31868
31862
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
31869
31863
|
// Default display quantity on one page
|
|
31870
|
-
defaultPageSize:
|
|
31864
|
+
defaultPageSize: 20,
|
|
31871
31865
|
// Default Size
|
|
31872
31866
|
defaultSize: "small",
|
|
31873
31867
|
// Custom general sort function
|
|
@@ -33121,6 +33115,8 @@ const _hoisted_1$6 = {
|
|
|
33121
33115
|
class: "table-children-required"
|
|
33122
33116
|
};
|
|
33123
33117
|
const _hoisted_2$3 = { class: "text-red-500" };
|
|
33118
|
+
const _hoisted_3$2 = { class: "table-children-add-btn" };
|
|
33119
|
+
const _hoisted_4$2 = { class: "w-full h-[fit-content] py-8px flex justify-end items-center" };
|
|
33124
33120
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
33125
33121
|
__name: "Table",
|
|
33126
33122
|
props: {
|
|
@@ -33136,6 +33132,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33136
33132
|
type: Array,
|
|
33137
33133
|
default: () => []
|
|
33138
33134
|
},
|
|
33135
|
+
isShowFooter: {
|
|
33136
|
+
type: Boolean,
|
|
33137
|
+
default: () => false
|
|
33138
|
+
},
|
|
33139
|
+
footerRender: {
|
|
33140
|
+
type: Function,
|
|
33141
|
+
default: () => ""
|
|
33142
|
+
},
|
|
33139
33143
|
isShowAction: {
|
|
33140
33144
|
type: Boolean,
|
|
33141
33145
|
default: () => true
|
|
@@ -33152,6 +33156,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33152
33156
|
const formActionType = inject("formActionType");
|
|
33153
33157
|
const emit = __emit;
|
|
33154
33158
|
const props2 = __props;
|
|
33159
|
+
const tableElRef = ref();
|
|
33155
33160
|
const emitData = ref([]);
|
|
33156
33161
|
const [state] = useRuleFormItem(props2, "value", "change", emitData);
|
|
33157
33162
|
const getColumns = computed(() => {
|
|
@@ -33179,6 +33184,25 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33179
33184
|
...(props2 == null ? void 0 : props2.isShowAction) ? [actionColumn] : []
|
|
33180
33185
|
];
|
|
33181
33186
|
});
|
|
33187
|
+
const getScrollX = computed(() => {
|
|
33188
|
+
var _a2;
|
|
33189
|
+
let width = 0;
|
|
33190
|
+
const NORMAL_WIDTH = 150;
|
|
33191
|
+
const columns = unref(props2.columns).filter((item) => !item.defaultHidden);
|
|
33192
|
+
columns.forEach((item) => {
|
|
33193
|
+
width += Number.parseFloat(item.width) || 0;
|
|
33194
|
+
});
|
|
33195
|
+
const unsetWidthColumns = columns.filter(
|
|
33196
|
+
(item) => !Reflect.has(item, "width")
|
|
33197
|
+
);
|
|
33198
|
+
const len = unsetWidthColumns.length;
|
|
33199
|
+
if (len !== 0) {
|
|
33200
|
+
width += len * NORMAL_WIDTH;
|
|
33201
|
+
}
|
|
33202
|
+
const table2 = unref(tableElRef);
|
|
33203
|
+
const tableWidth = ((_a2 = table2 == null ? void 0 : table2.$el) == null ? void 0 : _a2.offsetWidth) ?? 0;
|
|
33204
|
+
return tableWidth > width ? "100%" : width;
|
|
33205
|
+
});
|
|
33182
33206
|
const plusClickEvent = () => {
|
|
33183
33207
|
state.value = [{ [props2.rowKey]: buildUUID() }, ...toRaw(state.value)];
|
|
33184
33208
|
emit("add", state.value);
|
|
@@ -33195,7 +33219,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33195
33219
|
const rulesRef = reactive({});
|
|
33196
33220
|
const getRules = ({ column: column2, record, index: index2, ...args }) => {
|
|
33197
33221
|
var _a2, _b;
|
|
33198
|
-
const errKey = `${column2.dataIndex}-${record.
|
|
33222
|
+
const errKey = `${column2.dataIndex}-${record[props2.rowKey]}Info`;
|
|
33199
33223
|
if (!column2.required)
|
|
33200
33224
|
return [];
|
|
33201
33225
|
if ((_a2 = rulesRef[errKey]) == null ? void 0 : _a2.rules)
|
|
@@ -33265,15 +33289,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33265
33289
|
() => state.value,
|
|
33266
33290
|
(v, old) => {
|
|
33267
33291
|
if (!isEqual(toRaw(v), toRaw(old))) {
|
|
33268
|
-
|
|
33269
|
-
|
|
33270
|
-
|
|
33271
|
-
|
|
33272
|
-
|
|
33273
|
-
|
|
33274
|
-
};
|
|
33275
|
-
})
|
|
33276
|
-
);
|
|
33292
|
+
state.value = toRaw(v).map((ele) => {
|
|
33293
|
+
return {
|
|
33294
|
+
...ele,
|
|
33295
|
+
[props2.rowKey]: ele[props2.rowKey] || buildUUID()
|
|
33296
|
+
};
|
|
33297
|
+
});
|
|
33277
33298
|
}
|
|
33278
33299
|
},
|
|
33279
33300
|
{
|
|
@@ -33326,7 +33347,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33326
33347
|
return (_ctx, _cache) => {
|
|
33327
33348
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
33328
33349
|
createVNode(unref(Table$2), {
|
|
33350
|
+
ref_key: "tableElRef",
|
|
33351
|
+
ref: tableElRef,
|
|
33329
33352
|
columns: getColumns.value,
|
|
33353
|
+
scroll: {
|
|
33354
|
+
x: getScrollX.value
|
|
33355
|
+
},
|
|
33330
33356
|
"data-source": unref(state),
|
|
33331
33357
|
pagination: false,
|
|
33332
33358
|
bordered: "",
|
|
@@ -33353,12 +33379,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33353
33379
|
return [
|
|
33354
33380
|
createVNode(unref(Popover), {
|
|
33355
33381
|
overlayClassName: "table-children-err-popover",
|
|
33356
|
-
visible: !!((_a2 = rulesRef == null ? void 0 : rulesRef[`${column2.dataIndex}-${record.
|
|
33382
|
+
visible: !!((_a2 = rulesRef == null ? void 0 : rulesRef[`${column2.dataIndex}-${record[props2.rowKey]}Info`]) == null ? void 0 : _a2.show) && !isScroll.value
|
|
33357
33383
|
}, {
|
|
33358
33384
|
content: withCtx(() => {
|
|
33359
33385
|
var _a3;
|
|
33360
33386
|
return [
|
|
33361
|
-
createElementVNode("span", _hoisted_2$3, toDisplayString((_a3 = rulesRef[`${column2.dataIndex}-${record.
|
|
33387
|
+
createElementVNode("span", _hoisted_2$3, toDisplayString((_a3 = rulesRef[`${column2.dataIndex}-${record[props2.rowKey]}Info`]) == null ? void 0 : _a3.msg), 1)
|
|
33362
33388
|
];
|
|
33363
33389
|
}),
|
|
33364
33390
|
default: withCtx(() => [
|
|
@@ -33413,19 +33439,27 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
33413
33439
|
}, null, 8, ["actions"])) : createCommentVNode("", true)
|
|
33414
33440
|
]),
|
|
33415
33441
|
_: 1
|
|
33416
|
-
}, 8, ["columns", "data-source"]),
|
|
33417
|
-
createElementVNode("div",
|
|
33418
|
-
|
|
33442
|
+
}, 8, ["columns", "scroll", "data-source"]),
|
|
33443
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
33444
|
+
createVNode(unref(BasicButton), {
|
|
33419
33445
|
onClick: plusClickEvent,
|
|
33420
|
-
|
|
33421
|
-
},
|
|
33446
|
+
type: "dashed"
|
|
33447
|
+
}, {
|
|
33448
|
+
default: withCtx(() => [
|
|
33449
|
+
createTextVNode(" 新增 ")
|
|
33450
|
+
]),
|
|
33451
|
+
_: 1
|
|
33452
|
+
})
|
|
33453
|
+
]),
|
|
33454
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
33455
|
+
(openBlock(), createBlock(resolveDynamicComponent(h("span", null, __props.footerRender()))))
|
|
33422
33456
|
])
|
|
33423
33457
|
], 64);
|
|
33424
33458
|
};
|
|
33425
33459
|
}
|
|
33426
33460
|
});
|
|
33427
|
-
const
|
|
33428
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
33461
|
+
const Table_vue_vue_type_style_index_0_scoped_221ba907_lang = "";
|
|
33462
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-221ba907"]]);
|
|
33429
33463
|
const ShyComponentMap = /* @__PURE__ */ new Map();
|
|
33430
33464
|
ShyComponentMap.set("Input", Input);
|
|
33431
33465
|
ShyComponentMap.set("InputGroup", Input.Group);
|
|
@@ -35478,23 +35512,23 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
35478
35512
|
}
|
|
35479
35513
|
},
|
|
35480
35514
|
setup(__props) {
|
|
35481
|
-
const { prefixCls: prefixCls2 } = useDesign$1("ant-form");
|
|
35515
|
+
const { prefixCls: prefixCls2 } = useDesign$1("ant-form-wrapper");
|
|
35482
35516
|
const props2 = __props;
|
|
35483
35517
|
const getClass = computed(() => {
|
|
35484
35518
|
switch (props2.span) {
|
|
35485
35519
|
case 1:
|
|
35486
|
-
return `${prefixCls2}-
|
|
35520
|
+
return `${prefixCls2}-col-1`;
|
|
35487
35521
|
case 2:
|
|
35488
|
-
return `${prefixCls2}-
|
|
35522
|
+
return `${prefixCls2}-col-2`;
|
|
35489
35523
|
case 3:
|
|
35490
|
-
return `${prefixCls2}-
|
|
35524
|
+
return `${prefixCls2}-col-3`;
|
|
35491
35525
|
default:
|
|
35492
35526
|
return "";
|
|
35493
35527
|
}
|
|
35494
35528
|
});
|
|
35495
35529
|
return (_ctx, _cache) => {
|
|
35496
35530
|
return openBlock(), createElementBlock("div", {
|
|
35497
|
-
class: normalizeClass(getClass.value)
|
|
35531
|
+
class: normalizeClass([unref(prefixCls2), getClass.value])
|
|
35498
35532
|
}, [
|
|
35499
35533
|
renderSlot(_ctx.$slots, "default")
|
|
35500
35534
|
], 2);
|
|
@@ -35589,7 +35623,7 @@ function usePagination(refProps) {
|
|
|
35589
35623
|
isShowPagination,
|
|
35590
35624
|
current: 1,
|
|
35591
35625
|
pageSize: PAGE_SIZE,
|
|
35592
|
-
size:
|
|
35626
|
+
// size: '',
|
|
35593
35627
|
defaultPageSize: PAGE_SIZE,
|
|
35594
35628
|
showTotal: (total) => createVNode("span", null, [createTextVNode("共 "), createVNode("span", null, [total]), createTextVNode(" 条")]),
|
|
35595
35629
|
showSizeChanger: true,
|