@xatlas/rainbow-core 2.4.3 → 2.4.4

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.
@@ -3151,7 +3151,8 @@ function list_toPrimitive(t, r) { if ("object" != list_typeof(t) || !t) return t
3151
3151
  var _this = this;
3152
3152
  var h = this.$createElement;
3153
3153
  var idName = this.idName,
3154
- hide = this.hide;
3154
+ hide = this.hide,
3155
+ action = this.action;
3155
3156
  var columns = this.model.attrs.filter(function (attr) {
3156
3157
  return !['all', 'list'].includes(attr.hidden) && !hide.includes(attr.name) && attr.name !== idName && attr.metaType !== 'model' && attr.type !== 'link';
3157
3158
  }).map(function (attr) {
@@ -3181,7 +3182,7 @@ function list_toPrimitive(t, r) { if ("object" != list_typeof(t) || !t) return t
3181
3182
  "value": text,
3182
3183
  "row": record,
3183
3184
  "schema": attr,
3184
- "editable": _this.configs['list.actionRowNotEditing.key'] && _this.configs['list.actionRowNotEditing.value'] ? _this.actionRowEditing && !_this.configs['list.actionRowNotEditing.value'].split(',').includes(record[_this.configs['list.actionRowNotEditing.key']]) : _this.actionRowEditing,
3185
+ "editable": _this.editable(record, action, attr),
3185
3186
  "idName": _this.idName,
3186
3187
  "rowIndex": index
3187
3188
  }
@@ -3615,6 +3616,14 @@ function list_toPrimitive(t, r) { if ("object" != list_typeof(t) || !t) return t
3615
3616
  onFileChange: function onFileChange(action, files) {
3616
3617
  var key = action.list ? action.list : 'file';
3617
3618
  this.handleAction(action, null, list_defineProperty({}, key, files));
3619
+ },
3620
+ editable: function editable(record, action, attr) {
3621
+ var editable = this.configs['list.actionRowNotEditing.key'] && this.configs['list.actionRowNotEditing.value'] ? this.actionRowEditing && !this.configs['list.actionRowNotEditing.value'].split(',').includes(record[this.configs['list.actionRowNotEditing.key']]) : this.actionRowEditing;
3622
+ if (action !== null && action !== void 0 && action.list) {
3623
+ var list = action.list.split(',');
3624
+ return editable && list.includes(attr.name);
3625
+ }
3626
+ return editable;
3618
3627
  }
3619
3628
  }
3620
3629
  });
@@ -5138,8 +5147,9 @@ var SHOW_RULES = {
5138
5147
  }];
5139
5148
  },
5140
5149
  settingActions: function settingActions() {
5150
+ var _this$action;
5141
5151
  var actions = [{
5142
- key: '',
5152
+ key: ((_this$action = this.action) === null || _this$action === void 0 ? void 0 : _this$action.key) || '',
5143
5153
  name: '保存',
5144
5154
  icon: 'save',
5145
5155
  method: 'PUT',
@@ -5399,18 +5409,18 @@ var SHOW_RULES = {
5399
5409
  actionModel = this.actionModel,
5400
5410
  idName = this.idName,
5401
5411
  editions = this.editions,
5402
- _this$action = this.action,
5403
- key = _this$action.key,
5404
- method = _this$action.method,
5405
- _this$action$params = _this$action.params,
5406
- _this$action$params2 = _this$action$params === void 0 ? {} : _this$action$params,
5407
- _this$action$params2$ = _this$action$params2.commit,
5408
- _this$action$params2$2 = _this$action$params2$ === void 0 ? {} : _this$action$params2$,
5409
- type = _this$action$params2$2.type,
5410
- redirectProfile = _this$action$params2$2.redirectProfile,
5411
- autofill = _this$action$params2.autofill,
5412
- _this$action$params2$3 = _this$action$params2.confirmActionDialog,
5413
- confirmActionDialog = _this$action$params2$3 === void 0 ? null : _this$action$params2$3,
5412
+ _this$action2 = this.action,
5413
+ key = _this$action2.key,
5414
+ method = _this$action2.method,
5415
+ _this$action2$params = _this$action2.params,
5416
+ _this$action2$params2 = _this$action2$params === void 0 ? {} : _this$action2$params,
5417
+ _this$action2$params3 = _this$action2$params2.commit,
5418
+ _this$action2$params4 = _this$action2$params3 === void 0 ? {} : _this$action2$params3,
5419
+ type = _this$action2$params4.type,
5420
+ redirectProfile = _this$action2$params4.redirectProfile,
5421
+ autofill = _this$action2$params2.autofill,
5422
+ _this$action2$params5 = _this$action2$params2.confirmActionDialog,
5423
+ confirmActionDialog = _this$action2$params5 === void 0 ? null : _this$action2$params5,
5414
5424
  schema = this.schema;
5415
5425
  var submit = /*#__PURE__*/function () {
5416
5426
  var _ref2 = action_asyncToGenerator( /*#__PURE__*/action_regeneratorRuntime().mark(function _callee3() {