@xatlas/rainbow-core 1.4.2 → 1.4.6
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.
- package/dist/core.common.js +136 -28
- package/dist/core.common.js.map +1 -1
- package/dist/core.umd.js +136 -28
- package/dist/core.umd.js.map +1 -1
- package/dist/core.umd.min.js +1 -1
- package/dist/core.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/core.umd.js
CHANGED
|
@@ -572,6 +572,7 @@ function createViewModule(store, namespace, pageNamespace, viewKey) {
|
|
|
572
572
|
state.data.rows.unshift(row);
|
|
573
573
|
}
|
|
574
574
|
});
|
|
575
|
+
state.data.count = state.data.rows.length;
|
|
575
576
|
},
|
|
576
577
|
removeData: function removeData(state, _ref4) {
|
|
577
578
|
var rows = _ref4.rows,
|
|
@@ -590,6 +591,7 @@ function createViewModule(store, namespace, pageNamespace, viewKey) {
|
|
|
590
591
|
list.splice(index, 1);
|
|
591
592
|
}
|
|
592
593
|
});
|
|
594
|
+
state.data.count = state.data.rows.length;
|
|
593
595
|
},
|
|
594
596
|
setWordbook: function setWordbook(state, _ref5) {
|
|
595
597
|
var rows = _ref5.rows,
|
|
@@ -1638,6 +1640,7 @@ function list_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
1638
1640
|
this.inlineActions && this.inlineActions.length && !this.actionRowEditing && columns.push({
|
|
1639
1641
|
title: '操作',
|
|
1640
1642
|
key: '_action',
|
|
1643
|
+
fixed: 'right',
|
|
1641
1644
|
customRender: function customRender(text, record) {
|
|
1642
1645
|
var children = null;
|
|
1643
1646
|
|
|
@@ -2077,7 +2080,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2077
2080
|
var _this = this;
|
|
2078
2081
|
|
|
2079
2082
|
return file_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
2080
|
-
var key, data, idName;
|
|
2083
|
+
var key, data, idName, hide;
|
|
2081
2084
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
2082
2085
|
while (1) {
|
|
2083
2086
|
switch (_context.prev = _context.next) {
|
|
@@ -2100,13 +2103,17 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2100
2103
|
data.append(idName, _this.actionModel[idName]);
|
|
2101
2104
|
}
|
|
2102
2105
|
|
|
2103
|
-
|
|
2106
|
+
hide = _this.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2107
|
+
_context.next = 10;
|
|
2104
2108
|
return _this.saveData({
|
|
2105
2109
|
key: action.key,
|
|
2106
2110
|
data: data
|
|
2107
2111
|
});
|
|
2108
2112
|
|
|
2109
|
-
case
|
|
2113
|
+
case 10:
|
|
2114
|
+
hide();
|
|
2115
|
+
|
|
2116
|
+
case 11:
|
|
2110
2117
|
case "end":
|
|
2111
2118
|
return _context.stop();
|
|
2112
2119
|
}
|
|
@@ -2150,7 +2157,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2150
2157
|
while (1) {
|
|
2151
2158
|
switch (_context3.prev = _context3.next) {
|
|
2152
2159
|
case 0:
|
|
2153
|
-
hide = _this3.$message.loading(
|
|
2160
|
+
hide = _this3.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2154
2161
|
_context3.next = 3;
|
|
2155
2162
|
return _this3.executeData({
|
|
2156
2163
|
key: action.key,
|
|
@@ -2224,7 +2231,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2224
2231
|
while (1) {
|
|
2225
2232
|
switch (_context5.prev = _context5.next) {
|
|
2226
2233
|
case 0:
|
|
2227
|
-
hide = _this4.$message.loading(
|
|
2234
|
+
hide = _this4.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2228
2235
|
_context5.next = 3;
|
|
2229
2236
|
return _this4.executeData({
|
|
2230
2237
|
key: action.key,
|
|
@@ -2295,7 +2302,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2295
2302
|
while (1) {
|
|
2296
2303
|
switch (_context7.prev = _context7.next) {
|
|
2297
2304
|
case 0:
|
|
2298
|
-
hide = _this5.$message.loading(
|
|
2305
|
+
hide = _this5.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2299
2306
|
_context7.next = 3;
|
|
2300
2307
|
return _this5.executeData({
|
|
2301
2308
|
key: action.key,
|
|
@@ -2823,13 +2830,14 @@ function base_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
2823
2830
|
while (1) {
|
|
2824
2831
|
switch (_context8.prev = _context8.next) {
|
|
2825
2832
|
case 0:
|
|
2826
|
-
|
|
2833
|
+
_context8.next = 2;
|
|
2834
|
+
return _this6.executeData({
|
|
2827
2835
|
key: action.key,
|
|
2828
2836
|
data: {},
|
|
2829
2837
|
query: _this6.query ? _this6.query : {}
|
|
2830
2838
|
});
|
|
2831
2839
|
|
|
2832
|
-
case
|
|
2840
|
+
case 2:
|
|
2833
2841
|
case "end":
|
|
2834
2842
|
return _context8.stop();
|
|
2835
2843
|
}
|
|
@@ -3493,6 +3501,10 @@ var ACTION_ACCESS = {
|
|
|
3493
3501
|
if (redirectProfile) {
|
|
3494
3502
|
_this3.handleModelProfile && _this3.handleModelProfile(result);
|
|
3495
3503
|
}
|
|
3504
|
+
|
|
3505
|
+
if (_this3.id && type && type === 'remove') {
|
|
3506
|
+
_this3.handleBack();
|
|
3507
|
+
}
|
|
3496
3508
|
}
|
|
3497
3509
|
|
|
3498
3510
|
case 15:
|
|
@@ -4926,12 +4938,12 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4926
4938
|
}
|
|
4927
4939
|
}
|
|
4928
4940
|
});
|
|
4929
|
-
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f9fe196-vue-loader-template"}!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/cell/QuillEditor/Index.vue?vue&type=template&id=
|
|
4930
|
-
var
|
|
4931
|
-
var
|
|
4941
|
+
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f9fe196-vue-loader-template"}!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/cell/QuillEditor/Index.vue?vue&type=template&id=dc7f2fae&
|
|
4942
|
+
var Indexvue_type_template_id_dc7f2fae_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"form-quill-editor"},[_c('quill-editor',{ref:"quillEditor",attrs:{"options":_vm.editorOption},on:{"change":function($event){return _vm.onEditorChange($event)},"ready":function($event){return _vm.onEditorReady($event)}}}),_c('a-input',{staticStyle:{"display":"none"},attrs:{"type":"file","multiple":""},on:{"change":_vm.handleUploadChange}})],1)}
|
|
4943
|
+
var Indexvue_type_template_id_dc7f2fae_staticRenderFns = []
|
|
4932
4944
|
|
|
4933
4945
|
|
|
4934
|
-
// CONCATENATED MODULE: ../src/web/components/cell/QuillEditor/Index.vue?vue&type=template&id=
|
|
4946
|
+
// CONCATENATED MODULE: ../src/web/components/cell/QuillEditor/Index.vue?vue&type=template&id=dc7f2fae&
|
|
4935
4947
|
|
|
4936
4948
|
// EXTERNAL MODULE: ../node_modules/quill/dist/quill.core.css
|
|
4937
4949
|
var quill_core = __webpack_require__("690b");
|
|
@@ -4946,6 +4958,33 @@ var quill_bubble = __webpack_require__("55ab");
|
|
|
4946
4958
|
var vue_quill_editor = __webpack_require__("37eb");
|
|
4947
4959
|
|
|
4948
4960
|
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js??ref--13-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/cell/QuillEditor/Index.vue?vue&type=script&lang=js&
|
|
4961
|
+
|
|
4962
|
+
|
|
4963
|
+
function Indexvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4964
|
+
|
|
4965
|
+
function Indexvue_type_script_lang_js_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { Indexvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { Indexvue_type_script_lang_js_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4966
|
+
|
|
4967
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = Indexvue_type_script_lang_js_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4968
|
+
|
|
4969
|
+
function Indexvue_type_script_lang_js_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Indexvue_type_script_lang_js_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Indexvue_type_script_lang_js_arrayLikeToArray(o, minLen); }
|
|
4970
|
+
|
|
4971
|
+
function Indexvue_type_script_lang_js_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
4972
|
+
|
|
4973
|
+
//
|
|
4974
|
+
//
|
|
4975
|
+
//
|
|
4976
|
+
//
|
|
4977
|
+
//
|
|
4978
|
+
//
|
|
4979
|
+
//
|
|
4980
|
+
//
|
|
4981
|
+
//
|
|
4982
|
+
//
|
|
4983
|
+
//
|
|
4984
|
+
//
|
|
4985
|
+
//
|
|
4986
|
+
//
|
|
4987
|
+
//
|
|
4949
4988
|
//
|
|
4950
4989
|
//
|
|
4951
4990
|
//
|
|
@@ -4985,12 +5024,17 @@ var vue_quill_editor = __webpack_require__("37eb");
|
|
|
4985
5024
|
content: this.value,
|
|
4986
5025
|
editorOption: {
|
|
4987
5026
|
placeholder: this.disabled ? '当前为不可编辑状态' : this.placeholder
|
|
4988
|
-
}
|
|
5027
|
+
},
|
|
5028
|
+
baseUrl: window.location.origin,
|
|
5029
|
+
quill: null,
|
|
5030
|
+
pos: 0
|
|
4989
5031
|
};
|
|
4990
5032
|
},
|
|
4991
5033
|
mounted: function mounted() {
|
|
4992
5034
|
// console.log(this.$refs.quillEditor.quill.getModule('toolbar'))
|
|
4993
|
-
|
|
5035
|
+
this.$refs.quillEditor.quill.getModule('toolbar').addHandler('image', this.handleImage);
|
|
5036
|
+
this.quill = this.$refs.quillEditor.quill;
|
|
5037
|
+
|
|
4994
5038
|
if (this.disabled) {
|
|
4995
5039
|
this.$refs.quillEditor.quill.enable(false);
|
|
4996
5040
|
}
|
|
@@ -5005,11 +5049,77 @@ var vue_quill_editor = __webpack_require__("37eb");
|
|
|
5005
5049
|
onEditorReady: function onEditorReady(quill) {
|
|
5006
5050
|
quill.container.querySelector('.ql-blank').innerHTML = this.content;
|
|
5007
5051
|
},
|
|
5008
|
-
|
|
5009
|
-
|
|
5052
|
+
handleImage: function handleImage() {
|
|
5053
|
+
// const uploaderInput = document.querySelector('.form-quill-editor .avatar-uploader input') || null
|
|
5054
|
+
var uploaderInput = document.querySelector('.form-quill-editor input[type="file"]') || null;
|
|
5055
|
+
uploaderInput && uploaderInput.click();
|
|
5056
|
+
},
|
|
5057
|
+
// handleUploadChange (info) {
|
|
5058
|
+
// const status = info.file.status
|
|
5059
|
+
// // 获取光标位置
|
|
5060
|
+
// const pos = this.quill.getSelection().index
|
|
5061
|
+
// if (status === 'done') {
|
|
5062
|
+
// this.quill.insertEmbed(pos, 'image', `${this.baseUrl}${info.file.response[0]}`)
|
|
5063
|
+
// }
|
|
5064
|
+
// },
|
|
5065
|
+
handleUploadChange: function handleUploadChange(e) {
|
|
5066
|
+
var fd = new FormData();
|
|
5067
|
+
var files = e.target.files;
|
|
5068
|
+
|
|
5069
|
+
if (files && files.length) {
|
|
5070
|
+
var _iterator = _createForOfIteratorHelper(files),
|
|
5071
|
+
_step;
|
|
5072
|
+
|
|
5073
|
+
try {
|
|
5074
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
5075
|
+
var file = _step.value;
|
|
5076
|
+
fd.append(file.lastModified + file.size, file);
|
|
5077
|
+
}
|
|
5078
|
+
} catch (err) {
|
|
5079
|
+
_iterator.e(err);
|
|
5080
|
+
} finally {
|
|
5081
|
+
_iterator.f();
|
|
5082
|
+
}
|
|
5083
|
+
}
|
|
5084
|
+
|
|
5085
|
+
this.getfileurl(fd);
|
|
5086
|
+
},
|
|
5087
|
+
getfileurl: function getfileurl(files) {
|
|
5088
|
+
var _this = this;
|
|
5089
|
+
|
|
5090
|
+
return Indexvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
5091
|
+
var _yield$_this$$api$pos, data, status;
|
|
5092
|
+
|
|
5093
|
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
5094
|
+
while (1) {
|
|
5095
|
+
switch (_context.prev = _context.next) {
|
|
5096
|
+
case 0:
|
|
5097
|
+
_context.next = 2;
|
|
5098
|
+
return _this.$api.post("".concat(_this.baseUrl, "/file/getfileurl"), files);
|
|
5099
|
+
|
|
5100
|
+
case 2:
|
|
5101
|
+
_yield$_this$$api$pos = _context.sent;
|
|
5102
|
+
data = _yield$_this$$api$pos.data;
|
|
5103
|
+
status = _yield$_this$$api$pos.status;
|
|
5010
5104
|
|
|
5011
|
-
|
|
5012
|
-
|
|
5105
|
+
if (status === 200) {
|
|
5106
|
+
data.forEach(function (item) {
|
|
5107
|
+
_this.insertEmbedImage("".concat(_this.baseUrl).concat(item));
|
|
5108
|
+
});
|
|
5109
|
+
}
|
|
5110
|
+
|
|
5111
|
+
case 6:
|
|
5112
|
+
case "end":
|
|
5113
|
+
return _context.stop();
|
|
5114
|
+
}
|
|
5115
|
+
}
|
|
5116
|
+
}, _callee);
|
|
5117
|
+
}))();
|
|
5118
|
+
},
|
|
5119
|
+
insertEmbedImage: function insertEmbedImage(url) {
|
|
5120
|
+
this.pos = this.quill.getSelection().index;
|
|
5121
|
+
this.quill.insertEmbed(this.pos, 'image', url);
|
|
5122
|
+
this.quill.setSelection(this.pos + 1);
|
|
5013
5123
|
}
|
|
5014
5124
|
}
|
|
5015
5125
|
});
|
|
@@ -5029,8 +5139,8 @@ var Indexvue_type_style_index_0_lang_less_ = __webpack_require__("3780");
|
|
|
5029
5139
|
|
|
5030
5140
|
var Index_component = normalizeComponent(
|
|
5031
5141
|
QuillEditor_Indexvue_type_script_lang_js_,
|
|
5032
|
-
|
|
5033
|
-
|
|
5142
|
+
Indexvue_type_template_id_dc7f2fae_render,
|
|
5143
|
+
Indexvue_type_template_id_dc7f2fae_staticRenderFns,
|
|
5034
5144
|
false,
|
|
5035
5145
|
null,
|
|
5036
5146
|
null,
|
|
@@ -8843,12 +8953,12 @@ var ModelProfile_component = normalizeComponent(
|
|
|
8843
8953
|
)
|
|
8844
8954
|
|
|
8845
8955
|
/* harmony default export */ var ModelProfile = (ModelProfile_component.exports);
|
|
8846
|
-
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f9fe196-vue-loader-template"}!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/views/ModelForm.vue?vue&type=template&id=
|
|
8847
|
-
var
|
|
8848
|
-
var
|
|
8956
|
+
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f9fe196-vue-loader-template"}!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/views/ModelForm.vue?vue&type=template&id=0a4ee2cf&
|
|
8957
|
+
var ModelFormvue_type_template_id_0a4ee2cf_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('layout-view-blank',{tag:"component"},[(!_vm.commitResult.template || !_vm.commitResult.data)?_c(_vm.configs['form.widget'] || _vm.widget,_vm._g(_vm._b({tag:"component",attrs:{"action":_vm.action,"columns":_vm.columns,"params":_vm.params}},'component',_vm.$attrs,false),_vm.$listeners)):_c('a-result',{attrs:{"status":"success","title":_vm.message}},[_c(_vm.commitResult,{tag:"component"})],1)],1)}
|
|
8958
|
+
var ModelFormvue_type_template_id_0a4ee2cf_staticRenderFns = []
|
|
8849
8959
|
|
|
8850
8960
|
|
|
8851
|
-
// CONCATENATED MODULE: ../src/web/components/views/ModelForm.vue?vue&type=template&id=
|
|
8961
|
+
// CONCATENATED MODULE: ../src/web/components/views/ModelForm.vue?vue&type=template&id=0a4ee2cf&
|
|
8852
8962
|
|
|
8853
8963
|
// CONCATENATED MODULE: ../src/core/view/form.js
|
|
8854
8964
|
var form_ACTION_ACCESS = {
|
|
@@ -12828,8 +12938,6 @@ function ModelFormvue_type_script_lang_js_defineProperty(obj, key, value) { if (
|
|
|
12828
12938
|
//
|
|
12829
12939
|
//
|
|
12830
12940
|
//
|
|
12831
|
-
//
|
|
12832
|
-
//
|
|
12833
12941
|
|
|
12834
12942
|
|
|
12835
12943
|
|
|
@@ -12850,8 +12958,8 @@ function ModelFormvue_type_script_lang_js_defineProperty(obj, key, value) { if (
|
|
|
12850
12958
|
|
|
12851
12959
|
var ModelForm_component = normalizeComponent(
|
|
12852
12960
|
views_ModelFormvue_type_script_lang_js_,
|
|
12853
|
-
|
|
12854
|
-
|
|
12961
|
+
ModelFormvue_type_template_id_0a4ee2cf_render,
|
|
12962
|
+
ModelFormvue_type_template_id_0a4ee2cf_staticRenderFns,
|
|
12855
12963
|
false,
|
|
12856
12964
|
null,
|
|
12857
12965
|
null,
|