xrk-components 2.0.0-beta.98 → 3.0.0
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/lib/index.css +304 -158
- package/lib/index.esm.js +559 -207
- package/lib/index.umd.js +559 -207
- package/lib/packages/base/date-picker/index.d.ts +15 -2
- package/lib/packages/base/dialog/hooks/use-resize.d.ts +6 -0
- package/lib/packages/base/form/index.d.ts +2 -2
- package/lib/packages/base/input/index.d.ts +2 -2
- package/lib/packages/base/layout/index.d.ts +4 -4
- package/lib/packages/base/table/table-column.d.ts +3 -9
- package/lib/packages/base/table/types/type.d.ts +7 -8
- package/lib/packages/hooks/use-default-props.d.ts +2 -0
- package/lib/packages/xrk/search/hooks/use-resize.d.ts +2 -0
- package/lib/packages/xrk/search/index.d.ts +4 -0
- package/lib/packages/xrk/search/search.d.ts +8 -0
- package/lib/packages/xrk/search/types/type.d.ts +1 -0
- package/lib/packages/xrk/slide-verify/index.d.ts +2 -2
- package/lib/packages/xrk/table/hooks/use-resize.d.ts +1 -0
- package/lib/packages/xrk/table/hooks/use-table.d.ts +1 -0
- package/lib/packages/xrk/table/index.d.ts +7 -0
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -71494,8 +71494,7 @@ var script$F = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$D
|
|
|
71494
71494
|
script$F.__file = "packages/base/button/button.vue";
|
|
71495
71495
|
|
|
71496
71496
|
var _hoisted_1$i = /*#__PURE__*/ createTextVNode("更多");
|
|
71497
|
-
var _hoisted_2$
|
|
71498
|
-
var _hoisted_3$9 = ["onClick"];
|
|
71497
|
+
var _hoisted_2$c = ["onClick"];
|
|
71499
71498
|
var __default__$C = {
|
|
71500
71499
|
name: 'base-button-more'
|
|
71501
71500
|
};
|
|
@@ -71505,13 +71504,20 @@ var script$E = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$C
|
|
|
71505
71504
|
trigger: { type: String, required: false, default: 'click' },
|
|
71506
71505
|
maxCount: { type: Number, required: false },
|
|
71507
71506
|
notRepeatShow: { type: Boolean, required: false, default: true },
|
|
71508
|
-
type: { type: null, required: false, default: '
|
|
71507
|
+
type: { type: null, required: false, default: 'primary' }
|
|
71509
71508
|
}, setup: function (__props) {
|
|
71510
71509
|
var props = __props;
|
|
71511
71510
|
var popoverRef = ref();
|
|
71512
71511
|
var showMore = ref(false);
|
|
71513
71512
|
var showMoreStartIndex = ref(0);
|
|
71514
71513
|
var btnsRef = ref();
|
|
71514
|
+
var btnGroupStyle = computed(function () {
|
|
71515
|
+
return {
|
|
71516
|
+
style: {
|
|
71517
|
+
'--item-hover-color': "var(--xrk-color-".concat(props.type, ")")
|
|
71518
|
+
}
|
|
71519
|
+
};
|
|
71520
|
+
});
|
|
71515
71521
|
onMounted(function () {
|
|
71516
71522
|
var _a, _b;
|
|
71517
71523
|
var btns = (_a = btnsRef.value) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.xrk-button');
|
|
@@ -71602,7 +71608,7 @@ var script$E = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$C
|
|
|
71602
71608
|
}, 8 /* PROPS */, ["type"])
|
|
71603
71609
|
]; }),
|
|
71604
71610
|
default: withCtx(function () { return [
|
|
71605
|
-
createElementVNode("div",
|
|
71611
|
+
createElementVNode("div", mergeProps({ class: "btn-group" }, unref(btnGroupStyle)), [
|
|
71606
71612
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.btns.slice(showMoreStartIndex.value), function (btn, index) {
|
|
71607
71613
|
return (openBlock(), createElementBlock("div", {
|
|
71608
71614
|
class: normalizeClass(["btn", { disabled: btn.disabled }]),
|
|
@@ -71614,9 +71620,9 @@ var script$E = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$C
|
|
|
71614
71620
|
(_b = (_a = popoverRef.value) === null || _a === void 0 ? void 0 : _a.hide) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
71615
71621
|
(_c = (btn.onClick || btn.click)) === null || _c === void 0 ? void 0 : _c();
|
|
71616
71622
|
}
|
|
71617
|
-
}, toDisplayString(btn.content), 11 /* TEXT, CLASS, PROPS */,
|
|
71623
|
+
}, toDisplayString(btn.content), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$c));
|
|
71618
71624
|
}), 128 /* KEYED_FRAGMENT */))
|
|
71619
|
-
])
|
|
71625
|
+
], 16 /* FULL_PROPS */)
|
|
71620
71626
|
]; }),
|
|
71621
71627
|
_: 1 /* STABLE */
|
|
71622
71628
|
}, 8 /* PROPS */, ["trigger"]))
|
|
@@ -71826,11 +71832,11 @@ var _hoisted_1$h = {
|
|
|
71826
71832
|
key: 0,
|
|
71827
71833
|
style: { "width": "100%", "height": "100%" }
|
|
71828
71834
|
};
|
|
71829
|
-
var _hoisted_2$
|
|
71835
|
+
var _hoisted_2$b = {
|
|
71830
71836
|
key: 0,
|
|
71831
71837
|
style: { "position": "absolute", "width": "100%", "height": "100%", "left": "0", "top": "0" }
|
|
71832
71838
|
};
|
|
71833
|
-
var _hoisted_3$
|
|
71839
|
+
var _hoisted_3$9 = {
|
|
71834
71840
|
key: 0,
|
|
71835
71841
|
style: { "position": "absolute", "width": "100%", "height": "100%", "left": "0", "top": "0" }
|
|
71836
71842
|
};
|
|
@@ -72035,7 +72041,7 @@ var script$C = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$A
|
|
|
72035
72041
|
var _a;
|
|
72036
72042
|
return [
|
|
72037
72043
|
((_a = unref(slots)) === null || _a === void 0 ? void 0 : _a.default)
|
|
72038
|
-
? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
72044
|
+
? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
72039
72045
|
renderSlot(_ctx.$slots, "default", {
|
|
72040
72046
|
slotScope: { activeIndex: activeIndex.value }
|
|
72041
72047
|
})
|
|
@@ -72074,7 +72080,7 @@ var script$C = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$A
|
|
|
72074
72080
|
var _a;
|
|
72075
72081
|
return [
|
|
72076
72082
|
((_a = unref(slots)) === null || _a === void 0 ? void 0 : _a.default)
|
|
72077
|
-
? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
72083
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$9, [
|
|
72078
72084
|
renderSlot(_ctx.$slots, "default", {
|
|
72079
72085
|
slotScope: { activeIndex: activeIndex.value }
|
|
72080
72086
|
})
|
|
@@ -72567,7 +72573,7 @@ var BaseCheckboxButton = script$x;
|
|
|
72567
72573
|
var BaseCheckboxGroup = script$v;
|
|
72568
72574
|
var BaseCheckbox = script$w;
|
|
72569
72575
|
|
|
72570
|
-
var propsKey$
|
|
72576
|
+
var propsKey$2 = 'date-picker'; // 解决defineProps作用域问题
|
|
72571
72577
|
var __default__$s = {
|
|
72572
72578
|
name: 'base-date-picker'
|
|
72573
72579
|
};
|
|
@@ -72593,7 +72599,7 @@ var script$u = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$s
|
|
|
72593
72599
|
clearIcon: { type: null, required: false },
|
|
72594
72600
|
validateEvent: { type: Boolean, required: false },
|
|
72595
72601
|
disabledDate: { type: Function, required: false },
|
|
72596
|
-
shortcuts: { type: null, required: false, default: (function () { return useGetGlobalDefaultProp(propsKey$
|
|
72602
|
+
shortcuts: { type: null, required: false, default: (function () { return useGetGlobalDefaultProp(propsKey$2, 'shortcuts', []); }) },
|
|
72597
72603
|
cellClassName: { type: Function, required: false },
|
|
72598
72604
|
teleported: { type: Boolean, required: false, default: true }
|
|
72599
72605
|
}, emits: ["change", "visibleChange", "calendarChange", "update:modelValue"], setup: function (__props, _a) {
|
|
@@ -72724,12 +72730,24 @@ var script$t = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$r
|
|
|
72724
72730
|
if ((cellValue === null || cellValue === void 0 ? void 0 : cellValue.length) > 600)
|
|
72725
72731
|
return 'base-tool-tip-1200';
|
|
72726
72732
|
};
|
|
72733
|
+
function textFits(text, element) {
|
|
72734
|
+
var canvas = document.createElement('canvas');
|
|
72735
|
+
var ctx = canvas.getContext('2d');
|
|
72736
|
+
ctx.font = window.getComputedStyle(element, null).getPropertyValue('font');
|
|
72737
|
+
var textWidth = ctx.measureText(text).width;
|
|
72738
|
+
var elementWidth = element.offsetWidth;
|
|
72739
|
+
return textWidth <= elementWidth;
|
|
72740
|
+
}
|
|
72727
72741
|
var handleMouseMove = function () {
|
|
72728
72742
|
var _a, _b;
|
|
72729
72743
|
if (((_a = toolTipDefault.value) === null || _a === void 0 ? void 0 : _a.tagName) && ((_b = toolTipDefaultContent.value) === null || _b === void 0 ? void 0 : _b.tagName)) {
|
|
72730
|
-
|
|
72731
|
-
|
|
72732
|
-
|
|
72744
|
+
// const { offsetWidth, offsetHeight } = toolTipDefault.value;
|
|
72745
|
+
// const { offsetWidth: childOffsetWidth, offsetHeight: childOffsetHeight } =
|
|
72746
|
+
// toolTipDefaultContent.value;
|
|
72747
|
+
// _overShow.value = !(
|
|
72748
|
+
// offsetWidth < childOffsetWidth || offsetHeight < childOffsetHeight
|
|
72749
|
+
// );
|
|
72750
|
+
_overShow.value = textFits(_content.value, toolTipDefault.value);
|
|
72733
72751
|
}
|
|
72734
72752
|
};
|
|
72735
72753
|
return function (_ctx, _cache) {
|
|
@@ -73126,9 +73144,9 @@ script$s.__file = "packages/base/input/input.vue";
|
|
|
73126
73144
|
|
|
73127
73145
|
var BaseInput = script$s;
|
|
73128
73146
|
|
|
73129
|
-
var _withScopeId$
|
|
73147
|
+
var _withScopeId$5 = function (n) { return (pushScopeId("data-v-13bddb91"), n = n(), popScopeId(), n); };
|
|
73130
73148
|
var _hoisted_1$e = ["src"];
|
|
73131
|
-
var _hoisted_2$
|
|
73149
|
+
var _hoisted_2$a = /*#__PURE__*/ _withScopeId$5(function () { return createElementVNode("svg", {
|
|
73132
73150
|
xmlns: "http://www.w3.org/2000/svg",
|
|
73133
73151
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
73134
73152
|
fill: "none",
|
|
@@ -73320,7 +73338,7 @@ var script$r = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$p
|
|
|
73320
73338
|
size: __props.imageSize
|
|
73321
73339
|
}, {
|
|
73322
73340
|
default: withCtx(function () { return [
|
|
73323
|
-
_hoisted_2$
|
|
73341
|
+
_hoisted_2$a
|
|
73324
73342
|
]; }),
|
|
73325
73343
|
_: 1 /* STABLE */
|
|
73326
73344
|
}, 8 /* PROPS */, ["size"]))
|
|
@@ -73452,7 +73470,7 @@ var script$p = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$n
|
|
|
73452
73470
|
placeholder: { type: String, required: false },
|
|
73453
73471
|
filterable: { type: Boolean, required: false },
|
|
73454
73472
|
allowCreate: { type: Boolean, required: false },
|
|
73455
|
-
fitInputWidth: { type: Boolean, required: false, default:
|
|
73473
|
+
fitInputWidth: { type: Boolean, required: false, default: false },
|
|
73456
73474
|
filterMethod: { type: Function, required: false },
|
|
73457
73475
|
maxlength: { type: Number, required: false, default: 50 },
|
|
73458
73476
|
remoteMethod: { type: Function, required: false },
|
|
@@ -73538,6 +73556,7 @@ var script$p = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$n
|
|
|
73538
73556
|
case 1:
|
|
73539
73557
|
_b.trys.push([1, 3, , 4]);
|
|
73540
73558
|
loading.value = true;
|
|
73559
|
+
_options.value = [];
|
|
73541
73560
|
return [4 /*yield*/, ((_a = props.remoteMethod) === null || _a === void 0 ? void 0 : _a.call(props, val))];
|
|
73542
73561
|
case 2:
|
|
73543
73562
|
res = _b.sent();
|
|
@@ -74249,8 +74268,50 @@ var script$k = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$i
|
|
|
74249
74268
|
script$k.__scopeId = "data-v-17eda5db";
|
|
74250
74269
|
script$k.__file = "packages/base/form/form-item.vue";
|
|
74251
74270
|
|
|
74252
|
-
|
|
74253
|
-
var
|
|
74271
|
+
function useResponsiveColumns(identification, columnNum, fixedColumnsNum) {
|
|
74272
|
+
var resizeObserver = null;
|
|
74273
|
+
var widthToColumnMap = [
|
|
74274
|
+
{ maxWidth: 500, columns: 1 },
|
|
74275
|
+
{ maxWidth: 800, columns: 2 },
|
|
74276
|
+
{ maxWidth: 1000, columns: 3 },
|
|
74277
|
+
{ maxWidth: 1300, columns: 4 },
|
|
74278
|
+
{ maxWidth: Infinity, columns: 5 }
|
|
74279
|
+
];
|
|
74280
|
+
var updateColumns = function () {
|
|
74281
|
+
// 使用ResizeObserver替代window.resize事件
|
|
74282
|
+
var dom = document.querySelector(".xrk-search_".concat(identification));
|
|
74283
|
+
if (!dom)
|
|
74284
|
+
return;
|
|
74285
|
+
var width = dom.offsetWidth;
|
|
74286
|
+
var target = widthToColumnMap.find(function (item) { return width <= item.maxWidth; });
|
|
74287
|
+
columnNum.value = (target === null || target === void 0 ? void 0 : target.columns) || 5;
|
|
74288
|
+
};
|
|
74289
|
+
var clearResponsive = function () {
|
|
74290
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
74291
|
+
resizeObserver = null;
|
|
74292
|
+
};
|
|
74293
|
+
onMounted(function () {
|
|
74294
|
+
clearResponsive();
|
|
74295
|
+
nextTick(function () {
|
|
74296
|
+
if (!fixedColumnsNum) {
|
|
74297
|
+
resizeObserver = new ResizeObserver(updateColumns);
|
|
74298
|
+
var dom = document.querySelector(".xrk-search_".concat(identification));
|
|
74299
|
+
if (dom)
|
|
74300
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe(dom);
|
|
74301
|
+
}
|
|
74302
|
+
});
|
|
74303
|
+
});
|
|
74304
|
+
onUnmounted(function () {
|
|
74305
|
+
clearResponsive();
|
|
74306
|
+
});
|
|
74307
|
+
}
|
|
74308
|
+
|
|
74309
|
+
var _hoisted_1$c = { class: "btn-group" };
|
|
74310
|
+
var _hoisted_2$9 = { class: "btn-group-left" };
|
|
74311
|
+
var _hoisted_3$8 = {
|
|
74312
|
+
key: 0,
|
|
74313
|
+
class: "btn-group-right"
|
|
74314
|
+
};
|
|
74254
74315
|
var __default__$h = {
|
|
74255
74316
|
name: 'xrk-search'
|
|
74256
74317
|
};
|
|
@@ -74267,16 +74328,19 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
|
|
|
74267
74328
|
}); } },
|
|
74268
74329
|
otherComponents: { type: null, required: false },
|
|
74269
74330
|
syncQueryToSearch: { type: Boolean, required: false },
|
|
74270
|
-
syncSearchToQuery: { type: Boolean, required: false }
|
|
74331
|
+
syncSearchToQuery: { type: Boolean, required: false },
|
|
74332
|
+
fixedColumnsNum: { type: Number, required: false }
|
|
74271
74333
|
}, emits: ["search"], setup: function (__props, _a) {
|
|
74272
74334
|
var _this = this;
|
|
74273
74335
|
var expose = _a.expose, emits = _a.emit;
|
|
74274
74336
|
var _props = __props;
|
|
74275
74337
|
var props = _props;
|
|
74338
|
+
var identification = ref(Date.now());
|
|
74276
74339
|
var searchFormRef = ref();
|
|
74277
74340
|
var searchBtn = computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
|
|
74278
74341
|
var resetBtn = computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
|
|
74279
|
-
var columnNum = ref(5);
|
|
74342
|
+
var columnNum = ref((props === null || props === void 0 ? void 0 : props.fixedColumnsNum) || 5);
|
|
74343
|
+
useResponsiveColumns(identification.value, columnNum, props === null || props === void 0 ? void 0 : props.fixedColumnsNum);
|
|
74280
74344
|
var searchStyle = computed(function () {
|
|
74281
74345
|
return {
|
|
74282
74346
|
'--column-num': columnNum.value,
|
|
@@ -74307,7 +74371,7 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
|
|
|
74307
74371
|
placeholder: "".concat(_getPleaseText(column.type)).concat(column.label || '')
|
|
74308
74372
|
};
|
|
74309
74373
|
if (column.type === 'datePicker') {
|
|
74310
|
-
defaultConfig = __assign(__assign({}, defaultConfig), { startPlaceholder:
|
|
74374
|
+
defaultConfig = __assign(__assign({}, defaultConfig), { startPlaceholder: '开始时间', endPlaceholder: '结束时间' });
|
|
74311
74375
|
}
|
|
74312
74376
|
return defaultConfig;
|
|
74313
74377
|
};
|
|
@@ -74426,12 +74490,11 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
|
|
|
74426
74490
|
handleResetClick: handleResetClick
|
|
74427
74491
|
});
|
|
74428
74492
|
return function (_ctx, _cache) {
|
|
74429
|
-
var _a
|
|
74493
|
+
var _a;
|
|
74494
|
+
var _b, _c, _d;
|
|
74430
74495
|
return (openBlock(), createElementBlock("div", {
|
|
74431
|
-
class: normalizeClass(["xrk-search", {
|
|
74432
|
-
|
|
74433
|
-
}]),
|
|
74434
|
-
style: normalizeStyle(__assign({ marginBottom: ((_c = __props.columns) === null || _c === void 0 ? void 0 : _c.length) ? '16px' : 0 }, unref(searchStyle)))
|
|
74496
|
+
class: normalizeClass(["xrk-search", (_a = {}, _a["xrk-search_".concat(identification.value)] = true, _a)]),
|
|
74497
|
+
style: normalizeStyle(__assign({ marginBottom: ((_b = __props.columns) === null || _b === void 0 ? void 0 : _b.length) ? '16px' : 0 }, unref(searchStyle)))
|
|
74435
74498
|
}, [
|
|
74436
74499
|
createVNode(script$b, {
|
|
74437
74500
|
model: searchValue,
|
|
@@ -74467,22 +74530,18 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
|
|
|
74467
74530
|
]; }),
|
|
74468
74531
|
_: 1 /* STABLE */
|
|
74469
74532
|
}, 8 /* PROPS */, ["model"]),
|
|
74470
|
-
createElementVNode("div",
|
|
74471
|
-
|
|
74472
|
-
style: normalizeStyle({ marginTop: ((_d = __props.columns) === null || _d === void 0 ? void 0 : _d.length) ? '24px' : 0 })
|
|
74473
|
-
}, [
|
|
74474
|
-
createElementVNode("div", _hoisted_1$c, [
|
|
74533
|
+
createElementVNode("div", _hoisted_1$c, [
|
|
74534
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
74475
74535
|
(unref(searchBtn).show)
|
|
74476
74536
|
? (openBlock(), createBlock(script$F, {
|
|
74477
74537
|
key: 0,
|
|
74478
|
-
click: handleSearchClick
|
|
74479
|
-
icon: unref(search_default)
|
|
74538
|
+
click: handleSearchClick
|
|
74480
74539
|
}, {
|
|
74481
74540
|
default: withCtx(function () { return [
|
|
74482
74541
|
createTextVNode(toDisplayString(unref(searchBtn).text), 1 /* TEXT */)
|
|
74483
74542
|
]; }),
|
|
74484
74543
|
_: 1 /* STABLE */
|
|
74485
|
-
}
|
|
74544
|
+
}))
|
|
74486
74545
|
: createCommentVNode("v-if", true),
|
|
74487
74546
|
(unref(resetBtn).show)
|
|
74488
74547
|
? (openBlock(), createBlock(script$F, {
|
|
@@ -74497,7 +74556,7 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
|
|
|
74497
74556
|
_: 1 /* STABLE */
|
|
74498
74557
|
}))
|
|
74499
74558
|
: createCommentVNode("v-if", true),
|
|
74500
|
-
(__props.columns && ((
|
|
74559
|
+
(__props.columns && ((_c = __props.columns) === null || _c === void 0 ? void 0 : _c.length) > columnNum.value * 2)
|
|
74501
74560
|
? (openBlock(), createBlock(script$F, {
|
|
74502
74561
|
key: 2,
|
|
74503
74562
|
type: "default",
|
|
@@ -74521,16 +74580,29 @@ var script$j = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$h
|
|
|
74521
74580
|
}))
|
|
74522
74581
|
: createCommentVNode("v-if", true)
|
|
74523
74582
|
]),
|
|
74524
|
-
|
|
74525
|
-
(openBlock(
|
|
74526
|
-
|
|
74527
|
-
|
|
74528
|
-
|
|
74529
|
-
|
|
74530
|
-
|
|
74531
|
-
|
|
74532
|
-
|
|
74533
|
-
|
|
74583
|
+
((_d = __props.otherComponents) === null || _d === void 0 ? void 0 : _d.length)
|
|
74584
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
74585
|
+
createElementVNode("div", null, [
|
|
74586
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.otherComponents.filter(function (item) { return !item.fixed || item.fixed === 'left'; }), function (_a, index) {
|
|
74587
|
+
var render = _a.render;
|
|
74588
|
+
return (openBlock(), createBlock(unref(BaseSearchRender), {
|
|
74589
|
+
render: render,
|
|
74590
|
+
key: index
|
|
74591
|
+
}, null, 8 /* PROPS */, ["render"]));
|
|
74592
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
74593
|
+
]),
|
|
74594
|
+
createElementVNode("div", null, [
|
|
74595
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.otherComponents.filter(function (item) { return item.fixed === 'right'; }), function (_a, index) {
|
|
74596
|
+
var render = _a.render;
|
|
74597
|
+
return (openBlock(), createBlock(unref(BaseSearchRender), {
|
|
74598
|
+
render: render,
|
|
74599
|
+
key: index
|
|
74600
|
+
}, null, 8 /* PROPS */, ["render"]));
|
|
74601
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
74602
|
+
])
|
|
74603
|
+
]))
|
|
74604
|
+
: createCommentVNode("v-if", true)
|
|
74605
|
+
])
|
|
74534
74606
|
], 6 /* CLASS, STYLE */));
|
|
74535
74607
|
};
|
|
74536
74608
|
} }));
|
|
@@ -74702,28 +74774,31 @@ var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f
|
|
|
74702
74774
|
fitInputWidth: { type: Boolean, required: false },
|
|
74703
74775
|
popperAppendToBody: { type: Boolean, required: false }
|
|
74704
74776
|
}, emits: ["update:modelValue", "input"], setup: function (__props, _a) {
|
|
74705
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
74706
74777
|
var expose = _a.expose, emits = _a.emit;
|
|
74707
74778
|
var props = __props;
|
|
74708
74779
|
var BaseAutocompleteRef = ref();
|
|
74780
|
+
onMounted(function () {
|
|
74781
|
+
console.log(BaseAutocompleteRef.value, 'BaseAutocompleteRef');
|
|
74782
|
+
});
|
|
74709
74783
|
var handleInput = function (value) {
|
|
74710
74784
|
emits('update:modelValue', value);
|
|
74711
74785
|
emits('input', value);
|
|
74712
74786
|
};
|
|
74713
74787
|
expose({
|
|
74714
|
-
activated: (
|
|
74715
|
-
blur: (
|
|
74716
|
-
close: (
|
|
74717
|
-
focus: (
|
|
74718
|
-
handleSelect: (
|
|
74719
|
-
handleKeyEnter: (
|
|
74720
|
-
highlightedIndex: (
|
|
74721
|
-
highlight: (
|
|
74722
|
-
inputRef: (
|
|
74723
|
-
loading: (
|
|
74724
|
-
popperRef: (
|
|
74725
|
-
suggestions: (
|
|
74726
|
-
getData: (
|
|
74788
|
+
activated: function () { var _a; return (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.activated; },
|
|
74789
|
+
blur: function () { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.blur) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
74790
|
+
close: function () { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
74791
|
+
focus: function () { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
74792
|
+
handleSelect: function (item) { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.handleSelect) === null || _b === void 0 ? void 0 : _b.call(_a, item); },
|
|
74793
|
+
handleKeyEnter: function () { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.handleKeyEnter) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
74794
|
+
highlightedIndex: function () { var _a; return (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.highlightedIndex; },
|
|
74795
|
+
highlight: function (index) { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.highlight) === null || _b === void 0 ? void 0 : _b.call(_a, index); },
|
|
74796
|
+
inputRef: function () { var _a; return (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.inputRef; },
|
|
74797
|
+
loading: function () { var _a; return (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.loading; },
|
|
74798
|
+
popperRef: function () { var _a; return (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.popperRef; },
|
|
74799
|
+
suggestions: function () { var _a; return (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.suggestions; },
|
|
74800
|
+
getData: function (queryString) { var _a, _b; return (_b = (_a = BaseAutocompleteRef.value) === null || _a === void 0 ? void 0 : _a.getData) === null || _b === void 0 ? void 0 : _b.call(_a, queryString); },
|
|
74801
|
+
getBaseAutocompleteRef: function () { return BaseAutocompleteRef.value; }
|
|
74727
74802
|
});
|
|
74728
74803
|
return function (_ctx, _cache) {
|
|
74729
74804
|
return (openBlock(), createBlock(unref(ElAutocomplete), mergeProps({
|
|
@@ -74771,7 +74846,88 @@ script$f.__file = "packages/base/text/content.vue";
|
|
|
74771
74846
|
var BaseTextTitle = script$g;
|
|
74772
74847
|
var BaseTextContent = script$f;
|
|
74773
74848
|
|
|
74774
|
-
|
|
74849
|
+
function useResponsiveScroll() {
|
|
74850
|
+
var dialogDom = ref();
|
|
74851
|
+
var dialogBodyDom = ref();
|
|
74852
|
+
var dialogBodyContentDom = ref();
|
|
74853
|
+
var identification = ref(Date.now());
|
|
74854
|
+
var showBoxShadow = ref(false);
|
|
74855
|
+
var resizeObserver = null;
|
|
74856
|
+
/**
|
|
74857
|
+
* 滚动条是否触底
|
|
74858
|
+
* @param bodyDom
|
|
74859
|
+
* @returns
|
|
74860
|
+
*/
|
|
74861
|
+
var isScrolledToBottom = function (bodyDom) {
|
|
74862
|
+
var _a, _b;
|
|
74863
|
+
return (Math.ceil(Math.max(+bodyDom.offsetHeight, +((_b = (_a = bodyDom === null || bodyDom === void 0 ? void 0 : bodyDom.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(bodyDom)) === null || _b === void 0 ? void 0 : _b.height)) + bodyDom.scrollTop) < bodyDom.scrollHeight);
|
|
74864
|
+
};
|
|
74865
|
+
/**
|
|
74866
|
+
* 实时监测滚动,设置底部阴影
|
|
74867
|
+
*/
|
|
74868
|
+
var handleScroll = function () {
|
|
74869
|
+
showBoxShadow.value = isScrolledToBottom(dialogBodyDom.value);
|
|
74870
|
+
};
|
|
74871
|
+
/**
|
|
74872
|
+
* 检测内容高度变化,设置底部阴影
|
|
74873
|
+
*/
|
|
74874
|
+
var checkScrollHeight = function () {
|
|
74875
|
+
var _a, _b;
|
|
74876
|
+
var bodyDom = dialogBodyDom.value;
|
|
74877
|
+
// 是否有滚动条
|
|
74878
|
+
var hasScroll = Math.ceil(Math.max(+bodyDom.offsetHeight, +((_b = (_a = bodyDom === null || bodyDom === void 0 ? void 0 : bodyDom.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(bodyDom)) === null || _b === void 0 ? void 0 : _b.height))) !== bodyDom.scrollHeight;
|
|
74879
|
+
if (hasScroll) {
|
|
74880
|
+
showBoxShadow.value = isScrolledToBottom(bodyDom);
|
|
74881
|
+
if (!bodyDom.scrollListenerAdded) {
|
|
74882
|
+
bodyDom.scrollListenerAdded = true;
|
|
74883
|
+
bodyDom.addEventListener('scroll', handleScroll);
|
|
74884
|
+
}
|
|
74885
|
+
}
|
|
74886
|
+
else {
|
|
74887
|
+
showBoxShadow.value = false;
|
|
74888
|
+
bodyDom.scrollListenerAdded = false;
|
|
74889
|
+
bodyDom.removeEventListener('scroll', handleScroll);
|
|
74890
|
+
}
|
|
74891
|
+
};
|
|
74892
|
+
var clearResizeObserver = function () {
|
|
74893
|
+
var _a, _b;
|
|
74894
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
74895
|
+
resizeObserver = null;
|
|
74896
|
+
if (dialogBodyDom.value) {
|
|
74897
|
+
showBoxShadow.value = false;
|
|
74898
|
+
dialogBodyDom.value.scrollListenerAdded = false;
|
|
74899
|
+
(_b = (_a = dialogBodyDom.value).removeEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, 'scroll', handleScroll);
|
|
74900
|
+
}
|
|
74901
|
+
};
|
|
74902
|
+
var initResizeObserver = function () {
|
|
74903
|
+
clearResizeObserver();
|
|
74904
|
+
onMounted(function () {
|
|
74905
|
+
nextTick(function () {
|
|
74906
|
+
var _a, _b;
|
|
74907
|
+
var dom = document.querySelector(".base-dialog_".concat(identification.value));
|
|
74908
|
+
if (!dom)
|
|
74909
|
+
return;
|
|
74910
|
+
dialogDom.value = dom;
|
|
74911
|
+
dialogBodyDom.value = (_a = dialogDom.value) === null || _a === void 0 ? void 0 : _a.querySelector('.xrk-dialog__body');
|
|
74912
|
+
dialogBodyContentDom.value = (_b = dialogDom.value) === null || _b === void 0 ? void 0 : _b.querySelector('.xrk-dialog__body__content');
|
|
74913
|
+
resizeObserver = new ResizeObserver(checkScrollHeight);
|
|
74914
|
+
if (dialogBodyContentDom.value) {
|
|
74915
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe(dialogBodyContentDom.value);
|
|
74916
|
+
}
|
|
74917
|
+
});
|
|
74918
|
+
});
|
|
74919
|
+
};
|
|
74920
|
+
onUnmounted(function () { return clearResizeObserver(); });
|
|
74921
|
+
return {
|
|
74922
|
+
showBoxShadow: showBoxShadow,
|
|
74923
|
+
identification: identification,
|
|
74924
|
+
initResizeObserver: initResizeObserver,
|
|
74925
|
+
clearResizeObserver: clearResizeObserver
|
|
74926
|
+
};
|
|
74927
|
+
}
|
|
74928
|
+
|
|
74929
|
+
var _hoisted_1$9 = { class: "xrk-dialog__body__content" };
|
|
74930
|
+
var _hoisted_2$8 = { key: 1 };
|
|
74775
74931
|
var __default__$e = {
|
|
74776
74932
|
name: 'base-dialog'
|
|
74777
74933
|
};
|
|
@@ -74803,9 +74959,18 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74803
74959
|
var _props = __props;
|
|
74804
74960
|
var props = _props;
|
|
74805
74961
|
var slots = useSlots();
|
|
74962
|
+
var _b = useResponsiveScroll(), identification = _b.identification, showBoxShadow = _b.showBoxShadow, initResizeObserver = _b.initResizeObserver, clearResizeObserver = _b.clearResizeObserver;
|
|
74806
74963
|
var show = ref(props.modelValue || false);
|
|
74807
74964
|
watch(function () { return props.modelValue; }, function (newV) {
|
|
74808
74965
|
show.value = newV || false;
|
|
74966
|
+
if (show.value) {
|
|
74967
|
+
initResizeObserver();
|
|
74968
|
+
}
|
|
74969
|
+
else {
|
|
74970
|
+
clearResizeObserver();
|
|
74971
|
+
}
|
|
74972
|
+
}, {
|
|
74973
|
+
immediate: true
|
|
74809
74974
|
});
|
|
74810
74975
|
var BaseDialogRender = defineComponent({
|
|
74811
74976
|
name: 'dialog-render',
|
|
@@ -74835,6 +75000,7 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74835
75000
|
done();
|
|
74836
75001
|
_a.label = 3;
|
|
74837
75002
|
case 3:
|
|
75003
|
+
clearResizeObserver();
|
|
74838
75004
|
emits('close');
|
|
74839
75005
|
return [2 /*return*/];
|
|
74840
75006
|
}
|
|
@@ -74858,6 +75024,7 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74858
75024
|
show.value = false;
|
|
74859
75025
|
_a.label = 3;
|
|
74860
75026
|
case 3:
|
|
75027
|
+
clearResizeObserver();
|
|
74861
75028
|
emits('close');
|
|
74862
75029
|
return [2 /*return*/];
|
|
74863
75030
|
}
|
|
@@ -74878,6 +75045,7 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74878
75045
|
show.value = false;
|
|
74879
75046
|
_a.label = 3;
|
|
74880
75047
|
case 3:
|
|
75048
|
+
clearResizeObserver();
|
|
74881
75049
|
emits('close');
|
|
74882
75050
|
return [2 /*return*/];
|
|
74883
75051
|
}
|
|
@@ -74888,7 +75056,9 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74888
75056
|
class: normalizeClass([
|
|
74889
75057
|
__props.customClass || '',
|
|
74890
75058
|
__props.showFooter ? '' : 'hide-footer',
|
|
74891
|
-
!__props.title && !__props.titleRender && !unref(slots).header ? 'hide-title' : ''
|
|
75059
|
+
!__props.title && !__props.titleRender && !unref(slots).header ? 'hide-title' : '',
|
|
75060
|
+
"base-dialog_".concat(unref(identification)),
|
|
75061
|
+
unref(showBoxShadow) ? 'xrk-dialog-has-scrollbar' : ''
|
|
74892
75062
|
].join(' ')),
|
|
74893
75063
|
modelValue: show.value,
|
|
74894
75064
|
closeOnClickModal: __props.closeOnClickModal,
|
|
@@ -74927,7 +75097,7 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74927
75097
|
render: __props.footerRender
|
|
74928
75098
|
}, null, 8 /* PROPS */, ["render"]))
|
|
74929
75099
|
: (__props.showFooter)
|
|
74930
|
-
? (openBlock(), createElementBlock("div",
|
|
75100
|
+
? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
74931
75101
|
('show' in __props.cancelBtnConfig ? __props.cancelBtnConfig.show : true)
|
|
74932
75102
|
? (openBlock(), createBlock(unref(BaseButton), mergeProps({
|
|
74933
75103
|
key: 0,
|
|
@@ -74953,21 +75123,23 @@ var script$e = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$e
|
|
|
74953
75123
|
]; })
|
|
74954
75124
|
]; }),
|
|
74955
75125
|
default: withCtx(function () { return [
|
|
74956
|
-
|
|
74957
|
-
(
|
|
74958
|
-
|
|
74959
|
-
|
|
74960
|
-
|
|
74961
|
-
|
|
74962
|
-
|
|
74963
|
-
|
|
74964
|
-
|
|
74965
|
-
|
|
74966
|
-
|
|
74967
|
-
|
|
74968
|
-
|
|
74969
|
-
|
|
74970
|
-
|
|
75126
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
75127
|
+
renderSlot(_ctx.$slots, "default", {}, function () { return [
|
|
75128
|
+
(__props.contentRender)
|
|
75129
|
+
? (openBlock(), createBlock(unref(BaseDialogRender), {
|
|
75130
|
+
key: 0,
|
|
75131
|
+
render: __props.contentRender
|
|
75132
|
+
}, null, 8 /* PROPS */, ["render"]))
|
|
75133
|
+
: (__props.content)
|
|
75134
|
+
? (openBlock(), createBlock(unref(BaseTextContent), { key: 1 }, {
|
|
75135
|
+
default: withCtx(function () { return [
|
|
75136
|
+
createTextVNode(toDisplayString(__props.content), 1 /* TEXT */)
|
|
75137
|
+
]; }),
|
|
75138
|
+
_: 1 /* STABLE */
|
|
75139
|
+
}))
|
|
75140
|
+
: createCommentVNode("v-if", true)
|
|
75141
|
+
]; })
|
|
75142
|
+
])
|
|
74971
75143
|
]; }),
|
|
74972
75144
|
_: 3 /* FORWARDED */
|
|
74973
75145
|
}, 8 /* PROPS */, ["class", "modelValue", "closeOnClickModal", "closeOnPressEscape", "appendToBody", "destroyOnClose", "center", "align-center", "width", "showClose"]));
|
|
@@ -75055,7 +75227,7 @@ var _hoisted_5$6 = [
|
|
|
75055
75227
|
_hoisted_3$7,
|
|
75056
75228
|
_hoisted_4$6
|
|
75057
75229
|
];
|
|
75058
|
-
var _hoisted_6$
|
|
75230
|
+
var _hoisted_6$5 = {
|
|
75059
75231
|
key: 1,
|
|
75060
75232
|
width: "200px",
|
|
75061
75233
|
height: "200px",
|
|
@@ -75063,27 +75235,27 @@ var _hoisted_6$4 = {
|
|
|
75063
75235
|
version: "1.1",
|
|
75064
75236
|
xmlns: "http://www.w3.org/2000/svg"
|
|
75065
75237
|
};
|
|
75066
|
-
var _hoisted_7$
|
|
75238
|
+
var _hoisted_7$5 = /*#__PURE__*/ createElementVNode("path", {
|
|
75067
75239
|
d: "M967.111111 281.6V910.222222c0 62.862222-50.915556 113.777778-113.777778 113.777778H170.666667c-62.862222 0-113.777778-50.915556-113.777778-113.777778V113.777778c0-62.862222 50.915556-113.777778 113.777778-113.777778h514.844444L967.111111 281.6z",
|
|
75068
75240
|
fill: "#C386F0"
|
|
75069
75241
|
}, null, -1 /* HOISTED */);
|
|
75070
|
-
var _hoisted_8$
|
|
75242
|
+
var _hoisted_8$5 = /*#__PURE__*/ createElementVNode("path", {
|
|
75071
75243
|
d: "M284.444444 398.222222m42.666667 0l298.666667 0q42.666667 0 42.666666 42.666667l0 234.666667q0 42.666667-42.666666 42.666666l-298.666667 0q-42.666667 0-42.666667-42.666666l0-234.666667q0-42.666667 42.666667-42.666667Z",
|
|
75072
75244
|
fill: "#FFFFFF"
|
|
75073
75245
|
}, null, -1 /* HOISTED */);
|
|
75074
|
-
var _hoisted_9$
|
|
75246
|
+
var _hoisted_9$4 = /*#__PURE__*/ createElementVNode("path", {
|
|
75075
75247
|
d: "M738.417778 457.841778a31.971556 31.971556 0 0 1 48.014222 27.676444v154.538667c0 24.632889-26.652444 40.021333-47.985778 27.704889L684.430222 636.586667V488.96z",
|
|
75076
75248
|
fill: "#FFFFFF"
|
|
75077
75249
|
}, null, -1 /* HOISTED */);
|
|
75078
|
-
var _hoisted_10$
|
|
75250
|
+
var _hoisted_10$4 = /*#__PURE__*/ createElementVNode("path", {
|
|
75079
75251
|
d: "M685.511111 167.822222V0L967.111111 281.6H799.288889c-62.862222 0-113.777778-50.915556-113.777778-113.777778",
|
|
75080
75252
|
fill: "#A15FDE"
|
|
75081
75253
|
}, null, -1 /* HOISTED */);
|
|
75082
75254
|
var _hoisted_11$2 = [
|
|
75083
|
-
_hoisted_7$
|
|
75084
|
-
_hoisted_8$
|
|
75085
|
-
_hoisted_9$
|
|
75086
|
-
_hoisted_10$
|
|
75255
|
+
_hoisted_7$5,
|
|
75256
|
+
_hoisted_8$5,
|
|
75257
|
+
_hoisted_9$4,
|
|
75258
|
+
_hoisted_10$4
|
|
75087
75259
|
];
|
|
75088
75260
|
var _hoisted_12$2 = {
|
|
75089
75261
|
key: 2,
|
|
@@ -75340,7 +75512,7 @@ var script$d = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$d
|
|
|
75340
75512
|
(unref(isExcel))
|
|
75341
75513
|
? (openBlock(), createElementBlock("svg", _hoisted_1$8, _hoisted_5$6))
|
|
75342
75514
|
: (unref(isVideo))
|
|
75343
|
-
? (openBlock(), createElementBlock("svg", _hoisted_6$
|
|
75515
|
+
? (openBlock(), createElementBlock("svg", _hoisted_6$5, _hoisted_11$2))
|
|
75344
75516
|
: (unref(isPdf))
|
|
75345
75517
|
? (openBlock(), createElementBlock("svg", _hoisted_12$2, _hoisted_16))
|
|
75346
75518
|
: (unref(isImg))
|
|
@@ -75435,9 +75607,9 @@ XrkMessage.closeAll = function (type) {
|
|
|
75435
75607
|
ElMessage.closeAll(type);
|
|
75436
75608
|
};
|
|
75437
75609
|
|
|
75438
|
-
var _withScopeId$
|
|
75610
|
+
var _withScopeId$4 = function (n) { return (pushScopeId("data-v-75b461d5"), n = n(), popScopeId(), n); };
|
|
75439
75611
|
var _hoisted_1$7 = { class: "base-upload" };
|
|
75440
|
-
var _hoisted_2$6 = /*#__PURE__*/ _withScopeId$
|
|
75612
|
+
var _hoisted_2$6 = /*#__PURE__*/ _withScopeId$4(function () { return createElementVNode("svg", {
|
|
75441
75613
|
viewBox: "0 0 1024 1024",
|
|
75442
75614
|
xmlns: "http://www.w3.org/2000/svg"
|
|
75443
75615
|
}, [
|
|
@@ -75446,17 +75618,17 @@ var _hoisted_2$6 = /*#__PURE__*/ _withScopeId$3(function () { return createElem
|
|
|
75446
75618
|
d: "M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6H544z"
|
|
75447
75619
|
})
|
|
75448
75620
|
], -1 /* HOISTED */); });
|
|
75449
|
-
var _hoisted_3$6 = /*#__PURE__*/ _withScopeId$
|
|
75621
|
+
var _hoisted_3$6 = /*#__PURE__*/ _withScopeId$4(function () { return createElementVNode("div", { class: "xrk-upload__text" }, [
|
|
75450
75622
|
/*#__PURE__*/ createTextVNode(" 将文件拖到此处,或 "),
|
|
75451
75623
|
/*#__PURE__*/ createElementVNode("em", null, "点击上传")
|
|
75452
75624
|
], -1 /* HOISTED */); });
|
|
75453
75625
|
var _hoisted_4$5 = { class: "xrk-upload__text--right" };
|
|
75454
75626
|
var _hoisted_5$5 = { class: "c" };
|
|
75455
|
-
var _hoisted_6$
|
|
75456
|
-
var _hoisted_7$
|
|
75457
|
-
var _hoisted_8$
|
|
75458
|
-
var _hoisted_9$
|
|
75459
|
-
var _hoisted_10$
|
|
75627
|
+
var _hoisted_6$4 = ["onClick"];
|
|
75628
|
+
var _hoisted_7$4 = ["onClick"];
|
|
75629
|
+
var _hoisted_8$4 = ["src"];
|
|
75630
|
+
var _hoisted_9$3 = { class: "xrk-upload__item_img_operate" };
|
|
75631
|
+
var _hoisted_10$3 = ["onClick"];
|
|
75460
75632
|
var _hoisted_11$1 = ["onClick"];
|
|
75461
75633
|
var _hoisted_12$1 = { class: "xrk-upload__tip" };
|
|
75462
75634
|
var __default__$c = {
|
|
@@ -75818,7 +75990,7 @@ var script$c = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$c
|
|
|
75818
75990
|
]; }),
|
|
75819
75991
|
_: 1 /* STABLE */
|
|
75820
75992
|
})
|
|
75821
|
-
], 8 /* PROPS */, _hoisted_6$
|
|
75993
|
+
], 8 /* PROPS */, _hoisted_6$4))
|
|
75822
75994
|
: createCommentVNode("v-if", true),
|
|
75823
75995
|
(!__props.disabled)
|
|
75824
75996
|
? (openBlock(), createElementBlock("div", {
|
|
@@ -75835,7 +76007,7 @@ var script$c = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$c
|
|
|
75835
76007
|
]; }),
|
|
75836
76008
|
_: 1 /* STABLE */
|
|
75837
76009
|
})
|
|
75838
|
-
], 8 /* PROPS */, _hoisted_7$
|
|
76010
|
+
], 8 /* PROPS */, _hoisted_7$4))
|
|
75839
76011
|
: createCommentVNode("v-if", true)
|
|
75840
76012
|
]));
|
|
75841
76013
|
}), 128 /* KEYED_FRAGMENT */))
|
|
@@ -75849,8 +76021,8 @@ var script$c = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$c
|
|
|
75849
76021
|
createElementVNode("img", {
|
|
75850
76022
|
src: getImgUrl(item),
|
|
75851
76023
|
alt: ""
|
|
75852
|
-
}, null, 8 /* PROPS */, _hoisted_8$
|
|
75853
|
-
createElementVNode("div", _hoisted_9$
|
|
76024
|
+
}, null, 8 /* PROPS */, _hoisted_8$4),
|
|
76025
|
+
createElementVNode("div", _hoisted_9$3, [
|
|
75854
76026
|
createElementVNode("div", {
|
|
75855
76027
|
onClick: function ($event) { return (handleFilePreview(index)); }
|
|
75856
76028
|
}, [
|
|
@@ -75863,7 +76035,7 @@ var script$c = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$c
|
|
|
75863
76035
|
]; }),
|
|
75864
76036
|
_: 1 /* STABLE */
|
|
75865
76037
|
})
|
|
75866
|
-
], 8 /* PROPS */, _hoisted_10$
|
|
76038
|
+
], 8 /* PROPS */, _hoisted_10$3)
|
|
75867
76039
|
]),
|
|
75868
76040
|
(!__props.disabled)
|
|
75869
76041
|
? (openBlock(), createElementBlock("div", {
|
|
@@ -76279,7 +76451,7 @@ var addParentIds = function (_a) {
|
|
|
76279
76451
|
});
|
|
76280
76452
|
};
|
|
76281
76453
|
|
|
76282
|
-
var propsKey = 'table'; // 解决defineProps作用域问题
|
|
76454
|
+
var propsKey$1 = 'table'; // 解决defineProps作用域问题
|
|
76283
76455
|
var __default__$a = {
|
|
76284
76456
|
name: 'base-table'
|
|
76285
76457
|
};
|
|
@@ -76289,7 +76461,7 @@ var script$a = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$a
|
|
|
76289
76461
|
height: { type: [String, Number], required: false, default: '100%' },
|
|
76290
76462
|
maxHeight: { type: [String, Number], required: false },
|
|
76291
76463
|
stripe: { type: Boolean, required: false, default: false },
|
|
76292
|
-
border: { type: Boolean, required: false, default: (function () { return useGetGlobalDefaultProp(propsKey, 'border',
|
|
76464
|
+
border: { type: Boolean, required: false, default: (function () { return useGetGlobalDefaultProp(propsKey$1, 'border', true); }) },
|
|
76293
76465
|
size: { type: String, required: false, default: 'large' },
|
|
76294
76466
|
fit: { type: Boolean, required: false, default: true },
|
|
76295
76467
|
rowClassName: { type: null, required: false },
|
|
@@ -76306,7 +76478,7 @@ var script$a = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$a
|
|
|
76306
76478
|
emptyText: { type: String, required: false, default: '暂无数据' },
|
|
76307
76479
|
defaultSort: { type: Object, required: false },
|
|
76308
76480
|
useBaseClass: { type: Boolean, required: false, default: (function () {
|
|
76309
|
-
return useGetGlobalDefaultProp(propsKey, 'useBaseClass', true);
|
|
76481
|
+
return useGetGlobalDefaultProp(propsKey$1, 'useBaseClass', true);
|
|
76310
76482
|
}) },
|
|
76311
76483
|
spanMethod: { type: null, required: false },
|
|
76312
76484
|
treeProps: { type: Object, required: false },
|
|
@@ -76396,7 +76568,7 @@ var script$a = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$a
|
|
|
76396
76568
|
: (openBlock(), createBlock(unref(BaseEmpty), { key: 1 }))
|
|
76397
76569
|
]; }),
|
|
76398
76570
|
default: withCtx(function () { return [
|
|
76399
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, function (column
|
|
76571
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, function (column) {
|
|
76400
76572
|
return (openBlock(), createBlock(unref(BaseTableColumn), mergeProps({
|
|
76401
76573
|
key: column.prop,
|
|
76402
76574
|
pageAllData: __props.data,
|
|
@@ -76406,12 +76578,11 @@ var script$a = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$a
|
|
|
76406
76578
|
getSelectionRows: unref(getSelectionRows),
|
|
76407
76579
|
addSelectionRow: unref(addSelectionRow),
|
|
76408
76580
|
removeSelectionRow: unref(removeSelectionRow),
|
|
76409
|
-
clearSelectionRows: unref(clearSelectionRows)
|
|
76410
|
-
isBothEnds: !index || index === __props.columns.length - 1
|
|
76581
|
+
clearSelectionRows: unref(clearSelectionRows)
|
|
76411
76582
|
}, column, {
|
|
76412
76583
|
onSelect: handleColumnSelect,
|
|
76413
76584
|
onSelectAll: handleColumnSelectAll
|
|
76414
|
-
}), null, 16 /* FULL_PROPS */, ["pageAllData", "treeProps", "selectionIds", "selectionRows", "getSelectionRows", "addSelectionRow", "removeSelectionRow", "clearSelectionRows"
|
|
76585
|
+
}), null, 16 /* FULL_PROPS */, ["pageAllData", "treeProps", "selectionIds", "selectionRows", "getSelectionRows", "addSelectionRow", "removeSelectionRow", "clearSelectionRows"]));
|
|
76415
76586
|
}), 128 /* KEYED_FRAGMENT */))
|
|
76416
76587
|
]; }),
|
|
76417
76588
|
_: 1 /* STABLE */
|
|
@@ -76423,6 +76594,7 @@ script$a.__scopeId = "data-v-968a9a5a";
|
|
|
76423
76594
|
script$a.__file = "packages/base/table/table.vue";
|
|
76424
76595
|
|
|
76425
76596
|
var _hoisted_1$6 = ["onClick"];
|
|
76597
|
+
var propsKey = 'table-column'; // 解决defineProps作用域问题
|
|
76426
76598
|
var __default__$9 = {
|
|
76427
76599
|
name: 'base-table-column'
|
|
76428
76600
|
};
|
|
@@ -76434,7 +76606,7 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
76434
76606
|
label: { type: String, required: false },
|
|
76435
76607
|
columnKey: { type: String, required: false },
|
|
76436
76608
|
width: { type: [String, Number], required: false },
|
|
76437
|
-
minWidth: { type: [String, Number], required: false },
|
|
76609
|
+
minWidth: { type: [String, Number], required: false, default: useGetGlobalDefaultProp(propsKey, 'minWidth', 150) },
|
|
76438
76610
|
fixed: { type: [Boolean, String], required: false },
|
|
76439
76611
|
sortable: { type: [Boolean, String], required: false },
|
|
76440
76612
|
sortMethod: { type: Function, required: false },
|
|
@@ -76446,12 +76618,13 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
76446
76618
|
className: { type: String, required: false },
|
|
76447
76619
|
labelClassName: { type: String, required: false },
|
|
76448
76620
|
children: { type: Array, required: false },
|
|
76449
|
-
isBothEnds: { type: Boolean, required: false },
|
|
76450
76621
|
renderHeader: { type: Function, required: false },
|
|
76451
76622
|
renderHeaderSelectionLabel: { type: Function, required: false },
|
|
76452
76623
|
formatter: { type: Function, required: false, default: function (_a) {
|
|
76453
76624
|
var cellValue = _a.cellValue;
|
|
76454
|
-
|
|
76625
|
+
if (cellValue || cellValue === 0)
|
|
76626
|
+
return cellValue;
|
|
76627
|
+
return '-';
|
|
76455
76628
|
} },
|
|
76456
76629
|
render: { type: Function, required: false },
|
|
76457
76630
|
selectionDisabled: { type: [Function, Boolean], required: false },
|
|
@@ -76479,10 +76652,17 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
76479
76652
|
var childrenKey = ((_b = props === null || props === void 0 ? void 0 : props.treeProps) === null || _b === void 0 ? void 0 : _b.children) || 'children';
|
|
76480
76653
|
var _selectionAllLoading = ref(false);
|
|
76481
76654
|
var _selectionRowLoading = ref(false);
|
|
76655
|
+
var getFixed = computed(function () {
|
|
76656
|
+
if (props === null || props === void 0 ? void 0 : props.type)
|
|
76657
|
+
return (props === null || props === void 0 ? void 0 : props.fixed) || 'left';
|
|
76658
|
+
if ((props === null || props === void 0 ? void 0 : props.label) === '操作')
|
|
76659
|
+
return (props === null || props === void 0 ? void 0 : props.fixed) || 'right';
|
|
76660
|
+
return props === null || props === void 0 ? void 0 : props.fixed;
|
|
76661
|
+
});
|
|
76482
76662
|
var getAlign = computed(function () {
|
|
76483
|
-
if ((props === null || props === void 0 ? void 0 : props.
|
|
76663
|
+
if ((props === null || props === void 0 ? void 0 : props.type) || (props === null || props === void 0 ? void 0 : props.label) === '操作')
|
|
76484
76664
|
return (props === null || props === void 0 ? void 0 : props.align) || 'center';
|
|
76485
|
-
return (props === null || props === void 0 ? void 0 : props.align) || '
|
|
76665
|
+
return (props === null || props === void 0 ? void 0 : props.align) || useGetGlobalDefaultProp(propsKey, 'align', 'center');
|
|
76486
76666
|
});
|
|
76487
76667
|
var BaseTableColumnHeaderSelectionLabelRender = defineComponent({
|
|
76488
76668
|
name: 'table-column-header-selection-label-render',
|
|
@@ -76762,7 +76942,7 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
76762
76942
|
columnKey: __props.columnKey,
|
|
76763
76943
|
width: __props.width,
|
|
76764
76944
|
minWidth: __props.minWidth,
|
|
76765
|
-
fixed:
|
|
76945
|
+
fixed: unref(getFixed),
|
|
76766
76946
|
sortable: __props.sortable,
|
|
76767
76947
|
sortMethod: __props.sortMethod,
|
|
76768
76948
|
sortBy: __props.sortBy,
|
|
@@ -76857,17 +77037,49 @@ script$9.__scopeId = "data-v-2a64ae40";
|
|
|
76857
77037
|
script$9.__file = "packages/base/table/table-column.vue";
|
|
76858
77038
|
|
|
76859
77039
|
var useTableColumn$1 = function (props) {
|
|
76860
|
-
return __assign({ minWidth: '
|
|
77040
|
+
return __assign({ minWidth: useGetGlobalDefaultProp('table-column', 'minWidth', 150), width: props.type === 'index' ? '90px' : '' }, props);
|
|
76861
77041
|
};
|
|
76862
77042
|
|
|
76863
77043
|
var BaseTable = script$a;
|
|
76864
77044
|
var BaseTableColumn = script$9;
|
|
76865
77045
|
var useTableColumn = useTableColumn$1;
|
|
76866
77046
|
|
|
77047
|
+
var useResponsiveHeight = function (config) {
|
|
77048
|
+
var resizeObserver = null;
|
|
77049
|
+
var identification = config.identification;
|
|
77050
|
+
var updateHieght = function () {
|
|
77051
|
+
clearResizeObserver();
|
|
77052
|
+
var header = document.querySelector(".xrk-table-content_".concat(identification, " .xrk-table__header thead tr"));
|
|
77053
|
+
var rows = document.querySelectorAll(".xrk-table-content_".concat(identification, " .xrk-table__body tbody tr"));
|
|
77054
|
+
var headerHeight = Math.max(0, ((header === null || header === void 0 ? void 0 : header.offsetHeight) || 0) - 1);
|
|
77055
|
+
var rowsHeight = Array.from(rows || []).reduce(function (total, row) { return total + Math.max(0, (row === null || row === void 0 ? void 0 : row.offsetHeight) || 0); }, 0);
|
|
77056
|
+
var baseHeight = Math.max(0, headerHeight + rowsHeight);
|
|
77057
|
+
config.minHeight.value = Math.min(baseHeight, 200) + 'px';
|
|
77058
|
+
};
|
|
77059
|
+
var setResizeObserver = function () {
|
|
77060
|
+
clearResizeObserver();
|
|
77061
|
+
nextTick(function () {
|
|
77062
|
+
resizeObserver = new ResizeObserver(updateHieght);
|
|
77063
|
+
var dom = document.querySelector(".xrk-table-content_".concat(identification));
|
|
77064
|
+
if (dom)
|
|
77065
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe(dom);
|
|
77066
|
+
});
|
|
77067
|
+
};
|
|
77068
|
+
var clearResizeObserver = function () {
|
|
77069
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
77070
|
+
resizeObserver = null;
|
|
77071
|
+
};
|
|
77072
|
+
setResizeObserver();
|
|
77073
|
+
onUnmounted(function () {
|
|
77074
|
+
clearResizeObserver();
|
|
77075
|
+
});
|
|
77076
|
+
};
|
|
77077
|
+
|
|
76867
77078
|
var useTable = function (config) {
|
|
76868
77079
|
var pageIsLoading = ref(false);
|
|
76869
77080
|
var pageAllData = ref([]);
|
|
76870
77081
|
var paginationTotal = ref(0);
|
|
77082
|
+
var currentParams = ref({});
|
|
76871
77083
|
var getList = function (query) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76872
77084
|
var res, error_1;
|
|
76873
77085
|
var _a, _b, _c, _d;
|
|
@@ -76881,12 +77093,14 @@ var useTable = function (config) {
|
|
|
76881
77093
|
case 1:
|
|
76882
77094
|
_e.trys.push([1, 4, , 5]);
|
|
76883
77095
|
if (!isFunction(config.getListAjax)) return [3 /*break*/, 3];
|
|
77096
|
+
currentParams.value = query;
|
|
76884
77097
|
return [4 /*yield*/, config.getListAjax(query)];
|
|
76885
77098
|
case 2:
|
|
76886
77099
|
res = _e.sent();
|
|
76887
77100
|
pageAllData.value = res.data.list;
|
|
76888
77101
|
paginationTotal.value =
|
|
76889
77102
|
(_d = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.total) !== null && _b !== void 0 ? _b : ((_c = res.data) === null || _c === void 0 ? void 0 : _c.pages) * (config === null || config === void 0 ? void 0 : config.pageSize)) !== null && _d !== void 0 ? _d : 0;
|
|
77103
|
+
useResponsiveHeight(config);
|
|
76890
77104
|
_e.label = 3;
|
|
76891
77105
|
case 3: return [3 /*break*/, 5];
|
|
76892
77106
|
case 4:
|
|
@@ -76903,7 +77117,8 @@ var useTable = function (config) {
|
|
|
76903
77117
|
pageIsLoading: pageIsLoading,
|
|
76904
77118
|
pageAllData: pageAllData,
|
|
76905
77119
|
paginationTotal: paginationTotal,
|
|
76906
|
-
getList: getList
|
|
77120
|
+
getList: getList,
|
|
77121
|
+
currentParams: currentParams
|
|
76907
77122
|
};
|
|
76908
77123
|
};
|
|
76909
77124
|
|
|
@@ -76931,10 +77146,10 @@ var script$8 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$8
|
|
|
76931
77146
|
script$8.__scopeId = "data-v-4fbb1d70";
|
|
76932
77147
|
script$8.__file = "packages/base/layout/flex-content.vue";
|
|
76933
77148
|
|
|
76934
|
-
var _withScopeId$
|
|
77149
|
+
var _withScopeId$3 = function (n) { return (pushScopeId("data-v-cbf300d0"), n = n(), popScopeId(), n); };
|
|
76935
77150
|
var _hoisted_1$5 = { class: "base-layout-header" };
|
|
76936
77151
|
var _hoisted_2$5 = { class: "left" };
|
|
76937
|
-
var _hoisted_3$5 = /*#__PURE__*/ _withScopeId$
|
|
77152
|
+
var _hoisted_3$5 = /*#__PURE__*/ _withScopeId$3(function () { return createElementVNode("svg", {
|
|
76938
77153
|
xmlns: "http://www.w3.org/2000/svg",
|
|
76939
77154
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
76940
77155
|
fill: "none",
|
|
@@ -76990,7 +77205,10 @@ var script$7 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$7
|
|
|
76990
77205
|
(unref(slots).headerLeftName)
|
|
76991
77206
|
? (openBlock(), createBlock(resolveDynamicComponent(unref(slots).headerLeftName), { key: 0 }))
|
|
76992
77207
|
: (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(__props.appName), 1 /* TEXT */))
|
|
76993
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
77208
|
+
], 64 /* STABLE_FRAGMENT */)),
|
|
77209
|
+
(unref(slots).topMenus)
|
|
77210
|
+
? (openBlock(), createBlock(resolveDynamicComponent(unref(slots).topMenus), { key: 2 }))
|
|
77211
|
+
: createCommentVNode("v-if", true)
|
|
76994
77212
|
]),
|
|
76995
77213
|
createElementVNode("div", _hoisted_5$4, [
|
|
76996
77214
|
(unref(slots).headerRight)
|
|
@@ -77087,16 +77305,16 @@ var script$5 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$5
|
|
|
77087
77305
|
script$5.__scopeId = "data-v-b5383626";
|
|
77088
77306
|
script$5.__file = "packages/base/layout/body.vue";
|
|
77089
77307
|
|
|
77090
|
-
var _withScopeId$
|
|
77308
|
+
var _withScopeId$2 = function (n) { return (pushScopeId("data-v-1bea9a2a"), n = n(), popScopeId(), n); };
|
|
77091
77309
|
var _hoisted_1$3 = { class: "main-menu" };
|
|
77092
77310
|
var _hoisted_2$3 = ["name"];
|
|
77093
77311
|
var _hoisted_3$3 = ["src"];
|
|
77094
77312
|
var _hoisted_4$3 = ["onClick", "name", "onMouseenter"];
|
|
77095
77313
|
var _hoisted_5$3 = ["onClick"];
|
|
77096
|
-
var _hoisted_6$
|
|
77097
|
-
var _hoisted_7$
|
|
77098
|
-
var _hoisted_8$
|
|
77099
|
-
var _hoisted_9$
|
|
77314
|
+
var _hoisted_6$3 = ["id"];
|
|
77315
|
+
var _hoisted_7$3 = ["name"];
|
|
77316
|
+
var _hoisted_8$3 = ["src"];
|
|
77317
|
+
var _hoisted_9$2 = /*#__PURE__*/ _withScopeId$2(function () { return createElementVNode("i", { class: "xrk-icon xrk-collapse-item__arrow" }, [
|
|
77100
77318
|
/*#__PURE__*/ createElementVNode("svg", {
|
|
77101
77319
|
xmlns: "http://www.w3.org/2000/svg",
|
|
77102
77320
|
viewBox: "0 0 1024 1024"
|
|
@@ -77107,7 +77325,7 @@ var _hoisted_9$1 = /*#__PURE__*/ _withScopeId$1(function () { return createElem
|
|
|
77107
77325
|
})
|
|
77108
77326
|
])
|
|
77109
77327
|
], -1 /* HOISTED */); });
|
|
77110
|
-
var _hoisted_10$
|
|
77328
|
+
var _hoisted_10$2 = { class: "content" };
|
|
77111
77329
|
var _hoisted_11 = ["onClick"];
|
|
77112
77330
|
var _hoisted_12 = ["onClick"];
|
|
77113
77331
|
var __default__$4 = {
|
|
@@ -77257,12 +77475,12 @@ var script$4 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$4
|
|
|
77257
77475
|
? (openBlock(), createElementBlock("img", {
|
|
77258
77476
|
key: 0,
|
|
77259
77477
|
src: menu.icon
|
|
77260
|
-
}, null, 8 /* PROPS */, _hoisted_8$
|
|
77478
|
+
}, null, 8 /* PROPS */, _hoisted_8$3))
|
|
77261
77479
|
: createCommentVNode("v-if", true),
|
|
77262
77480
|
createElementVNode("span", null, toDisplayString(menu.name), 1 /* TEXT */)
|
|
77263
|
-
], 8 /* PROPS */, _hoisted_7$
|
|
77264
|
-
_hoisted_9$
|
|
77265
|
-
], 10 /* CLASS, PROPS */, _hoisted_6$
|
|
77481
|
+
], 8 /* PROPS */, _hoisted_7$3),
|
|
77482
|
+
_hoisted_9$2
|
|
77483
|
+
], 10 /* CLASS, PROPS */, _hoisted_6$3)
|
|
77266
77484
|
], 8 /* PROPS */, _hoisted_5$3))
|
|
77267
77485
|
], 64 /* STABLE_FRAGMENT */));
|
|
77268
77486
|
}), 128 /* KEYED_FRAGMENT */))
|
|
@@ -77275,7 +77493,7 @@ var script$4 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$4
|
|
|
77275
77493
|
onMouseenter: _cache[1] || (_cache[1] = function () { return unref(onMouseEnterSubMenu)(); }),
|
|
77276
77494
|
onMouseleave: _cache[2] || (_cache[2] = function () { return unref(onMouseLeaveSubMenu)(); })
|
|
77277
77495
|
}, [
|
|
77278
|
-
createElementVNode("div", _hoisted_10$
|
|
77496
|
+
createElementVNode("div", _hoisted_10$2, [
|
|
77279
77497
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(activeSubMenu).menuList || [], function (item) {
|
|
77280
77498
|
return (openBlock(), createElementBlock("div", {
|
|
77281
77499
|
class: "menu",
|
|
@@ -77310,16 +77528,17 @@ var _hoisted_2$2 = ["name", "onClick"];
|
|
|
77310
77528
|
var _hoisted_3$2 = ["src"];
|
|
77311
77529
|
var _hoisted_4$2 = { key: 0 };
|
|
77312
77530
|
var _hoisted_5$2 = ["onClick"];
|
|
77313
|
-
var _hoisted_6$
|
|
77314
|
-
var _hoisted_7$
|
|
77315
|
-
var _hoisted_8$
|
|
77531
|
+
var _hoisted_6$2 = ["id"];
|
|
77532
|
+
var _hoisted_7$2 = ["name"];
|
|
77533
|
+
var _hoisted_8$2 = ["src"];
|
|
77316
77534
|
var __default__$3 = {
|
|
77317
77535
|
name: 'base-layout-menu'
|
|
77318
77536
|
};
|
|
77319
77537
|
var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3), { props: {
|
|
77320
77538
|
menus: { type: [Array, null], required: true },
|
|
77321
77539
|
menusMap: { type: Map, required: true },
|
|
77322
|
-
level: { type: Number, required: false, default: 0 }
|
|
77540
|
+
level: { type: Number, required: false, default: 0 },
|
|
77541
|
+
menuType: { type: String, required: true }
|
|
77323
77542
|
}, emits: ["menuClick"], setup: function (__props, _a) {
|
|
77324
77543
|
var emits = _a.emit;
|
|
77325
77544
|
var props = __props;
|
|
@@ -77327,7 +77546,12 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77327
77546
|
var menuClassName = 'menu-name-one';
|
|
77328
77547
|
var menusRef = ref();
|
|
77329
77548
|
var activeMenus = ref([]);
|
|
77549
|
+
var activeCollapse = ref('');
|
|
77330
77550
|
var _menus = ref([]);
|
|
77551
|
+
var showIcon = function (menu) {
|
|
77552
|
+
var num = props.menuType === 'horizontal' ? 1 : 0;
|
|
77553
|
+
return props.level === num && menu.icon;
|
|
77554
|
+
};
|
|
77331
77555
|
var paddingLeft = computed(function () {
|
|
77332
77556
|
if (props.level === 0)
|
|
77333
77557
|
return (props.level + 1) * 12 + 'px';
|
|
@@ -77347,6 +77571,8 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77347
77571
|
// 优先使用meta.parentPath,这种参数路由不会注册到menu中,例如详情页面。如果有该值则使用父级path。
|
|
77348
77572
|
activeMenus.value =
|
|
77349
77573
|
props.menusMap.get(((_d = _route === null || _route === void 0 ? void 0 : _route.meta) === null || _d === void 0 ? void 0 : _d.parentPath) || (_route === null || _route === void 0 ? void 0 : _route.path)) || [];
|
|
77574
|
+
activeCollapse.value =
|
|
77575
|
+
activeMenus.value[props.menuType === 'vertical' ? props.level : props.level + 1];
|
|
77350
77576
|
};
|
|
77351
77577
|
watch(function () { var _a, _b, _c; return (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.$route; }, function () {
|
|
77352
77578
|
onHashChange();
|
|
@@ -77355,12 +77581,17 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77355
77581
|
var _copyNewMenus = JSON.parse(JSON.stringify(newMenus));
|
|
77356
77582
|
_menus.value = _copyNewMenus;
|
|
77357
77583
|
onHashChange();
|
|
77358
|
-
nextTick(
|
|
77359
|
-
|
|
77360
|
-
|
|
77361
|
-
|
|
77362
|
-
|
|
77363
|
-
}
|
|
77584
|
+
// nextTick(() => {
|
|
77585
|
+
// menusRef.value?.scrollTo({
|
|
77586
|
+
// top:
|
|
77587
|
+
// Reflect.get(
|
|
77588
|
+
// document.querySelector(
|
|
77589
|
+
// `.${menuClassName}[name="${activeMenus.value[0]}"]`
|
|
77590
|
+
// ) || {},
|
|
77591
|
+
// 'offsetTop'
|
|
77592
|
+
// ) || 0
|
|
77593
|
+
// });
|
|
77594
|
+
// });
|
|
77364
77595
|
}, { immediate: true });
|
|
77365
77596
|
return function (_ctx, _cache) {
|
|
77366
77597
|
var _component_base_layout_menu = resolveComponent("base-layout-menu");
|
|
@@ -77372,7 +77603,8 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77372
77603
|
createElementVNode("div", _hoisted_1$2, [
|
|
77373
77604
|
createVNode(unref(ElCollapse), {
|
|
77374
77605
|
style: { "--xrk-collapse-border-color": "transparent" },
|
|
77375
|
-
|
|
77606
|
+
modelValue: activeCollapse.value,
|
|
77607
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return ((activeCollapse).value = $event); }),
|
|
77376
77608
|
accordion: ""
|
|
77377
77609
|
}, {
|
|
77378
77610
|
default: withCtx(function () { return [
|
|
@@ -77393,7 +77625,7 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77393
77625
|
name: menu.url,
|
|
77394
77626
|
onClick: function ($event) { return (onMenuClick(menu)); }
|
|
77395
77627
|
}, [
|
|
77396
|
-
(
|
|
77628
|
+
(showIcon(menu))
|
|
77397
77629
|
? (openBlock(), createElementBlock("img", {
|
|
77398
77630
|
key: 0,
|
|
77399
77631
|
src: menu.icon
|
|
@@ -77408,11 +77640,12 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77408
77640
|
(checkHasChild(menu))
|
|
77409
77641
|
? (openBlock(), createBlock(_component_base_layout_menu, {
|
|
77410
77642
|
key: 0,
|
|
77643
|
+
menuType: __props.menuType,
|
|
77411
77644
|
menus: menu.menuList,
|
|
77412
77645
|
menusMap: __props.menusMap,
|
|
77413
77646
|
level: __props.level + 1,
|
|
77414
77647
|
onMenuClick: function (menu) { return emits('menuClick', menu); }
|
|
77415
|
-
}, null, 8 /* PROPS */, ["menus", "menusMap", "level", "onMenuClick"]))
|
|
77648
|
+
}, null, 8 /* PROPS */, ["menuType", "menus", "menusMap", "level", "onMenuClick"]))
|
|
77416
77649
|
: createCommentVNode("v-if", true)
|
|
77417
77650
|
]))
|
|
77418
77651
|
: createCommentVNode("v-if", true)
|
|
@@ -77437,21 +77670,21 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77437
77670
|
class: normalizeClass(menuClassName),
|
|
77438
77671
|
name: menu.name
|
|
77439
77672
|
}, [
|
|
77440
|
-
(
|
|
77673
|
+
(showIcon(menu))
|
|
77441
77674
|
? (openBlock(), createElementBlock("img", {
|
|
77442
77675
|
key: 0,
|
|
77443
77676
|
src: menu.icon
|
|
77444
|
-
}, null, 8 /* PROPS */, _hoisted_8$
|
|
77677
|
+
}, null, 8 /* PROPS */, _hoisted_8$2))
|
|
77445
77678
|
: createCommentVNode("v-if", true),
|
|
77446
77679
|
createElementVNode("span", null, toDisplayString(menu.name), 1 /* TEXT */)
|
|
77447
|
-
], 12 /* STYLE, PROPS */, _hoisted_7$
|
|
77448
|
-
], 10 /* CLASS, PROPS */, _hoisted_6$
|
|
77680
|
+
], 12 /* STYLE, PROPS */, _hoisted_7$2)
|
|
77681
|
+
], 10 /* CLASS, PROPS */, _hoisted_6$2)
|
|
77449
77682
|
], 8 /* PROPS */, _hoisted_5$2))
|
|
77450
77683
|
], 64 /* STABLE_FRAGMENT */));
|
|
77451
77684
|
}), 128 /* KEYED_FRAGMENT */))
|
|
77452
77685
|
]; }),
|
|
77453
77686
|
_: 1 /* STABLE */
|
|
77454
|
-
}, 8 /* PROPS */, ["
|
|
77687
|
+
}, 8 /* PROPS */, ["modelValue"])
|
|
77455
77688
|
])
|
|
77456
77689
|
], 512 /* NEED_PATCH */));
|
|
77457
77690
|
};
|
|
@@ -77460,14 +77693,25 @@ var script$3 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$3
|
|
|
77460
77693
|
script$3.__scopeId = "data-v-cbc34618";
|
|
77461
77694
|
script$3.__file = "packages/base/layout/menu-fold.vue";
|
|
77462
77695
|
|
|
77696
|
+
var _withScopeId$1 = function (n) { return (pushScopeId("data-v-3f66cd84"), n = n(), popScopeId(), n); };
|
|
77463
77697
|
var _hoisted_1$1 = { class: "base-layout-main" };
|
|
77464
|
-
var _hoisted_2$1 = {
|
|
77698
|
+
var _hoisted_2$1 = { class: "menu-top" };
|
|
77699
|
+
var _hoisted_3$1 = {
|
|
77465
77700
|
key: 1,
|
|
77466
77701
|
class: "menu-top"
|
|
77467
77702
|
};
|
|
77468
|
-
var _hoisted_3$1 = { style: { "display": "flex", "width": "fit-content" } };
|
|
77469
77703
|
var _hoisted_4$1 = ["onClick"];
|
|
77470
|
-
var _hoisted_5$1 = {
|
|
77704
|
+
var _hoisted_5$1 = {
|
|
77705
|
+
key: 0,
|
|
77706
|
+
class: "active-line"
|
|
77707
|
+
};
|
|
77708
|
+
var _hoisted_6$1 = /*#__PURE__*/ _withScopeId$1(function () { return createElementVNode("p", null, null, -1 /* HOISTED */); });
|
|
77709
|
+
var _hoisted_7$1 = [
|
|
77710
|
+
_hoisted_6$1
|
|
77711
|
+
];
|
|
77712
|
+
var _hoisted_8$1 = { key: 0 };
|
|
77713
|
+
var _hoisted_9$1 = /*#__PURE__*/ createTextVNode("更多");
|
|
77714
|
+
var _hoisted_10$1 = { class: "content" };
|
|
77471
77715
|
var __default__$2 = {
|
|
77472
77716
|
name: 'base-layout-main'
|
|
77473
77717
|
};
|
|
@@ -77494,17 +77738,51 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77494
77738
|
}
|
|
77495
77739
|
return !props.hideMenu;
|
|
77496
77740
|
});
|
|
77741
|
+
var menuRoot = computed(function () {
|
|
77742
|
+
var menuData = menuBase.value.filter(function (item) { return !(item === null || item === void 0 ? void 0 : item._hide); });
|
|
77743
|
+
if (!isSimpleNum.value)
|
|
77744
|
+
return menuData;
|
|
77745
|
+
return menuData.splice(0, isSimpleNum.value);
|
|
77746
|
+
});
|
|
77747
|
+
var isSimpleNum = ref(null);
|
|
77748
|
+
var handleResize = function () {
|
|
77749
|
+
var width = window.innerWidth;
|
|
77750
|
+
if (width <= 1000) {
|
|
77751
|
+
isSimpleNum.value = 3;
|
|
77752
|
+
}
|
|
77753
|
+
else if (width <= 1100) {
|
|
77754
|
+
isSimpleNum.value = 5;
|
|
77755
|
+
}
|
|
77756
|
+
else if (width <= 1200) {
|
|
77757
|
+
isSimpleNum.value = 6;
|
|
77758
|
+
}
|
|
77759
|
+
else if (width <= 1300) {
|
|
77760
|
+
isSimpleNum.value = 8;
|
|
77761
|
+
}
|
|
77762
|
+
else {
|
|
77763
|
+
isSimpleNum.value = null;
|
|
77764
|
+
}
|
|
77765
|
+
};
|
|
77766
|
+
onMounted(function () {
|
|
77767
|
+
if (props.menuType === 'horizontal') {
|
|
77768
|
+
handleResize();
|
|
77769
|
+
window.addEventListener('resize', handleResize);
|
|
77770
|
+
}
|
|
77771
|
+
});
|
|
77772
|
+
onUnmounted(function () {
|
|
77773
|
+
window.removeEventListener('resize', handleResize);
|
|
77774
|
+
});
|
|
77497
77775
|
var dateNow = Date.now();
|
|
77498
|
-
var menusMap = new Map();
|
|
77776
|
+
var menusMap = ref(new Map());
|
|
77499
77777
|
var currentMenu = ref();
|
|
77500
77778
|
var menuBase = computed(function () {
|
|
77501
77779
|
var menuArr = props.menus.map(function (menu, index) {
|
|
77502
77780
|
return __assign(__assign({}, menu), { menuKey: (menu === null || menu === void 0 ? void 0 : menu.menuKey) || index + dateNow, url: (menu === null || menu === void 0 ? void 0 : menu.url) || index + dateNow });
|
|
77503
77781
|
});
|
|
77504
|
-
setMenuMap(menuArr, menusMap);
|
|
77782
|
+
setMenuMap(menuArr, menusMap.value);
|
|
77505
77783
|
return menuArr;
|
|
77506
77784
|
});
|
|
77507
|
-
setMenuMap(menuBase.value, menusMap);
|
|
77785
|
+
setMenuMap(menuBase.value, menusMap.value);
|
|
77508
77786
|
var onMenuClick = function (menu) {
|
|
77509
77787
|
var _a, _b, _c, _d;
|
|
77510
77788
|
currentMenu.value = menu;
|
|
@@ -77521,7 +77799,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77521
77799
|
var _route_1 = (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.$route;
|
|
77522
77800
|
currentMenu.value = menuBase.value.find(function (item) {
|
|
77523
77801
|
var _a;
|
|
77524
|
-
var arr = menusMap.get(((_a = _route_1 === null || _route_1 === void 0 ? void 0 : _route_1.meta) === null || _a === void 0 ? void 0 : _a.parentPath) || (_route_1 === null || _route_1 === void 0 ? void 0 : _route_1.path)) || [];
|
|
77802
|
+
var arr = menusMap.value.get(((_a = _route_1 === null || _route_1 === void 0 ? void 0 : _route_1.meta) === null || _a === void 0 ? void 0 : _a.parentPath) || (_route_1 === null || _route_1 === void 0 ? void 0 : _route_1.path)) || [];
|
|
77525
77803
|
return arr.includes(item.url);
|
|
77526
77804
|
});
|
|
77527
77805
|
menuList.value = ((_d = currentMenu.value) === null || _d === void 0 ? void 0 : _d.menuList) || [];
|
|
@@ -77547,7 +77825,6 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77547
77825
|
}
|
|
77548
77826
|
});
|
|
77549
77827
|
return function (_ctx, _cache) {
|
|
77550
|
-
var _a;
|
|
77551
77828
|
return (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
77552
77829
|
(!__props.hideHeader)
|
|
77553
77830
|
? (openBlock(), createBlock(unref(BaseLayoutHeader), {
|
|
@@ -77571,6 +77848,89 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77571
77848
|
]; })
|
|
77572
77849
|
}
|
|
77573
77850
|
: undefined,
|
|
77851
|
+
(__props.menuType === 'horizontal')
|
|
77852
|
+
? {
|
|
77853
|
+
name: "topMenus",
|
|
77854
|
+
fn: withCtx(function () {
|
|
77855
|
+
var _a;
|
|
77856
|
+
return [
|
|
77857
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
77858
|
+
((_a = __props.renderMenuTop) === null || _a === void 0 ? void 0 : _a.call(__props, {
|
|
77859
|
+
currentMenu: currentMenu.value,
|
|
77860
|
+
menus: unref(menuBase)
|
|
77861
|
+
}))
|
|
77862
|
+
? (openBlock(), createBlock(unref(MenuTopRender), { key: 0 }))
|
|
77863
|
+
: (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
77864
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menuRoot), function (menu) {
|
|
77865
|
+
var _a, _b;
|
|
77866
|
+
return (openBlock(), createElementBlock("div", {
|
|
77867
|
+
class: "menu-top-item",
|
|
77868
|
+
key: menu.menuKey,
|
|
77869
|
+
onClick: function ($event) { return (onMenuClick(menu)); }
|
|
77870
|
+
}, [
|
|
77871
|
+
createElementVNode("span", {
|
|
77872
|
+
class: normalizeClass({
|
|
77873
|
+
'active-title': ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuKey) === menu.menuKey
|
|
77874
|
+
})
|
|
77875
|
+
}, toDisplayString(menu.name), 3 /* TEXT, CLASS */),
|
|
77876
|
+
(((_b = currentMenu.value) === null || _b === void 0 ? void 0 : _b.menuKey) === menu.menuKey)
|
|
77877
|
+
? (openBlock(), createElementBlock("div", _hoisted_5$1, _hoisted_7$1))
|
|
77878
|
+
: createCommentVNode("v-if", true)
|
|
77879
|
+
], 8 /* PROPS */, _hoisted_4$1));
|
|
77880
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
77881
|
+
(isSimpleNum.value)
|
|
77882
|
+
? (openBlock(), createElementBlock("div", _hoisted_8$1, [
|
|
77883
|
+
createVNode(unref(ElDropdown), null, {
|
|
77884
|
+
dropdown: withCtx(function () { return [
|
|
77885
|
+
createVNode(unref(ElDropdownMenu), null, {
|
|
77886
|
+
default: withCtx(function () { return [
|
|
77887
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menuBase)
|
|
77888
|
+
.filter(function (item) { return !(item === null || item === void 0 ? void 0 : item._hide); })
|
|
77889
|
+
.splice(isSimpleNum.value, unref(menuBase).length), function (menu) {
|
|
77890
|
+
return (openBlock(), createBlock(unref(ElDropdownItem), {
|
|
77891
|
+
key: menu.menuKey,
|
|
77892
|
+
onClick: function ($event) { return (onMenuClick(menu)); }
|
|
77893
|
+
}, {
|
|
77894
|
+
default: withCtx(function () {
|
|
77895
|
+
var _a;
|
|
77896
|
+
return [
|
|
77897
|
+
createElementVNode("span", {
|
|
77898
|
+
style: normalizeStyle({
|
|
77899
|
+
color: ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuKey) === menu.menuKey
|
|
77900
|
+
? '#fa8100'
|
|
77901
|
+
: ''
|
|
77902
|
+
})
|
|
77903
|
+
}, toDisplayString(menu.name), 5 /* TEXT, STYLE */)
|
|
77904
|
+
];
|
|
77905
|
+
}),
|
|
77906
|
+
_: 2 /* DYNAMIC */
|
|
77907
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]));
|
|
77908
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
77909
|
+
]; }),
|
|
77910
|
+
_: 1 /* STABLE */
|
|
77911
|
+
})
|
|
77912
|
+
]; }),
|
|
77913
|
+
default: withCtx(function () { return [
|
|
77914
|
+
createVNode(unref(BaseButton), {
|
|
77915
|
+
link: "",
|
|
77916
|
+
type: "primary2"
|
|
77917
|
+
}, {
|
|
77918
|
+
default: withCtx(function () { return [
|
|
77919
|
+
_hoisted_9$1
|
|
77920
|
+
]; }),
|
|
77921
|
+
_: 1 /* STABLE */
|
|
77922
|
+
})
|
|
77923
|
+
]; }),
|
|
77924
|
+
_: 1 /* STABLE */
|
|
77925
|
+
})
|
|
77926
|
+
]))
|
|
77927
|
+
: createCommentVNode("v-if", true)
|
|
77928
|
+
]))
|
|
77929
|
+
])
|
|
77930
|
+
];
|
|
77931
|
+
})
|
|
77932
|
+
}
|
|
77933
|
+
: undefined,
|
|
77574
77934
|
(unref(slots).headerRight)
|
|
77575
77935
|
? {
|
|
77576
77936
|
name: "headerRight",
|
|
@@ -77581,31 +77941,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77581
77941
|
: undefined
|
|
77582
77942
|
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["appName"]))
|
|
77583
77943
|
: createCommentVNode("v-if", true),
|
|
77584
|
-
(
|
|
77585
|
-
? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
77586
|
-
((_a = __props.renderMenuTop) === null || _a === void 0 ? void 0 : _a.call(__props, {
|
|
77587
|
-
currentMenu: currentMenu.value,
|
|
77588
|
-
menus: unref(menuBase)
|
|
77589
|
-
}))
|
|
77590
|
-
? (openBlock(), createBlock(unref(MenuTopRender), { key: 0 }))
|
|
77591
|
-
: (openBlock(), createBlock(unref(ElScrollbar), { key: 1 }, {
|
|
77592
|
-
default: withCtx(function () { return [
|
|
77593
|
-
createElementVNode("div", _hoisted_3$1, [
|
|
77594
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menuBase).filter(function (item) { return !(item === null || item === void 0 ? void 0 : item._hide); }), function (menu) {
|
|
77595
|
-
var _a;
|
|
77596
|
-
return (openBlock(), createElementBlock("p", {
|
|
77597
|
-
class: normalizeClass(["menu-top-item", { active: ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuKey) === menu.menuKey }]),
|
|
77598
|
-
key: menu.menuKey,
|
|
77599
|
-
onClick: function ($event) { return (onMenuClick(menu)); }
|
|
77600
|
-
}, toDisplayString(menu.name), 11 /* TEXT, CLASS, PROPS */, _hoisted_4$1));
|
|
77601
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
77602
|
-
])
|
|
77603
|
-
]; }),
|
|
77604
|
-
_: 1 /* STABLE */
|
|
77605
|
-
}))
|
|
77606
|
-
]))
|
|
77607
|
-
: createCommentVNode("v-if", true),
|
|
77608
|
-
createElementVNode("div", _hoisted_5$1, [
|
|
77944
|
+
createElementVNode("div", _hoisted_10$1, [
|
|
77609
77945
|
(unref(hideMenuFlag))
|
|
77610
77946
|
? (openBlock(), createBlock(unref(BaseLayoutFlexContent), {
|
|
77611
77947
|
key: 0,
|
|
@@ -77616,16 +77952,17 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77616
77952
|
? (openBlock(), createBlock(unref(BaseLayoutMenu), {
|
|
77617
77953
|
key: 0,
|
|
77618
77954
|
menus: menuList.value,
|
|
77619
|
-
menusMap:
|
|
77955
|
+
menusMap: menusMap.value,
|
|
77620
77956
|
onMenuClick: _cache[0] || (_cache[0] = function (menu) { return emits('menuClick', menu); })
|
|
77621
77957
|
}, null, 8 /* PROPS */, ["menus", "menusMap"]))
|
|
77622
77958
|
: (openBlock(), createBlock(unref(BaseLayoutMenuFold), {
|
|
77623
77959
|
key: 1,
|
|
77624
77960
|
class: "scroll-menu",
|
|
77961
|
+
menuType: __props.menuType,
|
|
77625
77962
|
menus: menuList.value,
|
|
77626
|
-
menusMap:
|
|
77963
|
+
menusMap: menusMap.value,
|
|
77627
77964
|
onMenuClick: _cache[1] || (_cache[1] = function (menu) { return emits('menuClick', menu); })
|
|
77628
|
-
}, null, 8 /* PROPS */, ["menus", "menusMap"]))
|
|
77965
|
+
}, null, 8 /* PROPS */, ["menuType", "menus", "menusMap"]))
|
|
77629
77966
|
]; }),
|
|
77630
77967
|
_: 1 /* STABLE */
|
|
77631
77968
|
}))
|
|
@@ -77823,10 +78160,14 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
|
|
|
77823
78160
|
var _a, _b;
|
|
77824
78161
|
(_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo) === null || _b === void 0 ? void 0 : _b.call(_a, { left: 0, top: 0 });
|
|
77825
78162
|
};
|
|
78163
|
+
var minHeight = ref('auto');
|
|
78164
|
+
var identification = ref(Date.now());
|
|
77826
78165
|
var _f = useTable({
|
|
77827
78166
|
getListAjax: props.getListAjax,
|
|
77828
|
-
pageSize: paginationQuery.value[pageSizeKey]
|
|
77829
|
-
|
|
78167
|
+
pageSize: paginationQuery.value[pageSizeKey],
|
|
78168
|
+
identification: identification.value,
|
|
78169
|
+
minHeight: minHeight
|
|
78170
|
+
}), pageAllData = _f.pageAllData, getList = _f.getList, paginationTotal = _f.paginationTotal, pageIsLoading = _f.pageIsLoading, currentParams = _f.currentParams;
|
|
77830
78171
|
onMounted(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
77831
78172
|
return __generator(this, function (_a) {
|
|
77832
78173
|
switch (_a.label) {
|
|
@@ -77886,6 +78227,9 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
|
|
|
77886
78227
|
}); },
|
|
77887
78228
|
getTableData: function () {
|
|
77888
78229
|
return pageAllData;
|
|
78230
|
+
},
|
|
78231
|
+
getCurrentParams: function () {
|
|
78232
|
+
return base.deepClone(currentParams.value);
|
|
77889
78233
|
}
|
|
77890
78234
|
});
|
|
77891
78235
|
return function (_ctx, _cache) {
|
|
@@ -77914,8 +78258,9 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
|
|
|
77914
78258
|
"other-components": __props.searchConfig.otherComponents,
|
|
77915
78259
|
"sync-query-to-search": __props.searchConfig.syncQueryToSearch,
|
|
77916
78260
|
"sync-search-to-query": __props.searchConfig.syncSearchToQuery,
|
|
78261
|
+
"fixed-columns-num": __props.searchConfig.fixedColumnsNum,
|
|
77917
78262
|
onSearch: handleSearch
|
|
77918
|
-
}, null, 8 /* PROPS */, ["columns", "search-btn", "reset-btn", "other-components", "sync-query-to-search", "sync-search-to-query"]))
|
|
78263
|
+
}, null, 8 /* PROPS */, ["columns", "search-btn", "reset-btn", "other-components", "sync-query-to-search", "sync-search-to-query", "fixed-columns-num"]))
|
|
77919
78264
|
: createCommentVNode("v-if", true),
|
|
77920
78265
|
(unref(slots).tableBefore)
|
|
77921
78266
|
? renderSlot(_ctx.$slots, "tableBefore", {
|
|
@@ -77925,25 +78270,31 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
|
|
|
77925
78270
|
searchQuery: unref(query)
|
|
77926
78271
|
})
|
|
77927
78272
|
: createCommentVNode("v-if", true),
|
|
77928
|
-
createVNode(unref(BaseLayoutFlexContent), {
|
|
77929
|
-
|
|
77930
|
-
|
|
77931
|
-
|
|
77932
|
-
|
|
77933
|
-
|
|
77934
|
-
|
|
77935
|
-
|
|
77936
|
-
|
|
77937
|
-
|
|
77938
|
-
|
|
77939
|
-
|
|
77940
|
-
|
|
77941
|
-
|
|
77942
|
-
|
|
77943
|
-
|
|
77944
|
-
|
|
78273
|
+
createVNode(unref(BaseLayoutFlexContent), {
|
|
78274
|
+
style: normalizeStyle({ minHeight: minHeight.value }),
|
|
78275
|
+
fix: unref(tableContentFix)
|
|
78276
|
+
}, {
|
|
78277
|
+
default: withCtx(function () {
|
|
78278
|
+
var _a;
|
|
78279
|
+
return [
|
|
78280
|
+
withDirectives((openBlock(), createBlock(unref(BaseTable), mergeProps({
|
|
78281
|
+
class: ["xrk-table-content", (_a = {}, _a["xrk-table-content_".concat(identification.value)] = true, _a)],
|
|
78282
|
+
ref_key: "XrkTablebaseTableRef",
|
|
78283
|
+
ref: XrkTablebaseTableRef
|
|
78284
|
+
}, __props.tableConfig.baseConfig, {
|
|
78285
|
+
key: baseTableKey.value,
|
|
78286
|
+
data: unref(pageAllData),
|
|
78287
|
+
columns: __props.tableConfig.tableColumns,
|
|
78288
|
+
onExpandChange: handleExpandChange,
|
|
78289
|
+
onSelectAll: handleTableSelect,
|
|
78290
|
+
onSelect: handleTableSelect
|
|
78291
|
+
}), null, 16 /* FULL_PROPS */, ["class", "data", "columns"])), [
|
|
78292
|
+
[unref(vLoading$1), unref(pageIsLoading)]
|
|
78293
|
+
])
|
|
78294
|
+
];
|
|
78295
|
+
}),
|
|
77945
78296
|
_: 1 /* STABLE */
|
|
77946
|
-
}, 8 /* PROPS */, ["fix"]),
|
|
78297
|
+
}, 8 /* PROPS */, ["style", "fix"]),
|
|
77947
78298
|
(unref(slots).tableAfter)
|
|
77948
78299
|
? renderSlot(_ctx.$slots, "tableAfter", {
|
|
77949
78300
|
key: 3,
|
|
@@ -77955,6 +78306,7 @@ var script$1 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$1
|
|
|
77955
78306
|
(!unref(paginationConfig).hide)
|
|
77956
78307
|
? (openBlock(), createBlock(unref(BasePagination), {
|
|
77957
78308
|
key: 4,
|
|
78309
|
+
style: { "flex-shrink": "0" },
|
|
77958
78310
|
ref_key: "BasePaginationRef",
|
|
77959
78311
|
ref: BasePaginationRef,
|
|
77960
78312
|
total: unref(paginationTotal),
|