@airpower/web 0.2.68 → 0.2.70

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.
@@ -46,6 +46,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
46
46
  type: BooleanConstructor;
47
47
  default: boolean;
48
48
  };
49
+ /**
50
+ * # 是否成功按钮
51
+ */
52
+ success: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
49
56
  /**
50
57
  * # 是否禁用按钮
51
58
  * 如不禁用,且传入了 `permission` 则按权限判断是否禁用 否则不禁用
@@ -97,6 +104,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
97
104
  type: BooleanConstructor;
98
105
  default: boolean;
99
106
  };
107
+ /**
108
+ * # 是否成功按钮
109
+ */
110
+ success: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
100
114
  /**
101
115
  * # 是否禁用按钮
102
116
  * 如不禁用,且传入了 `permission` 则按权限判断是否禁用 否则不禁用
@@ -118,6 +132,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
118
132
  primary: boolean;
119
133
  danger: boolean;
120
134
  warning: boolean;
135
+ success: boolean;
121
136
  disabled: boolean;
122
137
  icon: ButtonIcon;
123
138
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
package/dist/main.js CHANGED
@@ -1257,6 +1257,13 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1257
1257
  type: Boolean,
1258
1258
  default: false
1259
1259
  },
1260
+ /**
1261
+ * # 是否成功按钮
1262
+ */
1263
+ success: {
1264
+ type: Boolean,
1265
+ default: false
1266
+ },
1260
1267
  /**
1261
1268
  * # 是否禁用按钮
1262
1269
  * 如不禁用,且传入了 `permission` 则按权限判断是否禁用 否则不禁用
@@ -1281,7 +1288,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1281
1288
  }
1282
1289
  if (props.permission) {
1283
1290
  const forbidden = !PermissionUtil.has(props.permission) && !WebConfig.disablePermission;
1284
- console.warn(`[AButton] 权限不足(${props.permission})`);
1291
+ if (forbidden) {
1292
+ console.warn(`[AButton] 权限不足(${props.permission})`);
1293
+ }
1285
1294
  return forbidden;
1286
1295
  }
1287
1296
  return false;
@@ -1319,7 +1328,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1319
1328
  return __props.link ? (openBlock(), createBlock(_component_ElLink, mergeProps({
1320
1329
  key: 0,
1321
1330
  disabled: isDisabled.value,
1322
- type: __props.danger ? "danger" : __props.warning ? "warning" : __props.primary ? "primary" : "info",
1331
+ type: __props.danger ? "danger" : __props.warning ? "warning" : __props.primary ? "primary" : __props.success ? "success" : "default",
1323
1332
  underline: false
1324
1333
  }, _ctx.$attrs, toHandlers(_ctx.$attrs)), {
1325
1334
  default: withCtx(() => [
@@ -1330,7 +1339,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1330
1339
  key: 1,
1331
1340
  disabled: isDisabled.value,
1332
1341
  icon: icon.value,
1333
- type: __props.danger ? "danger" : __props.warning ? "warning" : __props.primary ? "primary" : "default"
1342
+ type: __props.danger ? "danger" : __props.warning ? "warning" : __props.primary ? "primary" : __props.success ? "success" : "default"
1334
1343
  }, _ctx.$attrs, toHandlers(_ctx.$attrs)), {
1335
1344
  default: withCtx(() => [
1336
1345
  renderSlot(_ctx.$slots, "default")
@@ -18268,7 +18277,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18268
18277
  money: getValue(scope, item.key)
18269
18278
  }, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
18270
18279
  item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
18271
- createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((item2) => item2.getPayloadLabel()).join(",")), 1)
18280
+ createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((payload) => payload.getPayloadLabel()).join(",")), 1)
18272
18281
  ], 64)) : (openBlock(), createBlock(unref(APayload), {
18273
18282
  key: 1,
18274
18283
  payload: getValue(scope, item.key)
@@ -18323,7 +18332,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18323
18332
  key: 1,
18324
18333
  disabled: unref(isEditDisabled)(getRowEntity(scope)),
18325
18334
  underline: false,
18326
- type: "primary",
18327
18335
  onClick: ($event) => emits("edit", getRowEntity(scope))
18328
18336
  }, {
18329
18337
  default: withCtx(() => [
@@ -18347,6 +18355,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18347
18355
  key: 0,
18348
18356
  disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
18349
18357
  underline: false,
18358
+ type: "success",
18350
18359
  onClick: ($event) => emits("enable", getRowEntity(scope))
18351
18360
  }, {
18352
18361
  default: withCtx(() => [
@@ -18357,6 +18366,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18357
18366
  key: 1,
18358
18367
  disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
18359
18368
  underline: false,
18369
+ type: "warning",
18360
18370
  onClick: ($event) => emits("disable", getRowEntity(scope))
18361
18371
  }, {
18362
18372
  default: withCtx(() => [
package/dist/web.css CHANGED
@@ -1307,7 +1307,7 @@ textarea {
1307
1307
  margin-bottom: 10px;
1308
1308
  }
1309
1309
  .a-table-container .a-table-toolbar .a-table-toolbar-left .el-button + .el-button {
1310
- margin-left: 0px;
1310
+ margin-left: 0;
1311
1311
  }
1312
1312
  .a-table-container .a-table-toolbar .a-table-toolbar-right {
1313
1313
  flex: 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "0.2.68",
4
+ "version": "0.2.70",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",