element-ps 1.0.3 → 1.0.7
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/dist/index.full.js +281 -211
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +282 -212
- package/es/components/button/index.d.ts +4 -0
- package/es/components/button/src/button.d.ts +1 -0
- package/es/components/button/src/button.vue.d.ts +4 -0
- package/es/components/cascader/index.d.ts +18 -2
- package/es/components/cascader/src/index.vue.d.ts +9 -1
- package/es/components/color-picker/index.d.ts +2 -2
- package/es/components/color-picker/src/index.vue.d.ts +1 -1
- package/es/components/input/index.d.ts +4 -0
- package/es/components/input/src/input.d.ts +1 -0
- package/es/components/input/src/input.vue.d.ts +4 -0
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/index.mjs +3 -3
- package/es/packages/components/avatar/index.mjs +2 -2
- package/es/packages/components/avatar/src/avatar.mjs +5 -29
- package/es/packages/components/avatar/src/avatar.mjs.map +1 -1
- package/es/packages/components/avatar/src/avatar.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/avatar/src/avatar2.mjs +29 -5
- package/es/packages/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/packages/components/badge/index.mjs +2 -2
- package/es/packages/components/badge/src/badge.mjs +20 -5
- package/es/packages/components/badge/src/badge.mjs.map +1 -1
- package/es/packages/components/badge/src/badge.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/badge/src/badge2.mjs +5 -20
- package/es/packages/components/badge/src/badge2.mjs.map +1 -1
- package/es/packages/components/button/index.mjs +1 -1
- package/es/packages/components/button/src/button-group.mjs +5 -7
- package/es/packages/components/button/src/button-group.mjs.map +1 -1
- package/es/packages/components/button/src/button-group.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/button/src/button-group2.mjs +7 -5
- package/es/packages/components/button/src/button-group2.mjs.map +1 -1
- package/es/packages/components/button/src/button.mjs +1 -0
- package/es/packages/components/button/src/button.mjs.map +1 -1
- package/es/packages/components/button/src/button.vue_vue&type=script&lang.mjs +39 -0
- package/es/packages/components/button/src/button.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.mjs +4 -3
- package/es/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.mjs.map +1 -1
- package/es/packages/components/form/src/form-item.vue_vue&type=script&lang.mjs +1 -5
- package/es/packages/components/form/src/form-item.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.mjs.map +1 -1
- package/es/packages/components/image/index.mjs +2 -2
- package/es/packages/components/image/src/image.mjs +44 -5
- package/es/packages/components/image/src/image.mjs.map +1 -1
- package/es/packages/components/image/src/image.vue_vue&type=script&lang.mjs +1 -1
- package/es/packages/components/image/src/image2.mjs +5 -44
- package/es/packages/components/image/src/image2.mjs.map +1 -1
- package/es/packages/components/index.mjs +3 -3
- package/es/packages/components/input/src/input.mjs +3 -0
- package/es/packages/components/input/src/input.mjs.map +1 -1
- package/es/packages/components/input/src/input.vue_vue&type=script&lang.mjs.map +1 -1
- package/es/packages/components/input/src/input.vue_vue&type=template&id=3290dcb6&lang.mjs +26 -24
- package/es/packages/components/input/src/input.vue_vue&type=template&id=3290dcb6&lang.mjs.map +1 -1
- package/es/plugin.d.ts +9 -1
- package/es/plugin.mjs +2 -0
- package/es/plugin.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/button/index.d.ts +4 -0
- package/lib/components/button/src/button.d.ts +1 -0
- package/lib/components/button/src/button.vue.d.ts +4 -0
- package/lib/components/cascader/index.d.ts +18 -2
- package/lib/components/cascader/src/index.vue.d.ts +9 -1
- package/lib/components/color-picker/index.d.ts +2 -2
- package/lib/components/color-picker/src/index.vue.d.ts +1 -1
- package/lib/components/input/index.d.ts +4 -0
- package/lib/components/input/src/input.d.ts +1 -0
- package/lib/components/input/src/input.vue.d.ts +4 -0
- package/lib/components/table/index.d.ts +2 -2
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/index.js +3 -3
- package/lib/packages/components/avatar/index.js +2 -2
- package/lib/packages/components/avatar/src/avatar.js +5 -28
- package/lib/packages/components/avatar/src/avatar.js.map +1 -1
- package/lib/packages/components/avatar/src/avatar.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/avatar/src/avatar2.js +28 -5
- package/lib/packages/components/avatar/src/avatar2.js.map +1 -1
- package/lib/packages/components/badge/index.js +2 -2
- package/lib/packages/components/badge/src/badge.js +19 -5
- package/lib/packages/components/badge/src/badge.js.map +1 -1
- package/lib/packages/components/badge/src/badge.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/badge/src/badge2.js +5 -19
- package/lib/packages/components/badge/src/badge2.js.map +1 -1
- package/lib/packages/components/button/index.js +1 -1
- package/lib/packages/components/button/src/button-group.js +5 -6
- package/lib/packages/components/button/src/button-group.js.map +1 -1
- package/lib/packages/components/button/src/button-group.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/button/src/button-group2.js +6 -5
- package/lib/packages/components/button/src/button-group2.js.map +1 -1
- package/lib/packages/components/button/src/button.js +1 -0
- package/lib/packages/components/button/src/button.js.map +1 -1
- package/lib/packages/components/button/src/button.vue_vue&type=script&lang.js +39 -0
- package/lib/packages/components/button/src/button.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.js +3 -2
- package/lib/packages/components/button/src/button.vue_vue&type=template&id=802c5c76&lang.js.map +1 -1
- package/lib/packages/components/form/src/form-item.vue_vue&type=script&lang.js +0 -4
- package/lib/packages/components/form/src/form-item.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/form/src/form-item.vue_vue&type=template&id=24eda48b&lang.js.map +1 -1
- package/lib/packages/components/image/index.js +2 -2
- package/lib/packages/components/image/src/image.js +44 -5
- package/lib/packages/components/image/src/image.js.map +1 -1
- package/lib/packages/components/image/src/image.vue_vue&type=script&lang.js +1 -1
- package/lib/packages/components/image/src/image2.js +5 -44
- package/lib/packages/components/image/src/image2.js.map +1 -1
- package/lib/packages/components/index.js +3 -3
- package/lib/packages/components/input/src/input.js +3 -0
- package/lib/packages/components/input/src/input.js.map +1 -1
- package/lib/packages/components/input/src/input.vue_vue&type=script&lang.js.map +1 -1
- package/lib/packages/components/input/src/input.vue_vue&type=template&id=3290dcb6&lang.js +26 -24
- package/lib/packages/components/input/src/input.vue_vue&type=template&id=3290dcb6&lang.js.map +1 -1
- package/lib/plugin.d.ts +9 -1
- package/lib/plugin.js +4 -2
- package/lib/plugin.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/dist/index.full.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Element Plus v1.0.
|
|
1
|
+
/*! Element Plus v1.0.6 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -3124,7 +3124,7 @@
|
|
|
3124
3124
|
return vue.inject(configProviderContextKey, defaultConfig);
|
|
3125
3125
|
};
|
|
3126
3126
|
|
|
3127
|
-
const version$1 = "1.0.
|
|
3127
|
+
const version$1 = "1.0.6";
|
|
3128
3128
|
|
|
3129
3129
|
const makeInstaller = (components = []) => {
|
|
3130
3130
|
const apps = [];
|
|
@@ -4474,6 +4474,9 @@
|
|
|
4474
4474
|
},
|
|
4475
4475
|
maxlength: {
|
|
4476
4476
|
type: [Number, String]
|
|
4477
|
+
},
|
|
4478
|
+
widget: {
|
|
4479
|
+
type: String
|
|
4477
4480
|
}
|
|
4478
4481
|
});
|
|
4479
4482
|
|
|
@@ -4605,32 +4608,33 @@
|
|
|
4605
4608
|
}
|
|
4606
4609
|
});
|
|
4607
4610
|
|
|
4608
|
-
const _hoisted_1$17 =
|
|
4611
|
+
const _hoisted_1$17 = ["widget"];
|
|
4612
|
+
const _hoisted_2$K = {
|
|
4609
4613
|
key: 0,
|
|
4610
4614
|
class: "el-input-group__prepend"
|
|
4611
4615
|
};
|
|
4612
|
-
const
|
|
4613
|
-
const
|
|
4616
|
+
const _hoisted_3$v = ["type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder"];
|
|
4617
|
+
const _hoisted_4$n = {
|
|
4614
4618
|
key: 1,
|
|
4615
4619
|
class: "el-input__prefix"
|
|
4616
4620
|
};
|
|
4617
|
-
const
|
|
4618
|
-
const
|
|
4621
|
+
const _hoisted_5$i = { class: "el-input__prefix-inner" };
|
|
4622
|
+
const _hoisted_6$b = {
|
|
4619
4623
|
key: 2,
|
|
4620
4624
|
class: "el-input__suffix"
|
|
4621
4625
|
};
|
|
4622
|
-
const
|
|
4623
|
-
const
|
|
4626
|
+
const _hoisted_7$8 = { class: "el-input__suffix-inner" };
|
|
4627
|
+
const _hoisted_8$5 = {
|
|
4624
4628
|
key: 3,
|
|
4625
4629
|
class: "el-input__count"
|
|
4626
4630
|
};
|
|
4627
|
-
const
|
|
4628
|
-
const
|
|
4631
|
+
const _hoisted_9$3 = { class: "el-input__count-inner" };
|
|
4632
|
+
const _hoisted_10$2 = {
|
|
4629
4633
|
key: 3,
|
|
4630
4634
|
class: "el-input-group__append"
|
|
4631
4635
|
};
|
|
4632
|
-
const
|
|
4633
|
-
const
|
|
4636
|
+
const _hoisted_11$1 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
|
|
4637
|
+
const _hoisted_12$1 = {
|
|
4634
4638
|
key: 0,
|
|
4635
4639
|
class: "el-input__count"
|
|
4636
4640
|
};
|
|
@@ -4654,12 +4658,13 @@
|
|
|
4654
4658
|
},
|
|
4655
4659
|
_ctx.$attrs.class
|
|
4656
4660
|
]),
|
|
4657
|
-
style: vue.normalizeStyle(_ctx.containerStyle)
|
|
4661
|
+
style: vue.normalizeStyle(_ctx.containerStyle),
|
|
4662
|
+
widget: _ctx.widget
|
|
4658
4663
|
}, [
|
|
4659
4664
|
vue.createCommentVNode(" input "),
|
|
4660
4665
|
_ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4661
4666
|
vue.createCommentVNode(" prepend slot "),
|
|
4662
|
-
_ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div",
|
|
4667
|
+
_ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$K, [
|
|
4663
4668
|
vue.renderSlot(_ctx.$slots, "prepend")
|
|
4664
4669
|
])) : vue.createCommentVNode("v-if", true),
|
|
4665
4670
|
vue.createElementVNode("input", vue.mergeProps({
|
|
@@ -4674,10 +4679,10 @@
|
|
|
4674
4679
|
"aria-label": _ctx.label,
|
|
4675
4680
|
placeholder: _ctx.placeholder,
|
|
4676
4681
|
style: _ctx.inputStyle
|
|
4677
|
-
}), null, 16,
|
|
4682
|
+
}), null, 16, _hoisted_3$v),
|
|
4678
4683
|
vue.createCommentVNode(" prefix slot "),
|
|
4679
|
-
_ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span",
|
|
4680
|
-
vue.createElementVNode("span",
|
|
4684
|
+
_ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, [
|
|
4685
|
+
vue.createElementVNode("span", _hoisted_5$i, [
|
|
4681
4686
|
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
4682
4687
|
_ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
4683
4688
|
key: 0,
|
|
@@ -4691,8 +4696,8 @@
|
|
|
4691
4696
|
])
|
|
4692
4697
|
])) : vue.createCommentVNode("v-if", true),
|
|
4693
4698
|
vue.createCommentVNode(" suffix slot "),
|
|
4694
|
-
_ctx.suffixVisible ? (vue.openBlock(), vue.createElementBlock("span",
|
|
4695
|
-
vue.createElementVNode("span",
|
|
4699
|
+
_ctx.suffixVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$b, [
|
|
4700
|
+
vue.createElementVNode("span", _hoisted_7$8, [
|
|
4696
4701
|
!_ctx.showClear || !_ctx.showPwdVisible || !_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4697
4702
|
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
4698
4703
|
_ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
@@ -4723,8 +4728,8 @@
|
|
|
4723
4728
|
]),
|
|
4724
4729
|
_: 1
|
|
4725
4730
|
})) : vue.createCommentVNode("v-if", true),
|
|
4726
|
-
_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span",
|
|
4727
|
-
vue.createElementVNode("span",
|
|
4731
|
+
_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8$5, [
|
|
4732
|
+
vue.createElementVNode("span", _hoisted_9$3, vue.toDisplayString(_ctx.textLength) + " / " + vue.toDisplayString(_ctx.attrs.maxlength), 1)
|
|
4728
4733
|
])) : vue.createCommentVNode("v-if", true)
|
|
4729
4734
|
]),
|
|
4730
4735
|
_ctx.validateState && _ctx.validateIcon ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
@@ -4738,7 +4743,7 @@
|
|
|
4738
4743
|
})) : vue.createCommentVNode("v-if", true)
|
|
4739
4744
|
])) : vue.createCommentVNode("v-if", true),
|
|
4740
4745
|
vue.createCommentVNode(" append slot "),
|
|
4741
|
-
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div",
|
|
4746
|
+
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$2, [
|
|
4742
4747
|
vue.renderSlot(_ctx.$slots, "append")
|
|
4743
4748
|
])) : vue.createCommentVNode("v-if", true)
|
|
4744
4749
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
@@ -4754,10 +4759,10 @@
|
|
|
4754
4759
|
style: _ctx.computedTextareaStyle,
|
|
4755
4760
|
"aria-label": _ctx.label,
|
|
4756
4761
|
placeholder: _ctx.placeholder
|
|
4757
|
-
}), null, 16,
|
|
4758
|
-
_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span",
|
|
4762
|
+
}), null, 16, _hoisted_11$1),
|
|
4763
|
+
_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_12$1, vue.toDisplayString(_ctx.textLength) + " / " + vue.toDisplayString(_ctx.attrs.maxlength), 1)) : vue.createCommentVNode("v-if", true)
|
|
4759
4764
|
], 64))
|
|
4760
|
-
],
|
|
4765
|
+
], 14, _hoisted_1$17)), [
|
|
4761
4766
|
[vue.vShow, _ctx.type !== "hidden"]
|
|
4762
4767
|
]);
|
|
4763
4768
|
}
|
|
@@ -5268,6 +5273,214 @@
|
|
|
5268
5273
|
});
|
|
5269
5274
|
const PsBreadcrumbItem = withNoopInstall(script$1w);
|
|
5270
5275
|
|
|
5276
|
+
function tryOnScopeDispose(fn) {
|
|
5277
|
+
if (vue.getCurrentScope()) {
|
|
5278
|
+
vue.onScopeDispose(fn);
|
|
5279
|
+
return true;
|
|
5280
|
+
}
|
|
5281
|
+
return false;
|
|
5282
|
+
}
|
|
5283
|
+
|
|
5284
|
+
const isClient = typeof window !== "undefined";
|
|
5285
|
+
const isString = (val) => typeof val === "string";
|
|
5286
|
+
const noop = () => {
|
|
5287
|
+
};
|
|
5288
|
+
|
|
5289
|
+
function createFilterWrapper(filter, fn) {
|
|
5290
|
+
function wrapper(...args) {
|
|
5291
|
+
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
5292
|
+
}
|
|
5293
|
+
return wrapper;
|
|
5294
|
+
}
|
|
5295
|
+
function throttleFilter(ms, trailing = true, leading = true) {
|
|
5296
|
+
let lastExec = 0;
|
|
5297
|
+
let timer;
|
|
5298
|
+
let preventLeading = !leading;
|
|
5299
|
+
const clear = () => {
|
|
5300
|
+
if (timer) {
|
|
5301
|
+
clearTimeout(timer);
|
|
5302
|
+
timer = void 0;
|
|
5303
|
+
}
|
|
5304
|
+
};
|
|
5305
|
+
const filter = (invoke) => {
|
|
5306
|
+
const duration = vue.unref(ms);
|
|
5307
|
+
const elapsed = Date.now() - lastExec;
|
|
5308
|
+
clear();
|
|
5309
|
+
if (duration <= 0) {
|
|
5310
|
+
lastExec = Date.now();
|
|
5311
|
+
return invoke();
|
|
5312
|
+
}
|
|
5313
|
+
if (elapsed > duration) {
|
|
5314
|
+
lastExec = Date.now();
|
|
5315
|
+
if (preventLeading)
|
|
5316
|
+
preventLeading = false;
|
|
5317
|
+
else
|
|
5318
|
+
invoke();
|
|
5319
|
+
} else if (trailing) {
|
|
5320
|
+
timer = setTimeout(() => {
|
|
5321
|
+
lastExec = Date.now();
|
|
5322
|
+
if (!leading)
|
|
5323
|
+
preventLeading = true;
|
|
5324
|
+
clear();
|
|
5325
|
+
invoke();
|
|
5326
|
+
}, duration);
|
|
5327
|
+
}
|
|
5328
|
+
if (!leading && !timer)
|
|
5329
|
+
timer = setTimeout(() => preventLeading = true, duration);
|
|
5330
|
+
};
|
|
5331
|
+
return filter;
|
|
5332
|
+
}
|
|
5333
|
+
|
|
5334
|
+
function useThrottleFn(fn, ms = 200, trailing = true, leading = true) {
|
|
5335
|
+
return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5338
|
+
function useTimeoutFn(cb, interval, options = {}) {
|
|
5339
|
+
const {
|
|
5340
|
+
immediate = true
|
|
5341
|
+
} = options;
|
|
5342
|
+
const isPending = vue.ref(false);
|
|
5343
|
+
let timer = null;
|
|
5344
|
+
function clear() {
|
|
5345
|
+
if (timer) {
|
|
5346
|
+
clearTimeout(timer);
|
|
5347
|
+
timer = null;
|
|
5348
|
+
}
|
|
5349
|
+
}
|
|
5350
|
+
function stop() {
|
|
5351
|
+
isPending.value = false;
|
|
5352
|
+
clear();
|
|
5353
|
+
}
|
|
5354
|
+
function start(...args) {
|
|
5355
|
+
clear();
|
|
5356
|
+
isPending.value = true;
|
|
5357
|
+
timer = setTimeout(() => {
|
|
5358
|
+
isPending.value = false;
|
|
5359
|
+
timer = null;
|
|
5360
|
+
cb(...args);
|
|
5361
|
+
}, vue.unref(interval));
|
|
5362
|
+
}
|
|
5363
|
+
if (immediate) {
|
|
5364
|
+
isPending.value = true;
|
|
5365
|
+
if (isClient)
|
|
5366
|
+
start();
|
|
5367
|
+
}
|
|
5368
|
+
tryOnScopeDispose(stop);
|
|
5369
|
+
return {
|
|
5370
|
+
isPending,
|
|
5371
|
+
start,
|
|
5372
|
+
stop
|
|
5373
|
+
};
|
|
5374
|
+
}
|
|
5375
|
+
|
|
5376
|
+
function unrefElement(elRef) {
|
|
5377
|
+
var _a;
|
|
5378
|
+
const plain = vue.unref(elRef);
|
|
5379
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
5380
|
+
}
|
|
5381
|
+
|
|
5382
|
+
const defaultWindow = isClient ? window : void 0;
|
|
5383
|
+
isClient ? window.document : void 0;
|
|
5384
|
+
isClient ? window.navigator : void 0;
|
|
5385
|
+
|
|
5386
|
+
function useEventListener(...args) {
|
|
5387
|
+
let target;
|
|
5388
|
+
let event;
|
|
5389
|
+
let listener;
|
|
5390
|
+
let options;
|
|
5391
|
+
if (isString(args[0])) {
|
|
5392
|
+
[event, listener, options] = args;
|
|
5393
|
+
target = defaultWindow;
|
|
5394
|
+
} else {
|
|
5395
|
+
[target, event, listener, options] = args;
|
|
5396
|
+
}
|
|
5397
|
+
if (!target)
|
|
5398
|
+
return noop;
|
|
5399
|
+
let cleanup = noop;
|
|
5400
|
+
const stopWatch = vue.watch(() => vue.unref(target), (el) => {
|
|
5401
|
+
cleanup();
|
|
5402
|
+
if (!el)
|
|
5403
|
+
return;
|
|
5404
|
+
el.addEventListener(event, listener, options);
|
|
5405
|
+
cleanup = () => {
|
|
5406
|
+
el.removeEventListener(event, listener, options);
|
|
5407
|
+
cleanup = noop;
|
|
5408
|
+
};
|
|
5409
|
+
}, { immediate: true, flush: "post" });
|
|
5410
|
+
const stop = () => {
|
|
5411
|
+
stopWatch();
|
|
5412
|
+
cleanup();
|
|
5413
|
+
};
|
|
5414
|
+
tryOnScopeDispose(stop);
|
|
5415
|
+
return stop;
|
|
5416
|
+
}
|
|
5417
|
+
|
|
5418
|
+
function useCssVar(prop, target, { window = defaultWindow } = {}) {
|
|
5419
|
+
const variable = vue.ref("");
|
|
5420
|
+
const elRef = vue.computed(() => {
|
|
5421
|
+
var _a;
|
|
5422
|
+
return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
|
|
5423
|
+
});
|
|
5424
|
+
vue.watch(elRef, (el) => {
|
|
5425
|
+
if (el && window)
|
|
5426
|
+
variable.value = window.getComputedStyle(el).getPropertyValue(prop);
|
|
5427
|
+
}, { immediate: true });
|
|
5428
|
+
vue.watch(variable, (val) => {
|
|
5429
|
+
var _a;
|
|
5430
|
+
if ((_a = elRef.value) == null ? void 0 : _a.style)
|
|
5431
|
+
elRef.value.style.setProperty(prop, val);
|
|
5432
|
+
});
|
|
5433
|
+
return variable;
|
|
5434
|
+
}
|
|
5435
|
+
|
|
5436
|
+
var SwipeDirection;
|
|
5437
|
+
(function(SwipeDirection2) {
|
|
5438
|
+
SwipeDirection2["UP"] = "UP";
|
|
5439
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
5440
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
5441
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
5442
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
5443
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
5444
|
+
|
|
5445
|
+
function calcColorChannels(c) {
|
|
5446
|
+
let rawColor = c.replace("#", "");
|
|
5447
|
+
if (/^[0-9a-fA-F]{3}$/.test(rawColor)) {
|
|
5448
|
+
rawColor = rawColor[0].repeat(2) + rawColor[1].repeat(2) + rawColor[2].repeat(2);
|
|
5449
|
+
}
|
|
5450
|
+
if (/^[0-9a-fA-F]{6}$/.test(rawColor)) {
|
|
5451
|
+
return {
|
|
5452
|
+
red: parseInt(rawColor.slice(0, 2), 16),
|
|
5453
|
+
green: parseInt(rawColor.slice(2, 4), 16),
|
|
5454
|
+
blue: parseInt(rawColor.slice(4, 6), 16)
|
|
5455
|
+
};
|
|
5456
|
+
}
|
|
5457
|
+
return {
|
|
5458
|
+
red: 255,
|
|
5459
|
+
green: 255,
|
|
5460
|
+
blue: 255
|
|
5461
|
+
};
|
|
5462
|
+
}
|
|
5463
|
+
function mixColor(color, percent = 0.2) {
|
|
5464
|
+
let { red, green, blue } = calcColorChannels(color);
|
|
5465
|
+
if (percent > 0) {
|
|
5466
|
+
red *= 1 - percent;
|
|
5467
|
+
green *= 1 - percent;
|
|
5468
|
+
blue *= 1 - percent;
|
|
5469
|
+
} else {
|
|
5470
|
+
const value = Math.abs(percent);
|
|
5471
|
+
red += (255 - red) * Math.abs(percent);
|
|
5472
|
+
green += (255 - green) * value;
|
|
5473
|
+
blue += (255 - blue) * value;
|
|
5474
|
+
}
|
|
5475
|
+
return `rgb(${Math.round(red)}, ${Math.round(green)}, ${Math.round(blue)})`;
|
|
5476
|
+
}
|
|
5477
|
+
function lighten(color, percent = 0.2) {
|
|
5478
|
+
return mixColor(color, -percent);
|
|
5479
|
+
}
|
|
5480
|
+
function darken(color, percent = 0.2) {
|
|
5481
|
+
return mixColor(color, percent);
|
|
5482
|
+
}
|
|
5483
|
+
|
|
5271
5484
|
const buttonType = [
|
|
5272
5485
|
"default",
|
|
5273
5486
|
"primary",
|
|
@@ -5301,6 +5514,7 @@
|
|
|
5301
5514
|
autofocus: Boolean,
|
|
5302
5515
|
round: Boolean,
|
|
5303
5516
|
circle: Boolean,
|
|
5517
|
+
color: String,
|
|
5304
5518
|
autoInsertSpace: {
|
|
5305
5519
|
type: Boolean
|
|
5306
5520
|
}
|
|
@@ -5339,7 +5553,44 @@
|
|
|
5339
5553
|
size: vue.computed(() => elBtnGroup == null ? void 0 : elBtnGroup.size)
|
|
5340
5554
|
});
|
|
5341
5555
|
const buttonType = vue.computed(() => props.type || (elBtnGroup == null ? void 0 : elBtnGroup.type) || "default");
|
|
5556
|
+
const typeColor = vue.computed(() => useCssVar(`--el-color-${props.type}`).value);
|
|
5557
|
+
const buttonStyle = vue.computed(() => {
|
|
5558
|
+
let styles = {};
|
|
5559
|
+
const buttonColor = props.color || typeColor.value;
|
|
5560
|
+
if (buttonColor) {
|
|
5561
|
+
const darkenBgColor = darken(buttonColor, 0.1);
|
|
5562
|
+
if (props.plain) {
|
|
5563
|
+
styles = {
|
|
5564
|
+
"--el-button-bg-color": lighten(buttonColor, 0.9),
|
|
5565
|
+
"--el-button-text-color": buttonColor,
|
|
5566
|
+
"--el-button-hover-text-color": "var(--el-color-white)",
|
|
5567
|
+
"--el-button-hover-bg-color": buttonColor,
|
|
5568
|
+
"--el-button-hover-border-color": buttonColor,
|
|
5569
|
+
"--el-button-active-bg-color": darkenBgColor,
|
|
5570
|
+
"--el-button-active-text-color": "var(--el-color-white)",
|
|
5571
|
+
"--el-button-active-border-color": darkenBgColor
|
|
5572
|
+
};
|
|
5573
|
+
} else {
|
|
5574
|
+
const lightenBgColor = lighten(buttonColor);
|
|
5575
|
+
styles = {
|
|
5576
|
+
"--el-button-bg-color": buttonColor,
|
|
5577
|
+
"--el-button-border-color": buttonColor,
|
|
5578
|
+
"--el-button-hover-bg-color": lightenBgColor,
|
|
5579
|
+
"--el-button-hover-border-color": lightenBgColor,
|
|
5580
|
+
"--el-button-active-bg-color": darkenBgColor,
|
|
5581
|
+
"--el-button-active-border-color": darkenBgColor
|
|
5582
|
+
};
|
|
5583
|
+
}
|
|
5584
|
+
if (buttonDisabled.value) {
|
|
5585
|
+
const disabledButtonColor = lighten(buttonColor, 0.5);
|
|
5586
|
+
styles["--el-button-disabled-bg-color"] = disabledButtonColor;
|
|
5587
|
+
styles["--el-button-disabled-border-color"] = disabledButtonColor;
|
|
5588
|
+
}
|
|
5589
|
+
}
|
|
5590
|
+
return styles;
|
|
5591
|
+
});
|
|
5342
5592
|
return {
|
|
5593
|
+
buttonStyle,
|
|
5343
5594
|
buttonSize,
|
|
5344
5595
|
buttonType,
|
|
5345
5596
|
buttonDisabled,
|
|
@@ -5367,7 +5618,8 @@
|
|
|
5367
5618
|
]),
|
|
5368
5619
|
disabled: _ctx.buttonDisabled || _ctx.loading,
|
|
5369
5620
|
autofocus: _ctx.autofocus,
|
|
5370
|
-
type: _ctx.nativeType
|
|
5621
|
+
type: _ctx.nativeType,
|
|
5622
|
+
style: vue.normalizeStyle(_ctx.buttonStyle)
|
|
5371
5623
|
}, [
|
|
5372
5624
|
_ctx.loading ? (vue.openBlock(), vue.createBlock(_component_ps_icon, {
|
|
5373
5625
|
key: 0,
|
|
@@ -5389,7 +5641,7 @@
|
|
|
5389
5641
|
}, [
|
|
5390
5642
|
vue.renderSlot(_ctx.$slots, "default")
|
|
5391
5643
|
], 2)) : vue.createCommentVNode("v-if", true)
|
|
5392
|
-
],
|
|
5644
|
+
], 14, _hoisted_1$11);
|
|
5393
5645
|
}
|
|
5394
5646
|
|
|
5395
5647
|
script$1v.render = render$1o;
|
|
@@ -10547,149 +10799,6 @@
|
|
|
10547
10799
|
}
|
|
10548
10800
|
});
|
|
10549
10801
|
|
|
10550
|
-
function tryOnScopeDispose(fn) {
|
|
10551
|
-
if (vue.getCurrentScope()) {
|
|
10552
|
-
vue.onScopeDispose(fn);
|
|
10553
|
-
return true;
|
|
10554
|
-
}
|
|
10555
|
-
return false;
|
|
10556
|
-
}
|
|
10557
|
-
|
|
10558
|
-
const isClient = typeof window !== "undefined";
|
|
10559
|
-
const isString = (val) => typeof val === "string";
|
|
10560
|
-
const noop = () => {
|
|
10561
|
-
};
|
|
10562
|
-
|
|
10563
|
-
function createFilterWrapper(filter, fn) {
|
|
10564
|
-
function wrapper(...args) {
|
|
10565
|
-
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
10566
|
-
}
|
|
10567
|
-
return wrapper;
|
|
10568
|
-
}
|
|
10569
|
-
function throttleFilter(ms, trailing = true, leading = true) {
|
|
10570
|
-
let lastExec = 0;
|
|
10571
|
-
let timer;
|
|
10572
|
-
let preventLeading = !leading;
|
|
10573
|
-
const clear = () => {
|
|
10574
|
-
if (timer) {
|
|
10575
|
-
clearTimeout(timer);
|
|
10576
|
-
timer = void 0;
|
|
10577
|
-
}
|
|
10578
|
-
};
|
|
10579
|
-
const filter = (invoke) => {
|
|
10580
|
-
const duration = vue.unref(ms);
|
|
10581
|
-
const elapsed = Date.now() - lastExec;
|
|
10582
|
-
clear();
|
|
10583
|
-
if (duration <= 0) {
|
|
10584
|
-
lastExec = Date.now();
|
|
10585
|
-
return invoke();
|
|
10586
|
-
}
|
|
10587
|
-
if (elapsed > duration) {
|
|
10588
|
-
lastExec = Date.now();
|
|
10589
|
-
if (preventLeading)
|
|
10590
|
-
preventLeading = false;
|
|
10591
|
-
else
|
|
10592
|
-
invoke();
|
|
10593
|
-
} else if (trailing) {
|
|
10594
|
-
timer = setTimeout(() => {
|
|
10595
|
-
lastExec = Date.now();
|
|
10596
|
-
if (!leading)
|
|
10597
|
-
preventLeading = true;
|
|
10598
|
-
clear();
|
|
10599
|
-
invoke();
|
|
10600
|
-
}, duration);
|
|
10601
|
-
}
|
|
10602
|
-
if (!leading && !timer)
|
|
10603
|
-
timer = setTimeout(() => preventLeading = true, duration);
|
|
10604
|
-
};
|
|
10605
|
-
return filter;
|
|
10606
|
-
}
|
|
10607
|
-
|
|
10608
|
-
function useThrottleFn(fn, ms = 200, trailing = true, leading = true) {
|
|
10609
|
-
return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
|
|
10610
|
-
}
|
|
10611
|
-
|
|
10612
|
-
function useTimeoutFn(cb, interval, options = {}) {
|
|
10613
|
-
const {
|
|
10614
|
-
immediate = true
|
|
10615
|
-
} = options;
|
|
10616
|
-
const isPending = vue.ref(false);
|
|
10617
|
-
let timer = null;
|
|
10618
|
-
function clear() {
|
|
10619
|
-
if (timer) {
|
|
10620
|
-
clearTimeout(timer);
|
|
10621
|
-
timer = null;
|
|
10622
|
-
}
|
|
10623
|
-
}
|
|
10624
|
-
function stop() {
|
|
10625
|
-
isPending.value = false;
|
|
10626
|
-
clear();
|
|
10627
|
-
}
|
|
10628
|
-
function start(...args) {
|
|
10629
|
-
clear();
|
|
10630
|
-
isPending.value = true;
|
|
10631
|
-
timer = setTimeout(() => {
|
|
10632
|
-
isPending.value = false;
|
|
10633
|
-
timer = null;
|
|
10634
|
-
cb(...args);
|
|
10635
|
-
}, vue.unref(interval));
|
|
10636
|
-
}
|
|
10637
|
-
if (immediate) {
|
|
10638
|
-
isPending.value = true;
|
|
10639
|
-
if (isClient)
|
|
10640
|
-
start();
|
|
10641
|
-
}
|
|
10642
|
-
tryOnScopeDispose(stop);
|
|
10643
|
-
return {
|
|
10644
|
-
isPending,
|
|
10645
|
-
start,
|
|
10646
|
-
stop
|
|
10647
|
-
};
|
|
10648
|
-
}
|
|
10649
|
-
|
|
10650
|
-
const defaultWindow = isClient ? window : void 0;
|
|
10651
|
-
|
|
10652
|
-
function useEventListener(...args) {
|
|
10653
|
-
let target;
|
|
10654
|
-
let event;
|
|
10655
|
-
let listener;
|
|
10656
|
-
let options;
|
|
10657
|
-
if (isString(args[0])) {
|
|
10658
|
-
[event, listener, options] = args;
|
|
10659
|
-
target = defaultWindow;
|
|
10660
|
-
} else {
|
|
10661
|
-
[target, event, listener, options] = args;
|
|
10662
|
-
}
|
|
10663
|
-
if (!target)
|
|
10664
|
-
return noop;
|
|
10665
|
-
let cleanup = noop;
|
|
10666
|
-
const stopWatch = vue.watch(() => vue.unref(target), (el) => {
|
|
10667
|
-
cleanup();
|
|
10668
|
-
if (!el)
|
|
10669
|
-
return;
|
|
10670
|
-
el.addEventListener(event, listener, options);
|
|
10671
|
-
cleanup = () => {
|
|
10672
|
-
el.removeEventListener(event, listener, options);
|
|
10673
|
-
cleanup = noop;
|
|
10674
|
-
};
|
|
10675
|
-
}, { immediate: true, flush: "post" });
|
|
10676
|
-
const stop = () => {
|
|
10677
|
-
stopWatch();
|
|
10678
|
-
cleanup();
|
|
10679
|
-
};
|
|
10680
|
-
tryOnScopeDispose(stop);
|
|
10681
|
-
return stop;
|
|
10682
|
-
}
|
|
10683
|
-
|
|
10684
|
-
var SwipeDirection;
|
|
10685
|
-
(function(SwipeDirection2) {
|
|
10686
|
-
SwipeDirection2["UP"] = "UP";
|
|
10687
|
-
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
10688
|
-
SwipeDirection2["DOWN"] = "DOWN";
|
|
10689
|
-
SwipeDirection2["LEFT"] = "LEFT";
|
|
10690
|
-
SwipeDirection2["NONE"] = "NONE";
|
|
10691
|
-
})(SwipeDirection || (SwipeDirection = {}));
|
|
10692
|
-
|
|
10693
10802
|
const onTouchMove = (e) => {
|
|
10694
10803
|
e.preventDefault();
|
|
10695
10804
|
e.stopPropagation();
|
|
@@ -14382,14 +14491,10 @@
|
|
|
14382
14491
|
});
|
|
14383
14492
|
vue.onMounted(() => {
|
|
14384
14493
|
if (props.prop) {
|
|
14385
|
-
elForm == null ? void 0 : elForm.addField(elFormItem);
|
|
14386
14494
|
const value = fieldValue.value;
|
|
14387
14495
|
Array.isArray(value) ? [...value] : value;
|
|
14388
14496
|
}
|
|
14389
14497
|
});
|
|
14390
|
-
vue.onBeforeUnmount(() => {
|
|
14391
|
-
elForm == null ? void 0 : elForm.removeField(elFormItem);
|
|
14392
|
-
});
|
|
14393
14498
|
vue.provide(elFormItemKey, elFormItem);
|
|
14394
14499
|
const formItemClass = vue.computed(() => [
|
|
14395
14500
|
{
|
|
@@ -15279,42 +15384,6 @@
|
|
|
15279
15384
|
};
|
|
15280
15385
|
}
|
|
15281
15386
|
|
|
15282
|
-
function calcColorChannels(c) {
|
|
15283
|
-
let rawColor = c.replace("#", "");
|
|
15284
|
-
if (/^[0-9a-fA-F]{3}$/.test(rawColor)) {
|
|
15285
|
-
rawColor = rawColor[0].repeat(2) + rawColor[1].repeat(2) + rawColor[2].repeat(2);
|
|
15286
|
-
}
|
|
15287
|
-
if (/^[0-9a-fA-F]{6}$/.test(rawColor)) {
|
|
15288
|
-
return {
|
|
15289
|
-
red: parseInt(rawColor.slice(0, 2), 16),
|
|
15290
|
-
green: parseInt(rawColor.slice(2, 4), 16),
|
|
15291
|
-
blue: parseInt(rawColor.slice(4, 6), 16)
|
|
15292
|
-
};
|
|
15293
|
-
}
|
|
15294
|
-
return {
|
|
15295
|
-
red: 255,
|
|
15296
|
-
green: 255,
|
|
15297
|
-
blue: 255
|
|
15298
|
-
};
|
|
15299
|
-
}
|
|
15300
|
-
function mixColor(color, percent = 0.2) {
|
|
15301
|
-
let { red, green, blue } = calcColorChannels(color);
|
|
15302
|
-
if (percent > 0) {
|
|
15303
|
-
red *= 1 - percent;
|
|
15304
|
-
green *= 1 - percent;
|
|
15305
|
-
blue *= 1 - percent;
|
|
15306
|
-
} else {
|
|
15307
|
-
const value = Math.abs(percent);
|
|
15308
|
-
red += (255 - red) * Math.abs(percent);
|
|
15309
|
-
green += (255 - green) * value;
|
|
15310
|
-
blue += (255 - blue) * value;
|
|
15311
|
-
}
|
|
15312
|
-
return `rgb(${Math.round(red)}, ${Math.round(green)}, ${Math.round(blue)})`;
|
|
15313
|
-
}
|
|
15314
|
-
function darken(color, percent = 0.2) {
|
|
15315
|
-
return mixColor(color, percent);
|
|
15316
|
-
}
|
|
15317
|
-
|
|
15318
15387
|
function useMenuColor(props) {
|
|
15319
15388
|
const menuBarColor = vue.computed(() => {
|
|
15320
15389
|
const color = props.backgroundColor;
|
|
@@ -30622,6 +30691,7 @@
|
|
|
30622
30691
|
var Components = Comps;
|
|
30623
30692
|
|
|
30624
30693
|
var Plugins = [
|
|
30694
|
+
PsLoading,
|
|
30625
30695
|
PsPopoverDirective
|
|
30626
30696
|
];
|
|
30627
30697
|
|