@94ai/nf-table 5.0.36 → 5.0.38

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.
@@ -6580,6 +6580,14 @@ __sfc_main.setup = (__props, __ctx) => {
6580
6580
  var _a2;
6581
6581
  (_a2 = elTableRef.value) == null ? void 0 : _a2.sort(prop, order);
6582
6582
  };
6583
+ const getActionBarItemStyle = (item, additionStyle) => {
6584
+ return {
6585
+ // action默认右边距为8px
6586
+ marginRight: "8px",
6587
+ ...additionStyle || {},
6588
+ ...item.style || {}
6589
+ };
6590
+ };
6583
6591
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6584
6592
  var _a2, _b;
6585
6593
  await vueDemi.nextTick();
@@ -6676,6 +6684,7 @@ __sfc_main.setup = (__props, __ctx) => {
6676
6684
  renderPage,
6677
6685
  pageAttrer,
6678
6686
  isShow,
6687
+ getActionBarItemStyle,
6679
6688
  fieldsConfirm,
6680
6689
  columnCheckConfirm
6681
6690
  }, {
@@ -7019,11 +7028,9 @@ var _sfc_render = function render3() {
7019
7028
  return [item.element === "el-button" ? _c("nf-button", _vm._g({
7020
7029
  key: item.key || index2,
7021
7030
  class: item.class,
7022
- style: {
7023
- ...item.style || {},
7024
- marginRight: "16px",
7031
+ style: _vm.getActionBarItemStyle(item, {
7025
7032
  marginLeft: "0px"
7026
- },
7033
+ }),
7027
7034
  attrs: {
7028
7035
  "size": item.size || "mini",
7029
7036
  "type": item.type || "text",
@@ -7037,10 +7044,7 @@ var _sfc_render = function render3() {
7037
7044
  }, item.events), [_vm._v(_vm._s(item.value) + " ")]) : _vm._e(), item.element === "el-checkbox" ? _c("el-checkbox", _vm._g({
7038
7045
  key: item.key || index2,
7039
7046
  class: item.class,
7040
- style: {
7041
- ...item.style || {},
7042
- marginRight: "16px"
7043
- },
7047
+ style: _vm.getActionBarItemStyle(item),
7044
7048
  attrs: {
7045
7049
  "label": item.label,
7046
7050
  "true-label": item["true-label"],
@@ -7062,10 +7066,7 @@ var _sfc_render = function render3() {
7062
7066
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-checkbox-group" ? _c("el-checkbox-group", _vm._g({
7063
7067
  key: item.key || index2,
7064
7068
  class: item.class,
7065
- style: {
7066
- ...item.style || {},
7067
- marginRight: "16px"
7068
- },
7069
+ style: _vm.getActionBarItemStyle(item),
7069
7070
  attrs: {
7070
7071
  "label": item.label,
7071
7072
  "true-label": item["true-label"],
@@ -7139,10 +7140,7 @@ var _sfc_render = function render3() {
7139
7140
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-checkbox-button" ? _c("el-checkbox-button", _vm._g({
7140
7141
  key: item.key || index2,
7141
7142
  class: item.class,
7142
- style: {
7143
- ...item.style || {},
7144
- marginRight: "16px"
7145
- },
7143
+ style: _vm.getActionBarItemStyle(item),
7146
7144
  attrs: {
7147
7145
  "label": item.label,
7148
7146
  "true-label": item["true-label"],
@@ -7164,10 +7162,7 @@ var _sfc_render = function render3() {
7164
7162
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio" ? _c("el-radio", _vm._g({
7165
7163
  key: item.key || index2,
7166
7164
  class: item.class,
7167
- style: {
7168
- ...item.style || {},
7169
- marginRight: "16px"
7170
- },
7165
+ style: _vm.getActionBarItemStyle(item),
7171
7166
  attrs: {
7172
7167
  "label": item.label,
7173
7168
  "disabled": item.disabled,
@@ -7185,10 +7180,7 @@ var _sfc_render = function render3() {
7185
7180
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio-group" ? _c("el-radio-group", _vm._g({
7186
7181
  key: item.key || index2,
7187
7182
  class: item.class,
7188
- style: {
7189
- ...item.style || {},
7190
- marginRight: "16px"
7191
- },
7183
+ style: _vm.getActionBarItemStyle(item),
7192
7184
  attrs: {
7193
7185
  "disabled": item.disabled,
7194
7186
  "size": item.size,
@@ -7249,10 +7241,7 @@ var _sfc_render = function render3() {
7249
7241
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-radio-button" ? _c("el-radio-button", _vm._g({
7250
7242
  key: item.key || index2,
7251
7243
  class: item.class,
7252
- style: {
7253
- ...item.style || {},
7254
- marginRight: "16px"
7255
- },
7244
+ style: _vm.getActionBarItemStyle(item),
7256
7245
  attrs: {
7257
7246
  "label": item.label,
7258
7247
  "disabled": item.disabled,
@@ -7270,10 +7259,7 @@ var _sfc_render = function render3() {
7270
7259
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input" ? _c("el-input", _vm._g({
7271
7260
  key: item.key || index2,
7272
7261
  class: item.class,
7273
- style: {
7274
- ...item.style || {},
7275
- marginRight: "16px"
7276
- },
7262
+ style: _vm.getActionBarItemStyle(item),
7277
7263
  attrs: {
7278
7264
  "show-word-limit": item["show-word-limit"],
7279
7265
  "show-password": item["show-password"],
@@ -7319,10 +7305,7 @@ var _sfc_render = function render3() {
7319
7305
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-autocomplete" ? _c("el-autocomplete", _vm._g({
7320
7306
  key: item.key || index2,
7321
7307
  class: item.class,
7322
- style: {
7323
- ...item.style || {},
7324
- marginRight: "16px"
7325
- },
7308
+ style: _vm.getActionBarItemStyle(item),
7326
7309
  attrs: {
7327
7310
  "value-key": item["value-key"],
7328
7311
  "fetch-suggestions": item["fetch-suggestions"],
@@ -7359,10 +7342,7 @@ var _sfc_render = function render3() {
7359
7342
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-switch" ? _c("el-switch", _vm._g({
7360
7343
  key: item.key || index2,
7361
7344
  class: item.class,
7362
- style: {
7363
- ...item.style || {},
7364
- marginRight: "16px"
7365
- },
7345
+ style: _vm.getActionBarItemStyle(item),
7366
7346
  attrs: {
7367
7347
  "disabled": item.disabled,
7368
7348
  "width": item.width,
@@ -7387,10 +7367,7 @@ var _sfc_render = function render3() {
7387
7367
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input-number" ? _c("el-input-number", _vm._g({
7388
7368
  key: item.key || index2,
7389
7369
  class: item.class,
7390
- style: {
7391
- ...item.style || {},
7392
- marginRight: "16px"
7393
- },
7370
+ style: _vm.getActionBarItemStyle(item),
7394
7371
  attrs: {
7395
7372
  "min": item.min,
7396
7373
  "max": item.max,
@@ -7415,10 +7392,7 @@ var _sfc_render = function render3() {
7415
7392
  }, item.events)) : _vm._e(), item.element === "text" ? _c("span", _vm._g(_vm._b({
7416
7393
  key: item.key || index2,
7417
7394
  class: item.class,
7418
- style: {
7419
- ...item.style || {},
7420
- marginRight: "16px"
7421
- }
7395
+ style: _vm.getActionBarItemStyle(item)
7422
7396
  }, "span", item.attr, false), item.events), [_vm._v(" " + _vm._s(item.value) + " ")]) : _vm._e()];
7423
7397
  })] : _vm._e()];
7424
7398
  }), _vm._t("pagination", function() {
@@ -6578,6 +6578,14 @@ __sfc_main.setup = (__props, __ctx) => {
6578
6578
  var _a2;
6579
6579
  (_a2 = elTableRef.value) == null ? void 0 : _a2.sort(prop, order);
6580
6580
  };
6581
+ const getActionBarItemStyle = (item, additionStyle) => {
6582
+ return {
6583
+ // action默认右边距为8px
6584
+ marginRight: "8px",
6585
+ ...additionStyle || {},
6586
+ ...item.style || {}
6587
+ };
6588
+ };
6581
6589
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6582
6590
  var _a2, _b;
6583
6591
  await nextTick();
@@ -6674,6 +6682,7 @@ __sfc_main.setup = (__props, __ctx) => {
6674
6682
  renderPage,
6675
6683
  pageAttrer,
6676
6684
  isShow,
6685
+ getActionBarItemStyle,
6677
6686
  fieldsConfirm,
6678
6687
  columnCheckConfirm
6679
6688
  }, {
@@ -7017,11 +7026,9 @@ var _sfc_render = function render3() {
7017
7026
  return [item.element === "el-button" ? _c("nf-button", _vm._g({
7018
7027
  key: item.key || index2,
7019
7028
  class: item.class,
7020
- style: {
7021
- ...item.style || {},
7022
- marginRight: "16px",
7029
+ style: _vm.getActionBarItemStyle(item, {
7023
7030
  marginLeft: "0px"
7024
- },
7031
+ }),
7025
7032
  attrs: {
7026
7033
  "size": item.size || "mini",
7027
7034
  "type": item.type || "text",
@@ -7035,10 +7042,7 @@ var _sfc_render = function render3() {
7035
7042
  }, item.events), [_vm._v(_vm._s(item.value) + " ")]) : _vm._e(), item.element === "el-checkbox" ? _c("el-checkbox", _vm._g({
7036
7043
  key: item.key || index2,
7037
7044
  class: item.class,
7038
- style: {
7039
- ...item.style || {},
7040
- marginRight: "16px"
7041
- },
7045
+ style: _vm.getActionBarItemStyle(item),
7042
7046
  attrs: {
7043
7047
  "label": item.label,
7044
7048
  "true-label": item["true-label"],
@@ -7060,10 +7064,7 @@ var _sfc_render = function render3() {
7060
7064
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-checkbox-group" ? _c("el-checkbox-group", _vm._g({
7061
7065
  key: item.key || index2,
7062
7066
  class: item.class,
7063
- style: {
7064
- ...item.style || {},
7065
- marginRight: "16px"
7066
- },
7067
+ style: _vm.getActionBarItemStyle(item),
7067
7068
  attrs: {
7068
7069
  "label": item.label,
7069
7070
  "true-label": item["true-label"],
@@ -7137,10 +7138,7 @@ var _sfc_render = function render3() {
7137
7138
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-checkbox-button" ? _c("el-checkbox-button", _vm._g({
7138
7139
  key: item.key || index2,
7139
7140
  class: item.class,
7140
- style: {
7141
- ...item.style || {},
7142
- marginRight: "16px"
7143
- },
7141
+ style: _vm.getActionBarItemStyle(item),
7144
7142
  attrs: {
7145
7143
  "label": item.label,
7146
7144
  "true-label": item["true-label"],
@@ -7162,10 +7160,7 @@ var _sfc_render = function render3() {
7162
7160
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio" ? _c("el-radio", _vm._g({
7163
7161
  key: item.key || index2,
7164
7162
  class: item.class,
7165
- style: {
7166
- ...item.style || {},
7167
- marginRight: "16px"
7168
- },
7163
+ style: _vm.getActionBarItemStyle(item),
7169
7164
  attrs: {
7170
7165
  "label": item.label,
7171
7166
  "disabled": item.disabled,
@@ -7183,10 +7178,7 @@ var _sfc_render = function render3() {
7183
7178
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio-group" ? _c("el-radio-group", _vm._g({
7184
7179
  key: item.key || index2,
7185
7180
  class: item.class,
7186
- style: {
7187
- ...item.style || {},
7188
- marginRight: "16px"
7189
- },
7181
+ style: _vm.getActionBarItemStyle(item),
7190
7182
  attrs: {
7191
7183
  "disabled": item.disabled,
7192
7184
  "size": item.size,
@@ -7247,10 +7239,7 @@ var _sfc_render = function render3() {
7247
7239
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-radio-button" ? _c("el-radio-button", _vm._g({
7248
7240
  key: item.key || index2,
7249
7241
  class: item.class,
7250
- style: {
7251
- ...item.style || {},
7252
- marginRight: "16px"
7253
- },
7242
+ style: _vm.getActionBarItemStyle(item),
7254
7243
  attrs: {
7255
7244
  "label": item.label,
7256
7245
  "disabled": item.disabled,
@@ -7268,10 +7257,7 @@ var _sfc_render = function render3() {
7268
7257
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input" ? _c("el-input", _vm._g({
7269
7258
  key: item.key || index2,
7270
7259
  class: item.class,
7271
- style: {
7272
- ...item.style || {},
7273
- marginRight: "16px"
7274
- },
7260
+ style: _vm.getActionBarItemStyle(item),
7275
7261
  attrs: {
7276
7262
  "show-word-limit": item["show-word-limit"],
7277
7263
  "show-password": item["show-password"],
@@ -7317,10 +7303,7 @@ var _sfc_render = function render3() {
7317
7303
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-autocomplete" ? _c("el-autocomplete", _vm._g({
7318
7304
  key: item.key || index2,
7319
7305
  class: item.class,
7320
- style: {
7321
- ...item.style || {},
7322
- marginRight: "16px"
7323
- },
7306
+ style: _vm.getActionBarItemStyle(item),
7324
7307
  attrs: {
7325
7308
  "value-key": item["value-key"],
7326
7309
  "fetch-suggestions": item["fetch-suggestions"],
@@ -7357,10 +7340,7 @@ var _sfc_render = function render3() {
7357
7340
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-switch" ? _c("el-switch", _vm._g({
7358
7341
  key: item.key || index2,
7359
7342
  class: item.class,
7360
- style: {
7361
- ...item.style || {},
7362
- marginRight: "16px"
7363
- },
7343
+ style: _vm.getActionBarItemStyle(item),
7364
7344
  attrs: {
7365
7345
  "disabled": item.disabled,
7366
7346
  "width": item.width,
@@ -7385,10 +7365,7 @@ var _sfc_render = function render3() {
7385
7365
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input-number" ? _c("el-input-number", _vm._g({
7386
7366
  key: item.key || index2,
7387
7367
  class: item.class,
7388
- style: {
7389
- ...item.style || {},
7390
- marginRight: "16px"
7391
- },
7368
+ style: _vm.getActionBarItemStyle(item),
7392
7369
  attrs: {
7393
7370
  "min": item.min,
7394
7371
  "max": item.max,
@@ -7413,10 +7390,7 @@ var _sfc_render = function render3() {
7413
7390
  }, item.events)) : _vm._e(), item.element === "text" ? _c("span", _vm._g(_vm._b({
7414
7391
  key: item.key || index2,
7415
7392
  class: item.class,
7416
- style: {
7417
- ...item.style || {},
7418
- marginRight: "16px"
7419
- }
7393
+ style: _vm.getActionBarItemStyle(item)
7420
7394
  }, "span", item.attr, false), item.events), [_vm._v(" " + _vm._s(item.value) + " ")]) : _vm._e()];
7421
7395
  })] : _vm._e()];
7422
7396
  }), _vm._t("pagination", function() {