@fengzhongwen/kukan-ui 1.0.21 → 1.0.23
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/kukan-ui.common.js
CHANGED
|
@@ -94,21 +94,17 @@ module.exports =
|
|
|
94
94
|
|
|
95
95
|
/***/ }),
|
|
96
96
|
|
|
97
|
-
/***/ "
|
|
97
|
+
/***/ "498d":
|
|
98
98
|
/***/ (function(module, exports, __webpack_require__) {
|
|
99
99
|
|
|
100
100
|
// extracted by mini-css-extract-plugin
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/ "
|
|
105
|
-
/***/ (function(module,
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
108
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9136");
|
|
109
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
110
|
-
/* unused harmony reexport * */
|
|
104
|
+
/***/ "5554":
|
|
105
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
111
106
|
|
|
107
|
+
// extracted by mini-css-extract-plugin
|
|
112
108
|
|
|
113
109
|
/***/ }),
|
|
114
110
|
|
|
@@ -878,29 +874,22 @@ module.exports =
|
|
|
878
874
|
|
|
879
875
|
/***/ }),
|
|
880
876
|
|
|
881
|
-
/***/ "
|
|
877
|
+
/***/ "9b6a":
|
|
882
878
|
/***/ (function(module, exports, __webpack_require__) {
|
|
883
879
|
|
|
884
880
|
// extracted by mini-css-extract-plugin
|
|
885
881
|
|
|
886
882
|
/***/ }),
|
|
887
883
|
|
|
888
|
-
/***/ "
|
|
884
|
+
/***/ "a888":
|
|
889
885
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
890
886
|
|
|
891
887
|
"use strict";
|
|
892
|
-
/* harmony import */ var
|
|
893
|
-
/* harmony import */ var
|
|
888
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9b6a");
|
|
889
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
894
890
|
/* unused harmony reexport * */
|
|
895
891
|
|
|
896
892
|
|
|
897
|
-
/***/ }),
|
|
898
|
-
|
|
899
|
-
/***/ "e5ff":
|
|
900
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
901
|
-
|
|
902
|
-
// extracted by mini-css-extract-plugin
|
|
903
|
-
|
|
904
893
|
/***/ }),
|
|
905
894
|
|
|
906
895
|
/***/ "fb15":
|
|
@@ -1086,12 +1075,12 @@ function addNewFileOfSubTitle(data, url) {
|
|
|
1086
1075
|
});
|
|
1087
1076
|
}
|
|
1088
1077
|
|
|
1089
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1078
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"55e0a027-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/index.vue?vue&type=template&id=7af8297e&scoped=true
|
|
1090
1079
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload-multiple"},[_c('input',{ref:"multiplePloadInput",staticStyle:{"display":"none"},attrs:{"type":"file","multiple":_vm.multiple,"accept":_vm.limitFileType},on:{"change":_vm.handleSelectedMultipleFiles}}),_c('div',{staticClass:"upload-multiple-box"},[_c('div',{ref:"upLoded_box",staticClass:"multiple_upload_area",class:_vm.multipleUploadAreaClass(),on:{"click":_vm.reviewUploadMultipleFiles,"dragover":function($event){$event.preventDefault();return _vm.onDragOver($event)},"dragleave":function($event){$event.preventDefault();return _vm.onDragLeave($event)},"drop":function($event){$event.preventDefault();return _vm.onDrop($event)}}},[(_vm.isUploading)?_c('div',{staticClass:"upload-loading-mask",style:(_vm.setUploadingLoadingMaskStyle())}):_vm._e(),(_vm.showIconTip)?_c('div',[_c('i',{staticClass:"el-icon-upload"})]):_vm._e(),_c('div',[_vm._v(_vm._s(_vm.startButtonText))]),_vm._t("tips")],2),(_vm.pictureConfig.show && _vm.showSuccessPicture)?_c('div',{staticClass:"upload-multiple-box-right"},[_c('div',{staticClass:"upload-multiple-box-close",on:{"click":function($event){$event.stopPropagation();return _vm.clearPicture($event)}}},[_c('i',{staticClass:"el-icon-close"})]),_c('img',{attrs:{"src":_vm.pictureConfig.url,"alt":_vm.pictureConfig.altText}})]):_vm._e()]),(_vm.isShowAllUploadButton)?_c('el-button',{staticClass:"upload_button",attrs:{"type":"primary","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.startUploadMultipleFiles}},[_vm._v(" 全部文件开始上传 ")]):_vm._e(),(_vm.model === 'table')?_c('div',{staticClass:"upload-multiple-table"},[_c('Upload_table',{attrs:{"needUploadFilesArr":_vm.needUploadFilesArr,"fileConfig":_vm.fileConfig,"fileType":_vm.addDataBaseLinkConfig.addFileType,"isUploading":_vm.isUploading},on:{"delteSelectedFile":_vm.delteSelectedFile,"cancelFileUpload":_vm.cancelFileUpload,"resetFileUpload":_vm.resetFileUpload,"handleSelectionChange":_vm.tableSelectionChange}})],1):_vm._e(),(_vm.model === 'info')?_c('div',{staticClass:"multiple_upload_list"},[_c('span',{staticClass:"tip_title"},[_c('span',{staticClass:"title"},[_c('div',[_vm._v("文件列表")]),_c('transition',{attrs:{"name":"totalProgress","mode":"out-in"}},[(_vm.needUploadFilesArr.length > 0)?_c('div',{staticClass:"total_progress"},[_c('div',{staticClass:"logo"}),_c('span',[_vm._v("总进度:")]),(_vm.fileConfig.uploadController)?_c('div',[_c('el-tag',{attrs:{"size":"mini","type":_vm.isDanger}},[_vm._v("上传错误:"+_vm._s(_vm.fileConfig.skipError_num))]),_c('el-tag',{attrs:{"size":"mini","type":""}},[_vm._v("上传成功:"+_vm._s(_vm.fileConfig.completed_num))]),_c('el-tag',{attrs:{"size":"mini","type":""}},[_vm._v("文件总数:"+_vm._s(_vm.fileConfig.filetotal_num))])],1):_vm._e()]):_vm._e()])],1),_c('span',[_c('el-button',{attrs:{"size":"mini","type":"","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.handleSelectAllFile}},[_vm._v("全选所有文件")]),_c('el-button',{attrs:{"size":"mini","type":"danger","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.delteSelectedFile}},[_vm._v("移除所选文件")])],1)]),_c('div',{staticClass:"selected_list_area"},[(_vm.needUploadFilesArr.length > 0)?_c('div',{staticClass:"selected_list"},_vm._l((_vm.needUploadFilesArr),function(item,index){return _c('Card_2',{key:index,attrs:{"index":index,"file-config":item},on:{"cancelFileUpload":_vm.cancelFileUpload,"resetFileUpload":_vm.resetFileUpload,"handleClickOnlyFile":_vm.handleClickOnlyFile}})}),1):_c('div',{staticClass:"no_file"},[_c('i',{staticClass:"el-icon-document"}),_c('div',[_vm._v("暂无文件,请点击或拖拽文件到上传区域")])])])]):_vm._e()],1)}
|
|
1091
1080
|
var staticRenderFns = []
|
|
1092
1081
|
|
|
1093
1082
|
|
|
1094
|
-
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue?vue&type=template&id=
|
|
1083
|
+
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue?vue&type=template&id=7af8297e&scoped=true
|
|
1095
1084
|
|
|
1096
1085
|
// CONCATENATED MODULE: ./src/components/FileUpload/util.js
|
|
1097
1086
|
// 辅助函数:获取MIME类型
|
|
@@ -1166,7 +1155,7 @@ const fileTypeValidators = {
|
|
|
1166
1155
|
// return /^(presentation))|text\/(plain|html|csv|xml|css|javascript|markdown))$/i.test(mime);
|
|
1167
1156
|
},
|
|
1168
1157
|
};
|
|
1169
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1158
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"55e0a027-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/components/UploadCard_Ver_Second/index.vue?vue&type=template&id=cdec1cec&scoped=true
|
|
1170
1159
|
var UploadCard_Ver_Secondvue_type_template_id_cdec1cec_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.fileConfig.name + '_' + _vm.index,staticClass:"only_file_area",class:{
|
|
1171
1160
|
only_file_area_isActive: _vm.fileConfig.isSelected,
|
|
1172
1161
|
'fade-in-element': true,
|
|
@@ -1446,7 +1435,7 @@ var component = normalizeComponent(
|
|
|
1446
1435
|
)
|
|
1447
1436
|
|
|
1448
1437
|
/* harmony default export */ var UploadCard_Ver_Second = (component.exports);
|
|
1449
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1438
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"55e0a027-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/components/Upload_table/index.vue?vue&type=template&id=61052c10&scoped=true
|
|
1450
1439
|
var Upload_tablevue_type_template_id_61052c10_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload_table"},[_c('div',{staticClass:"header"},[_c('div',{staticClass:"total"},[_c('span',[_vm._v("已选择"+_vm._s(_vm.needUploadFilesArr.length)+"个文件")]),(_vm.needUploadFilesArr.length)?_c('el-tag',{attrs:{"type":"","size":"mini"}},[_vm._v("上传中"+_vm._s(_vm.totalNumber))]):_vm._e()],1),_c('div',{staticClass:"options"},[_c('el-button',{attrs:{"type":"danger","size":"mini","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":function($event){return _vm.handleClickOnlyFile()}}},[_vm._v("清除已选")])],1)]),_c('el-table',{staticStyle:{"width":"100%"},attrs:{"data":_vm.needUploadFilesArr,"default-sort":{ prop: 'fileName', order: 'descending' },"border":"","height":"400px"},on:{"sort-change":_vm.handleSortChange,"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"40"}}),_c('el-table-column',{attrs:{"type":"index","width":"40"}}),_c('el-table-column',{attrs:{"label":"文件名","width":"300"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"file_name"},[_c('div',{staticClass:"file_type"},[_vm._v(" "+_vm._s(_vm.getFileType(scope.row.name))+" ")]),_c('span',{staticClass:"file_name_text"},[_vm._v(_vm._s(scope.row.name))])])]}}])}),_c('el-table-column',{attrs:{"label":"大小","width":"100"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"file_size"},[_c('span',{staticClass:"file_size_text"},[_vm._v(_vm._s(_vm.fileFormatValid(scope.row.file.size))+" mb")])])]}}])}),_c('el-table-column',{attrs:{"label":"状态","width":"100"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"status_text"},[_c('span',{class:_vm.uploadingTextStyle(scope.row.tip)},[_vm._v(_vm._s(scope.row.tip))])])]}}])}),_c('el-table-column',{attrs:{"label":"进度","width":"auto"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('div',{staticClass:"progress_area"},[_c('el-progress',{staticClass:"custom-progress",attrs:{"color":_vm.colors,"show-text":true,"percentage":scope.row.uploadProgress}})],1)]}}])}),_c('el-table-column',{attrs:{"label":"操作","width":"auto"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.tip === '上传中')?_c('div',{staticClass:"option_text",on:{"click":function($event){$event.stopPropagation();return _vm.cancelFileUpload(scope.row)}}},[_c('span',{staticStyle:{"color":"#f74444","cursor":"pointer"}},[_vm._v("取消上传")])]):_vm._e(),(
|
|
1451
1440
|
scope.row.tip === '已取消' ||
|
|
1452
1441
|
scope.row.tip === '上传出错' ||
|
|
@@ -3367,7 +3356,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3367
3356
|
|
|
3368
3357
|
if (this.needUploadFilesArr.length === _neerUploadFilesArr.length) {
|
|
3369
3358
|
this.$message("没有需要移除的文件");
|
|
3370
|
-
return
|
|
3359
|
+
return;
|
|
3371
3360
|
}
|
|
3372
3361
|
|
|
3373
3362
|
// 需要添加移除文件的钩子函数
|
|
@@ -3388,6 +3377,8 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3388
3377
|
}
|
|
3389
3378
|
|
|
3390
3379
|
try {
|
|
3380
|
+
this.uploadStart();
|
|
3381
|
+
|
|
3391
3382
|
this.$message.success("开始上传");
|
|
3392
3383
|
|
|
3393
3384
|
this.fileConfig.filetotal_num = handleUploadFileArr.length;
|
|
@@ -3422,7 +3413,9 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3422
3413
|
skipError,
|
|
3423
3414
|
}) => {
|
|
3424
3415
|
console.log(
|
|
3425
|
-
"%c 文件总进度:",
|
|
3416
|
+
"%c 文件总进度:",
|
|
3417
|
+
"color: #2196F3; font-weight: bold;",
|
|
3418
|
+
`已完成 ${completed}/${total},正在上传 ${active},排队中 ${queued}, 出错数量 ${skipError} 个`,
|
|
3426
3419
|
);
|
|
3427
3420
|
this.fileConfig.overallProgress = percentage;
|
|
3428
3421
|
this.fileConfig.notShowTip = notShowTip;
|
|
@@ -3477,6 +3470,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3477
3470
|
}
|
|
3478
3471
|
}
|
|
3479
3472
|
} else {
|
|
3473
|
+
this.uploadedResult([]);
|
|
3480
3474
|
this.$message.error("上传出错!");
|
|
3481
3475
|
}
|
|
3482
3476
|
} catch (err) {
|
|
@@ -3513,9 +3507,6 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3513
3507
|
|
|
3514
3508
|
const _arr = e.target.files || e.dataTransfer.files;
|
|
3515
3509
|
|
|
3516
|
-
// 防止出错
|
|
3517
|
-
// e.target.value = ""
|
|
3518
|
-
|
|
3519
3510
|
// 校验文件格式
|
|
3520
3511
|
Array.from(_arr).forEach((item, index) => {
|
|
3521
3512
|
if (this.addDataBaseLinkConfig.addFileType === "video") {
|
|
@@ -3627,7 +3618,7 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3627
3618
|
0;
|
|
3628
3619
|
const fileSize = Number(rawSize) || 0;
|
|
3629
3620
|
|
|
3630
|
-
const max =
|
|
3621
|
+
const max = 1 * 1024 * 1024 * 1024; // 2GB
|
|
3631
3622
|
const allowed = fileSize > 0 && fileSize < max;
|
|
3632
3623
|
if (!allowed) {
|
|
3633
3624
|
error++;
|
|
@@ -3659,12 +3650,13 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3659
3650
|
...this.needUploadFilesArr,
|
|
3660
3651
|
..._needUploadFilesArr,
|
|
3661
3652
|
];
|
|
3662
|
-
this.uploadStart();
|
|
3663
|
-
|
|
3664
3653
|
// 此处需要额外的处理逻辑,而这个额外的逻辑需要父组件提供
|
|
3665
3654
|
// 等待父组件通过回调处理筛选逻辑(若父组件未提供回调则立即继续)
|
|
3666
3655
|
await this.uploadingOtherFilterFun(this.needUploadFilesArr);
|
|
3667
3656
|
|
|
3657
|
+
// 防止不能重复上传
|
|
3658
|
+
e.target.value = ""
|
|
3659
|
+
|
|
3668
3660
|
// 上传分为:1.列表模式点击按钮开始上传。2.选择完文件自动上传。3.通过xxx方法可以选择改变已选文件,然后调用xxx方法实现上传,这几种方法暂时是互斥的
|
|
3669
3661
|
if (this.needUploadFilesArr.length > 0 && this.autoUpload) {
|
|
3670
3662
|
this.startUploadMultipleFiles();
|
|
@@ -3675,8 +3667,8 @@ async function addNewFileId(id, version_id, fileType) {
|
|
|
3675
3667
|
|
|
3676
3668
|
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue?vue&type=script&lang=js
|
|
3677
3669
|
/* harmony default export */ var components_FileUploadvue_type_script_lang_js = (FileUploadvue_type_script_lang_js);
|
|
3678
|
-
// EXTERNAL MODULE: ./src/components/FileUpload/index.vue?vue&type=style&index=0&id=
|
|
3679
|
-
var
|
|
3670
|
+
// EXTERNAL MODULE: ./src/components/FileUpload/index.vue?vue&type=style&index=0&id=7af8297e&prod&scoped=true&lang=scss
|
|
3671
|
+
var FileUploadvue_type_style_index_0_id_7af8297e_prod_scoped_true_lang_scss = __webpack_require__("fe0b");
|
|
3680
3672
|
|
|
3681
3673
|
// CONCATENATED MODULE: ./src/components/FileUpload/index.vue
|
|
3682
3674
|
|
|
@@ -3693,7 +3685,7 @@ var FileUpload_component = normalizeComponent(
|
|
|
3693
3685
|
staticRenderFns,
|
|
3694
3686
|
false,
|
|
3695
3687
|
null,
|
|
3696
|
-
"
|
|
3688
|
+
"7af8297e",
|
|
3697
3689
|
null
|
|
3698
3690
|
|
|
3699
3691
|
)
|
|
@@ -3708,12 +3700,12 @@ FileUpload.install = function(Vue) {
|
|
|
3708
3700
|
};
|
|
3709
3701
|
|
|
3710
3702
|
/* harmony default export */ var components_FileUpload = (FileUpload);
|
|
3711
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
3712
|
-
var
|
|
3713
|
-
var
|
|
3703
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"55e0a027-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VideoPreviewDialog/index.vue?vue&type=template&id=3f692c5e&scoped=true
|
|
3704
|
+
var VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{attrs:{"visible":_vm.dialogVisible,"show-close":false,"modal":true,"width":_vm.width,"top":_vm.topMargin,"custom-class":"modern-video-review-dialog","append-to-body":"","before-close":_vm.closePreview},on:{"update:visible":function($event){_vm.dialogVisible=$event},"opened":_vm.onOpened}},[_c('div',{staticClass:"video-review-container",style:({ height: _vm.height }),on:{"mousemove":_vm.onDrag,"mouseup":_vm.stopDrag,"mouseleave":_vm.stopDrag}},[_c('div',{staticClass:"video-review-header"},[_c('div',{staticClass:"file-info"},[_c('span',{staticClass:"file-name",attrs:{"title":_vm.fileName}},[_vm._v(_vm._s(_vm.fileName || "视频预览"))]),(!_vm.combinedLoading && !_vm.loadError && _vm.videoWidth)?_c('span',{staticClass:"file-size"},[_vm._v(" "+_vm._s(_vm.videoWidth)+" × "+_vm._s(_vm.videoHeight)+" px | "+_vm._s(_vm.duration)+" ")]):_vm._e()]),_c('div',{staticClass:"video-review-controls"},[_c('button',{staticClass:"control-icon-btn",attrs:{"disabled":_vm.combinedLoading || _vm.loadError || _vm.scale <= _vm.minScale},on:{"click":_vm.zoomOut}},[_c('i',{staticClass:"el-icon-zoom-out"})]),_c('span',{staticClass:"zoom-display"},[_vm._v(_vm._s(Math.round(_vm.scale * 100))+"%")]),_c('button',{staticClass:"control-icon-btn",attrs:{"disabled":_vm.combinedLoading || _vm.loadError || _vm.scale >= _vm.maxScale},on:{"click":_vm.zoomIn}},[_c('i',{staticClass:"el-icon-zoom-in"})]),_c('div',{staticClass:"control-divider"}),_c('button',{staticClass:"control-icon-btn",attrs:{"disabled":_vm.combinedLoading,"title":"原始尺寸/重置位置"},on:{"click":_vm.resetZoom}},[_c('i',{staticClass:"el-icon-refresh-right"})]),_c('button',{staticClass:"control-icon-btn close-btn",on:{"click":_vm.closePreview}},[_c('i',{staticClass:"el-icon-close"})])])]),_c('div',{staticClass:"video-review-content",on:{"wheel":function($event){$event.preventDefault();return _vm.handleWheel($event)},"mousedown":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.startDrag($event)},"!click":function($event){return _vm.handleCaptureClick($event)}}},[_c('transition',{attrs:{"name":"fade"}},[(_vm.combinedLoading && !_vm.loadError)?_c('div',{staticClass:"status-overlay"},[_c('i',{staticClass:"el-icon-loading"}),_c('p',[_vm._v("视频加载中...")])]):_vm._e()]),(_vm.loadError)?_c('div',{staticClass:"status-overlay error"},[_c('i',{staticClass:"el-icon-video-camera"}),_c('p',[_vm._v("视频加载失败")])]):_vm._e(),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.combinedLoading && !_vm.loadError),expression:"!combinedLoading && !loadError"}],staticClass:"video-transform-wrapper",style:(_vm.videoStyle),on:{"mousedown":_vm.startDrag}},[(_vm.visible && _vm.videoUrl)?_c('video',{key:_vm.videoKey,ref:"videoPlayer",staticClass:"main-preview-video",attrs:{"src":_vm.videoUrl,"autoplay":"","loop":"","playsinline":"","controls":""},on:{"loadedmetadata":_vm.onMetadataLoad,"error":_vm.onVideoError,"canplay":_vm.onCanPlay,"waiting":function($event){_vm.innerLoading = true}}}):_vm._e()])],1),_c('div',{staticClass:"video-review-hint"},[_c('span',[_vm._v("鼠标拖拽背景移动,滚轮缩放查看细节")])])])])}
|
|
3705
|
+
var VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_staticRenderFns = []
|
|
3714
3706
|
|
|
3715
3707
|
|
|
3716
|
-
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=template&id=
|
|
3708
|
+
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=template&id=3f692c5e&scoped=true
|
|
3717
3709
|
|
|
3718
3710
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/VideoPreviewDialog/index.vue?vue&type=script&lang=js
|
|
3719
3711
|
//
|
|
@@ -3821,9 +3813,10 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3821
3813
|
//
|
|
3822
3814
|
//
|
|
3823
3815
|
//
|
|
3816
|
+
//
|
|
3824
3817
|
|
|
3825
3818
|
/* harmony default export */ var VideoPreviewDialogvue_type_script_lang_js = ({
|
|
3826
|
-
name: "
|
|
3819
|
+
name: "VideoReview",
|
|
3827
3820
|
props: {
|
|
3828
3821
|
visible: { type: Boolean, default: false },
|
|
3829
3822
|
videoUrl: { type: String, required: true },
|
|
@@ -3832,14 +3825,16 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3832
3825
|
height: { type: String, default: "80vh" },
|
|
3833
3826
|
topMargin: { type: String, default: "7vh" },
|
|
3834
3827
|
initialScale: { type: Number, default: 1 },
|
|
3828
|
+
// 新增逻辑:允许手动控制加载状态
|
|
3829
|
+
loading: { type: Boolean, default: false }
|
|
3835
3830
|
},
|
|
3836
3831
|
data() {
|
|
3837
3832
|
return {
|
|
3838
3833
|
scale: 1,
|
|
3839
3834
|
minScale: 0.5,
|
|
3840
3835
|
maxScale: 3,
|
|
3841
|
-
|
|
3842
|
-
loadError: false,
|
|
3836
|
+
innerLoading: true, // 组件内部加载状态
|
|
3837
|
+
loadError: false,
|
|
3843
3838
|
videoWidth: 0,
|
|
3844
3839
|
videoHeight: 0,
|
|
3845
3840
|
duration: "00:00",
|
|
@@ -3847,6 +3842,7 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3847
3842
|
translateY: 0,
|
|
3848
3843
|
isDragging: false,
|
|
3849
3844
|
hasMoved: false,
|
|
3845
|
+
videoKey: Date.now(), // 核心修复:用于强制刷新 video 标签
|
|
3850
3846
|
startMousePos: { x: 0, y: 0 },
|
|
3851
3847
|
mouseStartPos: { x: 0, y: 0 },
|
|
3852
3848
|
};
|
|
@@ -3856,6 +3852,10 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3856
3852
|
get() { return this.visible; },
|
|
3857
3853
|
set(val) { this.$emit("update:visible", val); },
|
|
3858
3854
|
},
|
|
3855
|
+
// 逻辑合并:外部 prop 或内部加载状态只要有一个在转,就显示 loading
|
|
3856
|
+
combinedLoading() {
|
|
3857
|
+
return this.loading || this.innerLoading;
|
|
3858
|
+
},
|
|
3859
3859
|
videoStyle() {
|
|
3860
3860
|
return {
|
|
3861
3861
|
transform: `translate(${this.translateX}px, ${this.translateY}px) scale(${this.scale})`,
|
|
@@ -3866,29 +3866,36 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3866
3866
|
watch: {
|
|
3867
3867
|
visible(val) {
|
|
3868
3868
|
if (val) {
|
|
3869
|
-
this.
|
|
3869
|
+
this.videoKey = Date.now(); // 每次开启弹窗,赋予新 key 强制重载
|
|
3870
|
+
this.initStates();
|
|
3870
3871
|
window.addEventListener("keydown", this.handleKeyDown);
|
|
3871
3872
|
} else {
|
|
3872
3873
|
this.pauseVideo();
|
|
3873
3874
|
window.removeEventListener("keydown", this.handleKeyDown);
|
|
3874
3875
|
}
|
|
3875
3876
|
},
|
|
3876
|
-
// 监听 URL 变化:如果弹窗没关闭但切换了视频源,也要重置状态
|
|
3877
3877
|
videoUrl() {
|
|
3878
3878
|
if (this.visible) {
|
|
3879
|
+
this.videoKey = Date.now();
|
|
3879
3880
|
this.initStates();
|
|
3880
3881
|
}
|
|
3881
3882
|
}
|
|
3882
3883
|
},
|
|
3883
3884
|
methods: {
|
|
3884
|
-
// 初始化/重置状态的方法
|
|
3885
3885
|
initStates() {
|
|
3886
|
-
this.
|
|
3887
|
-
this.loadError = false;
|
|
3886
|
+
this.innerLoading = true;
|
|
3887
|
+
this.loadError = false;
|
|
3888
3888
|
this.videoWidth = 0;
|
|
3889
3889
|
this.videoHeight = 0;
|
|
3890
3890
|
this.duration = "00:00";
|
|
3891
3891
|
this.resetZoom();
|
|
3892
|
+
|
|
3893
|
+
// 显式调用 load() 确保浏览器触发资源请求
|
|
3894
|
+
this.$nextTick(() => {
|
|
3895
|
+
if (this.$refs.videoPlayer) {
|
|
3896
|
+
this.$refs.videoPlayer.load();
|
|
3897
|
+
}
|
|
3898
|
+
});
|
|
3892
3899
|
},
|
|
3893
3900
|
onOpened() {
|
|
3894
3901
|
this.resetZoom();
|
|
@@ -3900,13 +3907,12 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3900
3907
|
this.duration = this.formatDuration(video.duration);
|
|
3901
3908
|
},
|
|
3902
3909
|
onCanPlay() {
|
|
3903
|
-
this.
|
|
3904
|
-
this.loadError = false;
|
|
3910
|
+
this.innerLoading = false;
|
|
3911
|
+
this.loadError = false;
|
|
3905
3912
|
},
|
|
3906
3913
|
onVideoError() {
|
|
3907
|
-
|
|
3908
|
-
this.
|
|
3909
|
-
this.loadError = true; // 触发错误展示
|
|
3914
|
+
this.innerLoading = false;
|
|
3915
|
+
this.loadError = true;
|
|
3910
3916
|
},
|
|
3911
3917
|
formatDuration(seconds) {
|
|
3912
3918
|
if (!seconds) return "00:00";
|
|
@@ -3914,12 +3920,13 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3914
3920
|
const sec = Math.floor(seconds % 60);
|
|
3915
3921
|
return `${min.toString().padStart(2, "0")}:${sec.toString().padStart(2, "0")}`;
|
|
3916
3922
|
},
|
|
3917
|
-
// ... 其他方法 (zoomIn, zoomOut, handleWheel, startDrag 等保持不变) ...
|
|
3918
3923
|
zoomIn() {
|
|
3924
|
+
if (this.combinedLoading) return; // 加载中禁止缩放
|
|
3919
3925
|
if (this.scale < this.maxScale)
|
|
3920
3926
|
this.scale = parseFloat((this.scale + 0.2).toFixed(1));
|
|
3921
3927
|
},
|
|
3922
3928
|
zoomOut() {
|
|
3929
|
+
if (this.combinedLoading) return; // 加载中禁止缩放
|
|
3923
3930
|
if (this.scale > this.minScale)
|
|
3924
3931
|
this.scale = parseFloat((this.scale - 0.2).toFixed(1));
|
|
3925
3932
|
},
|
|
@@ -3929,6 +3936,7 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3929
3936
|
this.translateY = 0;
|
|
3930
3937
|
},
|
|
3931
3938
|
handleWheel(e) {
|
|
3939
|
+
if (this.combinedLoading) return;
|
|
3932
3940
|
const delta = e.deltaY > 0 ? -0.1 : 0.1;
|
|
3933
3941
|
const newScale = parseFloat((this.scale + delta).toFixed(1));
|
|
3934
3942
|
if (newScale >= this.minScale && newScale <= this.maxScale) {
|
|
@@ -3936,8 +3944,9 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3936
3944
|
}
|
|
3937
3945
|
},
|
|
3938
3946
|
startDrag(e) {
|
|
3947
|
+
if (this.combinedLoading) return; // 加载中禁止拖拽
|
|
3939
3948
|
if (e.target.tagName === "VIDEO" && e.offsetY > e.target.offsetHeight - 50) return;
|
|
3940
|
-
if (e.button !== 0
|
|
3949
|
+
if (e.button !== 0) return;
|
|
3941
3950
|
this.isDragging = true;
|
|
3942
3951
|
this.hasMoved = false;
|
|
3943
3952
|
this.startMousePos = { x: e.clientX, y: e.clientY };
|
|
@@ -3971,7 +3980,7 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3971
3980
|
},
|
|
3972
3981
|
handleKeyDown(e) {
|
|
3973
3982
|
if (e.key === "Escape") this.closePreview();
|
|
3974
|
-
if (e.key === " ") {
|
|
3983
|
+
if (e.key === " " && !this.combinedLoading) {
|
|
3975
3984
|
e.preventDefault();
|
|
3976
3985
|
const v = this.$refs.videoPlayer;
|
|
3977
3986
|
if (v) v.paused ? v.play() : v.pause();
|
|
@@ -3987,8 +3996,8 @@ var VideoPreviewDialogvue_type_template_id_419a04c7_scoped_true_staticRenderFns
|
|
|
3987
3996
|
|
|
3988
3997
|
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=script&lang=js
|
|
3989
3998
|
/* harmony default export */ var components_VideoPreviewDialogvue_type_script_lang_js = (VideoPreviewDialogvue_type_script_lang_js);
|
|
3990
|
-
// EXTERNAL MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=style&index=0&id=
|
|
3991
|
-
var
|
|
3999
|
+
// EXTERNAL MODULE: ./src/components/VideoPreviewDialog/index.vue?vue&type=style&index=0&id=3f692c5e&prod&lang=scss&scoped=true
|
|
4000
|
+
var VideoPreviewDialogvue_type_style_index_0_id_3f692c5e_prod_lang_scss_scoped_true = __webpack_require__("a888");
|
|
3992
4001
|
|
|
3993
4002
|
// CONCATENATED MODULE: ./src/components/VideoPreviewDialog/index.vue
|
|
3994
4003
|
|
|
@@ -4001,11 +4010,11 @@ var VideoPreviewDialogvue_type_style_index_0_id_419a04c7_prod_lang_scss_scoped_t
|
|
|
4001
4010
|
|
|
4002
4011
|
var VideoPreviewDialog_component = normalizeComponent(
|
|
4003
4012
|
components_VideoPreviewDialogvue_type_script_lang_js,
|
|
4004
|
-
|
|
4005
|
-
|
|
4013
|
+
VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_render,
|
|
4014
|
+
VideoPreviewDialogvue_type_template_id_3f692c5e_scoped_true_staticRenderFns,
|
|
4006
4015
|
false,
|
|
4007
4016
|
null,
|
|
4008
|
-
"
|
|
4017
|
+
"3f692c5e",
|
|
4009
4018
|
null
|
|
4010
4019
|
|
|
4011
4020
|
)
|
|
@@ -4051,6 +4060,17 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
4051
4060
|
|
|
4052
4061
|
|
|
4053
4062
|
|
|
4063
|
+
/***/ }),
|
|
4064
|
+
|
|
4065
|
+
/***/ "fe0b":
|
|
4066
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4067
|
+
|
|
4068
|
+
"use strict";
|
|
4069
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_7af8297e_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("498d");
|
|
4070
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_7af8297e_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_7af8297e_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
4071
|
+
/* unused harmony reexport * */
|
|
4072
|
+
|
|
4073
|
+
|
|
4054
4074
|
/***/ })
|
|
4055
4075
|
|
|
4056
4076
|
/******/ });
|