@touchvue/plugin 1.0.0-beta.10 → 1.0.0-beta.11
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/index.cjs +3 -3
- package/index.mjs +755 -840
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4103,33 +4103,6 @@ function matchFormat(input, format2) {
|
|
|
4103
4103
|
const regex = new RegExp(`^${regexStr}$`);
|
|
4104
4104
|
return regex.test(input);
|
|
4105
4105
|
}
|
|
4106
|
-
function format$1(date, fmt) {
|
|
4107
|
-
const o = {
|
|
4108
|
-
"M+": date.getMonth() + 1,
|
|
4109
|
-
// 月份
|
|
4110
|
-
"d+": date.getDate(),
|
|
4111
|
-
// 日
|
|
4112
|
-
"h+": date.getHours(),
|
|
4113
|
-
// 小时
|
|
4114
|
-
"m+": date.getMinutes(),
|
|
4115
|
-
// 分
|
|
4116
|
-
"s+": date.getSeconds(),
|
|
4117
|
-
// 秒
|
|
4118
|
-
"q+": Math.floor((date.getMonth() + 3) / 3),
|
|
4119
|
-
// 季度
|
|
4120
|
-
S: date.getMilliseconds()
|
|
4121
|
-
// 毫秒
|
|
4122
|
-
};
|
|
4123
|
-
if (/(y+)/.test(fmt)) {
|
|
4124
|
-
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
4125
|
-
}
|
|
4126
|
-
for (const k in o) {
|
|
4127
|
-
if (new RegExp("(" + k + ")").test(fmt)) {
|
|
4128
|
-
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
|
|
4129
|
-
}
|
|
4130
|
-
}
|
|
4131
|
-
return fmt;
|
|
4132
|
-
}
|
|
4133
4106
|
function handleBeforeChange(beforeChange, value) {
|
|
4134
4107
|
return new Promise((resolve, reject) => {
|
|
4135
4108
|
try {
|
|
@@ -4531,7 +4504,7 @@ const fileAjax = (option) => {
|
|
|
4531
4504
|
xhr.send(option.data);
|
|
4532
4505
|
return xhr;
|
|
4533
4506
|
};
|
|
4534
|
-
const _sfc_main$
|
|
4507
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
4535
4508
|
...{
|
|
4536
4509
|
name: "ToButton"
|
|
4537
4510
|
},
|
|
@@ -4547,7 +4520,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
4547
4520
|
width: { default: "" },
|
|
4548
4521
|
iconPosition: { default: "" },
|
|
4549
4522
|
progress: { default: 0 },
|
|
4550
|
-
desc: { default: "" }
|
|
4523
|
+
desc: { default: "" },
|
|
4524
|
+
flex: { type: Boolean, default: false }
|
|
4551
4525
|
},
|
|
4552
4526
|
emits: ["click", "dblclick", "contextmenu"],
|
|
4553
4527
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -4617,6 +4591,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
4617
4591
|
return withDirectives((openBlock(), createElementBlock("button", {
|
|
4618
4592
|
ref_key: "el",
|
|
4619
4593
|
ref: el,
|
|
4594
|
+
flex: __props.flex ? __props.flex : null,
|
|
4620
4595
|
class: normalizeClass(["to-button", setClass.value]),
|
|
4621
4596
|
style: normalizeStyle(setStyle.value),
|
|
4622
4597
|
desc: __props.desc,
|
|
@@ -4647,19 +4622,20 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
4647
4622
|
style: normalizeStyle({ width: __props.progress + "%" })
|
|
4648
4623
|
}, null, 6)
|
|
4649
4624
|
])) : createCommentVNode("", true)
|
|
4650
|
-
], 46, ["desc"])), [
|
|
4625
|
+
], 46, ["flex", "desc"])), [
|
|
4651
4626
|
[_directive_dis, __props.loading || __props.disabled]
|
|
4652
4627
|
]);
|
|
4653
4628
|
};
|
|
4654
4629
|
}
|
|
4655
4630
|
});
|
|
4656
|
-
const ToButton = withInstall(_sfc_main$
|
|
4657
|
-
const _sfc_main$
|
|
4631
|
+
const ToButton = withInstall(_sfc_main$15);
|
|
4632
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
4658
4633
|
...{
|
|
4659
4634
|
name: "ToIcon"
|
|
4660
4635
|
},
|
|
4661
4636
|
__name: "icon",
|
|
4662
4637
|
props: {
|
|
4638
|
+
flex: { type: Boolean, default: false },
|
|
4663
4639
|
value: { default: "" },
|
|
4664
4640
|
type: { default: "" },
|
|
4665
4641
|
color: { default: "default" },
|
|
@@ -4696,6 +4672,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
4696
4672
|
return openBlock(), createElementBlock("span", {
|
|
4697
4673
|
ref_key: "el",
|
|
4698
4674
|
ref: el,
|
|
4675
|
+
flex: __props.flex ? __props.flex : null,
|
|
4699
4676
|
class: normalizeClass(["to-icon", setClass.value]),
|
|
4700
4677
|
onClick: clickHandle
|
|
4701
4678
|
}, [
|
|
@@ -4706,40 +4683,12 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
4706
4683
|
}, [
|
|
4707
4684
|
renderSlot(_ctx.$slots, "default")
|
|
4708
4685
|
], 512)
|
|
4709
|
-
],
|
|
4710
|
-
};
|
|
4711
|
-
}
|
|
4712
|
-
});
|
|
4713
|
-
const ToIcon = withInstall(_sfc_main$18);
|
|
4714
|
-
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
4715
|
-
...{
|
|
4716
|
-
name: "ToArticle"
|
|
4717
|
-
},
|
|
4718
|
-
__name: "article",
|
|
4719
|
-
setup(__props) {
|
|
4720
|
-
return (_ctx, _cache) => {
|
|
4721
|
-
return openBlock(), createElementBlock("article", { class: "to-article" }, [
|
|
4722
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("header", {
|
|
4723
|
-
key: 0,
|
|
4724
|
-
class: "to-article-header"
|
|
4725
|
-
}, [
|
|
4726
|
-
renderSlot(_ctx.$slots, "header")
|
|
4727
|
-
])) : createCommentVNode("", true),
|
|
4728
|
-
createElementVNode("section", { class: "to-article-content" }, [
|
|
4729
|
-
renderSlot(_ctx.$slots, "default")
|
|
4730
|
-
]),
|
|
4731
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
|
|
4732
|
-
key: 1,
|
|
4733
|
-
class: "to-article-footer"
|
|
4734
|
-
}, [
|
|
4735
|
-
renderSlot(_ctx.$slots, "footer")
|
|
4736
|
-
])) : createCommentVNode("", true)
|
|
4737
|
-
]);
|
|
4686
|
+
], 10, ["flex"]);
|
|
4738
4687
|
};
|
|
4739
4688
|
}
|
|
4740
4689
|
});
|
|
4741
|
-
withInstall(_sfc_main$
|
|
4742
|
-
const _sfc_main$
|
|
4690
|
+
const ToIcon = withInstall(_sfc_main$14);
|
|
4691
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
4743
4692
|
...{
|
|
4744
4693
|
name: "ToBox"
|
|
4745
4694
|
},
|
|
@@ -4755,7 +4704,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
4755
4704
|
trigger: { default: "always" },
|
|
4756
4705
|
clip: { type: Boolean },
|
|
4757
4706
|
link: { type: Boolean, default: false },
|
|
4758
|
-
width: { default: "" }
|
|
4707
|
+
width: { default: "" },
|
|
4708
|
+
flex: { type: Boolean, default: false }
|
|
4759
4709
|
},
|
|
4760
4710
|
setup(__props) {
|
|
4761
4711
|
const props = __props;
|
|
@@ -4830,17 +4780,19 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
4830
4780
|
});
|
|
4831
4781
|
return (_ctx, _cache) => {
|
|
4832
4782
|
return openBlock(), createElementBlock("div", {
|
|
4783
|
+
flex: __props.flex ? __props.flex : null,
|
|
4833
4784
|
class: normalizeClass(["to-box", setClass.value]),
|
|
4834
4785
|
style: normalizeStyle(setStyle.value)
|
|
4835
4786
|
}, [
|
|
4836
4787
|
renderSlot(_ctx.$slots, "default"),
|
|
4837
4788
|
createElementVNode("div", { class: "to-box-check" })
|
|
4838
|
-
],
|
|
4789
|
+
], 14, ["flex"]);
|
|
4839
4790
|
};
|
|
4840
4791
|
}
|
|
4841
4792
|
});
|
|
4842
|
-
withInstall(_sfc_main$
|
|
4793
|
+
withInstall(_sfc_main$13);
|
|
4843
4794
|
const defaultLang = {
|
|
4795
|
+
name: "zh-CN",
|
|
4844
4796
|
to: {
|
|
4845
4797
|
common: {
|
|
4846
4798
|
confirm: "确定",
|
|
@@ -4851,12 +4803,13 @@ const defaultLang = {
|
|
|
4851
4803
|
unlimit: "不限",
|
|
4852
4804
|
select: "选择",
|
|
4853
4805
|
selectAll: "全选",
|
|
4854
|
-
|
|
4806
|
+
inverse: "反选",
|
|
4855
4807
|
originalValue: "原始值:{0}",
|
|
4856
4808
|
data: "选项1,选项2,选项3",
|
|
4857
4809
|
noData: "暂无数据",
|
|
4858
4810
|
noDataDesc: "请先获取到数据",
|
|
4859
4811
|
noMatch: "暂无数据",
|
|
4812
|
+
now: "此刻",
|
|
4860
4813
|
placeholder: {
|
|
4861
4814
|
select: "请选择",
|
|
4862
4815
|
input: "请填写"
|
|
@@ -4909,8 +4862,16 @@ const defaultLang = {
|
|
|
4909
4862
|
requiredRemark: "{0}不能为空"
|
|
4910
4863
|
}
|
|
4911
4864
|
},
|
|
4865
|
+
input: {
|
|
4866
|
+
inputError: "输入内容有误",
|
|
4867
|
+
required: "该项为必填项"
|
|
4868
|
+
},
|
|
4912
4869
|
calendar: {
|
|
4870
|
+
year: {
|
|
4871
|
+
suffix: "年"
|
|
4872
|
+
},
|
|
4913
4873
|
month: {
|
|
4874
|
+
suffix: "月",
|
|
4914
4875
|
m1: "1月",
|
|
4915
4876
|
m2: "2月",
|
|
4916
4877
|
m3: "3月",
|
|
@@ -4962,7 +4923,9 @@ const defaultLang = {
|
|
|
4962
4923
|
total: "共 {0} 条",
|
|
4963
4924
|
pageCount: "共 {0} 页",
|
|
4964
4925
|
pageSize: "{0}条/页",
|
|
4965
|
-
go: "跳转"
|
|
4926
|
+
go: "跳转",
|
|
4927
|
+
prevPage: "上一页",
|
|
4928
|
+
nextPage: "下一页"
|
|
4966
4929
|
},
|
|
4967
4930
|
pic: {
|
|
4968
4931
|
viewer: {
|
|
@@ -4994,6 +4957,11 @@ const defaultLang = {
|
|
|
4994
4957
|
changed: "此处已修改"
|
|
4995
4958
|
},
|
|
4996
4959
|
select: {
|
|
4960
|
+
noData: "暂无数据",
|
|
4961
|
+
noMatch: "无匹配项",
|
|
4962
|
+
filter: "筛选",
|
|
4963
|
+
selectError: "选择有误",
|
|
4964
|
+
required: "不能为空",
|
|
4997
4965
|
input: {
|
|
4998
4966
|
allSelected: "已全选"
|
|
4999
4967
|
},
|
|
@@ -5046,6 +5014,9 @@ const defaultLang = {
|
|
|
5046
5014
|
count: "最多只能上传{0}个文件"
|
|
5047
5015
|
}
|
|
5048
5016
|
}
|
|
5017
|
+
},
|
|
5018
|
+
table: {
|
|
5019
|
+
emptyText: "暂无数据"
|
|
5049
5020
|
}
|
|
5050
5021
|
}
|
|
5051
5022
|
};
|
|
@@ -5075,6 +5046,8 @@ function Format() {
|
|
|
5075
5046
|
}
|
|
5076
5047
|
const format = Format();
|
|
5077
5048
|
let lang = defaultLang;
|
|
5049
|
+
const langKey = ref(0);
|
|
5050
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5078
5051
|
let i18nHandler = function() {
|
|
5079
5052
|
var _a2, _b, _c, _d;
|
|
5080
5053
|
let vuei18n = null;
|
|
@@ -5092,7 +5065,7 @@ let i18nHandler = function() {
|
|
|
5092
5065
|
};
|
|
5093
5066
|
const t = function(path, ...options) {
|
|
5094
5067
|
let value = i18nHandler.apply(this, arguments);
|
|
5095
|
-
if (value !== null && value !== void 0)
|
|
5068
|
+
if (value !== null && value !== void 0 && value !== path)
|
|
5096
5069
|
return value;
|
|
5097
5070
|
const array = path.split(".");
|
|
5098
5071
|
let current = lang;
|
|
@@ -5107,9 +5080,23 @@ const t = function(path, ...options) {
|
|
|
5107
5080
|
}
|
|
5108
5081
|
return "";
|
|
5109
5082
|
};
|
|
5083
|
+
const use = function(l) {
|
|
5084
|
+
lang = l || lang;
|
|
5085
|
+
langKey.value++;
|
|
5086
|
+
listeners.forEach((fn) => fn(lang));
|
|
5087
|
+
};
|
|
5088
|
+
const onLangChange = function(fn) {
|
|
5089
|
+
listeners.add(fn);
|
|
5090
|
+
return () => listeners.delete(fn);
|
|
5091
|
+
};
|
|
5092
|
+
const i18n = function(fn) {
|
|
5093
|
+
i18nHandler = fn || i18nHandler;
|
|
5094
|
+
};
|
|
5095
|
+
({ use, t, i18n, langKey: langKey.value, onLangChange });
|
|
5110
5096
|
function ajax() {
|
|
5111
5097
|
}
|
|
5112
5098
|
const selectProps = {
|
|
5099
|
+
flex: Boolean,
|
|
5113
5100
|
/**
|
|
5114
5101
|
* 懒加载
|
|
5115
5102
|
*/
|
|
@@ -5214,7 +5201,7 @@ const selectProps = {
|
|
|
5214
5201
|
*/
|
|
5215
5202
|
placeholder: {
|
|
5216
5203
|
type: String,
|
|
5217
|
-
default: "
|
|
5204
|
+
default: ""
|
|
5218
5205
|
},
|
|
5219
5206
|
/**
|
|
5220
5207
|
* 占位符颜色
|
|
@@ -5228,14 +5215,14 @@ const selectProps = {
|
|
|
5228
5215
|
*/
|
|
5229
5216
|
nomatchText: {
|
|
5230
5217
|
type: String,
|
|
5231
|
-
default: "
|
|
5218
|
+
default: ""
|
|
5232
5219
|
},
|
|
5233
5220
|
/**
|
|
5234
5221
|
* 暂无数据文本
|
|
5235
5222
|
*/
|
|
5236
5223
|
nodataText: {
|
|
5237
5224
|
type: String,
|
|
5238
|
-
default: "
|
|
5225
|
+
default: ""
|
|
5239
5226
|
},
|
|
5240
5227
|
/**
|
|
5241
5228
|
* 是否只读
|
|
@@ -5282,7 +5269,7 @@ const selectProps = {
|
|
|
5282
5269
|
*/
|
|
5283
5270
|
allText: {
|
|
5284
5271
|
type: String,
|
|
5285
|
-
default: "
|
|
5272
|
+
default: ""
|
|
5286
5273
|
},
|
|
5287
5274
|
/**
|
|
5288
5275
|
* 是否可清空
|
|
@@ -5768,7 +5755,7 @@ const tipDirective = {
|
|
|
5768
5755
|
}
|
|
5769
5756
|
}
|
|
5770
5757
|
};
|
|
5771
|
-
const _sfc_main$
|
|
5758
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
5772
5759
|
...{
|
|
5773
5760
|
name: "ToSelect",
|
|
5774
5761
|
componentName: "ToSelect"
|
|
@@ -6090,7 +6077,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6090
6077
|
const selectAll = () => {
|
|
6091
6078
|
allChange();
|
|
6092
6079
|
};
|
|
6093
|
-
const
|
|
6080
|
+
const inverse = () => {
|
|
6094
6081
|
reverseChange();
|
|
6095
6082
|
};
|
|
6096
6083
|
const multipleItemChange = (value, item) => {
|
|
@@ -6731,8 +6718,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6731
6718
|
const _directive_size = resolveDirective("size");
|
|
6732
6719
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
6733
6720
|
id: _ctx.id,
|
|
6721
|
+
key: unref(langKey),
|
|
6734
6722
|
ref_key: "$el",
|
|
6735
6723
|
ref: $el,
|
|
6724
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
6736
6725
|
class: normalizeClass(["to-select", unref(setClass)]),
|
|
6737
6726
|
style: normalizeStyle(unref(setStyle)),
|
|
6738
6727
|
tabindex: _ctx.tabindex,
|
|
@@ -6796,7 +6785,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6796
6785
|
_ctx.clearable ? (openBlock(), createElementBlock("option", {
|
|
6797
6786
|
key: 0,
|
|
6798
6787
|
value: ""
|
|
6799
|
-
}, toDisplayString(_ctx.placeholder), 1)) : createCommentVNode("", true),
|
|
6788
|
+
}, toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)) : createCommentVNode("", true),
|
|
6800
6789
|
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item, index) => {
|
|
6801
6790
|
return openBlock(), createElementBlock("option", {
|
|
6802
6791
|
key: index,
|
|
@@ -6818,7 +6807,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6818
6807
|
createTextVNode(toDisplayString(_ctx.unit), 1)
|
|
6819
6808
|
], 64)) : createCommentVNode("", true)
|
|
6820
6809
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
6821
|
-
createTextVNode(toDisplayString(_ctx.placeholder), 1)
|
|
6810
|
+
createTextVNode(toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)
|
|
6822
6811
|
], 64))
|
|
6823
6812
|
])) : (openBlock(), createElementBlock("span", {
|
|
6824
6813
|
key: 1,
|
|
@@ -6837,7 +6826,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6837
6826
|
"prevent-focus": "",
|
|
6838
6827
|
width: "full",
|
|
6839
6828
|
mode: "none",
|
|
6840
|
-
placeholder: _ctx.placeholder,
|
|
6829
|
+
placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select"),
|
|
6841
6830
|
onFocus: inputFocus,
|
|
6842
6831
|
onKeyup: inputInput,
|
|
6843
6832
|
onBlur: inputBlur
|
|
@@ -6856,7 +6845,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6856
6845
|
"prevent-focus": "",
|
|
6857
6846
|
width: "full",
|
|
6858
6847
|
mode: "none",
|
|
6859
|
-
placeholder: _ctx.placeholder,
|
|
6848
|
+
placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select"),
|
|
6860
6849
|
onClear: filterClear,
|
|
6861
6850
|
onFocus: filterFocus,
|
|
6862
6851
|
onKeyup: filterInput,
|
|
@@ -6873,7 +6862,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6873
6862
|
"prevent-focus": "",
|
|
6874
6863
|
width: "full",
|
|
6875
6864
|
mode: "none",
|
|
6876
|
-
placeholder: _ctx.placeholder,
|
|
6865
|
+
placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select"),
|
|
6877
6866
|
onClear: filterClear,
|
|
6878
6867
|
onFocus: filterFocus,
|
|
6879
6868
|
onKeyup: filterInput,
|
|
@@ -6884,10 +6873,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6884
6873
|
unref(selected).filter((item) => !item.hide).length === 0 && !_ctx.inputable && !_ctx.filterable && !_ctx.setDataFn ? (openBlock(), createElementBlock("span", {
|
|
6885
6874
|
key: 0,
|
|
6886
6875
|
class: "to-select-box"
|
|
6887
|
-
}, toDisplayString(_ctx.placeholder), 1)) : isAll.value && _ctx.useAllText ? (openBlock(), createElementBlock("span", {
|
|
6876
|
+
}, toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)) : isAll.value && _ctx.useAllText ? (openBlock(), createElementBlock("span", {
|
|
6888
6877
|
key: 1,
|
|
6889
6878
|
class: "to-select-box"
|
|
6890
|
-
}, toDisplayString(_ctx.allText), 1)) : (openBlock(), createElementBlock("span", {
|
|
6879
|
+
}, toDisplayString(_ctx.allText || unref(t)("to.select.input.allSelected")), 1)) : (openBlock(), createElementBlock("span", {
|
|
6891
6880
|
key: 2,
|
|
6892
6881
|
class: "to-select-tag"
|
|
6893
6882
|
}, [
|
|
@@ -6917,7 +6906,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6917
6906
|
disabled: unref($phone),
|
|
6918
6907
|
"prevent-focus": "",
|
|
6919
6908
|
mode: "none",
|
|
6920
|
-
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder,
|
|
6909
|
+
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select"),
|
|
6921
6910
|
onFocus: multipleInputFocus,
|
|
6922
6911
|
onBlur: multipleInputBlur
|
|
6923
6912
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "disabled", "placeholder"])) : createCommentVNode("", true),
|
|
@@ -6931,7 +6920,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6931
6920
|
disabled: unref($phone),
|
|
6932
6921
|
"prevent-focus": "",
|
|
6933
6922
|
mode: "none",
|
|
6934
|
-
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder,
|
|
6923
|
+
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select"),
|
|
6935
6924
|
onFocus: multipleFilterFocus,
|
|
6936
6925
|
onBlur: multipleFilterBlur
|
|
6937
6926
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "disabled", "placeholder"])) : createCommentVNode("", true),
|
|
@@ -6944,7 +6933,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6944
6933
|
"sp-chars": _ctx.inputable ? _ctx.spChars : false,
|
|
6945
6934
|
"prevent-focus": "",
|
|
6946
6935
|
mode: "none",
|
|
6947
|
-
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder,
|
|
6936
|
+
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select"),
|
|
6948
6937
|
onFocus: multipleFilterFocus,
|
|
6949
6938
|
onBlur: multipleFilterBlur
|
|
6950
6939
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "placeholder"])) : createCommentVNode("", true)
|
|
@@ -6974,9 +6963,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6974
6963
|
}, [
|
|
6975
6964
|
errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6976
6965
|
_ctx.inputable ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6977
|
-
createTextVNode("
|
|
6966
|
+
createTextVNode(toDisplayString(unref(t)("to.input.inputError")), 1)
|
|
6978
6967
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
6979
|
-
createTextVNode("
|
|
6968
|
+
createTextVNode(toDisplayString(unref(t)("to.select.selectError")), 1)
|
|
6980
6969
|
], 64)),
|
|
6981
6970
|
withDirectives(createVNode(unref(ToIcon), {
|
|
6982
6971
|
value: "help",
|
|
@@ -6992,7 +6981,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6992
6981
|
]
|
|
6993
6982
|
])
|
|
6994
6983
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
6995
|
-
createTextVNode("
|
|
6984
|
+
createTextVNode(toDisplayString(unref(t)("to.select.required")), 1)
|
|
6996
6985
|
], 64))
|
|
6997
6986
|
])), [
|
|
6998
6987
|
[unref(vColorDirective), "danger"]
|
|
@@ -7107,7 +7096,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7107
7096
|
"sp-chars": _ctx.spChars,
|
|
7108
7097
|
"prevent-focus": "",
|
|
7109
7098
|
mode: "none",
|
|
7110
|
-
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder
|
|
7099
|
+
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select")
|
|
7111
7100
|
}, {
|
|
7112
7101
|
default: withCtx(() => [
|
|
7113
7102
|
createVNode(unref(ToButton), {
|
|
@@ -7126,7 +7115,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7126
7115
|
"onUpdate:modelValue": ($event) => multipleInputValue.value = $event,
|
|
7127
7116
|
"prevent-focus": "",
|
|
7128
7117
|
mode: "none",
|
|
7129
|
-
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder
|
|
7118
|
+
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select")
|
|
7130
7119
|
}, {
|
|
7131
7120
|
default: withCtx(() => [
|
|
7132
7121
|
createVNode(unref(ToButton), {
|
|
@@ -7149,7 +7138,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7149
7138
|
"sp-chars": false,
|
|
7150
7139
|
width: "full",
|
|
7151
7140
|
"prevent-focus": "",
|
|
7152
|
-
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder
|
|
7141
|
+
placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select")
|
|
7153
7142
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
|
|
7154
7143
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
7155
7144
|
_ctx.inputable ? (openBlock(), createBlock(unref(ToInput), {
|
|
@@ -7161,7 +7150,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7161
7150
|
"sp-chars": _ctx.spChars,
|
|
7162
7151
|
"prevent-focus": "",
|
|
7163
7152
|
width: "full",
|
|
7164
|
-
placeholder: _ctx.placeholder
|
|
7153
|
+
placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select")
|
|
7165
7154
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "placeholder"])) : (openBlock(), createBlock(unref(ToInput), {
|
|
7166
7155
|
key: 1,
|
|
7167
7156
|
ref_key: "popupFilter",
|
|
@@ -7171,9 +7160,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7171
7160
|
"sp-chars": false,
|
|
7172
7161
|
"prevent-focus": "",
|
|
7173
7162
|
width: "full",
|
|
7174
|
-
placeholder: "
|
|
7163
|
+
placeholder: unref(t)("to.select.filter"),
|
|
7175
7164
|
onClear: filterClear
|
|
7176
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]))
|
|
7165
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
|
|
7177
7166
|
], 64))
|
|
7178
7167
|
]),
|
|
7179
7168
|
_: 1
|
|
@@ -7188,7 +7177,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7188
7177
|
value: 2
|
|
7189
7178
|
}, {
|
|
7190
7179
|
default: withCtx(() => [
|
|
7191
|
-
createTextVNode(toDisplayString(_ctx.nodataText), 1)
|
|
7180
|
+
createTextVNode(toDisplayString(_ctx.nodataText || unref(t)("to.select.noData")), 1)
|
|
7192
7181
|
]),
|
|
7193
7182
|
_: 1
|
|
7194
7183
|
})), [
|
|
@@ -7198,7 +7187,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7198
7187
|
value: 2
|
|
7199
7188
|
}, {
|
|
7200
7189
|
default: withCtx(() => [
|
|
7201
|
-
createTextVNode(toDisplayString(_ctx.nomatchText), 1)
|
|
7190
|
+
createTextVNode(toDisplayString(_ctx.nomatchText || unref(t)("to.select.noMatch")), 1)
|
|
7202
7191
|
]),
|
|
7203
7192
|
_: 1
|
|
7204
7193
|
})), [
|
|
@@ -7217,9 +7206,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7217
7206
|
]),
|
|
7218
7207
|
_: 1
|
|
7219
7208
|
}),
|
|
7220
|
-
createVNode(unref(ToButton), { onClick:
|
|
7209
|
+
createVNode(unref(ToButton), { onClick: inverse }, {
|
|
7221
7210
|
default: withCtx(() => [
|
|
7222
|
-
createTextVNode(toDisplayString(unref(t)("to.common.
|
|
7211
|
+
createTextVNode(toDisplayString(unref(t)("to.common.inverse")), 1)
|
|
7223
7212
|
]),
|
|
7224
7213
|
_: 1
|
|
7225
7214
|
})
|
|
@@ -7269,7 +7258,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7269
7258
|
item[iLabelText.value] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7270
7259
|
createTextVNode(toDisplayString(item[iLabelText.value]), 1)
|
|
7271
7260
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
7272
|
-
createTextVNode(toDisplayString(_ctx.placeholder), 1)
|
|
7261
|
+
createTextVNode(toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)
|
|
7273
7262
|
], 64))
|
|
7274
7263
|
], 10, ["onClick"])), [
|
|
7275
7264
|
[vShow, filterByValue(item)],
|
|
@@ -7293,10 +7282,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7293
7282
|
width: "full"
|
|
7294
7283
|
}, {
|
|
7295
7284
|
default: withCtx(() => [
|
|
7296
|
-
createVNode(unref(
|
|
7297
|
-
width: "full",
|
|
7298
|
-
space: "0"
|
|
7299
|
-
}, {
|
|
7285
|
+
createVNode(unref(ToGrid), null, {
|
|
7300
7286
|
default: withCtx(() => [
|
|
7301
7287
|
withDirectives((openBlock(), createBlock(unref(ToButton), {
|
|
7302
7288
|
fillet: "none",
|
|
@@ -7336,10 +7322,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7336
7322
|
nodata.value ? (openBlock(), createElementBlock("div", {
|
|
7337
7323
|
key: 0,
|
|
7338
7324
|
class: "to-select-option-tip"
|
|
7339
|
-
}, toDisplayString(_ctx.nodataText), 1)) : nomatch.value ? (openBlock(), createElementBlock("div", {
|
|
7325
|
+
}, toDisplayString(_ctx.nodataText || unref(t)("to.select.noData")), 1)) : nomatch.value ? (openBlock(), createElementBlock("div", {
|
|
7340
7326
|
key: 1,
|
|
7341
7327
|
class: "to-select-option-tip"
|
|
7342
|
-
}, toDisplayString(_ctx.nomatchText), 1)) : createCommentVNode("", true),
|
|
7328
|
+
}, toDisplayString(_ctx.nomatchText || unref(t)("to.select.noMatch")), 1)) : createCommentVNode("", true),
|
|
7343
7329
|
!nodata.value && !nomatch.value ? (openBlock(), createBlock(unref(ToScroll), { key: 2 }, {
|
|
7344
7330
|
default: withCtx(() => [
|
|
7345
7331
|
_ctx.multiple ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -7355,10 +7341,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7355
7341
|
}),
|
|
7356
7342
|
createVNode(unref(ToButton), {
|
|
7357
7343
|
class: "to-select-option-button value-inverse",
|
|
7358
|
-
onClick:
|
|
7344
|
+
onClick: inverse
|
|
7359
7345
|
}, {
|
|
7360
7346
|
default: withCtx(() => [
|
|
7361
|
-
createTextVNode(toDisplayString(unref(t)("to.common.
|
|
7347
|
+
createTextVNode(toDisplayString(unref(t)("to.common.inverse")), 1)
|
|
7362
7348
|
]),
|
|
7363
7349
|
_: 1
|
|
7364
7350
|
})
|
|
@@ -7407,7 +7393,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7407
7393
|
}, toDisplayString(item[iLabelText.value]), 1)) : (openBlock(), createElementBlock("span", {
|
|
7408
7394
|
key: 1,
|
|
7409
7395
|
class: "to-select-option-item-text"
|
|
7410
|
-
}, toDisplayString(_ctx.placeholder), 1))
|
|
7396
|
+
}, toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1))
|
|
7411
7397
|
], 10, ["onClick"])), [
|
|
7412
7398
|
[vShow, filterByValue(item)],
|
|
7413
7399
|
[unref(vDis), !!item.disabled]
|
|
@@ -7426,13 +7412,13 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
7426
7412
|
}, 8, ["style", "class", "align", "width", "slide", "position"])
|
|
7427
7413
|
], 2)
|
|
7428
7414
|
]))
|
|
7429
|
-
], 46, ["id", "tabindex"])), [
|
|
7415
|
+
], 46, ["id", "flex", "tabindex"])), [
|
|
7430
7416
|
[_directive_tip, changed.value ? unref(t)("to.common.originalValue", getLabel(valueStore.value[0])) : ""]
|
|
7431
7417
|
]);
|
|
7432
7418
|
};
|
|
7433
7419
|
}
|
|
7434
7420
|
});
|
|
7435
|
-
const ToSelect = withInstall(_sfc_main$
|
|
7421
|
+
const ToSelect = withInstall(_sfc_main$12);
|
|
7436
7422
|
const calendarProps = {
|
|
7437
7423
|
/**
|
|
7438
7424
|
* 假期,用于显示假期标识
|
|
@@ -7538,9 +7524,10 @@ const calendarProps = {
|
|
|
7538
7524
|
minYear: {
|
|
7539
7525
|
type: [String, Number],
|
|
7540
7526
|
default: 0
|
|
7541
|
-
}
|
|
7527
|
+
},
|
|
7528
|
+
flex: Boolean
|
|
7542
7529
|
};
|
|
7543
|
-
const _sfc_main$
|
|
7530
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
7544
7531
|
...{
|
|
7545
7532
|
name: "ToCalendar"
|
|
7546
7533
|
},
|
|
@@ -8605,7 +8592,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
8605
8592
|
const _component_to_icon = resolveComponent("to-icon");
|
|
8606
8593
|
const _component_to_button = resolveComponent("to-button");
|
|
8607
8594
|
return openBlock(), createElementBlock("div", {
|
|
8595
|
+
key: unref(langKey),
|
|
8608
8596
|
class: normalizeClass(["to-calendar", setClass.value]),
|
|
8597
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
8609
8598
|
style: normalizeStyle(unref(widthStyle))
|
|
8610
8599
|
}, [
|
|
8611
8600
|
createElementVNode("div", { class: "to-calendar-content" }, [
|
|
@@ -8631,8 +8620,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
8631
8620
|
class: normalizeClass(["to-calendar-header-content", { "is-unfold": _ctx.type !== "month" && _ctx.type !== "months" }]),
|
|
8632
8621
|
onClick: withModifiers(toggleMonthSelector, ["stop"])
|
|
8633
8622
|
}, [
|
|
8634
|
-
createElementVNode("span", { class: "to-calendar-header-year" }, toDisplayString(year.value) + "
|
|
8635
|
-
createElementVNode("span", { class: "to-calendar-header-month" }, toDisplayString(addZero2(month.value)) + "
|
|
8623
|
+
createElementVNode("span", { class: "to-calendar-header-year" }, toDisplayString(year.value) + toDisplayString(unref(t)("to.calendar.year.suffix")), 1),
|
|
8624
|
+
createElementVNode("span", { class: "to-calendar-header-month" }, toDisplayString(addZero2(month.value)) + toDisplayString(unref(t)("to.calendar.month.suffix")), 1)
|
|
8636
8625
|
], 2),
|
|
8637
8626
|
createVNode(_component_to_icon, {
|
|
8638
8627
|
value: "next",
|
|
@@ -8923,7 +8912,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
8923
8912
|
onClick: moment
|
|
8924
8913
|
}, {
|
|
8925
8914
|
default: withCtx(() => [
|
|
8926
|
-
createTextVNode("
|
|
8915
|
+
createTextVNode(toDisplayString(unref(t)("to.common.now")), 1)
|
|
8927
8916
|
]),
|
|
8928
8917
|
_: 1
|
|
8929
8918
|
}),
|
|
@@ -8937,17 +8926,18 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
8937
8926
|
_: 1
|
|
8938
8927
|
})
|
|
8939
8928
|
])) : createCommentVNode("", true)
|
|
8940
|
-
],
|
|
8929
|
+
], 14, ["flex"]);
|
|
8941
8930
|
};
|
|
8942
8931
|
}
|
|
8943
8932
|
});
|
|
8944
|
-
const ToCalendar = withInstall(_sfc_main$
|
|
8945
|
-
const _sfc_main$
|
|
8933
|
+
const ToCalendar = withInstall(_sfc_main$11);
|
|
8934
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
8946
8935
|
...{
|
|
8947
8936
|
name: "ToGap"
|
|
8948
8937
|
},
|
|
8949
8938
|
__name: "gap",
|
|
8950
8939
|
props: {
|
|
8940
|
+
flex: Boolean,
|
|
8951
8941
|
mode: {
|
|
8952
8942
|
type: String,
|
|
8953
8943
|
default: "default"
|
|
@@ -8998,13 +8988,14 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
8998
8988
|
return (_ctx, _cache) => {
|
|
8999
8989
|
return openBlock(), createElementBlock("div", {
|
|
9000
8990
|
class: normalizeClass(["to-gap", setClass.value]),
|
|
8991
|
+
flex: __props.flex ? __props.flex : null,
|
|
9001
8992
|
style: normalizeStyle(setStyle.value)
|
|
9002
|
-
}, null,
|
|
8993
|
+
}, null, 14, ["flex"]);
|
|
9003
8994
|
};
|
|
9004
8995
|
}
|
|
9005
8996
|
});
|
|
9006
|
-
const ToGap = withInstall(_sfc_main$
|
|
9007
|
-
const _sfc_main
|
|
8997
|
+
const ToGap = withInstall(_sfc_main$10);
|
|
8998
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
9008
8999
|
...{
|
|
9009
9000
|
name: "ToStep"
|
|
9010
9001
|
},
|
|
@@ -9017,7 +9008,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9017
9008
|
modelValue: { type: [Number, String], default: 0 },
|
|
9018
9009
|
mode: { type: String, default: "default" },
|
|
9019
9010
|
dir: { type: String, default: "" },
|
|
9020
|
-
itemDir: { type: String, default: "" }
|
|
9011
|
+
itemDir: { type: String, default: "" },
|
|
9012
|
+
flex: { type: Boolean, default: false }
|
|
9021
9013
|
},
|
|
9022
9014
|
emits: ["update:modelValue", "item-click"],
|
|
9023
9015
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -9059,7 +9051,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9059
9051
|
return (_ctx, _cache) => {
|
|
9060
9052
|
const _component_to_icon = resolveComponent("to-icon");
|
|
9061
9053
|
return openBlock(), createElementBlock("div", {
|
|
9062
|
-
class: normalizeClass(["to-step", setClass.value])
|
|
9054
|
+
class: normalizeClass(["to-step", setClass.value]),
|
|
9055
|
+
flex: __props.flex ? __props.flex : null
|
|
9063
9056
|
}, [
|
|
9064
9057
|
(openBlock(true), createElementBlock(Fragment, null, renderList(data_.value, (item, idx) => {
|
|
9065
9058
|
return openBlock(), createElementBlock(Fragment, { key: idx }, [
|
|
@@ -9132,17 +9125,18 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9132
9125
|
})) : createCommentVNode("", true)
|
|
9133
9126
|
], 64);
|
|
9134
9127
|
}), 128))
|
|
9135
|
-
],
|
|
9128
|
+
], 10, ["flex"]);
|
|
9136
9129
|
};
|
|
9137
9130
|
}
|
|
9138
9131
|
});
|
|
9139
|
-
withInstall(_sfc_main
|
|
9140
|
-
const _sfc_main$
|
|
9132
|
+
withInstall(_sfc_main$$);
|
|
9133
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
9141
9134
|
...{
|
|
9142
9135
|
name: "ToForm"
|
|
9143
9136
|
},
|
|
9144
9137
|
__name: "form",
|
|
9145
9138
|
props: {
|
|
9139
|
+
flex: Boolean,
|
|
9146
9140
|
labelWidth: {
|
|
9147
9141
|
type: [Number, String],
|
|
9148
9142
|
default: ""
|
|
@@ -9331,6 +9325,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9331
9325
|
return (_ctx, _cache) => {
|
|
9332
9326
|
return openBlock(), createElementBlock("div", {
|
|
9333
9327
|
class: normalizeClass(["to-form", setClass.value]),
|
|
9328
|
+
flex: __props.flex ? __props.flex : null,
|
|
9334
9329
|
style: normalizeStyle(setStyle.value)
|
|
9335
9330
|
}, [
|
|
9336
9331
|
createElementVNode("div", {
|
|
@@ -9351,11 +9346,11 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9351
9346
|
renderSlot(_ctx.$slots, "submit")
|
|
9352
9347
|
], 4)) : createCommentVNode("", true)
|
|
9353
9348
|
], 512)
|
|
9354
|
-
],
|
|
9349
|
+
], 14, ["flex"]);
|
|
9355
9350
|
};
|
|
9356
9351
|
}
|
|
9357
9352
|
});
|
|
9358
|
-
const _sfc_main$
|
|
9353
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
9359
9354
|
...{
|
|
9360
9355
|
name: "ToFormItem",
|
|
9361
9356
|
inheritAttrs: false
|
|
@@ -9435,14 +9430,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9435
9430
|
};
|
|
9436
9431
|
}
|
|
9437
9432
|
});
|
|
9438
|
-
withInstall(_sfc_main$
|
|
9439
|
-
withInstall(_sfc_main$
|
|
9440
|
-
const _sfc_main
|
|
9433
|
+
withInstall(_sfc_main$_);
|
|
9434
|
+
withInstall(_sfc_main$Z);
|
|
9435
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
9441
9436
|
...{
|
|
9442
9437
|
name: "ToGrid"
|
|
9443
9438
|
},
|
|
9444
9439
|
__name: "grid",
|
|
9445
9440
|
props: {
|
|
9441
|
+
flex: { type: Boolean, default: false },
|
|
9446
9442
|
type: { default: "" },
|
|
9447
9443
|
mode: { default: "default" },
|
|
9448
9444
|
dir: { default: "" },
|
|
@@ -9528,14 +9524,15 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
9528
9524
|
ref_key: "el",
|
|
9529
9525
|
ref: el,
|
|
9530
9526
|
class: normalizeClass(["to-grid", setClass.value]),
|
|
9527
|
+
flex: __props.flex ? __props.flex : null,
|
|
9531
9528
|
style: normalizeStyle(setStyle.value)
|
|
9532
9529
|
}, [
|
|
9533
9530
|
renderSlot(_ctx.$slots, "default")
|
|
9534
|
-
],
|
|
9531
|
+
], 14, ["flex"]);
|
|
9535
9532
|
};
|
|
9536
9533
|
}
|
|
9537
9534
|
});
|
|
9538
|
-
const _sfc_main$
|
|
9535
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
9539
9536
|
...{
|
|
9540
9537
|
name: "ToGridItem"
|
|
9541
9538
|
},
|
|
@@ -9607,14 +9604,15 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
9607
9604
|
};
|
|
9608
9605
|
}
|
|
9609
9606
|
});
|
|
9610
|
-
const ToGrid = withInstall(_sfc_main
|
|
9611
|
-
const ToGridItem = withInstall(_sfc_main$
|
|
9612
|
-
const _sfc_main$
|
|
9607
|
+
const ToGrid = withInstall(_sfc_main$Y);
|
|
9608
|
+
const ToGridItem = withInstall(_sfc_main$X);
|
|
9609
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
9613
9610
|
...{
|
|
9614
9611
|
name: "ToHeader"
|
|
9615
9612
|
},
|
|
9616
9613
|
__name: "header",
|
|
9617
9614
|
props: {
|
|
9615
|
+
flex: { type: Boolean, default: false },
|
|
9618
9616
|
title: { default: "" },
|
|
9619
9617
|
color: { default: "" },
|
|
9620
9618
|
mode: { default: "default" },
|
|
@@ -9662,6 +9660,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9662
9660
|
return openBlock(), createElementBlock("div", {
|
|
9663
9661
|
ref_key: "elRef",
|
|
9664
9662
|
ref: elRef,
|
|
9663
|
+
flex: __props.flex ? __props.flex : null,
|
|
9665
9664
|
class: normalizeClass(["to-header", setClass.value]),
|
|
9666
9665
|
onClick: ($event) => emit("click")
|
|
9667
9666
|
}, [
|
|
@@ -9786,17 +9785,18 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9786
9785
|
}, [
|
|
9787
9786
|
renderSlot(_ctx.$slots, "right")
|
|
9788
9787
|
])) : createCommentVNode("", true)
|
|
9789
|
-
], 10, ["onClick"]);
|
|
9788
|
+
], 10, ["flex", "onClick"]);
|
|
9790
9789
|
};
|
|
9791
9790
|
}
|
|
9792
9791
|
});
|
|
9793
|
-
const ToHeader = withInstall(_sfc_main$
|
|
9794
|
-
const _sfc_main$
|
|
9792
|
+
const ToHeader = withInstall(_sfc_main$W);
|
|
9793
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
9795
9794
|
...{
|
|
9796
9795
|
name: "ToInput"
|
|
9797
9796
|
},
|
|
9798
9797
|
__name: "input",
|
|
9799
9798
|
props: {
|
|
9799
|
+
flex: Boolean,
|
|
9800
9800
|
// 是否自动获取焦点
|
|
9801
9801
|
autofocus: {
|
|
9802
9802
|
type: Boolean,
|
|
@@ -9836,7 +9836,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
9836
9836
|
},
|
|
9837
9837
|
placeholder: {
|
|
9838
9838
|
type: String,
|
|
9839
|
-
default: "
|
|
9839
|
+
default: ""
|
|
9840
9840
|
},
|
|
9841
9841
|
type: {
|
|
9842
9842
|
type: String,
|
|
@@ -9930,14 +9930,6 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
9930
9930
|
type: Boolean,
|
|
9931
9931
|
default: true
|
|
9932
9932
|
},
|
|
9933
|
-
fillet: {
|
|
9934
|
-
type: String,
|
|
9935
|
-
default: "normal"
|
|
9936
|
-
},
|
|
9937
|
-
filletPosition: {
|
|
9938
|
-
type: String,
|
|
9939
|
-
default: ""
|
|
9940
|
-
},
|
|
9941
9933
|
color: {
|
|
9942
9934
|
type: String,
|
|
9943
9935
|
default: "default"
|
|
@@ -10089,8 +10081,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10089
10081
|
}
|
|
10090
10082
|
});
|
|
10091
10083
|
const iPlaceholder = computed(() => {
|
|
10092
|
-
if (!disabled.value && !props.placeholder
|
|
10093
|
-
return "
|
|
10084
|
+
if (!disabled.value && !props.placeholder) {
|
|
10085
|
+
return t("to.common.placeholder.input");
|
|
10094
10086
|
} else {
|
|
10095
10087
|
return props.placeholder;
|
|
10096
10088
|
}
|
|
@@ -10262,6 +10254,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10262
10254
|
const _directive_color = resolveDirective("color");
|
|
10263
10255
|
return withDirectives((openBlock(), createElementBlock("span", {
|
|
10264
10256
|
id: __props.id,
|
|
10257
|
+
key: unref(langKey),
|
|
10258
|
+
flex: __props.flex ? __props.flex : null,
|
|
10265
10259
|
class: normalizeClass(["to-input", setClass.value]),
|
|
10266
10260
|
style: normalizeStyle(setStyle.value),
|
|
10267
10261
|
onClick: click
|
|
@@ -10393,31 +10387,12 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10393
10387
|
}, [
|
|
10394
10388
|
createElementVNode("span", null, toDisplayString(props.suffix), 1)
|
|
10395
10389
|
])) : createCommentVNode("", true),
|
|
10396
|
-
props.suggestion || _ctx.$slots.default || _ctx.$slots.suffix || props.step ? (openBlock(), createElementBlock("span", {
|
|
10390
|
+
(props.suggestion || _ctx.$slots.default || _ctx.$slots.suffix || props.step) && __props.type !== "textarea" ? (openBlock(), createElementBlock("span", {
|
|
10397
10391
|
key: 9,
|
|
10398
10392
|
class: "to-input-suffix"
|
|
10399
10393
|
}, [
|
|
10400
10394
|
renderSlot(_ctx.$slots, "default"),
|
|
10401
|
-
renderSlot(_ctx.$slots, "suffix")
|
|
10402
|
-
props.suggestion ? (openBlock(), createElementBlock("span", {
|
|
10403
|
-
key: 0,
|
|
10404
|
-
class: "to-input-suggestion"
|
|
10405
|
-
}, [
|
|
10406
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.suggestion.split(","), (item, i) => {
|
|
10407
|
-
return openBlock(), createBlock(unref(ToButton), {
|
|
10408
|
-
key: i,
|
|
10409
|
-
fillet: "normal",
|
|
10410
|
-
color: "info",
|
|
10411
|
-
mode: "text",
|
|
10412
|
-
onClick: ($event) => addSuggestion(item)
|
|
10413
|
-
}, {
|
|
10414
|
-
default: withCtx(() => [
|
|
10415
|
-
createTextVNode(toDisplayString(item), 1)
|
|
10416
|
-
]),
|
|
10417
|
-
_: 2
|
|
10418
|
-
}, 1032, ["onClick"]);
|
|
10419
|
-
}), 128))
|
|
10420
|
-
])) : createCommentVNode("", true)
|
|
10395
|
+
renderSlot(_ctx.$slots, "suffix")
|
|
10421
10396
|
])) : createCommentVNode("", true),
|
|
10422
10397
|
props.step ? withDirectives((openBlock(), createBlock(unref(ToIcon), {
|
|
10423
10398
|
key: 10,
|
|
@@ -10429,18 +10404,49 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10429
10404
|
[unref(vDis), Number(data.value) === Number(props.max) || props.disabled]
|
|
10430
10405
|
]) : createCommentVNode("", true)
|
|
10431
10406
|
]),
|
|
10432
|
-
props.maxlength !== Infinity && props.count
|
|
10407
|
+
props.type === "textarea" && (props.maxlength !== Infinity && props.count || _ctx.$slots.suffix || _ctx.$slots.default || props.suggestion) ? (openBlock(), createElementBlock("span", {
|
|
10433
10408
|
key: 1,
|
|
10434
|
-
class: "to-input-
|
|
10409
|
+
class: "to-input-suffix"
|
|
10435
10410
|
}, [
|
|
10436
|
-
|
|
10411
|
+
props.maxlength !== Infinity && props.count ? (openBlock(), createElementBlock("span", {
|
|
10412
|
+
key: 0,
|
|
10413
|
+
class: "to-input-count"
|
|
10414
|
+
}, [
|
|
10415
|
+
createElementVNode("span", { class: "to-input-count-text" }, toDisplayString(getDataLength.value) + "/" + toDisplayString(props.maxlength), 1)
|
|
10416
|
+
])) : createCommentVNode("", true),
|
|
10417
|
+
_ctx.$slots.suffix || _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
10418
|
+
key: 1,
|
|
10419
|
+
class: "to-input-suffix-slot"
|
|
10420
|
+
}, [
|
|
10421
|
+
__props.type === "textarea" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
|
|
10422
|
+
__props.type === "textarea" ? renderSlot(_ctx.$slots, "suffix", { key: 1 }) : createCommentVNode("", true)
|
|
10423
|
+
])) : createCommentVNode("", true),
|
|
10424
|
+
props.suggestion ? (openBlock(), createElementBlock("span", {
|
|
10425
|
+
key: 2,
|
|
10426
|
+
class: "to-input-suggestion"
|
|
10427
|
+
}, [
|
|
10428
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.suggestion.split(","), (item, i) => {
|
|
10429
|
+
return openBlock(), createBlock(unref(ToButton), {
|
|
10430
|
+
key: i,
|
|
10431
|
+
fillet: "normal",
|
|
10432
|
+
color: "info",
|
|
10433
|
+
mode: "text",
|
|
10434
|
+
onClick: ($event) => addSuggestion(item)
|
|
10435
|
+
}, {
|
|
10436
|
+
default: withCtx(() => [
|
|
10437
|
+
createTextVNode(toDisplayString(item), 1)
|
|
10438
|
+
]),
|
|
10439
|
+
_: 2
|
|
10440
|
+
}, 1032, ["onClick"]);
|
|
10441
|
+
}), 128))
|
|
10442
|
+
])) : createCommentVNode("", true)
|
|
10437
10443
|
])) : createCommentVNode("", true),
|
|
10438
10444
|
errorTip.value ? withDirectives((openBlock(), createElementBlock("span", {
|
|
10439
10445
|
key: 2,
|
|
10440
10446
|
class: "to-box-tip"
|
|
10441
10447
|
}, [
|
|
10442
10448
|
errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
10443
|
-
createTextVNode("
|
|
10449
|
+
createTextVNode(toDisplayString(unref(t)("to.input.inputError")) + " ", 1),
|
|
10444
10450
|
withDirectives(createVNode(unref(ToIcon), {
|
|
10445
10451
|
style: { "height": "auto" },
|
|
10446
10452
|
value: "help",
|
|
@@ -10456,19 +10462,19 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10456
10462
|
]
|
|
10457
10463
|
])
|
|
10458
10464
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
10459
|
-
createTextVNode("
|
|
10465
|
+
createTextVNode(toDisplayString(unref(t)("to.input.required")), 1)
|
|
10460
10466
|
], 64))
|
|
10461
10467
|
])), [
|
|
10462
10468
|
[_directive_color, "danger"]
|
|
10463
10469
|
]) : createCommentVNode("", true)
|
|
10464
|
-
], 14, ["id"])), [
|
|
10470
|
+
], 14, ["id", "flex"])), [
|
|
10465
10471
|
[unref(tipDirective), changed.value ? unref(t)("to.common.originalValue", valueStore.value[0]) : ""]
|
|
10466
10472
|
]);
|
|
10467
10473
|
};
|
|
10468
10474
|
}
|
|
10469
10475
|
});
|
|
10470
|
-
const ToInput = withInstall(_sfc_main$
|
|
10471
|
-
const _sfc_main$
|
|
10476
|
+
const ToInput = withInstall(_sfc_main$V);
|
|
10477
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
10472
10478
|
...{
|
|
10473
10479
|
name: "ToDivider"
|
|
10474
10480
|
},
|
|
@@ -10480,7 +10486,8 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10480
10486
|
dir: { default: "h" },
|
|
10481
10487
|
color: { default: "default" },
|
|
10482
10488
|
marginX: { default: 0 },
|
|
10483
|
-
marginY: { default: 0 }
|
|
10489
|
+
marginY: { default: 0 },
|
|
10490
|
+
flex: { type: Boolean, default: false }
|
|
10484
10491
|
},
|
|
10485
10492
|
setup(__props) {
|
|
10486
10493
|
const props = __props;
|
|
@@ -10534,13 +10541,14 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10534
10541
|
});
|
|
10535
10542
|
return (_ctx, _cache) => {
|
|
10536
10543
|
return openBlock(), createElementBlock("div", {
|
|
10544
|
+
flex: __props.flex ? __props.flex : null,
|
|
10537
10545
|
class: normalizeClass(["to-divider", setClass.value]),
|
|
10538
10546
|
style: normalizeStyle(setStyle.value)
|
|
10539
|
-
}, null,
|
|
10547
|
+
}, null, 14, ["flex"]);
|
|
10540
10548
|
};
|
|
10541
10549
|
}
|
|
10542
10550
|
});
|
|
10543
|
-
withInstall(_sfc_main$
|
|
10551
|
+
withInstall(_sfc_main$U);
|
|
10544
10552
|
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
10545
10553
|
const {
|
|
10546
10554
|
entries,
|
|
@@ -11569,12 +11577,13 @@ function createDOMPurify() {
|
|
|
11569
11577
|
return DOMPurify;
|
|
11570
11578
|
}
|
|
11571
11579
|
var purify = createDOMPurify();
|
|
11572
|
-
const _sfc_main$
|
|
11580
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
11573
11581
|
...{
|
|
11574
11582
|
name: "ToMsg"
|
|
11575
11583
|
},
|
|
11576
11584
|
__name: "msg",
|
|
11577
11585
|
props: {
|
|
11586
|
+
flex: { type: Boolean, default: false },
|
|
11578
11587
|
type: { default: "" },
|
|
11579
11588
|
mode: { default: "default" },
|
|
11580
11589
|
title: { default: "" },
|
|
@@ -11587,8 +11596,8 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11587
11596
|
showDetail: { type: Boolean, default: true },
|
|
11588
11597
|
padding: { default: 0 },
|
|
11589
11598
|
position: { default: "" },
|
|
11590
|
-
confirmText: { default: "
|
|
11591
|
-
cancelText: { default: "
|
|
11599
|
+
confirmText: { default: "" },
|
|
11600
|
+
cancelText: { default: "" },
|
|
11592
11601
|
closeOnBlur: { type: Boolean, default: true },
|
|
11593
11602
|
zIndex: { default: 0 },
|
|
11594
11603
|
show: { type: Boolean, default: false },
|
|
@@ -11691,6 +11700,8 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11691
11700
|
return openBlock(), createElementBlock("div", {
|
|
11692
11701
|
ref_key: "el",
|
|
11693
11702
|
ref: el,
|
|
11703
|
+
key: unref(langKey),
|
|
11704
|
+
flex: __props.flex ? __props.flex : null,
|
|
11694
11705
|
class: normalizeClass(["to-msg", setClass.value])
|
|
11695
11706
|
}, [
|
|
11696
11707
|
createElementVNode("div", {
|
|
@@ -11744,7 +11755,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11744
11755
|
onClick: ($event) => iShowDetail.value = true
|
|
11745
11756
|
}, {
|
|
11746
11757
|
default: withCtx(() => [
|
|
11747
|
-
createTextVNode("
|
|
11758
|
+
createTextVNode(toDisplayString(unref(t)("to.msg.showDetail")), 1)
|
|
11748
11759
|
]),
|
|
11749
11760
|
_: 1
|
|
11750
11761
|
}, 8, ["onClick"])) : (openBlock(), createBlock(unref(ToButton), {
|
|
@@ -11756,7 +11767,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11756
11767
|
onClick: ($event) => iShowDetail.value = false
|
|
11757
11768
|
}, {
|
|
11758
11769
|
default: withCtx(() => [
|
|
11759
|
-
createTextVNode("
|
|
11770
|
+
createTextVNode(toDisplayString(unref(t)("to.msg.hideDetail")), 1)
|
|
11760
11771
|
]),
|
|
11761
11772
|
_: 1
|
|
11762
11773
|
}, 8, ["onClick"]))
|
|
@@ -11790,23 +11801,23 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11790
11801
|
_: 2
|
|
11791
11802
|
}, 1040, ["onClick"]);
|
|
11792
11803
|
}), 128)),
|
|
11793
|
-
__props.cancelText ? (openBlock(), createBlock(unref(ToButton), {
|
|
11804
|
+
__props.cancelText || true ? (openBlock(), createBlock(unref(ToButton), {
|
|
11794
11805
|
key: 0,
|
|
11795
11806
|
class: "to-msg-button type-extend",
|
|
11796
11807
|
onClick: cancel
|
|
11797
11808
|
}, {
|
|
11798
11809
|
default: withCtx(() => [
|
|
11799
|
-
createTextVNode(toDisplayString(__props.cancelText), 1)
|
|
11810
|
+
createTextVNode(toDisplayString(__props.cancelText || unref(t)("to.msg.cancel")), 1)
|
|
11800
11811
|
]),
|
|
11801
11812
|
_: 1
|
|
11802
11813
|
})) : createCommentVNode("", true),
|
|
11803
|
-
__props.confirmText ? (openBlock(), createBlock(unref(ToButton), {
|
|
11814
|
+
__props.confirmText || true ? (openBlock(), createBlock(unref(ToButton), {
|
|
11804
11815
|
key: 1,
|
|
11805
11816
|
class: "to-msg-button type-confirm",
|
|
11806
11817
|
onClick: confirm
|
|
11807
11818
|
}, {
|
|
11808
11819
|
default: withCtx(() => [
|
|
11809
|
-
createTextVNode(toDisplayString(__props.confirmText), 1)
|
|
11820
|
+
createTextVNode(toDisplayString(__props.confirmText || unref(t)("to.msg.confirm")), 1)
|
|
11810
11821
|
]),
|
|
11811
11822
|
_: 1
|
|
11812
11823
|
})) : createCommentVNode("", true)
|
|
@@ -11815,11 +11826,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
11815
11826
|
])) : createCommentVNode("", true)
|
|
11816
11827
|
], 4)
|
|
11817
11828
|
])
|
|
11818
|
-
],
|
|
11829
|
+
], 10, ["flex"]);
|
|
11819
11830
|
};
|
|
11820
11831
|
}
|
|
11821
11832
|
});
|
|
11822
|
-
const ToMsg = withInstall(_sfc_main$
|
|
11833
|
+
const ToMsg = withInstall(_sfc_main$T);
|
|
11823
11834
|
function createMsgInstance(app, ...args) {
|
|
11824
11835
|
if (args.length === 0)
|
|
11825
11836
|
return Promise.reject("无效的 msg 内容");
|
|
@@ -11883,7 +11894,7 @@ function createMsgInstance(app, ...args) {
|
|
|
11883
11894
|
...isDetailVNode ? { detail: void 0 } : {}
|
|
11884
11895
|
};
|
|
11885
11896
|
const vnode = h(
|
|
11886
|
-
_sfc_main$
|
|
11897
|
+
_sfc_main$T,
|
|
11887
11898
|
{
|
|
11888
11899
|
...props,
|
|
11889
11900
|
onClose: () => {
|
|
@@ -11954,12 +11965,13 @@ ToMsg.install = (app) => {
|
|
|
11954
11965
|
const appMsg = createMsgFunction(app);
|
|
11955
11966
|
app.config.globalProperties.$msg = appMsg;
|
|
11956
11967
|
};
|
|
11957
|
-
const _sfc_main$
|
|
11968
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11958
11969
|
...{
|
|
11959
11970
|
name: "ToPadding"
|
|
11960
11971
|
},
|
|
11961
11972
|
__name: "padding",
|
|
11962
11973
|
props: {
|
|
11974
|
+
flex: { type: Boolean, default: false },
|
|
11963
11975
|
mode: { default: "default" },
|
|
11964
11976
|
value: { default: 1 },
|
|
11965
11977
|
height: { default: "" },
|
|
@@ -12006,20 +12018,22 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
12006
12018
|
return (_ctx, _cache) => {
|
|
12007
12019
|
return openBlock(), createElementBlock("div", {
|
|
12008
12020
|
class: normalizeClass(["to-padding", setClass.value]),
|
|
12021
|
+
flex: __props.flex ? __props.flex : null,
|
|
12009
12022
|
style: normalizeStyle(setStyle.value)
|
|
12010
12023
|
}, [
|
|
12011
12024
|
renderSlot(_ctx.$slots, "default")
|
|
12012
|
-
],
|
|
12025
|
+
], 14, ["flex"]);
|
|
12013
12026
|
};
|
|
12014
12027
|
}
|
|
12015
12028
|
});
|
|
12016
|
-
const ToPadding = withInstall(_sfc_main$
|
|
12017
|
-
const _sfc_main$
|
|
12029
|
+
const ToPadding = withInstall(_sfc_main$S);
|
|
12030
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
12018
12031
|
...{
|
|
12019
12032
|
name: "ToPage"
|
|
12020
12033
|
},
|
|
12021
12034
|
__name: "page",
|
|
12022
12035
|
props: {
|
|
12036
|
+
flex: Boolean,
|
|
12023
12037
|
type: { type: String, default: "" },
|
|
12024
12038
|
mode: { type: String, default: "default" },
|
|
12025
12039
|
align: { type: String, default: "" },
|
|
@@ -12172,20 +12186,21 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
12172
12186
|
const _component_to_icon = resolveComponent("to-icon");
|
|
12173
12187
|
const _directive_align = resolveDirective("align");
|
|
12174
12188
|
return cShowInSingle.value ? withDirectives((openBlock(), createElementBlock("div", {
|
|
12175
|
-
key:
|
|
12189
|
+
key: unref(langKey),
|
|
12190
|
+
flex: __props.flex ? __props.flex : null,
|
|
12176
12191
|
class: normalizeClass([setClass.value, "to-page"])
|
|
12177
12192
|
}, [
|
|
12178
12193
|
__props.type === "lite" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
12179
12194
|
createElementVNode("div", { class: "to-page-first" }),
|
|
12180
|
-
createElementVNode("div", { class: "to-page-prev" }, "
|
|
12195
|
+
createElementVNode("div", { class: "to-page-prev" }, toDisplayString(unref(t)("to.page.prevPage")), 1),
|
|
12181
12196
|
createElementVNode("div", { class: "to-page-stat" }, toDisplayString(currentPage_.value) + " / " + toDisplayString(__props.total), 1),
|
|
12182
|
-
createElementVNode("div", { class: "to-page-next" }, "
|
|
12197
|
+
createElementVNode("div", { class: "to-page-next" }, toDisplayString(unref(t)("to.page.nextPage")), 1),
|
|
12183
12198
|
createElementVNode("div", { class: "to-page-last" })
|
|
12184
12199
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
12185
12200
|
__props.layout.includes("total") || __props.layout === "all" ? (openBlock(), createElementBlock("div", {
|
|
12186
12201
|
key: 0,
|
|
12187
12202
|
class: "to-page-total"
|
|
12188
|
-
}, "
|
|
12203
|
+
}, toDisplayString(unref(t)("to.page.total", __props.total)), 1)) : createCommentVNode("", true),
|
|
12189
12204
|
createElementVNode("div", { class: "to-page-slot" }, [
|
|
12190
12205
|
renderSlot(_ctx.$slots, "default")
|
|
12191
12206
|
]),
|
|
@@ -12246,11 +12261,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
12246
12261
|
modelValue: pageSize_.value,
|
|
12247
12262
|
"onUpdate:modelValue": ($event) => pageSize_.value = $event,
|
|
12248
12263
|
class: "to-page-size-select",
|
|
12249
|
-
unit: "
|
|
12264
|
+
unit: unref(t)("to.page.pageSize", ""),
|
|
12250
12265
|
clearable: false,
|
|
12251
12266
|
data: cPageSizes.value,
|
|
12252
12267
|
onChange: handleSizeChange
|
|
12253
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "data"]), [
|
|
12268
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "unit", "data"]), [
|
|
12254
12269
|
[unref(vDis), __props.disabled]
|
|
12255
12270
|
])
|
|
12256
12271
|
])) : createCommentVNode("", true),
|
|
@@ -12262,7 +12277,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
12262
12277
|
modelValue: jumperPage.value,
|
|
12263
12278
|
"onUpdate:modelValue": ($event) => jumperPage.value = $event,
|
|
12264
12279
|
class: "to-page-jumper-input",
|
|
12265
|
-
placeholder: "
|
|
12280
|
+
placeholder: unref(t)("to.page.go"),
|
|
12266
12281
|
onChange: handleJump
|
|
12267
12282
|
}, {
|
|
12268
12283
|
default: withCtx(() => [
|
|
@@ -12273,216 +12288,19 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
12273
12288
|
})
|
|
12274
12289
|
]),
|
|
12275
12290
|
_: 1
|
|
12276
|
-
}, 8, ["modelValue", "onUpdate:modelValue"])), [
|
|
12291
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])), [
|
|
12277
12292
|
[unref(vDis), __props.disabled]
|
|
12278
12293
|
])
|
|
12279
12294
|
])) : createCommentVNode("", true)
|
|
12280
12295
|
], 64))
|
|
12281
|
-
],
|
|
12296
|
+
], 10, ["flex"])), [
|
|
12282
12297
|
[_directive_align, __props.align]
|
|
12283
12298
|
]) : createCommentVNode("", true);
|
|
12284
12299
|
};
|
|
12285
12300
|
}
|
|
12286
12301
|
});
|
|
12287
|
-
withInstall(_sfc_main$
|
|
12288
|
-
const _sfc_main$
|
|
12289
|
-
name: "ToCard"
|
|
12290
|
-
}, {
|
|
12291
|
-
__name: "Card",
|
|
12292
|
-
props: {
|
|
12293
|
-
fillet: { type: String, default: "none" },
|
|
12294
|
-
color: { type: String, default: "" },
|
|
12295
|
-
mode: { type: String, default: "default" },
|
|
12296
|
-
padding: { type: [Number, String], default: "" },
|
|
12297
|
-
link: Boolean,
|
|
12298
|
-
shadow: Boolean,
|
|
12299
|
-
checked: Boolean,
|
|
12300
|
-
wrap: Boolean,
|
|
12301
|
-
type: { type: String, default: "" },
|
|
12302
|
-
width: { type: [Number, String], default: "" }
|
|
12303
|
-
},
|
|
12304
|
-
emits: ["click"],
|
|
12305
|
-
setup(__props, { emit: __emit }) {
|
|
12306
|
-
const props = __props;
|
|
12307
|
-
const emits = __emit;
|
|
12308
|
-
provide("toCard", {});
|
|
12309
|
-
const setClass = computed(() => {
|
|
12310
|
-
const arr = [];
|
|
12311
|
-
if (props.wrap)
|
|
12312
|
-
arr.push("is-wrap");
|
|
12313
|
-
if (props.mode)
|
|
12314
|
-
arr.push(`mode-${props.mode}`);
|
|
12315
|
-
if (props.color)
|
|
12316
|
-
arr.push(`color-${props.color}`);
|
|
12317
|
-
if (props.link)
|
|
12318
|
-
arr.push("is-link");
|
|
12319
|
-
if (props.type)
|
|
12320
|
-
arr.push(`type-${props.type}`);
|
|
12321
|
-
if (props.checked)
|
|
12322
|
-
arr.push("is-checked");
|
|
12323
|
-
if (props.width === "auto")
|
|
12324
|
-
arr.push("width-auto");
|
|
12325
|
-
return arr;
|
|
12326
|
-
});
|
|
12327
|
-
const setStyle = computed(() => {
|
|
12328
|
-
const obj = {};
|
|
12329
|
-
if (props.width) {
|
|
12330
|
-
obj.width = isNaN(Number(props.width)) ? props.width : `${props.width}em`;
|
|
12331
|
-
}
|
|
12332
|
-
const hasUnit = (val) => /[a-z%]+$/i.test(val);
|
|
12333
|
-
if (String(props.padding).trim()) {
|
|
12334
|
-
const padded = String(props.padding).trim().split(/\s+/).map((val) => {
|
|
12335
|
-
return hasUnit(val) ? val : `${val}em`;
|
|
12336
|
-
}).join(" ");
|
|
12337
|
-
obj.padding = padded;
|
|
12338
|
-
}
|
|
12339
|
-
return obj;
|
|
12340
|
-
});
|
|
12341
|
-
const setFnStyle = computed(() => {
|
|
12342
|
-
const obj = {};
|
|
12343
|
-
if (props.padding >= 0 && props.padding !== 1) {
|
|
12344
|
-
obj.top = `${props.padding}em`;
|
|
12345
|
-
obj.right = `${props.padding}em`;
|
|
12346
|
-
}
|
|
12347
|
-
return obj;
|
|
12348
|
-
});
|
|
12349
|
-
function clickHandle(evt) {
|
|
12350
|
-
if (props.link) {
|
|
12351
|
-
emits("click", evt);
|
|
12352
|
-
}
|
|
12353
|
-
}
|
|
12354
|
-
return (_ctx, _cache) => {
|
|
12355
|
-
return openBlock(), createElementBlock("div", {
|
|
12356
|
-
class: normalizeClass(["to-card", setClass.value]),
|
|
12357
|
-
style: normalizeStyle(setStyle.value),
|
|
12358
|
-
onClick: clickHandle
|
|
12359
|
-
}, [
|
|
12360
|
-
renderSlot(_ctx.$slots, "default"),
|
|
12361
|
-
_ctx.$slots.fn ? (openBlock(), createElementBlock("div", {
|
|
12362
|
-
key: 0,
|
|
12363
|
-
class: "to-card-fn",
|
|
12364
|
-
style: normalizeStyle(setFnStyle.value)
|
|
12365
|
-
}, [
|
|
12366
|
-
renderSlot(_ctx.$slots, "fn")
|
|
12367
|
-
], 4)) : createCommentVNode("", true)
|
|
12368
|
-
], 6);
|
|
12369
|
-
};
|
|
12370
|
-
}
|
|
12371
|
-
});
|
|
12372
|
-
const _sfc_main$S = /* @__PURE__ */ Object.assign({
|
|
12373
|
-
name: "ToCardItem"
|
|
12374
|
-
}, {
|
|
12375
|
-
__name: "card-item",
|
|
12376
|
-
props: {
|
|
12377
|
-
type: { type: String, default: "side" },
|
|
12378
|
-
align: { type: String, default: "" },
|
|
12379
|
-
padding: { type: [Number, String], default: 0 },
|
|
12380
|
-
width: { type: [Number, String], default: 0 },
|
|
12381
|
-
line: Boolean,
|
|
12382
|
-
more: Boolean,
|
|
12383
|
-
link: Boolean,
|
|
12384
|
-
main: Boolean
|
|
12385
|
-
},
|
|
12386
|
-
setup(__props) {
|
|
12387
|
-
const props = __props;
|
|
12388
|
-
const setClass = computed(() => {
|
|
12389
|
-
const arr = [];
|
|
12390
|
-
if (props.type === "main" || props.main)
|
|
12391
|
-
arr.push("is-main");
|
|
12392
|
-
if (props.type === "more" || props.more)
|
|
12393
|
-
arr.push("is-more");
|
|
12394
|
-
if (props.type === "link" || props.link)
|
|
12395
|
-
arr.push("is-link");
|
|
12396
|
-
if (props.line === "solid")
|
|
12397
|
-
arr.push("line-solid");
|
|
12398
|
-
if (props.align)
|
|
12399
|
-
arr.push(`align-${props.align}`);
|
|
12400
|
-
return arr;
|
|
12401
|
-
});
|
|
12402
|
-
const setStyle = computed(() => {
|
|
12403
|
-
const obj = {};
|
|
12404
|
-
const hasUnit = (val) => /[a-z%]+$/i.test(val);
|
|
12405
|
-
if (String(props.padding).trim()) {
|
|
12406
|
-
const padded = String(props.padding).trim().split(/\s+/).map((val) => {
|
|
12407
|
-
return hasUnit(val) ? val : `${val}em`;
|
|
12408
|
-
}).join(" ");
|
|
12409
|
-
obj.padding = padded;
|
|
12410
|
-
}
|
|
12411
|
-
if (props.width) {
|
|
12412
|
-
obj.width = props.width + "em";
|
|
12413
|
-
}
|
|
12414
|
-
return obj;
|
|
12415
|
-
});
|
|
12416
|
-
return (_ctx, _cache) => {
|
|
12417
|
-
return openBlock(), createElementBlock("div", {
|
|
12418
|
-
class: normalizeClass(["to-card-item", setClass.value]),
|
|
12419
|
-
style: normalizeStyle(setStyle.value)
|
|
12420
|
-
}, [
|
|
12421
|
-
renderSlot(_ctx.$slots, "default"),
|
|
12422
|
-
_ctx.$slots.title || _ctx.$slots.titleSide ? (openBlock(), createElementBlock("div", {
|
|
12423
|
-
key: 0,
|
|
12424
|
-
class: "to-card-title"
|
|
12425
|
-
}, [
|
|
12426
|
-
_ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
12427
|
-
key: 0,
|
|
12428
|
-
class: "to-card-title-main"
|
|
12429
|
-
}, [
|
|
12430
|
-
createElementVNode("span", { class: "to-card-title-text" }, [
|
|
12431
|
-
renderSlot(_ctx.$slots, "title")
|
|
12432
|
-
])
|
|
12433
|
-
])) : createCommentVNode("", true),
|
|
12434
|
-
_ctx.$slots.titleSide ? (openBlock(), createElementBlock("div", {
|
|
12435
|
-
key: 1,
|
|
12436
|
-
class: "to-card-title-side"
|
|
12437
|
-
}, [
|
|
12438
|
-
createElementVNode("span", { class: "to-card-title-side-text" }, [
|
|
12439
|
-
renderSlot(_ctx.$slots, "titleSide")
|
|
12440
|
-
])
|
|
12441
|
-
])) : createCommentVNode("", true)
|
|
12442
|
-
])) : createCommentVNode("", true),
|
|
12443
|
-
_ctx.$slots.content || _ctx.$slots.contentSide ? (openBlock(), createElementBlock("div", {
|
|
12444
|
-
key: 1,
|
|
12445
|
-
class: "to-card-content"
|
|
12446
|
-
}, [
|
|
12447
|
-
_ctx.$slots.content ? (openBlock(), createElementBlock("div", {
|
|
12448
|
-
key: 0,
|
|
12449
|
-
class: "to-card-content-main"
|
|
12450
|
-
}, [
|
|
12451
|
-
createElementVNode("span", { class: "to-card-content-text" }, [
|
|
12452
|
-
renderSlot(_ctx.$slots, "content")
|
|
12453
|
-
])
|
|
12454
|
-
])) : createCommentVNode("", true),
|
|
12455
|
-
_ctx.$slots.contentSide ? (openBlock(), createElementBlock("div", {
|
|
12456
|
-
key: 1,
|
|
12457
|
-
class: "to-card-content-side"
|
|
12458
|
-
}, [
|
|
12459
|
-
createElementVNode("span", { class: "to-card-content-side-text" }, [
|
|
12460
|
-
renderSlot(_ctx.$slots, "contentSide")
|
|
12461
|
-
])
|
|
12462
|
-
])) : createCommentVNode("", true)
|
|
12463
|
-
])) : createCommentVNode("", true),
|
|
12464
|
-
_ctx.$slots.value ? (openBlock(), createElementBlock("div", {
|
|
12465
|
-
key: 2,
|
|
12466
|
-
class: "to-card-value"
|
|
12467
|
-
}, [
|
|
12468
|
-
createElementVNode("span", { class: "to-card-value-text" }, [
|
|
12469
|
-
renderSlot(_ctx.$slots, "value")
|
|
12470
|
-
])
|
|
12471
|
-
])) : createCommentVNode("", true),
|
|
12472
|
-
_ctx.$slots.label ? (openBlock(), createElementBlock("div", {
|
|
12473
|
-
key: 3,
|
|
12474
|
-
class: "to-card-label"
|
|
12475
|
-
}, [
|
|
12476
|
-
createElementVNode("span", { class: "to-card-value-text" }, [
|
|
12477
|
-
renderSlot(_ctx.$slots, "label")
|
|
12478
|
-
])
|
|
12479
|
-
])) : createCommentVNode("", true)
|
|
12480
|
-
], 6);
|
|
12481
|
-
};
|
|
12482
|
-
}
|
|
12483
|
-
});
|
|
12484
|
-
withInstall(_sfc_main$T, [_sfc_main$S]);
|
|
12485
|
-
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
12302
|
+
withInstall(_sfc_main$R);
|
|
12303
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
12486
12304
|
...{
|
|
12487
12305
|
name: "ToCheckbox"
|
|
12488
12306
|
},
|
|
@@ -12719,8 +12537,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
12719
12537
|
};
|
|
12720
12538
|
}
|
|
12721
12539
|
});
|
|
12722
|
-
const ToCheckbox = withInstall(_sfc_main$
|
|
12723
|
-
const _sfc_main$
|
|
12540
|
+
const ToCheckbox = withInstall(_sfc_main$Q);
|
|
12541
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
12724
12542
|
...{
|
|
12725
12543
|
name: "ToCheckboxes"
|
|
12726
12544
|
},
|
|
@@ -12731,7 +12549,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
12731
12549
|
required: { type: Boolean, default: false },
|
|
12732
12550
|
value: { default: "" },
|
|
12733
12551
|
modelValue: { default: "" },
|
|
12734
|
-
beforeChange: { type: Function, default: () => true }
|
|
12552
|
+
beforeChange: { type: Function, default: () => true },
|
|
12553
|
+
flex: { type: Boolean, default: false }
|
|
12735
12554
|
},
|
|
12736
12555
|
emits: ["change", "update:modelValue"],
|
|
12737
12556
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -12854,7 +12673,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
12854
12673
|
pushOptions
|
|
12855
12674
|
});
|
|
12856
12675
|
return (_ctx, _cache) => {
|
|
12857
|
-
return openBlock(), createElementBlock("div", {
|
|
12676
|
+
return openBlock(), createElementBlock("div", {
|
|
12677
|
+
id: __props.id,
|
|
12678
|
+
flex: __props.flex ? __props.flex : null
|
|
12679
|
+
}, [
|
|
12858
12680
|
validateRequired.value ? withDirectives((openBlock(), createElementBlock("span", {
|
|
12859
12681
|
key: 0,
|
|
12860
12682
|
class: "to-validate",
|
|
@@ -12864,12 +12686,13 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
12864
12686
|
}, null, 8, ["req", "desc", "value"])), [
|
|
12865
12687
|
[vShow, false]
|
|
12866
12688
|
]) : createCommentVNode("", true),
|
|
12867
|
-
renderSlot(_ctx.$slots, "default")
|
|
12868
|
-
|
|
12689
|
+
renderSlot(_ctx.$slots, "default"),
|
|
12690
|
+
createTextVNode("flex: false ")
|
|
12691
|
+
], 8, ["id", "flex"]);
|
|
12869
12692
|
};
|
|
12870
12693
|
}
|
|
12871
12694
|
});
|
|
12872
|
-
withInstall(_sfc_main$
|
|
12695
|
+
withInstall(_sfc_main$P);
|
|
12873
12696
|
const centerScrollProps = {
|
|
12874
12697
|
/**
|
|
12875
12698
|
* 数据源
|
|
@@ -12900,7 +12723,7 @@ const centerScrollEmits = {
|
|
|
12900
12723
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12901
12724
|
change: (value) => true
|
|
12902
12725
|
};
|
|
12903
|
-
const _sfc_main$
|
|
12726
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
12904
12727
|
...{
|
|
12905
12728
|
name: "ToCenterScroll"
|
|
12906
12729
|
},
|
|
@@ -13086,9 +12909,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
13086
12909
|
};
|
|
13087
12910
|
}
|
|
13088
12911
|
});
|
|
13089
|
-
const ToCenterScroll = withInstall(_sfc_main$
|
|
12912
|
+
const ToCenterScroll = withInstall(_sfc_main$O);
|
|
13090
12913
|
const hours = "00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23";
|
|
13091
|
-
const _sfc_main$
|
|
12914
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
13092
12915
|
...{
|
|
13093
12916
|
name: "ToPicker"
|
|
13094
12917
|
},
|
|
@@ -13130,12 +12953,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13130
12953
|
const months = ref("01,02,03,04,05,06,07,08,09,10,11,12");
|
|
13131
12954
|
const monthList = ref([]);
|
|
13132
12955
|
const days = ref([]);
|
|
13133
|
-
const minutes = ref(
|
|
13134
|
-
|
|
13135
|
-
);
|
|
13136
|
-
const seconds = ref(
|
|
13137
|
-
"00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59"
|
|
13138
|
-
);
|
|
12956
|
+
const minutes = ref("00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59");
|
|
12957
|
+
const seconds = ref("00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59");
|
|
13139
12958
|
const valueo = computed(() => {
|
|
13140
12959
|
const [date, time] = formatDate(props.modelValue).split(" ");
|
|
13141
12960
|
const [year2, month2, day2] = date.split("-");
|
|
@@ -13243,12 +13062,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13243
13062
|
value: item
|
|
13244
13063
|
};
|
|
13245
13064
|
const date = /* @__PURE__ */ new Date(`${year.value}-${item}`);
|
|
13246
|
-
const minDateValue = /* @__PURE__ */ new Date(
|
|
13247
|
-
|
|
13248
|
-
);
|
|
13249
|
-
const maxDateValue = /* @__PURE__ */ new Date(
|
|
13250
|
-
`${String(maxDate.value.getFullYear())}-${addZero2(String(maxDate.value.getMonth() + 1))}`
|
|
13251
|
-
);
|
|
13065
|
+
const minDateValue = /* @__PURE__ */ new Date(`${String(minDate.value.getFullYear())}-${addZero2(String(minDate.value.getMonth() + 1))}`);
|
|
13066
|
+
const maxDateValue = /* @__PURE__ */ new Date(`${String(maxDate.value.getFullYear())}-${addZero2(String(maxDate.value.getMonth() + 1))}`);
|
|
13252
13067
|
if (date >= minDateValue && date <= maxDateValue) {
|
|
13253
13068
|
monthList.value.push(object);
|
|
13254
13069
|
}
|
|
@@ -13281,16 +13096,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13281
13096
|
value: dayValue,
|
|
13282
13097
|
disabled: false
|
|
13283
13098
|
};
|
|
13284
|
-
const minDateValue = new Date(
|
|
13285
|
-
|
|
13286
|
-
minDate.value.getMonth(),
|
|
13287
|
-
minDate.value.getDate()
|
|
13288
|
-
);
|
|
13289
|
-
const maxDateValue = new Date(
|
|
13290
|
-
maxDate.value.getFullYear(),
|
|
13291
|
-
maxDate.value.getMonth(),
|
|
13292
|
-
maxDate.value.getDate()
|
|
13293
|
-
);
|
|
13099
|
+
const minDateValue = new Date(minDate.value.getFullYear(), minDate.value.getMonth(), minDate.value.getDate());
|
|
13100
|
+
const maxDateValue = new Date(maxDate.value.getFullYear(), maxDate.value.getMonth(), maxDate.value.getDate());
|
|
13294
13101
|
const date = new Date(Number(year.value), Number(month.value) - 1, Number(dayValue));
|
|
13295
13102
|
const inDateRange = date >= minDateValue && date <= maxDateValue;
|
|
13296
13103
|
if (inDateRange) {
|
|
@@ -13344,10 +13151,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13344
13151
|
}
|
|
13345
13152
|
function submit() {
|
|
13346
13153
|
if (props.type === "datetime") {
|
|
13347
|
-
emit(
|
|
13348
|
-
"change",
|
|
13349
|
-
`${year.value}-${month.value}-${day.value} ${hour.value}:${minute.value}:${second.value}`
|
|
13350
|
-
);
|
|
13154
|
+
emit("change", `${year.value}-${month.value}-${day.value} ${hour.value}:${minute.value}:${second.value}`);
|
|
13351
13155
|
} else if (props.type === "time") {
|
|
13352
13156
|
emit("change", `${hour.value}:${minute.value}:${second.value}`);
|
|
13353
13157
|
} else {
|
|
@@ -13390,7 +13194,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13390
13194
|
}
|
|
13391
13195
|
return (_ctx, _cache) => {
|
|
13392
13196
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
13393
|
-
|
|
13197
|
+
(openBlock(), createBlock(unref(ToGrid), {
|
|
13198
|
+
key: unref(langKey),
|
|
13394
13199
|
space: "1",
|
|
13395
13200
|
class: "to-picker-to-grid-container"
|
|
13396
13201
|
}, {
|
|
@@ -13477,9 +13282,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13477
13282
|
})
|
|
13478
13283
|
]),
|
|
13479
13284
|
_: 1
|
|
13480
|
-
}),
|
|
13285
|
+
})),
|
|
13481
13286
|
createVNode(unref(ToGap)),
|
|
13482
|
-
createVNode(unref(
|
|
13287
|
+
createVNode(unref(ToGrid), {
|
|
13288
|
+
gap: "1",
|
|
13289
|
+
col: "avg"
|
|
13290
|
+
}, {
|
|
13483
13291
|
default: withCtx(() => [
|
|
13484
13292
|
withDirectives((openBlock(), createBlock(unref(ToButton), {
|
|
13485
13293
|
fillet: "normal",
|
|
@@ -13488,7 +13296,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13488
13296
|
onClick: ($event) => _ctx.$emit("cancel")
|
|
13489
13297
|
}, {
|
|
13490
13298
|
default: withCtx(() => [
|
|
13491
|
-
createTextVNode("
|
|
13299
|
+
createTextVNode(toDisplayString(unref(t)("to.datepicker.cancel")), 1)
|
|
13492
13300
|
]),
|
|
13493
13301
|
_: 1
|
|
13494
13302
|
}, 8, ["onClick"])), [
|
|
@@ -13501,7 +13309,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13501
13309
|
onClick: clear
|
|
13502
13310
|
}, {
|
|
13503
13311
|
default: withCtx(() => [
|
|
13504
|
-
createTextVNode("
|
|
13312
|
+
createTextVNode(toDisplayString(unref(t)("to.datepicker.clear")), 1)
|
|
13505
13313
|
]),
|
|
13506
13314
|
_: 1
|
|
13507
13315
|
})), [
|
|
@@ -13513,7 +13321,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
13513
13321
|
onClick: submit
|
|
13514
13322
|
}, {
|
|
13515
13323
|
default: withCtx(() => [
|
|
13516
|
-
createTextVNode("
|
|
13324
|
+
createTextVNode(toDisplayString(unref(t)("to.datepicker.confirm")), 1)
|
|
13517
13325
|
]),
|
|
13518
13326
|
_: 1
|
|
13519
13327
|
})), [
|
|
@@ -13753,13 +13561,14 @@ function useDatePicker(props, emit) {
|
|
|
13753
13561
|
emitChangeEvent
|
|
13754
13562
|
};
|
|
13755
13563
|
}
|
|
13756
|
-
const _sfc_main$
|
|
13564
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
13757
13565
|
...{
|
|
13758
13566
|
name: "ToDatePicker",
|
|
13759
13567
|
componentName: "ToDatePicker"
|
|
13760
13568
|
},
|
|
13761
13569
|
__name: "DatePicker",
|
|
13762
13570
|
props: {
|
|
13571
|
+
flex: Boolean,
|
|
13763
13572
|
suffix: {
|
|
13764
13573
|
type: String,
|
|
13765
13574
|
default: ""
|
|
@@ -13802,7 +13611,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
13802
13611
|
},
|
|
13803
13612
|
placeholder: {
|
|
13804
13613
|
type: String,
|
|
13805
|
-
default: "
|
|
13614
|
+
default: ""
|
|
13806
13615
|
},
|
|
13807
13616
|
disabled: Boolean,
|
|
13808
13617
|
inputable: {
|
|
@@ -13999,8 +13808,10 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
13999
13808
|
const _component_to_button = resolveComponent("to-button");
|
|
14000
13809
|
return openBlock(), createBlock(unref(ToInput), {
|
|
14001
13810
|
id: __props.id,
|
|
13811
|
+
key: unref(langKey),
|
|
14002
13812
|
ref_key: "inputBox",
|
|
14003
13813
|
ref: inputBox,
|
|
13814
|
+
flex: __props.flex ? __props.flex : null,
|
|
14004
13815
|
"model-value": unref(datedisplay),
|
|
14005
13816
|
class: "to-date-picker",
|
|
14006
13817
|
readonly: !props.inputable,
|
|
@@ -14084,7 +13895,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
14084
13895
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "time", "type", "min", "max", "min-year", "max-year", "disabled-date", "before-change", "onClose"])
|
|
14085
13896
|
]),
|
|
14086
13897
|
_: 1
|
|
14087
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
13898
|
+
})) : (openBlock(), createBlock(_sfc_main$N, {
|
|
14088
13899
|
key: 1,
|
|
14089
13900
|
modelValue: unref(date),
|
|
14090
13901
|
"onUpdate:modelValue": ($event) => isRef(date) ? date.value = $event : null,
|
|
@@ -14102,7 +13913,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
14102
13913
|
showCloseLayer.value ? (openBlock(), createElementBlock("div", { key: 2 }, [
|
|
14103
13914
|
createVNode(_component_to_button, { onClick: closeLayer }, {
|
|
14104
13915
|
default: withCtx(() => [
|
|
14105
|
-
createTextVNode("
|
|
13916
|
+
createTextVNode(toDisplayString(unref(t)("to.datepicker.confirm")), 1)
|
|
14106
13917
|
]),
|
|
14107
13918
|
_: 1
|
|
14108
13919
|
})
|
|
@@ -14114,12 +13925,12 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
14114
13925
|
]))
|
|
14115
13926
|
]),
|
|
14116
13927
|
_: 1
|
|
14117
|
-
}, 8, ["id", "model-value", "readonly", "required", "desc", "color", "prefix", "suffix", "mode", "prop-error-type", "prop-error-tip", "fillet", "fillet-position", "placeholder", "disabled", "sp-chars", "link", "clearable", "width", "comparable", "onClear", "onInput"]);
|
|
13928
|
+
}, 8, ["id", "flex", "model-value", "readonly", "required", "desc", "color", "prefix", "suffix", "mode", "prop-error-type", "prop-error-tip", "fillet", "fillet-position", "placeholder", "disabled", "sp-chars", "link", "clearable", "width", "comparable", "onClear", "onInput"]);
|
|
14118
13929
|
};
|
|
14119
13930
|
}
|
|
14120
13931
|
});
|
|
14121
|
-
withInstall(_sfc_main$
|
|
14122
|
-
const _sfc_main$
|
|
13932
|
+
withInstall(_sfc_main$M);
|
|
13933
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
14123
13934
|
...{
|
|
14124
13935
|
name: "ToDateRange"
|
|
14125
13936
|
},
|
|
@@ -14130,14 +13941,15 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
14130
13941
|
mode: { default: "default" },
|
|
14131
13942
|
icon: { default: "date" },
|
|
14132
13943
|
inputable: { type: Boolean, default: true },
|
|
14133
|
-
startPlaceholder: { default: "
|
|
14134
|
-
endPlaceholder: { default: "
|
|
13944
|
+
startPlaceholder: { default: "" },
|
|
13945
|
+
endPlaceholder: { default: "" },
|
|
14135
13946
|
type: { default: "date" },
|
|
14136
13947
|
min: { default: "" },
|
|
14137
13948
|
max: { default: "" },
|
|
14138
13949
|
disabled: { type: Boolean, default: false },
|
|
14139
13950
|
clearable: { type: Boolean, default: true },
|
|
14140
|
-
prefix: { default: "" }
|
|
13951
|
+
prefix: { default: "" },
|
|
13952
|
+
flex: { type: Boolean, default: false }
|
|
14141
13953
|
},
|
|
14142
13954
|
emits: ["update:modelValue", "focus", "change"],
|
|
14143
13955
|
setup(__props, { emit: __emit }) {
|
|
@@ -14231,6 +14043,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
14231
14043
|
return openBlock(), createElementBlock("span", {
|
|
14232
14044
|
ref_key: "$el",
|
|
14233
14045
|
ref: $el,
|
|
14046
|
+
key: unref(langKey),
|
|
14047
|
+
flex: __props.flex ? __props.flex : null,
|
|
14234
14048
|
class: normalizeClass(["to-date-range", setClass.value])
|
|
14235
14049
|
}, [
|
|
14236
14050
|
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", {
|
|
@@ -14248,7 +14062,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
14248
14062
|
withDirectives(createElementVNode("input", {
|
|
14249
14063
|
"onUpdate:modelValue": ($event) => startDate.value = $event,
|
|
14250
14064
|
class: "to-date-range-input",
|
|
14251
|
-
placeholder: __props.startPlaceholder,
|
|
14065
|
+
placeholder: __props.startPlaceholder || unref(t)("to.daterange.startDate"),
|
|
14252
14066
|
type: "text",
|
|
14253
14067
|
readonly: !__props.inputable,
|
|
14254
14068
|
onFocus: handleFocus
|
|
@@ -14260,7 +14074,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
14260
14074
|
withDirectives(createElementVNode("input", {
|
|
14261
14075
|
"onUpdate:modelValue": ($event) => endDate.value = $event,
|
|
14262
14076
|
class: "to-date-range-input",
|
|
14263
|
-
placeholder: __props.endPlaceholder,
|
|
14077
|
+
placeholder: __props.endPlaceholder || unref(t)("to.daterange.endDate"),
|
|
14264
14078
|
type: "text",
|
|
14265
14079
|
readonly: !__props.inputable,
|
|
14266
14080
|
onFocus: handleFocus
|
|
@@ -14309,17 +14123,18 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
14309
14123
|
]),
|
|
14310
14124
|
_: 1
|
|
14311
14125
|
}, 8, ["width"])
|
|
14312
|
-
],
|
|
14126
|
+
], 10, ["flex"]);
|
|
14313
14127
|
};
|
|
14314
14128
|
}
|
|
14315
14129
|
});
|
|
14316
|
-
withInstall(_sfc_main$
|
|
14317
|
-
const _sfc_main$
|
|
14130
|
+
withInstall(_sfc_main$L);
|
|
14131
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
14318
14132
|
...{
|
|
14319
14133
|
name: "ToSwitch"
|
|
14320
14134
|
},
|
|
14321
14135
|
__name: "switch",
|
|
14322
14136
|
props: {
|
|
14137
|
+
flex: Boolean,
|
|
14323
14138
|
readonly: Boolean,
|
|
14324
14139
|
modelValue: {
|
|
14325
14140
|
type: [Boolean, String, Number],
|
|
@@ -14478,6 +14293,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
14478
14293
|
const _directive_dis = resolveDirective("dis");
|
|
14479
14294
|
const _directive_tip = resolveDirective("tip");
|
|
14480
14295
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
14296
|
+
flex: __props.flex ? __props.flex : null,
|
|
14481
14297
|
class: normalizeClass(["to-switch", setClass.value]),
|
|
14482
14298
|
style: normalizeStyle(setStyle.value),
|
|
14483
14299
|
onClick: toggle
|
|
@@ -14505,7 +14321,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
14505
14321
|
}, null, 8, ["value"])) : createCommentVNode("", true)
|
|
14506
14322
|
]),
|
|
14507
14323
|
createElementVNode("div", { class: "to-switch-slider" })
|
|
14508
|
-
],
|
|
14324
|
+
], 14, ["flex"])), [
|
|
14509
14325
|
[
|
|
14510
14326
|
_directive_dis,
|
|
14511
14327
|
disabled.value,
|
|
@@ -14517,13 +14333,14 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
14517
14333
|
};
|
|
14518
14334
|
}
|
|
14519
14335
|
});
|
|
14520
|
-
withInstall(_sfc_main$
|
|
14521
|
-
const _sfc_main$
|
|
14336
|
+
withInstall(_sfc_main$K);
|
|
14337
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
14522
14338
|
...{
|
|
14523
14339
|
name: "ToTab"
|
|
14524
14340
|
},
|
|
14525
14341
|
__name: "tab",
|
|
14526
14342
|
props: {
|
|
14343
|
+
flex: { type: Boolean, default: false },
|
|
14527
14344
|
modelValue: { default: "" },
|
|
14528
14345
|
itemWidth: { default: "" },
|
|
14529
14346
|
mode: { default: "default" },
|
|
@@ -14736,6 +14553,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
14736
14553
|
stopChange = false;
|
|
14737
14554
|
}, 10);
|
|
14738
14555
|
}
|
|
14556
|
+
function updateTabLabel(oldLabel, label) {
|
|
14557
|
+
let idx = _data.value.findIndex((item) => item.label === oldLabel);
|
|
14558
|
+
if (idx !== -1) {
|
|
14559
|
+
_data.value[idx].label = label;
|
|
14560
|
+
}
|
|
14561
|
+
}
|
|
14739
14562
|
function getPicOn(pic) {
|
|
14740
14563
|
let src = "";
|
|
14741
14564
|
if (pic && props.changePic) {
|
|
@@ -14788,12 +14611,15 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
14788
14611
|
provide("TabProvide", {
|
|
14789
14612
|
addTab,
|
|
14790
14613
|
removeTab,
|
|
14614
|
+
updateTabLabel,
|
|
14791
14615
|
selectValue
|
|
14792
14616
|
});
|
|
14793
14617
|
return (_ctx, _cache) => {
|
|
14794
14618
|
const _component_to_pic = resolveComponent("to-pic");
|
|
14795
14619
|
return openBlock(), createElementBlock("div", {
|
|
14620
|
+
key: unref(langKey),
|
|
14796
14621
|
class: normalizeClass(["to-tab", setClass.value]),
|
|
14622
|
+
flex: __props.flex ? __props.flex : null,
|
|
14797
14623
|
style: normalizeStyle(setStyle.value)
|
|
14798
14624
|
}, [
|
|
14799
14625
|
createElementVNode("div", { class: "to-tab-tab" }, [
|
|
@@ -14839,8 +14665,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
14839
14665
|
item.pic ? (openBlock(), createBlock(_component_to_pic, {
|
|
14840
14666
|
key: 0,
|
|
14841
14667
|
class: "to-tab-item-pic",
|
|
14842
|
-
src: item.value === selectValue.value ? getPicOn(item.pic) : item.pic
|
|
14843
|
-
width: 2
|
|
14668
|
+
src: item.value === selectValue.value ? getPicOn(item.pic) : item.pic
|
|
14844
14669
|
}, null, 8, ["src"])) : createCommentVNode("", true),
|
|
14845
14670
|
item.icon ? (openBlock(), createElementBlock("span", {
|
|
14846
14671
|
key: 1,
|
|
@@ -14921,11 +14746,11 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
14921
14746
|
}, [
|
|
14922
14747
|
renderSlot(_ctx.$slots, "default")
|
|
14923
14748
|
]))
|
|
14924
|
-
],
|
|
14749
|
+
], 14, ["flex"]);
|
|
14925
14750
|
};
|
|
14926
14751
|
}
|
|
14927
14752
|
});
|
|
14928
|
-
const _sfc_main$
|
|
14753
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
14929
14754
|
...{
|
|
14930
14755
|
name: "ToTabItem"
|
|
14931
14756
|
},
|
|
@@ -14955,6 +14780,14 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
14955
14780
|
const show = computed(() => {
|
|
14956
14781
|
return tabProvide.selectValue.value === (props.value || props.label);
|
|
14957
14782
|
});
|
|
14783
|
+
watch(
|
|
14784
|
+
() => props.label,
|
|
14785
|
+
(newLabel, oldLabel) => {
|
|
14786
|
+
if (tabProvide && tabProvide.updateTabLabel) {
|
|
14787
|
+
tabProvide.updateTabLabel(oldLabel, newLabel);
|
|
14788
|
+
}
|
|
14789
|
+
}
|
|
14790
|
+
);
|
|
14958
14791
|
function init() {
|
|
14959
14792
|
const tabData = {
|
|
14960
14793
|
label: props.label,
|
|
@@ -14976,7 +14809,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
14976
14809
|
});
|
|
14977
14810
|
return (_ctx, _cache) => {
|
|
14978
14811
|
return (__props.lazy ? show.value : true) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
14979
|
-
key:
|
|
14812
|
+
key: unref(langKey),
|
|
14980
14813
|
class: normalizeClass(["to-tab-page-item", setClass.value])
|
|
14981
14814
|
}, [
|
|
14982
14815
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -14986,9 +14819,9 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
14986
14819
|
};
|
|
14987
14820
|
}
|
|
14988
14821
|
});
|
|
14989
|
-
withInstall(_sfc_main$
|
|
14990
|
-
withInstall(_sfc_main$
|
|
14991
|
-
const _sfc_main$
|
|
14822
|
+
withInstall(_sfc_main$J, { TabItem: _sfc_main$I });
|
|
14823
|
+
withInstall(_sfc_main$I);
|
|
14824
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
14992
14825
|
...{
|
|
14993
14826
|
name: "ToTableHead"
|
|
14994
14827
|
},
|
|
@@ -14999,9 +14832,41 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
14999
14832
|
},
|
|
15000
14833
|
emits: ["change"],
|
|
15001
14834
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14835
|
+
const tableRef = inject("TableRef");
|
|
15002
14836
|
const emit = __emit;
|
|
15003
14837
|
const props = __props;
|
|
15004
14838
|
const row = ref(null);
|
|
14839
|
+
const sortSet = ref({});
|
|
14840
|
+
watch(
|
|
14841
|
+
() => props.data,
|
|
14842
|
+
(val) => {
|
|
14843
|
+
val.forEach((item) => {
|
|
14844
|
+
if (item.sortable) {
|
|
14845
|
+
sortSet.value[item.prop] = sortSet.value[item.prop] || "";
|
|
14846
|
+
}
|
|
14847
|
+
});
|
|
14848
|
+
},
|
|
14849
|
+
{ deep: true }
|
|
14850
|
+
);
|
|
14851
|
+
onMounted(() => {
|
|
14852
|
+
props.data.forEach((item) => {
|
|
14853
|
+
if (item.sortable) {
|
|
14854
|
+
sortSet.value[item.prop] = sortSet.value[item.prop] || "";
|
|
14855
|
+
}
|
|
14856
|
+
});
|
|
14857
|
+
});
|
|
14858
|
+
const sortClick = (column) => {
|
|
14859
|
+
if (!column.sortable)
|
|
14860
|
+
return false;
|
|
14861
|
+
if (sortSet.value[column.prop] === "asc") {
|
|
14862
|
+
sortSet.value[column.prop] = "desc";
|
|
14863
|
+
} else if (sortSet.value[column.prop] === "desc") {
|
|
14864
|
+
sortSet.value[column.prop] = "";
|
|
14865
|
+
} else {
|
|
14866
|
+
sortSet.value[column.prop] = "asc";
|
|
14867
|
+
}
|
|
14868
|
+
tableRef.handleTheadCellClick(column, sortSet.value[column.prop]);
|
|
14869
|
+
};
|
|
15005
14870
|
const setThClass = (column) => {
|
|
15006
14871
|
return computed(() => {
|
|
15007
14872
|
const classes = [];
|
|
@@ -15010,6 +14875,9 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
15010
14875
|
} else if (column.thWrap === false) {
|
|
15011
14876
|
classes.push("is-nowrap");
|
|
15012
14877
|
}
|
|
14878
|
+
if (sortSet.value[column.prop]) {
|
|
14879
|
+
classes.push(`type-${sortSet.value[column.prop]}`);
|
|
14880
|
+
}
|
|
15013
14881
|
return classes;
|
|
15014
14882
|
});
|
|
15015
14883
|
};
|
|
@@ -15039,8 +14907,18 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
15039
14907
|
}, null, 8, ["model-value"])
|
|
15040
14908
|
])) : column._show !== false ? (openBlock(), createElementBlock("th", {
|
|
15041
14909
|
key: column.prop,
|
|
15042
|
-
class: normalizeClass(["to-table-th", setThClass(column).value])
|
|
15043
|
-
|
|
14910
|
+
class: normalizeClass(["to-table-th", setThClass(column).value]),
|
|
14911
|
+
onClick: ($event) => sortClick(column)
|
|
14912
|
+
}, [
|
|
14913
|
+
createElementVNode("span", null, toDisplayString(column.label), 1),
|
|
14914
|
+
column.sortable ? (openBlock(), createElementBlock("span", {
|
|
14915
|
+
key: 0,
|
|
14916
|
+
class: "to-table-sorticon"
|
|
14917
|
+
}, [
|
|
14918
|
+
createElementVNode("span", { class: "to-table-sorticon-item ascending" }),
|
|
14919
|
+
createElementVNode("span", { class: "to-table-sorticon-item descending" })
|
|
14920
|
+
])) : createCommentVNode("", true)
|
|
14921
|
+
], 10, ["onClick"])) : createCommentVNode("", true)
|
|
15044
14922
|
], 64);
|
|
15045
14923
|
}), 256))
|
|
15046
14924
|
])
|
|
@@ -15048,7 +14926,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
15048
14926
|
};
|
|
15049
14927
|
}
|
|
15050
14928
|
});
|
|
15051
|
-
const _sfc_main$
|
|
14929
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
15052
14930
|
...{
|
|
15053
14931
|
name: "ToTableBody"
|
|
15054
14932
|
},
|
|
@@ -15178,6 +15056,15 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
15178
15056
|
}
|
|
15179
15057
|
});
|
|
15180
15058
|
}
|
|
15059
|
+
const tableRef = inject("TableRef");
|
|
15060
|
+
function toggleDetail(row, index) {
|
|
15061
|
+
if (row.detailShow) {
|
|
15062
|
+
row.detailShow = false;
|
|
15063
|
+
} else {
|
|
15064
|
+
row.detailShow = true;
|
|
15065
|
+
}
|
|
15066
|
+
tableRef.hanldeDetailChange(row, index, row.detailShow);
|
|
15067
|
+
}
|
|
15181
15068
|
__expose({
|
|
15182
15069
|
checkAll,
|
|
15183
15070
|
flatData,
|
|
@@ -15192,99 +15079,123 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
15192
15079
|
class: "to-table-body"
|
|
15193
15080
|
}, [
|
|
15194
15081
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleRows.value, (row, index) => {
|
|
15195
|
-
return openBlock(), createElementBlock(
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
key: column.prop + "check",
|
|
15203
|
-
class: "to-table-td type-check"
|
|
15204
|
-
}, [
|
|
15205
|
-
createVNode(_component_ToCheckbox, {
|
|
15206
|
-
modelValue: row._checked,
|
|
15207
|
-
"onUpdate:modelValue": ($event) => row._checked = $event,
|
|
15208
|
-
onChange: change
|
|
15209
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
15210
|
-
])) : column.type === "radio" ? (openBlock(), createElementBlock("td", {
|
|
15211
|
-
key: column.prop + "radio",
|
|
15212
|
-
class: "to-table-td type-check"
|
|
15213
|
-
}, [
|
|
15214
|
-
createElementVNode("div", {
|
|
15215
|
-
class: normalizeClass(["to-table-radio", { "is-checked": row._checked }]),
|
|
15216
|
-
onClick: ($event) => radioChange(row)
|
|
15217
|
-
}, null, 10, ["onClick"])
|
|
15218
|
-
])) : column.type === "action" ? (openBlock(), createElementBlock("td", {
|
|
15219
|
-
key: column.prop + "action",
|
|
15220
|
-
class: "to-table-td type-action"
|
|
15221
|
-
}, [
|
|
15222
|
-
createElementVNode("div", { class: "to-table-action" }, [
|
|
15223
|
-
renderSlot(_ctx.$slots, column.prop, {
|
|
15224
|
-
row,
|
|
15225
|
-
column,
|
|
15226
|
-
index
|
|
15227
|
-
}, () => [
|
|
15228
|
-
createTextVNode(toDisplayString(row[column.prop]), 1)
|
|
15229
|
-
])
|
|
15230
|
-
])
|
|
15231
|
-
])) : column._show !== false ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
15232
|
-
tipShow.value === index && column.showTip ? withDirectives((openBlock(), createElementBlock("td", {
|
|
15233
|
-
key: column.prop,
|
|
15234
|
-
class: normalizeClass(["to-table-td", setTdClass(column).value]),
|
|
15235
|
-
style: normalizeStyle({ paddingLeft: column.toggler && row._level ? `${row._level + 2}em` : "" }),
|
|
15236
|
-
onMouseenter: (e) => handleMouseEnter(e, index),
|
|
15237
|
-
onMouseleave: handleMouseLeave
|
|
15082
|
+
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
15083
|
+
createElementVNode("tr", { class: "to-table-body-row" }, [
|
|
15084
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.columnData, (column) => {
|
|
15085
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
15086
|
+
column.type === "check" ? (openBlock(), createElementBlock("td", {
|
|
15087
|
+
key: column.prop + "check",
|
|
15088
|
+
class: "to-table-td type-check"
|
|
15238
15089
|
}, [
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
}, null,
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
index
|
|
15248
|
-
}, () => [
|
|
15249
|
-
createElementVNode("span", null, toDisplayString(row[column.prop]), 1)
|
|
15250
|
-
])
|
|
15251
|
-
], 46, ["onMouseenter"])), [
|
|
15252
|
-
[_directive_tip, row[column.prop]]
|
|
15253
|
-
]) : (openBlock(), createElementBlock("td", {
|
|
15254
|
-
key: column.prop + "else",
|
|
15255
|
-
class: normalizeClass(["to-table-td", setTdClass(column).value]),
|
|
15256
|
-
style: normalizeStyle({ paddingLeft: column.toggler && row._level ? `${row._level + 2}em` : "" }),
|
|
15257
|
-
onMouseenter: (e) => handleMouseEnter(e, index),
|
|
15258
|
-
onMouseleave: handleMouseLeave
|
|
15090
|
+
createVNode(_component_ToCheckbox, {
|
|
15091
|
+
modelValue: row._checked,
|
|
15092
|
+
"onUpdate:modelValue": ($event) => row._checked = $event,
|
|
15093
|
+
onChange: change
|
|
15094
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
15095
|
+
])) : column.type === "radio" ? (openBlock(), createElementBlock("td", {
|
|
15096
|
+
key: column.prop + "radio",
|
|
15097
|
+
class: "to-table-td type-check"
|
|
15259
15098
|
}, [
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
|
|
15099
|
+
createElementVNode("div", {
|
|
15100
|
+
class: normalizeClass(["to-table-radio", { "is-checked": row._checked }]),
|
|
15101
|
+
onClick: ($event) => radioChange(row)
|
|
15102
|
+
}, null, 10, ["onClick"])
|
|
15103
|
+
])) : column.type === "action" ? (openBlock(), createElementBlock("td", {
|
|
15104
|
+
key: column.prop + "action",
|
|
15105
|
+
class: "to-table-td type-action"
|
|
15106
|
+
}, [
|
|
15107
|
+
createElementVNode("div", { class: "to-table-action" }, [
|
|
15108
|
+
renderSlot(_ctx.$slots, column.prop, {
|
|
15109
|
+
row,
|
|
15110
|
+
column,
|
|
15111
|
+
index
|
|
15112
|
+
}, () => [
|
|
15113
|
+
createTextVNode(toDisplayString(row[column.prop]), 1)
|
|
15114
|
+
])
|
|
15271
15115
|
])
|
|
15272
|
-
],
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15116
|
+
])) : column._show !== false ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
15117
|
+
tipShow.value === index && column.showTip ? withDirectives((openBlock(), createElementBlock("td", {
|
|
15118
|
+
key: column.prop,
|
|
15119
|
+
class: normalizeClass(["to-table-td", setTdClass(column).value]),
|
|
15120
|
+
style: normalizeStyle({ paddingLeft: column.toggler && row._level ? `${row._level + 2}em` : "" }),
|
|
15121
|
+
onMouseenter: (e) => handleMouseEnter(e, index),
|
|
15122
|
+
onMouseleave: handleMouseLeave
|
|
15123
|
+
}, [
|
|
15124
|
+
hasChildren(row) && column.toggler ? (openBlock(), createElementBlock("span", {
|
|
15125
|
+
key: 0,
|
|
15126
|
+
class: normalizeClass(["to-table-toggle", { "is-expand": expandedSet.value.has(row._id) }]),
|
|
15127
|
+
onClick: ($event) => toggleExpand(row)
|
|
15128
|
+
}, null, 10, ["onClick"])) : createCommentVNode("", true),
|
|
15129
|
+
column.detailToggle ? (openBlock(), createElementBlock("span", {
|
|
15130
|
+
key: 1,
|
|
15131
|
+
class: normalizeClass(["to-table-detail-toggle", { "is-detail": row.detailShow }]),
|
|
15132
|
+
onClick: ($event) => toggleDetail(row, index)
|
|
15133
|
+
}, null, 10, ["onClick"])) : createCommentVNode("", true),
|
|
15134
|
+
renderSlot(_ctx.$slots, column.prop, {
|
|
15135
|
+
row,
|
|
15136
|
+
column,
|
|
15137
|
+
index
|
|
15138
|
+
}, () => [
|
|
15139
|
+
createElementVNode("span", null, toDisplayString(row[column.prop]), 1)
|
|
15140
|
+
])
|
|
15141
|
+
], 46, ["onMouseenter"])), [
|
|
15142
|
+
[_directive_tip, row[column.prop]]
|
|
15143
|
+
]) : (openBlock(), createElementBlock("td", {
|
|
15144
|
+
key: column.prop + "else",
|
|
15145
|
+
class: normalizeClass(["to-table-td", setTdClass(column).value]),
|
|
15146
|
+
style: normalizeStyle({ paddingLeft: column.toggler && row._level ? `${row._level + 2}em` : "" }),
|
|
15147
|
+
onMouseenter: (e) => handleMouseEnter(e, index),
|
|
15148
|
+
onMouseleave: handleMouseLeave
|
|
15149
|
+
}, [
|
|
15150
|
+
hasChildren(row) && column.toggler ? (openBlock(), createElementBlock("span", {
|
|
15151
|
+
key: 0,
|
|
15152
|
+
class: normalizeClass(["to-table-toggle", { "is-expand": expandedSet.value.has(row._id) }]),
|
|
15153
|
+
onClick: ($event) => toggleExpand(row)
|
|
15154
|
+
}, null, 10, ["onClick"])) : createCommentVNode("", true),
|
|
15155
|
+
column.detailToggle ? (openBlock(), createElementBlock("span", {
|
|
15156
|
+
key: 1,
|
|
15157
|
+
class: normalizeClass(["to-table-detail-toggle", { "is-detail": row.detailShow }]),
|
|
15158
|
+
onClick: ($event) => toggleDetail(row, index)
|
|
15159
|
+
}, null, 10, ["onClick"])) : createCommentVNode("", true),
|
|
15160
|
+
renderSlot(_ctx.$slots, column.prop, {
|
|
15161
|
+
row,
|
|
15162
|
+
column,
|
|
15163
|
+
index
|
|
15164
|
+
}, () => [
|
|
15165
|
+
createElementVNode("span", null, toDisplayString(row[column.prop]), 1)
|
|
15166
|
+
])
|
|
15167
|
+
], 46, ["onMouseenter"]))
|
|
15168
|
+
], 64)) : createCommentVNode("", true)
|
|
15169
|
+
], 64);
|
|
15170
|
+
}), 256))
|
|
15171
|
+
]),
|
|
15172
|
+
row.detailShow ? (openBlock(), createElementBlock("tr", {
|
|
15173
|
+
key: 0,
|
|
15174
|
+
class: "to-table-detail-row"
|
|
15175
|
+
}, [
|
|
15176
|
+
createElementVNode("td", {
|
|
15177
|
+
colspan: props.columnData.length,
|
|
15178
|
+
class: "to-table-detail-cell"
|
|
15179
|
+
}, [
|
|
15180
|
+
renderSlot(_ctx.$slots, "detail", {
|
|
15181
|
+
row,
|
|
15182
|
+
index
|
|
15183
|
+
})
|
|
15184
|
+
], 8, ["colspan"])
|
|
15185
|
+
])) : createCommentVNode("", true)
|
|
15186
|
+
], 64);
|
|
15277
15187
|
}), 128))
|
|
15278
15188
|
], 512);
|
|
15279
15189
|
};
|
|
15280
15190
|
}
|
|
15281
15191
|
});
|
|
15282
|
-
const _sfc_main$
|
|
15192
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
15283
15193
|
...{
|
|
15284
15194
|
name: "ToTable"
|
|
15285
15195
|
},
|
|
15286
15196
|
__name: "table",
|
|
15287
15197
|
props: {
|
|
15198
|
+
flex: { type: Boolean, default: false },
|
|
15288
15199
|
columns: { default: () => [] },
|
|
15289
15200
|
data: { default: () => [] },
|
|
15290
15201
|
height: { default: "" },
|
|
@@ -15294,11 +15205,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15294
15205
|
mode: { default: "default" },
|
|
15295
15206
|
wrap: { type: Boolean, default: false },
|
|
15296
15207
|
thWrap: { type: Boolean, default: false },
|
|
15297
|
-
emptyText: { default: "
|
|
15208
|
+
emptyText: { default: "" },
|
|
15298
15209
|
modelValue: { default: "" },
|
|
15299
|
-
valueKeys: { default: "_id" }
|
|
15210
|
+
valueKeys: { default: "_id" },
|
|
15211
|
+
sortFunction: { type: [Function, null], default: null }
|
|
15300
15212
|
},
|
|
15301
|
-
emits: ["change", "update:modelValue"],
|
|
15213
|
+
emits: ["change", "update:modelValue", "sort", "detailChange"],
|
|
15302
15214
|
setup(__props, { emit: __emit }) {
|
|
15303
15215
|
const emit = __emit;
|
|
15304
15216
|
const props = __props;
|
|
@@ -15574,6 +15486,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15574
15486
|
});
|
|
15575
15487
|
return flag;
|
|
15576
15488
|
});
|
|
15489
|
+
function sortChange(sortInfo) {
|
|
15490
|
+
emit("sort", sortInfo);
|
|
15491
|
+
}
|
|
15577
15492
|
const hasCheck = computed(() => {
|
|
15578
15493
|
let flag = false;
|
|
15579
15494
|
props.columns.map((item) => {
|
|
@@ -15641,10 +15556,24 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15641
15556
|
}
|
|
15642
15557
|
}
|
|
15643
15558
|
}
|
|
15559
|
+
const handleTheadCellClick = (column, type) => {
|
|
15560
|
+
if (props.sortFunction) {
|
|
15561
|
+
props.sortFunction(column, type);
|
|
15562
|
+
}
|
|
15563
|
+
};
|
|
15564
|
+
const hanldeDetailChange = (column, index, value) => {
|
|
15565
|
+
emit("detailChange", column, index, value);
|
|
15566
|
+
};
|
|
15567
|
+
provide("TableRef", {
|
|
15568
|
+
handleTheadCellClick,
|
|
15569
|
+
hanldeDetailChange
|
|
15570
|
+
});
|
|
15644
15571
|
return (_ctx, _cache) => {
|
|
15645
15572
|
return openBlock(), createElementBlock("div", {
|
|
15646
15573
|
ref_key: "$el",
|
|
15647
15574
|
ref: $el,
|
|
15575
|
+
key: unref(langKey),
|
|
15576
|
+
flex: __props.flex ? __props.flex : null,
|
|
15648
15577
|
class: normalizeClass(["to-table", setClass.value]),
|
|
15649
15578
|
style: normalizeStyle(setStyle.value)
|
|
15650
15579
|
}, [
|
|
@@ -15668,14 +15597,15 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15668
15597
|
}, null, 6);
|
|
15669
15598
|
}), 128))
|
|
15670
15599
|
]),
|
|
15671
|
-
createVNode(_sfc_main$
|
|
15600
|
+
createVNode(_sfc_main$H, {
|
|
15672
15601
|
ref_key: "bodyHead",
|
|
15673
15602
|
ref: bodyHead,
|
|
15674
15603
|
"checked-all": checkedAll.value,
|
|
15675
15604
|
data: __props.columns,
|
|
15676
|
-
onChange: checkedAllChange
|
|
15605
|
+
onChange: checkedAllChange,
|
|
15606
|
+
onSort: sortChange
|
|
15677
15607
|
}, null, 8, ["checked-all", "data"]),
|
|
15678
|
-
createVNode(_sfc_main$
|
|
15608
|
+
createVNode(_sfc_main$G, {
|
|
15679
15609
|
ref_key: "bodyBody",
|
|
15680
15610
|
ref: bodyBody,
|
|
15681
15611
|
type: hasRadio.value ? "radio" : hasCheck.value ? "check" : "",
|
|
@@ -15683,7 +15613,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15683
15613
|
"checked-all": checkedAll.value,
|
|
15684
15614
|
"column-data": __props.columns,
|
|
15685
15615
|
onChange: change
|
|
15686
|
-
}, createSlots({
|
|
15616
|
+
}, createSlots({
|
|
15617
|
+
detail: withCtx((slotProps) => [
|
|
15618
|
+
renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(slotProps)))
|
|
15619
|
+
]),
|
|
15620
|
+
_: 2
|
|
15621
|
+
}, [
|
|
15687
15622
|
renderList(flattenColumns.value, (columnItem) => {
|
|
15688
15623
|
return {
|
|
15689
15624
|
name: columnItem.prop,
|
|
@@ -15697,7 +15632,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15697
15632
|
!__props.data.length ? (openBlock(), createElementBlock("div", {
|
|
15698
15633
|
key: 0,
|
|
15699
15634
|
class: "to-table-empty"
|
|
15700
|
-
}, toDisplayString(props.emptyText), 1)) : createCommentVNode("", true)
|
|
15635
|
+
}, toDisplayString(props.emptyText || unref(t)("to.table.emptyText")), 1)) : createCommentVNode("", true)
|
|
15701
15636
|
], 544),
|
|
15702
15637
|
Number(__props.fixTop) > 0 ? (openBlock(), createElementBlock("div", {
|
|
15703
15638
|
key: 0,
|
|
@@ -15710,11 +15645,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15710
15645
|
ref: topTable,
|
|
15711
15646
|
class: "to-table-table"
|
|
15712
15647
|
}, [
|
|
15713
|
-
createVNode(_sfc_main$
|
|
15648
|
+
createVNode(_sfc_main$H, {
|
|
15714
15649
|
ref_key: "topHead",
|
|
15715
15650
|
ref: topHead,
|
|
15716
15651
|
data: __props.columns,
|
|
15717
|
-
onChange: checkedAllChange
|
|
15652
|
+
onChange: checkedAllChange,
|
|
15653
|
+
onSort: sortChange
|
|
15718
15654
|
}, null, 8, ["data"])
|
|
15719
15655
|
], 512)
|
|
15720
15656
|
], 512)) : createCommentVNode("", true),
|
|
@@ -15729,19 +15665,25 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15729
15665
|
ref: leftTable,
|
|
15730
15666
|
class: "to-table-table"
|
|
15731
15667
|
}, [
|
|
15732
|
-
createVNode(_sfc_main$
|
|
15668
|
+
createVNode(_sfc_main$H, {
|
|
15733
15669
|
ref_key: "leftHead",
|
|
15734
15670
|
ref: leftHead,
|
|
15735
15671
|
data: __props.columns.slice(0, Number(props.fixLeft)),
|
|
15736
|
-
onChange: checkedAllChange
|
|
15672
|
+
onChange: checkedAllChange,
|
|
15673
|
+
onSort: sortChange
|
|
15737
15674
|
}, null, 8, ["data"]),
|
|
15738
|
-
createVNode(_sfc_main$
|
|
15675
|
+
createVNode(_sfc_main$G, {
|
|
15739
15676
|
ref_key: "leftBody",
|
|
15740
15677
|
ref: leftBody,
|
|
15741
15678
|
data: __props.data,
|
|
15742
15679
|
"column-data": __props.columns.slice(0, Number(props.fixLeft)),
|
|
15743
15680
|
onChange: change
|
|
15744
|
-
}, createSlots({
|
|
15681
|
+
}, createSlots({
|
|
15682
|
+
detail: withCtx((slotProps) => [
|
|
15683
|
+
renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(slotProps)))
|
|
15684
|
+
]),
|
|
15685
|
+
_: 2
|
|
15686
|
+
}, [
|
|
15745
15687
|
renderList(flattenColumns.value, (columnItem) => {
|
|
15746
15688
|
return {
|
|
15747
15689
|
name: columnItem.prop,
|
|
@@ -15764,11 +15706,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15764
15706
|
ref: leftTopTable,
|
|
15765
15707
|
class: "to-table-table"
|
|
15766
15708
|
}, [
|
|
15767
|
-
createVNode(_sfc_main$
|
|
15709
|
+
createVNode(_sfc_main$H, {
|
|
15768
15710
|
ref_key: "leftTopHead",
|
|
15769
15711
|
ref: leftTopHead,
|
|
15770
15712
|
data: __props.columns.slice(0, Number(props.fixLeft)),
|
|
15771
|
-
onChange: checkedAllChange
|
|
15713
|
+
onChange: checkedAllChange,
|
|
15714
|
+
onSort: sortChange
|
|
15772
15715
|
}, null, 8, ["data"])
|
|
15773
15716
|
], 512)
|
|
15774
15717
|
], 512)) : createCommentVNode("", true),
|
|
@@ -15783,19 +15726,25 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15783
15726
|
ref: rightTable,
|
|
15784
15727
|
class: "to-table-table"
|
|
15785
15728
|
}, [
|
|
15786
|
-
createVNode(_sfc_main$
|
|
15729
|
+
createVNode(_sfc_main$H, {
|
|
15787
15730
|
ref_key: "rightHead",
|
|
15788
15731
|
ref: rightHead,
|
|
15789
15732
|
data: __props.columns.slice(__props.columns.length - Number(props.fixRight), __props.columns.length),
|
|
15790
|
-
onChange: checkedAllChange
|
|
15733
|
+
onChange: checkedAllChange,
|
|
15734
|
+
onSort: sortChange
|
|
15791
15735
|
}, null, 8, ["data"]),
|
|
15792
|
-
createVNode(_sfc_main$
|
|
15736
|
+
createVNode(_sfc_main$G, {
|
|
15793
15737
|
ref_key: "rightBody",
|
|
15794
15738
|
ref: rightBody,
|
|
15795
15739
|
data: __props.data,
|
|
15796
15740
|
"column-data": __props.columns.slice(__props.columns.length - Number(__props.fixRight), __props.columns.length),
|
|
15797
15741
|
onChange: change
|
|
15798
|
-
}, createSlots({
|
|
15742
|
+
}, createSlots({
|
|
15743
|
+
detail: withCtx((slotProps) => [
|
|
15744
|
+
renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(slotProps)))
|
|
15745
|
+
]),
|
|
15746
|
+
_: 2
|
|
15747
|
+
}, [
|
|
15799
15748
|
renderList(flattenColumns.value, (columnItem) => {
|
|
15800
15749
|
return {
|
|
15801
15750
|
name: columnItem.prop,
|
|
@@ -15818,19 +15767,20 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
15818
15767
|
ref: rightTopTable,
|
|
15819
15768
|
class: "to-table-table"
|
|
15820
15769
|
}, [
|
|
15821
|
-
createVNode(_sfc_main$
|
|
15770
|
+
createVNode(_sfc_main$H, {
|
|
15822
15771
|
ref_key: "rightTopHead",
|
|
15823
15772
|
ref: rightTopHead,
|
|
15824
|
-
data: __props.columns.slice(__props.columns.length - Number(
|
|
15825
|
-
onChange: checkedAllChange
|
|
15773
|
+
data: __props.columns.slice(__props.columns.length - Number(props.fixRight), __props.columns.length),
|
|
15774
|
+
onChange: checkedAllChange,
|
|
15775
|
+
onSort: sortChange
|
|
15826
15776
|
}, null, 8, ["data"])
|
|
15827
15777
|
], 512)
|
|
15828
15778
|
], 512)) : createCommentVNode("", true)
|
|
15829
|
-
],
|
|
15779
|
+
], 14, ["flex"]);
|
|
15830
15780
|
};
|
|
15831
15781
|
}
|
|
15832
15782
|
});
|
|
15833
|
-
const _sfc_main$
|
|
15783
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
15834
15784
|
...{
|
|
15835
15785
|
name: "ToTableConfig"
|
|
15836
15786
|
},
|
|
@@ -15993,11 +15943,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
15993
15943
|
};
|
|
15994
15944
|
}
|
|
15995
15945
|
});
|
|
15996
|
-
withInstall(_sfc_main$G);
|
|
15997
|
-
withInstall(_sfc_main$I);
|
|
15998
|
-
withInstall(_sfc_main$H);
|
|
15999
15946
|
withInstall(_sfc_main$F);
|
|
16000
|
-
|
|
15947
|
+
withInstall(_sfc_main$H);
|
|
15948
|
+
withInstall(_sfc_main$G);
|
|
15949
|
+
withInstall(_sfc_main$E);
|
|
15950
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
16001
15951
|
...{
|
|
16002
15952
|
name: "ToTag",
|
|
16003
15953
|
componentName: "ToTag"
|
|
@@ -16011,7 +15961,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
16011
15961
|
position: { default: "" },
|
|
16012
15962
|
link: { type: Boolean, default: false },
|
|
16013
15963
|
type: { default: "normal" },
|
|
16014
|
-
offset: { default: 0 }
|
|
15964
|
+
offset: { default: 0 },
|
|
15965
|
+
flex: { type: Boolean, default: false }
|
|
16015
15966
|
},
|
|
16016
15967
|
emits: ["remove", "beforeRemove"],
|
|
16017
15968
|
setup(__props, { emit: __emit }) {
|
|
@@ -16071,6 +16022,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
16071
16022
|
const _component_to_icon = resolveComponent("to-icon");
|
|
16072
16023
|
return openBlock(), createElementBlock("div", {
|
|
16073
16024
|
class: normalizeClass(["to-tag", setClass.value]),
|
|
16025
|
+
flex: __props.flex ? __props.flex : null,
|
|
16074
16026
|
style: normalizeStyle(setStyle.value)
|
|
16075
16027
|
}, [
|
|
16076
16028
|
createElementVNode("div", { class: "to-tag-wrapper" }, [
|
|
@@ -16092,15 +16044,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
16092
16044
|
onClick: withModifiers(removeHandle, ["stop"])
|
|
16093
16045
|
})) : createCommentVNode("", true)
|
|
16094
16046
|
])
|
|
16095
|
-
],
|
|
16047
|
+
], 14, ["flex"]);
|
|
16096
16048
|
};
|
|
16097
16049
|
}
|
|
16098
16050
|
});
|
|
16099
|
-
const ToTag = withInstall(_sfc_main$
|
|
16100
|
-
const _sfc_main$
|
|
16051
|
+
const ToTag = withInstall(_sfc_main$D);
|
|
16052
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
16101
16053
|
...{ name: "ToText" },
|
|
16102
16054
|
__name: "text",
|
|
16103
16055
|
props: {
|
|
16056
|
+
flex: { type: Boolean },
|
|
16104
16057
|
data: { default: "" },
|
|
16105
16058
|
indent: { default: 0 },
|
|
16106
16059
|
mode: { default: "" },
|
|
@@ -16209,8 +16162,6 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
16209
16162
|
return result;
|
|
16210
16163
|
});
|
|
16211
16164
|
return (_ctx, _cache) => {
|
|
16212
|
-
const _component_to_icon = resolveComponent("to-icon");
|
|
16213
|
-
const _directive_size = resolveDirective("size");
|
|
16214
16165
|
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(__props.link ? "a" : "span"), {
|
|
16215
16166
|
ref: "$el2",
|
|
16216
16167
|
href: __props.href ? __props.href : __props.link ? "javscript:void(0)" : "",
|
|
@@ -16219,7 +16170,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
16219
16170
|
}, {
|
|
16220
16171
|
default: withCtx(() => [
|
|
16221
16172
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
16222
|
-
props.icon ? (openBlock(), createBlock(
|
|
16173
|
+
props.icon ? (openBlock(), createBlock(unref(ToIcon), {
|
|
16223
16174
|
key: 0,
|
|
16224
16175
|
class: "to-text-icon",
|
|
16225
16176
|
value: props.icon
|
|
@@ -16234,13 +16185,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
16234
16185
|
]),
|
|
16235
16186
|
_: 3
|
|
16236
16187
|
}, 8, ["href", "class", "style"])), [
|
|
16237
|
-
[
|
|
16188
|
+
[unref(vSizeDirective), __props.size]
|
|
16238
16189
|
]);
|
|
16239
16190
|
};
|
|
16240
16191
|
}
|
|
16241
16192
|
});
|
|
16242
|
-
withInstall(_sfc_main$
|
|
16193
|
+
withInstall(_sfc_main$C);
|
|
16243
16194
|
const tipProps = {
|
|
16195
|
+
flex: Boolean,
|
|
16244
16196
|
// 图标
|
|
16245
16197
|
icon: { type: [String, Boolean], default: "info" },
|
|
16246
16198
|
// 显示内容
|
|
@@ -16273,7 +16225,7 @@ const tipProps = {
|
|
|
16273
16225
|
open: { type: Function, default: () => true }
|
|
16274
16226
|
};
|
|
16275
16227
|
const tipEmits = ["delete", "close", "remove"];
|
|
16276
|
-
const _sfc_main$
|
|
16228
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
16277
16229
|
...{
|
|
16278
16230
|
name: "ToTip"
|
|
16279
16231
|
},
|
|
@@ -16406,9 +16358,10 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
16406
16358
|
__expose({ open: open2, close: close2 });
|
|
16407
16359
|
return (_ctx, _cache) => {
|
|
16408
16360
|
return isShow.value || _ctx.position === "top" || _ctx.position === "center" ? (openBlock(), createElementBlock("div", {
|
|
16409
|
-
key:
|
|
16361
|
+
key: unref(langKey),
|
|
16410
16362
|
ref_key: "tipRef",
|
|
16411
16363
|
ref: tipRef,
|
|
16364
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
16412
16365
|
class: normalizeClass(["to-tip", setClass.value]),
|
|
16413
16366
|
onMouseenter: mouseEnterHandle,
|
|
16414
16367
|
onMouseleave: mouseLeaveHandle
|
|
@@ -16430,7 +16383,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
16430
16383
|
onClick: remove
|
|
16431
16384
|
}, {
|
|
16432
16385
|
default: withCtx(() => [
|
|
16433
|
-
createTextVNode("
|
|
16386
|
+
createTextVNode(toDisplayString(unref(t)("to.tip.dontShowAgain")), 1)
|
|
16434
16387
|
]),
|
|
16435
16388
|
_: 1
|
|
16436
16389
|
})) : createCommentVNode("", true),
|
|
@@ -16442,11 +16395,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
16442
16395
|
onClick: ($event) => colseAction()
|
|
16443
16396
|
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
16444
16397
|
])
|
|
16445
|
-
],
|
|
16398
|
+
], 42, ["flex"])) : createCommentVNode("", true);
|
|
16446
16399
|
};
|
|
16447
16400
|
}
|
|
16448
16401
|
});
|
|
16449
|
-
const ToTip = withInstall(_sfc_main$
|
|
16402
|
+
const ToTip = withInstall(_sfc_main$B);
|
|
16450
16403
|
function createTipInstance(app, ...args) {
|
|
16451
16404
|
if (args.length === 0)
|
|
16452
16405
|
return Promise.reject("无效的 tip 内容");
|
|
@@ -16516,7 +16469,7 @@ function createTipInstance(app, ...args) {
|
|
|
16516
16469
|
const container = document.createElement("div");
|
|
16517
16470
|
container.setAttribute("id", uuid);
|
|
16518
16471
|
body.appendChild(container);
|
|
16519
|
-
const vnode = createVNode(_sfc_main$
|
|
16472
|
+
const vnode = createVNode(_sfc_main$B, {
|
|
16520
16473
|
...options,
|
|
16521
16474
|
onClose: () => {
|
|
16522
16475
|
setTimeout(() => {
|
|
@@ -16583,6 +16536,7 @@ ToTip.install = (app) => {
|
|
|
16583
16536
|
app.config.globalProperties.$tip = tip;
|
|
16584
16537
|
};
|
|
16585
16538
|
const tooltipProps = {
|
|
16539
|
+
flex: Boolean,
|
|
16586
16540
|
position: {
|
|
16587
16541
|
type: String,
|
|
16588
16542
|
default: "auto"
|
|
@@ -16633,7 +16587,7 @@ const tooltipProps = {
|
|
|
16633
16587
|
}
|
|
16634
16588
|
};
|
|
16635
16589
|
const tooltipEmits = ["beforeOpen", "opened"];
|
|
16636
|
-
const _sfc_main$
|
|
16590
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
16637
16591
|
...{
|
|
16638
16592
|
name: "ToTooltip"
|
|
16639
16593
|
},
|
|
@@ -16944,6 +16898,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
16944
16898
|
key: 0,
|
|
16945
16899
|
ref_key: "tooltip",
|
|
16946
16900
|
ref: tooltip,
|
|
16901
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
16947
16902
|
class: normalizeClass(["to-tooltip", setClass.value]),
|
|
16948
16903
|
style: normalizeStyle(setStyle.value)
|
|
16949
16904
|
}, [
|
|
@@ -16961,16 +16916,17 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
16961
16916
|
renderSlot(_ctx.$slots, "default")
|
|
16962
16917
|
])
|
|
16963
16918
|
], 512)
|
|
16964
|
-
],
|
|
16919
|
+
], 14, ["flex"])) : createCommentVNode("", true);
|
|
16965
16920
|
};
|
|
16966
16921
|
}
|
|
16967
16922
|
});
|
|
16968
|
-
const ToTooltip = withInstall(_sfc_main$
|
|
16969
|
-
const _sfc_main$
|
|
16923
|
+
const ToTooltip = withInstall(_sfc_main$A);
|
|
16924
|
+
const _sfc_main$z = /* @__PURE__ */ Object.assign({
|
|
16970
16925
|
name: "ToSegment"
|
|
16971
16926
|
}, {
|
|
16972
16927
|
__name: "segment",
|
|
16973
16928
|
props: {
|
|
16929
|
+
flex: Boolean,
|
|
16974
16930
|
id: {
|
|
16975
16931
|
type: String,
|
|
16976
16932
|
default: ""
|
|
@@ -17445,6 +17401,8 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
|
|
|
17445
17401
|
return (_ctx, _cache) => {
|
|
17446
17402
|
return withDirectives((openBlock(), createElementBlock("span", {
|
|
17447
17403
|
id: __props.id,
|
|
17404
|
+
key: unref(langKey),
|
|
17405
|
+
flex: __props.flex ? __props.flex : null,
|
|
17448
17406
|
class: normalizeClass(["to-segment", setClass.value]),
|
|
17449
17407
|
style: normalizeStyle(setStyle.value)
|
|
17450
17408
|
}, [
|
|
@@ -17500,7 +17458,7 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
|
|
|
17500
17458
|
class: "to-box-tip"
|
|
17501
17459
|
}, [
|
|
17502
17460
|
errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
17503
|
-
createTextVNode("
|
|
17461
|
+
createTextVNode(toDisplayString(unref(t)("to.segment.selectError")) + " ", 1),
|
|
17504
17462
|
withDirectives(createVNode(unref(ToIcon), {
|
|
17505
17463
|
value: "help",
|
|
17506
17464
|
color: "danger",
|
|
@@ -17515,12 +17473,12 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
|
|
|
17515
17473
|
]
|
|
17516
17474
|
])
|
|
17517
17475
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
17518
|
-
createTextVNode("
|
|
17476
|
+
createTextVNode(toDisplayString(unref(t)("to.segment.required")), 1)
|
|
17519
17477
|
], 64))
|
|
17520
17478
|
])), [
|
|
17521
17479
|
[unref(vColorDirective), "danger"]
|
|
17522
17480
|
]) : createCommentVNode("", true)
|
|
17523
|
-
], 14, ["id"])), [
|
|
17481
|
+
], 14, ["id", "flex"])), [
|
|
17524
17482
|
[
|
|
17525
17483
|
unref(vDis),
|
|
17526
17484
|
iDisabled.value,
|
|
@@ -17532,7 +17490,7 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
|
|
|
17532
17490
|
};
|
|
17533
17491
|
}
|
|
17534
17492
|
});
|
|
17535
|
-
withInstall(_sfc_main$
|
|
17493
|
+
withInstall(_sfc_main$z);
|
|
17536
17494
|
const dialogProps = {
|
|
17537
17495
|
closable: { type: Boolean, default: true },
|
|
17538
17496
|
draggable: { type: Boolean, default: false },
|
|
@@ -17551,10 +17509,11 @@ const dialogProps = {
|
|
|
17551
17509
|
afterOpen: { type: Function, default: () => {
|
|
17552
17510
|
} },
|
|
17553
17511
|
afterClose: { type: Function, default: () => {
|
|
17554
|
-
} }
|
|
17512
|
+
} },
|
|
17513
|
+
flex: { type: Boolean, default: false }
|
|
17555
17514
|
};
|
|
17556
17515
|
const dialogEmits = ["update:modelValue", "beforeOpen", "opened", "beforeClose", "closed", "close-button-click"];
|
|
17557
|
-
const _sfc_main$
|
|
17516
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
17558
17517
|
...{
|
|
17559
17518
|
name: "ToDialog"
|
|
17560
17519
|
},
|
|
@@ -17761,6 +17720,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
17761
17720
|
const _component_to_icon = resolveComponent("to-icon");
|
|
17762
17721
|
return (_ctx.lazy ? _ctx.modelValue : true) ? (openBlock(), createElementBlock("div", {
|
|
17763
17722
|
key: 0,
|
|
17723
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
17764
17724
|
class: normalizeClass(["to-dialog", setClass.value]),
|
|
17765
17725
|
style: normalizeStyle(setStyle.value),
|
|
17766
17726
|
onClick: withModifiers(blur, ["stop"])
|
|
@@ -17814,17 +17774,18 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
17814
17774
|
onClick: closeHandele
|
|
17815
17775
|
})) : createCommentVNode("", true)
|
|
17816
17776
|
], 8, ["onClick"])
|
|
17817
|
-
],
|
|
17777
|
+
], 14, ["flex"])) : createCommentVNode("", true);
|
|
17818
17778
|
};
|
|
17819
17779
|
}
|
|
17820
17780
|
});
|
|
17821
|
-
withInstall(_sfc_main$
|
|
17822
|
-
const _sfc_main$
|
|
17781
|
+
withInstall(_sfc_main$y);
|
|
17782
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
17823
17783
|
...{
|
|
17824
17784
|
name: "ToEllipsis"
|
|
17825
17785
|
},
|
|
17826
17786
|
__name: "Ellipsis",
|
|
17827
17787
|
props: {
|
|
17788
|
+
flex: Boolean,
|
|
17828
17789
|
breakWord: Boolean,
|
|
17829
17790
|
width: { type: [Number, String], default: "" },
|
|
17830
17791
|
row: { type: [Number, String], default: 1 },
|
|
@@ -17835,8 +17796,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17835
17796
|
unfoldable: Boolean,
|
|
17836
17797
|
clear: Boolean,
|
|
17837
17798
|
tip: Boolean,
|
|
17838
|
-
foldText: { type: String, default: "
|
|
17839
|
-
unfoldText: { type: String, default: "
|
|
17799
|
+
foldText: { type: String, default: "" },
|
|
17800
|
+
unfoldText: { type: String, default: "" }
|
|
17840
17801
|
},
|
|
17841
17802
|
setup(__props, { expose: __expose }) {
|
|
17842
17803
|
const props = __props;
|
|
@@ -17962,6 +17923,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17962
17923
|
});
|
|
17963
17924
|
return (_ctx, _cache) => {
|
|
17964
17925
|
return openBlock(), createElementBlock("span", {
|
|
17926
|
+
key: unref(langKey),
|
|
17927
|
+
flex: __props.flex ? __props.flex : null,
|
|
17965
17928
|
class: normalizeClass(["to-ellipsis", setClass.value]),
|
|
17966
17929
|
style: normalizeStyle(setStyle.value)
|
|
17967
17930
|
}, [
|
|
@@ -17994,20 +17957,20 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17994
17957
|
key: 1,
|
|
17995
17958
|
href: "javascript:void(0)",
|
|
17996
17959
|
onClick: toggle
|
|
17997
|
-
}, toDisplayString(__props.foldText), 1)) : createCommentVNode("", true),
|
|
17960
|
+
}, toDisplayString(__props.foldText || unref(t)("to.ellipsis.collapse")), 1)) : createCommentVNode("", true),
|
|
17998
17961
|
!isFold.value && __props.foldable ? (openBlock(), createElementBlock("a", {
|
|
17999
17962
|
key: 2,
|
|
18000
17963
|
href: "javascript:void(0)",
|
|
18001
17964
|
onClick: toggle
|
|
18002
|
-
}, toDisplayString(__props.unfoldText), 1)) : createCommentVNode("", true)
|
|
17965
|
+
}, toDisplayString(__props.unfoldText || unref(t)("to.ellipsis.expand")), 1)) : createCommentVNode("", true)
|
|
18003
17966
|
])) : createCommentVNode("", true)
|
|
18004
|
-
],
|
|
17967
|
+
], 14, ["flex"]);
|
|
18005
17968
|
};
|
|
18006
17969
|
}
|
|
18007
17970
|
});
|
|
18008
|
-
withInstall(_sfc_main$
|
|
17971
|
+
withInstall(_sfc_main$x);
|
|
18009
17972
|
const DRAG_THRESHOLD = 5;
|
|
18010
|
-
const _sfc_main$
|
|
17973
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
18011
17974
|
...{
|
|
18012
17975
|
name: "ToFix"
|
|
18013
17976
|
},
|
|
@@ -18261,7 +18224,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
18261
18224
|
};
|
|
18262
18225
|
}
|
|
18263
18226
|
});
|
|
18264
|
-
withInstall(_sfc_main$
|
|
18227
|
+
withInstall(_sfc_main$w);
|
|
18265
18228
|
const floatProps = {
|
|
18266
18229
|
slide: { type: Boolean, default: false },
|
|
18267
18230
|
lazy: { type: Boolean, default: true },
|
|
@@ -18284,7 +18247,7 @@ const floatProps = {
|
|
|
18284
18247
|
global: { type: Boolean, default: true }
|
|
18285
18248
|
};
|
|
18286
18249
|
const floatEmits = ["click", "mouseenter", "mouseleave", "beforeOpen", "opened", "beforeClose", "closed"];
|
|
18287
|
-
const _sfc_main$
|
|
18250
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
18288
18251
|
...{
|
|
18289
18252
|
name: "ToFloat",
|
|
18290
18253
|
inheritAttrs: false
|
|
@@ -18836,7 +18799,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
18836
18799
|
};
|
|
18837
18800
|
}
|
|
18838
18801
|
});
|
|
18839
|
-
const ToFloat = withInstall(_sfc_main$
|
|
18802
|
+
const ToFloat = withInstall(_sfc_main$v);
|
|
18840
18803
|
const picProps = {
|
|
18841
18804
|
/**
|
|
18842
18805
|
* 图片链接
|
|
@@ -18904,9 +18867,10 @@ const picProps = {
|
|
|
18904
18867
|
link: {
|
|
18905
18868
|
type: Boolean,
|
|
18906
18869
|
default: false
|
|
18907
|
-
}
|
|
18870
|
+
},
|
|
18871
|
+
flex: Boolean
|
|
18908
18872
|
};
|
|
18909
|
-
const _sfc_main$
|
|
18873
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
18910
18874
|
__name: "PicViewer",
|
|
18911
18875
|
props: {
|
|
18912
18876
|
urlList: { default: () => [] },
|
|
@@ -18940,30 +18904,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
18940
18904
|
const isFirefox = () => {
|
|
18941
18905
|
return navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
|
|
18942
18906
|
};
|
|
18943
|
-
const useLocale = () => {
|
|
18944
|
-
const t22 = (key) => {
|
|
18945
|
-
const translations = {
|
|
18946
|
-
"to.pic.viewer.full": "全屏",
|
|
18947
|
-
"to.pic.viewer.restore": "还原",
|
|
18948
|
-
"pic.tip.error.load": "加载失败"
|
|
18949
|
-
};
|
|
18950
|
-
return translations[key] || key;
|
|
18951
|
-
};
|
|
18952
|
-
return { t: t22 };
|
|
18953
|
-
};
|
|
18954
18907
|
const ModeEnum = {
|
|
18955
18908
|
CONTAIN: {
|
|
18956
|
-
name: "contain"
|
|
18957
|
-
icon: "el-icon-full-screen"
|
|
18909
|
+
name: "contain"
|
|
18958
18910
|
},
|
|
18959
18911
|
ORIGINAL: {
|
|
18960
|
-
name: "original"
|
|
18961
|
-
icon: "el-icon-c-scale-to-original"
|
|
18912
|
+
name: "original"
|
|
18962
18913
|
}
|
|
18963
18914
|
};
|
|
18964
18915
|
const mousewheelEventName = isFirefox() ? "DOMMouseScroll" : "mousewheel";
|
|
18965
18916
|
const props = __props;
|
|
18966
|
-
const { t: t2 } = useLocale();
|
|
18967
18917
|
const viewer = ref();
|
|
18968
18918
|
const img = ref();
|
|
18969
18919
|
const index = ref(props.initialIndex);
|
|
@@ -19049,6 +18999,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
19049
18999
|
}
|
|
19050
19000
|
};
|
|
19051
19001
|
_mouseWheelHandler = rafThrottle((e) => {
|
|
19002
|
+
e.preventDefault();
|
|
19052
19003
|
const delta = e.deltaY ? -e.deltaY : e.wheelDelta ? e.wheelDelta : -e.detail;
|
|
19053
19004
|
if (delta > 0) {
|
|
19054
19005
|
handleActions("zoomIn", {
|
|
@@ -19080,7 +19031,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
19080
19031
|
};
|
|
19081
19032
|
const handleImgError = (e) => {
|
|
19082
19033
|
loading.value = false;
|
|
19083
|
-
e.target.alt =
|
|
19034
|
+
e.target.alt = t("pic.tip.error.load");
|
|
19084
19035
|
};
|
|
19085
19036
|
const handleMouseDown = (e) => {
|
|
19086
19037
|
if (loading.value || !e.touches && e.button !== 0)
|
|
@@ -19176,7 +19127,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
19176
19127
|
(_a2 = viewer.value) == null ? void 0 : _a2.focus();
|
|
19177
19128
|
});
|
|
19178
19129
|
return (_ctx, _cache) => {
|
|
19179
|
-
return openBlock(), createBlock(Transition, {
|
|
19130
|
+
return openBlock(), createBlock(Transition, {
|
|
19131
|
+
key: unref(langKey),
|
|
19132
|
+
name: "viewer-fade"
|
|
19133
|
+
}, {
|
|
19180
19134
|
default: withCtx(() => [
|
|
19181
19135
|
(openBlock(), createElementBlock("div", {
|
|
19182
19136
|
key: 0,
|
|
@@ -19230,7 +19184,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
19230
19184
|
onClick: ($event) => toggleMode()
|
|
19231
19185
|
}, {
|
|
19232
19186
|
default: withCtx(() => [
|
|
19233
|
-
createTextVNode(toDisplayString(mode.value.name === "contain" ? unref(
|
|
19187
|
+
createTextVNode(toDisplayString(mode.value.name === "contain" ? unref(t)("to.pic.viewer.full") : unref(t)("to.pic.viewer.restore")), 1)
|
|
19234
19188
|
]),
|
|
19235
19189
|
_: 1
|
|
19236
19190
|
}, 8, ["onClick"]),
|
|
@@ -19268,7 +19222,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
19268
19222
|
};
|
|
19269
19223
|
}
|
|
19270
19224
|
});
|
|
19271
|
-
const _sfc_main$
|
|
19225
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
19272
19226
|
...{
|
|
19273
19227
|
name: "ToPic"
|
|
19274
19228
|
},
|
|
@@ -19346,6 +19300,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
19346
19300
|
};
|
|
19347
19301
|
return (_ctx, _cache) => {
|
|
19348
19302
|
return openBlock(), createElementBlock("span", {
|
|
19303
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
19349
19304
|
class: normalizeClass(["to-pic", setClass.value]),
|
|
19350
19305
|
style: normalizeStyle(setStyle.value)
|
|
19351
19306
|
}, [
|
|
@@ -19356,7 +19311,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
19356
19311
|
onClick: clickHandler
|
|
19357
19312
|
}, null, 8, ["src", "alt"]),
|
|
19358
19313
|
preview.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
19359
|
-
showViewer.value ? (openBlock(), createBlock(_sfc_main$
|
|
19314
|
+
showViewer.value ? (openBlock(), createBlock(_sfc_main$u, {
|
|
19360
19315
|
key: 0,
|
|
19361
19316
|
"mask-closable": true,
|
|
19362
19317
|
"z-index": _ctx.zIndex,
|
|
@@ -19365,11 +19320,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
19365
19320
|
"url-list": _ctx.previews
|
|
19366
19321
|
}, null, 8, ["z-index", "initial-index", "url-list"])) : createCommentVNode("", true)
|
|
19367
19322
|
], 64)) : createCommentVNode("", true)
|
|
19368
|
-
],
|
|
19323
|
+
], 14, ["flex"]);
|
|
19369
19324
|
};
|
|
19370
19325
|
}
|
|
19371
19326
|
});
|
|
19372
|
-
withInstall(_sfc_main$
|
|
19327
|
+
withInstall(_sfc_main$t, [_sfc_main$u]);
|
|
19373
19328
|
const paramProps = {
|
|
19374
19329
|
data: {
|
|
19375
19330
|
type: [Array, String],
|
|
@@ -19419,7 +19374,8 @@ const paramProps = {
|
|
|
19419
19374
|
tip: {
|
|
19420
19375
|
type: Boolean,
|
|
19421
19376
|
default: false
|
|
19422
|
-
}
|
|
19377
|
+
},
|
|
19378
|
+
flex: Boolean
|
|
19423
19379
|
};
|
|
19424
19380
|
const paramItemProps = {
|
|
19425
19381
|
label: {
|
|
@@ -19444,7 +19400,7 @@ const paramItemProps = {
|
|
|
19444
19400
|
},
|
|
19445
19401
|
wrap: Boolean
|
|
19446
19402
|
};
|
|
19447
|
-
const _sfc_main$
|
|
19403
|
+
const _sfc_main$s = /* @__PURE__ */ Object.assign({
|
|
19448
19404
|
name: "ToParamItem"
|
|
19449
19405
|
}, {
|
|
19450
19406
|
__name: "ParamItem",
|
|
@@ -19508,7 +19464,7 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({
|
|
|
19508
19464
|
};
|
|
19509
19465
|
}
|
|
19510
19466
|
});
|
|
19511
|
-
const _sfc_main$
|
|
19467
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
19512
19468
|
...{
|
|
19513
19469
|
name: "ToParam"
|
|
19514
19470
|
},
|
|
@@ -19637,12 +19593,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
19637
19593
|
return openBlock(), createElementBlock("div", {
|
|
19638
19594
|
ref_key: "paramRef",
|
|
19639
19595
|
ref: paramRef,
|
|
19596
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
19640
19597
|
class: normalizeClass(["to-param", setClass.value])
|
|
19641
19598
|
}, [
|
|
19642
19599
|
createElementVNode("div", { class: "to-param-list" }, [
|
|
19643
19600
|
(openBlock(true), createElementBlock(Fragment, null, renderList(rowData.value, (item, index) => {
|
|
19644
19601
|
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
19645
|
-
createVNode(_sfc_main$
|
|
19602
|
+
createVNode(_sfc_main$s, {
|
|
19646
19603
|
label: item.label,
|
|
19647
19604
|
value: item.value,
|
|
19648
19605
|
class: normalizeClass([item.merge ? "merge-" + item.merge : ""]),
|
|
@@ -19670,14 +19627,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
19670
19627
|
], 64);
|
|
19671
19628
|
}), 128))
|
|
19672
19629
|
])
|
|
19673
|
-
],
|
|
19630
|
+
], 10, ["flex"]);
|
|
19674
19631
|
};
|
|
19675
19632
|
}
|
|
19676
19633
|
});
|
|
19677
|
-
withInstall(_sfc_main$
|
|
19678
|
-
const _sfc_main$
|
|
19634
|
+
withInstall(_sfc_main$r, [_sfc_main$s]);
|
|
19635
|
+
const _sfc_main$q = defineComponent({
|
|
19679
19636
|
name: "ToProgress",
|
|
19680
19637
|
props: {
|
|
19638
|
+
flex: Boolean,
|
|
19681
19639
|
// 类型:normal 或 loading
|
|
19682
19640
|
type: {
|
|
19683
19641
|
type: String,
|
|
@@ -19932,6 +19890,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
19932
19890
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19933
19891
|
return openBlock(), createElementBlock("span", {
|
|
19934
19892
|
ref: "elRef",
|
|
19893
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
19935
19894
|
class: normalizeClass(["to-progress", _ctx.setClass]),
|
|
19936
19895
|
style: normalizeStyle(_ctx.setStyle)
|
|
19937
19896
|
}, [
|
|
@@ -19990,11 +19949,12 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19990
19949
|
style: normalizeStyle(_ctx.setTextStyle)
|
|
19991
19950
|
}, toDisplayString(_ctx.textValue), 5)) : createCommentVNode("", true)
|
|
19992
19951
|
], 64))
|
|
19993
|
-
],
|
|
19952
|
+
], 14, ["flex"]);
|
|
19994
19953
|
}
|
|
19995
|
-
const Progress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19954
|
+
const Progress = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$3]]);
|
|
19996
19955
|
withInstall(Progress);
|
|
19997
19956
|
const scrollProps = {
|
|
19957
|
+
flex: Boolean,
|
|
19998
19958
|
/**
|
|
19999
19959
|
* 是否使用模拟滚动条
|
|
20000
19960
|
*/
|
|
@@ -20088,7 +20048,7 @@ const scrollProps = {
|
|
|
20088
20048
|
default: ""
|
|
20089
20049
|
}
|
|
20090
20050
|
};
|
|
20091
|
-
const _sfc_main$
|
|
20051
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
20092
20052
|
...{
|
|
20093
20053
|
name: "ToScroll"
|
|
20094
20054
|
},
|
|
@@ -20582,6 +20542,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
20582
20542
|
return (_ctx, _cache) => {
|
|
20583
20543
|
return openBlock(), createElementBlock("div", {
|
|
20584
20544
|
class: normalizeClass(["to-scroll", setClass.value]),
|
|
20545
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
20585
20546
|
style: normalizeStyle(setStyle.value)
|
|
20586
20547
|
}, [
|
|
20587
20548
|
props.virtual ? (openBlock(), createElementBlock("div", {
|
|
@@ -20617,7 +20578,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
20617
20578
|
}, [
|
|
20618
20579
|
renderSlot(_ctx.$slots, "default")
|
|
20619
20580
|
], 38)
|
|
20620
|
-
],
|
|
20581
|
+
], 14, ["flex"]);
|
|
20621
20582
|
};
|
|
20622
20583
|
}
|
|
20623
20584
|
});
|
|
@@ -20630,7 +20591,7 @@ const scrollPointProps = {
|
|
|
20630
20591
|
default: ""
|
|
20631
20592
|
}
|
|
20632
20593
|
};
|
|
20633
|
-
const _sfc_main$
|
|
20594
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
20634
20595
|
...{
|
|
20635
20596
|
name: "ToScrollPoint"
|
|
20636
20597
|
},
|
|
@@ -20695,87 +20656,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
20695
20656
|
};
|
|
20696
20657
|
}
|
|
20697
20658
|
});
|
|
20698
|
-
const ToScroll = withInstall(_sfc_main$
|
|
20699
|
-
withInstall(_sfc_main$
|
|
20700
|
-
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
20701
|
-
...{
|
|
20702
|
-
name: "ToSubmit"
|
|
20703
|
-
},
|
|
20704
|
-
__name: "submit",
|
|
20705
|
-
props: {
|
|
20706
|
-
width: { default: "" },
|
|
20707
|
-
space: { default: 2 },
|
|
20708
|
-
padding: { default: 0 },
|
|
20709
|
-
paddingX: { default: 0 },
|
|
20710
|
-
paddingY: { default: 0 },
|
|
20711
|
-
position: { default: "" }
|
|
20712
|
-
},
|
|
20713
|
-
setup(__props) {
|
|
20714
|
-
const props = __props;
|
|
20715
|
-
const setClass = computed(() => {
|
|
20716
|
-
let arr = [];
|
|
20717
|
-
if (props.width && typeof props.width === "string") {
|
|
20718
|
-
arr.push(`to-submit-width-${props.width}`);
|
|
20719
|
-
}
|
|
20720
|
-
if (props.position) {
|
|
20721
|
-
arr.push(`to-submit-position-${props.position}`);
|
|
20722
|
-
}
|
|
20723
|
-
arr.push(`to-submit-space-${props.space}`);
|
|
20724
|
-
return arr;
|
|
20725
|
-
});
|
|
20726
|
-
const setStyle = computed(() => {
|
|
20727
|
-
const obj = {};
|
|
20728
|
-
if (props.width !== "auto" && props.width !== "full" && props.width !== "normal") {
|
|
20729
|
-
if (typeof props.width === "number") {
|
|
20730
|
-
obj.width = props.width + "em";
|
|
20731
|
-
} else {
|
|
20732
|
-
obj.width = props.width;
|
|
20733
|
-
}
|
|
20734
|
-
}
|
|
20735
|
-
if (!props.paddingX && !props.paddingY) {
|
|
20736
|
-
if (props.padding && String(props.padding).includes(" ")) {
|
|
20737
|
-
const paddings = String(props.padding).split(" ");
|
|
20738
|
-
let arr = [];
|
|
20739
|
-
paddings.map((item) => {
|
|
20740
|
-
if (isNaN(Number(item))) {
|
|
20741
|
-
arr.push(item);
|
|
20742
|
-
} else {
|
|
20743
|
-
arr.push(item + "em");
|
|
20744
|
-
}
|
|
20745
|
-
});
|
|
20746
|
-
obj.padding = arr.join(" ");
|
|
20747
|
-
} else {
|
|
20748
|
-
let padding = 0;
|
|
20749
|
-
if (props.padding === "" || props.padding === 0) {
|
|
20750
|
-
padding = 1.5;
|
|
20751
|
-
} else {
|
|
20752
|
-
padding = Number(props.padding);
|
|
20753
|
-
}
|
|
20754
|
-
obj.padding = padding + "em";
|
|
20755
|
-
}
|
|
20756
|
-
} else {
|
|
20757
|
-
if (props.paddingX) {
|
|
20758
|
-
obj.paddingLeft = isNaN(Number(props.paddingX)) ? String(props.paddingX) : props.paddingX + "em";
|
|
20759
|
-
obj.paddingRight = isNaN(Number(props.paddingX)) ? String(props.paddingX) : props.paddingX + "em";
|
|
20760
|
-
}
|
|
20761
|
-
if (props.paddingY) {
|
|
20762
|
-
obj.paddingTop = isNaN(Number(props.paddingY)) ? String(props.paddingY) : props.paddingY + "em";
|
|
20763
|
-
obj.paddingBottom = isNaN(Number(props.paddingY)) ? String(props.paddingY) : props.paddingY + "em";
|
|
20764
|
-
}
|
|
20765
|
-
}
|
|
20766
|
-
return obj;
|
|
20767
|
-
});
|
|
20768
|
-
return (_ctx, _cache) => {
|
|
20769
|
-
return openBlock(), createElementBlock("div", {
|
|
20770
|
-
class: normalizeClass(["to-submit", setClass.value]),
|
|
20771
|
-
style: normalizeStyle(setStyle.value)
|
|
20772
|
-
}, [
|
|
20773
|
-
renderSlot(_ctx.$slots, "default")
|
|
20774
|
-
], 6);
|
|
20775
|
-
};
|
|
20776
|
-
}
|
|
20777
|
-
});
|
|
20778
|
-
const ToSubmit = withInstall(_sfc_main$o);
|
|
20659
|
+
const ToScroll = withInstall(_sfc_main$p);
|
|
20660
|
+
withInstall(_sfc_main$o);
|
|
20779
20661
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
20780
20662
|
...{
|
|
20781
20663
|
name: "ToSlide"
|
|
@@ -20785,7 +20667,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
20785
20667
|
mode: { default: "default" },
|
|
20786
20668
|
autoplay: { type: Boolean, default: false },
|
|
20787
20669
|
speed: { default: 2e3 },
|
|
20788
|
-
pagerPosition: { default: "" }
|
|
20670
|
+
pagerPosition: { default: "" },
|
|
20671
|
+
flex: { type: Boolean, default: false }
|
|
20789
20672
|
},
|
|
20790
20673
|
setup(__props, { expose: __expose }) {
|
|
20791
20674
|
const props = __props;
|
|
@@ -20817,10 +20700,6 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
20817
20700
|
if (props.mode) {
|
|
20818
20701
|
arr.push(`mode-${props.mode}`);
|
|
20819
20702
|
}
|
|
20820
|
-
return arr;
|
|
20821
|
-
});
|
|
20822
|
-
const setPageClass = computed(() => {
|
|
20823
|
-
let arr = [];
|
|
20824
20703
|
if (props.pagerPosition === "outer") {
|
|
20825
20704
|
arr.push(`is-outer`);
|
|
20826
20705
|
}
|
|
@@ -20920,9 +20799,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
20920
20799
|
adjust
|
|
20921
20800
|
});
|
|
20922
20801
|
return (_ctx, _cache) => {
|
|
20802
|
+
const _component_to_icon = resolveComponent("to-icon");
|
|
20923
20803
|
return openBlock(), createElementBlock("div", {
|
|
20924
20804
|
ref_key: "slide",
|
|
20925
20805
|
ref: slide,
|
|
20806
|
+
flex: __props.flex ? __props.flex : null,
|
|
20926
20807
|
class: normalizeClass(["to-slide", setClass.value]),
|
|
20927
20808
|
onMouseover: pause,
|
|
20928
20809
|
onMouseout: play,
|
|
@@ -20932,46 +20813,54 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
20932
20813
|
}, [
|
|
20933
20814
|
createElementVNode("div", { class: "to-slide-pic" }, [
|
|
20934
20815
|
createElementVNode("ul", {
|
|
20935
|
-
|
|
20816
|
+
ref_key: "ul",
|
|
20817
|
+
ref: ul,
|
|
20818
|
+
class: "to-slide-wrapper",
|
|
20936
20819
|
style: normalizeStyle(setUlStyle.value)
|
|
20937
20820
|
}, [
|
|
20938
20821
|
createElementVNode("li", {
|
|
20939
20822
|
ref_key: "firstFake",
|
|
20940
|
-
ref: firstFake
|
|
20823
|
+
ref: firstFake,
|
|
20824
|
+
class: "to-slide-item"
|
|
20941
20825
|
}, null, 512),
|
|
20942
20826
|
renderSlot(_ctx.$slots, "default"),
|
|
20943
20827
|
createElementVNode("li", {
|
|
20944
20828
|
ref_key: "lastFake",
|
|
20945
|
-
ref: lastFake
|
|
20829
|
+
ref: lastFake,
|
|
20830
|
+
class: "to-slide-item"
|
|
20946
20831
|
}, null, 512)
|
|
20947
20832
|
], 4)
|
|
20948
20833
|
]),
|
|
20949
20834
|
length.value > 1 ? (openBlock(), createElementBlock("div", {
|
|
20950
20835
|
key: 0,
|
|
20951
|
-
class: "fn"
|
|
20836
|
+
class: "to-slide-fn"
|
|
20952
20837
|
}, [
|
|
20953
|
-
|
|
20954
|
-
|
|
20838
|
+
createVNode(_component_to_icon, {
|
|
20839
|
+
value: "back",
|
|
20840
|
+
link: "",
|
|
20841
|
+
class: "to-slide-fn-item type-prev",
|
|
20955
20842
|
onClick: ($event) => prev()
|
|
20956
20843
|
}, null, 8, ["onClick"]),
|
|
20957
|
-
|
|
20958
|
-
|
|
20844
|
+
createVNode(_component_to_icon, {
|
|
20845
|
+
value: "next",
|
|
20846
|
+
link: "",
|
|
20847
|
+
class: "to-slide-fn-item type-next",
|
|
20959
20848
|
onClick: ($event) => next()
|
|
20960
20849
|
}, null, 8, ["onClick"])
|
|
20961
20850
|
])) : createCommentVNode("", true),
|
|
20962
20851
|
length.value > 1 ? (openBlock(), createElementBlock("div", {
|
|
20963
20852
|
key: 1,
|
|
20964
|
-
class:
|
|
20853
|
+
class: "to-slide-page"
|
|
20965
20854
|
}, [
|
|
20966
20855
|
(openBlock(true), createElementBlock(Fragment, null, renderList(length.value, (index) => {
|
|
20967
20856
|
return openBlock(), createElementBlock("span", {
|
|
20968
20857
|
key: index,
|
|
20969
|
-
class: normalizeClass({ on: index === current.value + 1 }),
|
|
20858
|
+
class: normalizeClass(["to-slide-page-item", { "is-on": index === current.value + 1 }]),
|
|
20970
20859
|
onClick: ($event) => to(index - 1)
|
|
20971
20860
|
}, null, 10, ["onClick"]);
|
|
20972
20861
|
}), 128))
|
|
20973
|
-
]
|
|
20974
|
-
],
|
|
20862
|
+
])) : createCommentVNode("", true)
|
|
20863
|
+
], 42, ["flex"]);
|
|
20975
20864
|
};
|
|
20976
20865
|
}
|
|
20977
20866
|
});
|
|
@@ -20997,6 +20886,13 @@ const breadcrumbProps = {
|
|
|
20997
20886
|
mode: {
|
|
20998
20887
|
type: String,
|
|
20999
20888
|
default: "default"
|
|
20889
|
+
},
|
|
20890
|
+
/**
|
|
20891
|
+
* 是否启用 flex 布局
|
|
20892
|
+
*/
|
|
20893
|
+
flex: {
|
|
20894
|
+
type: Boolean,
|
|
20895
|
+
default: false
|
|
21000
20896
|
}
|
|
21001
20897
|
};
|
|
21002
20898
|
const _sfc_main$m = defineComponent({
|
|
@@ -21013,10 +20909,11 @@ const _sfc_main$m = defineComponent({
|
|
|
21013
20909
|
});
|
|
21014
20910
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
21015
20911
|
return openBlock(), createElementBlock("div", {
|
|
20912
|
+
flex: _ctx.flex ? _ctx.flex : null,
|
|
21016
20913
|
class: normalizeClass(["to-breadcrumb", [`is-${_ctx.mode}`]])
|
|
21017
20914
|
}, [
|
|
21018
20915
|
renderSlot(_ctx.$slots, "default")
|
|
21019
|
-
],
|
|
20916
|
+
], 10, ["flex"]);
|
|
21020
20917
|
}
|
|
21021
20918
|
const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$2]]);
|
|
21022
20919
|
const breadcrumbItemProps = {
|
|
@@ -21265,6 +21162,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21265
21162
|
},
|
|
21266
21163
|
__name: "tree",
|
|
21267
21164
|
props: {
|
|
21165
|
+
flex: { type: Boolean },
|
|
21268
21166
|
mode: { default: "default" },
|
|
21269
21167
|
expand: { type: Boolean, default: false },
|
|
21270
21168
|
data: { default: () => [] },
|
|
@@ -21278,7 +21176,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21278
21176
|
childrenText: { default: "children" },
|
|
21279
21177
|
valueText: { default: "value" },
|
|
21280
21178
|
labelText: { default: "label" },
|
|
21281
|
-
emptyText: { default: "
|
|
21179
|
+
emptyText: { default: "" },
|
|
21282
21180
|
load: { type: Function, default: null },
|
|
21283
21181
|
parentSelectable: { type: Boolean, default: false },
|
|
21284
21182
|
filterNodeMethod: { type: Function, default: null }
|
|
@@ -21697,6 +21595,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21697
21595
|
});
|
|
21698
21596
|
return (_ctx, _cache) => {
|
|
21699
21597
|
return openBlock(), createElementBlock("div", {
|
|
21598
|
+
key: unref(langKey),
|
|
21599
|
+
flex: __props.flex ? __props.flex : null,
|
|
21700
21600
|
class: normalizeClass(["to-tree", setClass.value])
|
|
21701
21601
|
}, [
|
|
21702
21602
|
filterStore.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filterStore.value, (item) => {
|
|
@@ -21715,8 +21615,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
21715
21615
|
}), 128)) : (openBlock(), createElementBlock("div", {
|
|
21716
21616
|
key: 1,
|
|
21717
21617
|
class: "to-tree-empty"
|
|
21718
|
-
}, toDisplayString(
|
|
21719
|
-
],
|
|
21618
|
+
}, toDisplayString(props.emptyText || unref(t)("to.tree.noData")), 1))
|
|
21619
|
+
], 10, ["flex"]);
|
|
21720
21620
|
};
|
|
21721
21621
|
}
|
|
21722
21622
|
});
|
|
@@ -21819,16 +21719,17 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
21819
21719
|
labelText: { default: "label" },
|
|
21820
21720
|
valueText: { default: "value" },
|
|
21821
21721
|
childrenText: { default: "children" },
|
|
21822
|
-
placeholder: { default: "
|
|
21722
|
+
placeholder: { default: "" },
|
|
21823
21723
|
optionWidth: { default: "16em" },
|
|
21824
21724
|
optionCol: { default: "" },
|
|
21825
21725
|
data: { default: () => [] },
|
|
21826
21726
|
comparable: { type: Boolean, default: false },
|
|
21827
21727
|
required: { type: Boolean, default: false },
|
|
21828
21728
|
desc: { default: "" },
|
|
21829
|
-
prefix: {},
|
|
21729
|
+
prefix: { default: "" },
|
|
21830
21730
|
showAllLevels: { type: Boolean, default: true },
|
|
21831
|
-
checkedDatas: { default: () => [] }
|
|
21731
|
+
checkedDatas: { default: () => [] },
|
|
21732
|
+
flex: { type: Boolean, default: false }
|
|
21832
21733
|
},
|
|
21833
21734
|
emits: ["change", "update:modelValue", "update:checkedDatas"],
|
|
21834
21735
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -22141,6 +22042,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
22141
22042
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
22142
22043
|
ref_key: "$el",
|
|
22143
22044
|
ref: $el,
|
|
22045
|
+
key: unref(langKey),
|
|
22046
|
+
flex: __props.flex ? __props.flex : null,
|
|
22144
22047
|
class: normalizeClass(["to-cascader", setClass.value]),
|
|
22145
22048
|
style: normalizeStyle(setStyle.value)
|
|
22146
22049
|
}, [
|
|
@@ -22173,7 +22076,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
22173
22076
|
value_.value ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(valueLabel.value), 1)) : (openBlock(), createElementBlock("span", {
|
|
22174
22077
|
key: 1,
|
|
22175
22078
|
class: "to-cascader-placeholder"
|
|
22176
|
-
}, toDisplayString(__props.placeholder), 1))
|
|
22079
|
+
}, toDisplayString(__props.placeholder || unref(t)("to.cascader.placeholder")), 1))
|
|
22177
22080
|
])
|
|
22178
22081
|
]),
|
|
22179
22082
|
__props.clearable && value_.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -22208,7 +22111,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
22208
22111
|
!data_.value.length ? (openBlock(), createElementBlock("div", {
|
|
22209
22112
|
key: 0,
|
|
22210
22113
|
style: { "text-align": "center", "color": "#ccc", "padding": "3em 0.3em" }
|
|
22211
|
-
}, "
|
|
22114
|
+
}, toDisplayString(unref(t)("to.cascader.noData")), 1)) : createCommentVNode("", true),
|
|
22212
22115
|
createVNode(_component_to_scroll, {
|
|
22213
22116
|
onClick: withModifiers(() => {
|
|
22214
22117
|
}, ["stop"])
|
|
@@ -22231,7 +22134,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
22231
22134
|
class: "to-box-tip"
|
|
22232
22135
|
}, [
|
|
22233
22136
|
errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
22234
|
-
createTextVNode("
|
|
22137
|
+
createTextVNode(toDisplayString(unref(t)("to.cascader.inputError")) + " ", 1),
|
|
22235
22138
|
withDirectives(createVNode(unref(ToIcon), {
|
|
22236
22139
|
style: { "height": "auto" },
|
|
22237
22140
|
value: "help",
|
|
@@ -22247,12 +22150,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
22247
22150
|
]
|
|
22248
22151
|
])
|
|
22249
22152
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
22250
|
-
createTextVNode("
|
|
22153
|
+
createTextVNode(toDisplayString(unref(t)("to.cascader.required")), 1)
|
|
22251
22154
|
], 64))
|
|
22252
22155
|
])), [
|
|
22253
22156
|
[_directive_color, "danger"]
|
|
22254
22157
|
]) : createCommentVNode("", true)
|
|
22255
|
-
],
|
|
22158
|
+
], 14, ["flex"])), [
|
|
22256
22159
|
[_directive_tip, changed.value ? unref(t)("to.common.originalValue", getLabelPath(valueStore.value[0], data_.value)) : ""]
|
|
22257
22160
|
]);
|
|
22258
22161
|
};
|
|
@@ -22356,7 +22259,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
22356
22259
|
mode: { default: "default" },
|
|
22357
22260
|
modeValue: { default: "" },
|
|
22358
22261
|
expand: { type: Boolean, default: false },
|
|
22359
|
-
accordion: { type: Boolean, default: false }
|
|
22262
|
+
accordion: { type: Boolean, default: false },
|
|
22263
|
+
flex: { type: Boolean, default: false }
|
|
22360
22264
|
},
|
|
22361
22265
|
emits: ["change", "update:modelValue"],
|
|
22362
22266
|
setup(__props, { emit: __emit }) {
|
|
@@ -22416,10 +22320,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
22416
22320
|
});
|
|
22417
22321
|
return (_ctx, _cache) => {
|
|
22418
22322
|
return openBlock(), createElementBlock("div", {
|
|
22419
|
-
class: normalizeClass(["to-collapse", setClass.value])
|
|
22323
|
+
class: normalizeClass(["to-collapse", setClass.value]),
|
|
22324
|
+
flex: __props.flex ? __props.flex : null
|
|
22420
22325
|
}, [
|
|
22421
22326
|
renderSlot(_ctx.$slots, "default")
|
|
22422
|
-
],
|
|
22327
|
+
], 10, ["flex"]);
|
|
22423
22328
|
};
|
|
22424
22329
|
}
|
|
22425
22330
|
});
|
|
@@ -22431,6 +22336,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
22431
22336
|
},
|
|
22432
22337
|
__name: "range",
|
|
22433
22338
|
props: {
|
|
22339
|
+
flex: { type: Boolean, default: false },
|
|
22434
22340
|
mode: { default: "default" },
|
|
22435
22341
|
modelValue: { default: 0 },
|
|
22436
22342
|
disabled: { type: Boolean, default: false },
|
|
@@ -22661,6 +22567,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
22661
22567
|
return (_ctx, _cache) => {
|
|
22662
22568
|
return openBlock(), createElementBlock("span", {
|
|
22663
22569
|
class: normalizeClass(["to-range", setClass.value]),
|
|
22570
|
+
flex: __props.flex ? __props.flex : null,
|
|
22664
22571
|
style: normalizeStyle(setStyle.value),
|
|
22665
22572
|
onTouchmove: ($event) => moveHandle($event),
|
|
22666
22573
|
onTouchend: ($event) => endHandle($event)
|
|
@@ -22700,7 +22607,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
22700
22607
|
width: __props.inputWidth,
|
|
22701
22608
|
dot: fixed.value
|
|
22702
22609
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "width", "dot"])) : createCommentVNode("", true)
|
|
22703
|
-
], 46, ["onTouchmove", "onTouchend"]);
|
|
22610
|
+
], 46, ["flex", "onTouchmove", "onTouchend"]);
|
|
22704
22611
|
};
|
|
22705
22612
|
}
|
|
22706
22613
|
});
|
|
@@ -22711,6 +22618,7 @@ const _sfc_main$d = defineComponent({
|
|
|
22711
22618
|
ToIcon
|
|
22712
22619
|
},
|
|
22713
22620
|
props: {
|
|
22621
|
+
flex: Boolean,
|
|
22714
22622
|
data: {
|
|
22715
22623
|
type: Array,
|
|
22716
22624
|
default: () => []
|
|
@@ -22837,7 +22745,8 @@ const _sfc_main$d = defineComponent({
|
|
|
22837
22745
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
22838
22746
|
const _component_to_icon = resolveComponent("to-icon");
|
|
22839
22747
|
return openBlock(), createElementBlock("div", {
|
|
22840
|
-
class: normalizeClass(["to-timeline", _ctx.getClass])
|
|
22748
|
+
class: normalizeClass(["to-timeline", _ctx.getClass]),
|
|
22749
|
+
flex: _ctx.flex ? _ctx.flex : null
|
|
22841
22750
|
}, [
|
|
22842
22751
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.displayItems, (item, index) => {
|
|
22843
22752
|
return openBlock(), createElementBlock("div", {
|
|
@@ -22912,7 +22821,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
22912
22821
|
})) : createCommentVNode("", true)
|
|
22913
22822
|
], 12, ["onClick"]);
|
|
22914
22823
|
}), 128))
|
|
22915
|
-
],
|
|
22824
|
+
], 10, ["flex"]);
|
|
22916
22825
|
}
|
|
22917
22826
|
const Timeline = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render]]);
|
|
22918
22827
|
withInstall(Timeline);
|
|
@@ -22943,15 +22852,6 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
22943
22852
|
const step = ref(0);
|
|
22944
22853
|
let timer = null;
|
|
22945
22854
|
const tooltipRef = ref(null);
|
|
22946
|
-
const t2 = (key) => {
|
|
22947
|
-
const map = {
|
|
22948
|
-
"to.guider.restart": "重新开始",
|
|
22949
|
-
"to.guider.finish": "完成",
|
|
22950
|
-
"to.guider.skip": "跳过",
|
|
22951
|
-
"to.guider.next": "下一步"
|
|
22952
|
-
};
|
|
22953
|
-
return map[key] || key;
|
|
22954
|
-
};
|
|
22955
22855
|
const setClass = computed(() => {
|
|
22956
22856
|
let arr = [];
|
|
22957
22857
|
if (props.mode) {
|
|
@@ -23081,6 +22981,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
23081
22981
|
const _component_to_button = resolveComponent("to-button");
|
|
23082
22982
|
const _component_to_tooltip = resolveComponent("to-tooltip");
|
|
23083
22983
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
22984
|
+
key: unref(langKey),
|
|
23084
22985
|
class: normalizeClass(["to-guider", setClass.value])
|
|
23085
22986
|
}, [
|
|
23086
22987
|
createElementVNode("div", {
|
|
@@ -23124,8 +23025,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
23124
23025
|
createVNode(_component_to_checkbox, {
|
|
23125
23026
|
modelValue: isNever.value,
|
|
23126
23027
|
"onUpdate:modelValue": ($event) => isNever.value = $event,
|
|
23127
|
-
label: "
|
|
23128
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
23028
|
+
label: unref(t)("to.guider.dontShowAgain")
|
|
23029
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
|
|
23129
23030
|
step.value + 1 === __props.data.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
23130
23031
|
createVNode(_component_to_button, {
|
|
23131
23032
|
fillet: "normal",
|
|
@@ -23134,7 +23035,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
23134
23035
|
onClick: handleRestart
|
|
23135
23036
|
}, {
|
|
23136
23037
|
default: withCtx(() => [
|
|
23137
|
-
createTextVNode(toDisplayString(
|
|
23038
|
+
createTextVNode(toDisplayString(unref(t)("to.guider.restart")), 1)
|
|
23138
23039
|
]),
|
|
23139
23040
|
_: 1
|
|
23140
23041
|
}),
|
|
@@ -23148,7 +23049,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
23148
23049
|
onClick: handleComplete
|
|
23149
23050
|
}, {
|
|
23150
23051
|
default: withCtx(() => [
|
|
23151
|
-
createTextVNode(toDisplayString(
|
|
23052
|
+
createTextVNode(toDisplayString(unref(t)("to.guider.finish")), 1)
|
|
23152
23053
|
]),
|
|
23153
23054
|
_: 1
|
|
23154
23055
|
})
|
|
@@ -23160,7 +23061,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
23160
23061
|
onClick: handleClose
|
|
23161
23062
|
}, {
|
|
23162
23063
|
default: withCtx(() => [
|
|
23163
|
-
createTextVNode(toDisplayString(
|
|
23064
|
+
createTextVNode(toDisplayString(unref(t)("to.guider.skip")), 1)
|
|
23164
23065
|
]),
|
|
23165
23066
|
_: 1
|
|
23166
23067
|
}),
|
|
@@ -23174,7 +23075,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
23174
23075
|
onClick: handleNext
|
|
23175
23076
|
}, {
|
|
23176
23077
|
default: withCtx(() => [
|
|
23177
|
-
createTextVNode(toDisplayString(
|
|
23078
|
+
createTextVNode(toDisplayString(unref(t)("to.guider.next")), 1)
|
|
23178
23079
|
]),
|
|
23179
23080
|
_: 1
|
|
23180
23081
|
})
|
|
@@ -23201,10 +23102,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23201
23102
|
},
|
|
23202
23103
|
__name: "transfer",
|
|
23203
23104
|
props: {
|
|
23105
|
+
flex: { type: Boolean, default: false },
|
|
23204
23106
|
mode: { default: "default" },
|
|
23205
23107
|
data: { default: () => "" },
|
|
23206
|
-
leftTitle: { default: "
|
|
23207
|
-
rightTitle: { default: "
|
|
23108
|
+
leftTitle: { default: "" },
|
|
23109
|
+
rightTitle: { default: "" },
|
|
23208
23110
|
modelValue: { default: "" },
|
|
23209
23111
|
labelText: { default: "label" },
|
|
23210
23112
|
valueText: { default: "value" },
|
|
@@ -23465,6 +23367,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23465
23367
|
const _directive_color = resolveDirective("color");
|
|
23466
23368
|
const _directive_dis = resolveDirective("dis");
|
|
23467
23369
|
return openBlock(), createElementBlock("div", {
|
|
23370
|
+
key: unref(langKey),
|
|
23371
|
+
flex: __props.flex ? __props.flex : null,
|
|
23468
23372
|
class: normalizeClass(["to-transfer", setClass.value])
|
|
23469
23373
|
}, [
|
|
23470
23374
|
createElementVNode("div", { class: "to-transfer-panel" }, [
|
|
@@ -23472,7 +23376,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23472
23376
|
createVNode(unref(ToCheckbox), {
|
|
23473
23377
|
modelValue: dataGlobal.value,
|
|
23474
23378
|
"onUpdate:modelValue": ($event) => dataGlobal.value = $event,
|
|
23475
|
-
label: __props.leftTitle,
|
|
23379
|
+
label: __props.leftTitle || unref(t)("to.transfer.pending"),
|
|
23476
23380
|
width: "full",
|
|
23477
23381
|
onChange: (val) => {
|
|
23478
23382
|
selectDataMap(val, "dataGroup");
|
|
@@ -23489,8 +23393,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23489
23393
|
"onUpdate:modelValue": ($event) => dataFilterKey.value = $event,
|
|
23490
23394
|
clearable: "",
|
|
23491
23395
|
width: "full",
|
|
23492
|
-
placeholder: "
|
|
23493
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
23396
|
+
placeholder: unref(t)("to.transfer.placeholder")
|
|
23397
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
23494
23398
|
]),
|
|
23495
23399
|
_: 1
|
|
23496
23400
|
})) : createCommentVNode("", true),
|
|
@@ -23515,7 +23419,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23515
23419
|
value: "1.5"
|
|
23516
23420
|
}, {
|
|
23517
23421
|
default: withCtx(() => [
|
|
23518
|
-
createTextVNode("
|
|
23422
|
+
createTextVNode(toDisplayString(unref(t)("to.transfer.noData")), 1)
|
|
23519
23423
|
]),
|
|
23520
23424
|
_: 1
|
|
23521
23425
|
})), [
|
|
@@ -23555,7 +23459,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23555
23459
|
createVNode(unref(ToCheckbox), {
|
|
23556
23460
|
modelValue: valueGlobal.value,
|
|
23557
23461
|
"onUpdate:modelValue": ($event) => valueGlobal.value = $event,
|
|
23558
|
-
label: __props.rightTitle,
|
|
23462
|
+
label: __props.rightTitle || unref(t)("to.transfer.selected"),
|
|
23559
23463
|
width: "full",
|
|
23560
23464
|
onChange: (val) => {
|
|
23561
23465
|
selectDataMap(val, "valueGroup");
|
|
@@ -23572,9 +23476,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23572
23476
|
"onUpdate:modelValue": ($event) => valueFilterKey.value = $event,
|
|
23573
23477
|
clearable: "",
|
|
23574
23478
|
width: "full",
|
|
23575
|
-
placeholder: "
|
|
23479
|
+
placeholder: unref(t)("to.transfer.placeholder"),
|
|
23576
23480
|
fillet: __props.fillet
|
|
23577
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "fillet"])
|
|
23481
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "fillet"])
|
|
23578
23482
|
]),
|
|
23579
23483
|
_: 1
|
|
23580
23484
|
})) : createCommentVNode("", true),
|
|
@@ -23599,7 +23503,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23599
23503
|
value: "1.5"
|
|
23600
23504
|
}, {
|
|
23601
23505
|
default: withCtx(() => [
|
|
23602
|
-
createTextVNode("
|
|
23506
|
+
createTextVNode(toDisplayString(unref(t)("to.transfer.noData")), 1)
|
|
23603
23507
|
]),
|
|
23604
23508
|
_: 1
|
|
23605
23509
|
})), [
|
|
@@ -23611,7 +23515,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
23611
23515
|
_: 1
|
|
23612
23516
|
}, 8, ["height"])
|
|
23613
23517
|
])
|
|
23614
|
-
],
|
|
23518
|
+
], 10, ["flex"]);
|
|
23615
23519
|
};
|
|
23616
23520
|
}
|
|
23617
23521
|
});
|
|
@@ -23622,12 +23526,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23622
23526
|
},
|
|
23623
23527
|
__name: "upload",
|
|
23624
23528
|
props: {
|
|
23529
|
+
flex: { type: Boolean, default: false },
|
|
23625
23530
|
mode: { default: "default" },
|
|
23626
23531
|
multiple: { type: Boolean, default: false },
|
|
23627
23532
|
auto: { type: Boolean, default: false },
|
|
23628
23533
|
action: { default: "" },
|
|
23629
23534
|
headers: { default: () => ({}) },
|
|
23630
|
-
placeholder: { default: "
|
|
23535
|
+
placeholder: { default: "" },
|
|
23631
23536
|
desc: { default: "" },
|
|
23632
23537
|
id: { default: "upload" + (/* @__PURE__ */ new Date()).getTime() },
|
|
23633
23538
|
required: { type: Boolean, default: false },
|
|
@@ -23649,7 +23554,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23649
23554
|
beforeStart: { type: [Function, null], default: null },
|
|
23650
23555
|
verifiable: { type: Boolean, default: true },
|
|
23651
23556
|
showList: { type: Boolean, default: true },
|
|
23652
|
-
uploadText: { default: "
|
|
23557
|
+
uploadText: { default: "" }
|
|
23653
23558
|
},
|
|
23654
23559
|
emits: ["start", "success", "error", "clear", "change", "progress", "remove", "download"],
|
|
23655
23560
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -23785,7 +23690,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23785
23690
|
}
|
|
23786
23691
|
}
|
|
23787
23692
|
} else {
|
|
23788
|
-
$tip.danger(
|
|
23693
|
+
$tip.danger(t("to.upload.tip.error.count", props.maxLength)).catch(() => {
|
|
23789
23694
|
});
|
|
23790
23695
|
}
|
|
23791
23696
|
}
|
|
@@ -23912,7 +23817,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23912
23817
|
handleUpload(file);
|
|
23913
23818
|
});
|
|
23914
23819
|
} else {
|
|
23915
|
-
$tip.danger(
|
|
23820
|
+
$tip.danger(t("to.upload.tip.error.count", props.maxLength)).catch(() => {
|
|
23916
23821
|
});
|
|
23917
23822
|
}
|
|
23918
23823
|
}
|
|
@@ -23927,6 +23832,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23927
23832
|
const _directive_color = resolveDirective("color");
|
|
23928
23833
|
return openBlock(), createElementBlock("div", {
|
|
23929
23834
|
id: __props.id,
|
|
23835
|
+
key: unref(langKey),
|
|
23836
|
+
flex: __props.flex ? __props.flex : null,
|
|
23930
23837
|
class: normalizeClass(["to-upload", setClass.value]),
|
|
23931
23838
|
style: normalizeStyle(setStyle.value)
|
|
23932
23839
|
}, [
|
|
@@ -23953,7 +23860,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23953
23860
|
readonly: "",
|
|
23954
23861
|
disabled: props.disabled,
|
|
23955
23862
|
width: props.width,
|
|
23956
|
-
placeholder: __props.placeholder,
|
|
23863
|
+
placeholder: __props.placeholder || unref(t)("to.common.placeholder.select"),
|
|
23957
23864
|
verifiable: false
|
|
23958
23865
|
}, {
|
|
23959
23866
|
suffix: withCtx(() => [
|
|
@@ -23973,7 +23880,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
23973
23880
|
onClick: handleFile
|
|
23974
23881
|
}, {
|
|
23975
23882
|
default: withCtx(() => [
|
|
23976
|
-
createTextVNode(toDisplayString(props.uploadText), 1)
|
|
23883
|
+
createTextVNode(toDisplayString(props.uploadText || unref(t)("to.upload.button")), 1)
|
|
23977
23884
|
]),
|
|
23978
23885
|
_: 1
|
|
23979
23886
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
@@ -24086,7 +23993,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
24086
23993
|
class: "to-box-tip"
|
|
24087
23994
|
}, [
|
|
24088
23995
|
errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
24089
|
-
createTextVNode("
|
|
23996
|
+
createTextVNode(toDisplayString(unref(t)("to.upload.selectError")) + " ", 1),
|
|
24090
23997
|
withDirectives(createVNode(unref(ToIcon), {
|
|
24091
23998
|
value: "help",
|
|
24092
23999
|
color: "danger",
|
|
@@ -24101,12 +24008,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
24101
24008
|
]
|
|
24102
24009
|
])
|
|
24103
24010
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
24104
|
-
createTextVNode("
|
|
24011
|
+
createTextVNode(toDisplayString(unref(t)("to.upload.required")), 1)
|
|
24105
24012
|
], 64))
|
|
24106
24013
|
])), [
|
|
24107
24014
|
[_directive_color, "danger"]
|
|
24108
24015
|
]) : createCommentVNode("", true)
|
|
24109
|
-
], 14, ["id"]);
|
|
24016
|
+
], 14, ["id", "flex"]);
|
|
24110
24017
|
};
|
|
24111
24018
|
}
|
|
24112
24019
|
});
|
|
@@ -24118,10 +24025,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24118
24025
|
},
|
|
24119
24026
|
__name: "import",
|
|
24120
24027
|
props: {
|
|
24028
|
+
flex: { type: Boolean, default: false },
|
|
24121
24029
|
mode: { default: "default" },
|
|
24122
24030
|
type: { default: "button" },
|
|
24123
24031
|
accept: { default: "" },
|
|
24124
|
-
buttonText: { default: "
|
|
24032
|
+
buttonText: { default: "" },
|
|
24125
24033
|
name: { default: "importfile" },
|
|
24126
24034
|
action: { default: "" },
|
|
24127
24035
|
beforeStart: { type: Function, default: () => true },
|
|
@@ -24237,7 +24145,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24237
24145
|
await processFile(file);
|
|
24238
24146
|
} else {
|
|
24239
24147
|
state.value = "error";
|
|
24240
|
-
errorTip.value = "
|
|
24148
|
+
errorTip.value = t("to.import.error.fileType");
|
|
24241
24149
|
fileName.value = "";
|
|
24242
24150
|
e.target.value = "";
|
|
24243
24151
|
}
|
|
@@ -24263,13 +24171,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24263
24171
|
emit("error", err, status, file);
|
|
24264
24172
|
switch (err.type) {
|
|
24265
24173
|
case "network_error":
|
|
24266
|
-
errorTip.value = "
|
|
24174
|
+
errorTip.value = t("to.import.error.network") + err.message;
|
|
24267
24175
|
break;
|
|
24268
24176
|
case "http_error":
|
|
24269
|
-
errorTip.value =
|
|
24177
|
+
errorTip.value = t("to.import.error.server") + `(${status}):${((_a2 = err.response) == null ? void 0 : _a2.message) || err.message}`;
|
|
24270
24178
|
break;
|
|
24271
24179
|
case "parse_error":
|
|
24272
|
-
errorTip.value = "
|
|
24180
|
+
errorTip.value = t("to.import.error.dataFormat") + err.message;
|
|
24273
24181
|
break;
|
|
24274
24182
|
}
|
|
24275
24183
|
},
|
|
@@ -24335,7 +24243,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24335
24243
|
await processFile(file);
|
|
24336
24244
|
} else {
|
|
24337
24245
|
state.value = "error";
|
|
24338
|
-
errorTip.value = "
|
|
24246
|
+
errorTip.value = t("to.import.error.fileType");
|
|
24339
24247
|
fileName.value = "";
|
|
24340
24248
|
}
|
|
24341
24249
|
}
|
|
@@ -24358,7 +24266,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24358
24266
|
} else if (file) {
|
|
24359
24267
|
e.preventDefault();
|
|
24360
24268
|
state.value = "error";
|
|
24361
|
-
errorTip.value = "
|
|
24269
|
+
errorTip.value = t("to.import.error.fileType");
|
|
24362
24270
|
fileName.value = "";
|
|
24363
24271
|
break;
|
|
24364
24272
|
}
|
|
@@ -24398,6 +24306,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24398
24306
|
return (_ctx, _cache) => {
|
|
24399
24307
|
const _component_to_scroll = resolveComponent("to-scroll");
|
|
24400
24308
|
return openBlock(), createElementBlock("span", {
|
|
24309
|
+
key: unref(langKey),
|
|
24310
|
+
flex: __props.flex ? __props.flex : null,
|
|
24401
24311
|
class: normalizeClass(["to-import", setClass.value])
|
|
24402
24312
|
}, [
|
|
24403
24313
|
withDirectives(createElementVNode("input", {
|
|
@@ -24420,7 +24330,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24420
24330
|
onClick: withModifiers(($event) => handleFloat(button.value), ["stop"])
|
|
24421
24331
|
}, {
|
|
24422
24332
|
default: withCtx(() => [
|
|
24423
|
-
createTextVNode(toDisplayString(props.buttonText), 1)
|
|
24333
|
+
createTextVNode(toDisplayString(props.buttonText || unref(t)("to.import.button")), 1)
|
|
24424
24334
|
]),
|
|
24425
24335
|
_: 1
|
|
24426
24336
|
}, 8, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ToIcon), {
|
|
@@ -24459,7 +24369,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24459
24369
|
class: "to-import-file-icon"
|
|
24460
24370
|
}, null, 8, ["value"]),
|
|
24461
24371
|
createElementVNode("div", { class: "to-import-file-name" }, [
|
|
24462
|
-
createElementVNode("span", { class: "to-import-file-name-text" }, toDisplayString(errorTip.value || fileName.value || "
|
|
24372
|
+
createElementVNode("span", { class: "to-import-file-name-text" }, toDisplayString(errorTip.value || fileName.value || unref(t)("to.import.dragText")), 1)
|
|
24463
24373
|
]),
|
|
24464
24374
|
state.value || hasDownloadTemplate() ? (openBlock(), createElementBlock("div", {
|
|
24465
24375
|
key: 0,
|
|
@@ -24472,7 +24382,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24472
24382
|
onClick: withModifiers(handleReset, ["stop"])
|
|
24473
24383
|
}, {
|
|
24474
24384
|
default: withCtx(() => [
|
|
24475
|
-
createTextVNode("
|
|
24385
|
+
createTextVNode(toDisplayString(unref(t)("to.import.reset")), 1)
|
|
24476
24386
|
]),
|
|
24477
24387
|
_: 1
|
|
24478
24388
|
})) : hasDownloadTemplate() ? (openBlock(), createBlock(unref(ToButton), {
|
|
@@ -24482,7 +24392,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24482
24392
|
onClick: withModifiers(downloadTem, ["stop"])
|
|
24483
24393
|
}, {
|
|
24484
24394
|
default: withCtx(() => [
|
|
24485
|
-
createTextVNode("
|
|
24395
|
+
createTextVNode(toDisplayString(unref(t)("to.import.downloadTemplate")), 1)
|
|
24486
24396
|
]),
|
|
24487
24397
|
_: 1
|
|
24488
24398
|
})) : createCommentVNode("", true)
|
|
@@ -24494,7 +24404,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
24494
24404
|
]),
|
|
24495
24405
|
_: 1
|
|
24496
24406
|
}, 8, ["before-open", "before-close"])
|
|
24497
|
-
],
|
|
24407
|
+
], 10, ["flex"]);
|
|
24498
24408
|
};
|
|
24499
24409
|
}
|
|
24500
24410
|
});
|
|
@@ -24505,12 +24415,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
24505
24415
|
},
|
|
24506
24416
|
__name: "export",
|
|
24507
24417
|
props: {
|
|
24418
|
+
flex: { type: Boolean, default: false },
|
|
24508
24419
|
mode: { default: "default" },
|
|
24509
|
-
buttonText: { default: "
|
|
24420
|
+
buttonText: { default: "" },
|
|
24510
24421
|
type: { default: "button" },
|
|
24511
24422
|
fileTypes: { default: ".xlsx,.xls" },
|
|
24512
24423
|
fileType: { default: ".xls" },
|
|
24513
|
-
fileName: { default: "
|
|
24424
|
+
fileName: { default: "" },
|
|
24514
24425
|
action: { default: "" },
|
|
24515
24426
|
headers: { default: () => null },
|
|
24516
24427
|
withCredentials: { type: Boolean, default: false },
|
|
@@ -24611,6 +24522,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
24611
24522
|
}
|
|
24612
24523
|
return (_ctx, _cache) => {
|
|
24613
24524
|
return openBlock(), createElementBlock("span", {
|
|
24525
|
+
key: unref(langKey),
|
|
24526
|
+
flex: __props.flex ? __props.flex : null,
|
|
24614
24527
|
class: normalizeClass(["to-export", setClass.value])
|
|
24615
24528
|
}, [
|
|
24616
24529
|
props.type === "button" ? (openBlock(), createBlock(unref(ToButton), {
|
|
@@ -24624,7 +24537,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
24624
24537
|
onClick: withModifiers(($event) => handleFloat(buttonEl.value), ["stop"])
|
|
24625
24538
|
}, {
|
|
24626
24539
|
default: withCtx(() => [
|
|
24627
|
-
createTextVNode(toDisplayString(props.buttonText), 1)
|
|
24540
|
+
createTextVNode(toDisplayString(props.buttonText || unref(t)("to.export.button")), 1)
|
|
24628
24541
|
]),
|
|
24629
24542
|
_: 1
|
|
24630
24543
|
}, 8, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ToIcon), {
|
|
@@ -24670,7 +24583,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
24670
24583
|
onClick: handleExport
|
|
24671
24584
|
}, {
|
|
24672
24585
|
default: withCtx(() => [
|
|
24673
|
-
createTextVNode("
|
|
24586
|
+
createTextVNode(toDisplayString(unref(t)("to.export.confirm")), 1)
|
|
24674
24587
|
]),
|
|
24675
24588
|
_: 1
|
|
24676
24589
|
})
|
|
@@ -24680,7 +24593,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
24680
24593
|
]),
|
|
24681
24594
|
_: 1
|
|
24682
24595
|
}, 8, ["before-open", "before-close", "onOpened", "onClosed"])
|
|
24683
|
-
],
|
|
24596
|
+
], 10, ["flex"]);
|
|
24684
24597
|
};
|
|
24685
24598
|
}
|
|
24686
24599
|
});
|
|
@@ -25845,7 +25758,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25845
25758
|
if (isArray(color)) {
|
|
25846
25759
|
return color.map((colorItem) => {
|
|
25847
25760
|
if (isArray(colorItem)) {
|
|
25848
|
-
return createGradientColor(colorItem[0], colorItem[1]
|
|
25761
|
+
return createGradientColor(colorItem[0], colorItem[1]);
|
|
25849
25762
|
}
|
|
25850
25763
|
return colorItem;
|
|
25851
25764
|
});
|
|
@@ -25863,16 +25776,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
25863
25776
|
});
|
|
25864
25777
|
});
|
|
25865
25778
|
});
|
|
25866
|
-
const createGradientColor = (startColor, endColor
|
|
25867
|
-
|
|
25868
|
-
|
|
25869
|
-
|
|
25870
|
-
|
|
25871
|
-
|
|
25872
|
-
|
|
25873
|
-
|
|
25874
|
-
|
|
25875
|
-
|
|
25779
|
+
const createGradientColor = (startColor, endColor) => {
|
|
25780
|
+
return {
|
|
25781
|
+
type: "linear",
|
|
25782
|
+
x: 0,
|
|
25783
|
+
y: 0,
|
|
25784
|
+
x2: 0,
|
|
25785
|
+
y2: 1,
|
|
25786
|
+
colorStops: [
|
|
25787
|
+
{ offset: 0, color: startColor },
|
|
25788
|
+
{ offset: 1, color: endColor }
|
|
25789
|
+
]
|
|
25790
|
+
};
|
|
25876
25791
|
};
|
|
25877
25792
|
const processDataItem = (item, index) => {
|
|
25878
25793
|
const hasGap = Number(props.gap) > 0;
|