@airpower/web 0.2.34 → 0.2.36

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.
@@ -4,24 +4,28 @@
4
4
  * @author Hamm.cn
5
5
  */
6
6
  export declare enum DateTimeType {
7
+ /**
8
+ * ### 时间日期
9
+ */
10
+ DATETIME = "datetime",
7
11
  /**
8
12
  * ### 日期
9
13
  */
10
14
  DATE = "date",
11
15
  /**
12
- * ### 星期
16
+ * ### 时间
13
17
  */
14
- WEEK = "week",
18
+ TIME = "time",
15
19
  /**
16
- * ### 月份
20
+ * ###
17
21
  */
18
- MONTH = "month",
22
+ WEEK = "week",
19
23
  /**
20
- * ### 年份
24
+ * ###
21
25
  */
22
26
  YEAR = "year",
23
27
  /**
24
- * ### 日期时间
28
+ * ###
25
29
  */
26
- DATETIME = "datetime"
30
+ MONTH = "month"
27
31
  }
package/dist/main.js CHANGED
@@ -13632,11 +13632,12 @@ var FormTrim = /* @__PURE__ */ ((FormTrim2) => {
13632
13632
  return FormTrim2;
13633
13633
  })(FormTrim || {});
13634
13634
  var DateTimeType = /* @__PURE__ */ ((DateTimeType2) => {
13635
+ DateTimeType2["DATETIME"] = "datetime";
13635
13636
  DateTimeType2["DATE"] = "date";
13637
+ DateTimeType2["TIME"] = "time";
13636
13638
  DateTimeType2["WEEK"] = "week";
13637
- DateTimeType2["MONTH"] = "month";
13638
13639
  DateTimeType2["YEAR"] = "year";
13639
- DateTimeType2["DATETIME"] = "datetime";
13640
+ DateTimeType2["MONTH"] = "month";
13640
13641
  return DateTimeType2;
13641
13642
  })(DateTimeType || {});
13642
13643
  var WebColor = /* @__PURE__ */ ((WebColor2) => {
@@ -13794,7 +13795,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13794
13795
  if (formConfig.value) {
13795
13796
  switch ((_a = formConfig.value) == null ? void 0 : _a.dateType) {
13796
13797
  case DateTimeType.DATE:
13797
- return DateTimeFormatter.FULL_DATE;
13798
+ return DateTimeFormatter.FULL_DATE.label;
13798
13799
  case DateTimeType.WEEK:
13799
13800
  return "第ww周";
13800
13801
  case DateTimeType.YEAR:
@@ -13802,7 +13803,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13802
13803
  case DateTimeType.MONTH:
13803
13804
  return "YYYY-MM";
13804
13805
  case DateTimeType.DATETIME:
13805
- return DateTimeFormatter.FULL_DATE_TIME;
13806
+ return DateTimeFormatter.FULL_DATE_TIME.label;
13806
13807
  }
13807
13808
  }
13808
13809
  return DateTimeFormatter.FULL_DATE_TIME;
@@ -13932,7 +13933,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13932
13933
  const slots = useSlots();
13933
13934
  init();
13934
13935
  return (_ctx, _cache) => {
13935
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G;
13936
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
13936
13937
  const _component_el_date_picker = resolveComponent("el-date-picker");
13937
13938
  const _component_el_time_picker = resolveComponent("el-time-picker");
13938
13939
  const _component_el_switch = resolveComponent("el-switch");
@@ -13946,19 +13947,19 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13946
13947
  const _component_el_input = resolveComponent("el-input");
13947
13948
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
13948
13949
  formConfig.value && formConfig.value.dateType !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
13949
- formConfig.value.dateType !== unref(DateTimeType).DATE ? (openBlock(), createBlock(_component_el_date_picker, {
13950
+ formConfig.value.dateType !== unref(DateTimeType).TIME ? (openBlock(), createBlock(_component_el_date_picker, {
13950
13951
  key: 0,
13951
13952
  modelValue: value.value,
13952
13953
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
13953
13954
  clearable: ((_a = formConfig.value) == null ? void 0 : _a.clearable) !== false,
13954
13955
  disabled: __props.disabled,
13955
- format: formConfig.value.dateShowFormatter || getShowFormatter.value,
13956
+ format: ((_b = formConfig.value.dateShowFormatter) == null ? void 0 : _b.label) || getShowFormatter.value,
13956
13957
  placeholder: placeholderRef.value,
13957
- "prefix-icon": (_b = formConfig.value) == null ? void 0 : _b.prefixIcon,
13958
+ "prefix-icon": (_c = formConfig.value) == null ? void 0 : _c.prefixIcon,
13958
13959
  readonly: __props.readonly,
13959
- "suffix-icon": (_c = formConfig.value) == null ? void 0 : _c.suffixIcon,
13960
+ "suffix-icon": (_d = formConfig.value) == null ? void 0 : _d.suffixIcon,
13960
13961
  type: formConfig.value.dateType,
13961
- "value-format": formConfig.value.dateFormatter,
13962
+ "value-format": (_e = formConfig.value.dateFormatter) == null ? void 0 : _e.label,
13962
13963
  style: { "width": "100%" },
13963
13964
  onClear,
13964
13965
  onFocus: emitFocus,
@@ -13967,21 +13968,21 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13967
13968
  key: 1,
13968
13969
  modelValue: value.value,
13969
13970
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
13970
- clearable: ((_d = formConfig.value) == null ? void 0 : _d.clearable) !== false,
13971
+ clearable: ((_f = formConfig.value) == null ? void 0 : _f.clearable) !== false,
13971
13972
  disabled: __props.disabled,
13972
- format: formConfig.value.dateShowFormatter || unref(DateTimeFormatter).FULL_TIME,
13973
+ format: ((_g = formConfig.value.dateShowFormatter) == null ? void 0 : _g.label) || unref(DateTimeFormatter).FULL_TIME.label,
13973
13974
  placeholder: placeholderRef.value,
13974
- "prefix-icon": (_e = formConfig.value) == null ? void 0 : _e.prefixIcon,
13975
+ "prefix-icon": (_h = formConfig.value) == null ? void 0 : _h.prefixIcon,
13975
13976
  readonly: __props.readonly,
13976
- "suffix-icon": (_f = formConfig.value) == null ? void 0 : _f.suffixIcon,
13977
- "value-format": formConfig.value.dateFormatter,
13977
+ "suffix-icon": (_i = formConfig.value) == null ? void 0 : _i.suffixIcon,
13978
+ "value-format": (_j = formConfig.value.dateFormatter) == null ? void 0 : _j.label,
13978
13979
  style: { "width": "100%" },
13979
13980
  onClear,
13980
13981
  onFocus: emitFocus,
13981
13982
  onKeydown: onKeyDown
13982
13983
  }, null, 8, ["modelValue", "clearable", "disabled", "format", "placeholder", "prefix-icon", "readonly", "suffix-icon", "value-format"]))
13983
13984
  ], 64)) : __props.list || dictionary.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
13984
- ((_g = formConfig.value) == null ? void 0 : _g.switch) ? (openBlock(), createBlock(_component_el_switch, {
13985
+ ((_k = formConfig.value) == null ? void 0 : _k.switch) ? (openBlock(), createBlock(_component_el_switch, {
13985
13986
  key: 0,
13986
13987
  modelValue: value.value,
13987
13988
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event),
@@ -13992,7 +13993,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13992
13993
  "--el-switch-on-color": getSwitchColor(true),
13993
13994
  "--el-switch-off-color": getSwitchColor(false)
13994
13995
  })
13995
- }, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) : ((_h = formConfig.value) == null ? void 0 : _h.radioButton) ? (openBlock(), createBlock(_component_el_radio_group, {
13996
+ }, null, 8, ["modelValue", "active-text", "inactive-text", "readonly", "style"])) : ((_l = formConfig.value) == null ? void 0 : _l.radioButton) ? (openBlock(), createBlock(_component_el_radio_group, {
13996
13997
  key: 1,
13997
13998
  modelValue: value.value,
13998
13999
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => value.value = $event),
@@ -14012,7 +14013,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14012
14013
  }), 128))
14013
14014
  ]),
14014
14015
  _: 1
14015
- }, 8, ["modelValue", "readonly"])) : ((_i = formConfig.value) == null ? void 0 : _i.radio) ? (openBlock(), createBlock(_component_el_radio_group, {
14016
+ }, 8, ["modelValue", "readonly"])) : ((_m = formConfig.value) == null ? void 0 : _m.radio) ? (openBlock(), createBlock(_component_el_radio_group, {
14016
14017
  key: 2,
14017
14018
  modelValue: value.value,
14018
14019
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => value.value = $event),
@@ -14036,18 +14037,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14036
14037
  key: 3,
14037
14038
  modelValue: value.value,
14038
14039
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => value.value = $event),
14039
- clearable: ((_j = formConfig.value) == null ? void 0 : _j.clearable) !== false,
14040
- "collapse-tags": (_k = formConfig.value) == null ? void 0 : _k.collapseTags,
14040
+ clearable: ((_n = formConfig.value) == null ? void 0 : _n.clearable) !== false,
14041
+ "collapse-tags": (_o = formConfig.value) == null ? void 0 : _o.collapseTags,
14041
14042
  disabled: __props.disabled,
14042
- filterable: (_l = formConfig.value) == null ? void 0 : _l.filterable,
14043
- multiple: (_m = formConfig.value) == null ? void 0 : _m.multiple,
14044
- "multiple-limit": (_n = formConfig.value) == null ? void 0 : _n.multipleLimit,
14043
+ filterable: (_p = formConfig.value) == null ? void 0 : _p.filterable,
14044
+ multiple: (_q = formConfig.value) == null ? void 0 : _q.multiple,
14045
+ "multiple-limit": (_r = formConfig.value) == null ? void 0 : _r.multipleLimit,
14045
14046
  placeholder: placeholderRef.value,
14046
- "prefix-icon": (_o = formConfig.value) == null ? void 0 : _o.prefixIcon,
14047
+ "prefix-icon": (_s = formConfig.value) == null ? void 0 : _s.prefixIcon,
14047
14048
  readonly: __props.readonly,
14048
14049
  remote: !!__props.onSearch,
14049
14050
  "remote-method": __props.onSearch,
14050
- "suffix-icon": (_p = formConfig.value) == null ? void 0 : _p.suffixIcon,
14051
+ "suffix-icon": (_t = formConfig.value) == null ? void 0 : _t.suffixIcon,
14051
14052
  "collapse-tags-tooltip": "",
14052
14053
  "fit-input-width": "",
14053
14054
  onClear,
@@ -14084,20 +14085,20 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14084
14085
  key: 2,
14085
14086
  modelValue: value.value,
14086
14087
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event),
14087
- clearable: ((_q = formConfig.value) == null ? void 0 : _q.clearable) !== false,
14088
- "collapse-tags": (_r = formConfig.value) == null ? void 0 : _r.collapseTags,
14088
+ clearable: ((_u = formConfig.value) == null ? void 0 : _u.clearable) !== false,
14089
+ "collapse-tags": (_v = formConfig.value) == null ? void 0 : _v.collapseTags,
14089
14090
  disabled: __props.disabled,
14090
14091
  options: __props.tree,
14091
14092
  placeholder: placeholderRef.value,
14092
14093
  props: {
14093
14094
  value: "id",
14094
14095
  label: "name",
14095
- multiple: (_s = formConfig.value) == null ? void 0 : _s.multiple,
14096
- emitPath: (_t = formConfig.value) == null ? void 0 : _t.emitPath,
14097
- checkStrictly: (_u = formConfig.value) == null ? void 0 : _u.checkStrictly
14096
+ multiple: (_w = formConfig.value) == null ? void 0 : _w.multiple,
14097
+ emitPath: (_x = formConfig.value) == null ? void 0 : _x.emitPath,
14098
+ checkStrictly: (_y = formConfig.value) == null ? void 0 : _y.checkStrictly
14098
14099
  },
14099
14100
  readonly: __props.readonly,
14100
- "show-all-levels": (_v = formConfig.value) == null ? void 0 : _v.showAllLevels,
14101
+ "show-all-levels": (_z = formConfig.value) == null ? void 0 : _z.showAllLevels,
14101
14102
  class: "a-input-cascader",
14102
14103
  "collapse-tags-tooltip": "",
14103
14104
  "popper-class": "a-input-cascader-popper",
@@ -14108,18 +14109,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14108
14109
  key: 3,
14109
14110
  modelValue: value.value,
14110
14111
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => value.value = $event),
14111
- autosize: ((_w = formConfig.value) == null ? void 0 : _w.autoSize) ? { minRows: formConfig.value.minRows, maxRows: formConfig.value.maxRows } : false,
14112
- clearable: ((_x = formConfig.value) == null ? void 0 : _x.clearable) !== false,
14112
+ autosize: ((_A = formConfig.value) == null ? void 0 : _A.autoSize) ? { minRows: formConfig.value.minRows, maxRows: formConfig.value.maxRows } : false,
14113
+ clearable: ((_B = formConfig.value) == null ? void 0 : _B.clearable) !== false,
14113
14114
  disabled: __props.disabled,
14114
- max: (_y = formConfig.value) == null ? void 0 : _y.max,
14115
- maxlength: ((_z = formConfig.value) == null ? void 0 : _z.maxLength) || (((_A = formConfig.value) == null ? void 0 : _A.textarea) ? unref(WebConfig).maxTextAreaLength : unref(WebConfig).maxTextLength),
14116
- min: ((_B = formConfig.value) == null ? void 0 : _B.min) ?? 0,
14115
+ max: (_C = formConfig.value) == null ? void 0 : _C.max,
14116
+ maxlength: ((_D = formConfig.value) == null ? void 0 : _D.maxLength) || (((_E = formConfig.value) == null ? void 0 : _E.textarea) ? unref(WebConfig).maxTextAreaLength : unref(WebConfig).maxTextLength),
14117
+ min: ((_F = formConfig.value) == null ? void 0 : _F.min) ?? 0,
14117
14118
  placeholder: placeholderRef.value,
14118
- "prefix-icon": (_C = formConfig.value) == null ? void 0 : _C.prefixIcon,
14119
+ "prefix-icon": (_G = formConfig.value) == null ? void 0 : _G.prefixIcon,
14119
14120
  readonly: __props.readonly,
14120
- rows: ((_D = formConfig.value) == null ? void 0 : _D.textarea) ? unref(WebConfig).textareaMinRows : 0,
14121
- "show-word-limit": ((_E = formConfig.value) == null ? void 0 : _E.showLimit) !== false,
14122
- "suffix-icon": (_F = formConfig.value) == null ? void 0 : _F.suffixIcon,
14121
+ rows: ((_H = formConfig.value) == null ? void 0 : _H.textarea) ? unref(WebConfig).textareaMinRows : 0,
14122
+ "show-word-limit": ((_I = formConfig.value) == null ? void 0 : _I.showLimit) !== false,
14123
+ "suffix-icon": (_J = formConfig.value) == null ? void 0 : _J.suffixIcon,
14123
14124
  type: getInputType.value,
14124
14125
  onBlur,
14125
14126
  onChange: checkNumberValue,
@@ -14153,7 +14154,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14153
14154
  ])
14154
14155
  };
14155
14156
  }),
14156
- !_ctx.$slots.append && ((_G = formConfig.value) == null ? void 0 : _G.suffixText) ? {
14157
+ !_ctx.$slots.append && ((_K = formConfig.value) == null ? void 0 : _K.suffixText) ? {
14157
14158
  name: "append",
14158
14159
  fn: withCtx(() => [
14159
14160
  createTextVNode(toDisplayString(formConfig.value.suffixText), 1)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "0.2.34",
4
+ "version": "0.2.36",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",