@touchvue/plugin 1.0.0-beta.10 → 1.0.0-beta.12

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.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$19 = /* @__PURE__ */ defineComponent({
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$19);
4657
- const _sfc_main$18 = /* @__PURE__ */ defineComponent({
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
- ], 2);
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$17);
4742
- const _sfc_main$16 = /* @__PURE__ */ defineComponent({
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
- ], 6);
4789
+ ], 14, ["flex"]);
4839
4790
  };
4840
4791
  }
4841
4792
  });
4842
- withInstall(_sfc_main$16);
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
- Deselect: "反选",
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月",
@@ -4953,6 +4914,7 @@ const defaultLang = {
4953
4914
  fold: "全文"
4954
4915
  },
4955
4916
  guider: {
4917
+ dontShowAgain: "不再显示",
4956
4918
  restart: "再来一遍",
4957
4919
  finish: "完成",
4958
4920
  skip: "跳过",
@@ -4962,7 +4924,9 @@ const defaultLang = {
4962
4924
  total: "共 {0} 条",
4963
4925
  pageCount: "共 {0} 页",
4964
4926
  pageSize: "{0}条/页",
4965
- go: "跳转"
4927
+ go: "跳转",
4928
+ prevPage: "上一页",
4929
+ nextPage: "下一页"
4966
4930
  },
4967
4931
  pic: {
4968
4932
  viewer: {
@@ -4994,6 +4958,11 @@ const defaultLang = {
4994
4958
  changed: "此处已修改"
4995
4959
  },
4996
4960
  select: {
4961
+ noData: "暂无数据",
4962
+ noMatch: "无匹配项",
4963
+ filter: "筛选",
4964
+ selectError: "选择有误",
4965
+ required: "不能为空",
4997
4966
  input: {
4998
4967
  allSelected: "已全选"
4999
4968
  },
@@ -5046,6 +5015,9 @@ const defaultLang = {
5046
5015
  count: "最多只能上传{0}个文件"
5047
5016
  }
5048
5017
  }
5018
+ },
5019
+ table: {
5020
+ emptyText: "暂无数据"
5049
5021
  }
5050
5022
  }
5051
5023
  };
@@ -5075,6 +5047,8 @@ function Format() {
5075
5047
  }
5076
5048
  const format = Format();
5077
5049
  let lang = defaultLang;
5050
+ const langKey = ref(0);
5051
+ const listeners = /* @__PURE__ */ new Set();
5078
5052
  let i18nHandler = function() {
5079
5053
  var _a2, _b, _c, _d;
5080
5054
  let vuei18n = null;
@@ -5092,7 +5066,7 @@ let i18nHandler = function() {
5092
5066
  };
5093
5067
  const t = function(path, ...options) {
5094
5068
  let value = i18nHandler.apply(this, arguments);
5095
- if (value !== null && value !== void 0)
5069
+ if (value !== null && value !== void 0 && value !== path)
5096
5070
  return value;
5097
5071
  const array = path.split(".");
5098
5072
  let current = lang;
@@ -5107,9 +5081,23 @@ const t = function(path, ...options) {
5107
5081
  }
5108
5082
  return "";
5109
5083
  };
5084
+ const use = function(l) {
5085
+ lang = l || lang;
5086
+ langKey.value++;
5087
+ listeners.forEach((fn) => fn(lang));
5088
+ };
5089
+ const onLangChange = function(fn) {
5090
+ listeners.add(fn);
5091
+ return () => listeners.delete(fn);
5092
+ };
5093
+ const i18n = function(fn) {
5094
+ i18nHandler = fn || i18nHandler;
5095
+ };
5096
+ ({ use, t, i18n, langKey: langKey.value, onLangChange });
5110
5097
  function ajax() {
5111
5098
  }
5112
5099
  const selectProps = {
5100
+ flex: Boolean,
5113
5101
  /**
5114
5102
  * 懒加载
5115
5103
  */
@@ -5214,7 +5202,7 @@ const selectProps = {
5214
5202
  */
5215
5203
  placeholder: {
5216
5204
  type: String,
5217
- default: "请选择"
5205
+ default: ""
5218
5206
  },
5219
5207
  /**
5220
5208
  * 占位符颜色
@@ -5228,14 +5216,14 @@ const selectProps = {
5228
5216
  */
5229
5217
  nomatchText: {
5230
5218
  type: String,
5231
- default: "无匹配数据"
5219
+ default: ""
5232
5220
  },
5233
5221
  /**
5234
5222
  * 暂无数据文本
5235
5223
  */
5236
5224
  nodataText: {
5237
5225
  type: String,
5238
- default: "暂无数据"
5226
+ default: ""
5239
5227
  },
5240
5228
  /**
5241
5229
  * 是否只读
@@ -5282,7 +5270,7 @@ const selectProps = {
5282
5270
  */
5283
5271
  allText: {
5284
5272
  type: String,
5285
- default: "全部已选择"
5273
+ default: ""
5286
5274
  },
5287
5275
  /**
5288
5276
  * 是否可清空
@@ -5768,7 +5756,7 @@ const tipDirective = {
5768
5756
  }
5769
5757
  }
5770
5758
  };
5771
- const _sfc_main$15 = /* @__PURE__ */ defineComponent({
5759
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
5772
5760
  ...{
5773
5761
  name: "ToSelect",
5774
5762
  componentName: "ToSelect"
@@ -6090,7 +6078,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6090
6078
  const selectAll = () => {
6091
6079
  allChange();
6092
6080
  };
6093
- const deselect = () => {
6081
+ const inverse = () => {
6094
6082
  reverseChange();
6095
6083
  };
6096
6084
  const multipleItemChange = (value, item) => {
@@ -6731,8 +6719,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6731
6719
  const _directive_size = resolveDirective("size");
6732
6720
  return withDirectives((openBlock(), createElementBlock("div", {
6733
6721
  id: _ctx.id,
6722
+ key: unref(langKey),
6734
6723
  ref_key: "$el",
6735
6724
  ref: $el,
6725
+ flex: _ctx.flex ? _ctx.flex : null,
6736
6726
  class: normalizeClass(["to-select", unref(setClass)]),
6737
6727
  style: normalizeStyle(unref(setStyle)),
6738
6728
  tabindex: _ctx.tabindex,
@@ -6796,7 +6786,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6796
6786
  _ctx.clearable ? (openBlock(), createElementBlock("option", {
6797
6787
  key: 0,
6798
6788
  value: ""
6799
- }, toDisplayString(_ctx.placeholder), 1)) : createCommentVNode("", true),
6789
+ }, toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)) : createCommentVNode("", true),
6800
6790
  (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item, index) => {
6801
6791
  return openBlock(), createElementBlock("option", {
6802
6792
  key: index,
@@ -6818,7 +6808,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6818
6808
  createTextVNode(toDisplayString(_ctx.unit), 1)
6819
6809
  ], 64)) : createCommentVNode("", true)
6820
6810
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6821
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
6811
+ createTextVNode(toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)
6822
6812
  ], 64))
6823
6813
  ])) : (openBlock(), createElementBlock("span", {
6824
6814
  key: 1,
@@ -6837,7 +6827,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6837
6827
  "prevent-focus": "",
6838
6828
  width: "full",
6839
6829
  mode: "none",
6840
- placeholder: _ctx.placeholder,
6830
+ placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select"),
6841
6831
  onFocus: inputFocus,
6842
6832
  onKeyup: inputInput,
6843
6833
  onBlur: inputBlur
@@ -6856,7 +6846,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6856
6846
  "prevent-focus": "",
6857
6847
  width: "full",
6858
6848
  mode: "none",
6859
- placeholder: _ctx.placeholder,
6849
+ placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select"),
6860
6850
  onClear: filterClear,
6861
6851
  onFocus: filterFocus,
6862
6852
  onKeyup: filterInput,
@@ -6873,7 +6863,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6873
6863
  "prevent-focus": "",
6874
6864
  width: "full",
6875
6865
  mode: "none",
6876
- placeholder: _ctx.placeholder,
6866
+ placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select"),
6877
6867
  onClear: filterClear,
6878
6868
  onFocus: filterFocus,
6879
6869
  onKeyup: filterInput,
@@ -6884,10 +6874,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6884
6874
  unref(selected).filter((item) => !item.hide).length === 0 && !_ctx.inputable && !_ctx.filterable && !_ctx.setDataFn ? (openBlock(), createElementBlock("span", {
6885
6875
  key: 0,
6886
6876
  class: "to-select-box"
6887
- }, toDisplayString(_ctx.placeholder), 1)) : isAll.value && _ctx.useAllText ? (openBlock(), createElementBlock("span", {
6877
+ }, toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)) : isAll.value && _ctx.useAllText ? (openBlock(), createElementBlock("span", {
6888
6878
  key: 1,
6889
6879
  class: "to-select-box"
6890
- }, toDisplayString(_ctx.allText), 1)) : (openBlock(), createElementBlock("span", {
6880
+ }, toDisplayString(_ctx.allText || unref(t)("to.select.input.allSelected")), 1)) : (openBlock(), createElementBlock("span", {
6891
6881
  key: 2,
6892
6882
  class: "to-select-tag"
6893
6883
  }, [
@@ -6917,7 +6907,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6917
6907
  disabled: unref($phone),
6918
6908
  "prevent-focus": "",
6919
6909
  mode: "none",
6920
- placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder,
6910
+ placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select"),
6921
6911
  onFocus: multipleInputFocus,
6922
6912
  onBlur: multipleInputBlur
6923
6913
  }, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "disabled", "placeholder"])) : createCommentVNode("", true),
@@ -6931,7 +6921,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6931
6921
  disabled: unref($phone),
6932
6922
  "prevent-focus": "",
6933
6923
  mode: "none",
6934
- placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder,
6924
+ placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select"),
6935
6925
  onFocus: multipleFilterFocus,
6936
6926
  onBlur: multipleFilterBlur
6937
6927
  }, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "disabled", "placeholder"])) : createCommentVNode("", true),
@@ -6944,7 +6934,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6944
6934
  "sp-chars": _ctx.inputable ? _ctx.spChars : false,
6945
6935
  "prevent-focus": "",
6946
6936
  mode: "none",
6947
- placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder,
6937
+ placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select"),
6948
6938
  onFocus: multipleFilterFocus,
6949
6939
  onBlur: multipleFilterBlur
6950
6940
  }, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "placeholder"])) : createCommentVNode("", true)
@@ -6974,9 +6964,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6974
6964
  }, [
6975
6965
  errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6976
6966
  _ctx.inputable ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6977
- createTextVNode("输入有误")
6967
+ createTextVNode(toDisplayString(unref(t)("to.input.inputError")), 1)
6978
6968
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6979
- createTextVNode("选择有误")
6969
+ createTextVNode(toDisplayString(unref(t)("to.select.selectError")), 1)
6980
6970
  ], 64)),
6981
6971
  withDirectives(createVNode(unref(ToIcon), {
6982
6972
  value: "help",
@@ -6992,7 +6982,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
6992
6982
  ]
6993
6983
  ])
6994
6984
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6995
- createTextVNode("不能为空")
6985
+ createTextVNode(toDisplayString(unref(t)("to.select.required")), 1)
6996
6986
  ], 64))
6997
6987
  ])), [
6998
6988
  [unref(vColorDirective), "danger"]
@@ -7107,7 +7097,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7107
7097
  "sp-chars": _ctx.spChars,
7108
7098
  "prevent-focus": "",
7109
7099
  mode: "none",
7110
- placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder
7100
+ placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select")
7111
7101
  }, {
7112
7102
  default: withCtx(() => [
7113
7103
  createVNode(unref(ToButton), {
@@ -7126,7 +7116,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7126
7116
  "onUpdate:modelValue": ($event) => multipleInputValue.value = $event,
7127
7117
  "prevent-focus": "",
7128
7118
  mode: "none",
7129
- placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder
7119
+ placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select")
7130
7120
  }, {
7131
7121
  default: withCtx(() => [
7132
7122
  createVNode(unref(ToButton), {
@@ -7149,7 +7139,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7149
7139
  "sp-chars": false,
7150
7140
  width: "full",
7151
7141
  "prevent-focus": "",
7152
- placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder
7142
+ placeholder: unref(selected).filter((item) => !item.hide).length > 0 ? "" : _ctx.placeholder || unref(t)("to.common.placeholder.select")
7153
7143
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
7154
7144
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
7155
7145
  _ctx.inputable ? (openBlock(), createBlock(unref(ToInput), {
@@ -7161,7 +7151,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7161
7151
  "sp-chars": _ctx.spChars,
7162
7152
  "prevent-focus": "",
7163
7153
  width: "full",
7164
- placeholder: _ctx.placeholder
7154
+ placeholder: _ctx.placeholder || unref(t)("to.common.placeholder.select")
7165
7155
  }, null, 8, ["modelValue", "onUpdate:modelValue", "sp-chars", "placeholder"])) : (openBlock(), createBlock(unref(ToInput), {
7166
7156
  key: 1,
7167
7157
  ref_key: "popupFilter",
@@ -7171,9 +7161,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7171
7161
  "sp-chars": false,
7172
7162
  "prevent-focus": "",
7173
7163
  width: "full",
7174
- placeholder: "筛选",
7164
+ placeholder: unref(t)("to.select.filter"),
7175
7165
  onClear: filterClear
7176
- }, null, 8, ["modelValue", "onUpdate:modelValue"]))
7166
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
7177
7167
  ], 64))
7178
7168
  ]),
7179
7169
  _: 1
@@ -7188,7 +7178,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7188
7178
  value: 2
7189
7179
  }, {
7190
7180
  default: withCtx(() => [
7191
- createTextVNode(toDisplayString(_ctx.nodataText), 1)
7181
+ createTextVNode(toDisplayString(_ctx.nodataText || unref(t)("to.select.noData")), 1)
7192
7182
  ]),
7193
7183
  _: 1
7194
7184
  })), [
@@ -7198,7 +7188,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7198
7188
  value: 2
7199
7189
  }, {
7200
7190
  default: withCtx(() => [
7201
- createTextVNode(toDisplayString(_ctx.nomatchText), 1)
7191
+ createTextVNode(toDisplayString(_ctx.nomatchText || unref(t)("to.select.noMatch")), 1)
7202
7192
  ]),
7203
7193
  _: 1
7204
7194
  })), [
@@ -7217,9 +7207,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7217
7207
  ]),
7218
7208
  _: 1
7219
7209
  }),
7220
- createVNode(unref(ToButton), { onClick: deselect }, {
7210
+ createVNode(unref(ToButton), { onClick: inverse }, {
7221
7211
  default: withCtx(() => [
7222
- createTextVNode(toDisplayString(unref(t)("to.common.Deselect")), 1)
7212
+ createTextVNode(toDisplayString(unref(t)("to.common.inverse")), 1)
7223
7213
  ]),
7224
7214
  _: 1
7225
7215
  })
@@ -7269,7 +7259,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7269
7259
  item[iLabelText.value] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
7270
7260
  createTextVNode(toDisplayString(item[iLabelText.value]), 1)
7271
7261
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
7272
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
7262
+ createTextVNode(toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1)
7273
7263
  ], 64))
7274
7264
  ], 10, ["onClick"])), [
7275
7265
  [vShow, filterByValue(item)],
@@ -7293,10 +7283,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7293
7283
  width: "full"
7294
7284
  }, {
7295
7285
  default: withCtx(() => [
7296
- createVNode(unref(ToSubmit), {
7297
- width: "full",
7298
- space: "0"
7299
- }, {
7286
+ createVNode(unref(ToGrid), null, {
7300
7287
  default: withCtx(() => [
7301
7288
  withDirectives((openBlock(), createBlock(unref(ToButton), {
7302
7289
  fillet: "none",
@@ -7336,10 +7323,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7336
7323
  nodata.value ? (openBlock(), createElementBlock("div", {
7337
7324
  key: 0,
7338
7325
  class: "to-select-option-tip"
7339
- }, toDisplayString(_ctx.nodataText), 1)) : nomatch.value ? (openBlock(), createElementBlock("div", {
7326
+ }, toDisplayString(_ctx.nodataText || unref(t)("to.select.noData")), 1)) : nomatch.value ? (openBlock(), createElementBlock("div", {
7340
7327
  key: 1,
7341
7328
  class: "to-select-option-tip"
7342
- }, toDisplayString(_ctx.nomatchText), 1)) : createCommentVNode("", true),
7329
+ }, toDisplayString(_ctx.nomatchText || unref(t)("to.select.noMatch")), 1)) : createCommentVNode("", true),
7343
7330
  !nodata.value && !nomatch.value ? (openBlock(), createBlock(unref(ToScroll), { key: 2 }, {
7344
7331
  default: withCtx(() => [
7345
7332
  _ctx.multiple ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -7355,10 +7342,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7355
7342
  }),
7356
7343
  createVNode(unref(ToButton), {
7357
7344
  class: "to-select-option-button value-inverse",
7358
- onClick: deselect
7345
+ onClick: inverse
7359
7346
  }, {
7360
7347
  default: withCtx(() => [
7361
- createTextVNode(toDisplayString(unref(t)("to.common.Deselect")), 1)
7348
+ createTextVNode(toDisplayString(unref(t)("to.common.inverse")), 1)
7362
7349
  ]),
7363
7350
  _: 1
7364
7351
  })
@@ -7407,7 +7394,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7407
7394
  }, toDisplayString(item[iLabelText.value]), 1)) : (openBlock(), createElementBlock("span", {
7408
7395
  key: 1,
7409
7396
  class: "to-select-option-item-text"
7410
- }, toDisplayString(_ctx.placeholder), 1))
7397
+ }, toDisplayString(_ctx.placeholder || unref(t)("to.common.placeholder.select")), 1))
7411
7398
  ], 10, ["onClick"])), [
7412
7399
  [vShow, filterByValue(item)],
7413
7400
  [unref(vDis), !!item.disabled]
@@ -7426,13 +7413,13 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
7426
7413
  }, 8, ["style", "class", "align", "width", "slide", "position"])
7427
7414
  ], 2)
7428
7415
  ]))
7429
- ], 46, ["id", "tabindex"])), [
7416
+ ], 46, ["id", "flex", "tabindex"])), [
7430
7417
  [_directive_tip, changed.value ? unref(t)("to.common.originalValue", getLabel(valueStore.value[0])) : ""]
7431
7418
  ]);
7432
7419
  };
7433
7420
  }
7434
7421
  });
7435
- const ToSelect = withInstall(_sfc_main$15);
7422
+ const ToSelect = withInstall(_sfc_main$12);
7436
7423
  const calendarProps = {
7437
7424
  /**
7438
7425
  * 假期,用于显示假期标识
@@ -7538,9 +7525,10 @@ const calendarProps = {
7538
7525
  minYear: {
7539
7526
  type: [String, Number],
7540
7527
  default: 0
7541
- }
7528
+ },
7529
+ flex: Boolean
7542
7530
  };
7543
- const _sfc_main$14 = /* @__PURE__ */ defineComponent({
7531
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
7544
7532
  ...{
7545
7533
  name: "ToCalendar"
7546
7534
  },
@@ -8605,7 +8593,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8605
8593
  const _component_to_icon = resolveComponent("to-icon");
8606
8594
  const _component_to_button = resolveComponent("to-button");
8607
8595
  return openBlock(), createElementBlock("div", {
8596
+ key: unref(langKey),
8608
8597
  class: normalizeClass(["to-calendar", setClass.value]),
8598
+ flex: _ctx.flex ? _ctx.flex : null,
8609
8599
  style: normalizeStyle(unref(widthStyle))
8610
8600
  }, [
8611
8601
  createElementVNode("div", { class: "to-calendar-content" }, [
@@ -8631,8 +8621,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8631
8621
  class: normalizeClass(["to-calendar-header-content", { "is-unfold": _ctx.type !== "month" && _ctx.type !== "months" }]),
8632
8622
  onClick: withModifiers(toggleMonthSelector, ["stop"])
8633
8623
  }, [
8634
- createElementVNode("span", { class: "to-calendar-header-year" }, toDisplayString(year.value) + "", 1),
8635
- createElementVNode("span", { class: "to-calendar-header-month" }, toDisplayString(addZero2(month.value)) + "", 1)
8624
+ createElementVNode("span", { class: "to-calendar-header-year" }, toDisplayString(year.value) + toDisplayString(unref(t)("to.calendar.year.suffix")), 1),
8625
+ createElementVNode("span", { class: "to-calendar-header-month" }, toDisplayString(addZero2(month.value)) + toDisplayString(unref(t)("to.calendar.month.suffix")), 1)
8636
8626
  ], 2),
8637
8627
  createVNode(_component_to_icon, {
8638
8628
  value: "next",
@@ -8923,7 +8913,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8923
8913
  onClick: moment
8924
8914
  }, {
8925
8915
  default: withCtx(() => [
8926
- createTextVNode("此刻")
8916
+ createTextVNode(toDisplayString(unref(t)("to.common.now")), 1)
8927
8917
  ]),
8928
8918
  _: 1
8929
8919
  }),
@@ -8937,17 +8927,18 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
8937
8927
  _: 1
8938
8928
  })
8939
8929
  ])) : createCommentVNode("", true)
8940
- ], 6);
8930
+ ], 14, ["flex"]);
8941
8931
  };
8942
8932
  }
8943
8933
  });
8944
- const ToCalendar = withInstall(_sfc_main$14);
8945
- const _sfc_main$13 = /* @__PURE__ */ defineComponent({
8934
+ const ToCalendar = withInstall(_sfc_main$11);
8935
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
8946
8936
  ...{
8947
8937
  name: "ToGap"
8948
8938
  },
8949
8939
  __name: "gap",
8950
8940
  props: {
8941
+ flex: Boolean,
8951
8942
  mode: {
8952
8943
  type: String,
8953
8944
  default: "default"
@@ -8998,13 +8989,14 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
8998
8989
  return (_ctx, _cache) => {
8999
8990
  return openBlock(), createElementBlock("div", {
9000
8991
  class: normalizeClass(["to-gap", setClass.value]),
8992
+ flex: __props.flex ? __props.flex : null,
9001
8993
  style: normalizeStyle(setStyle.value)
9002
- }, null, 6);
8994
+ }, null, 14, ["flex"]);
9003
8995
  };
9004
8996
  }
9005
8997
  });
9006
- const ToGap = withInstall(_sfc_main$13);
9007
- const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8998
+ const ToGap = withInstall(_sfc_main$10);
8999
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
9008
9000
  ...{
9009
9001
  name: "ToStep"
9010
9002
  },
@@ -9017,7 +9009,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9017
9009
  modelValue: { type: [Number, String], default: 0 },
9018
9010
  mode: { type: String, default: "default" },
9019
9011
  dir: { type: String, default: "" },
9020
- itemDir: { type: String, default: "" }
9012
+ itemDir: { type: String, default: "" },
9013
+ flex: { type: Boolean, default: false }
9021
9014
  },
9022
9015
  emits: ["update:modelValue", "item-click"],
9023
9016
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -9059,7 +9052,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9059
9052
  return (_ctx, _cache) => {
9060
9053
  const _component_to_icon = resolveComponent("to-icon");
9061
9054
  return openBlock(), createElementBlock("div", {
9062
- class: normalizeClass(["to-step", setClass.value])
9055
+ class: normalizeClass(["to-step", setClass.value]),
9056
+ flex: __props.flex ? __props.flex : null
9063
9057
  }, [
9064
9058
  (openBlock(true), createElementBlock(Fragment, null, renderList(data_.value, (item, idx) => {
9065
9059
  return openBlock(), createElementBlock(Fragment, { key: idx }, [
@@ -9132,17 +9126,18 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9132
9126
  })) : createCommentVNode("", true)
9133
9127
  ], 64);
9134
9128
  }), 128))
9135
- ], 2);
9129
+ ], 10, ["flex"]);
9136
9130
  };
9137
9131
  }
9138
9132
  });
9139
- withInstall(_sfc_main$12);
9140
- const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9133
+ withInstall(_sfc_main$$);
9134
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9141
9135
  ...{
9142
9136
  name: "ToForm"
9143
9137
  },
9144
9138
  __name: "form",
9145
9139
  props: {
9140
+ flex: Boolean,
9146
9141
  labelWidth: {
9147
9142
  type: [Number, String],
9148
9143
  default: ""
@@ -9229,8 +9224,10 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9229
9224
  };
9230
9225
  const setClass = computed(() => {
9231
9226
  const arr = [];
9232
- if (props.col)
9227
+ if (props.col) {
9228
+ arr.push("is-col");
9233
9229
  arr.push(`col-${props.col}`);
9230
+ }
9234
9231
  if (props.submitPosition)
9235
9232
  arr.push(`submit-position-${props.submitPosition}`);
9236
9233
  if (props.mode)
@@ -9331,6 +9328,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9331
9328
  return (_ctx, _cache) => {
9332
9329
  return openBlock(), createElementBlock("div", {
9333
9330
  class: normalizeClass(["to-form", setClass.value]),
9331
+ flex: __props.flex ? __props.flex : null,
9334
9332
  style: normalizeStyle(setStyle.value)
9335
9333
  }, [
9336
9334
  createElementVNode("div", {
@@ -9351,11 +9349,11 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
9351
9349
  renderSlot(_ctx.$slots, "submit")
9352
9350
  ], 4)) : createCommentVNode("", true)
9353
9351
  ], 512)
9354
- ], 6);
9352
+ ], 14, ["flex"]);
9355
9353
  };
9356
9354
  }
9357
9355
  });
9358
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9356
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9359
9357
  ...{
9360
9358
  name: "ToFormItem",
9361
9359
  inheritAttrs: false
@@ -9435,14 +9433,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9435
9433
  };
9436
9434
  }
9437
9435
  });
9438
- withInstall(_sfc_main$11);
9439
- withInstall(_sfc_main$10);
9440
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
9436
+ withInstall(_sfc_main$_);
9437
+ withInstall(_sfc_main$Z);
9438
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9441
9439
  ...{
9442
9440
  name: "ToGrid"
9443
9441
  },
9444
9442
  __name: "grid",
9445
9443
  props: {
9444
+ flex: { type: Boolean, default: false },
9446
9445
  type: { default: "" },
9447
9446
  mode: { default: "default" },
9448
9447
  dir: { default: "" },
@@ -9528,14 +9527,15 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
9528
9527
  ref_key: "el",
9529
9528
  ref: el,
9530
9529
  class: normalizeClass(["to-grid", setClass.value]),
9530
+ flex: __props.flex ? __props.flex : null,
9531
9531
  style: normalizeStyle(setStyle.value)
9532
9532
  }, [
9533
9533
  renderSlot(_ctx.$slots, "default")
9534
- ], 6);
9534
+ ], 14, ["flex"]);
9535
9535
  };
9536
9536
  }
9537
9537
  });
9538
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9538
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
9539
9539
  ...{
9540
9540
  name: "ToGridItem"
9541
9541
  },
@@ -9607,14 +9607,15 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9607
9607
  };
9608
9608
  }
9609
9609
  });
9610
- const ToGrid = withInstall(_sfc_main$$);
9611
- const ToGridItem = withInstall(_sfc_main$_);
9612
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9610
+ const ToGrid = withInstall(_sfc_main$Y);
9611
+ const ToGridItem = withInstall(_sfc_main$X);
9612
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9613
9613
  ...{
9614
9614
  name: "ToHeader"
9615
9615
  },
9616
9616
  __name: "header",
9617
9617
  props: {
9618
+ flex: { type: Boolean, default: false },
9618
9619
  title: { default: "" },
9619
9620
  color: { default: "" },
9620
9621
  mode: { default: "default" },
@@ -9662,6 +9663,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9662
9663
  return openBlock(), createElementBlock("div", {
9663
9664
  ref_key: "elRef",
9664
9665
  ref: elRef,
9666
+ flex: __props.flex ? __props.flex : null,
9665
9667
  class: normalizeClass(["to-header", setClass.value]),
9666
9668
  onClick: ($event) => emit("click")
9667
9669
  }, [
@@ -9786,17 +9788,18 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9786
9788
  }, [
9787
9789
  renderSlot(_ctx.$slots, "right")
9788
9790
  ])) : createCommentVNode("", true)
9789
- ], 10, ["onClick"]);
9791
+ ], 10, ["flex", "onClick"]);
9790
9792
  };
9791
9793
  }
9792
9794
  });
9793
- const ToHeader = withInstall(_sfc_main$Z);
9794
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9795
+ const ToHeader = withInstall(_sfc_main$W);
9796
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9795
9797
  ...{
9796
9798
  name: "ToInput"
9797
9799
  },
9798
9800
  __name: "input",
9799
9801
  props: {
9802
+ flex: Boolean,
9800
9803
  // 是否自动获取焦点
9801
9804
  autofocus: {
9802
9805
  type: Boolean,
@@ -9836,7 +9839,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9836
9839
  },
9837
9840
  placeholder: {
9838
9841
  type: String,
9839
- default: "请输入"
9842
+ default: ""
9840
9843
  },
9841
9844
  type: {
9842
9845
  type: String,
@@ -9930,14 +9933,6 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
9930
9933
  type: Boolean,
9931
9934
  default: true
9932
9935
  },
9933
- fillet: {
9934
- type: String,
9935
- default: "normal"
9936
- },
9937
- filletPosition: {
9938
- type: String,
9939
- default: ""
9940
- },
9941
9936
  color: {
9942
9937
  type: String,
9943
9938
  default: "default"
@@ -10089,8 +10084,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10089
10084
  }
10090
10085
  });
10091
10086
  const iPlaceholder = computed(() => {
10092
- if (!disabled.value && !props.placeholder && props.placeholder !== "") {
10093
- return "请填写";
10087
+ if (!disabled.value && !props.placeholder) {
10088
+ return t("to.common.placeholder.input");
10094
10089
  } else {
10095
10090
  return props.placeholder;
10096
10091
  }
@@ -10262,6 +10257,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10262
10257
  const _directive_color = resolveDirective("color");
10263
10258
  return withDirectives((openBlock(), createElementBlock("span", {
10264
10259
  id: __props.id,
10260
+ key: unref(langKey),
10261
+ flex: __props.flex ? __props.flex : null,
10265
10262
  class: normalizeClass(["to-input", setClass.value]),
10266
10263
  style: normalizeStyle(setStyle.value),
10267
10264
  onClick: click
@@ -10393,31 +10390,12 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10393
10390
  }, [
10394
10391
  createElementVNode("span", null, toDisplayString(props.suffix), 1)
10395
10392
  ])) : createCommentVNode("", true),
10396
- props.suggestion || _ctx.$slots.default || _ctx.$slots.suffix || props.step ? (openBlock(), createElementBlock("span", {
10393
+ (props.suggestion || _ctx.$slots.default || _ctx.$slots.suffix || props.step) && __props.type !== "textarea" ? (openBlock(), createElementBlock("span", {
10397
10394
  key: 9,
10398
10395
  class: "to-input-suffix"
10399
10396
  }, [
10400
10397
  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)
10398
+ renderSlot(_ctx.$slots, "suffix")
10421
10399
  ])) : createCommentVNode("", true),
10422
10400
  props.step ? withDirectives((openBlock(), createBlock(unref(ToIcon), {
10423
10401
  key: 10,
@@ -10429,18 +10407,49 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10429
10407
  [unref(vDis), Number(data.value) === Number(props.max) || props.disabled]
10430
10408
  ]) : createCommentVNode("", true)
10431
10409
  ]),
10432
- props.maxlength !== Infinity && props.count && props.type === "textarea" ? (openBlock(), createElementBlock("span", {
10410
+ props.type === "textarea" && (props.maxlength !== Infinity && props.count || _ctx.$slots.suffix || _ctx.$slots.default || props.suggestion) ? (openBlock(), createElementBlock("span", {
10433
10411
  key: 1,
10434
- class: "to-input-count"
10412
+ class: "to-input-suffix"
10435
10413
  }, [
10436
- createElementVNode("span", { class: "to-input-count-text" }, toDisplayString(getDataLength.value) + "/" + toDisplayString(props.maxlength), 1)
10414
+ props.maxlength !== Infinity && props.count ? (openBlock(), createElementBlock("span", {
10415
+ key: 0,
10416
+ class: "to-input-count"
10417
+ }, [
10418
+ createElementVNode("span", { class: "to-input-count-text" }, toDisplayString(getDataLength.value) + "/" + toDisplayString(props.maxlength), 1)
10419
+ ])) : createCommentVNode("", true),
10420
+ _ctx.$slots.suffix || _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
10421
+ key: 1,
10422
+ class: "to-input-suffix-slot"
10423
+ }, [
10424
+ __props.type === "textarea" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
10425
+ __props.type === "textarea" ? renderSlot(_ctx.$slots, "suffix", { key: 1 }) : createCommentVNode("", true)
10426
+ ])) : createCommentVNode("", true),
10427
+ props.suggestion ? (openBlock(), createElementBlock("span", {
10428
+ key: 2,
10429
+ class: "to-input-suggestion"
10430
+ }, [
10431
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.suggestion.split(","), (item, i) => {
10432
+ return openBlock(), createBlock(unref(ToButton), {
10433
+ key: i,
10434
+ fillet: "normal",
10435
+ color: "info",
10436
+ mode: "text",
10437
+ onClick: ($event) => addSuggestion(item)
10438
+ }, {
10439
+ default: withCtx(() => [
10440
+ createTextVNode(toDisplayString(item), 1)
10441
+ ]),
10442
+ _: 2
10443
+ }, 1032, ["onClick"]);
10444
+ }), 128))
10445
+ ])) : createCommentVNode("", true)
10437
10446
  ])) : createCommentVNode("", true),
10438
10447
  errorTip.value ? withDirectives((openBlock(), createElementBlock("span", {
10439
10448
  key: 2,
10440
10449
  class: "to-box-tip"
10441
10450
  }, [
10442
10451
  errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10443
- createTextVNode(" 输入有误 "),
10452
+ createTextVNode(toDisplayString(unref(t)("to.input.inputError")) + " ", 1),
10444
10453
  withDirectives(createVNode(unref(ToIcon), {
10445
10454
  style: { "height": "auto" },
10446
10455
  value: "help",
@@ -10456,19 +10465,19 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
10456
10465
  ]
10457
10466
  ])
10458
10467
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
10459
- createTextVNode(" 不能为空 ")
10468
+ createTextVNode(toDisplayString(unref(t)("to.input.required")), 1)
10460
10469
  ], 64))
10461
10470
  ])), [
10462
10471
  [_directive_color, "danger"]
10463
10472
  ]) : createCommentVNode("", true)
10464
- ], 14, ["id"])), [
10473
+ ], 14, ["id", "flex"])), [
10465
10474
  [unref(tipDirective), changed.value ? unref(t)("to.common.originalValue", valueStore.value[0]) : ""]
10466
10475
  ]);
10467
10476
  };
10468
10477
  }
10469
10478
  });
10470
- const ToInput = withInstall(_sfc_main$Y);
10471
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
10479
+ const ToInput = withInstall(_sfc_main$V);
10480
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
10472
10481
  ...{
10473
10482
  name: "ToDivider"
10474
10483
  },
@@ -10480,7 +10489,8 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
10480
10489
  dir: { default: "h" },
10481
10490
  color: { default: "default" },
10482
10491
  marginX: { default: 0 },
10483
- marginY: { default: 0 }
10492
+ marginY: { default: 0 },
10493
+ flex: { type: Boolean, default: false }
10484
10494
  },
10485
10495
  setup(__props) {
10486
10496
  const props = __props;
@@ -10534,13 +10544,14 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
10534
10544
  });
10535
10545
  return (_ctx, _cache) => {
10536
10546
  return openBlock(), createElementBlock("div", {
10547
+ flex: __props.flex ? __props.flex : null,
10537
10548
  class: normalizeClass(["to-divider", setClass.value]),
10538
10549
  style: normalizeStyle(setStyle.value)
10539
- }, null, 6);
10550
+ }, null, 14, ["flex"]);
10540
10551
  };
10541
10552
  }
10542
10553
  });
10543
- withInstall(_sfc_main$X);
10554
+ withInstall(_sfc_main$U);
10544
10555
  /*! @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
10556
  const {
10546
10557
  entries,
@@ -11569,12 +11580,13 @@ function createDOMPurify() {
11569
11580
  return DOMPurify;
11570
11581
  }
11571
11582
  var purify = createDOMPurify();
11572
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
11583
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
11573
11584
  ...{
11574
11585
  name: "ToMsg"
11575
11586
  },
11576
11587
  __name: "msg",
11577
11588
  props: {
11589
+ flex: { type: Boolean, default: false },
11578
11590
  type: { default: "" },
11579
11591
  mode: { default: "default" },
11580
11592
  title: { default: "" },
@@ -11587,8 +11599,8 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
11587
11599
  showDetail: { type: Boolean, default: true },
11588
11600
  padding: { default: 0 },
11589
11601
  position: { default: "" },
11590
- confirmText: { default: "确定" },
11591
- cancelText: { default: "取消" },
11602
+ confirmText: { default: "" },
11603
+ cancelText: { default: "" },
11592
11604
  closeOnBlur: { type: Boolean, default: true },
11593
11605
  zIndex: { default: 0 },
11594
11606
  show: { type: Boolean, default: false },
@@ -11691,6 +11703,8 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
11691
11703
  return openBlock(), createElementBlock("div", {
11692
11704
  ref_key: "el",
11693
11705
  ref: el,
11706
+ key: unref(langKey),
11707
+ flex: __props.flex ? __props.flex : null,
11694
11708
  class: normalizeClass(["to-msg", setClass.value])
11695
11709
  }, [
11696
11710
  createElementVNode("div", {
@@ -11744,7 +11758,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
11744
11758
  onClick: ($event) => iShowDetail.value = true
11745
11759
  }, {
11746
11760
  default: withCtx(() => [
11747
- createTextVNode("显示详情")
11761
+ createTextVNode(toDisplayString(unref(t)("to.msg.showDetail")), 1)
11748
11762
  ]),
11749
11763
  _: 1
11750
11764
  }, 8, ["onClick"])) : (openBlock(), createBlock(unref(ToButton), {
@@ -11756,7 +11770,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
11756
11770
  onClick: ($event) => iShowDetail.value = false
11757
11771
  }, {
11758
11772
  default: withCtx(() => [
11759
- createTextVNode("隐藏详情")
11773
+ createTextVNode(toDisplayString(unref(t)("to.msg.hideDetail")), 1)
11760
11774
  ]),
11761
11775
  _: 1
11762
11776
  }, 8, ["onClick"]))
@@ -11790,23 +11804,23 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
11790
11804
  _: 2
11791
11805
  }, 1040, ["onClick"]);
11792
11806
  }), 128)),
11793
- __props.cancelText ? (openBlock(), createBlock(unref(ToButton), {
11807
+ __props.cancelText || true ? (openBlock(), createBlock(unref(ToButton), {
11794
11808
  key: 0,
11795
11809
  class: "to-msg-button type-extend",
11796
11810
  onClick: cancel
11797
11811
  }, {
11798
11812
  default: withCtx(() => [
11799
- createTextVNode(toDisplayString(__props.cancelText), 1)
11813
+ createTextVNode(toDisplayString(__props.cancelText || unref(t)("to.msg.cancel")), 1)
11800
11814
  ]),
11801
11815
  _: 1
11802
11816
  })) : createCommentVNode("", true),
11803
- __props.confirmText ? (openBlock(), createBlock(unref(ToButton), {
11817
+ __props.confirmText || true ? (openBlock(), createBlock(unref(ToButton), {
11804
11818
  key: 1,
11805
11819
  class: "to-msg-button type-confirm",
11806
11820
  onClick: confirm
11807
11821
  }, {
11808
11822
  default: withCtx(() => [
11809
- createTextVNode(toDisplayString(__props.confirmText), 1)
11823
+ createTextVNode(toDisplayString(__props.confirmText || unref(t)("to.msg.confirm")), 1)
11810
11824
  ]),
11811
11825
  _: 1
11812
11826
  })) : createCommentVNode("", true)
@@ -11815,11 +11829,11 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
11815
11829
  ])) : createCommentVNode("", true)
11816
11830
  ], 4)
11817
11831
  ])
11818
- ], 2);
11832
+ ], 10, ["flex"]);
11819
11833
  };
11820
11834
  }
11821
11835
  });
11822
- const ToMsg = withInstall(_sfc_main$W);
11836
+ const ToMsg = withInstall(_sfc_main$T);
11823
11837
  function createMsgInstance(app, ...args) {
11824
11838
  if (args.length === 0)
11825
11839
  return Promise.reject("无效的 msg 内容");
@@ -11883,7 +11897,7 @@ function createMsgInstance(app, ...args) {
11883
11897
  ...isDetailVNode ? { detail: void 0 } : {}
11884
11898
  };
11885
11899
  const vnode = h(
11886
- _sfc_main$W,
11900
+ _sfc_main$T,
11887
11901
  {
11888
11902
  ...props,
11889
11903
  onClose: () => {
@@ -11954,12 +11968,13 @@ ToMsg.install = (app) => {
11954
11968
  const appMsg = createMsgFunction(app);
11955
11969
  app.config.globalProperties.$msg = appMsg;
11956
11970
  };
11957
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
11971
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
11958
11972
  ...{
11959
11973
  name: "ToPadding"
11960
11974
  },
11961
11975
  __name: "padding",
11962
11976
  props: {
11977
+ flex: { type: Boolean, default: false },
11963
11978
  mode: { default: "default" },
11964
11979
  value: { default: 1 },
11965
11980
  height: { default: "" },
@@ -12006,20 +12021,22 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
12006
12021
  return (_ctx, _cache) => {
12007
12022
  return openBlock(), createElementBlock("div", {
12008
12023
  class: normalizeClass(["to-padding", setClass.value]),
12024
+ flex: __props.flex ? __props.flex : null,
12009
12025
  style: normalizeStyle(setStyle.value)
12010
12026
  }, [
12011
12027
  renderSlot(_ctx.$slots, "default")
12012
- ], 6);
12028
+ ], 14, ["flex"]);
12013
12029
  };
12014
12030
  }
12015
12031
  });
12016
- const ToPadding = withInstall(_sfc_main$V);
12017
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
12032
+ const ToPadding = withInstall(_sfc_main$S);
12033
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
12018
12034
  ...{
12019
12035
  name: "ToPage"
12020
12036
  },
12021
12037
  __name: "page",
12022
12038
  props: {
12039
+ flex: Boolean,
12023
12040
  type: { type: String, default: "" },
12024
12041
  mode: { type: String, default: "default" },
12025
12042
  align: { type: String, default: "" },
@@ -12067,7 +12084,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
12067
12084
  () => props.pageSize,
12068
12085
  (val) => {
12069
12086
  const sizes = typeof props.pageSizes === "string" ? props.pageSizes.split(",") : props.pageSizes;
12070
- pageSize_.value = sizes.includes(Number(val)) ? Number(val) : Number(sizes[0]);
12087
+ if (props.layout.includes("size") || props.layout === "all") {
12088
+ pageSize_.value = sizes.includes(Number(val)) ? Number(val) : Number(sizes[0]);
12089
+ } else {
12090
+ pageSize_.value = Number(val);
12091
+ }
12071
12092
  nextTick(() => {
12072
12093
  computePager();
12073
12094
  });
@@ -12172,20 +12193,21 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
12172
12193
  const _component_to_icon = resolveComponent("to-icon");
12173
12194
  const _directive_align = resolveDirective("align");
12174
12195
  return cShowInSingle.value ? withDirectives((openBlock(), createElementBlock("div", {
12175
- key: 0,
12196
+ key: unref(langKey),
12197
+ flex: __props.flex ? __props.flex : null,
12176
12198
  class: normalizeClass([setClass.value, "to-page"])
12177
12199
  }, [
12178
12200
  __props.type === "lite" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
12179
12201
  createElementVNode("div", { class: "to-page-first" }),
12180
- createElementVNode("div", { class: "to-page-prev" }, "上一页"),
12202
+ createElementVNode("div", { class: "to-page-prev" }, toDisplayString(unref(t)("to.page.prevPage")), 1),
12181
12203
  createElementVNode("div", { class: "to-page-stat" }, toDisplayString(currentPage_.value) + " / " + toDisplayString(__props.total), 1),
12182
- createElementVNode("div", { class: "to-page-next" }, "下一页"),
12204
+ createElementVNode("div", { class: "to-page-next" }, toDisplayString(unref(t)("to.page.nextPage")), 1),
12183
12205
  createElementVNode("div", { class: "to-page-last" })
12184
12206
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
12185
12207
  __props.layout.includes("total") || __props.layout === "all" ? (openBlock(), createElementBlock("div", {
12186
12208
  key: 0,
12187
12209
  class: "to-page-total"
12188
- }, "" + toDisplayString(__props.total) + " 条", 1)) : createCommentVNode("", true),
12210
+ }, toDisplayString(unref(t)("to.page.total", __props.total)), 1)) : createCommentVNode("", true),
12189
12211
  createElementVNode("div", { class: "to-page-slot" }, [
12190
12212
  renderSlot(_ctx.$slots, "default")
12191
12213
  ]),
@@ -12246,11 +12268,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
12246
12268
  modelValue: pageSize_.value,
12247
12269
  "onUpdate:modelValue": ($event) => pageSize_.value = $event,
12248
12270
  class: "to-page-size-select",
12249
- unit: "条/页",
12271
+ unit: unref(t)("to.page.pageSize", ""),
12250
12272
  clearable: false,
12251
12273
  data: cPageSizes.value,
12252
12274
  onChange: handleSizeChange
12253
- }, null, 8, ["modelValue", "onUpdate:modelValue", "data"]), [
12275
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "unit", "data"]), [
12254
12276
  [unref(vDis), __props.disabled]
12255
12277
  ])
12256
12278
  ])) : createCommentVNode("", true),
@@ -12262,7 +12284,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
12262
12284
  modelValue: jumperPage.value,
12263
12285
  "onUpdate:modelValue": ($event) => jumperPage.value = $event,
12264
12286
  class: "to-page-jumper-input",
12265
- placeholder: "跳转",
12287
+ placeholder: unref(t)("to.page.go"),
12266
12288
  onChange: handleJump
12267
12289
  }, {
12268
12290
  default: withCtx(() => [
@@ -12273,216 +12295,19 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
12273
12295
  })
12274
12296
  ]),
12275
12297
  _: 1
12276
- }, 8, ["modelValue", "onUpdate:modelValue"])), [
12298
+ }, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])), [
12277
12299
  [unref(vDis), __props.disabled]
12278
12300
  ])
12279
12301
  ])) : createCommentVNode("", true)
12280
12302
  ], 64))
12281
- ], 2)), [
12303
+ ], 10, ["flex"])), [
12282
12304
  [_directive_align, __props.align]
12283
12305
  ]) : createCommentVNode("", true);
12284
12306
  };
12285
12307
  }
12286
12308
  });
12287
- withInstall(_sfc_main$U);
12288
- const _sfc_main$T = /* @__PURE__ */ Object.assign({
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({
12309
+ withInstall(_sfc_main$R);
12310
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
12486
12311
  ...{
12487
12312
  name: "ToCheckbox"
12488
12313
  },
@@ -12719,8 +12544,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
12719
12544
  };
12720
12545
  }
12721
12546
  });
12722
- const ToCheckbox = withInstall(_sfc_main$R);
12723
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
12547
+ const ToCheckbox = withInstall(_sfc_main$Q);
12548
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
12724
12549
  ...{
12725
12550
  name: "ToCheckboxes"
12726
12551
  },
@@ -12731,7 +12556,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
12731
12556
  required: { type: Boolean, default: false },
12732
12557
  value: { default: "" },
12733
12558
  modelValue: { default: "" },
12734
- beforeChange: { type: Function, default: () => true }
12559
+ beforeChange: { type: Function, default: () => true },
12560
+ flex: { type: Boolean, default: false }
12735
12561
  },
12736
12562
  emits: ["change", "update:modelValue"],
12737
12563
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -12854,7 +12680,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
12854
12680
  pushOptions
12855
12681
  });
12856
12682
  return (_ctx, _cache) => {
12857
- return openBlock(), createElementBlock("div", { id: __props.id }, [
12683
+ return openBlock(), createElementBlock("div", {
12684
+ id: __props.id,
12685
+ flex: __props.flex ? __props.flex : null
12686
+ }, [
12858
12687
  validateRequired.value ? withDirectives((openBlock(), createElementBlock("span", {
12859
12688
  key: 0,
12860
12689
  class: "to-validate",
@@ -12864,12 +12693,13 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
12864
12693
  }, null, 8, ["req", "desc", "value"])), [
12865
12694
  [vShow, false]
12866
12695
  ]) : createCommentVNode("", true),
12867
- renderSlot(_ctx.$slots, "default")
12868
- ], 8, ["id"]);
12696
+ renderSlot(_ctx.$slots, "default"),
12697
+ createTextVNode("flex: false ")
12698
+ ], 8, ["id", "flex"]);
12869
12699
  };
12870
12700
  }
12871
12701
  });
12872
- withInstall(_sfc_main$Q);
12702
+ withInstall(_sfc_main$P);
12873
12703
  const centerScrollProps = {
12874
12704
  /**
12875
12705
  * 数据源
@@ -12879,6 +12709,13 @@ const centerScrollProps = {
12879
12709
  required: true,
12880
12710
  default: () => []
12881
12711
  },
12712
+ /**
12713
+ * 模式
12714
+ */
12715
+ mode: {
12716
+ type: String,
12717
+ default: ""
12718
+ },
12882
12719
  /**
12883
12720
  * 当前选中的值
12884
12721
  */
@@ -12891,7 +12728,7 @@ const centerScrollProps = {
12891
12728
  */
12892
12729
  height: {
12893
12730
  type: [String, Number],
12894
- default: 15
12731
+ default: 17
12895
12732
  }
12896
12733
  };
12897
12734
  const centerScrollEmits = {
@@ -12900,7 +12737,7 @@ const centerScrollEmits = {
12900
12737
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
12901
12738
  change: (value) => true
12902
12739
  };
12903
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
12740
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
12904
12741
  ...{
12905
12742
  name: "ToCenterScroll"
12906
12743
  },
@@ -12918,7 +12755,11 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
12918
12755
  const scrollTimeout = ref(null);
12919
12756
  const isScrollTo = ref(false);
12920
12757
  const changeBySelf = ref(false);
12758
+ const itemHeight = ref(0);
12921
12759
  const height = computed(() => Number(props.height));
12760
+ onMounted(() => {
12761
+ itemHeight.value = Number(((itemRefs.value[0].getBoundingClientRect().height || 0) / getEm()).toFixed(2));
12762
+ });
12922
12763
  const setItemRef = (el, index) => {
12923
12764
  if (el) {
12924
12765
  itemRefs.value[index] = el;
@@ -12938,6 +12779,12 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
12938
12779
  iData.value = JSON.parse(JSON.stringify(data));
12939
12780
  }
12940
12781
  };
12782
+ const setClass = computed(() => {
12783
+ let arr = [];
12784
+ if (props.mode)
12785
+ arr.push(`mode-${props.mode}`);
12786
+ return arr;
12787
+ });
12941
12788
  const onScroll = () => {
12942
12789
  if (!inited.value)
12943
12790
  return;
@@ -13042,14 +12889,13 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
13042
12889
  centerClosestItem
13043
12890
  });
13044
12891
  return (_ctx, _cache) => {
13045
- const _directive_dis = resolveDirective("dis");
13046
12892
  return openBlock(), createElementBlock("div", {
13047
- class: "to-centerScroll",
12893
+ class: normalizeClass(["to-centerScroll", setClass.value]),
13048
12894
  style: normalizeStyle({ height: `${height.value}em` })
13049
12895
  }, [
13050
12896
  createElementVNode("div", {
13051
12897
  class: "to-centerScroll-top",
13052
- style: normalizeStyle({ height: `${(height.value - 3) / 2}em` })
12898
+ style: normalizeStyle({ height: `${(height.value - itemHeight.value) / 2}em` })
13053
12899
  }, null, 4),
13054
12900
  createElementVNode("div", {
13055
12901
  ref_key: "scrollContainer",
@@ -13059,36 +12905,31 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
13059
12905
  }, [
13060
12906
  createElementVNode("div", {
13061
12907
  class: "to-centerScroll-wrapper",
13062
- style: normalizeStyle({
13063
- paddingTop: `${(height.value - 3) / 2}em`,
13064
- paddingBottom: `${(height.value - 3) / 2}em`
13065
- })
12908
+ style: normalizeStyle({ paddingTop: `${(height.value - itemHeight.value) / 2}em`, paddingBottom: `${(height.value - itemHeight.value) / 2}em` })
13066
12909
  }, [
13067
12910
  (openBlock(true), createElementBlock(Fragment, null, renderList(iData.value, (item, index) => {
13068
- return withDirectives((openBlock(), createElementBlock("div", {
12911
+ return openBlock(), createElementBlock("div", {
13069
12912
  key: index,
13070
12913
  ref_for: true,
13071
12914
  ref: (el) => setItemRef(el, index),
13072
- class: normalizeClass(["to-centerScroll-item", { "is-on": item.value === _ctx.modelValue }])
12915
+ class: normalizeClass(["to-centerScroll-item", { "is-on": item.value === _ctx.modelValue, "is-dis": item.disabled }])
13073
12916
  }, [
13074
- createTextVNode(toDisplayString(item.label), 1)
13075
- ], 2)), [
13076
- [_directive_dis, item.disabled]
13077
- ]);
12917
+ createElementVNode("span", { class: "to-centerScroll-item-text" }, toDisplayString(item.label), 1)
12918
+ ], 2);
13078
12919
  }), 128))
13079
12920
  ], 4)
13080
12921
  ], 544),
13081
12922
  createElementVNode("div", {
13082
12923
  class: "to-centerScroll-bottom",
13083
- style: normalizeStyle({ height: `${(height.value - 3) / 2}em` })
12924
+ style: normalizeStyle({ height: `${(height.value - itemHeight.value) / 2}em` })
13084
12925
  }, null, 4)
13085
- ], 4);
12926
+ ], 6);
13086
12927
  };
13087
12928
  }
13088
12929
  });
13089
- const ToCenterScroll = withInstall(_sfc_main$P);
12930
+ const ToCenterScroll = withInstall(_sfc_main$O);
13090
12931
  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$O = /* @__PURE__ */ defineComponent({
12932
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
13092
12933
  ...{
13093
12934
  name: "ToPicker"
13094
12935
  },
@@ -13130,12 +12971,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13130
12971
  const months = ref("01,02,03,04,05,06,07,08,09,10,11,12");
13131
12972
  const monthList = ref([]);
13132
12973
  const days = ref([]);
13133
- const minutes = ref(
13134
- "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"
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
- );
12974
+ 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");
12975
+ 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
12976
  const valueo = computed(() => {
13140
12977
  const [date, time] = formatDate(props.modelValue).split(" ");
13141
12978
  const [year2, month2, day2] = date.split("-");
@@ -13243,12 +13080,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13243
13080
  value: item
13244
13081
  };
13245
13082
  const date = /* @__PURE__ */ new Date(`${year.value}-${item}`);
13246
- const minDateValue = /* @__PURE__ */ new Date(
13247
- `${String(minDate.value.getFullYear())}-${addZero2(String(minDate.value.getMonth() + 1))}`
13248
- );
13249
- const maxDateValue = /* @__PURE__ */ new Date(
13250
- `${String(maxDate.value.getFullYear())}-${addZero2(String(maxDate.value.getMonth() + 1))}`
13251
- );
13083
+ const minDateValue = /* @__PURE__ */ new Date(`${String(minDate.value.getFullYear())}-${addZero2(String(minDate.value.getMonth() + 1))}`);
13084
+ const maxDateValue = /* @__PURE__ */ new Date(`${String(maxDate.value.getFullYear())}-${addZero2(String(maxDate.value.getMonth() + 1))}`);
13252
13085
  if (date >= minDateValue && date <= maxDateValue) {
13253
13086
  monthList.value.push(object);
13254
13087
  }
@@ -13281,16 +13114,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13281
13114
  value: dayValue,
13282
13115
  disabled: false
13283
13116
  };
13284
- const minDateValue = new Date(
13285
- minDate.value.getFullYear(),
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
- );
13117
+ const minDateValue = new Date(minDate.value.getFullYear(), minDate.value.getMonth(), minDate.value.getDate());
13118
+ const maxDateValue = new Date(maxDate.value.getFullYear(), maxDate.value.getMonth(), maxDate.value.getDate());
13294
13119
  const date = new Date(Number(year.value), Number(month.value) - 1, Number(dayValue));
13295
13120
  const inDateRange = date >= minDateValue && date <= maxDateValue;
13296
13121
  if (inDateRange) {
@@ -13344,10 +13169,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13344
13169
  }
13345
13170
  function submit() {
13346
13171
  if (props.type === "datetime") {
13347
- emit(
13348
- "change",
13349
- `${year.value}-${month.value}-${day.value} ${hour.value}:${minute.value}:${second.value}`
13350
- );
13172
+ emit("change", `${year.value}-${month.value}-${day.value} ${hour.value}:${minute.value}:${second.value}`);
13351
13173
  } else if (props.type === "time") {
13352
13174
  emit("change", `${hour.value}:${minute.value}:${second.value}`);
13353
13175
  } else {
@@ -13390,7 +13212,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13390
13212
  }
13391
13213
  return (_ctx, _cache) => {
13392
13214
  return openBlock(), createElementBlock(Fragment, null, [
13393
- createVNode(unref(ToGrid), {
13215
+ (openBlock(), createBlock(unref(ToGrid), {
13216
+ key: unref(langKey),
13394
13217
  space: "1",
13395
13218
  class: "to-picker-to-grid-container"
13396
13219
  }, {
@@ -13477,9 +13300,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13477
13300
  })
13478
13301
  ]),
13479
13302
  _: 1
13480
- }),
13303
+ })),
13481
13304
  createVNode(unref(ToGap)),
13482
- createVNode(unref(ToSubmit), { width: "full" }, {
13305
+ createVNode(unref(ToGrid), {
13306
+ gap: "1",
13307
+ col: "avg"
13308
+ }, {
13483
13309
  default: withCtx(() => [
13484
13310
  withDirectives((openBlock(), createBlock(unref(ToButton), {
13485
13311
  fillet: "normal",
@@ -13488,7 +13314,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13488
13314
  onClick: ($event) => _ctx.$emit("cancel")
13489
13315
  }, {
13490
13316
  default: withCtx(() => [
13491
- createTextVNode("取消 ")
13317
+ createTextVNode(toDisplayString(unref(t)("to.datepicker.cancel")), 1)
13492
13318
  ]),
13493
13319
  _: 1
13494
13320
  }, 8, ["onClick"])), [
@@ -13501,7 +13327,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13501
13327
  onClick: clear
13502
13328
  }, {
13503
13329
  default: withCtx(() => [
13504
- createTextVNode("清除 ")
13330
+ createTextVNode(toDisplayString(unref(t)("to.datepicker.clear")), 1)
13505
13331
  ]),
13506
13332
  _: 1
13507
13333
  })), [
@@ -13513,7 +13339,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13513
13339
  onClick: submit
13514
13340
  }, {
13515
13341
  default: withCtx(() => [
13516
- createTextVNode("确定")
13342
+ createTextVNode(toDisplayString(unref(t)("to.datepicker.confirm")), 1)
13517
13343
  ]),
13518
13344
  _: 1
13519
13345
  })), [
@@ -13753,13 +13579,14 @@ function useDatePicker(props, emit) {
13753
13579
  emitChangeEvent
13754
13580
  };
13755
13581
  }
13756
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
13582
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
13757
13583
  ...{
13758
13584
  name: "ToDatePicker",
13759
13585
  componentName: "ToDatePicker"
13760
13586
  },
13761
13587
  __name: "DatePicker",
13762
13588
  props: {
13589
+ flex: Boolean,
13763
13590
  suffix: {
13764
13591
  type: String,
13765
13592
  default: ""
@@ -13802,7 +13629,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
13802
13629
  },
13803
13630
  placeholder: {
13804
13631
  type: String,
13805
- default: "请选择"
13632
+ default: ""
13806
13633
  },
13807
13634
  disabled: Boolean,
13808
13635
  inputable: {
@@ -13999,8 +13826,10 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
13999
13826
  const _component_to_button = resolveComponent("to-button");
14000
13827
  return openBlock(), createBlock(unref(ToInput), {
14001
13828
  id: __props.id,
13829
+ key: unref(langKey),
14002
13830
  ref_key: "inputBox",
14003
13831
  ref: inputBox,
13832
+ flex: __props.flex ? __props.flex : null,
14004
13833
  "model-value": unref(datedisplay),
14005
13834
  class: "to-date-picker",
14006
13835
  readonly: !props.inputable,
@@ -14084,7 +13913,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
14084
13913
  }, null, 8, ["modelValue", "onUpdate:modelValue", "time", "type", "min", "max", "min-year", "max-year", "disabled-date", "before-change", "onClose"])
14085
13914
  ]),
14086
13915
  _: 1
14087
- })) : (openBlock(), createBlock(_sfc_main$O, {
13916
+ })) : (openBlock(), createBlock(_sfc_main$N, {
14088
13917
  key: 1,
14089
13918
  modelValue: unref(date),
14090
13919
  "onUpdate:modelValue": ($event) => isRef(date) ? date.value = $event : null,
@@ -14102,7 +13931,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
14102
13931
  showCloseLayer.value ? (openBlock(), createElementBlock("div", { key: 2 }, [
14103
13932
  createVNode(_component_to_button, { onClick: closeLayer }, {
14104
13933
  default: withCtx(() => [
14105
- createTextVNode("确定")
13934
+ createTextVNode(toDisplayString(unref(t)("to.datepicker.confirm")), 1)
14106
13935
  ]),
14107
13936
  _: 1
14108
13937
  })
@@ -14114,12 +13943,12 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
14114
13943
  ]))
14115
13944
  ]),
14116
13945
  _: 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"]);
13946
+ }, 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
13947
  };
14119
13948
  }
14120
13949
  });
14121
- withInstall(_sfc_main$N);
14122
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
13950
+ withInstall(_sfc_main$M);
13951
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
14123
13952
  ...{
14124
13953
  name: "ToDateRange"
14125
13954
  },
@@ -14130,14 +13959,16 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
14130
13959
  mode: { default: "default" },
14131
13960
  icon: { default: "date" },
14132
13961
  inputable: { type: Boolean, default: true },
14133
- startPlaceholder: { default: "开始日期" },
14134
- endPlaceholder: { default: "结束日期" },
13962
+ startPlaceholder: { default: "开始时间" },
13963
+ endPlaceholder: { default: "结束时间" },
14135
13964
  type: { default: "date" },
14136
13965
  min: { default: "" },
14137
13966
  max: { default: "" },
14138
13967
  disabled: { type: Boolean, default: false },
14139
13968
  clearable: { type: Boolean, default: true },
14140
- prefix: { default: "" }
13969
+ prefix: { default: "" },
13970
+ suffix: { default: "" },
13971
+ flex: { type: Boolean, default: false }
14141
13972
  },
14142
13973
  emits: ["update:modelValue", "focus", "change"],
14143
13974
  setup(__props, { emit: __emit }) {
@@ -14216,7 +14047,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
14216
14047
  if (props.disabled) {
14217
14048
  return;
14218
14049
  }
14219
- floatRef.value.open($el.value);
14050
+ floatRef.value.toggle($el.value);
14220
14051
  }
14221
14052
  function handleClose() {
14222
14053
  if (props.disabled) {
@@ -14231,6 +14062,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
14231
14062
  return openBlock(), createElementBlock("span", {
14232
14063
  ref_key: "$el",
14233
14064
  ref: $el,
14065
+ key: unref(langKey),
14066
+ flex: __props.flex ? __props.flex : null,
14234
14067
  class: normalizeClass(["to-date-range", setClass.value])
14235
14068
  }, [
14236
14069
  _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", {
@@ -14248,7 +14081,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
14248
14081
  withDirectives(createElementVNode("input", {
14249
14082
  "onUpdate:modelValue": ($event) => startDate.value = $event,
14250
14083
  class: "to-date-range-input",
14251
- placeholder: __props.startPlaceholder,
14084
+ placeholder: __props.startPlaceholder || unref(t)("to.daterange.startDate"),
14252
14085
  type: "text",
14253
14086
  readonly: !__props.inputable,
14254
14087
  onFocus: handleFocus
@@ -14260,7 +14093,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
14260
14093
  withDirectives(createElementVNode("input", {
14261
14094
  "onUpdate:modelValue": ($event) => endDate.value = $event,
14262
14095
  class: "to-date-range-input",
14263
- placeholder: __props.endPlaceholder,
14096
+ placeholder: __props.endPlaceholder || unref(t)("to.daterange.endDate"),
14264
14097
  type: "text",
14265
14098
  readonly: !__props.inputable,
14266
14099
  onFocus: handleFocus
@@ -14268,58 +14101,82 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
14268
14101
  [vModelText, endDate.value],
14269
14102
  [unref(vDis), __props.disabled]
14270
14103
  ]),
14271
- startDate.value && endDate.value && props.clearable ? (openBlock(), createBlock(unref(ToIcon), {
14104
+ startDate.value && endDate.value && props.clearable && !props.disabled ? (openBlock(), createBlock(unref(ToIcon), {
14272
14105
  key: 2,
14273
14106
  value: "close",
14274
14107
  link: "",
14275
- mode: "date-range-close",
14108
+ class: "to-date-range-clear",
14276
14109
  onClick: handleClose
14277
14110
  })) : createCommentVNode("", true),
14111
+ _ctx.$slots.suffix ? (openBlock(), createElementBlock("span", {
14112
+ key: 3,
14113
+ class: "to-date-range-suffix"
14114
+ }, [
14115
+ renderSlot(_ctx.$slots, "suffix")
14116
+ ])) : createCommentVNode("", true),
14117
+ props.suffix ? (openBlock(), createElementBlock("span", {
14118
+ key: 4,
14119
+ class: "to-date-range-suffix-text"
14120
+ }, [
14121
+ createElementVNode("span", null, toDisplayString(props.suffix), 1)
14122
+ ])) : createCommentVNode("", true),
14278
14123
  createVNode(unref(ToIcon), {
14124
+ link: __props.inputable,
14279
14125
  value: props.icon,
14280
- mode: "date-range-icon",
14126
+ class: "to-date-range-icon",
14281
14127
  onClick: handleOpen
14282
- }, null, 8, ["value"]),
14283
- createVNode(unref(ToFloat), {
14284
- ref_key: "floatRef",
14285
- ref: floatRef,
14286
- width: widthComputed.value
14287
- }, {
14288
- default: withCtx(() => [
14289
- createElementVNode("div", { class: "to-date-range-calendar-content" }, [
14290
- createVNode(unref(ToCalendar), {
14291
- modelValue: rangeValue.value,
14292
- "onUpdate:modelValue": ($event) => rangeValue.value = $event,
14293
- type: __props.type,
14294
- range: "",
14295
- min: __props.min,
14296
- max: __props.max
14297
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "min", "max"]),
14298
- createElementVNode("span", { class: "to-date-range-calendar-separator" }),
14299
- createVNode(unref(ToCalendar), {
14300
- modelValue: rangeValue.value,
14301
- "onUpdate:modelValue": ($event) => rangeValue.value = $event,
14302
- type: __props.type,
14303
- range: "",
14304
- "range-type": "end",
14305
- min: __props.min,
14306
- max: __props.max
14307
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "min", "max"])
14308
- ])
14309
- ]),
14310
- _: 1
14311
- }, 8, ["width"])
14312
- ], 2);
14128
+ }, null, 8, ["link", "value"]),
14129
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
14130
+ createElementVNode("div", {
14131
+ class: normalizeClass(["to-date-range", setClass.value])
14132
+ }, [
14133
+ createVNode(unref(ToFloat), {
14134
+ ref_key: "floatRef",
14135
+ ref: floatRef,
14136
+ class: "to-date-range-layer",
14137
+ width: widthComputed.value,
14138
+ global: false
14139
+ }, {
14140
+ default: withCtx(() => [
14141
+ createElementVNode("div", { class: "to-date-range-calendars" }, [
14142
+ createVNode(unref(ToCalendar), {
14143
+ modelValue: rangeValue.value,
14144
+ "onUpdate:modelValue": ($event) => rangeValue.value = $event,
14145
+ class: "to-date-range-calendar",
14146
+ type: __props.type,
14147
+ range: "",
14148
+ min: __props.min,
14149
+ max: __props.max
14150
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "min", "max"]),
14151
+ createElementVNode("span", { class: "to-date-range-divider" }),
14152
+ createVNode(unref(ToCalendar), {
14153
+ modelValue: rangeValue.value,
14154
+ "onUpdate:modelValue": ($event) => rangeValue.value = $event,
14155
+ class: "to-date-range-calendar",
14156
+ type: __props.type,
14157
+ range: "",
14158
+ "range-type": "end",
14159
+ min: __props.min,
14160
+ max: __props.max
14161
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "min", "max"])
14162
+ ])
14163
+ ]),
14164
+ _: 1
14165
+ }, 8, ["width"])
14166
+ ], 2)
14167
+ ]))
14168
+ ], 10, ["flex"]);
14313
14169
  };
14314
14170
  }
14315
14171
  });
14316
- withInstall(_sfc_main$M);
14317
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
14172
+ withInstall(_sfc_main$L);
14173
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
14318
14174
  ...{
14319
14175
  name: "ToSwitch"
14320
14176
  },
14321
14177
  __name: "switch",
14322
14178
  props: {
14179
+ flex: Boolean,
14323
14180
  readonly: Boolean,
14324
14181
  modelValue: {
14325
14182
  type: [Boolean, String, Number],
@@ -14478,6 +14335,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
14478
14335
  const _directive_dis = resolveDirective("dis");
14479
14336
  const _directive_tip = resolveDirective("tip");
14480
14337
  return withDirectives((openBlock(), createElementBlock("div", {
14338
+ flex: __props.flex ? __props.flex : null,
14481
14339
  class: normalizeClass(["to-switch", setClass.value]),
14482
14340
  style: normalizeStyle(setStyle.value),
14483
14341
  onClick: toggle
@@ -14505,7 +14363,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
14505
14363
  }, null, 8, ["value"])) : createCommentVNode("", true)
14506
14364
  ]),
14507
14365
  createElementVNode("div", { class: "to-switch-slider" })
14508
- ], 6)), [
14366
+ ], 14, ["flex"])), [
14509
14367
  [
14510
14368
  _directive_dis,
14511
14369
  disabled.value,
@@ -14517,13 +14375,14 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
14517
14375
  };
14518
14376
  }
14519
14377
  });
14520
- withInstall(_sfc_main$L);
14521
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
14378
+ withInstall(_sfc_main$K);
14379
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
14522
14380
  ...{
14523
14381
  name: "ToTab"
14524
14382
  },
14525
14383
  __name: "tab",
14526
14384
  props: {
14385
+ flex: { type: Boolean, default: false },
14527
14386
  modelValue: { default: "" },
14528
14387
  itemWidth: { default: "" },
14529
14388
  mode: { default: "default" },
@@ -14736,6 +14595,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
14736
14595
  stopChange = false;
14737
14596
  }, 10);
14738
14597
  }
14598
+ function updateTabLabel(oldLabel, label) {
14599
+ let idx = _data.value.findIndex((item) => item.label === oldLabel);
14600
+ if (idx !== -1) {
14601
+ _data.value[idx].label = label;
14602
+ }
14603
+ }
14739
14604
  function getPicOn(pic) {
14740
14605
  let src = "";
14741
14606
  if (pic && props.changePic) {
@@ -14788,12 +14653,15 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
14788
14653
  provide("TabProvide", {
14789
14654
  addTab,
14790
14655
  removeTab,
14656
+ updateTabLabel,
14791
14657
  selectValue
14792
14658
  });
14793
14659
  return (_ctx, _cache) => {
14794
14660
  const _component_to_pic = resolveComponent("to-pic");
14795
14661
  return openBlock(), createElementBlock("div", {
14662
+ key: unref(langKey),
14796
14663
  class: normalizeClass(["to-tab", setClass.value]),
14664
+ flex: __props.flex ? __props.flex : null,
14797
14665
  style: normalizeStyle(setStyle.value)
14798
14666
  }, [
14799
14667
  createElementVNode("div", { class: "to-tab-tab" }, [
@@ -14839,8 +14707,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
14839
14707
  item.pic ? (openBlock(), createBlock(_component_to_pic, {
14840
14708
  key: 0,
14841
14709
  class: "to-tab-item-pic",
14842
- src: item.value === selectValue.value ? getPicOn(item.pic) : item.pic,
14843
- width: 2
14710
+ src: item.value === selectValue.value ? getPicOn(item.pic) : item.pic
14844
14711
  }, null, 8, ["src"])) : createCommentVNode("", true),
14845
14712
  item.icon ? (openBlock(), createElementBlock("span", {
14846
14713
  key: 1,
@@ -14921,11 +14788,11 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
14921
14788
  }, [
14922
14789
  renderSlot(_ctx.$slots, "default")
14923
14790
  ]))
14924
- ], 6);
14791
+ ], 14, ["flex"]);
14925
14792
  };
14926
14793
  }
14927
14794
  });
14928
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
14795
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
14929
14796
  ...{
14930
14797
  name: "ToTabItem"
14931
14798
  },
@@ -14955,6 +14822,14 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
14955
14822
  const show = computed(() => {
14956
14823
  return tabProvide.selectValue.value === (props.value || props.label);
14957
14824
  });
14825
+ watch(
14826
+ () => props.label,
14827
+ (newLabel, oldLabel) => {
14828
+ if (tabProvide && tabProvide.updateTabLabel) {
14829
+ tabProvide.updateTabLabel(oldLabel, newLabel);
14830
+ }
14831
+ }
14832
+ );
14958
14833
  function init() {
14959
14834
  const tabData = {
14960
14835
  label: props.label,
@@ -14976,7 +14851,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
14976
14851
  });
14977
14852
  return (_ctx, _cache) => {
14978
14853
  return (__props.lazy ? show.value : true) ? withDirectives((openBlock(), createElementBlock("div", {
14979
- key: 0,
14854
+ key: unref(langKey),
14980
14855
  class: normalizeClass(["to-tab-page-item", setClass.value])
14981
14856
  }, [
14982
14857
  renderSlot(_ctx.$slots, "default")
@@ -14986,9 +14861,9 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
14986
14861
  };
14987
14862
  }
14988
14863
  });
14989
- withInstall(_sfc_main$K, { TabItem: _sfc_main$J });
14990
- withInstall(_sfc_main$J);
14991
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
14864
+ withInstall(_sfc_main$J, { TabItem: _sfc_main$I });
14865
+ withInstall(_sfc_main$I);
14866
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
14992
14867
  ...{
14993
14868
  name: "ToTableHead"
14994
14869
  },
@@ -14999,9 +14874,41 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
14999
14874
  },
15000
14875
  emits: ["change"],
15001
14876
  setup(__props, { expose: __expose, emit: __emit }) {
14877
+ const tableRef = inject("TableRef");
15002
14878
  const emit = __emit;
15003
14879
  const props = __props;
15004
14880
  const row = ref(null);
14881
+ const sortSet = ref({});
14882
+ watch(
14883
+ () => props.data,
14884
+ (val) => {
14885
+ val.forEach((item) => {
14886
+ if (item.sortable) {
14887
+ sortSet.value[item.prop] = sortSet.value[item.prop] || "";
14888
+ }
14889
+ });
14890
+ },
14891
+ { deep: true }
14892
+ );
14893
+ onMounted(() => {
14894
+ props.data.forEach((item) => {
14895
+ if (item.sortable) {
14896
+ sortSet.value[item.prop] = sortSet.value[item.prop] || "";
14897
+ }
14898
+ });
14899
+ });
14900
+ const sortClick = (column) => {
14901
+ if (!column.sortable)
14902
+ return false;
14903
+ if (sortSet.value[column.prop] === "asc") {
14904
+ sortSet.value[column.prop] = "desc";
14905
+ } else if (sortSet.value[column.prop] === "desc") {
14906
+ sortSet.value[column.prop] = "";
14907
+ } else {
14908
+ sortSet.value[column.prop] = "asc";
14909
+ }
14910
+ tableRef.handleTheadCellClick(column, sortSet.value[column.prop]);
14911
+ };
15005
14912
  const setThClass = (column) => {
15006
14913
  return computed(() => {
15007
14914
  const classes = [];
@@ -15010,6 +14917,9 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
15010
14917
  } else if (column.thWrap === false) {
15011
14918
  classes.push("is-nowrap");
15012
14919
  }
14920
+ if (sortSet.value[column.prop]) {
14921
+ classes.push(`type-${sortSet.value[column.prop]}`);
14922
+ }
15013
14923
  return classes;
15014
14924
  });
15015
14925
  };
@@ -15039,8 +14949,18 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
15039
14949
  }, null, 8, ["model-value"])
15040
14950
  ])) : column._show !== false ? (openBlock(), createElementBlock("th", {
15041
14951
  key: column.prop,
15042
- class: normalizeClass(["to-table-th", setThClass(column).value])
15043
- }, toDisplayString(column.label), 3)) : createCommentVNode("", true)
14952
+ class: normalizeClass(["to-table-th", setThClass(column).value]),
14953
+ onClick: ($event) => sortClick(column)
14954
+ }, [
14955
+ createElementVNode("span", null, toDisplayString(column.label), 1),
14956
+ column.sortable ? (openBlock(), createElementBlock("span", {
14957
+ key: 0,
14958
+ class: "to-table-sorticon"
14959
+ }, [
14960
+ createElementVNode("span", { class: "to-table-sorticon-item ascending" }),
14961
+ createElementVNode("span", { class: "to-table-sorticon-item descending" })
14962
+ ])) : createCommentVNode("", true)
14963
+ ], 10, ["onClick"])) : createCommentVNode("", true)
15044
14964
  ], 64);
15045
14965
  }), 256))
15046
14966
  ])
@@ -15048,7 +14968,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
15048
14968
  };
15049
14969
  }
15050
14970
  });
15051
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
14971
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15052
14972
  ...{
15053
14973
  name: "ToTableBody"
15054
14974
  },
@@ -15178,113 +15098,146 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
15178
15098
  }
15179
15099
  });
15180
15100
  }
15101
+ const tableRef = inject("TableRef");
15102
+ function toggleDetail(row, index) {
15103
+ if (row.detailShow) {
15104
+ row.detailShow = false;
15105
+ } else {
15106
+ row.detailShow = true;
15107
+ }
15108
+ tableRef.hanldeDetailChange(row, index, row.detailShow);
15109
+ }
15181
15110
  __expose({
15182
15111
  checkAll,
15183
15112
  flatData,
15184
15113
  setCheckData
15185
15114
  });
15186
- return (_ctx, _cache) => {
15187
- const _component_ToCheckbox = resolveComponent("ToCheckbox");
15188
- const _directive_tip = resolveDirective("tip");
15189
- return openBlock(), createElementBlock("tbody", {
15190
- ref_key: "$el",
15191
- ref: $el,
15192
- class: "to-table-body"
15193
- }, [
15194
- (openBlock(true), createElementBlock(Fragment, null, renderList(visibleRows.value, (row, index) => {
15195
- return openBlock(), createElementBlock("tr", {
15196
- key: index,
15197
- class: "to-table-body-row"
15198
- }, [
15199
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.columnData, (column) => {
15200
- return openBlock(), createElementBlock(Fragment, null, [
15201
- column.type === "check" ? (openBlock(), createElementBlock("td", {
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
15115
+ return (_ctx, _cache) => {
15116
+ const _component_ToCheckbox = resolveComponent("ToCheckbox");
15117
+ const _directive_tip = resolveDirective("tip");
15118
+ return openBlock(), createElementBlock("tbody", {
15119
+ ref_key: "$el",
15120
+ ref: $el,
15121
+ class: "to-table-body"
15122
+ }, [
15123
+ (openBlock(true), createElementBlock(Fragment, null, renderList(visibleRows.value, (row, index) => {
15124
+ return openBlock(), createElementBlock(Fragment, { key: index }, [
15125
+ createElementVNode("tr", { class: "to-table-body-row" }, [
15126
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.columnData, (column) => {
15127
+ return openBlock(), createElementBlock(Fragment, null, [
15128
+ column.type === "check" ? (openBlock(), createElementBlock("td", {
15129
+ key: column.prop + "check",
15130
+ class: "to-table-td type-check"
15238
15131
  }, [
15239
- hasChildren(row) && column.toggler ? (openBlock(), createElementBlock("span", {
15240
- key: 0,
15241
- class: normalizeClass(["to-table-toggle", { "is-expand": expandedSet.value.has(row._id) }]),
15242
- onClick: ($event) => toggleExpand(row)
15243
- }, null, 10, ["onClick"])) : createCommentVNode("", true),
15244
- renderSlot(_ctx.$slots, column.prop, {
15245
- row,
15246
- column,
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
15132
+ createVNode(_component_ToCheckbox, {
15133
+ modelValue: row._checked,
15134
+ "onUpdate:modelValue": ($event) => row._checked = $event,
15135
+ onChange: change
15136
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
15137
+ ])) : column.type === "radio" ? (openBlock(), createElementBlock("td", {
15138
+ key: column.prop + "radio",
15139
+ class: "to-table-td type-check"
15259
15140
  }, [
15260
- hasChildren(row) && column.toggler ? (openBlock(), createElementBlock("span", {
15261
- key: 0,
15262
- class: normalizeClass(["to-table-toggle", { "is-expand": expandedSet.value.has(row._id) }]),
15263
- onClick: ($event) => toggleExpand(row)
15264
- }, null, 10, ["onClick"])) : createCommentVNode("", true),
15265
- renderSlot(_ctx.$slots, column.prop, {
15266
- row,
15267
- column,
15268
- index
15269
- }, () => [
15270
- createElementVNode("span", null, toDisplayString(row[column.prop]), 1)
15141
+ createElementVNode("div", {
15142
+ class: normalizeClass(["to-table-radio", { "is-checked": row._checked }]),
15143
+ onClick: ($event) => radioChange(row)
15144
+ }, null, 10, ["onClick"])
15145
+ ])) : column.type === "action" ? (openBlock(), createElementBlock("td", {
15146
+ key: column.prop + "action",
15147
+ class: "to-table-td type-action"
15148
+ }, [
15149
+ createElementVNode("div", { class: "to-table-action" }, [
15150
+ renderSlot(_ctx.$slots, column.prop, {
15151
+ row,
15152
+ column,
15153
+ index
15154
+ }, () => [
15155
+ createTextVNode(toDisplayString(row[column.prop]), 1)
15156
+ ])
15271
15157
  ])
15272
- ], 46, ["onMouseenter"]))
15273
- ], 64)) : createCommentVNode("", true)
15274
- ], 64);
15275
- }), 256))
15276
- ]);
15158
+ ])) : column._show !== false ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
15159
+ tipShow.value === index && column.showTip ? withDirectives((openBlock(), createElementBlock("td", {
15160
+ key: column.prop,
15161
+ class: normalizeClass(["to-table-td", setTdClass(column).value]),
15162
+ style: normalizeStyle({ paddingLeft: column.toggler && row._level ? `${row._level + 2}em` : "" }),
15163
+ onMouseenter: (e) => handleMouseEnter(e, index),
15164
+ onMouseleave: handleMouseLeave
15165
+ }, [
15166
+ hasChildren(row) && column.toggler ? (openBlock(), createElementBlock("span", {
15167
+ key: 0,
15168
+ class: normalizeClass(["to-table-toggle", { "is-expand": expandedSet.value.has(row._id) }]),
15169
+ onClick: ($event) => toggleExpand(row)
15170
+ }, null, 10, ["onClick"])) : createCommentVNode("", true),
15171
+ column.detailToggle ? (openBlock(), createElementBlock("span", {
15172
+ key: 1,
15173
+ class: normalizeClass(["to-table-detail-toggle", { "is-detail": row.detailShow }]),
15174
+ onClick: ($event) => toggleDetail(row, index)
15175
+ }, null, 10, ["onClick"])) : createCommentVNode("", true),
15176
+ renderSlot(_ctx.$slots, column.prop, {
15177
+ row,
15178
+ column,
15179
+ index
15180
+ }, () => [
15181
+ createElementVNode("span", null, toDisplayString(row[column.prop]), 1)
15182
+ ])
15183
+ ], 46, ["onMouseenter"])), [
15184
+ [_directive_tip, row[column.prop]]
15185
+ ]) : (openBlock(), createElementBlock("td", {
15186
+ key: column.prop + "else",
15187
+ class: normalizeClass(["to-table-td", setTdClass(column).value]),
15188
+ style: normalizeStyle({ paddingLeft: column.toggler && row._level ? `${row._level + 2}em` : "" }),
15189
+ onMouseenter: (e) => handleMouseEnter(e, index),
15190
+ onMouseleave: handleMouseLeave
15191
+ }, [
15192
+ hasChildren(row) && column.toggler ? (openBlock(), createElementBlock("span", {
15193
+ key: 0,
15194
+ class: normalizeClass(["to-table-toggle", { "is-expand": expandedSet.value.has(row._id) }]),
15195
+ onClick: ($event) => toggleExpand(row)
15196
+ }, null, 10, ["onClick"])) : createCommentVNode("", true),
15197
+ column.detailToggle ? (openBlock(), createElementBlock("span", {
15198
+ key: 1,
15199
+ class: normalizeClass(["to-table-detail-toggle", { "is-detail": row.detailShow }]),
15200
+ onClick: ($event) => toggleDetail(row, index)
15201
+ }, null, 10, ["onClick"])) : createCommentVNode("", true),
15202
+ renderSlot(_ctx.$slots, column.prop, {
15203
+ row,
15204
+ column,
15205
+ index
15206
+ }, () => [
15207
+ createElementVNode("span", null, toDisplayString(row[column.prop]), 1)
15208
+ ])
15209
+ ], 46, ["onMouseenter"]))
15210
+ ], 64)) : createCommentVNode("", true)
15211
+ ], 64);
15212
+ }), 256))
15213
+ ]),
15214
+ row.detailShow ? (openBlock(), createElementBlock("tr", {
15215
+ key: 0,
15216
+ class: "to-table-detail-row"
15217
+ }, [
15218
+ createElementVNode("td", {
15219
+ colspan: props.columnData.length,
15220
+ class: "to-table-detail-cell"
15221
+ }, [
15222
+ renderSlot(_ctx.$slots, "detail", {
15223
+ row,
15224
+ index
15225
+ })
15226
+ ], 8, ["colspan"])
15227
+ ])) : createCommentVNode("", true)
15228
+ ], 64);
15277
15229
  }), 128))
15278
15230
  ], 512);
15279
15231
  };
15280
15232
  }
15281
15233
  });
15282
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
15234
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
15283
15235
  ...{
15284
15236
  name: "ToTable"
15285
15237
  },
15286
15238
  __name: "table",
15287
15239
  props: {
15240
+ flex: { type: Boolean, default: false },
15288
15241
  columns: { default: () => [] },
15289
15242
  data: { default: () => [] },
15290
15243
  height: { default: "" },
@@ -15294,11 +15247,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15294
15247
  mode: { default: "default" },
15295
15248
  wrap: { type: Boolean, default: false },
15296
15249
  thWrap: { type: Boolean, default: false },
15297
- emptyText: { default: "暂无数据" },
15250
+ emptyText: { default: "" },
15298
15251
  modelValue: { default: "" },
15299
- valueKeys: { default: "_id" }
15252
+ valueKeys: { default: "_id" },
15253
+ sortFunction: { type: [Function, null], default: null }
15300
15254
  },
15301
- emits: ["change", "update:modelValue"],
15255
+ emits: ["change", "update:modelValue", "sort", "detailChange"],
15302
15256
  setup(__props, { emit: __emit }) {
15303
15257
  const emit = __emit;
15304
15258
  const props = __props;
@@ -15574,6 +15528,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15574
15528
  });
15575
15529
  return flag;
15576
15530
  });
15531
+ function sortChange(sortInfo) {
15532
+ emit("sort", sortInfo);
15533
+ }
15577
15534
  const hasCheck = computed(() => {
15578
15535
  let flag = false;
15579
15536
  props.columns.map((item) => {
@@ -15641,10 +15598,24 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15641
15598
  }
15642
15599
  }
15643
15600
  }
15601
+ const handleTheadCellClick = (column, type) => {
15602
+ if (props.sortFunction) {
15603
+ props.sortFunction(column, type);
15604
+ }
15605
+ };
15606
+ const hanldeDetailChange = (column, index, value) => {
15607
+ emit("detailChange", column, index, value);
15608
+ };
15609
+ provide("TableRef", {
15610
+ handleTheadCellClick,
15611
+ hanldeDetailChange
15612
+ });
15644
15613
  return (_ctx, _cache) => {
15645
15614
  return openBlock(), createElementBlock("div", {
15646
15615
  ref_key: "$el",
15647
15616
  ref: $el,
15617
+ key: unref(langKey),
15618
+ flex: __props.flex ? __props.flex : null,
15648
15619
  class: normalizeClass(["to-table", setClass.value]),
15649
15620
  style: normalizeStyle(setStyle.value)
15650
15621
  }, [
@@ -15668,14 +15639,15 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15668
15639
  }, null, 6);
15669
15640
  }), 128))
15670
15641
  ]),
15671
- createVNode(_sfc_main$I, {
15642
+ createVNode(_sfc_main$H, {
15672
15643
  ref_key: "bodyHead",
15673
15644
  ref: bodyHead,
15674
15645
  "checked-all": checkedAll.value,
15675
15646
  data: __props.columns,
15676
- onChange: checkedAllChange
15647
+ onChange: checkedAllChange,
15648
+ onSort: sortChange
15677
15649
  }, null, 8, ["checked-all", "data"]),
15678
- createVNode(_sfc_main$H, {
15650
+ createVNode(_sfc_main$G, {
15679
15651
  ref_key: "bodyBody",
15680
15652
  ref: bodyBody,
15681
15653
  type: hasRadio.value ? "radio" : hasCheck.value ? "check" : "",
@@ -15683,7 +15655,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15683
15655
  "checked-all": checkedAll.value,
15684
15656
  "column-data": __props.columns,
15685
15657
  onChange: change
15686
- }, createSlots({ _: 2 }, [
15658
+ }, createSlots({
15659
+ detail: withCtx((slotProps) => [
15660
+ renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(slotProps)))
15661
+ ]),
15662
+ _: 2
15663
+ }, [
15687
15664
  renderList(flattenColumns.value, (columnItem) => {
15688
15665
  return {
15689
15666
  name: columnItem.prop,
@@ -15697,7 +15674,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15697
15674
  !__props.data.length ? (openBlock(), createElementBlock("div", {
15698
15675
  key: 0,
15699
15676
  class: "to-table-empty"
15700
- }, toDisplayString(props.emptyText), 1)) : createCommentVNode("", true)
15677
+ }, toDisplayString(props.emptyText || unref(t)("to.table.emptyText")), 1)) : createCommentVNode("", true)
15701
15678
  ], 544),
15702
15679
  Number(__props.fixTop) > 0 ? (openBlock(), createElementBlock("div", {
15703
15680
  key: 0,
@@ -15710,11 +15687,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15710
15687
  ref: topTable,
15711
15688
  class: "to-table-table"
15712
15689
  }, [
15713
- createVNode(_sfc_main$I, {
15690
+ createVNode(_sfc_main$H, {
15714
15691
  ref_key: "topHead",
15715
15692
  ref: topHead,
15716
15693
  data: __props.columns,
15717
- onChange: checkedAllChange
15694
+ onChange: checkedAllChange,
15695
+ onSort: sortChange
15718
15696
  }, null, 8, ["data"])
15719
15697
  ], 512)
15720
15698
  ], 512)) : createCommentVNode("", true),
@@ -15729,19 +15707,25 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15729
15707
  ref: leftTable,
15730
15708
  class: "to-table-table"
15731
15709
  }, [
15732
- createVNode(_sfc_main$I, {
15710
+ createVNode(_sfc_main$H, {
15733
15711
  ref_key: "leftHead",
15734
15712
  ref: leftHead,
15735
15713
  data: __props.columns.slice(0, Number(props.fixLeft)),
15736
- onChange: checkedAllChange
15714
+ onChange: checkedAllChange,
15715
+ onSort: sortChange
15737
15716
  }, null, 8, ["data"]),
15738
- createVNode(_sfc_main$H, {
15717
+ createVNode(_sfc_main$G, {
15739
15718
  ref_key: "leftBody",
15740
15719
  ref: leftBody,
15741
15720
  data: __props.data,
15742
15721
  "column-data": __props.columns.slice(0, Number(props.fixLeft)),
15743
15722
  onChange: change
15744
- }, createSlots({ _: 2 }, [
15723
+ }, createSlots({
15724
+ detail: withCtx((slotProps) => [
15725
+ renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(slotProps)))
15726
+ ]),
15727
+ _: 2
15728
+ }, [
15745
15729
  renderList(flattenColumns.value, (columnItem) => {
15746
15730
  return {
15747
15731
  name: columnItem.prop,
@@ -15764,11 +15748,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15764
15748
  ref: leftTopTable,
15765
15749
  class: "to-table-table"
15766
15750
  }, [
15767
- createVNode(_sfc_main$I, {
15751
+ createVNode(_sfc_main$H, {
15768
15752
  ref_key: "leftTopHead",
15769
15753
  ref: leftTopHead,
15770
15754
  data: __props.columns.slice(0, Number(props.fixLeft)),
15771
- onChange: checkedAllChange
15755
+ onChange: checkedAllChange,
15756
+ onSort: sortChange
15772
15757
  }, null, 8, ["data"])
15773
15758
  ], 512)
15774
15759
  ], 512)) : createCommentVNode("", true),
@@ -15783,19 +15768,25 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15783
15768
  ref: rightTable,
15784
15769
  class: "to-table-table"
15785
15770
  }, [
15786
- createVNode(_sfc_main$I, {
15771
+ createVNode(_sfc_main$H, {
15787
15772
  ref_key: "rightHead",
15788
15773
  ref: rightHead,
15789
15774
  data: __props.columns.slice(__props.columns.length - Number(props.fixRight), __props.columns.length),
15790
- onChange: checkedAllChange
15775
+ onChange: checkedAllChange,
15776
+ onSort: sortChange
15791
15777
  }, null, 8, ["data"]),
15792
- createVNode(_sfc_main$H, {
15778
+ createVNode(_sfc_main$G, {
15793
15779
  ref_key: "rightBody",
15794
15780
  ref: rightBody,
15795
15781
  data: __props.data,
15796
15782
  "column-data": __props.columns.slice(__props.columns.length - Number(__props.fixRight), __props.columns.length),
15797
15783
  onChange: change
15798
- }, createSlots({ _: 2 }, [
15784
+ }, createSlots({
15785
+ detail: withCtx((slotProps) => [
15786
+ renderSlot(_ctx.$slots, "detail", normalizeProps(guardReactiveProps(slotProps)))
15787
+ ]),
15788
+ _: 2
15789
+ }, [
15799
15790
  renderList(flattenColumns.value, (columnItem) => {
15800
15791
  return {
15801
15792
  name: columnItem.prop,
@@ -15818,19 +15809,20 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
15818
15809
  ref: rightTopTable,
15819
15810
  class: "to-table-table"
15820
15811
  }, [
15821
- createVNode(_sfc_main$I, {
15812
+ createVNode(_sfc_main$H, {
15822
15813
  ref_key: "rightTopHead",
15823
15814
  ref: rightTopHead,
15824
- data: __props.columns.slice(__props.columns.length - Number(__props.fixRight), __props.columns.length),
15825
- onChange: checkedAllChange
15815
+ data: __props.columns.slice(__props.columns.length - Number(props.fixRight), __props.columns.length),
15816
+ onChange: checkedAllChange,
15817
+ onSort: sortChange
15826
15818
  }, null, 8, ["data"])
15827
15819
  ], 512)
15828
15820
  ], 512)) : createCommentVNode("", true)
15829
- ], 6);
15821
+ ], 14, ["flex"]);
15830
15822
  };
15831
15823
  }
15832
15824
  });
15833
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
15825
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
15834
15826
  ...{
15835
15827
  name: "ToTableConfig"
15836
15828
  },
@@ -15993,11 +15985,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
15993
15985
  };
15994
15986
  }
15995
15987
  });
15996
- withInstall(_sfc_main$G);
15997
- withInstall(_sfc_main$I);
15998
- withInstall(_sfc_main$H);
15999
15988
  withInstall(_sfc_main$F);
16000
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
15989
+ withInstall(_sfc_main$H);
15990
+ withInstall(_sfc_main$G);
15991
+ withInstall(_sfc_main$E);
15992
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
16001
15993
  ...{
16002
15994
  name: "ToTag",
16003
15995
  componentName: "ToTag"
@@ -16011,7 +16003,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
16011
16003
  position: { default: "" },
16012
16004
  link: { type: Boolean, default: false },
16013
16005
  type: { default: "normal" },
16014
- offset: { default: 0 }
16006
+ offset: { default: 0 },
16007
+ flex: { type: Boolean, default: false }
16015
16008
  },
16016
16009
  emits: ["remove", "beforeRemove"],
16017
16010
  setup(__props, { emit: __emit }) {
@@ -16071,6 +16064,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
16071
16064
  const _component_to_icon = resolveComponent("to-icon");
16072
16065
  return openBlock(), createElementBlock("div", {
16073
16066
  class: normalizeClass(["to-tag", setClass.value]),
16067
+ flex: __props.flex ? __props.flex : null,
16074
16068
  style: normalizeStyle(setStyle.value)
16075
16069
  }, [
16076
16070
  createElementVNode("div", { class: "to-tag-wrapper" }, [
@@ -16092,15 +16086,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
16092
16086
  onClick: withModifiers(removeHandle, ["stop"])
16093
16087
  })) : createCommentVNode("", true)
16094
16088
  ])
16095
- ], 6);
16089
+ ], 14, ["flex"]);
16096
16090
  };
16097
16091
  }
16098
16092
  });
16099
- const ToTag = withInstall(_sfc_main$E);
16100
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
16093
+ const ToTag = withInstall(_sfc_main$D);
16094
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
16101
16095
  ...{ name: "ToText" },
16102
16096
  __name: "text",
16103
16097
  props: {
16098
+ flex: { type: Boolean },
16104
16099
  data: { default: "" },
16105
16100
  indent: { default: 0 },
16106
16101
  mode: { default: "" },
@@ -16209,8 +16204,6 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
16209
16204
  return result;
16210
16205
  });
16211
16206
  return (_ctx, _cache) => {
16212
- const _component_to_icon = resolveComponent("to-icon");
16213
- const _directive_size = resolveDirective("size");
16214
16207
  return withDirectives((openBlock(), createBlock(resolveDynamicComponent(__props.link ? "a" : "span"), {
16215
16208
  ref: "$el2",
16216
16209
  href: __props.href ? __props.href : __props.link ? "javscript:void(0)" : "",
@@ -16219,7 +16212,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
16219
16212
  }, {
16220
16213
  default: withCtx(() => [
16221
16214
  renderSlot(_ctx.$slots, "icon", {}, () => [
16222
- props.icon ? (openBlock(), createBlock(_component_to_icon, {
16215
+ props.icon ? (openBlock(), createBlock(unref(ToIcon), {
16223
16216
  key: 0,
16224
16217
  class: "to-text-icon",
16225
16218
  value: props.icon
@@ -16234,13 +16227,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
16234
16227
  ]),
16235
16228
  _: 3
16236
16229
  }, 8, ["href", "class", "style"])), [
16237
- [_directive_size, __props.size]
16230
+ [unref(vSizeDirective), __props.size]
16238
16231
  ]);
16239
16232
  };
16240
16233
  }
16241
16234
  });
16242
- withInstall(_sfc_main$D);
16235
+ withInstall(_sfc_main$C);
16243
16236
  const tipProps = {
16237
+ flex: Boolean,
16244
16238
  // 图标
16245
16239
  icon: { type: [String, Boolean], default: "info" },
16246
16240
  // 显示内容
@@ -16273,7 +16267,7 @@ const tipProps = {
16273
16267
  open: { type: Function, default: () => true }
16274
16268
  };
16275
16269
  const tipEmits = ["delete", "close", "remove"];
16276
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
16270
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
16277
16271
  ...{
16278
16272
  name: "ToTip"
16279
16273
  },
@@ -16406,9 +16400,10 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
16406
16400
  __expose({ open: open2, close: close2 });
16407
16401
  return (_ctx, _cache) => {
16408
16402
  return isShow.value || _ctx.position === "top" || _ctx.position === "center" ? (openBlock(), createElementBlock("div", {
16409
- key: 0,
16403
+ key: unref(langKey),
16410
16404
  ref_key: "tipRef",
16411
16405
  ref: tipRef,
16406
+ flex: _ctx.flex ? _ctx.flex : null,
16412
16407
  class: normalizeClass(["to-tip", setClass.value]),
16413
16408
  onMouseenter: mouseEnterHandle,
16414
16409
  onMouseleave: mouseLeaveHandle
@@ -16430,7 +16425,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
16430
16425
  onClick: remove
16431
16426
  }, {
16432
16427
  default: withCtx(() => [
16433
- createTextVNode("不再显示")
16428
+ createTextVNode(toDisplayString(unref(t)("to.tip.dontShowAgain")), 1)
16434
16429
  ]),
16435
16430
  _: 1
16436
16431
  })) : createCommentVNode("", true),
@@ -16442,11 +16437,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
16442
16437
  onClick: ($event) => colseAction()
16443
16438
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
16444
16439
  ])
16445
- ], 34)) : createCommentVNode("", true);
16440
+ ], 42, ["flex"])) : createCommentVNode("", true);
16446
16441
  };
16447
16442
  }
16448
16443
  });
16449
- const ToTip = withInstall(_sfc_main$C);
16444
+ const ToTip = withInstall(_sfc_main$B);
16450
16445
  function createTipInstance(app, ...args) {
16451
16446
  if (args.length === 0)
16452
16447
  return Promise.reject("无效的 tip 内容");
@@ -16516,7 +16511,7 @@ function createTipInstance(app, ...args) {
16516
16511
  const container = document.createElement("div");
16517
16512
  container.setAttribute("id", uuid);
16518
16513
  body.appendChild(container);
16519
- const vnode = createVNode(_sfc_main$C, {
16514
+ const vnode = createVNode(_sfc_main$B, {
16520
16515
  ...options,
16521
16516
  onClose: () => {
16522
16517
  setTimeout(() => {
@@ -16583,6 +16578,7 @@ ToTip.install = (app) => {
16583
16578
  app.config.globalProperties.$tip = tip;
16584
16579
  };
16585
16580
  const tooltipProps = {
16581
+ flex: Boolean,
16586
16582
  position: {
16587
16583
  type: String,
16588
16584
  default: "auto"
@@ -16633,7 +16629,7 @@ const tooltipProps = {
16633
16629
  }
16634
16630
  };
16635
16631
  const tooltipEmits = ["beforeOpen", "opened"];
16636
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
16632
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
16637
16633
  ...{
16638
16634
  name: "ToTooltip"
16639
16635
  },
@@ -16944,6 +16940,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
16944
16940
  key: 0,
16945
16941
  ref_key: "tooltip",
16946
16942
  ref: tooltip,
16943
+ flex: _ctx.flex ? _ctx.flex : null,
16947
16944
  class: normalizeClass(["to-tooltip", setClass.value]),
16948
16945
  style: normalizeStyle(setStyle.value)
16949
16946
  }, [
@@ -16961,16 +16958,17 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
16961
16958
  renderSlot(_ctx.$slots, "default")
16962
16959
  ])
16963
16960
  ], 512)
16964
- ], 6)) : createCommentVNode("", true);
16961
+ ], 14, ["flex"])) : createCommentVNode("", true);
16965
16962
  };
16966
16963
  }
16967
16964
  });
16968
- const ToTooltip = withInstall(_sfc_main$B);
16969
- const _sfc_main$A = /* @__PURE__ */ Object.assign({
16965
+ const ToTooltip = withInstall(_sfc_main$A);
16966
+ const _sfc_main$z = /* @__PURE__ */ Object.assign({
16970
16967
  name: "ToSegment"
16971
16968
  }, {
16972
16969
  __name: "segment",
16973
16970
  props: {
16971
+ flex: Boolean,
16974
16972
  id: {
16975
16973
  type: String,
16976
16974
  default: ""
@@ -17445,6 +17443,8 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
17445
17443
  return (_ctx, _cache) => {
17446
17444
  return withDirectives((openBlock(), createElementBlock("span", {
17447
17445
  id: __props.id,
17446
+ key: unref(langKey),
17447
+ flex: __props.flex ? __props.flex : null,
17448
17448
  class: normalizeClass(["to-segment", setClass.value]),
17449
17449
  style: normalizeStyle(setStyle.value)
17450
17450
  }, [
@@ -17500,7 +17500,7 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
17500
17500
  class: "to-box-tip"
17501
17501
  }, [
17502
17502
  errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
17503
- createTextVNode(" 选择有误 "),
17503
+ createTextVNode(toDisplayString(unref(t)("to.segment.selectError")) + " ", 1),
17504
17504
  withDirectives(createVNode(unref(ToIcon), {
17505
17505
  value: "help",
17506
17506
  color: "danger",
@@ -17515,12 +17515,12 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
17515
17515
  ]
17516
17516
  ])
17517
17517
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
17518
- createTextVNode(" 不能为空 ")
17518
+ createTextVNode(toDisplayString(unref(t)("to.segment.required")), 1)
17519
17519
  ], 64))
17520
17520
  ])), [
17521
17521
  [unref(vColorDirective), "danger"]
17522
17522
  ]) : createCommentVNode("", true)
17523
- ], 14, ["id"])), [
17523
+ ], 14, ["id", "flex"])), [
17524
17524
  [
17525
17525
  unref(vDis),
17526
17526
  iDisabled.value,
@@ -17532,7 +17532,7 @@ const _sfc_main$A = /* @__PURE__ */ Object.assign({
17532
17532
  };
17533
17533
  }
17534
17534
  });
17535
- withInstall(_sfc_main$A);
17535
+ withInstall(_sfc_main$z);
17536
17536
  const dialogProps = {
17537
17537
  closable: { type: Boolean, default: true },
17538
17538
  draggable: { type: Boolean, default: false },
@@ -17551,10 +17551,11 @@ const dialogProps = {
17551
17551
  afterOpen: { type: Function, default: () => {
17552
17552
  } },
17553
17553
  afterClose: { type: Function, default: () => {
17554
- } }
17554
+ } },
17555
+ flex: { type: Boolean, default: false }
17555
17556
  };
17556
17557
  const dialogEmits = ["update:modelValue", "beforeOpen", "opened", "beforeClose", "closed", "close-button-click"];
17557
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
17558
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17558
17559
  ...{
17559
17560
  name: "ToDialog"
17560
17561
  },
@@ -17761,6 +17762,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
17761
17762
  const _component_to_icon = resolveComponent("to-icon");
17762
17763
  return (_ctx.lazy ? _ctx.modelValue : true) ? (openBlock(), createElementBlock("div", {
17763
17764
  key: 0,
17765
+ flex: _ctx.flex ? _ctx.flex : null,
17764
17766
  class: normalizeClass(["to-dialog", setClass.value]),
17765
17767
  style: normalizeStyle(setStyle.value),
17766
17768
  onClick: withModifiers(blur, ["stop"])
@@ -17814,17 +17816,18 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
17814
17816
  onClick: closeHandele
17815
17817
  })) : createCommentVNode("", true)
17816
17818
  ], 8, ["onClick"])
17817
- ], 6)) : createCommentVNode("", true);
17819
+ ], 14, ["flex"])) : createCommentVNode("", true);
17818
17820
  };
17819
17821
  }
17820
17822
  });
17821
- withInstall(_sfc_main$z);
17822
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
17823
+ withInstall(_sfc_main$y);
17824
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
17823
17825
  ...{
17824
17826
  name: "ToEllipsis"
17825
17827
  },
17826
17828
  __name: "Ellipsis",
17827
17829
  props: {
17830
+ flex: Boolean,
17828
17831
  breakWord: Boolean,
17829
17832
  width: { type: [Number, String], default: "" },
17830
17833
  row: { type: [Number, String], default: 1 },
@@ -17835,8 +17838,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17835
17838
  unfoldable: Boolean,
17836
17839
  clear: Boolean,
17837
17840
  tip: Boolean,
17838
- foldText: { type: String, default: "收起" },
17839
- unfoldText: { type: String, default: "展开" }
17841
+ foldText: { type: String, default: "" },
17842
+ unfoldText: { type: String, default: "" }
17840
17843
  },
17841
17844
  setup(__props, { expose: __expose }) {
17842
17845
  const props = __props;
@@ -17962,6 +17965,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17962
17965
  });
17963
17966
  return (_ctx, _cache) => {
17964
17967
  return openBlock(), createElementBlock("span", {
17968
+ key: unref(langKey),
17969
+ flex: __props.flex ? __props.flex : null,
17965
17970
  class: normalizeClass(["to-ellipsis", setClass.value]),
17966
17971
  style: normalizeStyle(setStyle.value)
17967
17972
  }, [
@@ -17994,20 +17999,20 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17994
17999
  key: 1,
17995
18000
  href: "javascript:void(0)",
17996
18001
  onClick: toggle
17997
- }, toDisplayString(__props.foldText), 1)) : createCommentVNode("", true),
18002
+ }, toDisplayString(__props.foldText || unref(t)("to.ellipsis.collapse")), 1)) : createCommentVNode("", true),
17998
18003
  !isFold.value && __props.foldable ? (openBlock(), createElementBlock("a", {
17999
18004
  key: 2,
18000
18005
  href: "javascript:void(0)",
18001
18006
  onClick: toggle
18002
- }, toDisplayString(__props.unfoldText), 1)) : createCommentVNode("", true)
18007
+ }, toDisplayString(__props.unfoldText || unref(t)("to.ellipsis.expand")), 1)) : createCommentVNode("", true)
18003
18008
  ])) : createCommentVNode("", true)
18004
- ], 6);
18009
+ ], 14, ["flex"]);
18005
18010
  };
18006
18011
  }
18007
18012
  });
18008
- withInstall(_sfc_main$y);
18013
+ withInstall(_sfc_main$x);
18009
18014
  const DRAG_THRESHOLD = 5;
18010
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
18015
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
18011
18016
  ...{
18012
18017
  name: "ToFix"
18013
18018
  },
@@ -18261,7 +18266,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
18261
18266
  };
18262
18267
  }
18263
18268
  });
18264
- withInstall(_sfc_main$x);
18269
+ withInstall(_sfc_main$w);
18265
18270
  const floatProps = {
18266
18271
  slide: { type: Boolean, default: false },
18267
18272
  lazy: { type: Boolean, default: true },
@@ -18284,7 +18289,7 @@ const floatProps = {
18284
18289
  global: { type: Boolean, default: true }
18285
18290
  };
18286
18291
  const floatEmits = ["click", "mouseenter", "mouseleave", "beforeOpen", "opened", "beforeClose", "closed"];
18287
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
18292
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
18288
18293
  ...{
18289
18294
  name: "ToFloat",
18290
18295
  inheritAttrs: false
@@ -18836,7 +18841,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
18836
18841
  };
18837
18842
  }
18838
18843
  });
18839
- const ToFloat = withInstall(_sfc_main$w);
18844
+ const ToFloat = withInstall(_sfc_main$v);
18840
18845
  const picProps = {
18841
18846
  /**
18842
18847
  * 图片链接
@@ -18904,9 +18909,10 @@ const picProps = {
18904
18909
  link: {
18905
18910
  type: Boolean,
18906
18911
  default: false
18907
- }
18912
+ },
18913
+ flex: Boolean
18908
18914
  };
18909
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
18915
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
18910
18916
  __name: "PicViewer",
18911
18917
  props: {
18912
18918
  urlList: { default: () => [] },
@@ -18940,30 +18946,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
18940
18946
  const isFirefox = () => {
18941
18947
  return navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
18942
18948
  };
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
18949
  const ModeEnum = {
18955
18950
  CONTAIN: {
18956
- name: "contain",
18957
- icon: "el-icon-full-screen"
18951
+ name: "contain"
18958
18952
  },
18959
18953
  ORIGINAL: {
18960
- name: "original",
18961
- icon: "el-icon-c-scale-to-original"
18954
+ name: "original"
18962
18955
  }
18963
18956
  };
18964
18957
  const mousewheelEventName = isFirefox() ? "DOMMouseScroll" : "mousewheel";
18965
18958
  const props = __props;
18966
- const { t: t2 } = useLocale();
18967
18959
  const viewer = ref();
18968
18960
  const img = ref();
18969
18961
  const index = ref(props.initialIndex);
@@ -19049,6 +19041,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
19049
19041
  }
19050
19042
  };
19051
19043
  _mouseWheelHandler = rafThrottle((e) => {
19044
+ e.preventDefault();
19052
19045
  const delta = e.deltaY ? -e.deltaY : e.wheelDelta ? e.wheelDelta : -e.detail;
19053
19046
  if (delta > 0) {
19054
19047
  handleActions("zoomIn", {
@@ -19080,7 +19073,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
19080
19073
  };
19081
19074
  const handleImgError = (e) => {
19082
19075
  loading.value = false;
19083
- e.target.alt = t2("pic.tip.error.load");
19076
+ e.target.alt = t("pic.tip.error.load");
19084
19077
  };
19085
19078
  const handleMouseDown = (e) => {
19086
19079
  if (loading.value || !e.touches && e.button !== 0)
@@ -19176,7 +19169,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
19176
19169
  (_a2 = viewer.value) == null ? void 0 : _a2.focus();
19177
19170
  });
19178
19171
  return (_ctx, _cache) => {
19179
- return openBlock(), createBlock(Transition, { name: "viewer-fade" }, {
19172
+ return openBlock(), createBlock(Transition, {
19173
+ key: unref(langKey),
19174
+ name: "viewer-fade"
19175
+ }, {
19180
19176
  default: withCtx(() => [
19181
19177
  (openBlock(), createElementBlock("div", {
19182
19178
  key: 0,
@@ -19230,7 +19226,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
19230
19226
  onClick: ($event) => toggleMode()
19231
19227
  }, {
19232
19228
  default: withCtx(() => [
19233
- createTextVNode(toDisplayString(mode.value.name === "contain" ? unref(t2)("to.pic.viewer.full") : unref(t2)("to.pic.viewer.restore")), 1)
19229
+ createTextVNode(toDisplayString(mode.value.name === "contain" ? unref(t)("to.pic.viewer.full") : unref(t)("to.pic.viewer.restore")), 1)
19234
19230
  ]),
19235
19231
  _: 1
19236
19232
  }, 8, ["onClick"]),
@@ -19268,7 +19264,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
19268
19264
  };
19269
19265
  }
19270
19266
  });
19271
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
19267
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
19272
19268
  ...{
19273
19269
  name: "ToPic"
19274
19270
  },
@@ -19346,6 +19342,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
19346
19342
  };
19347
19343
  return (_ctx, _cache) => {
19348
19344
  return openBlock(), createElementBlock("span", {
19345
+ flex: _ctx.flex ? _ctx.flex : null,
19349
19346
  class: normalizeClass(["to-pic", setClass.value]),
19350
19347
  style: normalizeStyle(setStyle.value)
19351
19348
  }, [
@@ -19356,7 +19353,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
19356
19353
  onClick: clickHandler
19357
19354
  }, null, 8, ["src", "alt"]),
19358
19355
  preview.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
19359
- showViewer.value ? (openBlock(), createBlock(_sfc_main$v, {
19356
+ showViewer.value ? (openBlock(), createBlock(_sfc_main$u, {
19360
19357
  key: 0,
19361
19358
  "mask-closable": true,
19362
19359
  "z-index": _ctx.zIndex,
@@ -19365,11 +19362,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
19365
19362
  "url-list": _ctx.previews
19366
19363
  }, null, 8, ["z-index", "initial-index", "url-list"])) : createCommentVNode("", true)
19367
19364
  ], 64)) : createCommentVNode("", true)
19368
- ], 6);
19365
+ ], 14, ["flex"]);
19369
19366
  };
19370
19367
  }
19371
19368
  });
19372
- withInstall(_sfc_main$u, [_sfc_main$v]);
19369
+ withInstall(_sfc_main$t, [_sfc_main$u]);
19373
19370
  const paramProps = {
19374
19371
  data: {
19375
19372
  type: [Array, String],
@@ -19419,7 +19416,8 @@ const paramProps = {
19419
19416
  tip: {
19420
19417
  type: Boolean,
19421
19418
  default: false
19422
- }
19419
+ },
19420
+ flex: Boolean
19423
19421
  };
19424
19422
  const paramItemProps = {
19425
19423
  label: {
@@ -19444,7 +19442,7 @@ const paramItemProps = {
19444
19442
  },
19445
19443
  wrap: Boolean
19446
19444
  };
19447
- const _sfc_main$t = /* @__PURE__ */ Object.assign({
19445
+ const _sfc_main$s = /* @__PURE__ */ Object.assign({
19448
19446
  name: "ToParamItem"
19449
19447
  }, {
19450
19448
  __name: "ParamItem",
@@ -19508,7 +19506,7 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({
19508
19506
  };
19509
19507
  }
19510
19508
  });
19511
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
19509
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
19512
19510
  ...{
19513
19511
  name: "ToParam"
19514
19512
  },
@@ -19637,12 +19635,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
19637
19635
  return openBlock(), createElementBlock("div", {
19638
19636
  ref_key: "paramRef",
19639
19637
  ref: paramRef,
19638
+ flex: _ctx.flex ? _ctx.flex : null,
19640
19639
  class: normalizeClass(["to-param", setClass.value])
19641
19640
  }, [
19642
19641
  createElementVNode("div", { class: "to-param-list" }, [
19643
19642
  (openBlock(true), createElementBlock(Fragment, null, renderList(rowData.value, (item, index) => {
19644
19643
  return openBlock(), createElementBlock(Fragment, { key: index }, [
19645
- createVNode(_sfc_main$t, {
19644
+ createVNode(_sfc_main$s, {
19646
19645
  label: item.label,
19647
19646
  value: item.value,
19648
19647
  class: normalizeClass([item.merge ? "merge-" + item.merge : ""]),
@@ -19670,14 +19669,15 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
19670
19669
  ], 64);
19671
19670
  }), 128))
19672
19671
  ])
19673
- ], 2);
19672
+ ], 10, ["flex"]);
19674
19673
  };
19675
19674
  }
19676
19675
  });
19677
- withInstall(_sfc_main$s, [_sfc_main$t]);
19678
- const _sfc_main$r = defineComponent({
19676
+ withInstall(_sfc_main$r, [_sfc_main$s]);
19677
+ const _sfc_main$q = defineComponent({
19679
19678
  name: "ToProgress",
19680
19679
  props: {
19680
+ flex: Boolean,
19681
19681
  // 类型:normal 或 loading
19682
19682
  type: {
19683
19683
  type: String,
@@ -19932,6 +19932,7 @@ const _export_sfc = (sfc, props) => {
19932
19932
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
19933
19933
  return openBlock(), createElementBlock("span", {
19934
19934
  ref: "elRef",
19935
+ flex: _ctx.flex ? _ctx.flex : null,
19935
19936
  class: normalizeClass(["to-progress", _ctx.setClass]),
19936
19937
  style: normalizeStyle(_ctx.setStyle)
19937
19938
  }, [
@@ -19990,11 +19991,12 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
19990
19991
  style: normalizeStyle(_ctx.setTextStyle)
19991
19992
  }, toDisplayString(_ctx.textValue), 5)) : createCommentVNode("", true)
19992
19993
  ], 64))
19993
- ], 6);
19994
+ ], 14, ["flex"]);
19994
19995
  }
19995
- const Progress = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$3]]);
19996
+ const Progress = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$3]]);
19996
19997
  withInstall(Progress);
19997
19998
  const scrollProps = {
19999
+ flex: Boolean,
19998
20000
  /**
19999
20001
  * 是否使用模拟滚动条
20000
20002
  */
@@ -20076,19 +20078,19 @@ const scrollProps = {
20076
20078
  /**
20077
20079
  * 背景颜色
20078
20080
  */
20079
- color: {
20081
+ mode: {
20080
20082
  type: String,
20081
20083
  default: ""
20082
20084
  },
20083
20085
  /**
20084
20086
  * 滚动模式
20085
20087
  */
20086
- mode: {
20088
+ type: {
20087
20089
  type: String,
20088
20090
  default: ""
20089
20091
  }
20090
20092
  };
20091
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
20093
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
20092
20094
  ...{
20093
20095
  name: "ToScroll"
20094
20096
  },
@@ -20494,6 +20496,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
20494
20496
  if (props.mode) {
20495
20497
  arr.push(`mode-${props.mode}`);
20496
20498
  }
20499
+ if (props.type) {
20500
+ arr.push(`type-${props.type}`);
20501
+ }
20497
20502
  return arr;
20498
20503
  });
20499
20504
  const setContentStyle = computed(() => {
@@ -20529,10 +20534,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
20529
20534
  obj.position = "relative";
20530
20535
  obj.width = "100%";
20531
20536
  }
20532
- if (props.mode === "horizontal") {
20533
- obj.width = props.virtual ? "100%" : "max-content";
20534
- obj.display = "inline-block";
20535
- }
20536
20537
  return obj;
20537
20538
  });
20538
20539
  function adjust() {
@@ -20582,6 +20583,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
20582
20583
  return (_ctx, _cache) => {
20583
20584
  return openBlock(), createElementBlock("div", {
20584
20585
  class: normalizeClass(["to-scroll", setClass.value]),
20586
+ flex: _ctx.flex ? _ctx.flex : null,
20585
20587
  style: normalizeStyle(setStyle.value)
20586
20588
  }, [
20587
20589
  props.virtual ? (openBlock(), createElementBlock("div", {
@@ -20617,7 +20619,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
20617
20619
  }, [
20618
20620
  renderSlot(_ctx.$slots, "default")
20619
20621
  ], 38)
20620
- ], 6);
20622
+ ], 14, ["flex"]);
20621
20623
  };
20622
20624
  }
20623
20625
  });
@@ -20630,7 +20632,7 @@ const scrollPointProps = {
20630
20632
  default: ""
20631
20633
  }
20632
20634
  };
20633
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
20635
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
20634
20636
  ...{
20635
20637
  name: "ToScrollPoint"
20636
20638
  },
@@ -20695,87 +20697,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
20695
20697
  };
20696
20698
  }
20697
20699
  });
20698
- const ToScroll = withInstall(_sfc_main$q);
20699
- withInstall(_sfc_main$p);
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);
20700
+ const ToScroll = withInstall(_sfc_main$p);
20701
+ withInstall(_sfc_main$o);
20779
20702
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
20780
20703
  ...{
20781
20704
  name: "ToSlide"
@@ -20785,7 +20708,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
20785
20708
  mode: { default: "default" },
20786
20709
  autoplay: { type: Boolean, default: false },
20787
20710
  speed: { default: 2e3 },
20788
- pagerPosition: { default: "" }
20711
+ pagerPosition: { default: "" },
20712
+ flex: { type: Boolean, default: false }
20789
20713
  },
20790
20714
  setup(__props, { expose: __expose }) {
20791
20715
  const props = __props;
@@ -20817,10 +20741,6 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
20817
20741
  if (props.mode) {
20818
20742
  arr.push(`mode-${props.mode}`);
20819
20743
  }
20820
- return arr;
20821
- });
20822
- const setPageClass = computed(() => {
20823
- let arr = [];
20824
20744
  if (props.pagerPosition === "outer") {
20825
20745
  arr.push(`is-outer`);
20826
20746
  }
@@ -20920,9 +20840,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
20920
20840
  adjust
20921
20841
  });
20922
20842
  return (_ctx, _cache) => {
20843
+ const _component_to_icon = resolveComponent("to-icon");
20923
20844
  return openBlock(), createElementBlock("div", {
20924
20845
  ref_key: "slide",
20925
20846
  ref: slide,
20847
+ flex: __props.flex ? __props.flex : null,
20926
20848
  class: normalizeClass(["to-slide", setClass.value]),
20927
20849
  onMouseover: pause,
20928
20850
  onMouseout: play,
@@ -20932,46 +20854,54 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
20932
20854
  }, [
20933
20855
  createElementVNode("div", { class: "to-slide-pic" }, [
20934
20856
  createElementVNode("ul", {
20935
- ref: "to-slide-wrapper",
20857
+ ref_key: "ul",
20858
+ ref: ul,
20859
+ class: "to-slide-wrapper",
20936
20860
  style: normalizeStyle(setUlStyle.value)
20937
20861
  }, [
20938
20862
  createElementVNode("li", {
20939
20863
  ref_key: "firstFake",
20940
- ref: firstFake
20864
+ ref: firstFake,
20865
+ class: "to-slide-item"
20941
20866
  }, null, 512),
20942
20867
  renderSlot(_ctx.$slots, "default"),
20943
20868
  createElementVNode("li", {
20944
20869
  ref_key: "lastFake",
20945
- ref: lastFake
20870
+ ref: lastFake,
20871
+ class: "to-slide-item"
20946
20872
  }, null, 512)
20947
20873
  ], 4)
20948
20874
  ]),
20949
20875
  length.value > 1 ? (openBlock(), createElementBlock("div", {
20950
20876
  key: 0,
20951
- class: "fn"
20877
+ class: "to-slide-fn"
20952
20878
  }, [
20953
- createElementVNode("span", {
20954
- class: "prev",
20879
+ createVNode(_component_to_icon, {
20880
+ value: "back",
20881
+ link: "",
20882
+ class: "to-slide-fn-item type-prev",
20955
20883
  onClick: ($event) => prev()
20956
20884
  }, null, 8, ["onClick"]),
20957
- createElementVNode("span", {
20958
- class: "next",
20885
+ createVNode(_component_to_icon, {
20886
+ value: "next",
20887
+ link: "",
20888
+ class: "to-slide-fn-item type-next",
20959
20889
  onClick: ($event) => next()
20960
20890
  }, null, 8, ["onClick"])
20961
20891
  ])) : createCommentVNode("", true),
20962
20892
  length.value > 1 ? (openBlock(), createElementBlock("div", {
20963
20893
  key: 1,
20964
- class: normalizeClass(["page", setPageClass.value])
20894
+ class: "to-slide-page"
20965
20895
  }, [
20966
20896
  (openBlock(true), createElementBlock(Fragment, null, renderList(length.value, (index) => {
20967
20897
  return openBlock(), createElementBlock("span", {
20968
20898
  key: index,
20969
- class: normalizeClass({ on: index === current.value + 1 }),
20899
+ class: normalizeClass(["to-slide-page-item", { "is-on": index === current.value + 1 }]),
20970
20900
  onClick: ($event) => to(index - 1)
20971
20901
  }, null, 10, ["onClick"]);
20972
20902
  }), 128))
20973
- ], 2)) : createCommentVNode("", true)
20974
- ], 34);
20903
+ ])) : createCommentVNode("", true)
20904
+ ], 42, ["flex"]);
20975
20905
  };
20976
20906
  }
20977
20907
  });
@@ -20997,6 +20927,13 @@ const breadcrumbProps = {
20997
20927
  mode: {
20998
20928
  type: String,
20999
20929
  default: "default"
20930
+ },
20931
+ /**
20932
+ * 是否启用 flex 布局
20933
+ */
20934
+ flex: {
20935
+ type: Boolean,
20936
+ default: false
21000
20937
  }
21001
20938
  };
21002
20939
  const _sfc_main$m = defineComponent({
@@ -21013,10 +20950,11 @@ const _sfc_main$m = defineComponent({
21013
20950
  });
21014
20951
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
21015
20952
  return openBlock(), createElementBlock("div", {
21016
- class: normalizeClass(["to-breadcrumb", [`is-${_ctx.mode}`]])
20953
+ flex: _ctx.flex ? _ctx.flex : null,
20954
+ class: normalizeClass(["to-breadcrumb", [`mode-${_ctx.mode}`]])
21017
20955
  }, [
21018
20956
  renderSlot(_ctx.$slots, "default")
21019
- ], 2);
20957
+ ], 10, ["flex"]);
21020
20958
  }
21021
20959
  const Breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$2]]);
21022
20960
  const breadcrumbItemProps = {
@@ -21060,7 +20998,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
21060
20998
  const _component_to_icon = resolveComponent("to-icon");
21061
20999
  return openBlock(), createElementBlock("span", { class: "to-breadcrumb-item" }, [
21062
21000
  createElementVNode("span", {
21063
- class: normalizeClass(["to-breadcrumb-item__inner", _ctx.to ? "is-link" : ""]),
21001
+ class: normalizeClass(["to-breadcrumb-item-label", _ctx.to ? "is-link" : ""]),
21064
21002
  role: "link",
21065
21003
  onClick: _ctx.handleClick
21066
21004
  }, [
@@ -21068,10 +21006,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
21068
21006
  ], 10, ["onClick"]),
21069
21007
  !((_a2 = _ctx.breadcrumbData) == null ? void 0 : _a2.separatorIcon) ? (openBlock(), createElementBlock("span", {
21070
21008
  key: 0,
21071
- class: "to-breadcrumb-item__separator"
21009
+ class: "to-breadcrumb-item-separator"
21072
21010
  }, toDisplayString((_b = _ctx.breadcrumbData) == null ? void 0 : _b.separator), 1)) : (openBlock(), createBlock(_component_to_icon, {
21073
21011
  key: 1,
21074
- class: "to-breadcrumb-item__separator",
21012
+ class: "to-breadcrumb-item-separator",
21075
21013
  value: (_c = _ctx.breadcrumbData) == null ? void 0 : _c.separatorIcon
21076
21014
  }, null, 8, ["value"]))
21077
21015
  ]);
@@ -21265,6 +21203,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
21265
21203
  },
21266
21204
  __name: "tree",
21267
21205
  props: {
21206
+ flex: { type: Boolean },
21268
21207
  mode: { default: "default" },
21269
21208
  expand: { type: Boolean, default: false },
21270
21209
  data: { default: () => [] },
@@ -21278,7 +21217,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
21278
21217
  childrenText: { default: "children" },
21279
21218
  valueText: { default: "value" },
21280
21219
  labelText: { default: "label" },
21281
- emptyText: { default: "暂无数据" },
21220
+ emptyText: { default: "" },
21282
21221
  load: { type: Function, default: null },
21283
21222
  parentSelectable: { type: Boolean, default: false },
21284
21223
  filterNodeMethod: { type: Function, default: null }
@@ -21697,6 +21636,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
21697
21636
  });
21698
21637
  return (_ctx, _cache) => {
21699
21638
  return openBlock(), createElementBlock("div", {
21639
+ key: unref(langKey),
21640
+ flex: __props.flex ? __props.flex : null,
21700
21641
  class: normalizeClass(["to-tree", setClass.value])
21701
21642
  }, [
21702
21643
  filterStore.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filterStore.value, (item) => {
@@ -21715,8 +21656,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
21715
21656
  }), 128)) : (openBlock(), createElementBlock("div", {
21716
21657
  key: 1,
21717
21658
  class: "to-tree-empty"
21718
- }, toDisplayString(__props.emptyText), 1))
21719
- ], 2);
21659
+ }, toDisplayString(props.emptyText || unref(t)("to.tree.noData")), 1))
21660
+ ], 10, ["flex"]);
21720
21661
  };
21721
21662
  }
21722
21663
  });
@@ -21819,16 +21760,17 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21819
21760
  labelText: { default: "label" },
21820
21761
  valueText: { default: "value" },
21821
21762
  childrenText: { default: "children" },
21822
- placeholder: { default: "请选择" },
21763
+ placeholder: { default: "" },
21823
21764
  optionWidth: { default: "16em" },
21824
21765
  optionCol: { default: "" },
21825
21766
  data: { default: () => [] },
21826
21767
  comparable: { type: Boolean, default: false },
21827
21768
  required: { type: Boolean, default: false },
21828
21769
  desc: { default: "" },
21829
- prefix: {},
21770
+ prefix: { default: "" },
21830
21771
  showAllLevels: { type: Boolean, default: true },
21831
- checkedDatas: { default: () => [] }
21772
+ checkedDatas: { default: () => [] },
21773
+ flex: { type: Boolean, default: false }
21832
21774
  },
21833
21775
  emits: ["change", "update:modelValue", "update:checkedDatas"],
21834
21776
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -22141,6 +22083,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
22141
22083
  return withDirectives((openBlock(), createElementBlock("div", {
22142
22084
  ref_key: "$el",
22143
22085
  ref: $el,
22086
+ key: unref(langKey),
22087
+ flex: __props.flex ? __props.flex : null,
22144
22088
  class: normalizeClass(["to-cascader", setClass.value]),
22145
22089
  style: normalizeStyle(setStyle.value)
22146
22090
  }, [
@@ -22173,7 +22117,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
22173
22117
  value_.value ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(valueLabel.value), 1)) : (openBlock(), createElementBlock("span", {
22174
22118
  key: 1,
22175
22119
  class: "to-cascader-placeholder"
22176
- }, toDisplayString(__props.placeholder), 1))
22120
+ }, toDisplayString(__props.placeholder || unref(t)("to.cascader.placeholder")), 1))
22177
22121
  ])
22178
22122
  ]),
22179
22123
  __props.clearable && value_.value ? (openBlock(), createElementBlock("span", {
@@ -22208,7 +22152,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
22208
22152
  !data_.value.length ? (openBlock(), createElementBlock("div", {
22209
22153
  key: 0,
22210
22154
  style: { "text-align": "center", "color": "#ccc", "padding": "3em 0.3em" }
22211
- }, "暂无数据")) : createCommentVNode("", true),
22155
+ }, toDisplayString(unref(t)("to.cascader.noData")), 1)) : createCommentVNode("", true),
22212
22156
  createVNode(_component_to_scroll, {
22213
22157
  onClick: withModifiers(() => {
22214
22158
  }, ["stop"])
@@ -22231,7 +22175,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
22231
22175
  class: "to-box-tip"
22232
22176
  }, [
22233
22177
  errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
22234
- createTextVNode(" 输入有误 "),
22178
+ createTextVNode(toDisplayString(unref(t)("to.cascader.inputError")) + " ", 1),
22235
22179
  withDirectives(createVNode(unref(ToIcon), {
22236
22180
  style: { "height": "auto" },
22237
22181
  value: "help",
@@ -22247,12 +22191,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
22247
22191
  ]
22248
22192
  ])
22249
22193
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
22250
- createTextVNode(" 不能为空 ")
22194
+ createTextVNode(toDisplayString(unref(t)("to.cascader.required")), 1)
22251
22195
  ], 64))
22252
22196
  ])), [
22253
22197
  [_directive_color, "danger"]
22254
22198
  ]) : createCommentVNode("", true)
22255
- ], 6)), [
22199
+ ], 14, ["flex"])), [
22256
22200
  [_directive_tip, changed.value ? unref(t)("to.common.originalValue", getLabelPath(valueStore.value[0], data_.value)) : ""]
22257
22201
  ]);
22258
22202
  };
@@ -22356,7 +22300,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
22356
22300
  mode: { default: "default" },
22357
22301
  modeValue: { default: "" },
22358
22302
  expand: { type: Boolean, default: false },
22359
- accordion: { type: Boolean, default: false }
22303
+ accordion: { type: Boolean, default: false },
22304
+ flex: { type: Boolean, default: false }
22360
22305
  },
22361
22306
  emits: ["change", "update:modelValue"],
22362
22307
  setup(__props, { emit: __emit }) {
@@ -22416,10 +22361,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
22416
22361
  });
22417
22362
  return (_ctx, _cache) => {
22418
22363
  return openBlock(), createElementBlock("div", {
22419
- class: normalizeClass(["to-collapse", setClass.value])
22364
+ class: normalizeClass(["to-collapse", setClass.value]),
22365
+ flex: __props.flex ? __props.flex : null
22420
22366
  }, [
22421
22367
  renderSlot(_ctx.$slots, "default")
22422
- ], 2);
22368
+ ], 10, ["flex"]);
22423
22369
  };
22424
22370
  }
22425
22371
  });
@@ -22431,6 +22377,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
22431
22377
  },
22432
22378
  __name: "range",
22433
22379
  props: {
22380
+ flex: { type: Boolean, default: false },
22434
22381
  mode: { default: "default" },
22435
22382
  modelValue: { default: 0 },
22436
22383
  disabled: { type: Boolean, default: false },
@@ -22661,6 +22608,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
22661
22608
  return (_ctx, _cache) => {
22662
22609
  return openBlock(), createElementBlock("span", {
22663
22610
  class: normalizeClass(["to-range", setClass.value]),
22611
+ flex: __props.flex ? __props.flex : null,
22664
22612
  style: normalizeStyle(setStyle.value),
22665
22613
  onTouchmove: ($event) => moveHandle($event),
22666
22614
  onTouchend: ($event) => endHandle($event)
@@ -22700,7 +22648,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
22700
22648
  width: __props.inputWidth,
22701
22649
  dot: fixed.value
22702
22650
  }, null, 8, ["modelValue", "onUpdate:modelValue", "width", "dot"])) : createCommentVNode("", true)
22703
- ], 46, ["onTouchmove", "onTouchend"]);
22651
+ ], 46, ["flex", "onTouchmove", "onTouchend"]);
22704
22652
  };
22705
22653
  }
22706
22654
  });
@@ -22711,6 +22659,7 @@ const _sfc_main$d = defineComponent({
22711
22659
  ToIcon
22712
22660
  },
22713
22661
  props: {
22662
+ flex: Boolean,
22714
22663
  data: {
22715
22664
  type: Array,
22716
22665
  default: () => []
@@ -22837,7 +22786,8 @@ const _sfc_main$d = defineComponent({
22837
22786
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22838
22787
  const _component_to_icon = resolveComponent("to-icon");
22839
22788
  return openBlock(), createElementBlock("div", {
22840
- class: normalizeClass(["to-timeline", _ctx.getClass])
22789
+ class: normalizeClass(["to-timeline", _ctx.getClass]),
22790
+ flex: _ctx.flex ? _ctx.flex : null
22841
22791
  }, [
22842
22792
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.displayItems, (item, index) => {
22843
22793
  return openBlock(), createElementBlock("div", {
@@ -22912,7 +22862,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22912
22862
  })) : createCommentVNode("", true)
22913
22863
  ], 12, ["onClick"]);
22914
22864
  }), 128))
22915
- ], 2);
22865
+ ], 10, ["flex"]);
22916
22866
  }
22917
22867
  const Timeline = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render]]);
22918
22868
  withInstall(Timeline);
@@ -22925,7 +22875,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
22925
22875
  props: {
22926
22876
  data: { default: () => [] },
22927
22877
  auto: { type: Boolean, default: false },
22928
- mode: { default: "" }
22878
+ mode: { default: "" },
22879
+ pic: { default: "" }
22929
22880
  },
22930
22881
  emits: ["opened", "closed", "complete"],
22931
22882
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -22943,19 +22894,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
22943
22894
  const step = ref(0);
22944
22895
  let timer = null;
22945
22896
  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
22897
  const setClass = computed(() => {
22956
22898
  let arr = [];
22957
22899
  if (props.mode) {
22958
- arr.push(`to-guider-mode-${props.mode}`);
22900
+ arr.push(`mode-${props.mode}`);
22959
22901
  }
22960
22902
  return arr;
22961
22903
  });
@@ -22994,7 +22936,6 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
22994
22936
  }, 200);
22995
22937
  };
22996
22938
  const init = (during) => {
22997
- var _a2;
22998
22939
  let delay = 0;
22999
22940
  if (during) {
23000
22941
  delay = during;
@@ -23004,25 +22945,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23004
22945
  return;
23005
22946
  const id = currentStep.id;
23006
22947
  el.value = document.getElementById(id);
23007
- if (el.value && el.value.scrollIntoView) {
23008
- el.value.scrollIntoView();
23009
- } else {
23010
- if (step.value < props.data.length - 1) {
23011
- step.value += 1;
23012
- }
23013
- (_a2 = tooltipRef.value) == null ? void 0 : _a2.warning(id + " 元素未找到");
23014
- }
23015
22948
  desc.value = currentStep.desc;
23016
22949
  title.value = currentStep.title || "";
23017
22950
  const innerTimer = setTimeout(() => {
23018
- var _a3, _b, _c;
22951
+ var _a2, _b, _c;
23019
22952
  let left = 0;
23020
22953
  let top = 0;
23021
22954
  if (el.value && el.value.getBoundingClientRect) {
23022
22955
  left = el.value.getBoundingClientRect().left;
23023
22956
  top = el.value.getBoundingClientRect().top;
23024
22957
  }
23025
- const width = ((_a3 = el.value) == null ? void 0 : _a3.offsetWidth) || 0;
22958
+ const width = ((_a2 = el.value) == null ? void 0 : _a2.offsetWidth) || 0;
23026
22959
  const height = ((_b = el.value) == null ? void 0 : _b.offsetHeight) || 0;
23027
22960
  bg0Style.value = {
23028
22961
  width: left + "px"
@@ -23076,32 +23009,35 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23076
23009
  };
23077
23010
  __expose({ open: open2, close: close2 });
23078
23011
  return (_ctx, _cache) => {
23079
- const _component_to_gap = resolveComponent("to-gap");
23012
+ const _component_to_pic = resolveComponent("to-pic");
23080
23013
  const _component_to_checkbox = resolveComponent("to-checkbox");
23081
23014
  const _component_to_button = resolveComponent("to-button");
23082
23015
  const _component_to_tooltip = resolveComponent("to-tooltip");
23083
23016
  return withDirectives((openBlock(), createElementBlock("div", {
23017
+ key: unref(langKey),
23084
23018
  class: normalizeClass(["to-guider", setClass.value])
23085
23019
  }, [
23086
23020
  createElementVNode("div", {
23087
- class: "bg",
23021
+ class: "to-guider-bg",
23088
23022
  style: normalizeStyle(bg0Style.value)
23089
23023
  }, null, 4),
23090
23024
  createElementVNode("div", {
23091
- class: "bg",
23025
+ class: "to-guider-bg",
23092
23026
  style: normalizeStyle(bg1Style.value)
23093
23027
  }, null, 4),
23094
23028
  createElementVNode("div", {
23095
- class: "bg",
23029
+ class: "to-guider-bg",
23096
23030
  style: normalizeStyle(bg2Style.value)
23097
23031
  }, null, 4),
23098
23032
  createElementVNode("div", {
23099
- class: "bg",
23033
+ class: "to-guider-bg",
23100
23034
  style: normalizeStyle(bg3Style.value)
23101
23035
  }, null, 4),
23102
23036
  withDirectives(createVNode(_component_to_tooltip, {
23103
23037
  ref_key: "tooltipRef",
23104
23038
  ref: tooltipRef,
23039
+ class: "to-guider-tip",
23040
+ readonly: false,
23105
23041
  color: "bg",
23106
23042
  shadow: "",
23107
23043
  "close-on-blur": false,
@@ -23109,77 +23045,70 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23109
23045
  width: "35"
23110
23046
  }, {
23111
23047
  default: withCtx(() => [
23112
- createElementVNode("div", { class: "to-guiderContent" }, [
23113
- createElementVNode("div", { class: "content" }, [
23114
- createElementVNode("div", { class: "title" }, toDisplayString(title.value), 1),
23115
- title.value.length ? (openBlock(), createBlock(_component_to_gap, {
23116
- key: 0,
23117
- type: "line"
23118
- })) : createCommentVNode("", true),
23048
+ props.pic ? (openBlock(), createBlock(_component_to_pic, {
23049
+ key: 0,
23050
+ class: "to-guider-pic",
23051
+ src: props.pic
23052
+ }, null, 8, ["src"])) : createCommentVNode("", true),
23053
+ createElementVNode("div", { class: "to-guider-content" }, [
23054
+ title.value ? (openBlock(), createElementBlock("div", {
23055
+ key: 0,
23056
+ class: "to-guider-title"
23057
+ }, [
23058
+ createElementVNode("div", { class: "to-guider-title-text" }, toDisplayString(title.value), 1)
23059
+ ])) : createCommentVNode("", true),
23060
+ createElementVNode("div", { class: "to-guider-desc" }, [
23119
23061
  createElementVNode("div", {
23120
- class: "desc",
23062
+ class: "to-guider-desc-text",
23121
23063
  innerHTML: desc.value
23122
- }, null, 8, ["innerHTML"]),
23123
- createElementVNode("div", { class: "fn" }, [
23124
- createVNode(_component_to_checkbox, {
23125
- modelValue: isNever.value,
23126
- "onUpdate:modelValue": ($event) => isNever.value = $event,
23127
- label: "不再显示"
23128
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
23129
- step.value + 1 === __props.data.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
23130
- createVNode(_component_to_button, {
23131
- fillet: "normal",
23132
- color: "primary",
23133
- mode: "line",
23134
- onClick: handleRestart
23135
- }, {
23136
- default: withCtx(() => [
23137
- createTextVNode(toDisplayString(t2("to.guider.restart")), 1)
23138
- ]),
23139
- _: 1
23140
- }),
23141
- createVNode(_component_to_gap, {
23142
- value: 1,
23143
- type: "inline"
23144
- }),
23145
- createVNode(_component_to_button, {
23146
- color: "primary",
23147
- fillet: "normal",
23148
- onClick: handleComplete
23149
- }, {
23150
- default: withCtx(() => [
23151
- createTextVNode(toDisplayString(t2("to.guider.finish")), 1)
23152
- ]),
23153
- _: 1
23154
- })
23155
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
23156
- createVNode(_component_to_button, {
23157
- fillet: "normal",
23158
- color: "primary",
23159
- mode: "line",
23160
- onClick: handleClose
23161
- }, {
23162
- default: withCtx(() => [
23163
- createTextVNode(toDisplayString(t2("to.guider.skip")), 1)
23164
- ]),
23165
- _: 1
23166
- }),
23167
- createVNode(_component_to_gap, {
23168
- value: 1,
23169
- type: "inline"
23170
- }),
23171
- createVNode(_component_to_button, {
23172
- fillet: "normal",
23173
- color: "primary",
23174
- onClick: handleNext
23175
- }, {
23176
- default: withCtx(() => [
23177
- createTextVNode(toDisplayString(t2("to.guider.next")), 1)
23178
- ]),
23179
- _: 1
23180
- })
23181
- ], 64))
23182
- ])
23064
+ }, null, 8, ["innerHTML"])
23065
+ ]),
23066
+ createElementVNode("div", { class: "to-guider-fn" }, [
23067
+ createVNode(_component_to_checkbox, {
23068
+ modelValue: isNever.value,
23069
+ "onUpdate:modelValue": ($event) => isNever.value = $event,
23070
+ class: "to-guider-checkbox",
23071
+ label: unref(t)("to.guider.dontShowAgain")
23072
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
23073
+ step.value + 1 === __props.data.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
23074
+ createVNode(_component_to_button, {
23075
+ class: "to-guider-restart",
23076
+ onClick: handleRestart
23077
+ }, {
23078
+ default: withCtx(() => [
23079
+ createTextVNode(toDisplayString(unref(t)("to.guider.restart")), 1)
23080
+ ]),
23081
+ _: 1
23082
+ }),
23083
+ createVNode(_component_to_button, {
23084
+ class: "to-guider-finish",
23085
+ onClick: handleComplete
23086
+ }, {
23087
+ default: withCtx(() => [
23088
+ createTextVNode(toDisplayString(unref(t)("to.guider.finish")), 1)
23089
+ ]),
23090
+ _: 1
23091
+ })
23092
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
23093
+ createVNode(_component_to_button, {
23094
+ class: "to-guider-skip",
23095
+ onClick: handleClose
23096
+ }, {
23097
+ default: withCtx(() => [
23098
+ createTextVNode(toDisplayString(unref(t)("to.guider.skip")), 1)
23099
+ ]),
23100
+ _: 1
23101
+ }),
23102
+ createVNode(_component_to_button, {
23103
+ class: "to-guider-next",
23104
+ onClick: handleNext
23105
+ }, {
23106
+ default: withCtx(() => [
23107
+ createTextVNode(toDisplayString(unref(t)("to.guider.next")), 1)
23108
+ ]),
23109
+ _: 1
23110
+ })
23111
+ ], 64))
23183
23112
  ])
23184
23113
  ])
23185
23114
  ]),
@@ -23201,10 +23130,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23201
23130
  },
23202
23131
  __name: "transfer",
23203
23132
  props: {
23133
+ flex: { type: Boolean, default: false },
23204
23134
  mode: { default: "default" },
23205
23135
  data: { default: () => "" },
23206
- leftTitle: { default: "待选" },
23207
- rightTitle: { default: "已选" },
23136
+ leftTitle: { default: "" },
23137
+ rightTitle: { default: "" },
23208
23138
  modelValue: { default: "" },
23209
23139
  labelText: { default: "label" },
23210
23140
  valueText: { default: "value" },
@@ -23465,6 +23395,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23465
23395
  const _directive_color = resolveDirective("color");
23466
23396
  const _directive_dis = resolveDirective("dis");
23467
23397
  return openBlock(), createElementBlock("div", {
23398
+ key: unref(langKey),
23399
+ flex: __props.flex ? __props.flex : null,
23468
23400
  class: normalizeClass(["to-transfer", setClass.value])
23469
23401
  }, [
23470
23402
  createElementVNode("div", { class: "to-transfer-panel" }, [
@@ -23472,7 +23404,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23472
23404
  createVNode(unref(ToCheckbox), {
23473
23405
  modelValue: dataGlobal.value,
23474
23406
  "onUpdate:modelValue": ($event) => dataGlobal.value = $event,
23475
- label: __props.leftTitle,
23407
+ label: __props.leftTitle || unref(t)("to.transfer.pending"),
23476
23408
  width: "full",
23477
23409
  onChange: (val) => {
23478
23410
  selectDataMap(val, "dataGroup");
@@ -23489,8 +23421,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23489
23421
  "onUpdate:modelValue": ($event) => dataFilterKey.value = $event,
23490
23422
  clearable: "",
23491
23423
  width: "full",
23492
- placeholder: "请输入关键字"
23493
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
23424
+ placeholder: unref(t)("to.transfer.placeholder")
23425
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
23494
23426
  ]),
23495
23427
  _: 1
23496
23428
  })) : createCommentVNode("", true),
@@ -23515,7 +23447,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23515
23447
  value: "1.5"
23516
23448
  }, {
23517
23449
  default: withCtx(() => [
23518
- createTextVNode("无数据")
23450
+ createTextVNode(toDisplayString(unref(t)("to.transfer.noData")), 1)
23519
23451
  ]),
23520
23452
  _: 1
23521
23453
  })), [
@@ -23555,7 +23487,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23555
23487
  createVNode(unref(ToCheckbox), {
23556
23488
  modelValue: valueGlobal.value,
23557
23489
  "onUpdate:modelValue": ($event) => valueGlobal.value = $event,
23558
- label: __props.rightTitle,
23490
+ label: __props.rightTitle || unref(t)("to.transfer.selected"),
23559
23491
  width: "full",
23560
23492
  onChange: (val) => {
23561
23493
  selectDataMap(val, "valueGroup");
@@ -23572,9 +23504,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23572
23504
  "onUpdate:modelValue": ($event) => valueFilterKey.value = $event,
23573
23505
  clearable: "",
23574
23506
  width: "full",
23575
- placeholder: "请输入关键字",
23507
+ placeholder: unref(t)("to.transfer.placeholder"),
23576
23508
  fillet: __props.fillet
23577
- }, null, 8, ["modelValue", "onUpdate:modelValue", "fillet"])
23509
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "fillet"])
23578
23510
  ]),
23579
23511
  _: 1
23580
23512
  })) : createCommentVNode("", true),
@@ -23599,7 +23531,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23599
23531
  value: "1.5"
23600
23532
  }, {
23601
23533
  default: withCtx(() => [
23602
- createTextVNode("无数据")
23534
+ createTextVNode(toDisplayString(unref(t)("to.transfer.noData")), 1)
23603
23535
  ]),
23604
23536
  _: 1
23605
23537
  })), [
@@ -23611,7 +23543,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
23611
23543
  _: 1
23612
23544
  }, 8, ["height"])
23613
23545
  ])
23614
- ], 2);
23546
+ ], 10, ["flex"]);
23615
23547
  };
23616
23548
  }
23617
23549
  });
@@ -23622,12 +23554,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23622
23554
  },
23623
23555
  __name: "upload",
23624
23556
  props: {
23557
+ flex: { type: Boolean, default: false },
23625
23558
  mode: { default: "default" },
23626
23559
  multiple: { type: Boolean, default: false },
23627
23560
  auto: { type: Boolean, default: false },
23628
23561
  action: { default: "" },
23629
23562
  headers: { default: () => ({}) },
23630
- placeholder: { default: "请选择" },
23563
+ placeholder: { default: "" },
23631
23564
  desc: { default: "" },
23632
23565
  id: { default: "upload" + (/* @__PURE__ */ new Date()).getTime() },
23633
23566
  required: { type: Boolean, default: false },
@@ -23649,7 +23582,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23649
23582
  beforeStart: { type: [Function, null], default: null },
23650
23583
  verifiable: { type: Boolean, default: true },
23651
23584
  showList: { type: Boolean, default: true },
23652
- uploadText: { default: "上传" }
23585
+ uploadText: { default: "" }
23653
23586
  },
23654
23587
  emits: ["start", "success", "error", "clear", "change", "progress", "remove", "download"],
23655
23588
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -23785,7 +23718,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23785
23718
  }
23786
23719
  }
23787
23720
  } else {
23788
- $tip.danger(`最多只能上传${props.maxLength}个文件`).catch(() => {
23721
+ $tip.danger(t("to.upload.tip.error.count", props.maxLength)).catch(() => {
23789
23722
  });
23790
23723
  }
23791
23724
  }
@@ -23912,7 +23845,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23912
23845
  handleUpload(file);
23913
23846
  });
23914
23847
  } else {
23915
- $tip.danger(`最多只能上传${props.maxLength}个文件`).catch(() => {
23848
+ $tip.danger(t("to.upload.tip.error.count", props.maxLength)).catch(() => {
23916
23849
  });
23917
23850
  }
23918
23851
  }
@@ -23927,6 +23860,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23927
23860
  const _directive_color = resolveDirective("color");
23928
23861
  return openBlock(), createElementBlock("div", {
23929
23862
  id: __props.id,
23863
+ key: unref(langKey),
23864
+ flex: __props.flex ? __props.flex : null,
23930
23865
  class: normalizeClass(["to-upload", setClass.value]),
23931
23866
  style: normalizeStyle(setStyle.value)
23932
23867
  }, [
@@ -23953,7 +23888,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23953
23888
  readonly: "",
23954
23889
  disabled: props.disabled,
23955
23890
  width: props.width,
23956
- placeholder: __props.placeholder,
23891
+ placeholder: __props.placeholder || unref(t)("to.common.placeholder.select"),
23957
23892
  verifiable: false
23958
23893
  }, {
23959
23894
  suffix: withCtx(() => [
@@ -23973,7 +23908,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23973
23908
  onClick: handleFile
23974
23909
  }, {
23975
23910
  default: withCtx(() => [
23976
- createTextVNode(toDisplayString(props.uploadText), 1)
23911
+ createTextVNode(toDisplayString(props.uploadText || unref(t)("to.upload.button")), 1)
23977
23912
  ]),
23978
23913
  _: 1
23979
23914
  }, 8, ["disabled"])) : createCommentVNode("", true),
@@ -24086,7 +24021,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
24086
24021
  class: "to-box-tip"
24087
24022
  }, [
24088
24023
  errorType.value === "rule" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
24089
- createTextVNode(" 选择有误 "),
24024
+ createTextVNode(toDisplayString(unref(t)("to.upload.selectError")) + " ", 1),
24090
24025
  withDirectives(createVNode(unref(ToIcon), {
24091
24026
  value: "help",
24092
24027
  color: "danger",
@@ -24101,12 +24036,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
24101
24036
  ]
24102
24037
  ])
24103
24038
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
24104
- createTextVNode(" 不能为空 ")
24039
+ createTextVNode(toDisplayString(unref(t)("to.upload.required")), 1)
24105
24040
  ], 64))
24106
24041
  ])), [
24107
24042
  [_directive_color, "danger"]
24108
24043
  ]) : createCommentVNode("", true)
24109
- ], 14, ["id"]);
24044
+ ], 14, ["id", "flex"]);
24110
24045
  };
24111
24046
  }
24112
24047
  });
@@ -24118,10 +24053,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24118
24053
  },
24119
24054
  __name: "import",
24120
24055
  props: {
24056
+ flex: { type: Boolean, default: false },
24121
24057
  mode: { default: "default" },
24122
24058
  type: { default: "button" },
24123
24059
  accept: { default: "" },
24124
- buttonText: { default: "导入" },
24060
+ buttonText: { default: "" },
24125
24061
  name: { default: "importfile" },
24126
24062
  action: { default: "" },
24127
24063
  beforeStart: { type: Function, default: () => true },
@@ -24237,7 +24173,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24237
24173
  await processFile(file);
24238
24174
  } else {
24239
24175
  state.value = "error";
24240
- errorTip.value = "文件类型不正确";
24176
+ errorTip.value = t("to.import.error.fileType");
24241
24177
  fileName.value = "";
24242
24178
  e.target.value = "";
24243
24179
  }
@@ -24263,13 +24199,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24263
24199
  emit("error", err, status, file);
24264
24200
  switch (err.type) {
24265
24201
  case "network_error":
24266
- errorTip.value = "网络错误:" + err.message;
24202
+ errorTip.value = t("to.import.error.network") + err.message;
24267
24203
  break;
24268
24204
  case "http_error":
24269
- errorTip.value = `服务器错误(${status}):${((_a2 = err.response) == null ? void 0 : _a2.message) || err.message}`;
24205
+ errorTip.value = t("to.import.error.server") + `(${status}):${((_a2 = err.response) == null ? void 0 : _a2.message) || err.message}`;
24270
24206
  break;
24271
24207
  case "parse_error":
24272
- errorTip.value = "服务器返回数据格式错误:" + err.message;
24208
+ errorTip.value = t("to.import.error.dataFormat") + err.message;
24273
24209
  break;
24274
24210
  }
24275
24211
  },
@@ -24335,7 +24271,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24335
24271
  await processFile(file);
24336
24272
  } else {
24337
24273
  state.value = "error";
24338
- errorTip.value = "文件类型不正确";
24274
+ errorTip.value = t("to.import.error.fileType");
24339
24275
  fileName.value = "";
24340
24276
  }
24341
24277
  }
@@ -24358,7 +24294,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24358
24294
  } else if (file) {
24359
24295
  e.preventDefault();
24360
24296
  state.value = "error";
24361
- errorTip.value = "文件类型不正确";
24297
+ errorTip.value = t("to.import.error.fileType");
24362
24298
  fileName.value = "";
24363
24299
  break;
24364
24300
  }
@@ -24398,6 +24334,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24398
24334
  return (_ctx, _cache) => {
24399
24335
  const _component_to_scroll = resolveComponent("to-scroll");
24400
24336
  return openBlock(), createElementBlock("span", {
24337
+ key: unref(langKey),
24338
+ flex: __props.flex ? __props.flex : null,
24401
24339
  class: normalizeClass(["to-import", setClass.value])
24402
24340
  }, [
24403
24341
  withDirectives(createElementVNode("input", {
@@ -24420,7 +24358,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24420
24358
  onClick: withModifiers(($event) => handleFloat(button.value), ["stop"])
24421
24359
  }, {
24422
24360
  default: withCtx(() => [
24423
- createTextVNode(toDisplayString(props.buttonText), 1)
24361
+ createTextVNode(toDisplayString(props.buttonText || unref(t)("to.import.button")), 1)
24424
24362
  ]),
24425
24363
  _: 1
24426
24364
  }, 8, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ToIcon), {
@@ -24459,7 +24397,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24459
24397
  class: "to-import-file-icon"
24460
24398
  }, null, 8, ["value"]),
24461
24399
  createElementVNode("div", { class: "to-import-file-name" }, [
24462
- createElementVNode("span", { class: "to-import-file-name-text" }, toDisplayString(errorTip.value || fileName.value || "点击 / 拖拽 / 粘贴"), 1)
24400
+ createElementVNode("span", { class: "to-import-file-name-text" }, toDisplayString(errorTip.value || fileName.value || unref(t)("to.import.dragText")), 1)
24463
24401
  ]),
24464
24402
  state.value || hasDownloadTemplate() ? (openBlock(), createElementBlock("div", {
24465
24403
  key: 0,
@@ -24472,7 +24410,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24472
24410
  onClick: withModifiers(handleReset, ["stop"])
24473
24411
  }, {
24474
24412
  default: withCtx(() => [
24475
- createTextVNode("重置")
24413
+ createTextVNode(toDisplayString(unref(t)("to.import.reset")), 1)
24476
24414
  ]),
24477
24415
  _: 1
24478
24416
  })) : hasDownloadTemplate() ? (openBlock(), createBlock(unref(ToButton), {
@@ -24482,7 +24420,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24482
24420
  onClick: withModifiers(downloadTem, ["stop"])
24483
24421
  }, {
24484
24422
  default: withCtx(() => [
24485
- createTextVNode("模版下载")
24423
+ createTextVNode(toDisplayString(unref(t)("to.import.downloadTemplate")), 1)
24486
24424
  ]),
24487
24425
  _: 1
24488
24426
  })) : createCommentVNode("", true)
@@ -24494,7 +24432,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24494
24432
  ]),
24495
24433
  _: 1
24496
24434
  }, 8, ["before-open", "before-close"])
24497
- ], 2);
24435
+ ], 10, ["flex"]);
24498
24436
  };
24499
24437
  }
24500
24438
  });
@@ -24505,12 +24443,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24505
24443
  },
24506
24444
  __name: "export",
24507
24445
  props: {
24446
+ flex: { type: Boolean, default: false },
24508
24447
  mode: { default: "default" },
24509
- buttonText: { default: "导出" },
24448
+ buttonText: { default: "" },
24510
24449
  type: { default: "button" },
24511
24450
  fileTypes: { default: ".xlsx,.xls" },
24512
24451
  fileType: { default: ".xls" },
24513
- fileName: { default: "导出文件" + format$1(/* @__PURE__ */ new Date(), "yyyyMMdd") },
24452
+ fileName: { default: "" },
24514
24453
  action: { default: "" },
24515
24454
  headers: { default: () => null },
24516
24455
  withCredentials: { type: Boolean, default: false },
@@ -24611,6 +24550,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24611
24550
  }
24612
24551
  return (_ctx, _cache) => {
24613
24552
  return openBlock(), createElementBlock("span", {
24553
+ key: unref(langKey),
24554
+ flex: __props.flex ? __props.flex : null,
24614
24555
  class: normalizeClass(["to-export", setClass.value])
24615
24556
  }, [
24616
24557
  props.type === "button" ? (openBlock(), createBlock(unref(ToButton), {
@@ -24624,7 +24565,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24624
24565
  onClick: withModifiers(($event) => handleFloat(buttonEl.value), ["stop"])
24625
24566
  }, {
24626
24567
  default: withCtx(() => [
24627
- createTextVNode(toDisplayString(props.buttonText), 1)
24568
+ createTextVNode(toDisplayString(props.buttonText || unref(t)("to.export.button")), 1)
24628
24569
  ]),
24629
24570
  _: 1
24630
24571
  }, 8, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ToIcon), {
@@ -24670,7 +24611,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24670
24611
  onClick: handleExport
24671
24612
  }, {
24672
24613
  default: withCtx(() => [
24673
- createTextVNode("确定")
24614
+ createTextVNode(toDisplayString(unref(t)("to.export.confirm")), 1)
24674
24615
  ]),
24675
24616
  _: 1
24676
24617
  })
@@ -24680,7 +24621,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
24680
24621
  ]),
24681
24622
  _: 1
24682
24623
  }, 8, ["before-open", "before-close", "onOpened", "onClosed"])
24683
- ], 2);
24624
+ ], 10, ["flex"]);
24684
24625
  };
24685
24626
  }
24686
24627
  });
@@ -25845,7 +25786,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
25845
25786
  if (isArray(color)) {
25846
25787
  return color.map((colorItem) => {
25847
25788
  if (isArray(colorItem)) {
25848
- return createGradientColor(colorItem[0], colorItem[1], colorItem[2]);
25789
+ return createGradientColor(colorItem[0], colorItem[1]);
25849
25790
  }
25850
25791
  return colorItem;
25851
25792
  });
@@ -25863,16 +25804,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
25863
25804
  });
25864
25805
  });
25865
25806
  });
25866
- const createGradientColor = (startColor, endColor, angle) => {
25867
- if (!echartsLib || !echartsLib.graphic || !echartsLib.graphic.LinearGradient) {
25868
- return startColor;
25869
- }
25870
- const a = Number(angle || 0);
25871
- const angleRad = a * Math.PI / 180;
25872
- return new echartsLib.graphic.LinearGradient(0, 0, Math.cos(angleRad), Math.sin(angleRad), [
25873
- { offset: 0, color: startColor },
25874
- { offset: 1, color: endColor }
25875
- ]);
25807
+ const createGradientColor = (startColor, endColor) => {
25808
+ return {
25809
+ type: "linear",
25810
+ x: 0,
25811
+ y: 0,
25812
+ x2: 0,
25813
+ y2: 1,
25814
+ colorStops: [
25815
+ { offset: 0, color: startColor },
25816
+ { offset: 1, color: endColor }
25817
+ ]
25818
+ };
25876
25819
  };
25877
25820
  const processDataItem = (item, index) => {
25878
25821
  const hasGap = Number(props.gap) > 0;
@@ -26523,7 +26466,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
26523
26466
  }
26524
26467
  series.push({
26525
26468
  type: props.chartsType,
26526
- data: props.data.map((item) => item.value),
26469
+ data: props.data,
26527
26470
  barWidth: Number(props.barSize) * currentEm.value,
26528
26471
  itemStyle: getItemStyle(),
26529
26472
  label: getSeriesLabelConfig(),
@@ -27257,17 +27200,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27257
27200
  }, 200);
27258
27201
  };
27259
27202
  const handleChartClick = (params) => {
27260
- const dataIndex = params.dataIndex;
27261
- const sourceData = props.data[dataIndex];
27262
- const colorArray = isArray(props.color) ? props.color : [];
27263
- const resolvedColor = colorArray.length > 0 ? colorArray[dataIndex % colorArray.length] : props.color;
27264
- const clickedData = {
27265
- name: sourceData.name,
27266
- value: sourceData.value,
27267
- color: resolvedColor,
27268
- index: dataIndex
27269
- };
27270
- emit("item-click", clickedData);
27203
+ emit("item-click", params);
27271
27204
  };
27272
27205
  watch(
27273
27206
  () => props.data,
@@ -27315,8 +27248,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27315
27248
  };
27316
27249
  }
27317
27250
  });
27318
- const echartsBar_vue_vue_type_style_index_0_scoped_8d27fd48_lang = "";
27319
- const EchartsBar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-8d27fd48"]]);
27251
+ const echartsBar_vue_vue_type_style_index_0_scoped_520981ab_lang = "";
27252
+ const EchartsBar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-520981ab"]]);
27320
27253
  const ToEchartsBar = withInstall(EchartsBar);
27321
27254
  const DEFAULT_VIEW_CONTROL = {
27322
27255
  zoomSensitivity: 0,