@airpower/web 0.2.38 → 0.2.40

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,6 +4,7 @@ declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: {
6
6
  default?(_: {}): any;
7
+ default?(_: {}): any;
7
8
  };
8
9
  refs: {};
9
10
  rootEl: any;
@@ -17,6 +18,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
17
18
  type: StringConstructor;
18
19
  default: undefined;
19
20
  };
21
+ /**
22
+ * # 是否是链接按钮
23
+ */
20
24
  link: {
21
25
  type: BooleanConstructor;
22
26
  default: boolean;
@@ -65,6 +69,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
65
69
  type: StringConstructor;
66
70
  default: undefined;
67
71
  };
72
+ /**
73
+ * # 是否是链接按钮
74
+ */
68
75
  link: {
69
76
  type: BooleanConstructor;
70
77
  default: boolean;
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, createElementBlock, openBlock, createElementVNode, computed, createBlock, unref, mergeProps, toHandlers, withCtx, renderSlot, resolveComponent, createVNode, createTextVNode, toDisplayString, ref, withModifiers, normalizeClass, onMounted, watch, resolveDirective, Transition, normalizeStyle, withDirectives, createCommentVNode, nextTick, inject, shallowRef, shallowReactive, reactive, h, provide, getCurrentInstance, watchEffect, Fragment, renderList, vShow, useSlots, createSlots, createApp, onUpdated, mergeModels, useModel, withKeys } from "vue";
4
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, computed, resolveComponent, createBlock, mergeProps, toHandlers, withCtx, renderSlot, unref, createVNode, createTextVNode, toDisplayString, ref, withModifiers, normalizeClass, onMounted, watch, resolveDirective, Transition, normalizeStyle, withDirectives, createCommentVNode, nextTick, inject, shallowRef, shallowReactive, reactive, h, provide, getCurrentInstance, watchEffect, Fragment, renderList, vShow, useSlots, createSlots, createApp, onUpdated, mergeModels, useModel, withKeys } from "vue";
5
5
  import ElementPlus, { ElButton, ElMessage, ElMessageBox, ElIcon, ElEmpty, ElFormItem, ElSubMenu, ElMenuItem, ElPagination, ElPopover, ElRadioGroup, ElRadioButton, ElInput, ElUpload, ElLink, ElTabPane, ElCheckTag, ElSelect, ElOption, ElTable, ElTableColumn } from "element-plus";
6
6
  import axios from "axios";
7
7
  /*! Element Plus Icons Vue v2.3.1 */
@@ -1158,6 +1158,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1158
1158
  type: String,
1159
1159
  default: void 0
1160
1160
  },
1161
+ /**
1162
+ * # 是否是链接按钮
1163
+ */
1161
1164
  link: {
1162
1165
  type: Boolean,
1163
1166
  default: false
@@ -1233,17 +1236,28 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1233
1236
  }
1234
1237
  });
1235
1238
  return (_ctx, _cache) => {
1236
- return openBlock(), createBlock(unref(ElButton), mergeProps({
1239
+ const _component_ElLink = resolveComponent("ElLink");
1240
+ return __props.link ? (openBlock(), createBlock(_component_ElLink, mergeProps({
1241
+ key: 0,
1242
+ disabled: isDisabled.value,
1243
+ type: __props.danger ? "danger" : __props.warning ? "warning" : __props.primary ? "primary" : "default",
1244
+ underline: false
1245
+ }, _ctx.$attrs, toHandlers(_ctx.$attrs)), {
1246
+ default: withCtx(() => [
1247
+ renderSlot(_ctx.$slots, "default")
1248
+ ]),
1249
+ _: 3
1250
+ }, 16, ["disabled", "type"])) : (openBlock(), createBlock(unref(ElButton), mergeProps({
1251
+ key: 1,
1237
1252
  disabled: isDisabled.value,
1238
1253
  icon: icon.value,
1239
- link: __props.link,
1240
1254
  type: __props.danger ? "danger" : __props.warning ? "warning" : __props.primary ? "primary" : "default"
1241
1255
  }, _ctx.$attrs, toHandlers(_ctx.$attrs)), {
1242
1256
  default: withCtx(() => [
1243
1257
  renderSlot(_ctx.$slots, "default")
1244
1258
  ]),
1245
1259
  _: 3
1246
- }, 16, ["disabled", "icon", "link", "type"]);
1260
+ }, 16, ["disabled", "icon", "type"]));
1247
1261
  };
1248
1262
  }
1249
1263
  });
@@ -13795,7 +13809,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13795
13809
  if (formConfig.value) {
13796
13810
  switch ((_a = formConfig.value) == null ? void 0 : _a.dateType) {
13797
13811
  case DateTimeType.DATE:
13798
- return DateTimeFormatter.FULL_DATE.label;
13812
+ return DateTimeFormatter.FULL_DATE.key;
13799
13813
  case DateTimeType.WEEK:
13800
13814
  return "第ww周";
13801
13815
  case DateTimeType.YEAR:
@@ -13803,7 +13817,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13803
13817
  case DateTimeType.MONTH:
13804
13818
  return "YYYY-MM";
13805
13819
  case DateTimeType.DATETIME:
13806
- return DateTimeFormatter.FULL_DATE_TIME.label;
13820
+ return DateTimeFormatter.FULL_DATE_TIME.key;
13807
13821
  }
13808
13822
  }
13809
13823
  return DateTimeFormatter.FULL_DATE_TIME;
@@ -13954,13 +13968,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13954
13968
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
13955
13969
  clearable: ((_a = formConfig.value) == null ? void 0 : _a.clearable) !== false,
13956
13970
  disabled: __props.disabled,
13957
- format: ((_b = formConfig.value.dateShowFormatter) == null ? void 0 : _b.label) || getShowFormatter.value,
13971
+ format: ((_b = formConfig.value.dateShowFormatter) == null ? void 0 : _b.key) || getShowFormatter.value,
13958
13972
  placeholder: placeholderRef.value,
13959
13973
  "prefix-icon": (_c = formConfig.value) == null ? void 0 : _c.prefixIcon,
13960
13974
  readonly: __props.readonly,
13961
13975
  "suffix-icon": (_d = formConfig.value) == null ? void 0 : _d.suffixIcon,
13962
13976
  type: formConfig.value.dateType,
13963
- "value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.label : unref(DateTimeFormatter).TIMESTAMP.label,
13977
+ "value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
13964
13978
  style: { "width": "100%" },
13965
13979
  onClear,
13966
13980
  onFocus: emitFocus,
@@ -13971,12 +13985,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
13971
13985
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
13972
13986
  clearable: ((_e = formConfig.value) == null ? void 0 : _e.clearable) !== false,
13973
13987
  disabled: __props.disabled,
13974
- format: ((_f = formConfig.value.dateShowFormatter) == null ? void 0 : _f.label) || unref(DateTimeFormatter).FULL_TIME.label,
13988
+ format: ((_f = formConfig.value.dateShowFormatter) == null ? void 0 : _f.key) || unref(DateTimeFormatter).FULL_TIME.key,
13975
13989
  placeholder: placeholderRef.value,
13976
13990
  "prefix-icon": (_g = formConfig.value) == null ? void 0 : _g.prefixIcon,
13977
13991
  readonly: __props.readonly,
13978
13992
  "suffix-icon": (_h = formConfig.value) == null ? void 0 : _h.suffixIcon,
13979
- "value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.label : unref(DateTimeFormatter).TIMESTAMP.label,
13993
+ "value-format": formConfig.value.dateFormatter ? formConfig.value.dateFormatter.key : unref(DateTimeFormatter).TIMESTAMP.key,
13980
13994
  style: { "width": "100%" },
13981
13995
  onClear,
13982
13996
  onFocus: emitFocus,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "0.2.38",
4
+ "version": "0.2.40",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",