xt-element-ui 2.2.2 → 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-flow.md +404 -0
- package/docs/components/base/xt-multi.md +5 -5
- package/docs/components/business/xt-chart.md +1 -0
- package/lib/index.common.1.js +2 -2
- package/lib/index.common.2.js +1 -1
- package/lib/index.common.js +11462 -118010
- package/lib/index.css +1 -1
- package/lib/index.umd.1.js +2 -2
- package/lib/index.umd.2.js +1 -1
- package/lib/index.umd.js +11468 -118015
- 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/xt-date-picker.common.1.js +2 -2
- package/lib/xt-date-picker/xt-date-picker.common.2.js +1 -1
- package/lib/xt-date-picker/xt-date-picker.common.js +1 -1
- package/lib/xt-date-picker/xt-date-picker.css +1 -1
- package/lib/xt-date-picker/xt-date-picker.umd.1.js +2 -2
- package/lib/xt-date-picker/xt-date-picker.umd.2.js +1 -1
- package/lib/xt-date-picker/xt-date-picker.umd.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 +1 -1
- package/lib/xt-tabs/xt-tabs.umd.js +1 -1
- package/lib/xt-text/xt-text.common.js +1 -1
- package/lib/xt-text/xt-text.css +1 -1
- package/lib/xt-text/xt-text.umd.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 +4 -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/style/index.scss +4 -6
- 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-text/style/index.scss +6 -6
- package/src/index.js +8 -13
- package/src/styles/css-variables.scss +73 -1
|
@@ -132,7 +132,7 @@ if (typeof window !== 'undefined') {
|
|
|
132
132
|
// EXTERNAL MODULE: ./src/components/xt-text/style/index.scss
|
|
133
133
|
var style = __webpack_require__("86ae");
|
|
134
134
|
|
|
135
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
135
|
+
// 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-text/index.vue?vue&type=template&id=50bc2d50
|
|
136
136
|
var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.showTooltip && _vm.ellipsis)?_c('el-tooltip',{attrs:{"content":_vm.displayTooltipContent,"placement":_vm.tooltipPlacement,"disabled":!_vm.isOverflow,"effect":"dark"}},[_c('span',{ref:"textRef",staticClass:"xt-text",class:[
|
|
137
137
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
138
138
|
'xt-text--' + _vm.size,
|
|
@@ -123,7 +123,7 @@ if (typeof window !== 'undefined') {
|
|
|
123
123
|
// EXTERNAL MODULE: ./src/components/xt-time/style/index.scss
|
|
124
124
|
var style = __webpack_require__("6c9e");
|
|
125
125
|
|
|
126
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
126
|
+
// 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-time/index.vue?vue&type=template&id=d29acf2c
|
|
127
127
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-time",class:[
|
|
128
128
|
_vm.typeColor ? 'xt-time--' + _vm.typeColor : '',
|
|
129
129
|
'xt-time--' + _vm.size,
|
|
@@ -132,7 +132,7 @@ if (typeof window !== 'undefined') {
|
|
|
132
132
|
// EXTERNAL MODULE: ./src/components/xt-time/style/index.scss
|
|
133
133
|
var style = __webpack_require__("6c9e");
|
|
134
134
|
|
|
135
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
135
|
+
// 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-time/index.vue?vue&type=template&id=d29acf2c
|
|
136
136
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-time",class:[
|
|
137
137
|
_vm.typeColor ? 'xt-time--' + _vm.typeColor : '',
|
|
138
138
|
'xt-time--' + _vm.size,
|
|
@@ -131,7 +131,7 @@ if (typeof window !== 'undefined') {
|
|
|
131
131
|
// Indicate to webpack that this file can be concatenated
|
|
132
132
|
/* harmony default export */ var setPublicPath = (null);
|
|
133
133
|
|
|
134
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134
|
+
// 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-transfer-tree/index.vue?vue&type=template&id=561bec94&scoped=true
|
|
135
135
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-transfer-tree"},[_c('div',{staticClass:"xt-transfer-tree__panel xt-transfer-tree__source"},[_c('div',{staticClass:"xt-transfer-tree__header"},[_c('span',{staticClass:"xt-transfer-tree__title"},[_vm._v(_vm._s(_vm.leftTitle))]),_c('span',{staticClass:"xt-transfer-tree__count"},[_vm._v(_vm._s(_vm.leftCheckedCount)+"/"+_vm._s(_vm.leftTotalCount))])]),(_vm.filterable)?_c('div',{staticClass:"xt-transfer-tree__search"},[_c('el-input',{attrs:{"placeholder":"搜索","prefix-icon":"el-icon-search","size":"small"},model:{value:(_vm.leftFilterText),callback:function ($$v) {_vm.leftFilterText=$$v},expression:"leftFilterText"}})],1):_vm._e(),_c('div',{staticClass:"xt-transfer-tree__body"},[_c('el-tree',{ref:"leftTree",attrs:{"data":_vm.sourceData,"props":_vm.treeProps,"default-expand-all":_vm.defaultExpandAll,"filter-node-method":_vm.filterLeftNode,"show-checkbox":_vm.showCheckbox,"check-strictly":!_vm.cascade,"default-checked-keys":_vm.leftCheckedKeys},on:{"check-change":_vm.handleLeftCheckChange,"node-click":_vm.handleLeftNodeClick},scopedSlots:_vm._u([{key:"default",fn:function({ node, data }){return _c('span',{staticClass:"xt-transfer-tree__node"},[_c('span',[_vm._v(_vm._s(node.label))]),(data.children && data.children.length)?_c('span',{staticClass:"xt-transfer-tree__node-count"},[_vm._v(" ("+_vm._s(data.children.length)+") ")]):_vm._e()])}}])})],1)]),_c('div',{staticClass:"xt-transfer-tree__buttons"},[_c('el-button',{attrs:{"type":"primary","disabled":!_vm.leftCheckedCount,"size":_vm.buttonSize},on:{"click":_vm.transferToRight}},[_c('i',{staticClass:"el-icon-arrow-right"})]),_c('el-button',{attrs:{"type":"primary","disabled":!_vm.rightCheckedCount,"size":_vm.buttonSize},on:{"click":_vm.transferToLeft}},[_c('i',{staticClass:"el-icon-arrow-left"})])],1),_c('div',{staticClass:"xt-transfer-tree__panel xt-transfer-tree__target"},[_c('div',{staticClass:"xt-transfer-tree__header"},[_c('span',{staticClass:"xt-transfer-tree__title"},[_vm._v(_vm._s(_vm.rightTitle))]),_c('span',{staticClass:"xt-transfer-tree__count"},[_vm._v(_vm._s(_vm.rightCheckedCount)+"/"+_vm._s(_vm.rightTotalCount))])]),(_vm.filterable)?_c('div',{staticClass:"xt-transfer-tree__search"},[_c('el-input',{attrs:{"placeholder":"搜索","prefix-icon":"el-icon-search","size":"small"},model:{value:(_vm.rightFilterText),callback:function ($$v) {_vm.rightFilterText=$$v},expression:"rightFilterText"}})],1):_vm._e(),_c('div',{staticClass:"xt-transfer-tree__body"},[_c('el-tree',{ref:"rightTree",attrs:{"data":_vm.targetData,"props":_vm.treeProps,"default-expand-all":_vm.defaultExpandAll,"filter-node-method":_vm.filterRightNode,"show-checkbox":_vm.showCheckbox,"check-strictly":!_vm.cascade,"default-checked-keys":_vm.rightCheckedKeys},on:{"check-change":_vm.handleRightCheckChange,"node-click":_vm.handleRightNodeClick},scopedSlots:_vm._u([{key:"default",fn:function({ node, data }){return _c('span',{staticClass:"xt-transfer-tree__node"},[_c('span',[_vm._v(_vm._s(node.label))]),(data.children && data.children.length)?_c('span',{staticClass:"xt-transfer-tree__node-count"},[_vm._v(" ("+_vm._s(data.children.length)+") ")]):_vm._e()])}}])})],1)])])
|
|
136
136
|
}
|
|
137
137
|
var staticRenderFns = []
|
|
@@ -140,7 +140,7 @@ if (typeof window !== 'undefined') {
|
|
|
140
140
|
// Indicate to webpack that this file can be concatenated
|
|
141
141
|
/* harmony default export */ var setPublicPath = (null);
|
|
142
142
|
|
|
143
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
143
|
+
// 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-transfer-tree/index.vue?vue&type=template&id=561bec94&scoped=true
|
|
144
144
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-transfer-tree"},[_c('div',{staticClass:"xt-transfer-tree__panel xt-transfer-tree__source"},[_c('div',{staticClass:"xt-transfer-tree__header"},[_c('span',{staticClass:"xt-transfer-tree__title"},[_vm._v(_vm._s(_vm.leftTitle))]),_c('span',{staticClass:"xt-transfer-tree__count"},[_vm._v(_vm._s(_vm.leftCheckedCount)+"/"+_vm._s(_vm.leftTotalCount))])]),(_vm.filterable)?_c('div',{staticClass:"xt-transfer-tree__search"},[_c('el-input',{attrs:{"placeholder":"搜索","prefix-icon":"el-icon-search","size":"small"},model:{value:(_vm.leftFilterText),callback:function ($$v) {_vm.leftFilterText=$$v},expression:"leftFilterText"}})],1):_vm._e(),_c('div',{staticClass:"xt-transfer-tree__body"},[_c('el-tree',{ref:"leftTree",attrs:{"data":_vm.sourceData,"props":_vm.treeProps,"default-expand-all":_vm.defaultExpandAll,"filter-node-method":_vm.filterLeftNode,"show-checkbox":_vm.showCheckbox,"check-strictly":!_vm.cascade,"default-checked-keys":_vm.leftCheckedKeys},on:{"check-change":_vm.handleLeftCheckChange,"node-click":_vm.handleLeftNodeClick},scopedSlots:_vm._u([{key:"default",fn:function({ node, data }){return _c('span',{staticClass:"xt-transfer-tree__node"},[_c('span',[_vm._v(_vm._s(node.label))]),(data.children && data.children.length)?_c('span',{staticClass:"xt-transfer-tree__node-count"},[_vm._v(" ("+_vm._s(data.children.length)+") ")]):_vm._e()])}}])})],1)]),_c('div',{staticClass:"xt-transfer-tree__buttons"},[_c('el-button',{attrs:{"type":"primary","disabled":!_vm.leftCheckedCount,"size":_vm.buttonSize},on:{"click":_vm.transferToRight}},[_c('i',{staticClass:"el-icon-arrow-right"})]),_c('el-button',{attrs:{"type":"primary","disabled":!_vm.rightCheckedCount,"size":_vm.buttonSize},on:{"click":_vm.transferToLeft}},[_c('i',{staticClass:"el-icon-arrow-left"})])],1),_c('div',{staticClass:"xt-transfer-tree__panel xt-transfer-tree__target"},[_c('div',{staticClass:"xt-transfer-tree__header"},[_c('span',{staticClass:"xt-transfer-tree__title"},[_vm._v(_vm._s(_vm.rightTitle))]),_c('span',{staticClass:"xt-transfer-tree__count"},[_vm._v(_vm._s(_vm.rightCheckedCount)+"/"+_vm._s(_vm.rightTotalCount))])]),(_vm.filterable)?_c('div',{staticClass:"xt-transfer-tree__search"},[_c('el-input',{attrs:{"placeholder":"搜索","prefix-icon":"el-icon-search","size":"small"},model:{value:(_vm.rightFilterText),callback:function ($$v) {_vm.rightFilterText=$$v},expression:"rightFilterText"}})],1):_vm._e(),_c('div',{staticClass:"xt-transfer-tree__body"},[_c('el-tree',{ref:"rightTree",attrs:{"data":_vm.targetData,"props":_vm.treeProps,"default-expand-all":_vm.defaultExpandAll,"filter-node-method":_vm.filterRightNode,"show-checkbox":_vm.showCheckbox,"check-strictly":!_vm.cascade,"default-checked-keys":_vm.rightCheckedKeys},on:{"check-change":_vm.handleRightCheckChange,"node-click":_vm.handleRightNodeClick},scopedSlots:_vm._u([{key:"default",fn:function({ node, data }){return _c('span',{staticClass:"xt-transfer-tree__node"},[_c('span',[_vm._v(_vm._s(node.label))]),(data.children && data.children.length)?_c('span',{staticClass:"xt-transfer-tree__node-count"},[_vm._v(" ("+_vm._s(data.children.length)+") ")]):_vm._e()])}}])})],1)])])
|
|
145
145
|
}
|
|
146
146
|
var staticRenderFns = []
|
|
@@ -138,7 +138,7 @@ if (typeof window !== 'undefined') {
|
|
|
138
138
|
// Indicate to webpack that this file can be concatenated
|
|
139
139
|
/* harmony default export */ var setPublicPath = (null);
|
|
140
140
|
|
|
141
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
141
|
+
// 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
|
|
142
142
|
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)
|
|
143
143
|
}
|
|
144
144
|
var staticRenderFns = []
|
|
@@ -146,7 +146,7 @@ var staticRenderFns = []
|
|
|
146
146
|
|
|
147
147
|
// CONCATENATED MODULE: ./src/components/xt-upload/index.vue?vue&type=template&id=03e2de58
|
|
148
148
|
|
|
149
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
149
|
+
// 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
|
|
150
150
|
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)])
|
|
151
151
|
}
|
|
152
152
|
var previewvue_type_template_id_236adf7f_scoped_true_staticRenderFns = []
|
|
@@ -154,16 +154,16 @@ var previewvue_type_template_id_236adf7f_scoped_true_staticRenderFns = []
|
|
|
154
154
|
|
|
155
155
|
// CONCATENATED MODULE: ./src/components/xt-upload/preview.vue?vue&type=template&id=236adf7f&scoped=true
|
|
156
156
|
|
|
157
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
158
|
-
var
|
|
159
|
-
var
|
|
157
|
+
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","amd":"vue","root":"Vue"}
|
|
158
|
+
var external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
159
|
+
var external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_);
|
|
160
160
|
|
|
161
161
|
// CONCATENATED MODULE: ./node_modules/element-ui/src/utils/dom.js
|
|
162
162
|
/* istanbul ignore next */
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
const isServer =
|
|
166
|
+
const isServer = external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer;
|
|
167
167
|
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
|
168
168
|
const MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
|
169
169
|
const ieVersion = isServer ? 0 : Number(document.documentMode);
|
|
@@ -411,7 +411,7 @@ let isFunction = (functionToCheck) => {
|
|
|
411
411
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
412
412
|
};
|
|
413
413
|
|
|
414
|
-
if ( true && typeof Int8Array !== 'object' && (
|
|
414
|
+
if ( true && typeof Int8Array !== 'object' && (external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
|
|
415
415
|
isFunction = function(obj) {
|
|
416
416
|
return typeof obj === 'function' || false;
|
|
417
417
|
};
|
|
@@ -545,15 +545,15 @@ const coerceTruthyValueToArray = function(val) {
|
|
|
545
545
|
};
|
|
546
546
|
|
|
547
547
|
const isIE = function() {
|
|
548
|
-
return !
|
|
548
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
549
549
|
};
|
|
550
550
|
|
|
551
551
|
const isEdge = function() {
|
|
552
|
-
return !
|
|
552
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
|
553
553
|
};
|
|
554
554
|
|
|
555
555
|
const isFirefox = function() {
|
|
556
|
-
return !
|
|
556
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
557
557
|
};
|
|
558
558
|
|
|
559
559
|
const autoprefixer = function(style) {
|
|
@@ -671,7 +671,7 @@ function objToArray(obj) {
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
const isMac = function() {
|
|
674
|
-
return !
|
|
674
|
+
return !external_commonjs_vue_commonjs2_vue_amd_vue_root_Vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
|
|
675
675
|
};
|
|
676
676
|
|
|
677
677
|
// 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
|
|
@@ -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",
|
|
@@ -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
|
};
|