xt-element-ui 2.2.1 → 2.2.3
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 +1 -1
- package/docs/README.md +10 -3
- package/docs/components/base/xt-button.md +11 -4
- package/docs/components/base/xt-card.md +5 -11
- package/docs/components/base/xt-config-provider.md +2 -0
- package/docs/components/base/xt-date-picker.md +7 -26
- package/docs/components/base/xt-flow.md +404 -0
- package/docs/components/base/xt-grid-box.md +34 -34
- package/docs/components/base/xt-multi.md +5 -5
- package/docs/components/base/xt-tabs.md +51 -6
- package/docs/components/base/xt-text.md +20 -3
- package/docs/components/business/xt-chart.md +1 -0
- package/lib/css/1.87a493be.css +1 -0
- package/lib/index.common.1.js +294 -0
- package/lib/index.common.2.js +141 -0
- package/lib/index.common.js +12125 -118823
- package/lib/index.css +1 -1
- package/lib/index.umd.1.js +294 -0
- package/lib/index.umd.2.js +141 -0
- package/lib/index.umd.js +12131 -118828
- package/lib/index.umd.min.1.js +1 -0
- package/lib/index.umd.min.2.js +1 -0
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/xt-badge.common.js +1 -1
- package/lib/xt-badge/xt-badge.css +1 -1
- package/lib/xt-badge/xt-badge.umd.js +1 -1
- package/lib/xt-button/xt-button.common.js +13 -8
- package/lib/xt-button/xt-button.css +1 -1
- package/lib/xt-button/xt-button.umd.js +13 -8
- package/lib/xt-button/xt-button.umd.min.js +1 -1
- package/lib/xt-card/xt-card.common.js +5 -5
- package/lib/xt-card/xt-card.umd.js +5 -5
- package/lib/xt-card/xt-card.umd.min.js +1 -1
- package/lib/xt-card-item/xt-card-item.common.js +4 -4
- package/lib/xt-card-item/xt-card-item.umd.js +4 -4
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -1
- package/lib/xt-chart/xt-chart.common.js +1969 -108924
- package/lib/xt-chart/xt-chart.css +1 -1
- package/lib/xt-chart/xt-chart.umd.js +1975 -108929
- package/lib/xt-chart/xt-chart.umd.min.js +1 -1
- package/lib/xt-config-provider/xt-config-provider.common.js +561 -107504
- package/lib/xt-config-provider/xt-config-provider.css +1 -1
- package/lib/xt-config-provider/xt-config-provider.umd.js +567 -107509
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -1
- package/lib/xt-date-picker/css/1.87a493be.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.1.js +294 -0
- package/lib/xt-date-picker/xt-date-picker.common.2.js +141 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +201 -332
- package/lib/xt-date-picker/xt-date-picker.css +1 -1
- package/lib/xt-date-picker/xt-date-picker.umd.1.js +294 -0
- package/lib/xt-date-picker/xt-date-picker.umd.2.js +141 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +201 -332
- package/lib/xt-date-picker/xt-date-picker.umd.min.1.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.2.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -1
- package/lib/xt-flex-box/xt-flex-box.common.js +1 -1
- package/lib/xt-flex-box/xt-flex-box.umd.js +1 -1
- package/lib/xt-flow/demo.html +10 -0
- package/lib/xt-flow/index.js +1 -0
- package/lib/xt-flow/xt-flow.common.js +638 -0
- package/lib/xt-flow/xt-flow.css +1 -0
- package/lib/xt-flow/xt-flow.umd.js +648 -0
- package/lib/xt-flow/xt-flow.umd.min.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +1 -1
- package/lib/xt-form-schema/xt-form-schema.umd.js +1 -1
- package/lib/xt-grid-box/xt-grid-box.common.js +1 -1
- package/lib/xt-grid-box/xt-grid-box.umd.js +1 -1
- package/lib/xt-grid-item/xt-grid-item.common.js +1 -1
- package/lib/xt-grid-item/xt-grid-item.umd.js +1 -1
- package/lib/xt-icon/xt-icon.common.js +1 -1
- package/lib/xt-icon/xt-icon.umd.js +1 -1
- package/lib/xt-input/xt-input.common.js +1 -1
- package/lib/xt-input/xt-input.umd.js +1 -1
- package/lib/xt-list/xt-list.common.js +1 -1
- package/lib/xt-list/xt-list.umd.js +1 -1
- package/lib/xt-map/xt-map.common.js +1 -1
- package/lib/xt-map/xt-map.umd.js +1 -1
- package/lib/xt-map-provider/xt-map-provider.common.js +1 -1
- package/lib/xt-map-provider/xt-map-provider.umd.js +1 -1
- package/lib/xt-page/xt-page.common.js +1 -1
- package/lib/xt-page/xt-page.umd.js +1 -1
- package/lib/xt-progress/xt-progress.common.js +1 -1
- package/lib/xt-progress/xt-progress.umd.js +1 -1
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +1 -1
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +1 -1
- package/lib/xt-select-tree/xt-select-tree.common.js +1 -1
- package/lib/xt-select-tree/xt-select-tree.umd.js +1 -1
- package/lib/xt-step-price/xt-step-price.common.js +2 -2
- package/lib/xt-step-price/xt-step-price.umd.js +2 -2
- package/lib/xt-step-price-item/xt-step-price-item.common.js +1 -1
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +1 -1
- package/lib/xt-tab-pane/xt-tab-pane.common.js +1 -1
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +1 -1
- package/lib/xt-table/xt-table.common.js +2 -2
- package/lib/xt-table/xt-table.umd.js +2 -2
- package/lib/xt-tabs/xt-tabs.common.js +5 -27
- package/lib/xt-tabs/xt-tabs.css +1 -1
- package/lib/xt-tabs/xt-tabs.umd.js +5 -27
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -1
- package/lib/xt-text/xt-text.common.js +7 -4
- package/lib/xt-text/xt-text.css +1 -1
- package/lib/xt-text/xt-text.umd.js +7 -4
- package/lib/xt-text/xt-text.umd.min.js +1 -1
- package/lib/xt-time/xt-time.common.js +1 -1
- package/lib/xt-time/xt-time.umd.js +1 -1
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +1 -1
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +1 -1
- package/lib/xt-upload/xt-upload.common.js +11 -11
- package/lib/xt-upload/xt-upload.umd.js +12 -12
- package/lib/xt-upload/xt-upload.umd.min.js +1 -1
- package/package.json +5 -6
- package/src/components/index.scss +7 -1
- package/src/components/xt-badge/style/index.scss +6 -6
- package/src/components/xt-button/index.vue +11 -6
- package/src/components/xt-button/style/index.scss +7 -5
- package/src/components/xt-card/index.vue +3 -3
- package/src/components/xt-card-item/index.vue +2 -2
- package/src/components/xt-chart/XtMulti.vue +8 -18
- package/src/components/xt-chart/XtPie.vue +1 -0
- package/src/components/xt-chart/utils.js +84 -50
- package/src/components/xt-config-provider/index.vue +56 -54
- package/src/components/xt-date-picker/component/Picker.vue +2 -46
- package/src/components/xt-date-picker/component/RangeDate.vue +4 -4
- package/src/components/xt-date-picker/index.js +1 -0
- package/src/components/xt-date-picker/index.vue +3 -23
- package/src/components/xt-date-picker/style/index.scss +62 -0
- package/src/components/xt-flow/flowable-parser.js +244 -0
- package/src/components/xt-flow/index.js +8 -0
- package/src/components/xt-flow/index.vue +226 -0
- package/src/components/xt-flow/style/index.scss +359 -0
- package/src/components/xt-input/style/index.scss +1 -1
- package/src/components/xt-tabs/index.vue +3 -174
- package/src/components/xt-tabs/style/index.scss +131 -121
- package/src/components/xt-text/index.vue +5 -2
- package/src/components/xt-text/style/index.scss +6 -6
- package/src/index.js +8 -13
- package/src/styles/css-variables.scss +73 -1
- package/src/styles/theme/index.scss +0 -1
- package/src/styles/theme/dark-variables.scss +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
3
|
module.exports = factory(require("vue"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
5
|
+
define(["vue"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
7
|
exports["xt-upload"] = factory(require("vue"));
|
|
8
8
|
else
|
|
@@ -147,7 +147,7 @@ if (typeof window !== 'undefined') {
|
|
|
147
147
|
// Indicate to webpack that this file can be concatenated
|
|
148
148
|
/* harmony default export */ var setPublicPath = (null);
|
|
149
149
|
|
|
150
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
150
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d8e97dbc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/index.vue?vue&type=template&id=03e2de58
|
|
151
151
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('XtFlexBox',{attrs:{"type":"inline-flex","gap":"5px"}},[(_vm.action)?_c('el-upload',{ref:"uploadFile",attrs:{"disabled":_vm.disabled || _vm.uploading,"action":_vm.YSSQP + _vm.action,"file-list":_vm.fileList,"data":{accessToken: _vm.accessToken,..._vm.data},"multiple":_vm.multiple,"limit":_vm.limit,"on-success":_vm.uploadSuccess,"show-file-list":false,"auto-upload":_vm.autoUpload,"before-upload":_vm.uploadBefore,"accept":_vm.accept}},[_c('span',{staticStyle:{"font-size":"20px","padding":"20px","background":"#f0f0f1","color":"#409EFF"},style:({padding: _vm.plusPx / 2 + 'px',cursor:_vm.disabled ? 'not-allowed':'pointer'})},[_vm._t("default",function(){return [_c('i',{class:_vm.icon})]})],2)]):_vm._e(),(_vm.fileList!==null&&_vm.fileList.length>0)?_c('XtFlexBox',{staticClass:"el-upload-list el-upload-list--picture-card",staticStyle:{"flex":"1"},attrs:{"gap":"5px","wrap":"wrap"}},_vm._l((_vm.fileList),function(ite,index){return _c('li',{key:index,staticClass:"el-upload-list__item is-ready",staticStyle:{"margin":"0","width":"62px","height":"62px"},style:({ width: (_vm.plusPx + 22)+ 'px',height: (_vm.plusPx + 22)+ 'px'})},[_c('el-image',{staticClass:"el-upload-list__item-thumbnail",attrs:{"src":_vm.YSSQP+'/'+ite,"alt":""},on:{"click":_vm.clickHandler}}),_c('span',{staticClass:"el-upload-list__item-actions",on:{"click":function($event){return _vm.preShowPicture(ite, index)}}},[_c('span',{staticClass:"el-upload-list__item-preview",on:{"click":function($event){$event.stopPropagation();return _vm.preShowPicture(ite, index)}}},[_c('i',{staticClass:"el-icon-zoom-in"})]),(!_vm.uploading&&!_vm.disabled)?_c('span',{staticClass:"el-upload-list__item-delete",staticStyle:{"margin-left":"0"},on:{"click":function($event){$event.stopPropagation();return _vm.handleRemove(index)}}},[_c('i',{staticClass:"el-icon-delete"})]):_vm._e()])],1)}),0):_vm._e(),(_vm.preview)?[(_vm.previewVisible)?_c('ImageViewer',{attrs:{"z-index":3000,"base-url":_vm.baseUrl + '/',"infiniteLoop":false,"initial-index":_vm.imageIndex,"url-list":_vm.allFileList || _vm.fileList,"on-close":_vm.closeViewer}}):_vm._e()]:_vm._e()],2)
|
|
152
152
|
}
|
|
153
153
|
var staticRenderFns = []
|
|
@@ -155,7 +155,7 @@ var staticRenderFns = []
|
|
|
155
155
|
|
|
156
156
|
// CONCATENATED MODULE: ./src/components/xt-upload/index.vue?vue&type=template&id=03e2de58
|
|
157
157
|
|
|
158
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
158
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d8e97dbc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/preview.vue?vue&type=template&id=236adf7f&scoped=true
|
|
159
159
|
var previewvue_type_template_id_236adf7f_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('transition',{attrs:{"name":"viewer-fade"}},[_c('div',{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:({ 'z-index': _vm.zIndex }),attrs:{"tabindex":"-1"}},[_c('div',{staticClass:"el-image-viewer__mask",on:{"click":_vm.hide}}),_c('span',{staticClass:"el-image-viewer__btn fix_close",on:{"click":_vm.hide}},[_c('i',{staticClass:"el-icon-close"})]),(!_vm.isSingle)?[_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{ 'is-disabled': !_vm.infinite && _vm.isFirst },on:{"click":_vm.prev}},[_c('i',{staticClass:"el-icon-arrow-left"})]),_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{ 'is-disabled': !_vm.infinite && _vm.isLast },on:{"click":_vm.next}},[_c('i',{staticClass:"el-icon-arrow-right"})])]:_vm._e(),_c('div',{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[_c('div',{staticClass:"el-image-viewer__actions__inner"},[_c('i',{staticClass:"el-icon-zoom-out",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('zoomOut')}}}),_c('i',{staticClass:"el-icon-zoom-in",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('zoomIn')}}}),_c('i',{staticClass:"el-image-viewer__actions__divider"}),_c('i',{class:_vm.mode.icon,on:{"click":function($event){$event.stopPropagation();return _vm.toggleMode.apply(null, arguments)}}}),_c('i',{staticClass:"el-image-viewer__actions__divider"}),_c('i',{staticClass:"el-icon-refresh-left",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('anticlocelise')}}}),_c('i',{staticClass:"el-icon-refresh-right",on:{"click":function($event){$event.stopPropagation();return _vm.handleActions('clocelise')}}})])]),_c('div',{staticClass:"el-image-viewer__canvas"},_vm._l((_vm.urlList),function(url,i){return (i === _vm.index)?_c('img',{key:url,ref:"img",refInFor:true,staticClass:"el-image-viewer__img",style:(_vm.imgStyle),attrs:{"src":_vm.currentImg},on:{"load":_vm.handleImgLoad,"error":_vm.handleImgError,"mousedown":_vm.handleMouseDown}}):_vm._e()}),0)],2)])
|
|
160
160
|
}
|
|
161
161
|
var previewvue_type_template_id_236adf7f_scoped_true_staticRenderFns = []
|
|
@@ -163,16 +163,16 @@ var previewvue_type_template_id_236adf7f_scoped_true_staticRenderFns = []
|
|
|
163
163
|
|
|
164
164
|
// CONCATENATED MODULE: ./src/components/xt-upload/preview.vue?vue&type=template&id=236adf7f&scoped=true
|
|
165
165
|
|
|
166
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
167
|
-
var
|
|
168
|
-
var
|
|
166
|
+
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","amd":"vue","root":"Vue"}
|
|
167
|
+
var external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
168
|
+
var external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_);
|
|
169
169
|
|
|
170
170
|
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/dom.js
|
|
171
171
|
/* istanbul ignore next */
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
|
|
175
|
-
const isServer =
|
|
175
|
+
const isServer = external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer;
|
|
176
176
|
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
|
177
177
|
const MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
|
178
178
|
const ieVersion = isServer ? 0 : Number(document.documentMode);
|
|
@@ -420,7 +420,7 @@ let isFunction = (functionToCheck) => {
|
|
|
420
420
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
421
421
|
};
|
|
422
422
|
|
|
423
|
-
if ( true && typeof Int8Array !== 'object' && (
|
|
423
|
+
if ( true && typeof Int8Array !== 'object' && (external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
|
|
424
424
|
isFunction = function(obj) {
|
|
425
425
|
return typeof obj === 'function' || false;
|
|
426
426
|
};
|
|
@@ -554,15 +554,15 @@ const coerceTruthyValueToArray = function(val) {
|
|
|
554
554
|
};
|
|
555
555
|
|
|
556
556
|
const isIE = function() {
|
|
557
|
-
return !
|
|
557
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
558
558
|
};
|
|
559
559
|
|
|
560
560
|
const isEdge = function() {
|
|
561
|
-
return !
|
|
561
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
|
562
562
|
};
|
|
563
563
|
|
|
564
564
|
const isFirefox = function() {
|
|
565
|
-
return !
|
|
565
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
566
566
|
};
|
|
567
567
|
|
|
568
568
|
const autoprefixer = function(style) {
|
|
@@ -680,7 +680,7 @@ function objToArray(obj) {
|
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
const isMac = function() {
|
|
683
|
-
return !
|
|
683
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
|
|
684
684
|
};
|
|
685
685
|
|
|
686
686
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-upload/preview.vue?vue&type=script&lang=js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-upload"]=t(require("vue")):e["xt-upload"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({"2c86":function(e,t,i){"use strict";i("6d33")},"6d33":function(e,t,i){},"8bbf":function(t,i){t.exports=e},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"XtUpload",(function(){return I})),"undefined"!==typeof window){var n=window.document.currentScript,s=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}var o=function(){var e=this,t=e._self._c;return t("XtFlexBox",{attrs:{type:"inline-flex",gap:"5px"}},[e.action?t("el-upload",{ref:"uploadFile",attrs:{disabled:e.disabled||e.uploading,action:e.YSSQP+e.action,"file-list":e.fileList,data:{accessToken:e.accessToken,...e.data},multiple:e.multiple,limit:e.limit,"on-success":e.uploadSuccess,"show-file-list":!1,"auto-upload":e.autoUpload,"before-upload":e.uploadBefore,accept:e.accept}},[t("span",{staticStyle:{"font-size":"20px",padding:"20px",background:"#f0f0f1",color:"#409EFF"},style:{padding:e.plusPx/2+"px",cursor:e.disabled?"not-allowed":"pointer"}},[e._t("default",(function(){return[t("i",{class:e.icon})]}))],2)]):e._e(),null!==e.fileList&&e.fileList.length>0?t("XtFlexBox",{staticClass:"el-upload-list el-upload-list--picture-card",staticStyle:{flex:"1"},attrs:{gap:"5px",wrap:"wrap"}},e._l(e.fileList,(function(i,n){return t("li",{key:n,staticClass:"el-upload-list__item is-ready",staticStyle:{margin:"0",width:"62px",height:"62px"},style:{width:e.plusPx+22+"px",height:e.plusPx+22+"px"}},[t("el-image",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e.YSSQP+"/"+i,alt:""},on:{click:e.clickHandler}}),t("span",{staticClass:"el-upload-list__item-actions",on:{click:function(t){return e.preShowPicture(i,n)}}},[t("span",{staticClass:"el-upload-list__item-preview",on:{click:function(t){return t.stopPropagation(),e.preShowPicture(i,n)}}},[t("i",{staticClass:"el-icon-zoom-in"})]),e.uploading||e.disabled?e._e():t("span",{staticClass:"el-upload-list__item-delete",staticStyle:{"margin-left":"0"},on:{click:function(t){return t.stopPropagation(),e.handleRemove(n)}}},[t("i",{staticClass:"el-icon-delete"})])])],1)})),0):e._e(),e.preview?[e.previewVisible?t("ImageViewer",{attrs:{"z-index":3e3,"base-url":e.baseUrl+"/",infiniteLoop:!1,"initial-index":e.imageIndex,"url-list":e.allFileList||e.fileList,"on-close":e.closeViewer}}):e._e()]:e._e()],2)},a=[],r=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"viewer-fade"}},[t("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.zIndex},attrs:{tabindex:"-1"}},[t("div",{staticClass:"el-image-viewer__mask",on:{click:e.hide}}),t("span",{staticClass:"el-image-viewer__btn fix_close",on:{click:e.hide}},[t("i",{staticClass:"el-icon-close"})]),e.isSingle?e._e():[t("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[t("i",{staticClass:"el-icon-arrow-left"})]),t("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[t("i",{staticClass:"el-icon-arrow-right"})])],t("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[t("div",{staticClass:"el-image-viewer__actions__inner"},[t("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){return t.stopPropagation(),e.handleActions("zoomOut")}}}),t("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){return t.stopPropagation(),e.handleActions("zoomIn")}}}),t("i",{staticClass:"el-image-viewer__actions__divider"}),t("i",{class:e.mode.icon,on:{click:function(t){return t.stopPropagation(),e.toggleMode.apply(null,arguments)}}}),t("i",{staticClass:"el-image-viewer__actions__divider"}),t("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){return t.stopPropagation(),e.handleActions("anticlocelise")}}}),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return t.stopPropagation(),e.handleActions("clocelise")}}})])]),t("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,(function(i,n){return n===e.index?t("img",{key:i,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)])},l=[],c=i("8bbf"),d=i.n(c);const u=d.a.prototype.$isServer,p=(u||Number(document.documentMode),function(){return!u&&document.addEventListener?function(e,t,i){e&&t&&i&&e.addEventListener(t,i,!1)}:function(e,t,i){e&&t&&i&&e.attachEvent("on"+t,i)}}()),f=function(){return!u&&document.removeEventListener?function(e,t,i){e&&t&&e.removeEventListener(t,i,!1)}:function(e,t,i){e&&t&&e.detachEvent("on"+t,i)}}();let h=e=>{var t={};return e&&"[object Function]"===t.toString.call(e)};"object"===typeof Int8Array||!d.a.prototype.$isServer&&"function"===typeof document.childNodes||(h=function(e){return"function"===typeof e||!1});Object.prototype.hasOwnProperty;const m=function(){return!d.a.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function g(e){let t=!1;return function(...i){t||(t=!0,window.requestAnimationFrame(n=>{e.apply(this,i),t=!1}))}}const _={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},v=m()?"DOMMouseScroll":"mousewheel";var y={name:"elImageViewer",props:{baseUrl:{type:String,default:""},urlList:{type:Array,default:()=>[]},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}},initialIndex:{type:Number,default:0},infiniteLoop:{type:Boolean,default:!0}},data(){return{index:this.initialIndex,isShow:!1,infinite:this.infiniteLoop,loading:!1,mode:_.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle(){return this.urlList.length<=1},isFirst(){return 0===this.index},isLast(){return this.index===this.urlList.length-1},currentImg(){return this.baseUrl+this.urlList[this.index]},imgStyle(){const{scale:e,deg:t,offsetX:i,offsetY:n,enableTransition:s}=this.transform,o={transform:`scale(${1*e}) rotate(${t}deg)`,transition:s?"transform .3s":"","margin-left":i+"px","margin-top":n+"px"};return this.mode===_.CONTAIN&&(o.maxWidth=o.maxHeight="80%"),o}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg(e){this.$nextTick(e=>{const t=this.$refs.img[0];t.complete||(this.loading=!0)})}},methods:{hide(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall(){this._keyDownHandler=g(e=>{const t=e.keyCode;switch(t){case 27:this.hide();break;case 32:this.toggleMode();break;case 37:this.prev();break;case 38:this.handleActions("zoomIn");break;case 39:this.next();break;case 40:this.handleActions("zoomOut");break}}),this._mouseWheelHandler=g(e=>{const t=e.wheelDelta?e.wheelDelta:-e.detail;t>0?this.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):this.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),p(document,"keydown",this._keyDownHandler),p(document,v,this._mouseWheelHandler)},deviceSupportUninstall(){f(document,"keydown",this._keyDownHandler),f(document,v,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad(e){this.loading=!1},handleImgError(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown(e){if(this.loading||0!==e.button)return;const{offsetX:t,offsetY:i}=this.transform,n=e.pageX,s=e.pageY;this._dragHandler=g(e=>{this.transform.offsetX=t+e.pageX-n,this.transform.offsetY=i+e.pageY-s}),p(document,"mousemove",this._dragHandler),p(document,"mouseup",e=>{f(document,"mousemove",this._dragHandler)}),e.preventDefault()},reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode(){if(this.loading)return;const e=Object.keys(_),t=Object.values(_),i=t.indexOf(this.mode),n=(i+1)%e.length;this.mode=_[e[n]],this.reset()},prev(){if(this.isFirst&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index-1+e)%e},next(){if(this.isLast&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index+1)%e},handleActions(e,t={}){if(this.loading)return;const{zoomRate:i,rotateDeg:n,enableTransition:s}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...t},{transform:o}=this;switch(e){case"zoomOut":o.scale>.2&&(o.scale=parseFloat((o.scale-i).toFixed(3)));break;case"zoomIn":o.scale<10&&(o.scale=parseFloat((o.scale+i).toFixed(3)));break;case"clocelise":o.deg+=n;break;case"anticlocelise":o.deg-=n;break}o.enableTransition=s}},mounted(){this.deviceSupportInstall(),this.$refs["el-image-viewer__wrapper"].focus()}},b=y;i("2c86");function w(e,t,i,n,s,o,a,r){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):s&&(l=r?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var x=w(b,r,l,!1,null,"236adf7f",null),S=x.exports,k={name:"XtUpload",components:{ImageViewer:S},model:{prop:"src",event:"change"},props:{data:{type:Object,default:()=>({})},src:{type:String,default:"",required:!0},accessToken:{type:String,default:""},autoUpload:{type:Boolean,default:!0},action:{type:String,default:""},baseUrl:{type:String,default:""},multiple:{type:Boolean,default:!1},accept:{type:String,default:".jpg,.jpeg,.png"},limit:{type:Number,default:5},disabled:{type:Boolean,default:!1},size:{type:String,default:""},beforeEmitData:{type:Function,default:(e,t,i)=>200==e.code&&(e.data.Result?e.data.Data:e.data[0])},allFileList:{type:Array},icon:{type:String,default:"el-icon-camera"}},data(){return{YSSQP:this.baseUrl,previewVisible:!1,uploading:!1,imageUrl:"",fileList:[],imageIndex:0}},computed:{preview(){const{fileList:e}=this;return Array.isArray(e)&&e.length>0},plusPx(){const e="big"==this.size?100:20;return 2*e}},watch:{src:{immediate:!0,deep:!0,handler(e){this.fileList=e?e.split(","):[]}}},methods:{clickHandler(){this.preview&&(this.previewVisible=!0)},closeViewer(){this.previewVisible=!1},preShowPicture(e,t){if(this.allFileList&&0!=this.allFileList.length){const i=this.allFileList.findIndex(t=>t==e);this.imageIndex=i>-1?i:t}else this.imageIndex=t;e.indexOf(".pdf")>-1?window.open(e,"_blank"):(this.imageUrl=this.baseUrl+"/"+e,this.previewVisible=!0)},handleRemove(e,t){try{this.fileList.splice(e,1),this.$emit("change",this.fileList.join(","))}catch(i){console.log(i)}},getPathName(e){return e.split("/").pop().split(".")[0]},uploadBefore(e,t){console.log(e);const i="image/jpeg"===e.type||"image/jpg"===e.type||"image/png"===e.type||"application/pdf"===e.type,n=e.size/1024/1024<50;return i||this.$message.error("上传图片只能是jpg,jpeg,png,pdf格式!"),n||this.$message.error("上传图片大小不能超过50MB!"),i&&n},uploadSuccess(e,t,i){const n=this.beforeEmitData(e,t,i);if(n)return this.fileList.push(n),this.$emit("change",this.fileList.join(",")),this.$message({message:"上传成功",center:!0,type:"success"}),e.data[0];this.$message({message:"上传失败",center:!0,type:"error"})}}},C=k,L=w(C,o,a,!1,null,null,null),I=L.exports;I.install=function(e){e.component(I.name,I)};var j=I;t["default"]=j}})}));
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):"object"===typeof exports?exports["xt-upload"]=t(require("vue")):e["xt-upload"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({"2c86":function(e,t,i){"use strict";i("6d33")},"6d33":function(e,t,i){},"8bbf":function(t,i){t.exports=e},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"XtUpload",(function(){return I})),"undefined"!==typeof window){var n=window.document.currentScript,s=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}var o=function(){var e=this,t=e._self._c;return t("XtFlexBox",{attrs:{type:"inline-flex",gap:"5px"}},[e.action?t("el-upload",{ref:"uploadFile",attrs:{disabled:e.disabled||e.uploading,action:e.YSSQP+e.action,"file-list":e.fileList,data:{accessToken:e.accessToken,...e.data},multiple:e.multiple,limit:e.limit,"on-success":e.uploadSuccess,"show-file-list":!1,"auto-upload":e.autoUpload,"before-upload":e.uploadBefore,accept:e.accept}},[t("span",{staticStyle:{"font-size":"20px",padding:"20px",background:"#f0f0f1",color:"#409EFF"},style:{padding:e.plusPx/2+"px",cursor:e.disabled?"not-allowed":"pointer"}},[e._t("default",(function(){return[t("i",{class:e.icon})]}))],2)]):e._e(),null!==e.fileList&&e.fileList.length>0?t("XtFlexBox",{staticClass:"el-upload-list el-upload-list--picture-card",staticStyle:{flex:"1"},attrs:{gap:"5px",wrap:"wrap"}},e._l(e.fileList,(function(i,n){return t("li",{key:n,staticClass:"el-upload-list__item is-ready",staticStyle:{margin:"0",width:"62px",height:"62px"},style:{width:e.plusPx+22+"px",height:e.plusPx+22+"px"}},[t("el-image",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e.YSSQP+"/"+i,alt:""},on:{click:e.clickHandler}}),t("span",{staticClass:"el-upload-list__item-actions",on:{click:function(t){return e.preShowPicture(i,n)}}},[t("span",{staticClass:"el-upload-list__item-preview",on:{click:function(t){return t.stopPropagation(),e.preShowPicture(i,n)}}},[t("i",{staticClass:"el-icon-zoom-in"})]),e.uploading||e.disabled?e._e():t("span",{staticClass:"el-upload-list__item-delete",staticStyle:{"margin-left":"0"},on:{click:function(t){return t.stopPropagation(),e.handleRemove(n)}}},[t("i",{staticClass:"el-icon-delete"})])])],1)})),0):e._e(),e.preview?[e.previewVisible?t("ImageViewer",{attrs:{"z-index":3e3,"base-url":e.baseUrl+"/",infiniteLoop:!1,"initial-index":e.imageIndex,"url-list":e.allFileList||e.fileList,"on-close":e.closeViewer}}):e._e()]:e._e()],2)},a=[],r=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"viewer-fade"}},[t("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.zIndex},attrs:{tabindex:"-1"}},[t("div",{staticClass:"el-image-viewer__mask",on:{click:e.hide}}),t("span",{staticClass:"el-image-viewer__btn fix_close",on:{click:e.hide}},[t("i",{staticClass:"el-icon-close"})]),e.isSingle?e._e():[t("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[t("i",{staticClass:"el-icon-arrow-left"})]),t("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[t("i",{staticClass:"el-icon-arrow-right"})])],t("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[t("div",{staticClass:"el-image-viewer__actions__inner"},[t("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){return t.stopPropagation(),e.handleActions("zoomOut")}}}),t("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){return t.stopPropagation(),e.handleActions("zoomIn")}}}),t("i",{staticClass:"el-image-viewer__actions__divider"}),t("i",{class:e.mode.icon,on:{click:function(t){return t.stopPropagation(),e.toggleMode.apply(null,arguments)}}}),t("i",{staticClass:"el-image-viewer__actions__divider"}),t("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){return t.stopPropagation(),e.handleActions("anticlocelise")}}}),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return t.stopPropagation(),e.handleActions("clocelise")}}})])]),t("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,(function(i,n){return n===e.index?t("img",{key:i,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)])},l=[],c=i("8bbf"),d=i.n(c);const u=d.a.prototype.$isServer,p=(u||Number(document.documentMode),function(){return!u&&document.addEventListener?function(e,t,i){e&&t&&i&&e.addEventListener(t,i,!1)}:function(e,t,i){e&&t&&i&&e.attachEvent("on"+t,i)}}()),f=function(){return!u&&document.removeEventListener?function(e,t,i){e&&t&&e.removeEventListener(t,i,!1)}:function(e,t,i){e&&t&&e.detachEvent("on"+t,i)}}();let h=e=>{var t={};return e&&"[object Function]"===t.toString.call(e)};"object"===typeof Int8Array||!d.a.prototype.$isServer&&"function"===typeof document.childNodes||(h=function(e){return"function"===typeof e||!1});Object.prototype.hasOwnProperty;const m=function(){return!d.a.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)};function g(e){let t=!1;return function(...i){t||(t=!0,window.requestAnimationFrame(n=>{e.apply(this,i),t=!1}))}}const _={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},v=m()?"DOMMouseScroll":"mousewheel";var y={name:"elImageViewer",props:{baseUrl:{type:String,default:""},urlList:{type:Array,default:()=>[]},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}},initialIndex:{type:Number,default:0},infiniteLoop:{type:Boolean,default:!0}},data(){return{index:this.initialIndex,isShow:!1,infinite:this.infiniteLoop,loading:!1,mode:_.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle(){return this.urlList.length<=1},isFirst(){return 0===this.index},isLast(){return this.index===this.urlList.length-1},currentImg(){return this.baseUrl+this.urlList[this.index]},imgStyle(){const{scale:e,deg:t,offsetX:i,offsetY:n,enableTransition:s}=this.transform,o={transform:`scale(${1*e}) rotate(${t}deg)`,transition:s?"transform .3s":"","margin-left":i+"px","margin-top":n+"px"};return this.mode===_.CONTAIN&&(o.maxWidth=o.maxHeight="80%"),o}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg(e){this.$nextTick(e=>{const t=this.$refs.img[0];t.complete||(this.loading=!0)})}},methods:{hide(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall(){this._keyDownHandler=g(e=>{const t=e.keyCode;switch(t){case 27:this.hide();break;case 32:this.toggleMode();break;case 37:this.prev();break;case 38:this.handleActions("zoomIn");break;case 39:this.next();break;case 40:this.handleActions("zoomOut");break}}),this._mouseWheelHandler=g(e=>{const t=e.wheelDelta?e.wheelDelta:-e.detail;t>0?this.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):this.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),p(document,"keydown",this._keyDownHandler),p(document,v,this._mouseWheelHandler)},deviceSupportUninstall(){f(document,"keydown",this._keyDownHandler),f(document,v,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad(e){this.loading=!1},handleImgError(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown(e){if(this.loading||0!==e.button)return;const{offsetX:t,offsetY:i}=this.transform,n=e.pageX,s=e.pageY;this._dragHandler=g(e=>{this.transform.offsetX=t+e.pageX-n,this.transform.offsetY=i+e.pageY-s}),p(document,"mousemove",this._dragHandler),p(document,"mouseup",e=>{f(document,"mousemove",this._dragHandler)}),e.preventDefault()},reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode(){if(this.loading)return;const e=Object.keys(_),t=Object.values(_),i=t.indexOf(this.mode),n=(i+1)%e.length;this.mode=_[e[n]],this.reset()},prev(){if(this.isFirst&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index-1+e)%e},next(){if(this.isLast&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index+1)%e},handleActions(e,t={}){if(this.loading)return;const{zoomRate:i,rotateDeg:n,enableTransition:s}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...t},{transform:o}=this;switch(e){case"zoomOut":o.scale>.2&&(o.scale=parseFloat((o.scale-i).toFixed(3)));break;case"zoomIn":o.scale<10&&(o.scale=parseFloat((o.scale+i).toFixed(3)));break;case"clocelise":o.deg+=n;break;case"anticlocelise":o.deg-=n;break}o.enableTransition=s}},mounted(){this.deviceSupportInstall(),this.$refs["el-image-viewer__wrapper"].focus()}},b=y;i("2c86");function w(e,t,i,n,s,o,a,r){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):s&&(l=r?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var x=w(b,r,l,!1,null,"236adf7f",null),S=x.exports,k={name:"XtUpload",components:{ImageViewer:S},model:{prop:"src",event:"change"},props:{data:{type:Object,default:()=>({})},src:{type:String,default:"",required:!0},accessToken:{type:String,default:""},autoUpload:{type:Boolean,default:!0},action:{type:String,default:""},baseUrl:{type:String,default:""},multiple:{type:Boolean,default:!1},accept:{type:String,default:".jpg,.jpeg,.png"},limit:{type:Number,default:5},disabled:{type:Boolean,default:!1},size:{type:String,default:""},beforeEmitData:{type:Function,default:(e,t,i)=>200==e.code&&(e.data.Result?e.data.Data:e.data[0])},allFileList:{type:Array},icon:{type:String,default:"el-icon-camera"}},data(){return{YSSQP:this.baseUrl,previewVisible:!1,uploading:!1,imageUrl:"",fileList:[],imageIndex:0}},computed:{preview(){const{fileList:e}=this;return Array.isArray(e)&&e.length>0},plusPx(){const e="big"==this.size?100:20;return 2*e}},watch:{src:{immediate:!0,deep:!0,handler(e){this.fileList=e?e.split(","):[]}}},methods:{clickHandler(){this.preview&&(this.previewVisible=!0)},closeViewer(){this.previewVisible=!1},preShowPicture(e,t){if(this.allFileList&&0!=this.allFileList.length){const i=this.allFileList.findIndex(t=>t==e);this.imageIndex=i>-1?i:t}else this.imageIndex=t;e.indexOf(".pdf")>-1?window.open(e,"_blank"):(this.imageUrl=this.baseUrl+"/"+e,this.previewVisible=!0)},handleRemove(e,t){try{this.fileList.splice(e,1),this.$emit("change",this.fileList.join(","))}catch(i){console.log(i)}},getPathName(e){return e.split("/").pop().split(".")[0]},uploadBefore(e,t){console.log(e);const i="image/jpeg"===e.type||"image/jpg"===e.type||"image/png"===e.type||"application/pdf"===e.type,n=e.size/1024/1024<50;return i||this.$message.error("上传图片只能是jpg,jpeg,png,pdf格式!"),n||this.$message.error("上传图片大小不能超过50MB!"),i&&n},uploadSuccess(e,t,i){const n=this.beforeEmitData(e,t,i);if(n)return this.fileList.push(n),this.$emit("change",this.fileList.join(",")),this.$message({message:"上传成功",center:!0,type:"success"}),e.data[0];this.$message({message:"上传失败",center:!0,type:"error"})}}},C=k,L=w(C,o,a,!1,null,null,null),I=L.exports;I.install=function(e){e.component(I.name,I)};var j=I;t["default"]=j}})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xt-element-ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "基于 Vue 2.7 + ElementUI 的企业级组件库,提供丰富的自定义组件和扩展组件",
|
|
5
5
|
"main": "lib/index.common.js",
|
|
6
6
|
"unpkg": "lib/index.umd.min.js",
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"postinstall": "patch-package"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"vue": "^2.6.10"
|
|
18
|
+
"vue": "^2.6.10",
|
|
19
|
+
"element-ui": "^2.11.1",
|
|
20
|
+
"echarts": "^4.0.0"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
23
|
"@vue/cli-service": "~4.5.19",
|
|
@@ -38,10 +40,7 @@
|
|
|
38
40
|
"docs/README.md"
|
|
39
41
|
],
|
|
40
42
|
"dependencies": {
|
|
41
|
-
"
|
|
42
|
-
"element-ui": "^2.11.1",
|
|
43
|
-
"patch-package": "^8.0.1",
|
|
44
|
-
"vue": "^2.6.10"
|
|
43
|
+
"patch-package": "^8.0.1"
|
|
45
44
|
},
|
|
46
45
|
"keywords": [
|
|
47
46
|
"vue",
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
// Input 组件样式
|
|
13
13
|
@import './xt-input/style/index.scss';
|
|
14
14
|
|
|
15
|
+
// Date Picker 组件样式
|
|
16
|
+
@import './xt-date-picker/style/index.scss';
|
|
17
|
+
|
|
15
18
|
// FlexBox 组件样式
|
|
16
19
|
@import './xt-flex-box/style/index.scss';
|
|
17
20
|
|
|
@@ -43,4 +46,7 @@
|
|
|
43
46
|
@import './xt-badge/style/index.scss';
|
|
44
47
|
|
|
45
48
|
// ScrollArrow 组件样式
|
|
46
|
-
@import './xt-scroll-arrow/style/index.scss';
|
|
49
|
+
@import './xt-scroll-arrow/style/index.scss';
|
|
50
|
+
|
|
51
|
+
// Flow 审批流程组件样式
|
|
52
|
+
@import './xt-flow/style/index.scss';
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
color: #ffffff;
|
|
26
26
|
text-align: center;
|
|
27
27
|
white-space: nowrap;
|
|
28
|
-
background:
|
|
28
|
+
background: var(--xt-color-danger);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.xt-badge--dot .xt-badge__badge {
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.xt-badge--primary .xt-badge__badge {
|
|
45
|
-
background:
|
|
45
|
+
background: var(--xt-color-primary);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.xt-badge--success .xt-badge__badge {
|
|
49
|
-
background:
|
|
49
|
+
background: var(--xt-color-success);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.xt-badge--warning .xt-badge__badge {
|
|
53
|
-
background:
|
|
53
|
+
background: var(--xt-color-warning);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.xt-badge--danger .xt-badge__badge {
|
|
57
|
-
background:
|
|
57
|
+
background: var(--xt-color-danger);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.xt-badge--info .xt-badge__badge {
|
|
61
|
-
background:
|
|
61
|
+
background: var(--xt-color-info);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.xt-badge--hidden {
|
|
@@ -16,17 +16,17 @@ export default {
|
|
|
16
16
|
inject: {
|
|
17
17
|
xtConfig: {
|
|
18
18
|
default: () => ({
|
|
19
|
-
theme:
|
|
20
|
-
size:
|
|
21
|
-
primaryColor:
|
|
19
|
+
theme: undefined,
|
|
20
|
+
size: undefined,
|
|
21
|
+
primaryColor: undefined
|
|
22
22
|
})
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
props: {
|
|
26
26
|
type: {
|
|
27
27
|
type: String,
|
|
28
|
-
default: '
|
|
29
|
-
validator: (val) => ['
|
|
28
|
+
default: '',
|
|
29
|
+
validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
|
|
30
30
|
},
|
|
31
31
|
throttle: {
|
|
32
32
|
type: Number,
|
|
@@ -36,6 +36,10 @@ export default {
|
|
|
36
36
|
type: String,
|
|
37
37
|
default: null,
|
|
38
38
|
validator: (val) => !val || ['mini', 'small', 'medium', 'large'].includes(val)
|
|
39
|
+
},
|
|
40
|
+
square: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
data() {
|
|
@@ -51,7 +55,8 @@ export default {
|
|
|
51
55
|
buttonClasses() {
|
|
52
56
|
return [
|
|
53
57
|
`xt-button-${this.finalSize}`,
|
|
54
|
-
`xt-button-${this.type}
|
|
58
|
+
`xt-button-${this.type}`,
|
|
59
|
+
this.square ? 'is-square' : ''
|
|
55
60
|
]
|
|
56
61
|
}
|
|
57
62
|
},
|
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
font-size: var(--xt-font-size-small);
|
|
7
7
|
border: 1px solid var(--xt-border-color, #dcdfe6);
|
|
8
8
|
transition: all 0.3s;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
border: 1px solid var(--xt-border-color, #303133);
|
|
12
|
-
color: var(--xt-text-color-primary, #303133);
|
|
13
|
-
}
|
|
9
|
+
background-color: var(--xt-bg-color, #ffffff);
|
|
10
|
+
color: var(--xt-text-color-primary, #303133);
|
|
14
11
|
&-primary{
|
|
15
12
|
background-color: var(--xt-color-primary, #ffffff);
|
|
16
13
|
border-color: var(--xt-color-primary, #ffffff);
|
|
@@ -36,6 +33,11 @@
|
|
|
36
33
|
border-color: var(--xt-color-info, #ffffff);
|
|
37
34
|
color: var(--xt-color-white, #ffffff);
|
|
38
35
|
}
|
|
36
|
+
|
|
37
|
+
&.is-square{
|
|
38
|
+
padding: 12px;
|
|
39
|
+
border-radius: 0;
|
|
40
|
+
}
|
|
39
41
|
|
|
40
42
|
&:hover {
|
|
41
43
|
opacity: 0.8;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<xt-text bold size="large" v-model="value" format="thousand" :type="type" :decimals="0"></xt-text>
|
|
7
7
|
<div style="margin: 5px 0;">
|
|
8
8
|
<xt-text size="small">较昨日</xt-text>
|
|
9
|
-
<xt-text v-model="
|
|
9
|
+
<xt-text v-model="reference" format="normal" :type="diff > 0 ? 'success' : 'danger'" :suffix="diff > 0 ? '↑' : '↓'"></xt-text>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
<div style="height: 100%;">
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
title: { type: String, default: '' },
|
|
26
26
|
diff: { type: Number, default: 0 },
|
|
27
27
|
value: { type: Number, default: 0 },
|
|
28
|
-
|
|
28
|
+
reference: { type: Number, default: 0 },
|
|
29
29
|
},
|
|
30
30
|
data() {
|
|
31
31
|
return {
|
|
@@ -32,17 +32,6 @@ export default {
|
|
|
32
32
|
default: false
|
|
33
33
|
},
|
|
34
34
|
highlightKey: String,
|
|
35
|
-
config: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default() {
|
|
38
|
-
return {
|
|
39
|
-
interval: 0,
|
|
40
|
-
rotate: 0,
|
|
41
|
-
gridbottom: 40,
|
|
42
|
-
isShowthreshold: false
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
35
|
chartData: {
|
|
47
36
|
type: Array,
|
|
48
37
|
default: () => {
|
|
@@ -227,16 +216,15 @@ export default {
|
|
|
227
216
|
}
|
|
228
217
|
},
|
|
229
218
|
grid: {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
bottom:
|
|
219
|
+
left: 16,
|
|
220
|
+
right: 16,
|
|
221
|
+
top: 40,
|
|
222
|
+
bottom: 48,
|
|
223
|
+
containLabel: true
|
|
234
224
|
},
|
|
235
225
|
xAxis: {
|
|
236
226
|
type: "category",
|
|
237
|
-
axisLabel: {
|
|
238
|
-
rotate: this.config.rotate
|
|
239
|
-
},
|
|
227
|
+
axisLabel: {},
|
|
240
228
|
data: firstSeriesData.map((item) => {
|
|
241
229
|
return item[keys.label];
|
|
242
230
|
})
|
|
@@ -267,6 +255,8 @@ export default {
|
|
|
267
255
|
name: item[keys.label],
|
|
268
256
|
type: item.type || "bar",
|
|
269
257
|
avoidLabelOverlap: true,
|
|
258
|
+
areaStyle: item.areaStyle ? {} : null,
|
|
259
|
+
smooth: item.smooth ? {} : false,
|
|
270
260
|
data: seriesItems.map(it => it[keys.value]),
|
|
271
261
|
yAxisIndex: unitToYAxisIndex[item.unit || ""] != null ? unitToYAxisIndex[item.unit || ""] : 0
|
|
272
262
|
};
|
|
@@ -7,16 +7,27 @@ const themeKeys = {
|
|
|
7
7
|
"dark": themeDark
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// 品牌色映射 - 用于 ECharts 图表调色板
|
|
11
|
+
const brandColors = {
|
|
12
|
+
"water": ["#0077be", "#0099cc", "#5DB1FF", "#005C91", "#003D61"],
|
|
13
|
+
"electricity": ["#2ecc71", "#27ae60", "#5DD3B0", "#22A85A", "#167039"],
|
|
14
|
+
"gas": ["#f39c12", "#e67e22", "#F5C976", "#C28500", "#8C6000"]
|
|
15
|
+
};
|
|
16
|
+
|
|
11
17
|
let echarts = null;
|
|
18
|
+
let themesRegistered = false;
|
|
12
19
|
|
|
13
20
|
function getEcharts() {
|
|
14
21
|
if (!echarts && typeof window !== 'undefined') {
|
|
15
22
|
try {
|
|
16
23
|
echarts = require('echarts');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
|
|
25
|
+
// 主题只注册一次
|
|
26
|
+
if (!themesRegistered) {
|
|
27
|
+
for (const key in themeKeys) {
|
|
28
|
+
echarts.registerTheme(key, themeKeys[key]);
|
|
29
|
+
}
|
|
30
|
+
themesRegistered = true;
|
|
20
31
|
}
|
|
21
32
|
} catch (e) {
|
|
22
33
|
console.warn('[XtChart] echarts 加载失败:', e.message);
|
|
@@ -59,6 +70,43 @@ EchartsUtil.currentTheme = "default";
|
|
|
59
70
|
EchartsUtil.currentSize = "medium";
|
|
60
71
|
EchartsUtil.inverse = false;
|
|
61
72
|
|
|
73
|
+
// 颜色处理工具方法
|
|
74
|
+
EchartsUtil.hexToRgb = function(hex) {
|
|
75
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
76
|
+
return result ? {
|
|
77
|
+
r: parseInt(result[1], 16),
|
|
78
|
+
g: parseInt(result[2], 16),
|
|
79
|
+
b: parseInt(result[3], 16)
|
|
80
|
+
} : null;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
EchartsUtil.rgbToHex = function(r, g, b) {
|
|
84
|
+
return '#' + [r, g, b].map(x => {
|
|
85
|
+
const hex = x.toString(16);
|
|
86
|
+
return hex.length === 1 ? '0' + hex : hex;
|
|
87
|
+
}).join('');
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
EchartsUtil.lightenColor = function(hex, percent) {
|
|
91
|
+
const rgb = this.hexToRgb(hex);
|
|
92
|
+
if (!rgb) return hex;
|
|
93
|
+
const ratio = percent / 100;
|
|
94
|
+
const r = Math.round(rgb.r * (1 - ratio) + 255 * ratio);
|
|
95
|
+
const g = Math.round(rgb.g * (1 - ratio) + 255 * ratio);
|
|
96
|
+
const b = Math.round(rgb.b * (1 - ratio) + 255 * ratio);
|
|
97
|
+
return this.rgbToHex(r, g, b);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
EchartsUtil.darkenColor = function(hex, percent) {
|
|
101
|
+
const rgb = this.hexToRgb(hex);
|
|
102
|
+
if (!rgb) return hex;
|
|
103
|
+
const ratio = percent / 100;
|
|
104
|
+
const r = Math.max(0, Math.round(rgb.r * (1 - ratio)));
|
|
105
|
+
const g = Math.max(0, Math.round(rgb.g * (1 - ratio)));
|
|
106
|
+
const b = Math.max(0, Math.round(rgb.b * (1 - ratio)));
|
|
107
|
+
return this.rgbToHex(r, g, b);
|
|
108
|
+
};
|
|
109
|
+
|
|
62
110
|
EchartsUtil.EchartsUtil = {
|
|
63
111
|
backgroundColor: "transparent",
|
|
64
112
|
tooltip: {
|
|
@@ -74,42 +122,11 @@ EchartsUtil.EchartsUtil = {
|
|
|
74
122
|
}
|
|
75
123
|
},
|
|
76
124
|
grid: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bottom:
|
|
81
|
-
|
|
82
|
-
xAxis: {
|
|
83
|
-
type: "category",
|
|
84
|
-
boundaryGap: false,
|
|
85
|
-
axisTick: {
|
|
86
|
-
show: true,
|
|
87
|
-
length: 4
|
|
88
|
-
},
|
|
89
|
-
axisLabel: {
|
|
90
|
-
fontSize: 12,
|
|
91
|
-
interval: 0,
|
|
92
|
-
formatter: function(value) {
|
|
93
|
-
return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
yAxis: {
|
|
98
|
-
type: "value",
|
|
99
|
-
axisTick: {
|
|
100
|
-
show: false
|
|
101
|
-
},
|
|
102
|
-
min: null,
|
|
103
|
-
max: null,
|
|
104
|
-
axisLabel: {
|
|
105
|
-
show: false
|
|
106
|
-
},
|
|
107
|
-
splitLine: {
|
|
108
|
-
lineStyle: {
|
|
109
|
-
type: "dashed",
|
|
110
|
-
width: 1
|
|
111
|
-
}
|
|
112
|
-
}
|
|
125
|
+
left: 16,
|
|
126
|
+
right: 16,
|
|
127
|
+
top: 40,
|
|
128
|
+
bottom: 48,
|
|
129
|
+
containLabel: true
|
|
113
130
|
}
|
|
114
131
|
};
|
|
115
132
|
|
|
@@ -358,11 +375,13 @@ EchartsUtil.init = function(dom, theme, customOption, size) {
|
|
|
358
375
|
this.currentTheme = useTheme;
|
|
359
376
|
this.currentSize = useSize;
|
|
360
377
|
|
|
361
|
-
|
|
378
|
+
// 使用基础选项配置作为 option 模板
|
|
379
|
+
// 主题已通过 ec.init(dom, useTheme) 应用,这里不需要再使用 themeOption
|
|
380
|
+
let baseOption = JSON.parse(JSON.stringify(EchartsUtil.EchartsUtil));
|
|
362
381
|
// 应用字体大小配置
|
|
363
|
-
|
|
382
|
+
baseOption = this.applyFontSize(baseOption, useSize);
|
|
364
383
|
|
|
365
|
-
const option = this.mergeOptions(
|
|
384
|
+
const option = this.mergeOptions(baseOption, customOption);
|
|
366
385
|
|
|
367
386
|
const chart = ec.init(dom, useTheme);
|
|
368
387
|
chart.setOption(option, true);
|
|
@@ -401,12 +420,11 @@ EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme)
|
|
|
401
420
|
return newChart;
|
|
402
421
|
};
|
|
403
422
|
|
|
404
|
-
EchartsUtil.changeAllTheme = function(newTheme, newSize) {
|
|
423
|
+
EchartsUtil.changeAllTheme = function(newTheme, newSize, primaryColor, brand) {
|
|
405
424
|
const ec = getEcharts();
|
|
406
425
|
if (!ec || !newTheme) return;
|
|
407
426
|
|
|
408
427
|
this.currentTheme = newTheme;
|
|
409
|
-
// 如果传入了新的 size,则更新全局 size
|
|
410
428
|
if (newSize) {
|
|
411
429
|
this.currentSize = newSize;
|
|
412
430
|
}
|
|
@@ -415,7 +433,6 @@ EchartsUtil.changeAllTheme = function(newTheme, newSize) {
|
|
|
415
433
|
const dom = item.dom;
|
|
416
434
|
const chart = item.chart;
|
|
417
435
|
const customOption = item.customOption;
|
|
418
|
-
// 使用图表自己的 size,如果没有则使用全局 size
|
|
419
436
|
const useSize = item.size || EchartsUtil.currentSize;
|
|
420
437
|
|
|
421
438
|
if (chart) {
|
|
@@ -423,14 +440,31 @@ EchartsUtil.changeAllTheme = function(newTheme, newSize) {
|
|
|
423
440
|
}
|
|
424
441
|
|
|
425
442
|
const newChart = ec.init(dom, newTheme);
|
|
426
|
-
|
|
443
|
+
|
|
444
|
+
// 使用基础选项配置(EchartsUtil.EchartsUtil)作为 option 模板
|
|
445
|
+
let baseOption = JSON.parse(JSON.stringify(EchartsUtil.EchartsUtil));
|
|
446
|
+
|
|
427
447
|
// 应用字体大小配置
|
|
428
|
-
|
|
429
|
-
|
|
448
|
+
baseOption = EchartsUtil.applyFontSize(baseOption, useSize);
|
|
449
|
+
|
|
450
|
+
// 应用品牌色到图表调色板
|
|
451
|
+
if (brand && brandColors[brand]) {
|
|
452
|
+
baseOption.color = brandColors[brand];
|
|
453
|
+
} else if (primaryColor) {
|
|
454
|
+
// 如果没有品牌色但有自定义主色,生成衍生色系
|
|
455
|
+
baseOption.color = [
|
|
456
|
+
primaryColor,
|
|
457
|
+
EchartsUtil.lightenColor(primaryColor, 30),
|
|
458
|
+
EchartsUtil.lightenColor(primaryColor, 50),
|
|
459
|
+
EchartsUtil.darkenColor(primaryColor, 20),
|
|
460
|
+
EchartsUtil.darkenColor(primaryColor, 40)
|
|
461
|
+
];
|
|
462
|
+
}
|
|
430
463
|
|
|
464
|
+
const option = EchartsUtil.mergeOptions(baseOption, customOption);
|
|
465
|
+
console.log('option1', option);
|
|
431
466
|
newChart.setOption(option, true);
|
|
432
467
|
item.chart = newChart;
|
|
433
|
-
// 更新图表的 size 记录
|
|
434
468
|
item.size = useSize;
|
|
435
469
|
EchartsUtil.bindResize(newChart);
|
|
436
470
|
});
|