123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- exports.ids = [42];
- exports.modules = {
- /***/ 284:
- /***/ (function(module, exports) {
- // Exports
- module.exports = {
- };
- /***/ }),
- /***/ 340:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EditorImage_vue_vue_type_style_index_0_id_481a2804_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(284);
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EditorImage_vue_vue_type_style_index_0_id_481a2804_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EditorImage_vue_vue_type_style_index_0_id_481a2804_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EditorImage_vue_vue_type_style_index_0_id_481a2804_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_EditorImage_vue_vue_type_style_index_0_id_481a2804_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /***/ }),
- /***/ 375:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Tinymce/components/EditorImage.vue?vue&type=template&id=481a2804&scoped=true
- var render = function render() {
- var _vm = this,
- _c = _vm._self._c;
- return _c('div', {
- staticClass: "upload-container"
- }, [_c('el-button', {
- style: {
- background: _vm.color,
- borderColor: _vm.color
- },
- attrs: {
- "icon": "el-icon-upload",
- "size": "mini",
- "type": "primary"
- },
- on: {
- "click": function ($event) {
- _vm.dialogVisible = true;
- }
- }
- }, [_vm._v("\n upload\n ")]), _vm._ssrNode(" "), _c('el-dialog', {
- attrs: {
- "lock-scroll": false,
- "visible": _vm.dialogVisible
- },
- on: {
- "update:visible": function ($event) {
- _vm.dialogVisible = $event;
- }
- }
- }, [_c('el-upload', {
- staticClass: "editor-slide-upload",
- attrs: {
- "multiple": true,
- "file-list": _vm.fileList,
- "show-file-list": true,
- "on-remove": _vm.handleRemove,
- "on-success": _vm.handleSuccess,
- "before-upload": _vm.beforeUpload,
- "action": "https://httpbin.org/post",
- "list-type": "picture-card"
- }
- }, [_c('el-button', {
- attrs: {
- "size": "small",
- "type": "primary"
- }
- }, [_vm._v("\n Click upload\n ")])], 1), _vm._v(" "), _c('el-button', {
- on: {
- "click": function ($event) {
- _vm.dialogVisible = false;
- }
- }
- }, [_vm._v("\n Cancel\n ")]), _vm._v(" "), _c('el-button', {
- attrs: {
- "type": "primary"
- },
- on: {
- "click": _vm.handleSubmit
- }
- }, [_vm._v("\n Confirm\n ")])], 1)], 2);
- };
- var staticRenderFns = [];
- // CONCATENATED MODULE: ./components/Tinymce/components/EditorImage.vue?vue&type=template&id=481a2804&scoped=true
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Tinymce/components/EditorImage.vue?vue&type=script&lang=js
- /* harmony default export */ var EditorImagevue_type_script_lang_js = ({
- name: 'EditorSlideUpload',
- props: {
- color: {
- type: String,
- default: '#1890ff'
- }
- },
- data() {
- return {
- dialogVisible: false,
- listObj: {},
- fileList: []
- };
- },
- methods: {
- checkAllSuccess() {
- return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess);
- },
- handleSubmit() {
- const arr = Object.keys(this.listObj).map(v => this.listObj[v]);
- if (!this.checkAllSuccess()) {
- this.$message('Please wait for all images to be uploaded successfully. If there is a network problem, please refresh the page and upload again!');
- return;
- }
- this.$emit('successCBK', arr);
- this.listObj = {};
- this.fileList = [];
- this.dialogVisible = false;
- },
- handleSuccess(response, file) {
- const uid = file.uid;
- const objKeyArr = Object.keys(this.listObj);
- for (let i = 0, len = objKeyArr.length; i < len; i++) {
- if (this.listObj[objKeyArr[i]].uid === uid) {
- this.listObj[objKeyArr[i]].url = response.files.file;
- this.listObj[objKeyArr[i]].hasSuccess = true;
- return;
- }
- }
- },
- handleRemove(file) {
- const uid = file.uid;
- const objKeyArr = Object.keys(this.listObj);
- for (let i = 0, len = objKeyArr.length; i < len; i++) {
- if (this.listObj[objKeyArr[i]].uid === uid) {
- delete this.listObj[objKeyArr[i]];
- return;
- }
- }
- },
- beforeUpload(file) {
- const _self = this;
- const _URL = window.URL || window.webkitURL;
- const fileName = file.uid;
- this.listObj[fileName] = {};
- return new Promise((resolve, reject) => {
- const img = new Image();
- img.src = _URL.createObjectURL(file);
- img.onload = function () {
- _self.listObj[fileName] = {
- hasSuccess: false,
- uid: file.uid,
- width: this.width,
- height: this.height
- };
- };
- resolve(true);
- });
- }
- }
- });
- // CONCATENATED MODULE: ./components/Tinymce/components/EditorImage.vue?vue&type=script&lang=js
- /* harmony default export */ var components_EditorImagevue_type_script_lang_js = (EditorImagevue_type_script_lang_js);
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
- var componentNormalizer = __webpack_require__(2);
- // CONCATENATED MODULE: ./components/Tinymce/components/EditorImage.vue
- function injectStyles (context) {
-
- var style0 = __webpack_require__(340)
- if (style0.__inject__) style0.__inject__(context)
- }
- /* normalize component */
- var component = Object(componentNormalizer["a" /* default */])(
- components_EditorImagevue_type_script_lang_js,
- render,
- staticRenderFns,
- false,
- injectStyles,
- "481a2804",
- "c9f04bfa"
-
- )
- /* harmony default export */ var EditorImage = __webpack_exports__["default"] = (component.exports);
- /***/ })
- };;
- //# sourceMappingURL=tinymce-components-editor-image.js.map
|