3h1-ui 1.2.1-beta-21 → 1.2.1-beta-22
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 +622 -175
- package/es/ui/src/Basic/src/BasicHelp.vue.d.ts +2 -2
- package/es/ui/src/Basic/src/BasicTitle.vue.d.ts +2 -2
- package/es/ui/src/Button/src/props.d.ts +1 -1
- package/es/ui/src/Container/src/collapse/CollapseContainer.vue.d.ts +4 -4
- package/es/ui/src/CountTo/src/CountTo.vue.d.ts +2 -2
- package/es/ui/src/Cropper/src/Cropper.vue.d.ts +2 -2
- package/es/ui/src/Cropper/src/CropperAvatar.vue.d.ts +2 -2
- package/es/ui/src/Drawer/src/BasicDrawer.vue.d.ts +2 -2
- package/es/ui/src/Drawer/src/components/DrawerFooter.vue.d.ts +2 -2
- package/es/ui/src/Icon/src/SvgIcon.vue.d.ts +1 -1
- package/es/ui/src/Loading/src/Loading.vue.d.ts +1 -1
- package/es/ui/src/Modal/src/components/BasicHelp.vue.d.ts +2 -2
- package/es/ui/src/Modal/src/components/BasicTitle.vue.d.ts +2 -2
- package/es/ui/src/Table/src/components/TableImg.vue.d.ts +1 -1
- package/es/ui/src/TablePlus/TablePlus.vue.d.ts +1 -1
- package/es/ui/src/TablePlus/index.d.ts +1 -1
- package/es/ui/src/Transition/index.d.ts +11 -11
- package/es/ui/src/Transition/src/CreateTransition.d.ts +1 -1
- package/es/ui/src/Tree/src/BasicTree.vue.d.ts +3 -3
- package/lib/index.js +626 -183
- package/lib/ui/src/Basic/src/BasicHelp.vue.d.ts +2 -2
- package/lib/ui/src/Basic/src/BasicTitle.vue.d.ts +2 -2
- package/lib/ui/src/Button/src/props.d.ts +1 -1
- package/lib/ui/src/Container/src/collapse/CollapseContainer.vue.d.ts +4 -4
- package/lib/ui/src/CountTo/src/CountTo.vue.d.ts +2 -2
- package/lib/ui/src/Cropper/src/Cropper.vue.d.ts +2 -2
- package/lib/ui/src/Cropper/src/CropperAvatar.vue.d.ts +2 -2
- package/lib/ui/src/Drawer/src/BasicDrawer.vue.d.ts +2 -2
- package/lib/ui/src/Drawer/src/components/DrawerFooter.vue.d.ts +2 -2
- package/lib/ui/src/Icon/src/SvgIcon.vue.d.ts +1 -1
- package/lib/ui/src/Loading/src/Loading.vue.d.ts +1 -1
- package/lib/ui/src/Modal/src/components/BasicHelp.vue.d.ts +2 -2
- package/lib/ui/src/Modal/src/components/BasicTitle.vue.d.ts +2 -2
- package/lib/ui/src/Table/src/components/TableImg.vue.d.ts +1 -1
- package/lib/ui/src/TablePlus/TablePlus.vue.d.ts +1 -1
- package/lib/ui/src/TablePlus/index.d.ts +1 -1
- package/lib/ui/src/Transition/index.d.ts +11 -11
- package/lib/ui/src/Transition/src/CreateTransition.d.ts +1 -1
- package/lib/ui/src/Tree/src/BasicTree.vue.d.ts +3 -3
- package/package.json +1 -1
- package/es/ui/src/Basic/src/BasicArrow.vue.d.ts +0 -116
- package/es/ui/src/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -8
- package/es/ui/src/Container/src/LazyContainer.vue.d.ts +0 -121
- package/es/ui/src/Container/src/ScrollContainer.vue.d.ts +0 -9
- package/es/ui/src/Icon/src/Icon.vue.d.ts +0 -53
- package/es/ui/src/Modal/src/components/ModalWrapper.vue.d.ts +0 -95
- package/es/ui/src/Modal/src/components/ScrollContainer.vue.d.ts +0 -9
- package/lib/ui/src/Basic/src/BasicArrow.vue.d.ts +0 -116
- package/lib/ui/src/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -8
- package/lib/ui/src/Container/src/LazyContainer.vue.d.ts +0 -121
- package/lib/ui/src/Container/src/ScrollContainer.vue.d.ts +0 -9
- package/lib/ui/src/Icon/src/Icon.vue.d.ts +0 -53
- package/lib/ui/src/Modal/src/components/ModalWrapper.vue.d.ts +0 -95
- package/lib/ui/src/Modal/src/components/ScrollContainer.vue.d.ts +0 -9
package/es/index.js
CHANGED
|
@@ -1844,7 +1844,7 @@ function apply(func, thisArg, args) {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
return func.apply(thisArg, args);
|
|
1846
1846
|
}
|
|
1847
|
-
function noop$
|
|
1847
|
+
function noop$2() {
|
|
1848
1848
|
}
|
|
1849
1849
|
function copyArray(source, array) {
|
|
1850
1850
|
var index2 = -1, length = source.length;
|
|
@@ -2107,7 +2107,11 @@ var hasOwnProperty$9 = objectProto$9.hasOwnProperty;
|
|
|
2107
2107
|
function arrayLikeKeys(value, inherited) {
|
|
2108
2108
|
var isArr = isArray$2(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
2109
2109
|
for (var key2 in value) {
|
|
2110
|
-
if ((inherited || hasOwnProperty$9.call(value, key2)) && !(skipIndexes &&
|
|
2110
|
+
if ((inherited || hasOwnProperty$9.call(value, key2)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2111
|
+
(key2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2112
|
+
isBuff && (key2 == "offset" || key2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2113
|
+
isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || // Skip index properties.
|
|
2114
|
+
isIndex(key2, length)))) {
|
|
2111
2115
|
result.push(key2);
|
|
2112
2116
|
}
|
|
2113
2117
|
}
|
|
@@ -3378,7 +3382,7 @@ function set(object, path, value) {
|
|
|
3378
3382
|
return object == null ? object : baseSet(object, path, value);
|
|
3379
3383
|
}
|
|
3380
3384
|
var INFINITY = 1 / 0;
|
|
3381
|
-
var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? noop$
|
|
3385
|
+
var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? noop$2 : function(values) {
|
|
3382
3386
|
return new Set$1(values);
|
|
3383
3387
|
};
|
|
3384
3388
|
const createSet$1 = createSet;
|
|
@@ -3641,10 +3645,12 @@ const _sfc_main$15 = defineComponent({
|
|
|
3641
3645
|
type: Function,
|
|
3642
3646
|
default: null
|
|
3643
3647
|
},
|
|
3648
|
+
// api params
|
|
3644
3649
|
params: {
|
|
3645
3650
|
type: Object,
|
|
3646
3651
|
default: () => ({})
|
|
3647
3652
|
},
|
|
3653
|
+
// support xxx.xxx.xx
|
|
3648
3654
|
resultField: propTypes.string.def(""),
|
|
3649
3655
|
labelField: propTypes.string.def("label"),
|
|
3650
3656
|
valueField: propTypes.string.def("value"),
|
|
@@ -3788,7 +3794,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3788
3794
|
spin: "",
|
|
3789
3795
|
class: "mr-1"
|
|
3790
3796
|
}),
|
|
3791
|
-
createTextVNode(" " + toDisplayString("
|
|
3797
|
+
createTextVNode(" " + toDisplayString("请等待数据加载完成..."), 1)
|
|
3792
3798
|
])
|
|
3793
3799
|
]),
|
|
3794
3800
|
key: "1"
|
|
@@ -4017,10 +4023,12 @@ const _sfc_main$12 = defineComponent({
|
|
|
4017
4023
|
childrenField: propTypes.string.def("children"),
|
|
4018
4024
|
asyncFetchParamKey: propTypes.string.def("parentCode"),
|
|
4019
4025
|
immediate: propTypes.bool.def(true),
|
|
4026
|
+
// init fetch params
|
|
4020
4027
|
initFetchParams: {
|
|
4021
4028
|
type: Object,
|
|
4022
4029
|
default: () => ({})
|
|
4023
4030
|
},
|
|
4031
|
+
// 是否有下级,默认是
|
|
4024
4032
|
isLeaf: {
|
|
4025
4033
|
type: Function,
|
|
4026
4034
|
default: null
|
|
@@ -4171,7 +4179,7 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4171
4179
|
spin: "",
|
|
4172
4180
|
class: "mr-1"
|
|
4173
4181
|
}),
|
|
4174
|
-
createTextVNode(" " + toDisplayString("
|
|
4182
|
+
createTextVNode(" " + toDisplayString("请等待数据加载完成..."), 1)
|
|
4175
4183
|
])
|
|
4176
4184
|
]),
|
|
4177
4185
|
key: "1"
|
|
@@ -4425,8 +4433,11 @@ const _sfc_main$_ = defineComponent({
|
|
|
4425
4433
|
name: "Icon",
|
|
4426
4434
|
components: { SvgIcon },
|
|
4427
4435
|
props: {
|
|
4436
|
+
// icon name
|
|
4428
4437
|
icon: propTypes.string,
|
|
4438
|
+
// icon color
|
|
4429
4439
|
color: propTypes.string,
|
|
4440
|
+
// icon size
|
|
4430
4441
|
size: {
|
|
4431
4442
|
type: [String, Number],
|
|
4432
4443
|
default: 16
|
|
@@ -4668,9 +4679,21 @@ createJavascriptTransition(
|
|
|
4668
4679
|
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
4669
4680
|
__name: "BasicArrow",
|
|
4670
4681
|
props: {
|
|
4682
|
+
/**
|
|
4683
|
+
* Arrow expand state
|
|
4684
|
+
*/
|
|
4671
4685
|
expand: { type: Boolean },
|
|
4686
|
+
/**
|
|
4687
|
+
* Arrow up by default
|
|
4688
|
+
*/
|
|
4672
4689
|
up: { type: Boolean },
|
|
4690
|
+
/**
|
|
4691
|
+
* Arrow down by default
|
|
4692
|
+
*/
|
|
4673
4693
|
down: { type: Boolean },
|
|
4694
|
+
/**
|
|
4695
|
+
* Cancel padding/margin for inline
|
|
4696
|
+
*/
|
|
4674
4697
|
inset: { type: Boolean }
|
|
4675
4698
|
},
|
|
4676
4699
|
setup(__props) {
|
|
@@ -4703,25 +4726,47 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
4703
4726
|
const BasicArrow_vue_vue_type_style_index_0_scoped_fea26917_lang = "";
|
|
4704
4727
|
const BasicArrow = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-fea26917"]]);
|
|
4705
4728
|
const props$d = {
|
|
4729
|
+
/**
|
|
4730
|
+
* Help text max-width
|
|
4731
|
+
* @default: 600px
|
|
4732
|
+
*/
|
|
4706
4733
|
maxWidth: {
|
|
4707
4734
|
type: String,
|
|
4708
4735
|
default: "600px"
|
|
4709
4736
|
},
|
|
4737
|
+
/**
|
|
4738
|
+
* Whether to display the serial number
|
|
4739
|
+
* @default: false
|
|
4740
|
+
*/
|
|
4710
4741
|
showIndex: {
|
|
4711
4742
|
type: Boolean
|
|
4712
4743
|
},
|
|
4744
|
+
/**
|
|
4745
|
+
* Help text font color
|
|
4746
|
+
* @default: #ffffff
|
|
4747
|
+
*/
|
|
4713
4748
|
color: {
|
|
4714
4749
|
type: String,
|
|
4715
4750
|
default: "#ffffff"
|
|
4716
4751
|
},
|
|
4752
|
+
/**
|
|
4753
|
+
* Help text font size
|
|
4754
|
+
* @default: 14px
|
|
4755
|
+
*/
|
|
4717
4756
|
fontSize: {
|
|
4718
4757
|
type: String,
|
|
4719
4758
|
default: "14px"
|
|
4720
4759
|
},
|
|
4760
|
+
/**
|
|
4761
|
+
* Help text list
|
|
4762
|
+
*/
|
|
4721
4763
|
placement: {
|
|
4722
4764
|
type: String,
|
|
4723
4765
|
default: "right"
|
|
4724
4766
|
},
|
|
4767
|
+
/**
|
|
4768
|
+
* Help text list
|
|
4769
|
+
*/
|
|
4725
4770
|
text: {
|
|
4726
4771
|
type: [Array, String]
|
|
4727
4772
|
}
|
|
@@ -4779,11 +4824,23 @@ const BasicHelp_vue_vue_type_style_index_0_lang$1 = "";
|
|
|
4779
4824
|
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
4780
4825
|
__name: "BasicTitle",
|
|
4781
4826
|
props: {
|
|
4827
|
+
/**
|
|
4828
|
+
* Help text list or string
|
|
4829
|
+
* @default: ''
|
|
4830
|
+
*/
|
|
4782
4831
|
helpMessage: {
|
|
4783
4832
|
type: [String, Array],
|
|
4784
4833
|
default: ""
|
|
4785
4834
|
},
|
|
4835
|
+
/**
|
|
4836
|
+
* Whether the color block on the left side of the title
|
|
4837
|
+
* @default: false
|
|
4838
|
+
*/
|
|
4786
4839
|
span: { type: Boolean },
|
|
4840
|
+
/**
|
|
4841
|
+
* Whether to default the text, that is, not bold
|
|
4842
|
+
* @default: false
|
|
4843
|
+
*/
|
|
4787
4844
|
normal: { type: Boolean }
|
|
4788
4845
|
},
|
|
4789
4846
|
setup(__props) {
|
|
@@ -4864,12 +4921,25 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
4864
4921
|
props: {
|
|
4865
4922
|
title: { type: String, default: "" },
|
|
4866
4923
|
loading: { type: Boolean },
|
|
4924
|
+
/**
|
|
4925
|
+
* Can it be expanded
|
|
4926
|
+
*/
|
|
4867
4927
|
canExpan: { type: Boolean, default: true },
|
|
4928
|
+
/**
|
|
4929
|
+
* Warm reminder on the right side of the title
|
|
4930
|
+
*/
|
|
4868
4931
|
helpMessage: {
|
|
4869
4932
|
type: [Array, String],
|
|
4870
4933
|
default: ""
|
|
4871
4934
|
},
|
|
4935
|
+
/**
|
|
4936
|
+
* Whether to trigger window.resize when expanding and contracting,
|
|
4937
|
+
* Can adapt to tables and forms, when the form shrinks, the form triggers resize to adapt to the height
|
|
4938
|
+
*/
|
|
4872
4939
|
triggerWindowResize: { type: Boolean },
|
|
4940
|
+
/**
|
|
4941
|
+
* Delayed loading time
|
|
4942
|
+
*/
|
|
4873
4943
|
lazyTime: { type: Number, default: 0 }
|
|
4874
4944
|
},
|
|
4875
4945
|
setup(__props, { expose }) {
|
|
@@ -5060,6 +5130,7 @@ const Bar = defineComponent({
|
|
|
5060
5130
|
});
|
|
5061
5131
|
const _sfc_main$T = defineComponent({
|
|
5062
5132
|
name: "Scrollbar",
|
|
5133
|
+
// inheritAttrs: false,
|
|
5063
5134
|
components: { Bar },
|
|
5064
5135
|
props: {
|
|
5065
5136
|
native: {
|
|
@@ -5083,6 +5154,7 @@ const _sfc_main$T = defineComponent({
|
|
|
5083
5154
|
default: ""
|
|
5084
5155
|
},
|
|
5085
5156
|
noresize: Boolean,
|
|
5157
|
+
// 如果 container 尺寸不会发生变化,最好设置它可以优化性能
|
|
5086
5158
|
tag: {
|
|
5087
5159
|
type: String,
|
|
5088
5160
|
default: "div"
|
|
@@ -5259,19 +5331,38 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5259
5331
|
}
|
|
5260
5332
|
const ScrollContainer$1 = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$y]]);
|
|
5261
5333
|
const props$b = {
|
|
5334
|
+
/**
|
|
5335
|
+
* Waiting time, if the time is specified, whether visible or not, it will be automatically loaded after the specified time
|
|
5336
|
+
*/
|
|
5262
5337
|
timeout: { type: Number },
|
|
5338
|
+
/**
|
|
5339
|
+
* The viewport where the component is located.
|
|
5340
|
+
* If the component is scrolling in the page container, the viewport is the container
|
|
5341
|
+
*/
|
|
5263
5342
|
viewport: {
|
|
5264
5343
|
type: typeof window !== "undefined" ? window.HTMLElement : Object,
|
|
5265
5344
|
default: () => null
|
|
5266
5345
|
},
|
|
5346
|
+
/**
|
|
5347
|
+
* Preload threshold, css unit
|
|
5348
|
+
*/
|
|
5267
5349
|
threshold: { type: String, default: "0px" },
|
|
5350
|
+
/**
|
|
5351
|
+
* The scroll direction of the viewport, vertical represents the vertical direction, horizontal represents the horizontal direction
|
|
5352
|
+
*/
|
|
5268
5353
|
direction: {
|
|
5269
5354
|
type: String,
|
|
5270
5355
|
default: "vertical",
|
|
5271
5356
|
validator: (v) => ["vertical", "horizontal"].includes(v)
|
|
5272
5357
|
},
|
|
5358
|
+
/**
|
|
5359
|
+
* The label name of the outer container that wraps the component
|
|
5360
|
+
*/
|
|
5273
5361
|
tag: { type: String, default: "div" },
|
|
5274
5362
|
maxWaitingTime: { type: Number, default: 80 },
|
|
5363
|
+
/**
|
|
5364
|
+
* transition name
|
|
5365
|
+
*/
|
|
5275
5366
|
transitionName: { type: String, default: "lazy-container" }
|
|
5276
5367
|
};
|
|
5277
5368
|
const _sfc_main$R = defineComponent({
|
|
@@ -6162,13 +6253,13 @@ const isFunction$2 = (val) => typeof val === "function";
|
|
|
6162
6253
|
const isNumber$1 = (val) => typeof val === "number";
|
|
6163
6254
|
const isString$2 = (val) => typeof val === "string";
|
|
6164
6255
|
const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
6165
|
-
const noop = () => {
|
|
6256
|
+
const noop$1 = () => {
|
|
6166
6257
|
};
|
|
6167
6258
|
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
6168
6259
|
function resolveUnref(r) {
|
|
6169
6260
|
return typeof r === "function" ? r() : unref(r);
|
|
6170
6261
|
}
|
|
6171
|
-
function createFilterWrapper(filter2, fn) {
|
|
6262
|
+
function createFilterWrapper$1(filter2, fn) {
|
|
6172
6263
|
function wrapper(...args) {
|
|
6173
6264
|
return new Promise((resolve, reject) => {
|
|
6174
6265
|
Promise.resolve(filter2(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
|
|
@@ -6176,14 +6267,14 @@ function createFilterWrapper(filter2, fn) {
|
|
|
6176
6267
|
}
|
|
6177
6268
|
return wrapper;
|
|
6178
6269
|
}
|
|
6179
|
-
function debounceFilter(ms, options = {}) {
|
|
6270
|
+
function debounceFilter$1(ms, options = {}) {
|
|
6180
6271
|
let timer;
|
|
6181
6272
|
let maxTimer;
|
|
6182
|
-
let lastRejector = noop;
|
|
6273
|
+
let lastRejector = noop$1;
|
|
6183
6274
|
const _clearTimeout = (timer2) => {
|
|
6184
6275
|
clearTimeout(timer2);
|
|
6185
6276
|
lastRejector();
|
|
6186
|
-
lastRejector = noop;
|
|
6277
|
+
lastRejector = noop$1;
|
|
6187
6278
|
};
|
|
6188
6279
|
const filter2 = (invoke) => {
|
|
6189
6280
|
const duration = resolveUnref(ms);
|
|
@@ -6227,8 +6318,8 @@ function tryOnScopeDispose(fn) {
|
|
|
6227
6318
|
}
|
|
6228
6319
|
return false;
|
|
6229
6320
|
}
|
|
6230
|
-
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
6231
|
-
return createFilterWrapper(debounceFilter(ms, options), fn);
|
|
6321
|
+
function useDebounceFn$1(fn, ms = 200, options = {}) {
|
|
6322
|
+
return createFilterWrapper$1(debounceFilter$1(ms, options), fn);
|
|
6232
6323
|
}
|
|
6233
6324
|
function tryOnMounted(fn, sync = true) {
|
|
6234
6325
|
if (getCurrentInstance())
|
|
@@ -6298,7 +6389,7 @@ function useEventListener(...args) {
|
|
|
6298
6389
|
[target, events2, listeners, options] = args;
|
|
6299
6390
|
}
|
|
6300
6391
|
if (!target)
|
|
6301
|
-
return noop;
|
|
6392
|
+
return noop$1;
|
|
6302
6393
|
if (!Array.isArray(events2))
|
|
6303
6394
|
events2 = [events2];
|
|
6304
6395
|
if (!Array.isArray(listeners))
|
|
@@ -6390,7 +6481,6 @@ function useSupported(callback, sync = false) {
|
|
|
6390
6481
|
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
6391
6482
|
const globalKey = "__vueuse_ssr_handlers__";
|
|
6392
6483
|
_global[globalKey] = _global[globalKey] || {};
|
|
6393
|
-
_global[globalKey];
|
|
6394
6484
|
function useRafFn(fn, options = {}) {
|
|
6395
6485
|
const {
|
|
6396
6486
|
immediate = true,
|
|
@@ -6647,8 +6737,8 @@ function useTransition(source, options = {}) {
|
|
|
6647
6737
|
delay = 0,
|
|
6648
6738
|
disabled = false,
|
|
6649
6739
|
duration = 1e3,
|
|
6650
|
-
onFinished = noop,
|
|
6651
|
-
onStarted = noop,
|
|
6740
|
+
onFinished = noop$1,
|
|
6741
|
+
onStarted = noop$1,
|
|
6652
6742
|
transition = identity
|
|
6653
6743
|
} = options;
|
|
6654
6744
|
const currentTransition = computed(() => {
|
|
@@ -6744,12 +6834,11 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
6744
6834
|
const APagination = Pagination;
|
|
6745
6835
|
const AEmpty = Empty;
|
|
6746
6836
|
function getIcons() {
|
|
6747
|
-
var _a2, _b;
|
|
6748
6837
|
const data = iconsData;
|
|
6749
|
-
const prefix = (
|
|
6838
|
+
const prefix = (data == null ? void 0 : data.prefix) ?? "";
|
|
6750
6839
|
let result = [];
|
|
6751
6840
|
if (prefix) {
|
|
6752
|
-
result = ((
|
|
6841
|
+
result = ((data == null ? void 0 : data.icons) ?? []).map((item) => `${prefix}:${item}`);
|
|
6753
6842
|
} else if (Array.isArray(iconsData)) {
|
|
6754
6843
|
result = iconsData;
|
|
6755
6844
|
}
|
|
@@ -6764,7 +6853,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
6764
6853
|
const visible = ref(false);
|
|
6765
6854
|
const currentList = ref(icons);
|
|
6766
6855
|
const prefixCls2 = "shy-icon-picker";
|
|
6767
|
-
const debounceHandleSearchChange = useDebounceFn(handleSearchChange, 100);
|
|
6856
|
+
const debounceHandleSearchChange = useDebounceFn$1(handleSearchChange, 100);
|
|
6768
6857
|
const { clipboardRef, isSuccessRef } = useCopyToClipboard(props2.value);
|
|
6769
6858
|
const { createMessage } = useMessage();
|
|
6770
6859
|
const { getPaginationList, getTotal, setCurrentPage } = usePagination$2(
|
|
@@ -6789,7 +6878,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
6789
6878
|
if (props2.copy) {
|
|
6790
6879
|
clipboardRef.value = icon;
|
|
6791
6880
|
if (unref(isSuccessRef)) {
|
|
6792
|
-
createMessage.success("
|
|
6881
|
+
createMessage.success("复制图标成功!");
|
|
6793
6882
|
}
|
|
6794
6883
|
}
|
|
6795
6884
|
}
|
|
@@ -6806,7 +6895,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
6806
6895
|
return openBlock(), createBlock(unref(AInput), {
|
|
6807
6896
|
disabled: "",
|
|
6808
6897
|
style: normalizeStyle({ width: __props.width }),
|
|
6809
|
-
placeholder: "
|
|
6898
|
+
placeholder: "点击选择图标",
|
|
6810
6899
|
class: normalizeClass(prefixCls2),
|
|
6811
6900
|
value: currentSelect.value,
|
|
6812
6901
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => currentSelect.value = $event)
|
|
@@ -6822,7 +6911,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
6822
6911
|
title: withCtx(() => [
|
|
6823
6912
|
createElementVNode("div", _hoisted_1$g, [
|
|
6824
6913
|
createVNode(unref(AInput), {
|
|
6825
|
-
placeholder: "
|
|
6914
|
+
placeholder: "搜索图标",
|
|
6826
6915
|
onChange: unref(debounceHandleSearchChange),
|
|
6827
6916
|
allowClear: ""
|
|
6828
6917
|
}, null, 8, ["onChange"])
|
|
@@ -6939,7 +7028,7 @@ const _sfc_main$P = defineComponent({
|
|
|
6939
7028
|
const loading = ref(false);
|
|
6940
7029
|
const { currentCount, isStart, start, reset: reset2 } = useCountdown(props2.count);
|
|
6941
7030
|
const getButtonText = computed(() => {
|
|
6942
|
-
return !unref(isStart) ? "
|
|
7031
|
+
return !unref(isStart) ? "获取验证码" : `${currentCount.value}秒后重新获取`;
|
|
6943
7032
|
});
|
|
6944
7033
|
watchEffect(() => {
|
|
6945
7034
|
props2.value === void 0 && reset2();
|
|
@@ -7056,7 +7145,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
7056
7145
|
const [state] = useRuleFormItem(props2, "value", "change", emitData);
|
|
7057
7146
|
const getColumns = computed(() => {
|
|
7058
7147
|
const indexColumn = {
|
|
7059
|
-
title: "
|
|
7148
|
+
title: "序号",
|
|
7060
7149
|
dataIndex: "index",
|
|
7061
7150
|
customRender: ({ index: index2 }) => {
|
|
7062
7151
|
return `${index2 + 1}`;
|
|
@@ -7097,7 +7186,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
7097
7186
|
await formRef.validate();
|
|
7098
7187
|
}
|
|
7099
7188
|
} catch {
|
|
7100
|
-
throw new Error("
|
|
7189
|
+
throw new Error("校验失败");
|
|
7101
7190
|
}
|
|
7102
7191
|
};
|
|
7103
7192
|
expose({ validate });
|
|
@@ -7133,37 +7222,34 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
7133
7222
|
rules: (column == null ? void 0 : column.rules) || [],
|
|
7134
7223
|
name: column.dataIndex
|
|
7135
7224
|
}, {
|
|
7136
|
-
default: withCtx(() =>
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
column.
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
}, null, 8, ["value", "onUpdate:value"]))
|
|
7165
|
-
];
|
|
7166
|
-
}),
|
|
7225
|
+
default: withCtx(() => [
|
|
7226
|
+
column.type === "select" ? (openBlock(), createBlock(unref(Select), {
|
|
7227
|
+
key: 0,
|
|
7228
|
+
value: record[column.dataIndex],
|
|
7229
|
+
"onUpdate:value": ($event) => record[column.dataIndex] = $event,
|
|
7230
|
+
options: column.dicData,
|
|
7231
|
+
mode: column.mode,
|
|
7232
|
+
"max-tag-count": column.maxTagCount,
|
|
7233
|
+
"max-tag-text-length": column.maxTagTextLength
|
|
7234
|
+
}, null, 8, ["value", "onUpdate:value", "options", "mode", "max-tag-count", "max-tag-text-length"])) : column.type === "datePicker" ? (openBlock(), createBlock(unref(DatePicker), {
|
|
7235
|
+
key: 1,
|
|
7236
|
+
value: record[column.dataIndex],
|
|
7237
|
+
"onUpdate:value": ($event) => record[column.dataIndex] = $event,
|
|
7238
|
+
valueFormat: "YYYY-MM-DD HH:mm:ss",
|
|
7239
|
+
showTime: true
|
|
7240
|
+
}, null, 8, ["value", "onUpdate:value"])) : column.type === "number" ? (openBlock(), createBlock(unref(InputNumber), {
|
|
7241
|
+
key: 2,
|
|
7242
|
+
value: record[column.dataIndex],
|
|
7243
|
+
"onUpdate:value": ($event) => record[column.dataIndex] = $event,
|
|
7244
|
+
min: column.min,
|
|
7245
|
+
max: column.max,
|
|
7246
|
+
precision: column.precision ?? 2
|
|
7247
|
+
}, null, 8, ["value", "onUpdate:value", "min", "max", "precision"])) : (openBlock(), createBlock(unref(Input), {
|
|
7248
|
+
key: 3,
|
|
7249
|
+
value: record[column.dataIndex],
|
|
7250
|
+
"onUpdate:value": ($event) => record[column.dataIndex] = $event
|
|
7251
|
+
}, null, 8, ["value", "onUpdate:value"]))
|
|
7252
|
+
]),
|
|
7167
7253
|
_: 2
|
|
7168
7254
|
}, 1032, ["rules", "name"])
|
|
7169
7255
|
]),
|
|
@@ -7230,13 +7316,13 @@ function del(compName) {
|
|
|
7230
7316
|
}
|
|
7231
7317
|
function createPlaceholderMessage$1(component) {
|
|
7232
7318
|
if (component.includes("Input") || component.includes("Complete")) {
|
|
7233
|
-
return "
|
|
7319
|
+
return "请输入";
|
|
7234
7320
|
}
|
|
7235
7321
|
if (component.includes("Picker")) {
|
|
7236
|
-
return "
|
|
7322
|
+
return "请选择";
|
|
7237
7323
|
}
|
|
7238
7324
|
if (component.includes("Select") || component.includes("Cascader") || component.includes("Checkbox") || component.includes("Radio") || component.includes("Switch")) {
|
|
7239
|
-
return "
|
|
7325
|
+
return "请选择";
|
|
7240
7326
|
}
|
|
7241
7327
|
return "";
|
|
7242
7328
|
}
|
|
@@ -7372,7 +7458,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
7372
7458
|
};
|
|
7373
7459
|
});
|
|
7374
7460
|
const getComponentsProps = computed(() => {
|
|
7375
|
-
var _a2
|
|
7461
|
+
var _a2;
|
|
7376
7462
|
const {
|
|
7377
7463
|
schema: schema2,
|
|
7378
7464
|
tableAction,
|
|
@@ -7383,12 +7469,12 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
7383
7469
|
componentProps = {}
|
|
7384
7470
|
} = schema2;
|
|
7385
7471
|
if (isFunction$4(componentProps)) {
|
|
7386
|
-
componentProps =
|
|
7472
|
+
componentProps = componentProps({
|
|
7387
7473
|
schema: schema2,
|
|
7388
7474
|
tableAction,
|
|
7389
7475
|
formModel,
|
|
7390
7476
|
formActionType
|
|
7391
|
-
})
|
|
7477
|
+
}) ?? {};
|
|
7392
7478
|
}
|
|
7393
7479
|
if (schema2.component === "Divider") {
|
|
7394
7480
|
componentProps = Object.assign({
|
|
@@ -7407,7 +7493,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
7407
7493
|
});
|
|
7408
7494
|
}
|
|
7409
7495
|
if (schema2.component === "Select") {
|
|
7410
|
-
const label = ((
|
|
7496
|
+
const label = ((_a2 = componentProps == null ? void 0 : componentProps.fieldNames) == null ? void 0 : _a2.label) || "label";
|
|
7411
7497
|
componentProps = Object.assign({}, componentProps, {
|
|
7412
7498
|
showSearch: true,
|
|
7413
7499
|
filterOption: (input, option) => {
|
|
@@ -7715,8 +7801,18 @@ const buttonProps = {
|
|
|
7715
7801
|
},
|
|
7716
7802
|
loading: { type: Boolean },
|
|
7717
7803
|
disabled: { type: Boolean },
|
|
7804
|
+
/**
|
|
7805
|
+
* Text before icon.
|
|
7806
|
+
*/
|
|
7718
7807
|
preIcon: { type: String },
|
|
7808
|
+
/**
|
|
7809
|
+
* Text after icon.
|
|
7810
|
+
*/
|
|
7719
7811
|
postIcon: { type: String },
|
|
7812
|
+
/**
|
|
7813
|
+
* preIcon and postIcon icon size.
|
|
7814
|
+
* @default: 14
|
|
7815
|
+
*/
|
|
7720
7816
|
iconSize: { type: Number, default: 14 },
|
|
7721
7817
|
onClick: { type: Function, default: null }
|
|
7722
7818
|
};
|
|
@@ -7765,6 +7861,10 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
7765
7861
|
}
|
|
7766
7862
|
});
|
|
7767
7863
|
const props$8 = {
|
|
7864
|
+
/**
|
|
7865
|
+
* Whether to enable the drop-down menu
|
|
7866
|
+
* @default: true
|
|
7867
|
+
*/
|
|
7768
7868
|
enable: {
|
|
7769
7869
|
type: Boolean,
|
|
7770
7870
|
default: true
|
|
@@ -7779,8 +7879,8 @@ const _sfc_main$K = defineComponent({
|
|
|
7779
7879
|
const getBindValues = computed(() => {
|
|
7780
7880
|
return Object.assign(
|
|
7781
7881
|
{
|
|
7782
|
-
okText: "
|
|
7783
|
-
cancelText: "
|
|
7882
|
+
okText: "确定",
|
|
7883
|
+
cancelText: "取消"
|
|
7784
7884
|
},
|
|
7785
7885
|
{ ...props2, ...unref(attrs) }
|
|
7786
7886
|
);
|
|
@@ -7853,7 +7953,7 @@ const _sfc_main$J = defineComponent({
|
|
|
7853
7953
|
const getResetBtnOptions = computed(() => {
|
|
7854
7954
|
return Object.assign(
|
|
7855
7955
|
{
|
|
7856
|
-
text: "
|
|
7956
|
+
text: "重置"
|
|
7857
7957
|
},
|
|
7858
7958
|
props2.resetButtonOptions
|
|
7859
7959
|
);
|
|
@@ -7861,7 +7961,7 @@ const _sfc_main$J = defineComponent({
|
|
|
7861
7961
|
const getSubmitBtnOptions = computed(() => {
|
|
7862
7962
|
return Object.assign(
|
|
7863
7963
|
{
|
|
7864
|
-
text: "
|
|
7964
|
+
text: "查询"
|
|
7865
7965
|
},
|
|
7866
7966
|
props2.submitButtonOptions
|
|
7867
7967
|
);
|
|
@@ -7880,6 +7980,7 @@ const _sfc_main$J = defineComponent({
|
|
|
7880
7980
|
actionColOpt,
|
|
7881
7981
|
getResetBtnOptions,
|
|
7882
7982
|
getSubmitBtnOptions,
|
|
7983
|
+
// toggleAdvanced,
|
|
7883
7984
|
...useFormContext(),
|
|
7884
7985
|
getPreIcon
|
|
7885
7986
|
};
|
|
@@ -8062,7 +8163,7 @@ function useAdvanced({
|
|
|
8062
8163
|
}
|
|
8063
8164
|
return 0;
|
|
8064
8165
|
});
|
|
8065
|
-
const debounceUpdateAdvanced = useDebounceFn(updateAdvanced, 30);
|
|
8166
|
+
const debounceUpdateAdvanced = useDebounceFn$1(updateAdvanced, 30);
|
|
8066
8167
|
watch(
|
|
8067
8168
|
[
|
|
8068
8169
|
() => unref(getSchema),
|
|
@@ -8436,21 +8537,32 @@ const modalProps = {
|
|
|
8436
8537
|
scrollTop: { type: Boolean, default: true },
|
|
8437
8538
|
height: { type: Number },
|
|
8438
8539
|
minHeight: { type: Number },
|
|
8540
|
+
// open drag
|
|
8439
8541
|
draggable: { type: Boolean, default: true },
|
|
8440
8542
|
centered: { type: Boolean },
|
|
8441
|
-
cancelText: { type: String, default: "
|
|
8442
|
-
okText: { type: String, default: "
|
|
8543
|
+
cancelText: { type: String, default: "取消" },
|
|
8544
|
+
okText: { type: String, default: "确认" },
|
|
8443
8545
|
closeFunc: Function
|
|
8444
8546
|
};
|
|
8445
8547
|
const basicProps$4 = Object.assign({}, modalProps, {
|
|
8446
8548
|
defaultFullscreen: { type: Boolean },
|
|
8549
|
+
// Can it be full screen
|
|
8447
8550
|
canFullscreen: { type: Boolean, default: true },
|
|
8551
|
+
// After enabling the wrapper, the bottom can be increased in height
|
|
8448
8552
|
wrapperFooterOffset: { type: Number, default: 0 },
|
|
8553
|
+
// Warm reminder message
|
|
8449
8554
|
helpMessage: [String, Array],
|
|
8555
|
+
// Whether to setting wrapper
|
|
8450
8556
|
useWrapper: { type: Boolean, default: true },
|
|
8451
8557
|
loading: { type: Boolean },
|
|
8452
8558
|
loadingTip: { type: String },
|
|
8559
|
+
/**
|
|
8560
|
+
* @description: Show close button
|
|
8561
|
+
*/
|
|
8453
8562
|
showCancelBtn: { type: Boolean, default: true },
|
|
8563
|
+
/**
|
|
8564
|
+
* @description: Show confirmation button
|
|
8565
|
+
*/
|
|
8454
8566
|
showOkBtn: { type: Boolean, default: true },
|
|
8455
8567
|
wrapperProps: Object,
|
|
8456
8568
|
afterClose: Function,
|
|
@@ -8708,7 +8820,7 @@ function useWindowSizeFn(fn, wait = 150, options) {
|
|
|
8708
8820
|
let handler = () => {
|
|
8709
8821
|
fn();
|
|
8710
8822
|
};
|
|
8711
|
-
const handleSize = useDebounceFn(handler, wait);
|
|
8823
|
+
const handleSize = useDebounceFn$1(handler, wait);
|
|
8712
8824
|
handler = handleSize;
|
|
8713
8825
|
const start = () => {
|
|
8714
8826
|
if (options && options.immediate) {
|
|
@@ -9081,7 +9193,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9081
9193
|
_: 1
|
|
9082
9194
|
}, 8, ["title"])) : (openBlock(), createBlock(_component_Tooltip, {
|
|
9083
9195
|
key: 1,
|
|
9084
|
-
title: "
|
|
9196
|
+
title: "全屏",
|
|
9085
9197
|
placement: "bottom"
|
|
9086
9198
|
}, {
|
|
9087
9199
|
default: withCtx(() => [
|
|
@@ -9094,7 +9206,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9094
9206
|
}))
|
|
9095
9207
|
], 64)) : createCommentVNode("", true),
|
|
9096
9208
|
createVNode(_component_Tooltip, {
|
|
9097
|
-
title: "
|
|
9209
|
+
title: "关闭",
|
|
9098
9210
|
placement: "bottom"
|
|
9099
9211
|
}, {
|
|
9100
9212
|
default: withCtx(() => [
|
|
@@ -9154,8 +9266,7 @@ function deepMerge(src = {}, target = {}) {
|
|
|
9154
9266
|
return res;
|
|
9155
9267
|
}
|
|
9156
9268
|
function getPopupContainer(node) {
|
|
9157
|
-
|
|
9158
|
-
return (_a2 = node == null ? void 0 : node.parentNode) != null ? _a2 : document.body;
|
|
9269
|
+
return (node == null ? void 0 : node.parentNode) ?? document.body;
|
|
9159
9270
|
}
|
|
9160
9271
|
function useContext(key2 = Symbol(), defaultValue) {
|
|
9161
9272
|
return inject(key2, defaultValue || {});
|
|
@@ -9167,30 +9278,54 @@ function useAppProviderContext() {
|
|
|
9167
9278
|
function useDesign(scope) {
|
|
9168
9279
|
const values = useAppProviderContext();
|
|
9169
9280
|
return {
|
|
9281
|
+
// prefixCls: computed(() => `${values.prefixCls}-${scope}`),
|
|
9170
9282
|
prefixCls: `${values.prefixCls}-${scope}`,
|
|
9171
9283
|
prefixVar: values.prefixCls
|
|
9284
|
+
// style,
|
|
9172
9285
|
};
|
|
9173
9286
|
}
|
|
9174
9287
|
const props$6 = {
|
|
9288
|
+
/**
|
|
9289
|
+
* Help text max-width
|
|
9290
|
+
* @default: 600px
|
|
9291
|
+
*/
|
|
9175
9292
|
maxWidth: {
|
|
9176
9293
|
type: String,
|
|
9177
9294
|
default: "600px"
|
|
9178
9295
|
},
|
|
9296
|
+
/**
|
|
9297
|
+
* Whether to display the serial number
|
|
9298
|
+
* @default: false
|
|
9299
|
+
*/
|
|
9179
9300
|
showIndex: {
|
|
9180
9301
|
type: Boolean
|
|
9181
9302
|
},
|
|
9303
|
+
/**
|
|
9304
|
+
* Help text font color
|
|
9305
|
+
* @default: #ffffff
|
|
9306
|
+
*/
|
|
9182
9307
|
color: {
|
|
9183
9308
|
type: String,
|
|
9184
9309
|
default: "#ffffff"
|
|
9185
9310
|
},
|
|
9311
|
+
/**
|
|
9312
|
+
* Help text font size
|
|
9313
|
+
* @default: 14px
|
|
9314
|
+
*/
|
|
9186
9315
|
fontSize: {
|
|
9187
9316
|
type: String,
|
|
9188
9317
|
default: "14px"
|
|
9189
9318
|
},
|
|
9319
|
+
/**
|
|
9320
|
+
* Help text list
|
|
9321
|
+
*/
|
|
9190
9322
|
placement: {
|
|
9191
9323
|
type: String,
|
|
9192
9324
|
default: "right"
|
|
9193
9325
|
},
|
|
9326
|
+
/**
|
|
9327
|
+
* Help text list
|
|
9328
|
+
*/
|
|
9194
9329
|
text: {
|
|
9195
9330
|
type: [Array, String]
|
|
9196
9331
|
}
|
|
@@ -9250,11 +9385,23 @@ const BasicHelp_vue_vue_type_style_index_0_lang = "";
|
|
|
9250
9385
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
9251
9386
|
__name: "BasicTitle",
|
|
9252
9387
|
props: {
|
|
9388
|
+
/**
|
|
9389
|
+
* Help text list or string
|
|
9390
|
+
* @default: ''
|
|
9391
|
+
*/
|
|
9253
9392
|
helpMessage: {
|
|
9254
9393
|
type: [String, Array],
|
|
9255
9394
|
default: ""
|
|
9256
9395
|
},
|
|
9396
|
+
/**
|
|
9397
|
+
* Whether the color block on the left side of the title
|
|
9398
|
+
* @default: false
|
|
9399
|
+
*/
|
|
9257
9400
|
span: { type: Boolean },
|
|
9401
|
+
/**
|
|
9402
|
+
* Whether to default the text, that is, not bold
|
|
9403
|
+
* @default: false
|
|
9404
|
+
*/
|
|
9258
9405
|
normal: { type: Boolean }
|
|
9259
9406
|
},
|
|
9260
9407
|
setup(__props) {
|
|
@@ -9399,10 +9546,8 @@ const _sfc_main$B = defineComponent({
|
|
|
9399
9546
|
watch(
|
|
9400
9547
|
() => unref(visibleRef),
|
|
9401
9548
|
(v) => {
|
|
9402
|
-
var _a2;
|
|
9403
9549
|
emit("visible-change", v);
|
|
9404
9550
|
emit("update:visible", v);
|
|
9405
|
-
instance && ((_a2 = modalMethods.emitVisible) == null ? void 0 : _a2.call(modalMethods, v, instance.uid));
|
|
9406
9551
|
nextTick(() => {
|
|
9407
9552
|
if (props2.scrollTop && v && unref(modalWrapperRef)) {
|
|
9408
9553
|
unref(modalWrapperRef).scrollTop();
|
|
@@ -9697,6 +9842,7 @@ const basicProps$3 = {
|
|
|
9697
9842
|
type: Object,
|
|
9698
9843
|
default: () => ({})
|
|
9699
9844
|
},
|
|
9845
|
+
// 标签宽度 固定宽度
|
|
9700
9846
|
labelWidth: {
|
|
9701
9847
|
type: [Number, String],
|
|
9702
9848
|
default: 0
|
|
@@ -9706,6 +9852,7 @@ const basicProps$3 = {
|
|
|
9706
9852
|
default: () => []
|
|
9707
9853
|
},
|
|
9708
9854
|
compact: propTypes.bool,
|
|
9855
|
+
// 表单配置规则
|
|
9709
9856
|
schemas: {
|
|
9710
9857
|
type: [Array],
|
|
9711
9858
|
default: () => []
|
|
@@ -9721,35 +9868,50 @@ const basicProps$3 = {
|
|
|
9721
9868
|
type: Object
|
|
9722
9869
|
},
|
|
9723
9870
|
autoSetPlaceHolder: propTypes.bool.def(true),
|
|
9871
|
+
// 在INPUT组件上单击回车时,是否自动提交
|
|
9724
9872
|
autoSubmitOnEnter: propTypes.bool.def(false),
|
|
9725
9873
|
submitOnReset: propTypes.bool,
|
|
9726
9874
|
submitOnChange: propTypes.bool,
|
|
9727
9875
|
size: propTypes.oneOf(["default", "small", "large"]).def("default"),
|
|
9876
|
+
// 禁用表单
|
|
9728
9877
|
disabled: propTypes.bool,
|
|
9729
9878
|
emptySpan: {
|
|
9730
9879
|
type: [Number, Object],
|
|
9731
9880
|
default: 0
|
|
9732
9881
|
},
|
|
9882
|
+
// 是否显示收起展开按钮
|
|
9733
9883
|
showAdvancedButton: propTypes.bool,
|
|
9884
|
+
// 转化时间
|
|
9734
9885
|
transformDateFunc: {
|
|
9735
9886
|
type: Function,
|
|
9736
9887
|
default: (date) => {
|
|
9737
|
-
var _a2
|
|
9738
|
-
return (
|
|
9888
|
+
var _a2;
|
|
9889
|
+
return ((_a2 = date == null ? void 0 : date.format) == null ? void 0 : _a2.call(date, "YYYY-MM-DD HH:mm:ss")) ?? date;
|
|
9739
9890
|
}
|
|
9740
9891
|
},
|
|
9741
9892
|
rulesMessageJoinLabel: propTypes.bool.def(true),
|
|
9893
|
+
// 超过3行自动折叠
|
|
9742
9894
|
autoAdvancedLine: propTypes.number.def(3),
|
|
9895
|
+
// 不受折叠影响的行数
|
|
9743
9896
|
alwaysShowLines: propTypes.number.def(1),
|
|
9897
|
+
// 是否显示操作按钮
|
|
9744
9898
|
showActionButtonGroup: propTypes.bool.def(true),
|
|
9899
|
+
// 操作列Col配置
|
|
9745
9900
|
actionColOptions: Object,
|
|
9901
|
+
// 显示重置按钮
|
|
9746
9902
|
showResetButton: propTypes.bool.def(true),
|
|
9903
|
+
// 是否聚焦第一个输入框,只在第一个表单项为input的时候作用
|
|
9747
9904
|
autoFocusFirstItem: propTypes.bool,
|
|
9905
|
+
// 重置按钮配置
|
|
9748
9906
|
resetButtonOptions: Object,
|
|
9907
|
+
// 显示确认按钮
|
|
9749
9908
|
showSubmitButton: propTypes.bool.def(true),
|
|
9909
|
+
// 确认按钮配置
|
|
9750
9910
|
submitButtonOptions: Object,
|
|
9911
|
+
// 自定义重置函数
|
|
9751
9912
|
resetFunc: Function,
|
|
9752
9913
|
submitFunc: Function,
|
|
9914
|
+
// 以下为默认props
|
|
9753
9915
|
hideRequiredMark: propTypes.bool,
|
|
9754
9916
|
labelCol: Object,
|
|
9755
9917
|
layout: propTypes.oneOf(["horizontal", "vertical", "inline"]).def("horizontal"),
|
|
@@ -9885,7 +10047,9 @@ const _sfc_main$A = defineComponent({
|
|
|
9885
10047
|
formModel,
|
|
9886
10048
|
getSchema,
|
|
9887
10049
|
defaultValueRef,
|
|
10050
|
+
//@ts-ignore
|
|
9888
10051
|
formElRef,
|
|
10052
|
+
//@ts-ignore
|
|
9889
10053
|
schemaRef,
|
|
9890
10054
|
handleFormValues
|
|
9891
10055
|
});
|
|
@@ -9908,7 +10072,7 @@ const _sfc_main$A = defineComponent({
|
|
|
9908
10072
|
watch(
|
|
9909
10073
|
() => unref(getProps).schemas,
|
|
9910
10074
|
(schemas) => {
|
|
9911
|
-
resetSchema(schemas
|
|
10075
|
+
resetSchema(schemas ?? []);
|
|
9912
10076
|
}
|
|
9913
10077
|
);
|
|
9914
10078
|
watch(
|
|
@@ -9929,7 +10093,7 @@ const _sfc_main$A = defineComponent({
|
|
|
9929
10093
|
);
|
|
9930
10094
|
watch(
|
|
9931
10095
|
() => formModel,
|
|
9932
|
-
useDebounceFn(() => {
|
|
10096
|
+
useDebounceFn$1(() => {
|
|
9933
10097
|
unref(getProps).submitOnChange && handleSubmit();
|
|
9934
10098
|
}, 300),
|
|
9935
10099
|
{ deep: true }
|
|
@@ -10159,6 +10323,7 @@ function useForm(props2) {
|
|
|
10159
10323
|
var _a2;
|
|
10160
10324
|
(_a2 = unref(formRef)) == null ? void 0 : _a2.removeSchemaByField(field);
|
|
10161
10325
|
},
|
|
10326
|
+
// TODO promisify
|
|
10162
10327
|
getFieldsValue: () => {
|
|
10163
10328
|
var _a2;
|
|
10164
10329
|
return (_a2 = unref(formRef)) == null ? void 0 : _a2.getFieldsValue();
|
|
@@ -10271,16 +10436,21 @@ const treeProps = buildProps({
|
|
|
10271
10436
|
rightMenuList: {
|
|
10272
10437
|
type: Array
|
|
10273
10438
|
},
|
|
10439
|
+
// 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式)
|
|
10274
10440
|
filterFn: {
|
|
10275
10441
|
type: Function,
|
|
10276
10442
|
default: void 0
|
|
10277
10443
|
},
|
|
10444
|
+
// 高亮搜索值,仅高亮具体匹配值(通过title)值为true时使用默认色值,值为#xxx时使用此值替代且高亮开启
|
|
10278
10445
|
highlight: {
|
|
10279
10446
|
type: [Boolean, String],
|
|
10280
10447
|
default: false
|
|
10281
10448
|
},
|
|
10449
|
+
// 搜索完成时自动展开结果
|
|
10282
10450
|
expandOnSearch: Boolean,
|
|
10451
|
+
// 搜索完成自动选中所有结果,当且仅当 checkable===true 时生效
|
|
10283
10452
|
checkOnSearch: Boolean,
|
|
10453
|
+
// 搜索完成自动select所有结果
|
|
10284
10454
|
selectedOnSearch: Boolean,
|
|
10285
10455
|
loading: {
|
|
10286
10456
|
type: Boolean,
|
|
@@ -10400,7 +10570,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
10400
10570
|
function emitChange(value) {
|
|
10401
10571
|
emit("search", value);
|
|
10402
10572
|
}
|
|
10403
|
-
const debounceEmitChange = useDebounceFn(emitChange, 200);
|
|
10573
|
+
const debounceEmitChange = useDebounceFn$1(emitChange, 200);
|
|
10404
10574
|
watch(
|
|
10405
10575
|
() => searchValue.value,
|
|
10406
10576
|
(v) => {
|
|
@@ -10703,6 +10873,7 @@ const props$5 = {
|
|
|
10703
10873
|
default: true
|
|
10704
10874
|
},
|
|
10705
10875
|
axis: {
|
|
10876
|
+
// The position of the right mouse button click
|
|
10706
10877
|
type: Object,
|
|
10707
10878
|
default() {
|
|
10708
10879
|
return {
|
|
@@ -10712,6 +10883,7 @@ const props$5 = {
|
|
|
10712
10883
|
}
|
|
10713
10884
|
},
|
|
10714
10885
|
items: {
|
|
10886
|
+
// The most important list, if not, will not be displayed
|
|
10715
10887
|
type: Array,
|
|
10716
10888
|
default() {
|
|
10717
10889
|
return [];
|
|
@@ -11098,8 +11270,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
11098
11270
|
} = unref(getFieldNames);
|
|
11099
11271
|
const matchedKeys = [];
|
|
11100
11272
|
searchState.searchData = filter(unref(treeDataRef), (node) => {
|
|
11101
|
-
var _a2
|
|
11102
|
-
const result = filterFn ? filterFn(searchValue, node, unref(getFieldNames)) : (
|
|
11273
|
+
var _a2;
|
|
11274
|
+
const result = filterFn ? filterFn(searchValue, node, unref(getFieldNames)) : ((_a2 = node[titleField]) == null ? void 0 : _a2.includes(searchValue)) ?? false;
|
|
11103
11275
|
if (result) {
|
|
11104
11276
|
matchedKeys.push(node[keyField]);
|
|
11105
11277
|
}
|
|
@@ -11280,7 +11452,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
11280
11452
|
}), createVNode(Spin, {
|
|
11281
11453
|
"wrapperClassName": unref(props2.treeWrapperClassName),
|
|
11282
11454
|
"spinning": unref(props2.loading),
|
|
11283
|
-
"tip": "
|
|
11455
|
+
"tip": "加载中..."
|
|
11284
11456
|
}, {
|
|
11285
11457
|
default: () => [withDirectives(createVNode(ScrollContainer$1, {
|
|
11286
11458
|
"style": scrollStyle
|
|
@@ -11425,13 +11597,12 @@ const _sfc_main$u = defineComponent({
|
|
|
11425
11597
|
);
|
|
11426
11598
|
setCompensation({ useLayoutFooter: true, elements: [footerRef] });
|
|
11427
11599
|
const getClass = computed(() => {
|
|
11428
|
-
var _a2;
|
|
11429
11600
|
return [
|
|
11430
11601
|
prefixCls2,
|
|
11431
11602
|
{
|
|
11432
11603
|
[`${prefixCls2}--dense`]: props2.dense
|
|
11433
11604
|
},
|
|
11434
|
-
|
|
11605
|
+
attrs.class ?? {}
|
|
11435
11606
|
];
|
|
11436
11607
|
});
|
|
11437
11608
|
const getShowHeader = computed(
|
|
@@ -11611,32 +11782,49 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11611
11782
|
}
|
|
11612
11783
|
const HeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$j]]);
|
|
11613
11784
|
const componentSetting = {
|
|
11785
|
+
// basic-table setting
|
|
11614
11786
|
table: {
|
|
11787
|
+
// Form interface request general configuration
|
|
11788
|
+
// support xxx.xxx.xxx
|
|
11615
11789
|
fetchSetting: {
|
|
11790
|
+
// The field name of the current page passed to the background
|
|
11616
11791
|
pageField: "current",
|
|
11792
|
+
// The number field name of each page displayed in the background
|
|
11617
11793
|
sizeField: "size",
|
|
11794
|
+
// Field name of the form data returned by the interface
|
|
11618
11795
|
listField: "records",
|
|
11796
|
+
// Total number of tables returned by the interface field name
|
|
11619
11797
|
totalField: "total"
|
|
11620
11798
|
},
|
|
11799
|
+
// Number of pages that can be selected
|
|
11621
11800
|
pageSizeOptions: ["10", "50", "80", "100"],
|
|
11801
|
+
// Default display quantity on one page
|
|
11622
11802
|
defaultPageSize: 10,
|
|
11803
|
+
// Default Size
|
|
11623
11804
|
defaultSize: "middle",
|
|
11805
|
+
// Custom general sort function
|
|
11624
11806
|
defaultSortFn: (sortInfo) => {
|
|
11625
11807
|
const { field, order } = sortInfo;
|
|
11626
11808
|
if (field && order) {
|
|
11627
11809
|
return {
|
|
11810
|
+
// The sort field passed to the backend you
|
|
11628
11811
|
field,
|
|
11812
|
+
// Sorting method passed to the background asc/desc
|
|
11629
11813
|
order
|
|
11630
11814
|
};
|
|
11631
11815
|
} else {
|
|
11632
11816
|
return {};
|
|
11633
11817
|
}
|
|
11634
11818
|
},
|
|
11819
|
+
// Custom general filter function
|
|
11635
11820
|
defaultFilterFn: (data) => {
|
|
11636
11821
|
return data;
|
|
11637
11822
|
}
|
|
11638
11823
|
},
|
|
11824
|
+
// scrollbar setting
|
|
11639
11825
|
scrollbar: {
|
|
11826
|
+
// Whether to use native scroll bar
|
|
11827
|
+
// After opening, the menu, modal, drawer will change the pop-up scroll bar to native
|
|
11640
11828
|
native: false
|
|
11641
11829
|
},
|
|
11642
11830
|
tree: {
|
|
@@ -11681,7 +11869,7 @@ function usePagination$1(refProps) {
|
|
|
11681
11869
|
if (!isBoolean(pagination) && pagination) {
|
|
11682
11870
|
configRef.value = {
|
|
11683
11871
|
...unref(configRef),
|
|
11684
|
-
...pagination
|
|
11872
|
+
...pagination ?? {}
|
|
11685
11873
|
};
|
|
11686
11874
|
}
|
|
11687
11875
|
});
|
|
@@ -11697,7 +11885,7 @@ function usePagination$1(refProps) {
|
|
|
11697
11885
|
pageSize: PAGE_SIZE,
|
|
11698
11886
|
size: "small",
|
|
11699
11887
|
defaultPageSize: PAGE_SIZE,
|
|
11700
|
-
showTotal: (total) =>
|
|
11888
|
+
showTotal: (total) => `共 ${total} 条数据`,
|
|
11701
11889
|
showSizeChanger: true,
|
|
11702
11890
|
pageSizeOptions: PAGE_SIZE_OPTIONS,
|
|
11703
11891
|
itemRender,
|
|
@@ -11828,13 +12016,13 @@ const ClickOutside = {
|
|
|
11828
12016
|
};
|
|
11829
12017
|
function createPlaceholderMessage(component) {
|
|
11830
12018
|
if (component.includes("Input") || component.includes("AutoComplete")) {
|
|
11831
|
-
return "
|
|
12019
|
+
return "请输入";
|
|
11832
12020
|
}
|
|
11833
12021
|
if (component.includes("Picker")) {
|
|
11834
|
-
return "
|
|
12022
|
+
return "请选择";
|
|
11835
12023
|
}
|
|
11836
12024
|
if (component.includes("Select") || component.includes("Checkbox") || component.includes("Radio") || component.includes("Switch") || component.includes("DatePicker") || component.includes("TimePicker")) {
|
|
11837
|
-
return "
|
|
12025
|
+
return "请选择";
|
|
11838
12026
|
}
|
|
11839
12027
|
return "";
|
|
11840
12028
|
}
|
|
@@ -11891,24 +12079,24 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
11891
12079
|
return ["Checkbox", "Switch"].includes(component);
|
|
11892
12080
|
});
|
|
11893
12081
|
const getComponentProps = computed(() => {
|
|
11894
|
-
var _a2
|
|
12082
|
+
var _a2;
|
|
11895
12083
|
const isCheckValue = unref(getIsCheckComp);
|
|
11896
12084
|
const valueField = isCheckValue ? "checked" : "value";
|
|
11897
12085
|
const val = unref(currentValueRef);
|
|
11898
12086
|
const value = isCheckValue ? isNumber$2(val) && isBoolean(val) ? val : !!val : val;
|
|
11899
|
-
let compProps = (
|
|
12087
|
+
let compProps = ((_a2 = props2.column) == null ? void 0 : _a2.editComponentProps) ?? {};
|
|
11900
12088
|
const {
|
|
11901
12089
|
record,
|
|
11902
12090
|
column,
|
|
11903
12091
|
index: index2
|
|
11904
12092
|
} = props2;
|
|
11905
12093
|
if (isFunction$4(compProps)) {
|
|
11906
|
-
compProps =
|
|
12094
|
+
compProps = compProps({
|
|
11907
12095
|
text: val,
|
|
11908
12096
|
record,
|
|
11909
12097
|
column,
|
|
11910
12098
|
index: index2
|
|
11911
|
-
})
|
|
12099
|
+
}) ?? {};
|
|
11912
12100
|
}
|
|
11913
12101
|
const component = unref(getComponent);
|
|
11914
12102
|
const apiSelectProps = {};
|
|
@@ -11920,10 +12108,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
11920
12108
|
showCount: true,
|
|
11921
12109
|
maxlength: 100,
|
|
11922
12110
|
size: "small",
|
|
11923
|
-
getPopupContainer: () =>
|
|
11924
|
-
var _a3;
|
|
11925
|
-
return (_a3 = unref(table2 == null ? void 0 : table2.wrapRef.value)) != null ? _a3 : document.body;
|
|
11926
|
-
},
|
|
12111
|
+
getPopupContainer: () => unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
|
|
11927
12112
|
placeholder: createPlaceholderMessage(unref(getComponent)),
|
|
11928
12113
|
...apiSelectProps,
|
|
11929
12114
|
...compProps,
|
|
@@ -11962,7 +12147,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
11962
12147
|
return disabled;
|
|
11963
12148
|
});
|
|
11964
12149
|
const getValues = computed(() => {
|
|
11965
|
-
var _a2
|
|
12150
|
+
var _a2;
|
|
11966
12151
|
const {
|
|
11967
12152
|
editValueMap
|
|
11968
12153
|
} = props2.column;
|
|
@@ -11974,9 +12159,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
11974
12159
|
if (!component.includes("Select") && !component.includes("Radio")) {
|
|
11975
12160
|
return value;
|
|
11976
12161
|
}
|
|
11977
|
-
const options = (
|
|
12162
|
+
const options = ((_a2 = unref(getComponentProps)) == null ? void 0 : _a2.options) ?? (unref(optionsRef) || []);
|
|
11978
12163
|
const option = options.find((item) => `${item.value}` === `${value}`);
|
|
11979
|
-
return (
|
|
12164
|
+
return (option == null ? void 0 : option.label) ?? value;
|
|
11980
12165
|
});
|
|
11981
12166
|
const getWrapperStyle = computed(() => {
|
|
11982
12167
|
if (unref(getIsCheckComp) || unref(getRowEditable)) {
|
|
@@ -12258,7 +12443,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
12258
12443
|
};
|
|
12259
12444
|
},
|
|
12260
12445
|
render() {
|
|
12261
|
-
var _a2;
|
|
12262
12446
|
return createVNode("div", {
|
|
12263
12447
|
"class": this.prefixCls
|
|
12264
12448
|
}, [withDirectives(createVNode("div", {
|
|
@@ -12269,13 +12453,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
12269
12453
|
"onClick": this.handleEdit
|
|
12270
12454
|
}, [createVNode("div", {
|
|
12271
12455
|
"class": "cell-content",
|
|
12272
|
-
"title": this.column.ellipsis ?
|
|
12456
|
+
"title": this.column.ellipsis ? this.getValues ?? "" : ""
|
|
12273
12457
|
}, [this.column.editRender ? this.column.editRender({
|
|
12274
12458
|
text: this.value,
|
|
12275
12459
|
record: this.record,
|
|
12276
12460
|
column: this.column,
|
|
12277
12461
|
index: this.index
|
|
12278
|
-
}) : this.getValues ? this.getValues : "
|
|
12462
|
+
}) : this.getValues ? this.getValues : " "]), !this.column.editRow && createVNode(FormOutlined$1, {
|
|
12279
12463
|
"class": `${this.prefixCls}__normal-icon`
|
|
12280
12464
|
}, null)]), [[vShow, !this.isEdit]]), this.isEdit && createVNode(Spin, {
|
|
12281
12465
|
"spinning": this.spinning
|
|
@@ -12393,7 +12577,7 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
|
|
|
12393
12577
|
columns.unshift({
|
|
12394
12578
|
flag: INDEX_COLUMN_FLAG,
|
|
12395
12579
|
width: 50,
|
|
12396
|
-
title: "
|
|
12580
|
+
title: "序号",
|
|
12397
12581
|
align: "center",
|
|
12398
12582
|
customRender: ({ index: index2 }) => {
|
|
12399
12583
|
const getPagination = unref(getPaginationRef);
|
|
@@ -12486,9 +12670,8 @@ function useColumns(propsRef, getPaginationRef) {
|
|
|
12486
12670
|
watch(
|
|
12487
12671
|
() => unref(propsRef).columns,
|
|
12488
12672
|
(columns) => {
|
|
12489
|
-
var _a2;
|
|
12490
12673
|
columnsRef.value = columns;
|
|
12491
|
-
cacheColumns = (
|
|
12674
|
+
cacheColumns = (columns == null ? void 0 : columns.filter((item) => !item.flag)) ?? [];
|
|
12492
12675
|
}
|
|
12493
12676
|
);
|
|
12494
12677
|
function setCacheColumnsByField(dataIndex, value) {
|
|
@@ -12751,7 +12934,7 @@ function useDataSource(propsRef, {
|
|
|
12751
12934
|
}
|
|
12752
12935
|
function insertTableDataRecord(record, index2) {
|
|
12753
12936
|
var _a2;
|
|
12754
|
-
index2 = index2
|
|
12937
|
+
index2 = index2 ?? ((_a2 = dataSourceRef.value) == null ? void 0 : _a2.length);
|
|
12755
12938
|
unref(dataSourceRef).splice(index2, 0, record);
|
|
12756
12939
|
return unref(dataSourceRef);
|
|
12757
12940
|
}
|
|
@@ -12783,7 +12966,6 @@ function useDataSource(propsRef, {
|
|
|
12783
12966
|
return findRow(dataSourceRef.value);
|
|
12784
12967
|
}
|
|
12785
12968
|
async function fetch(opt) {
|
|
12786
|
-
var _a2, _b, _c;
|
|
12787
12969
|
const {
|
|
12788
12970
|
api,
|
|
12789
12971
|
searchInfo,
|
|
@@ -12818,12 +13000,12 @@ function useDataSource(propsRef, {
|
|
|
12818
13000
|
pageParams,
|
|
12819
13001
|
useSearchForm ? getFieldsValue() : {},
|
|
12820
13002
|
searchInfo,
|
|
12821
|
-
(
|
|
13003
|
+
(opt == null ? void 0 : opt.searchInfo) ?? {},
|
|
12822
13004
|
defSort,
|
|
12823
13005
|
sortInfo,
|
|
12824
13006
|
filterInfo,
|
|
12825
|
-
(
|
|
12826
|
-
(
|
|
13007
|
+
(opt == null ? void 0 : opt.sortInfo) ?? {},
|
|
13008
|
+
(opt == null ? void 0 : opt.filterInfo) ?? {}
|
|
12827
13009
|
);
|
|
12828
13010
|
if (beforeFetch && isFunction$4(beforeFetch)) {
|
|
12829
13011
|
params = await beforeFetch(params) || params;
|
|
@@ -12973,13 +13155,12 @@ function useRowSelection(propsRef, tableData, emit) {
|
|
|
12973
13155
|
return unref(getAutoCreateKey) ? ROW_KEY : rowKey;
|
|
12974
13156
|
});
|
|
12975
13157
|
function setSelectedRowKeys(rowKeys) {
|
|
12976
|
-
var _a2;
|
|
12977
13158
|
selectedRowKeysRef.value = rowKeys;
|
|
12978
13159
|
const allSelectedRows = findNodeAll(
|
|
12979
13160
|
toRaw(unref(tableData)).concat(toRaw(unref(selectedRowRef))),
|
|
12980
13161
|
(item) => rowKeys == null ? void 0 : rowKeys.includes(item[unref(getRowKey)]),
|
|
12981
13162
|
{
|
|
12982
|
-
children:
|
|
13163
|
+
children: propsRef.value.childrenColumnName ?? "children"
|
|
12983
13164
|
}
|
|
12984
13165
|
);
|
|
12985
13166
|
const trueSelectedRows = [];
|
|
@@ -13028,7 +13209,7 @@ function useRowSelection(propsRef, tableData, emit) {
|
|
|
13028
13209
|
function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDataSourceRef, wrapRef, formRef) {
|
|
13029
13210
|
const tableHeightRef = ref(167);
|
|
13030
13211
|
const modalFn = useModalContext();
|
|
13031
|
-
const debounceRedoHeight = useDebounceFn(redoHeight, 100);
|
|
13212
|
+
const debounceRedoHeight = useDebounceFn$1(redoHeight, 100);
|
|
13032
13213
|
const getCanResize = computed(() => {
|
|
13033
13214
|
const { canResize, scroll } = unref(propsRef);
|
|
13034
13215
|
return canResize && !(scroll || {}).y;
|
|
@@ -13059,7 +13240,7 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDa
|
|
|
13059
13240
|
let footerEl;
|
|
13060
13241
|
let bodyEl;
|
|
13061
13242
|
async function calcTableHeight() {
|
|
13062
|
-
var _a2, _b, _c
|
|
13243
|
+
var _a2, _b, _c;
|
|
13063
13244
|
const {
|
|
13064
13245
|
resizeHeightOffset,
|
|
13065
13246
|
pagination,
|
|
@@ -13129,8 +13310,8 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDa
|
|
|
13129
13310
|
const tablePadding = 12;
|
|
13130
13311
|
const formMargin = 16;
|
|
13131
13312
|
let paginationMargin = 10;
|
|
13132
|
-
const wrapHeight = (
|
|
13133
|
-
let formHeight = (
|
|
13313
|
+
const wrapHeight = ((_a2 = unref(wrapRef)) == null ? void 0 : _a2.offsetHeight) ?? 0;
|
|
13314
|
+
let formHeight = ((_b = unref(formRef)) == null ? void 0 : _b.$el.offsetHeight) ?? 0;
|
|
13134
13315
|
if (formHeight) {
|
|
13135
13316
|
formHeight += formMargin;
|
|
13136
13317
|
}
|
|
@@ -13140,13 +13321,13 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDa
|
|
|
13140
13321
|
if (isBoolean(useSearchForm) && !useSearchForm) {
|
|
13141
13322
|
paddingHeight = 0;
|
|
13142
13323
|
}
|
|
13143
|
-
const headerCellHeight = (
|
|
13324
|
+
const headerCellHeight = ((_c = tableEl.querySelector(".ant-table-title")) == null ? void 0 : _c.offsetHeight) ?? 0;
|
|
13144
13325
|
bottomIncludeBody = wrapHeight - formHeight - headerCellHeight - tablePadding - paginationMargin;
|
|
13145
13326
|
} else {
|
|
13146
13327
|
bottomIncludeBody = getViewportOffset(headEl).bottomIncludeBody;
|
|
13147
13328
|
}
|
|
13148
13329
|
let height = bottomIncludeBody - (resizeHeightOffset || 0) - paddingHeight - paginationHeight - footerHeight - headerHeight;
|
|
13149
|
-
height = (
|
|
13330
|
+
height = (height > maxHeight ? maxHeight : height) ?? height;
|
|
13150
13331
|
setHeight(height);
|
|
13151
13332
|
bodyEl.style.height = `${height}px`;
|
|
13152
13333
|
}
|
|
@@ -13158,7 +13339,7 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDa
|
|
|
13158
13339
|
});
|
|
13159
13340
|
});
|
|
13160
13341
|
const getScrollX = computed(() => {
|
|
13161
|
-
var _a2
|
|
13342
|
+
var _a2;
|
|
13162
13343
|
let width = 0;
|
|
13163
13344
|
if (unref(rowSelectionRef)) {
|
|
13164
13345
|
width += 60;
|
|
@@ -13176,7 +13357,7 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDa
|
|
|
13176
13357
|
width += len * NORMAL_WIDTH;
|
|
13177
13358
|
}
|
|
13178
13359
|
const table2 = unref(tableElRef);
|
|
13179
|
-
const tableWidth = (
|
|
13360
|
+
const tableWidth = ((_a2 = table2 == null ? void 0 : table2.$el) == null ? void 0 : _a2.offsetWidth) ?? 0;
|
|
13180
13361
|
return tableWidth > width ? "100%" : width;
|
|
13181
13362
|
});
|
|
13182
13363
|
const getScrollRef = computed(() => {
|
|
@@ -13194,14 +13375,13 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef, getDa
|
|
|
13194
13375
|
function useTableScrollTo(tableElRef, getDataSourceRef) {
|
|
13195
13376
|
let bodyEl;
|
|
13196
13377
|
async function findTargetRowToScroll(targetRowData) {
|
|
13197
|
-
var _a2;
|
|
13198
13378
|
const { id } = targetRowData;
|
|
13199
13379
|
const targetRowEl = bodyEl == null ? void 0 : bodyEl.querySelector(
|
|
13200
13380
|
`[data-row-key="${id}"]`
|
|
13201
13381
|
);
|
|
13202
13382
|
await nextTick();
|
|
13203
13383
|
bodyEl == null ? void 0 : bodyEl.scrollTo({
|
|
13204
|
-
top: (
|
|
13384
|
+
top: (targetRowEl == null ? void 0 : targetRowEl.offsetTop) ?? 0,
|
|
13205
13385
|
behavior: "smooth"
|
|
13206
13386
|
});
|
|
13207
13387
|
}
|
|
@@ -13855,7 +14035,7 @@ const _sfc_main$n = defineComponent({
|
|
|
13855
14035
|
return { redo, t: t2 };
|
|
13856
14036
|
}
|
|
13857
14037
|
});
|
|
13858
|
-
const _hoisted_1$b = /* @__PURE__ */ createElementVNode("span", null, "
|
|
14038
|
+
const _hoisted_1$b = /* @__PURE__ */ createElementVNode("span", null, "显隐搜索", -1);
|
|
13859
14039
|
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13860
14040
|
const _component_BarsOutlined = resolveComponent("BarsOutlined");
|
|
13861
14041
|
const _component_Tooltip = resolveComponent("Tooltip");
|
|
@@ -13875,6 +14055,7 @@ const _sfc_main$m = defineComponent({
|
|
|
13875
14055
|
components: {
|
|
13876
14056
|
ColumnSetting,
|
|
13877
14057
|
SizeSetting,
|
|
14058
|
+
// RedoSetting,
|
|
13878
14059
|
FullScreenSetting,
|
|
13879
14060
|
ShowSearchSetting
|
|
13880
14061
|
},
|
|
@@ -13938,6 +14119,8 @@ const TableSettingComponent = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render
|
|
|
13938
14119
|
const _sfc_main$l = defineComponent({
|
|
13939
14120
|
name: "BasicTableHeader",
|
|
13940
14121
|
components: {
|
|
14122
|
+
// Divider,
|
|
14123
|
+
// TableTitle,
|
|
13941
14124
|
TableSetting: TableSettingComponent
|
|
13942
14125
|
},
|
|
13943
14126
|
props: {
|
|
@@ -14219,10 +14402,10 @@ function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
|
14219
14402
|
return keys2.map((item) => item.startsWith("form-") ? item : null).filter((item) => !!item);
|
|
14220
14403
|
});
|
|
14221
14404
|
function replaceFormSlotKey(key2) {
|
|
14222
|
-
var _a2
|
|
14405
|
+
var _a2;
|
|
14223
14406
|
if (!key2)
|
|
14224
14407
|
return "";
|
|
14225
|
-
return (
|
|
14408
|
+
return ((_a2 = key2 == null ? void 0 : key2.replace) == null ? void 0 : _a2.call(key2, /form\-/, "")) ?? "";
|
|
14226
14409
|
}
|
|
14227
14410
|
function handleSearchInfoChange(info) {
|
|
14228
14411
|
const { handleSearchInfoFn } = unref(propsRef);
|
|
@@ -14287,17 +14470,22 @@ const basicProps$2 = {
|
|
|
14287
14470
|
return FETCH_SETTING;
|
|
14288
14471
|
}
|
|
14289
14472
|
},
|
|
14473
|
+
// 立即请求接口
|
|
14290
14474
|
immediate: { type: Boolean, default: true },
|
|
14291
14475
|
emptyDataIsShowTable: { type: Boolean, default: true },
|
|
14476
|
+
// 额外的请求参数
|
|
14292
14477
|
searchInfo: {
|
|
14293
14478
|
type: Object,
|
|
14294
14479
|
default: null
|
|
14295
14480
|
},
|
|
14481
|
+
// 默认的排序参数
|
|
14296
14482
|
defSort: {
|
|
14297
14483
|
type: Object,
|
|
14298
14484
|
default: null
|
|
14299
14485
|
},
|
|
14486
|
+
// 使用搜索表单
|
|
14300
14487
|
useSearchForm: propTypes.bool,
|
|
14488
|
+
// 表单配置
|
|
14301
14489
|
formConfig: {
|
|
14302
14490
|
type: Object,
|
|
14303
14491
|
default: null
|
|
@@ -14515,6 +14703,7 @@ const _sfc_main$j = defineComponent({
|
|
|
14515
14703
|
tableLayout: "fixed",
|
|
14516
14704
|
rowSelection: unref(getRowSelectionRef),
|
|
14517
14705
|
rowKey: unref(getRowKey),
|
|
14706
|
+
// @ts-ignore
|
|
14518
14707
|
columns: toRaw(unref(getViewColumns)).map((item) => {
|
|
14519
14708
|
return item;
|
|
14520
14709
|
}),
|
|
@@ -14686,6 +14875,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
14686
14875
|
__name: "Dropdown",
|
|
14687
14876
|
props: {
|
|
14688
14877
|
popconfirm: Boolean,
|
|
14878
|
+
/**
|
|
14879
|
+
* the trigger mode which executes the drop-down action
|
|
14880
|
+
* @default ['hover']
|
|
14881
|
+
* @type string[]
|
|
14882
|
+
*/
|
|
14689
14883
|
trigger: {
|
|
14690
14884
|
type: [Array],
|
|
14691
14885
|
default: () => {
|
|
@@ -14837,10 +15031,7 @@ const _sfc_main$h = defineComponent({
|
|
|
14837
15031
|
}).map((action) => {
|
|
14838
15032
|
const { popConfirm } = action;
|
|
14839
15033
|
return {
|
|
14840
|
-
getPopupContainer: () =>
|
|
14841
|
-
var _a2;
|
|
14842
|
-
return (_a2 = unref(table2 == null ? void 0 : table2.wrapRef.value)) != null ? _a2 : document.body;
|
|
14843
|
-
},
|
|
15034
|
+
getPopupContainer: () => unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
|
|
14844
15035
|
type: "link",
|
|
14845
15036
|
size: "small",
|
|
14846
15037
|
...action,
|
|
@@ -14868,19 +15059,16 @@ const _sfc_main$h = defineComponent({
|
|
|
14868
15059
|
});
|
|
14869
15060
|
});
|
|
14870
15061
|
const getAlign = computed(() => {
|
|
14871
|
-
var _a2
|
|
15062
|
+
var _a2;
|
|
14872
15063
|
const columns = ((_a2 = table2 == null ? void 0 : table2.getColumns) == null ? void 0 : _a2.call(table2)) || [];
|
|
14873
15064
|
const actionColumn = columns.find(
|
|
14874
15065
|
(item) => item.flag === ACTION_COLUMN_FLAG
|
|
14875
15066
|
);
|
|
14876
|
-
return (
|
|
15067
|
+
return (actionColumn == null ? void 0 : actionColumn.align) ?? "left";
|
|
14877
15068
|
});
|
|
14878
15069
|
function getTooltip(data) {
|
|
14879
15070
|
return {
|
|
14880
|
-
getPopupContainer: () =>
|
|
14881
|
-
var _a2;
|
|
14882
|
-
return (_a2 = unref(table2 == null ? void 0 : table2.wrapRef.value)) != null ? _a2 : document.body;
|
|
14883
|
-
},
|
|
15071
|
+
getPopupContainer: () => unref(table2 == null ? void 0 : table2.wrapRef.value) ?? document.body,
|
|
14884
15072
|
placement: "bottom",
|
|
14885
15073
|
...isString$3(data) ? { title: data } : data
|
|
14886
15074
|
};
|
|
@@ -14989,10 +15177,15 @@ const _sfc_main$g = defineComponent({
|
|
|
14989
15177
|
props: {
|
|
14990
15178
|
imgList: propTypes.arrayOf(propTypes.string),
|
|
14991
15179
|
size: propTypes.number.def(40),
|
|
15180
|
+
// 是否简单显示(只显示第一张图片)
|
|
14992
15181
|
simpleShow: propTypes.bool,
|
|
15182
|
+
// 简单模式下是否显示图片数量的badge
|
|
14993
15183
|
showBadge: propTypes.bool.def(true),
|
|
15184
|
+
// 图片间距
|
|
14994
15185
|
margin: propTypes.number.def(4),
|
|
15186
|
+
// src前缀,将会附加在imgList中每一项之前
|
|
14995
15187
|
srcPrefix: propTypes.string.def(""),
|
|
15188
|
+
// fallback,加载失败显示图像占位符。
|
|
14996
15189
|
fallback: propTypes.string.def(
|
|
14997
15190
|
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="
|
|
14998
15191
|
)
|
|
@@ -15245,7 +15438,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
15245
15438
|
const [registerTable, tableAction] = useTable$1({
|
|
15246
15439
|
api: () => {
|
|
15247
15440
|
},
|
|
15248
|
-
title: "
|
|
15441
|
+
title: "账号列表",
|
|
15249
15442
|
rowKey: "id",
|
|
15250
15443
|
columns: [],
|
|
15251
15444
|
rowSelection: { type: "radio" },
|
|
@@ -15255,6 +15448,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
15255
15448
|
schemas: []
|
|
15256
15449
|
},
|
|
15257
15450
|
showIndexColumn: true,
|
|
15451
|
+
// isCanResizeParent: true,
|
|
15258
15452
|
resizeHeightOffset: 200,
|
|
15259
15453
|
canResize: true,
|
|
15260
15454
|
searchInfo: {},
|
|
@@ -15553,6 +15747,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
15553
15747
|
const useWrapper = computed(() => !!unref(getMergeProps).title);
|
|
15554
15748
|
const getCollapseOptions = computed(() => {
|
|
15555
15749
|
return {
|
|
15750
|
+
// Cannot be expanded by default
|
|
15556
15751
|
canExpand: false,
|
|
15557
15752
|
...unref(getProps).collapseOptions
|
|
15558
15753
|
};
|
|
@@ -15611,7 +15806,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
15611
15806
|
if (getField && !toRefs(_data).hasOwnProperty(field)) {
|
|
15612
15807
|
return isFunction$4(render3) ? render3("", _data) : "";
|
|
15613
15808
|
}
|
|
15614
|
-
return isFunction$4(render3) ? render3(getField, _data) : getField
|
|
15809
|
+
return isFunction$4(render3) ? render3(getField, _data) : getField ?? "";
|
|
15615
15810
|
};
|
|
15616
15811
|
const width = contentMinWidth;
|
|
15617
15812
|
return createVNode(Descriptions.Item, {
|
|
@@ -15695,12 +15890,18 @@ function useDescription(props2) {
|
|
|
15695
15890
|
}
|
|
15696
15891
|
const footerProps = {
|
|
15697
15892
|
confirmLoading: { type: Boolean },
|
|
15893
|
+
/**
|
|
15894
|
+
* @description: Show close button
|
|
15895
|
+
*/
|
|
15698
15896
|
showCancelBtn: { type: Boolean, default: true },
|
|
15699
15897
|
cancelButtonProps: Object,
|
|
15700
|
-
cancelText: { type: String, default: "
|
|
15898
|
+
cancelText: { type: String, default: "关闭" },
|
|
15899
|
+
/**
|
|
15900
|
+
* @description: Show confirmation button
|
|
15901
|
+
*/
|
|
15701
15902
|
showOkBtn: { type: Boolean, default: true },
|
|
15702
15903
|
okButtonProps: Object,
|
|
15703
|
-
okText: { type: String, default: "
|
|
15904
|
+
okText: { type: String, default: "确认" },
|
|
15704
15905
|
okType: { type: String, default: "primary" },
|
|
15705
15906
|
showFooter: { type: Boolean },
|
|
15706
15907
|
footerHeight: {
|
|
@@ -15925,9 +16126,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
15925
16126
|
() => visibleRef.value,
|
|
15926
16127
|
(visible) => {
|
|
15927
16128
|
nextTick(() => {
|
|
15928
|
-
var _a2;
|
|
15929
16129
|
emit("visible-change", visible);
|
|
15930
|
-
instance && ((_a2 = drawerInstance.emitVisible) == null ? void 0 : _a2.call(drawerInstance, visible, instance.uid));
|
|
15931
16130
|
});
|
|
15932
16131
|
}
|
|
15933
16132
|
);
|
|
@@ -16313,39 +16512,70 @@ var REGEXP_TAG_NAME = /^img|canvas$/i;
|
|
|
16313
16512
|
var MIN_CONTAINER_WIDTH = 200;
|
|
16314
16513
|
var MIN_CONTAINER_HEIGHT = 100;
|
|
16315
16514
|
var DEFAULTS = {
|
|
16515
|
+
// Define the view mode of the cropper
|
|
16316
16516
|
viewMode: 0,
|
|
16517
|
+
// 0, 1, 2, 3
|
|
16518
|
+
// Define the dragging mode of the cropper
|
|
16317
16519
|
dragMode: DRAG_MODE_CROP,
|
|
16520
|
+
// 'crop', 'move' or 'none'
|
|
16521
|
+
// Define the initial aspect ratio of the crop box
|
|
16318
16522
|
initialAspectRatio: NaN,
|
|
16523
|
+
// Define the aspect ratio of the crop box
|
|
16319
16524
|
aspectRatio: NaN,
|
|
16525
|
+
// An object with the previous cropping result data
|
|
16320
16526
|
data: null,
|
|
16527
|
+
// A selector for adding extra containers to preview
|
|
16321
16528
|
preview: "",
|
|
16529
|
+
// Re-render the cropper when resize the window
|
|
16322
16530
|
responsive: true,
|
|
16531
|
+
// Restore the cropped area after resize the window
|
|
16323
16532
|
restore: true,
|
|
16533
|
+
// Check if the current image is a cross-origin image
|
|
16324
16534
|
checkCrossOrigin: true,
|
|
16535
|
+
// Check the current image's Exif Orientation information
|
|
16325
16536
|
checkOrientation: true,
|
|
16537
|
+
// Show the black modal
|
|
16326
16538
|
modal: true,
|
|
16539
|
+
// Show the dashed lines for guiding
|
|
16327
16540
|
guides: true,
|
|
16541
|
+
// Show the center indicator for guiding
|
|
16328
16542
|
center: true,
|
|
16543
|
+
// Show the white modal to highlight the crop box
|
|
16329
16544
|
highlight: true,
|
|
16545
|
+
// Show the grid background
|
|
16330
16546
|
background: true,
|
|
16547
|
+
// Enable to crop the image automatically when initialize
|
|
16331
16548
|
autoCrop: true,
|
|
16549
|
+
// Define the percentage of automatic cropping area when initializes
|
|
16332
16550
|
autoCropArea: 0.8,
|
|
16551
|
+
// Enable to move the image
|
|
16333
16552
|
movable: true,
|
|
16553
|
+
// Enable to rotate the image
|
|
16334
16554
|
rotatable: true,
|
|
16555
|
+
// Enable to scale the image
|
|
16335
16556
|
scalable: true,
|
|
16557
|
+
// Enable to zoom the image
|
|
16336
16558
|
zoomable: true,
|
|
16559
|
+
// Enable to zoom the image by dragging touch
|
|
16337
16560
|
zoomOnTouch: true,
|
|
16561
|
+
// Enable to zoom the image by wheeling mouse
|
|
16338
16562
|
zoomOnWheel: true,
|
|
16563
|
+
// Define zoom ratio when zoom the image by wheeling mouse
|
|
16339
16564
|
wheelZoomRatio: 0.1,
|
|
16565
|
+
// Enable to move the crop box
|
|
16340
16566
|
cropBoxMovable: true,
|
|
16567
|
+
// Enable to resize the crop box
|
|
16341
16568
|
cropBoxResizable: true,
|
|
16569
|
+
// Toggle drag mode between "crop" and "move" when click twice on the cropper
|
|
16342
16570
|
toggleDragModeOnDblclick: true,
|
|
16571
|
+
// Size limitation
|
|
16343
16572
|
minCanvasWidth: 0,
|
|
16344
16573
|
minCanvasHeight: 0,
|
|
16345
16574
|
minCropBoxWidth: 0,
|
|
16346
16575
|
minCropBoxHeight: 0,
|
|
16347
16576
|
minContainerWidth: MIN_CONTAINER_WIDTH,
|
|
16348
16577
|
minContainerHeight: MIN_CONTAINER_HEIGHT,
|
|
16578
|
+
// Shortcuts of events
|
|
16349
16579
|
ready: null,
|
|
16350
16580
|
cropstart: null,
|
|
16351
16581
|
cropmove: null,
|
|
@@ -16540,6 +16770,11 @@ var onceSupported = function() {
|
|
|
16540
16770
|
supported = true;
|
|
16541
16771
|
return once;
|
|
16542
16772
|
},
|
|
16773
|
+
/**
|
|
16774
|
+
* This setter can fix a `TypeError` in strict mode
|
|
16775
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
|
|
16776
|
+
* @param {boolean} value - The value to set
|
|
16777
|
+
*/
|
|
16543
16778
|
set: function set2(value) {
|
|
16544
16779
|
once = value;
|
|
16545
16780
|
}
|
|
@@ -16623,7 +16858,7 @@ function isCrossOriginURL(url) {
|
|
|
16623
16858
|
return parts !== null && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port);
|
|
16624
16859
|
}
|
|
16625
16860
|
function addTimestamp(url) {
|
|
16626
|
-
var timestamp = "timestamp=".concat(new Date().getTime());
|
|
16861
|
+
var timestamp = "timestamp=".concat((/* @__PURE__ */ new Date()).getTime());
|
|
16627
16862
|
return url + (url.indexOf("?") === -1 ? "?" : "&") + timestamp;
|
|
16628
16863
|
}
|
|
16629
16864
|
function getTransforms(_ref) {
|
|
@@ -16936,6 +17171,7 @@ var render = {
|
|
|
16936
17171
|
addClass(element, CLASS_HIDDEN);
|
|
16937
17172
|
removeClass(cropper2, CLASS_HIDDEN);
|
|
16938
17173
|
},
|
|
17174
|
+
// Canvas (image wrapper)
|
|
16939
17175
|
initCanvas: function initCanvas() {
|
|
16940
17176
|
var containerData = this.containerData, imageData = this.imageData;
|
|
16941
17177
|
var viewMode = this.options.viewMode;
|
|
@@ -17452,7 +17688,8 @@ var handlers = {
|
|
|
17452
17688
|
},
|
|
17453
17689
|
cropStart: function cropStart(event) {
|
|
17454
17690
|
var buttons = event.buttons, button = event.button;
|
|
17455
|
-
if (this.disabled || (event.type === "mousedown" || event.type === "pointerdown" && event.pointerType === "mouse") &&
|
|
17691
|
+
if (this.disabled || (event.type === "mousedown" || event.type === "pointerdown" && event.pointerType === "mouse") && // No primary button (Usually the left button)
|
|
17692
|
+
(isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 || event.ctrlKey)) {
|
|
17456
17693
|
return;
|
|
17457
17694
|
}
|
|
17458
17695
|
var options = this.options, pointers = this.pointers;
|
|
@@ -17907,6 +18144,7 @@ var change = {
|
|
|
17907
18144
|
}
|
|
17908
18145
|
};
|
|
17909
18146
|
var methods = {
|
|
18147
|
+
// Show the crop box manually
|
|
17910
18148
|
crop: function crop() {
|
|
17911
18149
|
if (this.ready && !this.cropped && !this.disabled) {
|
|
17912
18150
|
this.cropped = true;
|
|
@@ -17919,6 +18157,7 @@ var methods = {
|
|
|
17919
18157
|
}
|
|
17920
18158
|
return this;
|
|
17921
18159
|
},
|
|
18160
|
+
// Reset the image and crop box to their initial states
|
|
17922
18161
|
reset: function reset() {
|
|
17923
18162
|
if (this.ready && !this.disabled) {
|
|
17924
18163
|
this.imageData = assign({}, this.initialImageData);
|
|
@@ -17931,6 +18170,7 @@ var methods = {
|
|
|
17931
18170
|
}
|
|
17932
18171
|
return this;
|
|
17933
18172
|
},
|
|
18173
|
+
// Clear the crop box
|
|
17934
18174
|
clear: function clear() {
|
|
17935
18175
|
if (this.cropped && !this.disabled) {
|
|
17936
18176
|
assign(this.cropBoxData, {
|
|
@@ -17948,6 +18188,12 @@ var methods = {
|
|
|
17948
18188
|
}
|
|
17949
18189
|
return this;
|
|
17950
18190
|
},
|
|
18191
|
+
/**
|
|
18192
|
+
* Replace the image's src and rebuild the cropper
|
|
18193
|
+
* @param {string} url - The new URL.
|
|
18194
|
+
* @param {boolean} [hasSameSize] - Indicate if the new image has the same size as the old one.
|
|
18195
|
+
* @returns {Cropper} this
|
|
18196
|
+
*/
|
|
17951
18197
|
replace: function replace(url) {
|
|
17952
18198
|
var hasSameSize = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
17953
18199
|
if (!this.disabled && url) {
|
|
@@ -17974,6 +18220,7 @@ var methods = {
|
|
|
17974
18220
|
}
|
|
17975
18221
|
return this;
|
|
17976
18222
|
},
|
|
18223
|
+
// Enable (unfreeze) the cropper
|
|
17977
18224
|
enable: function enable() {
|
|
17978
18225
|
if (this.ready && this.disabled) {
|
|
17979
18226
|
this.disabled = false;
|
|
@@ -17981,6 +18228,7 @@ var methods = {
|
|
|
17981
18228
|
}
|
|
17982
18229
|
return this;
|
|
17983
18230
|
},
|
|
18231
|
+
// Disable (freeze) the cropper
|
|
17984
18232
|
disable: function disable() {
|
|
17985
18233
|
if (this.ready && !this.disabled) {
|
|
17986
18234
|
this.disabled = true;
|
|
@@ -17988,6 +18236,10 @@ var methods = {
|
|
|
17988
18236
|
}
|
|
17989
18237
|
return this;
|
|
17990
18238
|
},
|
|
18239
|
+
/**
|
|
18240
|
+
* Destroy the cropper and remove the instance from the image
|
|
18241
|
+
* @returns {Cropper} this
|
|
18242
|
+
*/
|
|
17991
18243
|
destroy: function destroy() {
|
|
17992
18244
|
var element = this.element;
|
|
17993
18245
|
if (!element[NAMESPACE]) {
|
|
@@ -18000,11 +18252,23 @@ var methods = {
|
|
|
18000
18252
|
this.uncreate();
|
|
18001
18253
|
return this;
|
|
18002
18254
|
},
|
|
18255
|
+
/**
|
|
18256
|
+
* Move the canvas with relative offsets
|
|
18257
|
+
* @param {number} offsetX - The relative offset distance on the x-axis.
|
|
18258
|
+
* @param {number} [offsetY=offsetX] - The relative offset distance on the y-axis.
|
|
18259
|
+
* @returns {Cropper} this
|
|
18260
|
+
*/
|
|
18003
18261
|
move: function move2(offsetX) {
|
|
18004
18262
|
var offsetY = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : offsetX;
|
|
18005
18263
|
var _this$canvasData = this.canvasData, left = _this$canvasData.left, top = _this$canvasData.top;
|
|
18006
18264
|
return this.moveTo(isUndefined(offsetX) ? offsetX : left + Number(offsetX), isUndefined(offsetY) ? offsetY : top + Number(offsetY));
|
|
18007
18265
|
},
|
|
18266
|
+
/**
|
|
18267
|
+
* Move the canvas to an absolute point
|
|
18268
|
+
* @param {number} x - The x-axis coordinate.
|
|
18269
|
+
* @param {number} [y=x] - The y-axis coordinate.
|
|
18270
|
+
* @returns {Cropper} this
|
|
18271
|
+
*/
|
|
18008
18272
|
moveTo: function moveTo(x) {
|
|
18009
18273
|
var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x;
|
|
18010
18274
|
var canvasData = this.canvasData;
|
|
@@ -18026,6 +18290,12 @@ var methods = {
|
|
|
18026
18290
|
}
|
|
18027
18291
|
return this;
|
|
18028
18292
|
},
|
|
18293
|
+
/**
|
|
18294
|
+
* Zoom the canvas with a relative ratio
|
|
18295
|
+
* @param {number} ratio - The target ratio.
|
|
18296
|
+
* @param {Event} _originalEvent - The original event if any.
|
|
18297
|
+
* @returns {Cropper} this
|
|
18298
|
+
*/
|
|
18029
18299
|
zoom: function zoom(ratio, _originalEvent) {
|
|
18030
18300
|
var canvasData = this.canvasData;
|
|
18031
18301
|
ratio = Number(ratio);
|
|
@@ -18036,6 +18306,13 @@ var methods = {
|
|
|
18036
18306
|
}
|
|
18037
18307
|
return this.zoomTo(canvasData.width * ratio / canvasData.naturalWidth, null, _originalEvent);
|
|
18038
18308
|
},
|
|
18309
|
+
/**
|
|
18310
|
+
* Zoom the canvas to an absolute ratio
|
|
18311
|
+
* @param {number} ratio - The target ratio.
|
|
18312
|
+
* @param {Object} pivot - The zoom pivot point coordinate.
|
|
18313
|
+
* @param {Event} _originalEvent - The original event if any.
|
|
18314
|
+
* @returns {Cropper} this
|
|
18315
|
+
*/
|
|
18039
18316
|
zoomTo: function zoomTo(ratio, pivot, _originalEvent) {
|
|
18040
18317
|
var options = this.options, canvasData = this.canvasData;
|
|
18041
18318
|
var width = canvasData.width, height = canvasData.height, naturalWidth = canvasData.naturalWidth, naturalHeight = canvasData.naturalHeight;
|
|
@@ -18072,9 +18349,19 @@ var methods = {
|
|
|
18072
18349
|
}
|
|
18073
18350
|
return this;
|
|
18074
18351
|
},
|
|
18352
|
+
/**
|
|
18353
|
+
* Rotate the canvas with a relative degree
|
|
18354
|
+
* @param {number} degree - The rotate degree.
|
|
18355
|
+
* @returns {Cropper} this
|
|
18356
|
+
*/
|
|
18075
18357
|
rotate: function rotate(degree) {
|
|
18076
18358
|
return this.rotateTo((this.imageData.rotate || 0) + Number(degree));
|
|
18077
18359
|
},
|
|
18360
|
+
/**
|
|
18361
|
+
* Rotate the canvas to an absolute degree
|
|
18362
|
+
* @param {number} degree - The rotate degree.
|
|
18363
|
+
* @returns {Cropper} this
|
|
18364
|
+
*/
|
|
18078
18365
|
rotateTo: function rotateTo(degree) {
|
|
18079
18366
|
degree = Number(degree);
|
|
18080
18367
|
if (isNumber(degree) && this.ready && !this.disabled && this.options.rotatable) {
|
|
@@ -18083,14 +18370,30 @@ var methods = {
|
|
|
18083
18370
|
}
|
|
18084
18371
|
return this;
|
|
18085
18372
|
},
|
|
18373
|
+
/**
|
|
18374
|
+
* Scale the image on the x-axis.
|
|
18375
|
+
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
18376
|
+
* @returns {Cropper} this
|
|
18377
|
+
*/
|
|
18086
18378
|
scaleX: function scaleX(_scaleX) {
|
|
18087
18379
|
var scaleY2 = this.imageData.scaleY;
|
|
18088
18380
|
return this.scale(_scaleX, isNumber(scaleY2) ? scaleY2 : 1);
|
|
18089
18381
|
},
|
|
18382
|
+
/**
|
|
18383
|
+
* Scale the image on the y-axis.
|
|
18384
|
+
* @param {number} scaleY - The scale ratio on the y-axis.
|
|
18385
|
+
* @returns {Cropper} this
|
|
18386
|
+
*/
|
|
18090
18387
|
scaleY: function scaleY(_scaleY) {
|
|
18091
18388
|
var scaleX2 = this.imageData.scaleX;
|
|
18092
18389
|
return this.scale(isNumber(scaleX2) ? scaleX2 : 1, _scaleY);
|
|
18093
18390
|
},
|
|
18391
|
+
/**
|
|
18392
|
+
* Scale the image
|
|
18393
|
+
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
18394
|
+
* @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
|
|
18395
|
+
* @returns {Cropper} this
|
|
18396
|
+
*/
|
|
18094
18397
|
scale: function scale(scaleX2) {
|
|
18095
18398
|
var scaleY2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : scaleX2;
|
|
18096
18399
|
var imageData = this.imageData;
|
|
@@ -18112,6 +18415,11 @@ var methods = {
|
|
|
18112
18415
|
}
|
|
18113
18416
|
return this;
|
|
18114
18417
|
},
|
|
18418
|
+
/**
|
|
18419
|
+
* Get the cropped area position and size data (base on the original image)
|
|
18420
|
+
* @param {boolean} [rounded=false] - Indicate if round the data values or not.
|
|
18421
|
+
* @returns {Object} The result cropped data.
|
|
18422
|
+
*/
|
|
18115
18423
|
getData: function getData2() {
|
|
18116
18424
|
var rounded = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
18117
18425
|
var options = this.options, imageData = this.imageData, canvasData = this.canvasData, cropBoxData = this.cropBoxData;
|
|
@@ -18152,6 +18460,11 @@ var methods = {
|
|
|
18152
18460
|
}
|
|
18153
18461
|
return data;
|
|
18154
18462
|
},
|
|
18463
|
+
/**
|
|
18464
|
+
* Set the cropped area position and size with new data
|
|
18465
|
+
* @param {Object} data - The new data.
|
|
18466
|
+
* @returns {Cropper} this
|
|
18467
|
+
*/
|
|
18155
18468
|
setData: function setData2(data) {
|
|
18156
18469
|
var options = this.options, imageData = this.imageData, canvasData = this.canvasData;
|
|
18157
18470
|
var cropBoxData = {};
|
|
@@ -18193,12 +18506,24 @@ var methods = {
|
|
|
18193
18506
|
}
|
|
18194
18507
|
return this;
|
|
18195
18508
|
},
|
|
18509
|
+
/**
|
|
18510
|
+
* Get the container size data.
|
|
18511
|
+
* @returns {Object} The result container data.
|
|
18512
|
+
*/
|
|
18196
18513
|
getContainerData: function getContainerData() {
|
|
18197
18514
|
return this.ready ? assign({}, this.containerData) : {};
|
|
18198
18515
|
},
|
|
18516
|
+
/**
|
|
18517
|
+
* Get the image position and size data.
|
|
18518
|
+
* @returns {Object} The result image data.
|
|
18519
|
+
*/
|
|
18199
18520
|
getImageData: function getImageData() {
|
|
18200
18521
|
return this.sized ? assign({}, this.imageData) : {};
|
|
18201
18522
|
},
|
|
18523
|
+
/**
|
|
18524
|
+
* Get the canvas position and size data.
|
|
18525
|
+
* @returns {Object} The result canvas data.
|
|
18526
|
+
*/
|
|
18202
18527
|
getCanvasData: function getCanvasData() {
|
|
18203
18528
|
var canvasData = this.canvasData;
|
|
18204
18529
|
var data = {};
|
|
@@ -18209,6 +18534,11 @@ var methods = {
|
|
|
18209
18534
|
}
|
|
18210
18535
|
return data;
|
|
18211
18536
|
},
|
|
18537
|
+
/**
|
|
18538
|
+
* Set the canvas position and size with new data.
|
|
18539
|
+
* @param {Object} data - The new canvas data.
|
|
18540
|
+
* @returns {Cropper} this
|
|
18541
|
+
*/
|
|
18212
18542
|
setCanvasData: function setCanvasData(data) {
|
|
18213
18543
|
var canvasData = this.canvasData;
|
|
18214
18544
|
var aspectRatio = canvasData.aspectRatio;
|
|
@@ -18230,6 +18560,10 @@ var methods = {
|
|
|
18230
18560
|
}
|
|
18231
18561
|
return this;
|
|
18232
18562
|
},
|
|
18563
|
+
/**
|
|
18564
|
+
* Get the crop box position and size data.
|
|
18565
|
+
* @returns {Object} The result crop box data.
|
|
18566
|
+
*/
|
|
18233
18567
|
getCropBoxData: function getCropBoxData() {
|
|
18234
18568
|
var cropBoxData = this.cropBoxData;
|
|
18235
18569
|
var data;
|
|
@@ -18243,6 +18577,11 @@ var methods = {
|
|
|
18243
18577
|
}
|
|
18244
18578
|
return data || {};
|
|
18245
18579
|
},
|
|
18580
|
+
/**
|
|
18581
|
+
* Set the crop box position and size with new data.
|
|
18582
|
+
* @param {Object} data - The new crop box data.
|
|
18583
|
+
* @returns {Cropper} this
|
|
18584
|
+
*/
|
|
18246
18585
|
setCropBoxData: function setCropBoxData(data) {
|
|
18247
18586
|
var cropBoxData = this.cropBoxData;
|
|
18248
18587
|
var aspectRatio = this.options.aspectRatio;
|
|
@@ -18274,6 +18613,11 @@ var methods = {
|
|
|
18274
18613
|
}
|
|
18275
18614
|
return this;
|
|
18276
18615
|
},
|
|
18616
|
+
/**
|
|
18617
|
+
* Get a canvas drawn the cropped image.
|
|
18618
|
+
* @param {Object} [options={}] - The config options.
|
|
18619
|
+
* @returns {HTMLCanvasElement} - The result canvas.
|
|
18620
|
+
*/
|
|
18277
18621
|
getCroppedCanvas: function getCroppedCanvas() {
|
|
18278
18622
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18279
18623
|
if (!this.ready || !window.HTMLCanvasElement) {
|
|
@@ -18371,6 +18715,11 @@ var methods = {
|
|
|
18371
18715
|
}))));
|
|
18372
18716
|
return canvas;
|
|
18373
18717
|
},
|
|
18718
|
+
/**
|
|
18719
|
+
* Change the aspect ratio of the crop box.
|
|
18720
|
+
* @param {number} aspectRatio - The new aspect ratio.
|
|
18721
|
+
* @returns {Cropper} this
|
|
18722
|
+
*/
|
|
18374
18723
|
setAspectRatio: function setAspectRatio(aspectRatio) {
|
|
18375
18724
|
var options = this.options;
|
|
18376
18725
|
if (!this.disabled && !isUndefined(aspectRatio)) {
|
|
@@ -18384,6 +18733,11 @@ var methods = {
|
|
|
18384
18733
|
}
|
|
18385
18734
|
return this;
|
|
18386
18735
|
},
|
|
18736
|
+
/**
|
|
18737
|
+
* Change the drag mode.
|
|
18738
|
+
* @param {string} mode - The new drag mode.
|
|
18739
|
+
* @returns {Cropper} this
|
|
18740
|
+
*/
|
|
18387
18741
|
setDragMode: function setDragMode(mode) {
|
|
18388
18742
|
var options = this.options, dragBox = this.dragBox, face = this.face;
|
|
18389
18743
|
if (this.ready && !this.disabled) {
|
|
@@ -18695,12 +19049,20 @@ var Cropper = /* @__PURE__ */ function() {
|
|
|
18695
19049
|
this.stop();
|
|
18696
19050
|
}
|
|
18697
19051
|
}
|
|
19052
|
+
/**
|
|
19053
|
+
* Get the no conflict cropper class.
|
|
19054
|
+
* @returns {Cropper} The cropper class.
|
|
19055
|
+
*/
|
|
18698
19056
|
}], [{
|
|
18699
19057
|
key: "noConflict",
|
|
18700
19058
|
value: function noConflict() {
|
|
18701
19059
|
window.Cropper = AnotherCropper;
|
|
18702
19060
|
return Cropper2;
|
|
18703
19061
|
}
|
|
19062
|
+
/**
|
|
19063
|
+
* Change the default options.
|
|
19064
|
+
* @param {Object} options - The new default options.
|
|
19065
|
+
*/
|
|
18704
19066
|
}, {
|
|
18705
19067
|
key: "setDefaults",
|
|
18706
19068
|
value: function setDefaults(options) {
|
|
@@ -18711,6 +19073,66 @@ var Cropper = /* @__PURE__ */ function() {
|
|
|
18711
19073
|
}();
|
|
18712
19074
|
assign(Cropper.prototype, render, preview, events, handlers, change, methods);
|
|
18713
19075
|
const cropper = "";
|
|
19076
|
+
function toValue(r) {
|
|
19077
|
+
return typeof r === "function" ? r() : unref(r);
|
|
19078
|
+
}
|
|
19079
|
+
const noop = () => {
|
|
19080
|
+
};
|
|
19081
|
+
function createFilterWrapper(filter2, fn) {
|
|
19082
|
+
function wrapper(...args) {
|
|
19083
|
+
return new Promise((resolve, reject) => {
|
|
19084
|
+
Promise.resolve(filter2(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
|
|
19085
|
+
});
|
|
19086
|
+
}
|
|
19087
|
+
return wrapper;
|
|
19088
|
+
}
|
|
19089
|
+
function debounceFilter(ms, options = {}) {
|
|
19090
|
+
let timer;
|
|
19091
|
+
let maxTimer;
|
|
19092
|
+
let lastRejector = noop;
|
|
19093
|
+
const _clearTimeout = (timer2) => {
|
|
19094
|
+
clearTimeout(timer2);
|
|
19095
|
+
lastRejector();
|
|
19096
|
+
lastRejector = noop;
|
|
19097
|
+
};
|
|
19098
|
+
const filter2 = (invoke) => {
|
|
19099
|
+
const duration = toValue(ms);
|
|
19100
|
+
const maxDuration = toValue(options.maxWait);
|
|
19101
|
+
if (timer)
|
|
19102
|
+
_clearTimeout(timer);
|
|
19103
|
+
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
19104
|
+
if (maxTimer) {
|
|
19105
|
+
_clearTimeout(maxTimer);
|
|
19106
|
+
maxTimer = null;
|
|
19107
|
+
}
|
|
19108
|
+
return Promise.resolve(invoke());
|
|
19109
|
+
}
|
|
19110
|
+
return new Promise((resolve, reject) => {
|
|
19111
|
+
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
19112
|
+
if (maxDuration && !maxTimer) {
|
|
19113
|
+
maxTimer = setTimeout(() => {
|
|
19114
|
+
if (timer)
|
|
19115
|
+
_clearTimeout(timer);
|
|
19116
|
+
maxTimer = null;
|
|
19117
|
+
resolve(invoke());
|
|
19118
|
+
}, maxDuration);
|
|
19119
|
+
}
|
|
19120
|
+
timer = setTimeout(() => {
|
|
19121
|
+
if (maxTimer)
|
|
19122
|
+
_clearTimeout(maxTimer);
|
|
19123
|
+
maxTimer = null;
|
|
19124
|
+
resolve(invoke());
|
|
19125
|
+
}, duration);
|
|
19126
|
+
});
|
|
19127
|
+
};
|
|
19128
|
+
return filter2;
|
|
19129
|
+
}
|
|
19130
|
+
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
19131
|
+
return createFilterWrapper(
|
|
19132
|
+
debounceFilter(ms, options),
|
|
19133
|
+
fn
|
|
19134
|
+
);
|
|
19135
|
+
}
|
|
18714
19136
|
const defaultOptions = {
|
|
18715
19137
|
aspectRatio: 1,
|
|
18716
19138
|
zoomable: true,
|
|
@@ -18820,9 +19242,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
18820
19242
|
let fileReader = new FileReader();
|
|
18821
19243
|
fileReader.readAsDataURL(blob);
|
|
18822
19244
|
fileReader.onloadend = (e) => {
|
|
18823
|
-
var _a2
|
|
19245
|
+
var _a2;
|
|
18824
19246
|
emit("cropend", {
|
|
18825
|
-
imgBase64: (
|
|
19247
|
+
imgBase64: ((_a2 = e.target) == null ? void 0 : _a2.result) ?? "",
|
|
18826
19248
|
imgInfo
|
|
18827
19249
|
});
|
|
18828
19250
|
};
|
|
@@ -18909,8 +19331,8 @@ const _sfc_main$6 = defineComponent({
|
|
|
18909
19331
|
src.value = "";
|
|
18910
19332
|
previewSource.value = "";
|
|
18911
19333
|
reader.onload = function(e) {
|
|
18912
|
-
var _a2
|
|
18913
|
-
src.value = (
|
|
19334
|
+
var _a2;
|
|
19335
|
+
src.value = ((_a2 = e.target) == null ? void 0 : _a2.result) ?? "";
|
|
18914
19336
|
filename = file.name;
|
|
18915
19337
|
};
|
|
18916
19338
|
return false;
|
|
@@ -18973,11 +19395,11 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18973
19395
|
const _component_BasicModal = resolveComponent("BasicModal");
|
|
18974
19396
|
return openBlock(), createBlock(_component_BasicModal, mergeProps(_ctx.$attrs, {
|
|
18975
19397
|
onRegister: _ctx.register,
|
|
18976
|
-
title: "
|
|
19398
|
+
title: "头像上传",
|
|
18977
19399
|
width: "800px",
|
|
18978
19400
|
canFullscreen: false,
|
|
18979
19401
|
onOk: _ctx.handleOk,
|
|
18980
|
-
okText: "
|
|
19402
|
+
okText: "确认并上传"
|
|
18981
19403
|
}), {
|
|
18982
19404
|
default: withCtx(() => [
|
|
18983
19405
|
createElementVNode("div", {
|
|
@@ -19008,7 +19430,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19008
19430
|
}, {
|
|
19009
19431
|
default: withCtx(() => [
|
|
19010
19432
|
createVNode(_component_Tooltip, {
|
|
19011
|
-
title: "
|
|
19433
|
+
title: "选择图片",
|
|
19012
19434
|
placement: "bottom"
|
|
19013
19435
|
}, {
|
|
19014
19436
|
default: withCtx(() => [
|
|
@@ -19026,7 +19448,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19026
19448
|
createVNode(_component_Space, null, {
|
|
19027
19449
|
default: withCtx(() => [
|
|
19028
19450
|
createVNode(_component_Tooltip, {
|
|
19029
|
-
title: "
|
|
19451
|
+
title: "重置",
|
|
19030
19452
|
placement: "bottom"
|
|
19031
19453
|
}, {
|
|
19032
19454
|
default: withCtx(() => [
|
|
@@ -19041,7 +19463,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19041
19463
|
_: 1
|
|
19042
19464
|
}),
|
|
19043
19465
|
createVNode(_component_Tooltip, {
|
|
19044
|
-
title: "
|
|
19466
|
+
title: "逆时针旋转",
|
|
19045
19467
|
placement: "bottom"
|
|
19046
19468
|
}, {
|
|
19047
19469
|
default: withCtx(() => [
|
|
@@ -19056,7 +19478,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19056
19478
|
_: 1
|
|
19057
19479
|
}),
|
|
19058
19480
|
createVNode(_component_Tooltip, {
|
|
19059
|
-
title: "
|
|
19481
|
+
title: "顺时针旋转",
|
|
19060
19482
|
placement: "bottom"
|
|
19061
19483
|
}, {
|
|
19062
19484
|
default: withCtx(() => [
|
|
@@ -19071,7 +19493,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19071
19493
|
_: 1
|
|
19072
19494
|
}),
|
|
19073
19495
|
createVNode(_component_Tooltip, {
|
|
19074
|
-
title: "
|
|
19496
|
+
title: "水平翻转",
|
|
19075
19497
|
placement: "bottom"
|
|
19076
19498
|
}, {
|
|
19077
19499
|
default: withCtx(() => [
|
|
@@ -19086,7 +19508,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19086
19508
|
_: 1
|
|
19087
19509
|
}),
|
|
19088
19510
|
createVNode(_component_Tooltip, {
|
|
19089
|
-
title: "
|
|
19511
|
+
title: "垂直翻转",
|
|
19090
19512
|
placement: "bottom"
|
|
19091
19513
|
}, {
|
|
19092
19514
|
default: withCtx(() => [
|
|
@@ -19101,7 +19523,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19101
19523
|
_: 1
|
|
19102
19524
|
}),
|
|
19103
19525
|
createVNode(_component_Tooltip, {
|
|
19104
|
-
title: "
|
|
19526
|
+
title: "放大",
|
|
19105
19527
|
placement: "bottom"
|
|
19106
19528
|
}, {
|
|
19107
19529
|
default: withCtx(() => [
|
|
@@ -19116,7 +19538,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19116
19538
|
_: 1
|
|
19117
19539
|
}),
|
|
19118
19540
|
createVNode(_component_Tooltip, {
|
|
19119
|
-
title: "
|
|
19541
|
+
title: "缩小",
|
|
19120
19542
|
placement: "bottom"
|
|
19121
19543
|
}, {
|
|
19122
19544
|
default: withCtx(() => [
|
|
@@ -19144,7 +19566,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19144
19566
|
_ctx.previewSource ? (openBlock(), createElementBlock("img", {
|
|
19145
19567
|
key: 0,
|
|
19146
19568
|
src: _ctx.previewSource,
|
|
19147
|
-
alt: "
|
|
19569
|
+
alt: "预览"
|
|
19148
19570
|
}, null, 8, _hoisted_1$2)) : createCommentVNode("", true)
|
|
19149
19571
|
], 2),
|
|
19150
19572
|
_ctx.previewSource ? (openBlock(), createElementBlock("div", {
|
|
@@ -19216,7 +19638,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
19216
19638
|
function handleUploadSuccess({ source, data }) {
|
|
19217
19639
|
sourceValue.value = source;
|
|
19218
19640
|
emit("change", { source, data });
|
|
19219
|
-
createMessage.success("
|
|
19641
|
+
createMessage.success("上传成功");
|
|
19220
19642
|
}
|
|
19221
19643
|
expose({ openModal: openModal.bind(null, true), closeModal });
|
|
19222
19644
|
return {
|
|
@@ -19270,7 +19692,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19270
19692
|
onClick: _ctx.openModal
|
|
19271
19693
|
}, _ctx.btnProps), {
|
|
19272
19694
|
default: withCtx(() => [
|
|
19273
|
-
createTextVNode(toDisplayString(_ctx.btnText ? _ctx.btnText : "
|
|
19695
|
+
createTextVNode(toDisplayString(_ctx.btnText ? _ctx.btnText : "选择图片"), 1)
|
|
19274
19696
|
]),
|
|
19275
19697
|
_: 1
|
|
19276
19698
|
}, 16, ["class", "onClick"])) : createCommentVNode("", true),
|
|
@@ -19299,8 +19721,17 @@ const props = {
|
|
|
19299
19721
|
suffix: { type: String, default: "" },
|
|
19300
19722
|
separator: { type: String, default: "," },
|
|
19301
19723
|
decimal: { type: String, default: "." },
|
|
19724
|
+
/**
|
|
19725
|
+
* font color
|
|
19726
|
+
*/
|
|
19302
19727
|
color: { type: String },
|
|
19728
|
+
/**
|
|
19729
|
+
* Turn on digital animation
|
|
19730
|
+
*/
|
|
19303
19731
|
useEasing: { type: Boolean, default: true },
|
|
19732
|
+
/**
|
|
19733
|
+
* Digital animation
|
|
19734
|
+
*/
|
|
19304
19735
|
transition: { type: String, default: "linear" }
|
|
19305
19736
|
};
|
|
19306
19737
|
const _sfc_main$4 = defineComponent({
|
|
@@ -19396,9 +19827,21 @@ var SizeEnum = /* @__PURE__ */ ((SizeEnum2) => {
|
|
|
19396
19827
|
})(SizeEnum || {});
|
|
19397
19828
|
(() => {
|
|
19398
19829
|
const map = /* @__PURE__ */ new Map();
|
|
19399
|
-
map.set(
|
|
19400
|
-
|
|
19401
|
-
|
|
19830
|
+
map.set(
|
|
19831
|
+
"default",
|
|
19832
|
+
48
|
|
19833
|
+
/* DEFAULT */
|
|
19834
|
+
);
|
|
19835
|
+
map.set(
|
|
19836
|
+
"small",
|
|
19837
|
+
16
|
|
19838
|
+
/* SMALL */
|
|
19839
|
+
);
|
|
19840
|
+
map.set(
|
|
19841
|
+
"large",
|
|
19842
|
+
64
|
|
19843
|
+
/* LARGE */
|
|
19844
|
+
);
|
|
19402
19845
|
return map;
|
|
19403
19846
|
})();
|
|
19404
19847
|
const _sfc_main$2 = defineComponent({
|
|
@@ -19531,12 +19974,16 @@ const style = "";
|
|
|
19531
19974
|
const basicProps = {
|
|
19532
19975
|
border: true,
|
|
19533
19976
|
size: "small",
|
|
19977
|
+
// 行设置
|
|
19534
19978
|
rowConfig: {
|
|
19535
19979
|
isHover: true,
|
|
19536
19980
|
height: 40
|
|
19537
19981
|
},
|
|
19982
|
+
// 序号设置
|
|
19538
19983
|
seqConfig: {},
|
|
19984
|
+
// 高度
|
|
19539
19985
|
height: "auto"
|
|
19986
|
+
// autoResize: true
|
|
19540
19987
|
};
|
|
19541
19988
|
const basicColumn = {
|
|
19542
19989
|
showHeaderOverflow: "tooltip",
|
|
@@ -19645,14 +20092,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
19645
20092
|
const getActions = computed(() => {
|
|
19646
20093
|
return [
|
|
19647
20094
|
{
|
|
19648
|
-
label: "
|
|
20095
|
+
label: "编辑",
|
|
19649
20096
|
onClick: () => {
|
|
19650
20097
|
emit("updateStatusEdit", true);
|
|
19651
20098
|
},
|
|
19652
20099
|
ifShow: props2.row._isEdit === false
|
|
19653
20100
|
},
|
|
19654
20101
|
{
|
|
19655
|
-
label: "
|
|
20102
|
+
label: "确定",
|
|
19656
20103
|
onClick: () => {
|
|
19657
20104
|
emit("updateStatusEdit", false);
|
|
19658
20105
|
emit("edit-ensure");
|
|
@@ -19660,7 +20107,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
19660
20107
|
ifShow: props2.row._isEdit === true
|
|
19661
20108
|
},
|
|
19662
20109
|
{
|
|
19663
|
-
label: "
|
|
20110
|
+
label: "取消",
|
|
19664
20111
|
onClick: () => {
|
|
19665
20112
|
emit("updateStatusEdit", false);
|
|
19666
20113
|
emit("edit-cancel");
|
|
@@ -19689,7 +20136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19689
20136
|
isCompatible: { type: Boolean, default: false },
|
|
19690
20137
|
actionColumn: { default: () => {
|
|
19691
20138
|
return {
|
|
19692
|
-
title: "
|
|
20139
|
+
title: "操作",
|
|
19693
20140
|
field: "action",
|
|
19694
20141
|
width: 150
|
|
19695
20142
|
};
|
|
@@ -19881,7 +20328,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19881
20328
|
type: "seq",
|
|
19882
20329
|
width: "60",
|
|
19883
20330
|
align: "center",
|
|
19884
|
-
title: "
|
|
20331
|
+
title: "序号"
|
|
19885
20332
|
})) : createCommentVNode("", true),
|
|
19886
20333
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getColumns), (column, index2) => {
|
|
19887
20334
|
return openBlock(), createBlock(_component_vxe_column, mergeProps({ key: index2 }, column, {
|
|
@@ -19914,7 +20361,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19914
20361
|
}), 128)),
|
|
19915
20362
|
unref(getProps).isShowAction ? (openBlock(), createBlock(_component_vxe_column, mergeProps({
|
|
19916
20363
|
key: 3,
|
|
19917
|
-
title: "
|
|
20364
|
+
title: "操作",
|
|
19918
20365
|
field: "action",
|
|
19919
20366
|
align: "center"
|
|
19920
20367
|
}, unref(getProps).actionColumn), {
|
|
@@ -19953,7 +20400,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19953
20400
|
pageSizeOptions: unref(page).pageSizeOptions,
|
|
19954
20401
|
"show-size-changer": "",
|
|
19955
20402
|
"show-quick-jumper": "",
|
|
19956
|
-
"show-total": (total) =>
|
|
20403
|
+
"show-total": (total) => `共 ${total} 条数据`,
|
|
19957
20404
|
onChange: handlePageChange
|
|
19958
20405
|
}, null, 8, ["total", "current", "page-size", "pageSizeOptions", "show-total"])
|
|
19959
20406
|
], 2)) : createCommentVNode("", true)
|