@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.common.js
CHANGED
|
@@ -563,6 +563,7 @@ function createViewModule(store, namespace, pageNamespace, viewKey) {
|
|
|
563
563
|
state.data.rows.unshift(row);
|
|
564
564
|
}
|
|
565
565
|
});
|
|
566
|
+
state.data.count = state.data.rows.length;
|
|
566
567
|
},
|
|
567
568
|
removeData: function removeData(state, _ref4) {
|
|
568
569
|
var rows = _ref4.rows,
|
|
@@ -581,6 +582,7 @@ function createViewModule(store, namespace, pageNamespace, viewKey) {
|
|
|
581
582
|
list.splice(index, 1);
|
|
582
583
|
}
|
|
583
584
|
});
|
|
585
|
+
state.data.count = state.data.rows.length;
|
|
584
586
|
},
|
|
585
587
|
setWordbook: function setWordbook(state, _ref5) {
|
|
586
588
|
var rows = _ref5.rows,
|
|
@@ -1629,6 +1631,7 @@ function list_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
1629
1631
|
this.inlineActions && this.inlineActions.length && !this.actionRowEditing && columns.push({
|
|
1630
1632
|
title: '操作',
|
|
1631
1633
|
key: '_action',
|
|
1634
|
+
fixed: 'right',
|
|
1632
1635
|
customRender: function customRender(text, record) {
|
|
1633
1636
|
var children = null;
|
|
1634
1637
|
|
|
@@ -2068,7 +2071,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2068
2071
|
var _this = this;
|
|
2069
2072
|
|
|
2070
2073
|
return file_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
2071
|
-
var key, data, idName;
|
|
2074
|
+
var key, data, idName, hide;
|
|
2072
2075
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
2073
2076
|
while (1) {
|
|
2074
2077
|
switch (_context.prev = _context.next) {
|
|
@@ -2091,13 +2094,17 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2091
2094
|
data.append(idName, _this.actionModel[idName]);
|
|
2092
2095
|
}
|
|
2093
2096
|
|
|
2094
|
-
|
|
2097
|
+
hide = _this.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2098
|
+
_context.next = 10;
|
|
2095
2099
|
return _this.saveData({
|
|
2096
2100
|
key: action.key,
|
|
2097
2101
|
data: data
|
|
2098
2102
|
});
|
|
2099
2103
|
|
|
2100
|
-
case
|
|
2104
|
+
case 10:
|
|
2105
|
+
hide();
|
|
2106
|
+
|
|
2107
|
+
case 11:
|
|
2101
2108
|
case "end":
|
|
2102
2109
|
return _context.stop();
|
|
2103
2110
|
}
|
|
@@ -2141,7 +2148,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2141
2148
|
while (1) {
|
|
2142
2149
|
switch (_context3.prev = _context3.next) {
|
|
2143
2150
|
case 0:
|
|
2144
|
-
hide = _this3.$message.loading(
|
|
2151
|
+
hide = _this3.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2145
2152
|
_context3.next = 3;
|
|
2146
2153
|
return _this3.executeData({
|
|
2147
2154
|
key: action.key,
|
|
@@ -2215,7 +2222,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2215
2222
|
while (1) {
|
|
2216
2223
|
switch (_context5.prev = _context5.next) {
|
|
2217
2224
|
case 0:
|
|
2218
|
-
hide = _this4.$message.loading(
|
|
2225
|
+
hide = _this4.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2219
2226
|
_context5.next = 3;
|
|
2220
2227
|
return _this4.executeData({
|
|
2221
2228
|
key: action.key,
|
|
@@ -2286,7 +2293,7 @@ var openDownload = function openDownload(apiBaseURL) {
|
|
|
2286
2293
|
while (1) {
|
|
2287
2294
|
switch (_context7.prev = _context7.next) {
|
|
2288
2295
|
case 0:
|
|
2289
|
-
hide = _this5.$message.loading(
|
|
2296
|
+
hide = _this5.$message.loading("\u6B63\u5728".concat(action.name, "\uFF0C\u8BF7\u7A0D\u7B49..."), 0);
|
|
2290
2297
|
_context7.next = 3;
|
|
2291
2298
|
return _this5.executeData({
|
|
2292
2299
|
key: action.key,
|
|
@@ -2814,13 +2821,14 @@ function base_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
2814
2821
|
while (1) {
|
|
2815
2822
|
switch (_context8.prev = _context8.next) {
|
|
2816
2823
|
case 0:
|
|
2817
|
-
|
|
2824
|
+
_context8.next = 2;
|
|
2825
|
+
return _this6.executeData({
|
|
2818
2826
|
key: action.key,
|
|
2819
2827
|
data: {},
|
|
2820
2828
|
query: _this6.query ? _this6.query : {}
|
|
2821
2829
|
});
|
|
2822
2830
|
|
|
2823
|
-
case
|
|
2831
|
+
case 2:
|
|
2824
2832
|
case "end":
|
|
2825
2833
|
return _context8.stop();
|
|
2826
2834
|
}
|
|
@@ -3484,6 +3492,10 @@ var ACTION_ACCESS = {
|
|
|
3484
3492
|
if (redirectProfile) {
|
|
3485
3493
|
_this3.handleModelProfile && _this3.handleModelProfile(result);
|
|
3486
3494
|
}
|
|
3495
|
+
|
|
3496
|
+
if (_this3.id && type && type === 'remove') {
|
|
3497
|
+
_this3.handleBack();
|
|
3498
|
+
}
|
|
3487
3499
|
}
|
|
3488
3500
|
|
|
3489
3501
|
case 15:
|
|
@@ -4917,12 +4929,12 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4917
4929
|
}
|
|
4918
4930
|
}
|
|
4919
4931
|
});
|
|
4920
|
-
// 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=
|
|
4921
|
-
var
|
|
4922
|
-
var
|
|
4932
|
+
// 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&
|
|
4933
|
+
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)}
|
|
4934
|
+
var Indexvue_type_template_id_dc7f2fae_staticRenderFns = []
|
|
4923
4935
|
|
|
4924
4936
|
|
|
4925
|
-
// CONCATENATED MODULE: ../src/web/components/cell/QuillEditor/Index.vue?vue&type=template&id=
|
|
4937
|
+
// CONCATENATED MODULE: ../src/web/components/cell/QuillEditor/Index.vue?vue&type=template&id=dc7f2fae&
|
|
4926
4938
|
|
|
4927
4939
|
// EXTERNAL MODULE: ../node_modules/quill/dist/quill.core.css
|
|
4928
4940
|
var quill_core = __webpack_require__("690b");
|
|
@@ -4937,6 +4949,33 @@ var quill_bubble = __webpack_require__("55ab");
|
|
|
4937
4949
|
var vue_quill_editor = __webpack_require__("37eb");
|
|
4938
4950
|
|
|
4939
4951
|
// 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&
|
|
4952
|
+
|
|
4953
|
+
|
|
4954
|
+
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); } }
|
|
4955
|
+
|
|
4956
|
+
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); }); }; }
|
|
4957
|
+
|
|
4958
|
+
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; } } }; }
|
|
4959
|
+
|
|
4960
|
+
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); }
|
|
4961
|
+
|
|
4962
|
+
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; }
|
|
4963
|
+
|
|
4964
|
+
//
|
|
4965
|
+
//
|
|
4966
|
+
//
|
|
4967
|
+
//
|
|
4968
|
+
//
|
|
4969
|
+
//
|
|
4970
|
+
//
|
|
4971
|
+
//
|
|
4972
|
+
//
|
|
4973
|
+
//
|
|
4974
|
+
//
|
|
4975
|
+
//
|
|
4976
|
+
//
|
|
4977
|
+
//
|
|
4978
|
+
//
|
|
4940
4979
|
//
|
|
4941
4980
|
//
|
|
4942
4981
|
//
|
|
@@ -4976,12 +5015,17 @@ var vue_quill_editor = __webpack_require__("37eb");
|
|
|
4976
5015
|
content: this.value,
|
|
4977
5016
|
editorOption: {
|
|
4978
5017
|
placeholder: this.disabled ? '当前为不可编辑状态' : this.placeholder
|
|
4979
|
-
}
|
|
5018
|
+
},
|
|
5019
|
+
baseUrl: window.location.origin,
|
|
5020
|
+
quill: null,
|
|
5021
|
+
pos: 0
|
|
4980
5022
|
};
|
|
4981
5023
|
},
|
|
4982
5024
|
mounted: function mounted() {
|
|
4983
5025
|
// console.log(this.$refs.quillEditor.quill.getModule('toolbar'))
|
|
4984
|
-
|
|
5026
|
+
this.$refs.quillEditor.quill.getModule('toolbar').addHandler('image', this.handleImage);
|
|
5027
|
+
this.quill = this.$refs.quillEditor.quill;
|
|
5028
|
+
|
|
4985
5029
|
if (this.disabled) {
|
|
4986
5030
|
this.$refs.quillEditor.quill.enable(false);
|
|
4987
5031
|
}
|
|
@@ -4996,11 +5040,77 @@ var vue_quill_editor = __webpack_require__("37eb");
|
|
|
4996
5040
|
onEditorReady: function onEditorReady(quill) {
|
|
4997
5041
|
quill.container.querySelector('.ql-blank').innerHTML = this.content;
|
|
4998
5042
|
},
|
|
4999
|
-
|
|
5000
|
-
|
|
5043
|
+
handleImage: function handleImage() {
|
|
5044
|
+
// const uploaderInput = document.querySelector('.form-quill-editor .avatar-uploader input') || null
|
|
5045
|
+
var uploaderInput = document.querySelector('.form-quill-editor input[type="file"]') || null;
|
|
5046
|
+
uploaderInput && uploaderInput.click();
|
|
5047
|
+
},
|
|
5048
|
+
// handleUploadChange (info) {
|
|
5049
|
+
// const status = info.file.status
|
|
5050
|
+
// // 获取光标位置
|
|
5051
|
+
// const pos = this.quill.getSelection().index
|
|
5052
|
+
// if (status === 'done') {
|
|
5053
|
+
// this.quill.insertEmbed(pos, 'image', `${this.baseUrl}${info.file.response[0]}`)
|
|
5054
|
+
// }
|
|
5055
|
+
// },
|
|
5056
|
+
handleUploadChange: function handleUploadChange(e) {
|
|
5057
|
+
var fd = new FormData();
|
|
5058
|
+
var files = e.target.files;
|
|
5059
|
+
|
|
5060
|
+
if (files && files.length) {
|
|
5061
|
+
var _iterator = _createForOfIteratorHelper(files),
|
|
5062
|
+
_step;
|
|
5063
|
+
|
|
5064
|
+
try {
|
|
5065
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
5066
|
+
var file = _step.value;
|
|
5067
|
+
fd.append(file.lastModified + file.size, file);
|
|
5068
|
+
}
|
|
5069
|
+
} catch (err) {
|
|
5070
|
+
_iterator.e(err);
|
|
5071
|
+
} finally {
|
|
5072
|
+
_iterator.f();
|
|
5073
|
+
}
|
|
5074
|
+
}
|
|
5075
|
+
|
|
5076
|
+
this.getfileurl(fd);
|
|
5077
|
+
},
|
|
5078
|
+
getfileurl: function getfileurl(files) {
|
|
5079
|
+
var _this = this;
|
|
5080
|
+
|
|
5081
|
+
return Indexvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
5082
|
+
var _yield$_this$$api$pos, data, status;
|
|
5083
|
+
|
|
5084
|
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
5085
|
+
while (1) {
|
|
5086
|
+
switch (_context.prev = _context.next) {
|
|
5087
|
+
case 0:
|
|
5088
|
+
_context.next = 2;
|
|
5089
|
+
return _this.$api.post("".concat(_this.baseUrl, "/file/getfileurl"), files);
|
|
5090
|
+
|
|
5091
|
+
case 2:
|
|
5092
|
+
_yield$_this$$api$pos = _context.sent;
|
|
5093
|
+
data = _yield$_this$$api$pos.data;
|
|
5094
|
+
status = _yield$_this$$api$pos.status;
|
|
5001
5095
|
|
|
5002
|
-
|
|
5003
|
-
|
|
5096
|
+
if (status === 200) {
|
|
5097
|
+
data.forEach(function (item) {
|
|
5098
|
+
_this.insertEmbedImage("".concat(_this.baseUrl).concat(item));
|
|
5099
|
+
});
|
|
5100
|
+
}
|
|
5101
|
+
|
|
5102
|
+
case 6:
|
|
5103
|
+
case "end":
|
|
5104
|
+
return _context.stop();
|
|
5105
|
+
}
|
|
5106
|
+
}
|
|
5107
|
+
}, _callee);
|
|
5108
|
+
}))();
|
|
5109
|
+
},
|
|
5110
|
+
insertEmbedImage: function insertEmbedImage(url) {
|
|
5111
|
+
this.pos = this.quill.getSelection().index;
|
|
5112
|
+
this.quill.insertEmbed(this.pos, 'image', url);
|
|
5113
|
+
this.quill.setSelection(this.pos + 1);
|
|
5004
5114
|
}
|
|
5005
5115
|
}
|
|
5006
5116
|
});
|
|
@@ -5020,8 +5130,8 @@ var Indexvue_type_style_index_0_lang_less_ = __webpack_require__("3780");
|
|
|
5020
5130
|
|
|
5021
5131
|
var Index_component = normalizeComponent(
|
|
5022
5132
|
QuillEditor_Indexvue_type_script_lang_js_,
|
|
5023
|
-
|
|
5024
|
-
|
|
5133
|
+
Indexvue_type_template_id_dc7f2fae_render,
|
|
5134
|
+
Indexvue_type_template_id_dc7f2fae_staticRenderFns,
|
|
5025
5135
|
false,
|
|
5026
5136
|
null,
|
|
5027
5137
|
null,
|
|
@@ -8834,12 +8944,12 @@ var ModelProfile_component = normalizeComponent(
|
|
|
8834
8944
|
)
|
|
8835
8945
|
|
|
8836
8946
|
/* harmony default export */ var ModelProfile = (ModelProfile_component.exports);
|
|
8837
|
-
// 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=
|
|
8838
|
-
var
|
|
8839
|
-
var
|
|
8947
|
+
// 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&
|
|
8948
|
+
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)}
|
|
8949
|
+
var ModelFormvue_type_template_id_0a4ee2cf_staticRenderFns = []
|
|
8840
8950
|
|
|
8841
8951
|
|
|
8842
|
-
// CONCATENATED MODULE: ../src/web/components/views/ModelForm.vue?vue&type=template&id=
|
|
8952
|
+
// CONCATENATED MODULE: ../src/web/components/views/ModelForm.vue?vue&type=template&id=0a4ee2cf&
|
|
8843
8953
|
|
|
8844
8954
|
// CONCATENATED MODULE: ../src/core/view/form.js
|
|
8845
8955
|
var form_ACTION_ACCESS = {
|
|
@@ -12819,8 +12929,6 @@ function ModelFormvue_type_script_lang_js_defineProperty(obj, key, value) { if (
|
|
|
12819
12929
|
//
|
|
12820
12930
|
//
|
|
12821
12931
|
//
|
|
12822
|
-
//
|
|
12823
|
-
//
|
|
12824
12932
|
|
|
12825
12933
|
|
|
12826
12934
|
|
|
@@ -12841,8 +12949,8 @@ function ModelFormvue_type_script_lang_js_defineProperty(obj, key, value) { if (
|
|
|
12841
12949
|
|
|
12842
12950
|
var ModelForm_component = normalizeComponent(
|
|
12843
12951
|
views_ModelFormvue_type_script_lang_js_,
|
|
12844
|
-
|
|
12845
|
-
|
|
12952
|
+
ModelFormvue_type_template_id_0a4ee2cf_render,
|
|
12953
|
+
ModelFormvue_type_template_id_0a4ee2cf_staticRenderFns,
|
|
12846
12954
|
false,
|
|
12847
12955
|
null,
|
|
12848
12956
|
null,
|