rmt-fileupload 0.3.1 → 0.3.2
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/README.md +5 -0
- package/lib/rmt-fileupload.common.js +153 -190
- package/lib/rmt-fileupload.umd.js +159 -196
- package/lib/rmt-fileupload.umd.min.js +2 -2
- package/package.json +1 -1
|
@@ -3571,7 +3571,7 @@ $({ target: 'Array', proto: true, arity: 1, forced: INCORRECT_TO_LENGTH || SILEN
|
|
|
3571
3571
|
|
|
3572
3572
|
/***/ }),
|
|
3573
3573
|
|
|
3574
|
-
/***/
|
|
3574
|
+
/***/ 9423:
|
|
3575
3575
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3576
3576
|
|
|
3577
3577
|
"use strict";
|
|
@@ -3601,7 +3601,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "@font-face{font-family:element-icons;s
|
|
|
3601
3601
|
|
|
3602
3602
|
/***/ }),
|
|
3603
3603
|
|
|
3604
|
-
/***/
|
|
3604
|
+
/***/ 2829:
|
|
3605
3605
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3606
3606
|
|
|
3607
3607
|
"use strict";
|
|
@@ -3620,7 +3620,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
|
|
|
3620
3620
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
3621
3621
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
3622
3622
|
// Module
|
|
3623
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".el-breadcrumb__inner[data-v-
|
|
3623
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".el-breadcrumb__inner[data-v-8420ab38],.el-breadcrumb__inner a[data-v-8420ab38]{font-weight:400!important}.el-upload input[type=file][data-v-8420ab38]{display:none!important}.el-upload__input[data-v-8420ab38]{display:none}.cell .el-tag[data-v-8420ab38]{margin-right:0}.small-padding .cell[data-v-8420ab38]{padding-left:5px;padding-right:5px}.fixed-width .el-button--mini[data-v-8420ab38]{padding:7px 10px;width:60px}.status-col .cell[data-v-8420ab38]{padding:0 10px;text-align:center}.status-col .cell .el-tag[data-v-8420ab38]{margin-right:0}.el-dialog[data-v-8420ab38]{transform:none;left:0;position:relative;margin:0 auto}.upload-container .el-upload[data-v-8420ab38]{width:100%}.upload-container .el-upload .el-upload-dragger[data-v-8420ab38]{width:100%;height:200px}.el-dropdown-menu a[data-v-8420ab38]{display:block}.el-range-editor.el-input__inner[data-v-8420ab38]{display:inline-flex!important}.el-range-separator[data-v-8420ab38]{box-sizing:content-box}.el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow[data-v-8420ab38]{display:none}.el-image .image-slot[data-v-8420ab38]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background:#f5f7fa;color:#909399}.is-disabled[data-v-8420ab38],.is-disabled .el-upload[data-v-8420ab38]{cursor:not-allowed}.el-tabs__header[data-v-8420ab38]{overflow:hidden;margin:0}.el-tabs__new-tab[data-v-8420ab38]{background-size:100% 100%;width:24px;height:24px;border:none;margin-right:16px}.el-tabs__new-tab *[data-v-8420ab38]{display:none}.el-form>.el-tabs>.el-tabs__header[data-v-8420ab38]{box-shadow:0 5px 20px rgba(10,25,38,.1);background-color:#fff;border-radius:0 0 8px 8px;padding-left:16px}.el-form>.el-tabs>.el-tabs__content[data-v-8420ab38]{margin-top:16px;box-shadow:0 5px 20px rgba(10,25,38,.1);border-radius:8px}.el-form>.el-tabs>.el-tabs__content .el-tab-pane .el-tabs__header[data-v-8420ab38]{padding-left:16px;background-color:#f2f4f6}.el-form>.el-tabs>.el-tabs__content .el-tab-pane .el-tabs__header .el-tabs__item[data-v-8420ab38]{font-size:16px;font-weight:400;line-height:45px;height:45px;padding:0 16px;border:none}.el-form>.el-tabs>.el-tabs__content .el-tab-pane .el-tabs__header .el-tabs__item.is-active[data-v-8420ab38]{background-color:#fff;border-radius:8px 8px 0 0}.el-form>.el-tabs>.el-tabs__content .el-tab-pane .el-tabs__header .el-tabs__item:focus.is-active.is-focus[data-v-8420ab38]:not(:active){box-shadow:none}.el-form>.el-tabs>.el-tabs__content .el-tab-pane .el-tabs__content[data-v-8420ab38]{background-color:#fff}.el-form>.el-tabs>.el-tabs__content .el-form[data-v-8420ab38]{margin-top:16px}.el-form>.el-tabs .el-tabs__item[data-v-8420ab38]{font-size:16px;font-weight:700}.el-form .el-tabs__nav-wrap[data-v-8420ab38]{margin-bottom:0}.el-form .el-tabs__nav-wrap[data-v-8420ab38]:after{display:none}.el-tabs--card>.el-tabs__header[data-v-8420ab38],.el-tabs--card>.el-tabs__header .el-tabs__nav[data-v-8420ab38]{border:none}.el-tabs--card>.el-tabs__header .el-tabs__item .el-icon-close[data-v-8420ab38]{width:14px;opacity:0}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover .el-icon-close[data-v-8420ab38]{opacity:1}.el-image[data-v-8420ab38]{background-size:100% 100%}.el-image .el-image__error[data-v-8420ab38]{display:none}.btn-big .el-upload button.el-button--primary[data-v-8420ab38]{font-size:14px;line-height:19px;padding:10px 16px 11px;background-color:#0090ff;border:none}.el-button--medium.is-circle[data-v-8420ab38]{padding:13px 12px 12px;box-shadow:0 5px 20px rgba(10,25,38,.1);border:none;width:40px;height:40px}.el-icon-edit[data-v-8420ab38],.el-icon-refresh-left[data-v-8420ab38]{width:16px;height:15px;background-size:100% 100%}.el-icon-edit[data-v-8420ab38]:before,.el-icon-refresh-left[data-v-8420ab38]:before{display:none}[data-v-8420ab38]:export{theme:#1890ff}.network-img[data-v-8420ab38]{font-size:14px;line-height:19px;padding:10px 16px 11px;background-color:#00c5c5;border:none}.row-img-box[data-v-8420ab38]{display:flex;flex-direction:column;align-items:center}.row-img-box .img-btn-box[data-v-8420ab38]{display:flex;padding:16px 0}.upload-file-uploader[data-v-8420ab38]{margin-bottom:5px}.upload-file-list .el-upload-list__item[data-v-8420ab38]{border:1px solid #e4e7ed;line-height:2;margin-bottom:10px;position:relative}.upload-file-list .ele-upload-list__item-content[data-v-8420ab38]{display:flex;justify-content:space-between;align-items:center;color:inherit}.ele-upload-list__item-content-action .el-link[data-v-8420ab38]{margin-right:10px}.rmt-thumb-new[data-v-8420ab38]{width:160px;height:160px;order-radius:3px;background:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") no-repeat}.has-upload[data-v-8420ab38]{background:none}.single-image-upload[data-v-8420ab38]{border-radius:3px;overflow:hidden;display:inline-block}.single-image-upload .default-lable[data-v-8420ab38]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background:#f5f7fa;color:#909399}.single-image-upload .el-image[data-v-8420ab38]{vertical-align:top}", ""]);
|
|
3624
3624
|
// Exports
|
|
3625
3625
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
3626
3626
|
|
|
@@ -3776,35 +3776,35 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
3776
3776
|
|
|
3777
3777
|
/***/ }),
|
|
3778
3778
|
|
|
3779
|
-
/***/
|
|
3779
|
+
/***/ 9827:
|
|
3780
3780
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3781
3781
|
|
|
3782
3782
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
3783
3783
|
|
|
3784
3784
|
// load the styles
|
|
3785
|
-
var content = __webpack_require__(
|
|
3785
|
+
var content = __webpack_require__(9423);
|
|
3786
3786
|
if(content.__esModule) content = content.default;
|
|
3787
3787
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
3788
3788
|
if(content.locals) module.exports = content.locals;
|
|
3789
3789
|
// add the styles to the DOM
|
|
3790
3790
|
var add = (__webpack_require__(4402)/* ["default"] */ .Z)
|
|
3791
|
-
var update = add("
|
|
3791
|
+
var update = add("074626a8", content, true, {"sourceMap":false,"shadowMode":false});
|
|
3792
3792
|
|
|
3793
3793
|
/***/ }),
|
|
3794
3794
|
|
|
3795
|
-
/***/
|
|
3795
|
+
/***/ 6337:
|
|
3796
3796
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3797
3797
|
|
|
3798
3798
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
3799
3799
|
|
|
3800
3800
|
// load the styles
|
|
3801
|
-
var content = __webpack_require__(
|
|
3801
|
+
var content = __webpack_require__(2829);
|
|
3802
3802
|
if(content.__esModule) content = content.default;
|
|
3803
3803
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
3804
3804
|
if(content.locals) module.exports = content.locals;
|
|
3805
3805
|
// add the styles to the DOM
|
|
3806
3806
|
var add = (__webpack_require__(4402)/* ["default"] */ .Z)
|
|
3807
|
-
var update = add("
|
|
3807
|
+
var update = add("9bb1cd80", content, true, {"sourceMap":false,"shadowMode":false});
|
|
3808
3808
|
|
|
3809
3809
|
/***/ }),
|
|
3810
3810
|
|
|
@@ -4268,185 +4268,10 @@ if (typeof window !== 'undefined') {
|
|
|
4268
4268
|
// EXTERNAL MODULE: external "vue"
|
|
4269
4269
|
var external_vue_ = __webpack_require__(748);
|
|
4270
4270
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
4271
|
-
;// CONCATENATED MODULE: ./node_modules
|
|
4272
|
-
var render = function
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
return _c('div', {
|
|
4276
|
-
staticClass: "upload-file"
|
|
4277
|
-
}, [_vm.type == 'default' ? _c('div', [_c('el-upload', {
|
|
4278
|
-
ref: "upload",
|
|
4279
|
-
staticClass: "upload-file-uploader",
|
|
4280
|
-
attrs: {
|
|
4281
|
-
"multiple": "",
|
|
4282
|
-
"action": _vm.domain + _vm.uploadFileUrl,
|
|
4283
|
-
"before-upload": _vm.handleBeforeUpload,
|
|
4284
|
-
"file-list": _vm.fileList,
|
|
4285
|
-
"limit": _vm.limit,
|
|
4286
|
-
"on-error": _vm.handleUploadError,
|
|
4287
|
-
"on-exceed": _vm.handleExceed,
|
|
4288
|
-
"on-success": _vm.handleUploadSuccess,
|
|
4289
|
-
"show-file-list": false,
|
|
4290
|
-
"headers": _vm.headers,
|
|
4291
|
-
"data": _vm.data
|
|
4292
|
-
}
|
|
4293
|
-
}, [_c('el-button', {
|
|
4294
|
-
attrs: {
|
|
4295
|
-
"size": "mini",
|
|
4296
|
-
"type": "primary",
|
|
4297
|
-
"disabled": _vm.disabled
|
|
4298
|
-
}
|
|
4299
|
-
}, [_vm._v(_vm._s(_vm.label))]), _vm.showTip ? _c('div', {
|
|
4300
|
-
staticClass: "el-upload__tip",
|
|
4301
|
-
attrs: {
|
|
4302
|
-
"slot": "tip"
|
|
4303
|
-
},
|
|
4304
|
-
slot: "tip"
|
|
4305
|
-
}, [_vm.fileType ? [_vm._v(" 支持拓展名 "), _c('b', {
|
|
4306
|
-
staticStyle: {
|
|
4307
|
-
"color": "#f56c6c"
|
|
4308
|
-
}
|
|
4309
|
-
}, [_vm._v(_vm._s(_vm.fileType.join("/")))])] : _vm._e(), _vm._v(" 的文件 ")], 2) : _vm._e()], 1), _c('transition-group', {
|
|
4310
|
-
staticClass: "upload-file-list el-upload-list el-upload-list--text",
|
|
4311
|
-
attrs: {
|
|
4312
|
-
"name": "el-fade-in-linear",
|
|
4313
|
-
"tag": "ul"
|
|
4314
|
-
}
|
|
4315
|
-
}, _vm._l(_vm.fileList, function (file, index) {
|
|
4316
|
-
return _c('li', {
|
|
4317
|
-
key: file.url,
|
|
4318
|
-
staticClass: "el-upload-list__item ele-upload-list__item-content"
|
|
4319
|
-
}, [_c('el-link', {
|
|
4320
|
-
attrs: {
|
|
4321
|
-
"href": `${file.url}`,
|
|
4322
|
-
"underline": false,
|
|
4323
|
-
"target": "_blank"
|
|
4324
|
-
}
|
|
4325
|
-
}, [_c('span', {
|
|
4326
|
-
staticClass: "el-icon-document"
|
|
4327
|
-
}, [_vm._v(" " + _vm._s(file.name) + " ")])]), _c('div', {
|
|
4328
|
-
staticClass: "ele-upload-list__item-content-action"
|
|
4329
|
-
}, [_c('el-link', {
|
|
4330
|
-
attrs: {
|
|
4331
|
-
"underline": false,
|
|
4332
|
-
"type": "danger"
|
|
4333
|
-
},
|
|
4334
|
-
on: {
|
|
4335
|
-
"click": function ($event) {
|
|
4336
|
-
return _vm.handleDelete(index);
|
|
4337
|
-
}
|
|
4338
|
-
}
|
|
4339
|
-
}, [_vm._v("删除")])], 1)], 1);
|
|
4340
|
-
}), 0)], 1) : _vm._e(), _vm.type == 'single-thumb' ? _c('div', {
|
|
4341
|
-
class: 'single-image-upload' + (_vm.disabled ? ' is-disabled ' : '')
|
|
4342
|
-
}, [_c('el-upload', {
|
|
4343
|
-
staticClass: "avatar-uploader",
|
|
4344
|
-
attrs: {
|
|
4345
|
-
"action": _vm.domain + _vm.uploadFileUrl,
|
|
4346
|
-
"show-file-list": false,
|
|
4347
|
-
"on-error": _vm.handleUploadError,
|
|
4348
|
-
"on-success": _vm.handleSuccess,
|
|
4349
|
-
"before-upload": _vm.handleBeforeUpload,
|
|
4350
|
-
"headers": _vm.headers,
|
|
4351
|
-
"data": _vm.data,
|
|
4352
|
-
"disabled": _vm.disabled
|
|
4353
|
-
}
|
|
4354
|
-
}, [_vm.imageUrl ? [_c('el-image', {
|
|
4355
|
-
style: 'width: ' + _vm.width + 'px; height: ' + _vm.height + 'px',
|
|
4356
|
-
attrs: {
|
|
4357
|
-
"src": _vm.imageUrl
|
|
4358
|
-
}
|
|
4359
|
-
})] : [_c('div', {
|
|
4360
|
-
staticClass: "default-lable",
|
|
4361
|
-
style: 'width: ' + _vm.width + 'px; height: ' + _vm.height + 'px'
|
|
4362
|
-
}, [_c('div', {
|
|
4363
|
-
staticClass: "image-slot"
|
|
4364
|
-
}, [_c('i', {
|
|
4365
|
-
staticClass: "el-icon-plus"
|
|
4366
|
-
}), _vm._v(_vm._s(_vm.label))])])], _vm.showTip ? _c('div', {
|
|
4367
|
-
staticClass: "el-upload__tip",
|
|
4368
|
-
attrs: {
|
|
4369
|
-
"slot": "tip"
|
|
4370
|
-
},
|
|
4371
|
-
slot: "tip"
|
|
4372
|
-
}, [_vm.fileType ? [_vm._v(" 支持拓展名 "), _c('b', {
|
|
4373
|
-
staticStyle: {
|
|
4374
|
-
"color": "#f56c6c"
|
|
4375
|
-
}
|
|
4376
|
-
}, [_vm._v(_vm._s(_vm.fileType.join("/")))])] : _vm._e(), _vm._v(" 的文件 ")], 2) : _vm._e()], 2)], 1) : _vm._e(), _vm.type == 'rmt-thumb-new' ? _c('div', {
|
|
4377
|
-
class: 'single-file-upload' + (_vm.disabled ? ' is-disabled ' : '')
|
|
4378
|
-
}, [_c('div', {
|
|
4379
|
-
staticClass: "prize-row row-img-box"
|
|
4380
|
-
}, [_c('el-image', {
|
|
4381
|
-
staticClass: "rmt-thumb-new",
|
|
4382
|
-
class: _vm.hasUpload ? ' has-upload' : '',
|
|
4383
|
-
attrs: {
|
|
4384
|
-
"shape": "square",
|
|
4385
|
-
"fit": "fill",
|
|
4386
|
-
"src": _vm.imageUrl
|
|
4387
|
-
}
|
|
4388
|
-
}), _c('div', {
|
|
4389
|
-
staticClass: "img-btn-box"
|
|
4390
|
-
}, [_vm.isNetwork ? _c('el-button', {
|
|
4391
|
-
staticClass: "btn-big network-img",
|
|
4392
|
-
attrs: {
|
|
4393
|
-
"type": "success",
|
|
4394
|
-
"size": "mini"
|
|
4395
|
-
},
|
|
4396
|
-
on: {
|
|
4397
|
-
"click": _vm.uploadNetworkImg
|
|
4398
|
-
}
|
|
4399
|
-
}, [_vm._v("网络图片 ")]) : _vm._e(), _vm.isNetwork ? _c('div', {
|
|
4400
|
-
staticStyle: {
|
|
4401
|
-
"width": "16px"
|
|
4402
|
-
}
|
|
4403
|
-
}) : _vm._e(), _c('el-upload', {
|
|
4404
|
-
staticClass: "avatar-uploader",
|
|
4405
|
-
attrs: {
|
|
4406
|
-
"action": _vm.domain + _vm.uploadFileUrl,
|
|
4407
|
-
"show-file-list": false,
|
|
4408
|
-
"on-error": _vm.handleUploadError,
|
|
4409
|
-
"on-success": _vm.handleSuccess,
|
|
4410
|
-
"before-upload": _vm.handleBeforeUpload,
|
|
4411
|
-
"headers": _vm.headers,
|
|
4412
|
-
"data": _vm.data,
|
|
4413
|
-
"disabled": _vm.disabled
|
|
4414
|
-
}
|
|
4415
|
-
}, [_vm.showButton ? _c('el-button', {
|
|
4416
|
-
attrs: {
|
|
4417
|
-
"size": "mini",
|
|
4418
|
-
"type": "primary",
|
|
4419
|
-
"disabled": _vm.disabled
|
|
4420
|
-
}
|
|
4421
|
-
}, [_vm._v(_vm._s(_vm.label))]) : _vm._e()], 1)], 1), _vm.showTip ? _c('div', {
|
|
4422
|
-
staticClass: "el-upload__tip",
|
|
4423
|
-
attrs: {
|
|
4424
|
-
"slot": "tip"
|
|
4425
|
-
},
|
|
4426
|
-
slot: "tip"
|
|
4427
|
-
}, [_vm.fileType ? [_vm._v(" 支持拓展名 "), _c('b', {
|
|
4428
|
-
staticStyle: {
|
|
4429
|
-
"color": "#f56c6c"
|
|
4430
|
-
}
|
|
4431
|
-
}, [_vm._v(_vm._s(_vm.fileType.join("/")))])] : _vm._e(), _vm._v(" 的文件 ")], 2) : _vm._e()], 1)]) : _vm._e(), _vm.type === 'igw-media' ? _c('div', [_c('el-upload', {
|
|
4432
|
-
ref: "upload",
|
|
4433
|
-
staticClass: "upload-file-uploader",
|
|
4434
|
-
attrs: {
|
|
4435
|
-
"multiple": "",
|
|
4436
|
-
"action": _vm.domain + _vm.uploadFileUrl,
|
|
4437
|
-
"before-upload": _vm.handleBeforeUpload,
|
|
4438
|
-
"file-list": _vm.fileList,
|
|
4439
|
-
"limit": _vm.limit,
|
|
4440
|
-
"on-error": _vm.handleUploadError,
|
|
4441
|
-
"on-exceed": _vm.handleExceed,
|
|
4442
|
-
"on-success": _vm.handleUploadSuccess,
|
|
4443
|
-
"show-file-list": false,
|
|
4444
|
-
"headers": _vm.headers,
|
|
4445
|
-
"data": _vm.data
|
|
4446
|
-
}
|
|
4447
|
-
}, [_vm._t("default")], 2)], 1) : _vm._e()]);
|
|
4448
|
-
};
|
|
4449
|
-
var staticRenderFns = [];
|
|
4271
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=template&id=8420ab38&scoped=true&
|
|
4272
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload-file"},[(_vm.type=='default')?_c('div',[_c('el-upload',{ref:"upload",staticClass:"upload-file-uploader",attrs:{"multiple":"","action":_vm.domain + _vm.uploadFileUrl,"before-upload":_vm.handleBeforeUpload,"file-list":_vm.fileList,"limit":_vm.limit,"on-error":_vm.handleUploadError,"on-exceed":_vm.handleExceed,"on-success":_vm.handleUploadSuccess,"show-file-list":false,"headers":_vm.headers,"data":_vm.postData}},[_c('el-button',{attrs:{"size":"mini","type":"primary","disabled":_vm.disabled}},[_vm._v(_vm._s(_vm.label))]),(_vm.showTip)?_c('div',{staticClass:"el-upload__tip",attrs:{"slot":"tip"},slot:"tip"},[(_vm.fileType)?[_vm._v(" 支持拓展名 "),_c('b',{staticStyle:{"color":"#f56c6c"}},[_vm._v(_vm._s(_vm.fileType.join("/")))])]:_vm._e(),_vm._v(" 的文件 ")],2):_vm._e()],1),_c('transition-group',{staticClass:"upload-file-list el-upload-list el-upload-list--text",attrs:{"name":"el-fade-in-linear","tag":"ul"}},_vm._l((_vm.fileList),function(file,index){return _c('li',{key:file.url,staticClass:"el-upload-list__item ele-upload-list__item-content"},[_c('el-link',{attrs:{"href":("" + (file.url)),"underline":false,"target":"_blank"}},[_c('span',{staticClass:"el-icon-document"},[_vm._v(" "+_vm._s(file.name)+" ")])]),_c('div',{staticClass:"ele-upload-list__item-content-action"},[_c('el-link',{attrs:{"underline":false,"type":"danger"},on:{"click":function($event){return _vm.handleDelete(index)}}},[_vm._v("删除")])],1)],1)}),0)],1):_vm._e(),(_vm.type=='single-thumb')?_c('div',{class:'single-image-upload'+ (_vm.disabled?' is-disabled ':'')},[_c('el-upload',{staticClass:"avatar-uploader",attrs:{"action":_vm.domain + _vm.uploadFileUrl,"show-file-list":false,"on-error":_vm.handleUploadError,"on-success":_vm.handleSuccess,"before-upload":_vm.handleBeforeUpload,"headers":_vm.headers,"data":_vm.postData,"disabled":_vm.disabled}},[(_vm.imageUrl)?[_c('el-image',{style:('width: ' + _vm.width + 'px; height: ' + _vm.height + 'px'),attrs:{"src":_vm.imageUrl}})]:[_c('div',{staticClass:"default-lable",style:('width: ' + _vm.width + 'px; height: ' + _vm.height + 'px')},[_c('div',{staticClass:"image-slot"},[_c('i',{staticClass:"el-icon-plus"}),_vm._v(_vm._s(_vm.label))])])],(_vm.showTip)?_c('div',{staticClass:"el-upload__tip",attrs:{"slot":"tip"},slot:"tip"},[(_vm.fileType)?[_vm._v(" 支持拓展名 "),_c('b',{staticStyle:{"color":"#f56c6c"}},[_vm._v(_vm._s(_vm.fileType.join("/")))])]:_vm._e(),_vm._v(" 的文件 ")],2):_vm._e()],2)],1):_vm._e(),(_vm.type=='rmt-thumb-new')?_c('div',{class:'single-file-upload'+ (_vm.disabled?' is-disabled ':'')},[_c('div',{staticClass:"prize-row row-img-box"},[_c('el-image',{staticClass:"rmt-thumb-new",class:_vm.hasUpload?' has-upload':'',attrs:{"shape":"square","fit":"fill","src":_vm.imageUrl}}),_c('div',{staticClass:"img-btn-box"},[(_vm.isNetwork)?_c('el-button',{staticClass:"btn-big network-img",attrs:{"type":"success","size":"mini"},on:{"click":_vm.uploadNetworkImg}},[_vm._v("网络图片 ")]):_vm._e(),(_vm.isNetwork)?_c('div',{staticStyle:{"width":"16px"}}):_vm._e(),_c('el-upload',{staticClass:"avatar-uploader",attrs:{"action":_vm.domain + _vm.uploadFileUrl,"show-file-list":false,"on-error":_vm.handleUploadError,"on-success":_vm.handleSuccess,"before-upload":_vm.handleBeforeUpload,"headers":_vm.headers,"data":_vm.postData,"disabled":_vm.disabled}},[(_vm.showButton)?_c('el-button',{attrs:{"size":"mini","type":"primary","disabled":_vm.disabled}},[_vm._v(_vm._s(_vm.label))]):_vm._e()],1)],1),(_vm.showTip)?_c('div',{staticClass:"el-upload__tip",attrs:{"slot":"tip"},slot:"tip"},[(_vm.fileType)?[_vm._v(" 支持拓展名 "),_c('b',{staticStyle:{"color":"#f56c6c"}},[_vm._v(_vm._s(_vm.fileType.join("/")))])]:_vm._e(),_vm._v(" 的文件 ")],2):_vm._e()],1)]):_vm._e(),(_vm.type === 'igw-media')?_c('div',[_c('el-upload',{ref:"upload",staticClass:"upload-file-uploader",attrs:{"multiple":"","action":_vm.domain + _vm.uploadFileUrl,"before-upload":_vm.handleBeforeUpload,"file-list":_vm.fileList,"limit":_vm.limit,"on-error":_vm.handleUploadError,"on-exceed":_vm.handleExceed,"on-success":_vm.handleUploadSuccess,"show-file-list":false,"headers":_vm.headers,"data":_vm.postData}},[_vm._t("default")],2)],1):_vm._e()])}
|
|
4273
|
+
var staticRenderFns = []
|
|
4274
|
+
|
|
4450
4275
|
|
|
4451
4276
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
4452
4277
|
var es_array_push = __webpack_require__(7658);
|
|
@@ -5213,7 +5038,101 @@ function uploadNetworkImg(params) {
|
|
|
5213
5038
|
uploadNetworkImg
|
|
5214
5039
|
// uploadFile
|
|
5215
5040
|
});
|
|
5216
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-
|
|
5041
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=script&lang=js&
|
|
5042
|
+
|
|
5043
|
+
//
|
|
5044
|
+
//
|
|
5045
|
+
//
|
|
5046
|
+
//
|
|
5047
|
+
//
|
|
5048
|
+
//
|
|
5049
|
+
//
|
|
5050
|
+
//
|
|
5051
|
+
//
|
|
5052
|
+
//
|
|
5053
|
+
//
|
|
5054
|
+
//
|
|
5055
|
+
//
|
|
5056
|
+
//
|
|
5057
|
+
//
|
|
5058
|
+
//
|
|
5059
|
+
//
|
|
5060
|
+
//
|
|
5061
|
+
//
|
|
5062
|
+
//
|
|
5063
|
+
//
|
|
5064
|
+
//
|
|
5065
|
+
//
|
|
5066
|
+
//
|
|
5067
|
+
//
|
|
5068
|
+
//
|
|
5069
|
+
//
|
|
5070
|
+
//
|
|
5071
|
+
//
|
|
5072
|
+
//
|
|
5073
|
+
//
|
|
5074
|
+
//
|
|
5075
|
+
//
|
|
5076
|
+
//
|
|
5077
|
+
//
|
|
5078
|
+
//
|
|
5079
|
+
//
|
|
5080
|
+
//
|
|
5081
|
+
//
|
|
5082
|
+
//
|
|
5083
|
+
//
|
|
5084
|
+
//
|
|
5085
|
+
//
|
|
5086
|
+
//
|
|
5087
|
+
//
|
|
5088
|
+
//
|
|
5089
|
+
//
|
|
5090
|
+
//
|
|
5091
|
+
//
|
|
5092
|
+
//
|
|
5093
|
+
//
|
|
5094
|
+
//
|
|
5095
|
+
//
|
|
5096
|
+
//
|
|
5097
|
+
//
|
|
5098
|
+
//
|
|
5099
|
+
//
|
|
5100
|
+
//
|
|
5101
|
+
//
|
|
5102
|
+
//
|
|
5103
|
+
//
|
|
5104
|
+
//
|
|
5105
|
+
//
|
|
5106
|
+
//
|
|
5107
|
+
//
|
|
5108
|
+
//
|
|
5109
|
+
//
|
|
5110
|
+
//
|
|
5111
|
+
//
|
|
5112
|
+
//
|
|
5113
|
+
//
|
|
5114
|
+
//
|
|
5115
|
+
//
|
|
5116
|
+
//
|
|
5117
|
+
//
|
|
5118
|
+
//
|
|
5119
|
+
//
|
|
5120
|
+
//
|
|
5121
|
+
//
|
|
5122
|
+
//
|
|
5123
|
+
//
|
|
5124
|
+
//
|
|
5125
|
+
//
|
|
5126
|
+
//
|
|
5127
|
+
//
|
|
5128
|
+
//
|
|
5129
|
+
//
|
|
5130
|
+
//
|
|
5131
|
+
//
|
|
5132
|
+
//
|
|
5133
|
+
//
|
|
5134
|
+
//
|
|
5135
|
+
//
|
|
5217
5136
|
|
|
5218
5137
|
// import { rmtFileUpload } from "./index.js";
|
|
5219
5138
|
|
|
@@ -5400,11 +5319,22 @@ function uploadNetworkImg(params) {
|
|
|
5400
5319
|
// 是否显示提示
|
|
5401
5320
|
showTip() {
|
|
5402
5321
|
return this.isShowTip && (this.fileType || this.fileSize);
|
|
5322
|
+
},
|
|
5323
|
+
postData() {
|
|
5324
|
+
if (this.enableV1CmsApi) {
|
|
5325
|
+
return {
|
|
5326
|
+
format: 'json',
|
|
5327
|
+
type: 'image'
|
|
5328
|
+
};
|
|
5329
|
+
} else {
|
|
5330
|
+
return this.data;
|
|
5331
|
+
}
|
|
5403
5332
|
}
|
|
5404
5333
|
},
|
|
5405
5334
|
methods: {
|
|
5406
5335
|
// 上传前校检格式和大小
|
|
5407
5336
|
async handleBeforeUpload(file) {
|
|
5337
|
+
console.log('handleBeforeUpload file', file);
|
|
5408
5338
|
var that = this;
|
|
5409
5339
|
if (typeof that.beforeFun == 'function') {
|
|
5410
5340
|
that.beforeFun(file);
|
|
@@ -5439,9 +5369,10 @@ function uploadNetworkImg(params) {
|
|
|
5439
5369
|
// 判断token是否过期
|
|
5440
5370
|
var isTokenOk = function () {
|
|
5441
5371
|
return new Promise((resolve, reject) => {
|
|
5442
|
-
if (
|
|
5372
|
+
if (that.enableV1CmsApi) {
|
|
5443
5373
|
// V1CmsApi不校验token
|
|
5444
5374
|
resolve(true);
|
|
5375
|
+
return;
|
|
5445
5376
|
}
|
|
5446
5377
|
rmtFileUploadSdk.isTokenExpired(() => {
|
|
5447
5378
|
that.headers['X-Key'] = rmtFileUploadSdk.getCookies('X-Key');
|
|
@@ -5475,6 +5406,7 @@ function uploadNetworkImg(params) {
|
|
|
5475
5406
|
},
|
|
5476
5407
|
// 上传失败
|
|
5477
5408
|
handleUploadError(res) {
|
|
5409
|
+
console.log('handleUploadError', res);
|
|
5478
5410
|
var that = this;
|
|
5479
5411
|
that.$message.error("上传失败,请重试");
|
|
5480
5412
|
that.$modal.closeLoading();
|
|
@@ -5484,8 +5416,10 @@ function uploadNetworkImg(params) {
|
|
|
5484
5416
|
},
|
|
5485
5417
|
// 上传成功回调
|
|
5486
5418
|
handleUploadSuccess(res) {
|
|
5419
|
+
console.log('handleUploadSuccess', res);
|
|
5487
5420
|
var that = this;
|
|
5488
5421
|
if (res.data && res.data.url) {
|
|
5422
|
+
// 新附件服务数据格式
|
|
5489
5423
|
that.$message.success("上传成功");
|
|
5490
5424
|
that.uploadList.push({
|
|
5491
5425
|
FileName: res.data.originalFileName,
|
|
@@ -5500,6 +5434,22 @@ function uploadNetworkImg(params) {
|
|
|
5500
5434
|
if (typeof that.successFun == 'function') {
|
|
5501
5435
|
that.successFun(res);
|
|
5502
5436
|
}
|
|
5437
|
+
} else if (that.enableV1CmsApi && res.url) {
|
|
5438
|
+
// 旧附件服务数据格式
|
|
5439
|
+
that.$message.success("上传成功");
|
|
5440
|
+
that.uploadList.push({
|
|
5441
|
+
FileName: res.fileName,
|
|
5442
|
+
url: res.url
|
|
5443
|
+
});
|
|
5444
|
+
if (that.uploadList.length === that.number) {
|
|
5445
|
+
that.fileList = that.fileList.concat(that.uploadList);
|
|
5446
|
+
that.uploadList = [];
|
|
5447
|
+
that.number = 0;
|
|
5448
|
+
that.$emit("input", that.listToString(that.fileList));
|
|
5449
|
+
}
|
|
5450
|
+
if (typeof that.successFun == 'function') {
|
|
5451
|
+
that.successFun(res);
|
|
5452
|
+
}
|
|
5503
5453
|
} else {
|
|
5504
5454
|
that.$message.error(res.message || "上传失败");
|
|
5505
5455
|
if (typeof that.errorFun == 'function') {
|
|
@@ -5553,11 +5503,24 @@ function uploadNetworkImg(params) {
|
|
|
5553
5503
|
that.hasUpload = true;
|
|
5554
5504
|
// that.$emit("input", res.data.url);
|
|
5555
5505
|
|
|
5506
|
+
if (typeof that.successFun == 'function') {
|
|
5507
|
+
that.successFun(res);
|
|
5508
|
+
}
|
|
5509
|
+
} else if (that.enableV1CmsApi && res.url) {
|
|
5510
|
+
// 旧附件服务数据格式
|
|
5511
|
+
that.$message.success("上传成功");
|
|
5512
|
+
that.uploadList = [{
|
|
5513
|
+
FileName: res.fileName,
|
|
5514
|
+
url: res.url
|
|
5515
|
+
}];
|
|
5516
|
+
that.imageUrl = res.url;
|
|
5517
|
+
that.$emit("input", that.listToString(that.uploadList));
|
|
5518
|
+
that.hasUpload = true;
|
|
5556
5519
|
if (typeof that.successFun == 'function') {
|
|
5557
5520
|
that.successFun(res);
|
|
5558
5521
|
}
|
|
5559
5522
|
} else {
|
|
5560
|
-
this.$message.error("上传失败");
|
|
5523
|
+
this.$message.error("上传失败 2");
|
|
5561
5524
|
if (typeof that.errorFun == 'function') {
|
|
5562
5525
|
that.errorFun(res);
|
|
5563
5526
|
}
|
|
@@ -5602,9 +5565,9 @@ function uploadNetworkImg(params) {
|
|
|
5602
5565
|
});
|
|
5603
5566
|
;// CONCATENATED MODULE: ./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=script&lang=js&
|
|
5604
5567
|
/* harmony default export */ var rmtFileUpload_rmtFileUploadvue_type_script_lang_js_ = (rmtFileUploadvue_type_script_lang_js_);
|
|
5605
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-
|
|
5606
|
-
var
|
|
5607
|
-
;// CONCATENATED MODULE: ./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=
|
|
5568
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-62.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-62.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-62.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-62.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-62.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=8420ab38&prod&scoped=true&lang=scss&
|
|
5569
|
+
var rmtFileUploadvue_type_style_index_0_id_8420ab38_prod_scoped_true_lang_scss_ = __webpack_require__(6337);
|
|
5570
|
+
;// CONCATENATED MODULE: ./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=style&index=0&id=8420ab38&prod&scoped=true&lang=scss&
|
|
5608
5571
|
|
|
5609
5572
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
5610
5573
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -5719,14 +5682,14 @@ var component = normalizeComponent(
|
|
|
5719
5682
|
staticRenderFns,
|
|
5720
5683
|
false,
|
|
5721
5684
|
null,
|
|
5722
|
-
"
|
|
5685
|
+
"8420ab38",
|
|
5723
5686
|
null
|
|
5724
5687
|
|
|
5725
5688
|
)
|
|
5726
5689
|
|
|
5727
5690
|
/* harmony default export */ var rmtFileUpload = (component.exports);
|
|
5728
5691
|
// EXTERNAL MODULE: ./node_modules/element-ui/lib/theme-chalk/index.css
|
|
5729
|
-
var theme_chalk = __webpack_require__(
|
|
5692
|
+
var theme_chalk = __webpack_require__(9827);
|
|
5730
5693
|
;// CONCATENATED MODULE: ./packages/plugins/modal.js
|
|
5731
5694
|
|
|
5732
5695
|
let loadingInstance;
|