vxe-pc-ui 4.12.4 → 4.12.6
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/es/backtop/src/backtop.js +11 -1
- package/es/form/style.css +49 -24
- package/es/form/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/list/src/list.js +15 -11
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree-select/src/tree-select.js +18 -14
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +26 -18
- package/es/vxe-form/style.css +49 -24
- package/es/vxe-form/style.min.css +1 -1
- package/lib/backtop/src/backtop.js +13 -1
- package/lib/backtop/src/backtop.min.js +1 -1
- package/lib/form/style/style.css +49 -24
- package/lib/form/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +71 -43
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +14 -10
- package/lib/list/src/list.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree-select/src/tree-select.js +17 -13
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +25 -17
- package/lib/upload/src/upload.min.js +1 -1
- package/lib/vxe-form/style/style.css +49 -24
- package/lib/vxe-form/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +13 -1
- package/packages/list/src/list.ts +16 -11
- package/packages/tree-select/src/tree-select.ts +19 -14
- package/packages/upload/src/upload.ts +28 -18
- package/styles/components/form.scss +4 -0
- package/types/components/table.d.ts +13 -0
- /package/es/icon/{iconfont.1768554558299.ttf → iconfont.1768629502193.ttf} +0 -0
- /package/es/icon/{iconfont.1768554558299.woff → iconfont.1768629502193.woff} +0 -0
- /package/es/icon/{iconfont.1768554558299.woff2 → iconfont.1768629502193.woff2} +0 -0
- /package/es/{iconfont.1768554558299.ttf → iconfont.1768629502193.ttf} +0 -0
- /package/es/{iconfont.1768554558299.woff → iconfont.1768629502193.woff} +0 -0
- /package/es/{iconfont.1768554558299.woff2 → iconfont.1768629502193.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1768554558299.ttf → iconfont.1768629502193.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1768554558299.woff → iconfont.1768629502193.woff} +0 -0
- /package/lib/icon/style/{iconfont.1768554558299.woff2 → iconfont.1768629502193.woff2} +0 -0
- /package/lib/{iconfont.1768554558299.ttf → iconfont.1768629502193.ttf} +0 -0
- /package/lib/{iconfont.1768554558299.woff → iconfont.1768629502193.woff} +0 -0
- /package/lib/{iconfont.1768554558299.woff2 → iconfont.1768629502193.woff2} +0 -0
|
@@ -20,6 +20,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
20
|
function getOptUniqueId() {
|
|
21
21
|
return _xeUtils.default.uniqueId('node_');
|
|
22
22
|
}
|
|
23
|
+
function createReactData() {
|
|
24
|
+
return {
|
|
25
|
+
initialized: false,
|
|
26
|
+
searchValue: '',
|
|
27
|
+
searchLoading: false,
|
|
28
|
+
panelIndex: 0,
|
|
29
|
+
panelStyle: {},
|
|
30
|
+
panelPlacement: null,
|
|
31
|
+
triggerFocusPanel: false,
|
|
32
|
+
visiblePanel: false,
|
|
33
|
+
isAniVisible: false,
|
|
34
|
+
isActivated: false
|
|
35
|
+
};
|
|
36
|
+
}
|
|
23
37
|
function createInternalData() {
|
|
24
38
|
return {
|
|
25
39
|
// hpTimeout: undefined,
|
|
@@ -125,18 +139,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
125
139
|
const refTreeWrapper = (0, _vue.ref)();
|
|
126
140
|
const refOptionPanel = (0, _vue.ref)();
|
|
127
141
|
const refTree = (0, _vue.ref)();
|
|
128
|
-
const reactData = (0, _vue.reactive)(
|
|
129
|
-
initialized: false,
|
|
130
|
-
searchValue: '',
|
|
131
|
-
searchLoading: false,
|
|
132
|
-
panelIndex: 0,
|
|
133
|
-
panelStyle: {},
|
|
134
|
-
panelPlacement: null,
|
|
135
|
-
triggerFocusPanel: false,
|
|
136
|
-
visiblePanel: false,
|
|
137
|
-
isAniVisible: false,
|
|
138
|
-
isActivated: false
|
|
139
|
-
});
|
|
142
|
+
const reactData = (0, _vue.reactive)(createReactData());
|
|
140
143
|
const internalData = createInternalData();
|
|
141
144
|
const refMaps = {
|
|
142
145
|
refElem
|
|
@@ -915,11 +918,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
915
918
|
_ui.globalEvents.on($xeTreeSelect, 'blur', handleGlobalBlurEvent);
|
|
916
919
|
_ui.globalEvents.on($xeTreeSelect, 'resize', handleGlobalResizeEvent);
|
|
917
920
|
});
|
|
918
|
-
(0, _vue.
|
|
921
|
+
(0, _vue.onBeforeUnmount)(() => {
|
|
919
922
|
_ui.globalEvents.off($xeTreeSelect, 'mousewheel');
|
|
920
923
|
_ui.globalEvents.off($xeTreeSelect, 'mousedown');
|
|
921
924
|
_ui.globalEvents.off($xeTreeSelect, 'blur');
|
|
922
925
|
_ui.globalEvents.off($xeTreeSelect, 'resize');
|
|
926
|
+
_xeUtils.default.assign(reactData, createReactData());
|
|
923
927
|
_xeUtils.default.assign(internalData, createInternalData());
|
|
924
928
|
});
|
|
925
929
|
(0, _vue.provide)('$xeTreeSelect', $xeTreeSelect);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_util=require("../../tree/src/util"),_log=require("../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils")),_input=_interopRequireDefault(require("../../input")),_button=_interopRequireDefault(require("../../button")),_tree=_interopRequireDefault(require("../../tree")),_vn=require("../../ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getOptUniqueId(){return _xeUtils.default.uniqueId("node_")}function createInternalData(){return{fullOptionList:[],fullNodeMaps:{}}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTreeSelect",props:{modelValue:[String,Number,Array],clearable:Boolean,placeholder:{type:String,default:()=>_xeUtils.default.eqNull((0,_ui.getConfig)().treeSelect.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().treeSelect.placeholder},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},filterable:Boolean,filterConfig:Object,multiple:Boolean,className:[String,Function],popupClassName:[String,Function],prefixIcon:String,placement:String,lazyOptions:Array,options:Array,optionProps:Object,zIndex:Number,size:{type:String,default:()=>(0,_ui.getConfig)().treeSelect.size||(0,_ui.getConfig)().size},remote:Boolean,remoteConfig:Function,popupConfig:Object,treeConfig:Object,menuConfig:Object,virtualYConfig:Object,autoClose:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.autoClose},showTotalButoon:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showTotalButoon},showCheckedButoon:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showCheckedButoon},showClearButton:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showClearButton},showExpandButton:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showExpandButton},transfer:{type:Boolean,default:null},remoteMethod:Function},emits:["update:modelValue","change","all-change","clear","blur","focus","click","node-click"],setup(H,e){const{emit:a,slots:K}=e,l=(0,_vue.inject)("$xeModal",null),n=(0,_vue.inject)("$xeDrawer",null),i=(0,_vue.inject)("$xeTable",null),o=(0,_vue.inject)("$xeForm",null),u=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();const de=(0,_ui.useSize)(H)["computeSize"],Y=(0,_vue.ref)(),Z=(0,_vue.ref)(),G=(0,_vue.ref)(),ce=(0,_vue.ref)(),J=(0,_vue.ref)(),Q=(0,_vue.ref)(),W=(0,_vue.reactive)({initialized:!1,searchValue:"",searchLoading:!1,panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1}),v=createInternalData(),h={refElem:Y},ve=(0,_vue.computed)(()=>{var e=H["readonly"];return null===e?!!o&&o.props.readonly:e}),X=(0,_vue.computed)(()=>{var e=H["disabled"];return null===e?!!o&&o.props.disabled:e}),ee=(0,_vue.computed)(()=>{var e=H["transfer"],t=te.value;if(_xeUtils.default.isBoolean(t.transfer))return t.transfer;if(null===e){t=(0,_ui.getConfig)().treeSelect.transfer;if(_xeUtils.default.isBoolean(t))return t;if(i||l||n||o)return!0}return e}),te=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.popupConfig,H.popupConfig)),le=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.treeConfig,H.treeConfig,{data:void 0})),pe=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.menuConfig,H.menuConfig)),_e=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({isHover:!0},e.nodeConfig)}),fe=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({showIcon:!!e.showCheckbox},e.checkboxConfig,{trigger:"node"})}),ge=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({showIcon:!!e.showRadio},e.radioConfig,{trigger:"node"})}),r=(0,_vue.computed)(()=>H.optionProps||{}),ne=(0,_vue.computed)(()=>{return le.value.keyField||"id"}),ae=(0,_vue.computed)(()=>{return r.value.label||"label"}),ie=(0,_vue.computed)(()=>{return r.value.value||"value"}),oe=(0,_vue.computed)(()=>{return r.value.children||"children"}),he=(0,_vue.computed)(()=>{return r.value.parent||"parentField"}),me=(0,_vue.computed)(()=>{return r.value.hasChild||"hasChild"}),xe=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.virtualYConfig,H.virtualYConfig)),s=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.remoteConfig,H.remoteConfig)),be=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({},e.filterConfig,H.filterConfig)}),Ce=(0,_vue.computed)(()=>{const{modelValue:e,lazyOptions:l}=H,n=v["fullNodeMaps"],a=ie.value,i=ae.value;return(_xeUtils.default.eqNull(e)?[]:_xeUtils.default.isArray(e)?e:[e]).map(t=>{var e=n[t];if(e)return e.item[i];if(l){e=l.find(e=>e[a]===t);if(e)return e[i]}return t}).join(", ")}),Ee=(0,_vue.computed)(()=>{var{height:e,width:t}=te.value,l={};return t&&(l.width=(0,_dom.toCssUnit)(t)),e&&(l.height=(0,_dom.toCssUnit)(e),l.maxHeight=(0,_dom.toCssUnit)(e)),l}),m={},ue={xID:t,props:H,context:e,reactData:W,internalData:v,getRefMaps:()=>h,getComputeMaps:()=>m},d=(e,t,l)=>{a(e,(0,_ui.createEvent)(l,{$treeSelect:ue},t))},re=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=K[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[];t={dispatchEvent:d};const c=()=>{var e=H["options"],t=le.value;const r=ne.value;var l=oe.value;const s=ie.value;t=t.transform;const d={},c={},n=(e,t,l,n,a,i)=>{let o=(e=>{e=e[ne.value];return e?encodeURIComponent(e):""})(e);o=o||getOptUniqueId(),c[o]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] "+r,o]),c[o]=!0;var u=e[s];d[u]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] "+s,u]),d[u]={item:e,index:t,items:l,parent:a,nodes:i}};e&&(t?e.forEach((e,t,l)=>{n(e,t,l,0,null,[])}):_xeUtils.default.eachTree(e,n,{children:l})),v.fullOptionList=e||[],v.fullNodeMaps=d},p=()=>{const l=H["placement"],n=W["panelIndex"],a=Y.value,i=J.value,o=ee.value,u=te.value;var e=()=>{var e=(0,_dom.updatePanelPlacement)(a,i,{placement:u.placement||l,teleportTo:o}),t=Object.assign(e.style,{zIndex:n});W.panelStyle=t,W.panelPlacement=e.placement};return e(),(0,_vue.nextTick)().then(e)},_=()=>{var{loading:e,remote:t,filterable:l}=H,n=v["fullOptionList"],a=X.value,i=s.value;e||a||(clearTimeout(v.hpTimeout),W.initialized||(W.initialized=!0),W.isActivated=!0,W.isAniVisible=!0,l&&t&&i.enabled&&i.autoLoad&&!n.length&&({modelValue:e,remote:a,remoteMethod:l}=H,t=W["searchValue"],i=s.value,n=i.queryMethod||l,a)&&n&&i.enabled&&(W.searchLoading=!0,Promise.resolve(n({$treeSelect:ue,searchValue:t,value:e})).then(()=>(0,_vue.nextTick)()).catch(()=>(0,_vue.nextTick)()).finally(()=>{W.searchLoading=!1})),setTimeout(()=>{W.visiblePanel=!0,H.filterable&&(0,_vue.nextTick)(()=>{var e=G.value;e&&e.focus()})},10),(l=te.value.zIndex||H.zIndex)?W.panelIndex=_xeUtils.default.toNumber(l):W.panelIndex<(0,_utils.getLastZIndex)()&&(W.panelIndex=(0,_utils.nextZIndex)()),p())},f=()=>{W.visiblePanel=!1,v.hpTimeout=setTimeout(()=>{W.isAniVisible=!1},350)},g=(e,t,l)=>{var n,t=_xeUtils.default.isArray(t)?t.map(_util.deNodeValue):(0,_util.deNodeValue)(t);n=t,a("update:modelValue",n),t!==H.modelValue&&(d("change",{value:t,node:l,option:l},e),o)&&u&&o.triggerItemEvent(e,u.itemConfig.field,t)},x=(e,t)=>{g(e,t,null),d("clear",{value:t},e)},ye=(e,t)=>{x(t,null),f()},Se=e=>{const l=e["$event"],{multiple:t,autoClose:n}=H;e=Q.value;t&&e&&e.setAllCheckboxNode(!0).then(({checkNodeKeys:e,checkNodes:t})=>{g(l,e,t[0]),d("all-change",{value:e},l),n&&f()})},Ie=e=>{e=e.$event;const{multiple:t,autoClose:l}=H;var n,a=Q.value;a&&(n=t?[]:null,a.clearCheckboxNode().then(()=>{l&&f()}),g(e,n,null),d("clear",{value:n},e))},Ne=()=>{var e=Q.value;e&&e.setAllExpandNode(!0)},ke=()=>{var e=Q.value;e&&e.clearAllExpandNode()},b=e=>{var t=W["visiblePanel"];X.value||t&&(t=J.value,((0,_dom.getEventTargetNode)(e,t).flag?p:f)())},C=e=>{var t,l,n=W["visiblePanel"];X.value||(t=Y.value,l=J.value,W.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,l).flag,n&&!W.isActivated&&f())},E=()=>{var{visiblePanel:e,isActivated:t}=W;e&&f(),t&&(W.isActivated=!1),(e||t)&&(e=Z.value)&&e.blur()},y=()=>{var e=W["visiblePanel"];e&&p()},we=e=>{X.value||W.visiblePanel||(W.triggerFocusPanel=!0,_(),setTimeout(()=>{W.triggerFocusPanel=!1},150)),d("focus",{},e)},Oe=e=>{se(e),d("click",{},e)},Te=e=>{W.isActivated=!1,d("blur",{},e)},Be=e=>{W.searchValue=e},se=e=>{e=e.$event;e.preventDefault(),W.triggerFocusPanel?W.triggerFocusPanel=!1:(W.visiblePanel?f:_)()},Ue=()=>{p()},Ve=e=>{var t=e["$event"];d("node-click",e,t)},Fe=e=>{var{value:e,$event:t,node:l}=e;g(t,e,l),f()},Pe=e=>{var{value:e,$event:t,node:l}=e;g(t,e,l)},qe=()=>{c()};Object.assign(ue,t,{});return(0,_vue.watch)(()=>H.options,()=>{c()}),c(),(0,_vue.onMounted)(()=>{_ui.globalEvents.on(ue,"mousewheel",b),_ui.globalEvents.on(ue,"mousedown",C),_ui.globalEvents.on(ue,"blur",E),_ui.globalEvents.on(ue,"resize",y)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(ue,"mousewheel"),_ui.globalEvents.off(ue,"mousedown"),_ui.globalEvents.off(ue,"blur"),_ui.globalEvents.off(ue,"resize"),_xeUtils.default.assign(v,createInternalData())}),(0,_vue.provide)("$xeTreeSelect",ue),ue.renderVN=()=>{var{className:e,modelValue:t,multiple:l,options:n,loading:a,menuConfig:i,filterable:o,showTotalButoon:u,showCheckedButoon:r,showClearButton:s,showExpandButton:d}=H,{initialized:c,isActivated:v,isAniVisible:p,visiblePanel:_,searchValue:f}=W,g=de.value,h=X.value,m=Ce.value,x=ee.value,b=ve.value,C=Ee.value,E=K.header,y=K.footer;const S=K.prefix;var I=te.value,N=I.className||H.popupClassName;if(b)return(0,_vue.h)("div",{ref:Y,class:["vxe-tree-select--readonly",e]},[(0,_vue.h)("span",{class:"vxe-tree-select-label"},m)]);var b=le.value,k=pe.value,w=_e.value,O=fe.value,T=ge.value,q=ne.value,A=ae.value,j=ie.value,z=oe.value,L=he.value,M=me.value,D=xe.value,R=be.value,B=b["slots"],$=_xeUtils.default.eqNull(t)?[]:_xeUtils.default.isArray(t)?t:[t],U={};if(B){const{icon:V,title:F,extra:P}=B;V&&(U.icon=e=>re(V,e)),F&&(U.title=e=>re(F,e)),P&&(U.extra=e=>re(P,e))}return(0,_vue.h)("div",{ref:Y,class:["vxe-tree-select",e?_xeUtils.default.isFunction(e)?e({$treeSelect:ue}):e:"",{["size--"+g]:g,"is--filterable":o,"is--visible":_,"is--disabled":h,"is--loading":a,"is--active":v}]},[(0,_vue.h)(_input.default,{ref:Z,clearable:H.clearable,placeholder:a?(0,_ui.getI18n)("vxe.select.loadingText"):H.placeholder,readonly:!0,disabled:h,type:"text",prefixIcon:H.prefixIcon,suffixIcon:a?(0,_ui.getIcon)().TREE_SELECT_LOADED:_?(0,_ui.getIcon)().TREE_SELECT_OPEN:(0,_ui.getIcon)().TREE_SELECT_CLOSE,modelValue:a?"":m,title:m,onClear:ye,onClick:Oe,onFocus:we,onBlur:Te,onSuffixClick:se},S?{prefix:()=>S({})}:{}),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!x||!c},[(0,_vue.h)("div",{ref:J,class:["vxe-table--ignore-clear vxe-tree-select--panel",N?_xeUtils.default.isFunction(N)?N({$treeSelect:ue}):N:"",{["size--"+g]:g,"is--transfer":x,"ani--leave":!a&&p,"ani--enter":!a&&_}],placement:W.panelPlacement,style:W.panelStyle},c?[(0,_vue.h)("div",{class:"vxe-tree-select--panel-wrapper"},[o?(0,_vue.h)("div",{class:"vxe-tree-select--panel-search"},[(0,_vue.h)(_input.default,{ref:G,class:"vxe-tree-select-search--input",modelValue:f,clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.treeSelect.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH,"onUpdate:modelValue":Be})]):(0,_ui.renderEmptyElement)(ue),u||r&&l||s||d||E?(0,_vue.h)("div",{class:"vxe-tree-select--panel-header"},E?E({}):[(0,_vue.h)("div",{class:"vxe-tree-select--header-button"},[u?(0,_vue.h)("div",{class:"vxe-tree-select--header-total"},(0,_ui.getI18n)("vxe.treeSelect.total",[$.length])):(0,_ui.renderEmptyElement)(ue),(0,_vue.h)("div",{class:"vxe-tree-select--header-btns"},[r&&l?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.allChecked"),mode:"text",onClick:Se}):(0,_ui.renderEmptyElement)(ue),s?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.clearChecked"),mode:"text",onClick:Ie}):(0,_ui.renderEmptyElement)(ue),d?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.allExpand"),mode:"text",onClick:Ne}):(0,_ui.renderEmptyElement)(ue),d?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.clearExpand"),mode:"text",onClick:ke}):(0,_ui.renderEmptyElement)(ue)])])]):(0,_ui.renderEmptyElement)(ue),(0,_vue.h)("div",{class:"vxe-tree-select--panel-body"},[(0,_vue.h)("div",{ref:ce,class:"vxe-tree-select-tree--wrapper",style:C},[(0,_vue.h)(_tree.default,{ref:Q,class:"vxe-tree-select--tree",height:I.height?"100%":b.height,minHeight:b.minHeight,maxHeight:I.height?"":b.maxHeight,autoResize:!0,data:n,indent:b.indent,showRadio:!l,radioConfig:T,checkNodeKey:l?null:t,showCheckbox:!!l,checkNodeKeys:l?t:null,checkboxConfig:O,titleField:A,valueField:j,keyField:q,childrenField:b.childrenField||z,parentField:b.parentField||L,hasChildField:b.hasChildField||M,accordion:b.accordion,expandAll:b.expandAll,expandNodeKeys:b.expandNodeKeys,nodeConfig:w,lazy:b.lazy,loadMethod:b.loadMethod,toggleMethod:b.toggleMethod,transform:b.transform,trigger:b.trigger,showIcon:b.showIcon,showLine:b.showLine,iconOpen:b.iconOpen,iconLoaded:b.iconLoaded,iconClose:b.iconClose,filterValue:f,filterConfig:R,menuConfig:i?k:void 0,virtualYConfig:D,onNodeExpand:Ue,onNodeClick:Ve,onRadioChange:Fe,onCheckboxChange:Pe,onLoadSuccess:qe},U)])]),y?(0,_vue.h)("div",{class:"vxe-tree-select--panel-footer"},y({})):(0,_ui.renderEmptyElement)(ue)])]:[])])])},ue},render(){return this.renderVN()}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_util=require("../../tree/src/util"),_log=require("../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils")),_input=_interopRequireDefault(require("../../input")),_button=_interopRequireDefault(require("../../button")),_tree=_interopRequireDefault(require("../../tree")),_vn=require("../../ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getOptUniqueId(){return _xeUtils.default.uniqueId("node_")}function createReactData(){return{initialized:!1,searchValue:"",searchLoading:!1,panelIndex:0,panelStyle:{},panelPlacement:null,triggerFocusPanel:!1,visiblePanel:!1,isAniVisible:!1,isActivated:!1}}function createInternalData(){return{fullOptionList:[],fullNodeMaps:{}}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTreeSelect",props:{modelValue:[String,Number,Array],clearable:Boolean,placeholder:{type:String,default:()=>_xeUtils.default.eqNull((0,_ui.getConfig)().treeSelect.placeholder)?(0,_ui.getI18n)("vxe.base.pleaseSelect"):(0,_ui.getConfig)().treeSelect.placeholder},readonly:{type:Boolean,default:null},loading:Boolean,disabled:{type:Boolean,default:null},filterable:Boolean,filterConfig:Object,multiple:Boolean,className:[String,Function],popupClassName:[String,Function],prefixIcon:String,placement:String,lazyOptions:Array,options:Array,optionProps:Object,zIndex:Number,size:{type:String,default:()=>(0,_ui.getConfig)().treeSelect.size||(0,_ui.getConfig)().size},remote:Boolean,remoteConfig:Function,popupConfig:Object,treeConfig:Object,menuConfig:Object,virtualYConfig:Object,autoClose:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.autoClose},showTotalButoon:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showTotalButoon},showCheckedButoon:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showCheckedButoon},showClearButton:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showClearButton},showExpandButton:{type:Boolean,default:()=>(0,_ui.getConfig)().treeSelect.showExpandButton},transfer:{type:Boolean,default:null},remoteMethod:Function},emits:["update:modelValue","change","all-change","clear","blur","focus","click","node-click"],setup(H,e){const{emit:n,slots:K}=e,l=(0,_vue.inject)("$xeModal",null),a=(0,_vue.inject)("$xeDrawer",null),i=(0,_vue.inject)("$xeTable",null),o=(0,_vue.inject)("$xeForm",null),u=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();const ce=(0,_ui.useSize)(H)["computeSize"],Y=(0,_vue.ref)(),Z=(0,_vue.ref)(),G=(0,_vue.ref)(),de=(0,_vue.ref)(),J=(0,_vue.ref)(),Q=(0,_vue.ref)(),W=(0,_vue.reactive)(createReactData()),v=createInternalData(),h={refElem:Y},ve=(0,_vue.computed)(()=>{var e=H["readonly"];return null===e?!!o&&o.props.readonly:e}),X=(0,_vue.computed)(()=>{var e=H["disabled"];return null===e?!!o&&o.props.disabled:e}),ee=(0,_vue.computed)(()=>{var e=H["transfer"],t=te.value;if(_xeUtils.default.isBoolean(t.transfer))return t.transfer;if(null===e){t=(0,_ui.getConfig)().treeSelect.transfer;if(_xeUtils.default.isBoolean(t))return t;if(i||l||a||o)return!0}return e}),te=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.popupConfig,H.popupConfig)),le=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.treeConfig,H.treeConfig,{data:void 0})),pe=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.menuConfig,H.menuConfig)),_e=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({isHover:!0},e.nodeConfig)}),fe=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({showIcon:!!e.showCheckbox},e.checkboxConfig,{trigger:"node"})}),ge=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({showIcon:!!e.showRadio},e.radioConfig,{trigger:"node"})}),r=(0,_vue.computed)(()=>H.optionProps||{}),ae=(0,_vue.computed)(()=>{return le.value.keyField||"id"}),ne=(0,_vue.computed)(()=>{return r.value.label||"label"}),ie=(0,_vue.computed)(()=>{return r.value.value||"value"}),oe=(0,_vue.computed)(()=>{return r.value.children||"children"}),he=(0,_vue.computed)(()=>{return r.value.parent||"parentField"}),me=(0,_vue.computed)(()=>{return r.value.hasChild||"hasChild"}),xe=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.virtualYConfig,H.virtualYConfig)),s=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().treeSelect.remoteConfig,H.remoteConfig)),be=(0,_vue.computed)(()=>{var e=le.value;return Object.assign({},e.filterConfig,H.filterConfig)}),Ce=(0,_vue.computed)(()=>{const{modelValue:e,lazyOptions:l}=H,a=v["fullNodeMaps"],n=ie.value,i=ne.value;return(_xeUtils.default.eqNull(e)?[]:_xeUtils.default.isArray(e)?e:[e]).map(t=>{var e=a[t];if(e)return e.item[i];if(l){e=l.find(e=>e[n]===t);if(e)return e[i]}return t}).join(", ")}),Ee=(0,_vue.computed)(()=>{var{height:e,width:t}=te.value,l={};return t&&(l.width=(0,_dom.toCssUnit)(t)),e&&(l.height=(0,_dom.toCssUnit)(e),l.maxHeight=(0,_dom.toCssUnit)(e)),l}),m={},ue={xID:t,props:H,context:e,reactData:W,internalData:v,getRefMaps:()=>h,getComputeMaps:()=>m},c=(e,t,l)=>{n(e,(0,_ui.createEvent)(l,{$treeSelect:ue},t))},re=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=K[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[];t={dispatchEvent:c};const d=()=>{var e=H["options"],t=le.value;const r=ae.value;var l=oe.value;const s=ie.value;t=t.transform;const c={},d={},a=(e,t,l,a,n,i)=>{let o=(e=>{e=e[ae.value];return e?encodeURIComponent(e):""})(e);o=o||getOptUniqueId(),d[o]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] "+r,o]),d[o]=!0;var u=e[s];c[u]&&(0,_log.errLog)("vxe.error.repeatKey",["[tree-select] "+s,u]),c[u]={item:e,index:t,items:l,parent:n,nodes:i}};e&&(t?e.forEach((e,t,l)=>{a(e,t,l,0,null,[])}):_xeUtils.default.eachTree(e,a,{children:l})),v.fullOptionList=e||[],v.fullNodeMaps=c},p=()=>{const l=H["placement"],a=W["panelIndex"],n=Y.value,i=J.value,o=ee.value,u=te.value;var e=()=>{var e=(0,_dom.updatePanelPlacement)(n,i,{placement:u.placement||l,teleportTo:o}),t=Object.assign(e.style,{zIndex:a});W.panelStyle=t,W.panelPlacement=e.placement};return e(),(0,_vue.nextTick)().then(e)},_=()=>{var{loading:e,remote:t,filterable:l}=H,a=v["fullOptionList"],n=X.value,i=s.value;e||n||(clearTimeout(v.hpTimeout),W.initialized||(W.initialized=!0),W.isActivated=!0,W.isAniVisible=!0,l&&t&&i.enabled&&i.autoLoad&&!a.length&&({modelValue:e,remote:n,remoteMethod:l}=H,t=W["searchValue"],i=s.value,a=i.queryMethod||l,n)&&a&&i.enabled&&(W.searchLoading=!0,Promise.resolve(a({$treeSelect:ue,searchValue:t,value:e})).then(()=>(0,_vue.nextTick)()).catch(()=>(0,_vue.nextTick)()).finally(()=>{W.searchLoading=!1})),setTimeout(()=>{W.visiblePanel=!0,H.filterable&&(0,_vue.nextTick)(()=>{var e=G.value;e&&e.focus()})},10),(l=te.value.zIndex||H.zIndex)?W.panelIndex=_xeUtils.default.toNumber(l):W.panelIndex<(0,_utils.getLastZIndex)()&&(W.panelIndex=(0,_utils.nextZIndex)()),p())},f=()=>{W.visiblePanel=!1,v.hpTimeout=setTimeout(()=>{W.isAniVisible=!1},350)},g=(e,t,l)=>{var a,t=_xeUtils.default.isArray(t)?t.map(_util.deNodeValue):(0,_util.deNodeValue)(t);a=t,n("update:modelValue",a),t!==H.modelValue&&(c("change",{value:t,node:l,option:l},e),o)&&u&&o.triggerItemEvent(e,u.itemConfig.field,t)},x=(e,t)=>{g(e,t,null),c("clear",{value:t},e)},ye=(e,t)=>{x(t,null),f()},Se=e=>{const l=e["$event"],{multiple:t,autoClose:a}=H;e=Q.value;t&&e&&e.setAllCheckboxNode(!0).then(({checkNodeKeys:e,checkNodes:t})=>{g(l,e,t[0]),c("all-change",{value:e},l),a&&f()})},Ie=e=>{e=e.$event;const{multiple:t,autoClose:l}=H;var a,n=Q.value;n&&(a=t?[]:null,n.clearCheckboxNode().then(()=>{l&&f()}),g(e,a,null),c("clear",{value:a},e))},Ne=()=>{var e=Q.value;e&&e.setAllExpandNode(!0)},ke=()=>{var e=Q.value;e&&e.clearAllExpandNode()},b=e=>{var t=W["visiblePanel"];X.value||t&&(t=J.value,((0,_dom.getEventTargetNode)(e,t).flag?p:f)())},C=e=>{var t,l,a=W["visiblePanel"];X.value||(t=Y.value,l=J.value,W.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,l).flag,a&&!W.isActivated&&f())},E=()=>{var{visiblePanel:e,isActivated:t}=W;e&&f(),t&&(W.isActivated=!1),(e||t)&&(e=Z.value)&&e.blur()},y=()=>{var e=W["visiblePanel"];e&&p()},we=e=>{X.value||W.visiblePanel||(W.triggerFocusPanel=!0,_(),setTimeout(()=>{W.triggerFocusPanel=!1},150)),c("focus",{},e)},Oe=e=>{se(e),c("click",{},e)},Te=e=>{W.isActivated=!1,c("blur",{},e)},Be=e=>{W.searchValue=e},se=e=>{e=e.$event;e.preventDefault(),W.triggerFocusPanel?W.triggerFocusPanel=!1:(W.visiblePanel?f:_)()},Ue=()=>{p()},Ve=e=>{var t=e["$event"];c("node-click",e,t)},Fe=e=>{var{value:e,$event:t,node:l}=e;g(t,e,l),f()},Pe=e=>{var{value:e,$event:t,node:l}=e;g(t,e,l)},qe=()=>{d()};Object.assign(ue,t,{});return(0,_vue.watch)(()=>H.options,()=>{d()}),d(),(0,_vue.onMounted)(()=>{_ui.globalEvents.on(ue,"mousewheel",b),_ui.globalEvents.on(ue,"mousedown",C),_ui.globalEvents.on(ue,"blur",E),_ui.globalEvents.on(ue,"resize",y)}),(0,_vue.onBeforeUnmount)(()=>{_ui.globalEvents.off(ue,"mousewheel"),_ui.globalEvents.off(ue,"mousedown"),_ui.globalEvents.off(ue,"blur"),_ui.globalEvents.off(ue,"resize"),_xeUtils.default.assign(W,createReactData()),_xeUtils.default.assign(v,createInternalData())}),(0,_vue.provide)("$xeTreeSelect",ue),ue.renderVN=()=>{var{className:e,modelValue:t,multiple:l,options:a,loading:n,menuConfig:i,filterable:o,showTotalButoon:u,showCheckedButoon:r,showClearButton:s,showExpandButton:c}=H,{initialized:d,isActivated:v,isAniVisible:p,visiblePanel:_,searchValue:f}=W,g=ce.value,h=X.value,m=Ce.value,x=ee.value,b=ve.value,C=Ee.value,E=K.header,y=K.footer;const S=K.prefix;var I=te.value,N=I.className||H.popupClassName;if(b)return(0,_vue.h)("div",{ref:Y,class:["vxe-tree-select--readonly",e]},[(0,_vue.h)("span",{class:"vxe-tree-select-label"},m)]);var b=le.value,k=pe.value,w=_e.value,O=fe.value,T=ge.value,q=ae.value,A=ne.value,j=ie.value,z=oe.value,L=he.value,D=me.value,R=xe.value,M=be.value,B=b["slots"],$=_xeUtils.default.eqNull(t)?[]:_xeUtils.default.isArray(t)?t:[t],U={};if(B){const{icon:V,title:F,extra:P}=B;V&&(U.icon=e=>re(V,e)),F&&(U.title=e=>re(F,e)),P&&(U.extra=e=>re(P,e))}return(0,_vue.h)("div",{ref:Y,class:["vxe-tree-select",e?_xeUtils.default.isFunction(e)?e({$treeSelect:ue}):e:"",{["size--"+g]:g,"is--filterable":o,"is--visible":_,"is--disabled":h,"is--loading":n,"is--active":v}]},[(0,_vue.h)(_input.default,{ref:Z,clearable:H.clearable,placeholder:n?(0,_ui.getI18n)("vxe.select.loadingText"):H.placeholder,readonly:!0,disabled:h,type:"text",prefixIcon:H.prefixIcon,suffixIcon:n?(0,_ui.getIcon)().TREE_SELECT_LOADED:_?(0,_ui.getIcon)().TREE_SELECT_OPEN:(0,_ui.getIcon)().TREE_SELECT_CLOSE,modelValue:n?"":m,title:m,onClear:ye,onClick:Oe,onFocus:we,onBlur:Te,onSuffixClick:se},S?{prefix:()=>S({})}:{}),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!x||!d},[(0,_vue.h)("div",{ref:J,class:["vxe-table--ignore-clear vxe-tree-select--panel",N?_xeUtils.default.isFunction(N)?N({$treeSelect:ue}):N:"",{["size--"+g]:g,"is--transfer":x,"ani--leave":!n&&p,"ani--enter":!n&&_}],placement:W.panelPlacement,style:W.panelStyle},d?[(0,_vue.h)("div",{class:"vxe-tree-select--panel-wrapper"},[o?(0,_vue.h)("div",{class:"vxe-tree-select--panel-search"},[(0,_vue.h)(_input.default,{ref:G,class:"vxe-tree-select-search--input",modelValue:f,clearable:!0,disabled:!1,readonly:!1,placeholder:(0,_ui.getI18n)("vxe.treeSelect.search"),prefixIcon:(0,_ui.getIcon)().INPUT_SEARCH,"onUpdate:modelValue":Be})]):(0,_ui.renderEmptyElement)(ue),u||r&&l||s||c||E?(0,_vue.h)("div",{class:"vxe-tree-select--panel-header"},E?E({}):[(0,_vue.h)("div",{class:"vxe-tree-select--header-button"},[u?(0,_vue.h)("div",{class:"vxe-tree-select--header-total"},(0,_ui.getI18n)("vxe.treeSelect.total",[$.length])):(0,_ui.renderEmptyElement)(ue),(0,_vue.h)("div",{class:"vxe-tree-select--header-btns"},[r&&l?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.allChecked"),mode:"text",onClick:Se}):(0,_ui.renderEmptyElement)(ue),s?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.clearChecked"),mode:"text",onClick:Ie}):(0,_ui.renderEmptyElement)(ue),c?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.allExpand"),mode:"text",onClick:Ne}):(0,_ui.renderEmptyElement)(ue),c?(0,_vue.h)(_button.default,{content:(0,_ui.getI18n)("vxe.treeSelect.clearExpand"),mode:"text",onClick:ke}):(0,_ui.renderEmptyElement)(ue)])])]):(0,_ui.renderEmptyElement)(ue),(0,_vue.h)("div",{class:"vxe-tree-select--panel-body"},[(0,_vue.h)("div",{ref:de,class:"vxe-tree-select-tree--wrapper",style:C},[(0,_vue.h)(_tree.default,{ref:Q,class:"vxe-tree-select--tree",height:I.height?"100%":b.height,minHeight:b.minHeight,maxHeight:I.height?"":b.maxHeight,autoResize:!0,data:a,indent:b.indent,showRadio:!l,radioConfig:T,checkNodeKey:l?null:t,showCheckbox:!!l,checkNodeKeys:l?t:null,checkboxConfig:O,titleField:A,valueField:j,keyField:q,childrenField:b.childrenField||z,parentField:b.parentField||L,hasChildField:b.hasChildField||D,accordion:b.accordion,expandAll:b.expandAll,expandNodeKeys:b.expandNodeKeys,nodeConfig:w,lazy:b.lazy,loadMethod:b.loadMethod,toggleMethod:b.toggleMethod,transform:b.transform,trigger:b.trigger,showIcon:b.showIcon,showLine:b.showLine,iconOpen:b.iconOpen,iconLoaded:b.iconLoaded,iconClose:b.iconClose,filterValue:f,filterConfig:M,menuConfig:i?k:void 0,virtualYConfig:R,onNodeExpand:Ue,onNodeClick:Ve,onRadioChange:Fe,onCheckboxChange:Pe,onLoadSuccess:qe},U)])]),y?(0,_vue.h)("div",{class:"vxe-tree-select--panel-footer"},y({})):(0,_ui.renderEmptyElement)(ue)])]:[])])])},ue},render(){return this.renderVN()}});
|
package/lib/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Object.keys(_core).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
var _dynamics = require("../dynamics");
|
|
28
28
|
var _log = require("./src/log");
|
|
29
|
-
const version = exports.version = "4.12.
|
|
29
|
+
const version = exports.version = "4.12.6";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");const version=exports.version="4.12.4";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"});var _default=exports.default=_core.VxeUI;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");const version=exports.version="4.12.6";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.warnLog = exports.errLog = void 0;
|
|
7
7
|
var _core = require("@vxe-ui/core");
|
|
8
|
-
const version = `ui v${"4.12.
|
|
8
|
+
const version = `ui v${"4.12.6"}`;
|
|
9
9
|
const warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
const errLog = exports.errLog = _core.log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.12.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.12.6",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/lib/upload/src/upload.js
CHANGED
|
@@ -14,6 +14,26 @@ var _dom = require("../../ui/src/dom");
|
|
|
14
14
|
var _util = require("./util");
|
|
15
15
|
var _button = _interopRequireDefault(require("../../button/src/button"));
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function createReactData() {
|
|
18
|
+
return {
|
|
19
|
+
isDragUploadStatus: false,
|
|
20
|
+
showMorePopup: false,
|
|
21
|
+
isActivated: false,
|
|
22
|
+
fileList: [],
|
|
23
|
+
fileCacheMaps: {},
|
|
24
|
+
isDragMove: false,
|
|
25
|
+
dragIndex: -1,
|
|
26
|
+
dragTipText: ''
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function createInternalData() {
|
|
30
|
+
return {
|
|
31
|
+
moreId: _xeUtils.default.uniqueId('upload'),
|
|
32
|
+
imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
|
|
33
|
+
prevDragIndex: -1
|
|
34
|
+
// prevDragPos: ''
|
|
35
|
+
};
|
|
36
|
+
}
|
|
17
37
|
var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
18
38
|
name: 'VxeUpload',
|
|
19
39
|
props: {
|
|
@@ -209,22 +229,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
209
229
|
const refPopupElem = (0, _vue.ref)();
|
|
210
230
|
const refDragLineElem = (0, _vue.ref)();
|
|
211
231
|
const refModalDragLineElem = (0, _vue.ref)();
|
|
212
|
-
const reactData = (0, _vue.reactive)(
|
|
213
|
-
|
|
214
|
-
showMorePopup: false,
|
|
215
|
-
isActivated: false,
|
|
216
|
-
fileList: [],
|
|
217
|
-
fileCacheMaps: {},
|
|
218
|
-
isDragMove: false,
|
|
219
|
-
dragIndex: -1,
|
|
220
|
-
dragTipText: ''
|
|
221
|
-
});
|
|
222
|
-
const internalData = {
|
|
223
|
-
moreId: _xeUtils.default.uniqueId('upload'),
|
|
224
|
-
imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
|
|
225
|
-
prevDragIndex: -1
|
|
226
|
-
// prevDragPos: ''
|
|
227
|
-
};
|
|
232
|
+
const reactData = (0, _vue.reactive)(createReactData());
|
|
233
|
+
const internalData = createInternalData();
|
|
228
234
|
const refMaps = {
|
|
229
235
|
refElem
|
|
230
236
|
};
|
|
@@ -1825,11 +1831,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1825
1831
|
_ui.globalEvents.on($xeUpload, 'mousedown', handleGlobalMousedownEvent);
|
|
1826
1832
|
_ui.globalEvents.on($xeUpload, 'blur', handleGlobalBlurEvent);
|
|
1827
1833
|
});
|
|
1828
|
-
(0, _vue.
|
|
1834
|
+
(0, _vue.onBeforeUnmount)(() => {
|
|
1829
1835
|
reactData.isDragUploadStatus = false;
|
|
1830
1836
|
_ui.globalEvents.off($xeUpload, 'paste');
|
|
1831
1837
|
_ui.globalEvents.off($xeUpload, 'mousedown');
|
|
1832
1838
|
_ui.globalEvents.off($xeUpload, 'blur');
|
|
1839
|
+
_xeUtils.default.assign(reactData, createReactData());
|
|
1840
|
+
_xeUtils.default.assign(internalData, createInternalData());
|
|
1833
1841
|
});
|
|
1834
1842
|
updateFileList();
|
|
1835
1843
|
$xeUpload.renderVN = renderVN;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_dom=require("../../ui/src/dom"),_util=require("./util"),_button=_interopRequireDefault(require("../../button/src/button"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeUpload",props:{modelValue:[Array,String,Object],showList:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showList},moreConfig:Object,readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},autoSubmit:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoSubmit},mode:{type:String,default:()=>(0,_ui.getConfig)().upload.mode},imageTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageTypes,!0)},imageConfig:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageConfig,!0)},imageStyle:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageStyle,!0)},fileTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.fileTypes,!0)},dragSort:Boolean,dragToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.dragToUpload,!0)},dragPlaceholder:{type:String,default:()=>(0,_ui.getConfig)().upload.dragPlaceholder},pasteToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.pasteToUpload,!0)},keyField:String,singleMode:Boolean,urlMode:Boolean,urlArgs:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.urlArgs},multiple:Boolean,limitSize:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitSize},showLimitSize:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitSize},limitSizeText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitSizeText},limitCount:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitCount},showLimitCount:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitCount},limitCountText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitCountText},nameField:{type:String,default:()=>(0,_ui.getConfig)().upload.nameField},typeField:{type:String,default:()=>(0,_ui.getConfig)().upload.typeField},urlField:{type:String,default:()=>(0,_ui.getConfig)().upload.urlField},sizeField:{type:String,default:()=>(0,_ui.getConfig)().upload.sizeField},showErrorStatus:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showErrorStatus},showProgress:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showProgress},progressText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.progressText},showSubmitButton:Boolean,autoHiddenButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoHiddenButton},showUploadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showUploadButton},buttonText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.buttonText},buttonIcon:{type:String,default:()=>(0,_ui.getConfig)().upload.buttonIcon},showButtonText:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonText},showButtonIcon:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonIcon},showRemoveButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showRemoveButton},showDownloadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showDownloadButton},showPreview:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showPreview},showTip:{type:Boolean,default:()=>null},maxSimultaneousUploads:{type:Number,default:()=>(0,_ui.getConfig)().upload.maxSimultaneousUploads},tipText:[String,Number,Function],hintText:String,previewMethod:Function,uploadMethod:Function,beforeRemoveMethod:Function,removeMethod:Function,beforeDownloadMethod:Function,downloadMethod:Function,getUrlMethod:Function,getThumbnailUrlMethod:Function,size:{type:String,default:()=>(0,_ui.getConfig)().upload.size||(0,_ui.getConfig)().size}},emits:["update:modelValue","add","remove","remove-fail","download","download-fail","upload-success","upload-error","sort-dragend","more-visible"],setup(S,e){const{emit:n,slots:D}=e,U=(0,_vue.inject)("$xeForm",null),E=(0,_vue.inject)("xeFormItemInfo",null),i=(0,_vue.inject)("$xeTable",null);var t=_xeUtils.default.uniqueId();const C=(0,_ui.useSize)(S)["computeSize"],m=(0,_vue.ref)(),c=(0,_vue.ref)(),_=(0,_vue.ref)(),f=(0,_vue.ref)(),B=(0,_vue.reactive)({isDragUploadStatus:!1,showMorePopup:!1,isActivated:!1,fileList:[],fileCacheMaps:{},isDragMove:!1,dragIndex:-1,dragTipText:""}),r={moreId:_xeUtils.default.uniqueId("upload"),imagePreviewTypes:["jpg","jpeg","png","gif"],prevDragIndex:-1},l={refElem:m},L=(0,_vue.computed)(()=>{var e=S["readonly"];return null===e?!!U&&U.props.readonly:e}),P=(0,_vue.computed)(()=>{var e=S["disabled"];return null===e?!!U&&U.props.disabled:e}),M=(0,_vue.computed)(()=>S.keyField||"_X_KEY"),h=(0,_vue.computed)(()=>"image"===S.mode),V=(0,_vue.computed)(()=>S.nameField||"name"),A=(0,_vue.computed)(()=>S.typeField||"type"),T=(0,_vue.computed)(()=>S.urlField||"url"),F=(0,_vue.computed)(()=>S.sizeField||"size"),H=(0,_vue.computed)(()=>1024*_xeUtils.default.toNumber(S.limitSize)*1024),O=(0,_vue.computed)(()=>S.multiple?_xeUtils.default.toNumber(S.limitCount):1),Y=(0,_vue.computed)(()=>{var e=S["multiple"],t=B["fileList"],o=O.value;return e?!o||t.length>=o:1<=t.length}),Q=(0,_vue.computed)(()=>{var e=_xeUtils.default.toNumber(S.limitSize);return e?1048576<e?e/1048576+"T":1024<e?e/1024+"G":e+"M":""}),X=(0,_vue.computed)(()=>{var{showTip:e,tipText:t}=S;return _xeUtils.default.isBoolean(e)||(e=(0,_ui.getConfig)().upload.showTip,_xeUtils.default.isBoolean(e))?e:!!t}),W=(0,_vue.computed)(()=>{var{limitSize:e,fileTypes:t,multiple:o,limitCount:i}=S,l=S.tipText||S.hintText,a=h.value,u=Q.value;return _xeUtils.default.isString(l)?l:_xeUtils.default.isFunction(l)?""+l({}):(l=[],a?(o&&i&&l.push((0,_ui.getI18n)("vxe.upload.imgCountHint",[i])),e&&u&&l.push((0,_ui.getI18n)("vxe.upload.imgSizeHint",[u]))):(t&&t.length&&l.push((0,_ui.getI18n)("vxe.upload.fileTypeHint",[t.join("/")])),e&&u&&l.push((0,_ui.getI18n)("vxe.upload.fileSizeHint",[u])),o&&i&&l.push((0,_ui.getI18n)("vxe.upload.fileCountHint",[i]))),l.join((0,_ui.getI18n)("vxe.base.comma")))}),s=(0,_vue.computed)(()=>Object.assign({},S.imageConfig||S.imageStyle)),K=(0,_vue.computed)(()=>{var{width:e,height:t}=s.value,o={};return e&&(o.width=(0,_dom.toCssUnit)(e)),t&&(o.height=(0,_dom.toCssUnit)(t)),o}),J=(0,_vue.computed)(()=>Object.assign({showMoreButton:!0},S.moreConfig)),a={},N={xID:t,props:S,context:e,reactData:B,internalData:r,getRefMaps:()=>l,getComputeMaps:()=>a},z=()=>_xeUtils.default.uniqueId(),k=e=>{return e[M.value]},u=()=>{var{modelValue:e,multiple:t}=S,o=L.value;const l=M.value,a=V.value,u=A.value,n=T.value,r=F.value;e=e?(e?_xeUtils.default.isArray(e)?e:[e]:[]).map(e=>{if(!e||_xeUtils.default.isString(e)){var t=""+(e||""),o=_xeUtils.default.parseUrl(e);const i=(o?o.searchQuery[a]:"")||decodeURIComponent(""+(t||"")).split("/").pop()||"";return{[a]:i,[u]:(o?o.searchQuery[u]:"")||j(i),[n]:t,[r]:_xeUtils.default.toNumber(o?o.searchQuery[r]:0)||0,[l]:z()}}const i=e[a]||"";return e[a]=i,e[u]=e[u]||j(i),e[n]=e[n]||"",e[r]=e[r]||0,e[l]=e[l]||z(),e}):[];B.fileList=o||t?e:e.slice(0,1)},j=e=>{var t=e.lastIndexOf(".");return 0<t?e.substring(t+1).toLowerCase():""},R=(e,t,o)=>{n(e,(0,_ui.createEvent)(o,{$upload:N},t))},$=e=>{const{singleMode:t,urlMode:o,urlArgs:i}=S,l=T.value,a=V.value;let u=e?e.slice(0):[];o&&(u=u.map(e=>{var t=e[l];if(t&&i){var o=_xeUtils.default.parseUrl(t);if(!o.searchQuery[a]&&-1===t.indexOf("blob:"))return""+t+(-1===t.indexOf("?")?"?":"&")+a+"="+encodeURIComponent(e[a]||"")}return t})),e=t?u[0]||null:u,n("update:modelValue",e)},q=e=>{var t=S.getUrlMethod||(0,_ui.getConfig)().upload.getUrlMethod,o=T.value;return t?t({$upload:N,option:e}):e[o]},Z=t=>{var{imageTypes:e,showDownloadButton:o}=S;const i=A.value,l=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;var a=r["imagePreviewTypes"];a.concat(e||[]).some(e=>(""+e).toLowerCase()===(""+t[i]).toLowerCase())&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:[q(t)],showDownloadButton:o,beforeDownloadMethod:l?()=>l({$upload:N,option:t}):void 0})},G=(o,e)=>{const i=S["showErrorStatus"],l=k(o);var t=S.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod;return t?Promise.resolve(t({$upload:N,file:e,option:o,updateProgress(e){var t=B["fileCacheMaps"],t=t[k(o)];t&&(t.percent=Math.max(0,Math.min(99,_xeUtils.default.toNumber(e))))}})).then(e=>{var t=B["fileCacheMaps"],t=t[l];t&&(t.percent=100,t.status="success"),Object.assign(o,e),R("upload-success",{option:o,data:e},null)}).catch(e=>{var t=B["fileCacheMaps"],t=t[l];t&&(t.status="error"),i?Object.assign(o,e):B.fileList=B.fileList.filter(e=>k(e)!==l),R("upload-error",{option:o,data:e},null)}).finally(()=>{var e=B["fileCacheMaps"],e=e[l];e&&(e.loading=!1)}):(t=B["fileCacheMaps"],(e=t[l])&&(e.loading=!1),Promise.resolve())},ee=e=>{const{uploadMethod:t,urlMode:o}=S;var i,l=B["fileCacheMaps"],l=l[k(e)];(t||(0,_ui.getConfig)().upload.uploadMethod)&&l&&(i=l.file,l.loading=!0,l.status="pending",l.percent=0,G(e,i).then(()=>{o&&$(B.fileList)}))},d=(t,o)=>{const{multiple:e,urlMode:i,showLimitSize:l,limitSizeText:a,showLimitCount:u,limitCountText:n,autoSubmit:r}=S;var s=B["fileList"];const d=S.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod,p=M.value,v=V.value,g=A.value,m=T.value,c=F.value;var _=H.value;const f=O.value;var h=Q.value;let x=t;if(e&&f){if(u&&s.length>=f)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:n?""+(_xeUtils.default.isFunction(n)?n({maxCount:f}):n):(0,_ui.getI18n)("vxe.upload.overCountErr",[f])}));const b=x.length-(f-s.length);if(u&&0<b){const C=x.slice(f-s.length);n?_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:""+(_xeUtils.default.isFunction(n)?n({maxCount:f}):n)}):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",width:null,slots:{default(){return(0,_vue.h)("div",{class:"vxe-upload--file-message-over-error"},[(0,_vue.h)("div",{},(0,_ui.getI18n)("vxe.upload.overCountExtraErr",[f,b])),(0,_vue.h)("div",{class:"vxe-upload--file-message-over-extra"},C.map((e,t)=>(0,_vue.h)("div",{key:t,class:"vxe-upload--file-message-over-extra-item"},e.name)))])}}})}x=x.slice(0,f-s.length)}if(l&&_)for(let e=0;e<t.length;e++)if(t[0].size>_)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:a?""+(_xeUtils.default.isFunction(a)?a({maxSize:_}):a):(0,_ui.getI18n)("vxe.upload.overSizeErr",[h])}));const w=Object.assign({},B.fileCacheMaps),y=e?s:[],I=[];x.forEach(e=>{var t=e["name"],o=z(),t={[v]:t,[g]:j(t),[c]:e.size,[m]:URL.createObjectURL(e),[p]:o},o=(d&&(w[o]={file:e,loading:!!r,status:"pending",percent:0}),(0,_vue.reactive)(t));d&&r&&I.push(G(o,e)),y.push(o)}),B.fileList=y,B.fileCacheMaps=w,y.forEach(e=>{R("add",{option:e},o)}),Promise.all(i?I:[]).then(()=>{$(y),U&&E&&U.triggerItemEvent(o,E.itemConfig.field,y)})},p=t=>{var{multiple:e,imageTypes:o,fileTypes:i}=S,l=P.value,a=h.value;return l?Promise.resolve({status:!1,files:[],file:null}):(0,_util.readLocalFile)({multiple:e,types:a?o:i}).then(e=>(d(e.files,t),e))},te=e=>{p(e).catch(()=>{})},v=(e,t,o)=>{var i=B["fileList"];i.splice(o,1),$(i),U&&E&&U.triggerItemEvent(e,E.itemConfig.field,i),R("remove",{option:t},e)},oe=(t,o,i)=>{var e=S.beforeRemoveMethod||(0,_ui.getConfig)().upload.beforeRemoveMethod;const l=S.removeMethod||(0,_ui.getConfig)().upload.removeMethod;Promise.resolve(!e||e({$upload:N,option:o})).then(e=>{e?l?Promise.resolve(l({$upload:N,option:o})).then(()=>{v(t,o,i)}).catch(e=>e):v(t,o,i):R("remove-fail",{option:o},t)})},ie=(e,t)=>{R("download",{option:t},e)},le=e=>{var t,o,i,l=e.currentTarget,{clientX:e,clientY:a}=e;l&&({x:l,y:t,height:o,width:i}=l.getBoundingClientRect(),e<l||l+i<e||a<t||t+o<a)&&(B.isDragUploadStatus=!1)},ae=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),B.isDragUploadStatus=!0)},g=(e,t)=>{const{imageTypes:o,fileTypes:i}=S;var l=r["imagePreviewTypes"];if(h.value){const a=l.concat(o&&o.length?o:[]);t=t.filter(e=>{const t=(""+(e.type.split("/")[1]||"")).toLowerCase();return!!a.some(e=>(""+e).toLowerCase()===t)})}else if(i&&i.length){const u=[];if(t.forEach(e=>{const t=j(e.name);i.some(e=>(""+e).toLowerCase()===t)||u.push(t)}),u.length)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.notType",[u.join(", ")]),status:"error"}))}t.length?d(t,e):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:(0,_ui.getI18n)("vxe.upload.uploadTypeErr")})},ue=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),(t=ne(t)).length)&&g(e,t),B.isDragUploadStatus=!1},ne=e=>{const t=[];return _xeUtils.default.arrayEach(e,e=>{e=e.getAsFile();e&&t.push(e)}),t},x=e=>{const v=L.value,g=h.value;e=e.$event;_ui.VxeUI.modal&&(_ui.VxeUI.modal.open({id:r.moreId,title:v?(0,_ui.getI18n)("vxe.upload.morePopup.readTitle"):(0,_ui.getI18n)("vxe.upload.morePopup."+(g?"imageTitle":"fileTitle")),width:660,height:500,escClosable:!0,showMaximize:!0,resize:!0,maskClosable:!0,slots:{default(){var{showErrorStatus:e,dragToUpload:t,dragSort:o,dragPlaceholder:i}=S,{isActivated:l,isDragMove:a,isDragUploadStatus:u,dragIndex:n}=B;const r=B["fileList"];var s=P.value,d=D.moreContent||D["more-content"],p={};return t&&-1===n&&(p.onDragover=ae,p.onDragleave=le,p.onDrop=ue),(0,_vue.h)("div",Object.assign({ref:c,class:["vxe-upload--more-popup",{"is--readonly":v,"is--disabled":s,"is--active":l,"show--error":e,"is--drag":u}]},p),d?(0,_vn.getSlotVNs)(d({options:r})):[g?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--image-more-list"},{default:()=>I(r,!0).concat(b(!0))}):(0,_vue.h)("div",{class:"vxe-upload--image-more-list"},I(r,!0).concat(b(!0))):(0,_vue.h)("div",{class:"vxe-upload--file-more-list"},[y(!0),o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(r,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(r,!0))]),o?(0,_vue.h)("div",{ref:f,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(N),u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},i||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(N)])}},onShow(){B.showMorePopup=!0},onHide({$event:e}){B.showMorePopup=!1,e&&R("more-visible",{visible:!1},e)}}),e)&&R("more-visible",{visible:!0},e)},re=(e,t,o)=>{var i,l=B["showMorePopup"],a=m.value,u=c.value,u=l?u:a;u&&(a=u.getBoundingClientRect(),u=_.value,i=f.value,l=l?i:u)&&(i=t.getBoundingClientRect(),l.style.display="block",l.style.top=Math.max(1,i.y-a.y)+"px",l.style.left=Math.max(1,i.x-a.x)+"px",l.style.height=i.height+"px",l.style.width=i.width-1+"px",l.setAttribute("drag-pos",o))},se=()=>{var e=_.value,t=f.value;e&&(e.style.display=""),t&&(t.style.display="")},de=e=>{e.stopPropagation(),e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0);const t=e.currentTarget;e=t.parentElement,e=_xeUtils.default.findIndexOf(Array.from(e.children),e=>t===e);B.isDragMove=!0,B.dragIndex=e,setTimeout(()=>{B.isDragMove=!1},500)},pe=t=>{t.stopPropagation(),t.preventDefault();var o=B["dragIndex"];if(-1!==o){var i=h.value;const a=t.currentTarget;var l=a.parentElement,l=_xeUtils.default.findIndexOf(Array.from(l.children),e=>a===e);let e="";e=i?t.clientX-a.getBoundingClientRect().x<a.clientWidth/2?"left":"right":t.clientY-a.getBoundingClientRect().y<a.clientHeight/2?"top":"bottom",o===l?re(t,a,e):(re(t,a,e),r.prevDragIndex=l,r.prevDragPos=e)}},ve=e=>{var{fileList:t,dragIndex:o}=B,{prevDragIndex:i,prevDragPos:l}=r,a="bottom"===l||"right"===l?1:0,u=t[o];const n=t[i];u&&n&&(t.splice(o,1),i=_xeUtils.default.findIndexOf(t,e=>n===e)+a,t.splice(i,0,u),R("sort-dragend",{oldItem:u,newItem:n,dragPos:l,offsetIndex:a,_index:{newIndex:i,oldIndex:o}},e)),se(),B.dragIndex=-1},ge=e=>{i&&e.stopPropagation(),B.isActivated=!0},me=e=>{var t=S["pasteToUpload"],o=B["isActivated"];o&&t&&(o=e.clipboardData||e.originalEvent.clipboardData)&&(t=o["items"],t)&&(o=ne(t)).length&&(e.preventDefault(),g(e,o))},ce=e=>{var t=m.value,o=c.value;let i=(0,_dom.getEventTargetNode)(e,t).flag;!i&&o&&(o=(t=o.parentElement||o)&&t.parentElement,i=(0,_dom.getEventTargetNode)(e,o).flag),B.isActivated=i},_e=()=>{B.isActivated=!1};t={dispatchEvent:R,choose(){return p(null)},submit(i){var e=S["maxSimultaneousUploads"],e=_xeUtils.default.toNumber(e||1)||1;const{fileList:t,fileCacheMaps:l}=B,o=t.filter(e=>{e=k(e),e=l[e];return e&&("pending"===e.status||i&&"error"===e.status)}),a=e=>{var t=k(e),t=l[t];if(t){var o=t.file;if(o&&("pending"===t.status||i&&"error"===t.status))return t.loading=!0,t.percent=0,G(e,o).then(u)}return u()},u=()=>{var e;return o.length?(e=o[0],o.splice(0,1),a(e).then(u)):Promise.resolve()};return Promise.all(o.splice(0,e).map(a)).then(()=>{})},getMoreVisible(){return B.showMorePopup},openMore(){return x({$event:new Event("click")}),(0,_vue.nextTick)()},openMoreByEvent(e){return x({$event:e}),(0,_vue.nextTick)()},closeMore(){return _ui.VxeUI.modal&&_ui.VxeUI.modal.close(r.moreId),(0,_vue.nextTick)()}};Object.assign(N,t,{});const w=(e,r)=>{const{showRemoveButton:s,showDownloadButton:d,showProgress:p,progressText:v,showPreview:g,showErrorStatus:m,dragSort:c,autoSubmit:_,showSubmitButton:f}=S,{fileList:h,fileCacheMaps:x}=B,w=P.value,y=L.value,I=V.value,b=A.value,C=D.option,U=D.action,E=D.corner,M=D.name,T={};return c&&1<e.length&&(T.onDragstart=de,T.onDragover=pe,T.onDragend=ve),e.map((l,t)=>{var e=k(l),o=x[e];let i=!1,a=!1,u=!1;var n=""+(l[I]||"");return o&&(i=o.loading,a="error"===o.status,u="pending"===o.status),(0,_vue.h)("div",Object.assign({key:c?e:t,class:["vxe-upload--file-item",{"is--preview":g,"is--loading":i,"is--pending":u,"is--error":a}],fileid:e,draggable:!!c||null},T),C?(0,_vn.getSlotVNs)(C({option:l,isMoreView:r,options:h})):[(0,_vue.h)("div",{class:"vxe-upload--file-item-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)()["UPLOAD_FILE_TYPE_"+(""+l[b]).toLocaleUpperCase()]||(0,_ui.getIcon)().UPLOAD_FILE_TYPE_DEFAULT})]),(0,_vue.h)("div",{class:"vxe-upload--file-item-name",title:n,onClick(e){var t,o;i||a||(t=l,o=S.previewMethod||(0,_ui.getConfig)().upload.previewMethod,S.showPreview&&(o?o({$upload:N,option:t}):Z(t)))}},M?(0,_vn.getSlotVNs)(M({option:l,isMoreView:r,options:h})):n),i?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]):(0,_ui.renderEmptyElement)(N),p&&i&&o?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-text"},v?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(v)?v({}):v),{percent:o.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[o.percent])):(0,_ui.renderEmptyElement)(N),!i&&(a&&m||u&&f&&!_)?(0,_vue.h)("div",{class:"vxe-upload--file-item-rebtn"},[(0,_vue.h)(_button.default,{icon:a?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:a?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){ee(l)}})]):(0,_ui.renderEmptyElement)(N),(0,_vue.h)("div",{class:"vxe-upload--file-item-btn-wrapper"},U?(0,_vn.getSlotVNs)(U({option:l,isMoreView:r,options:h,readonly:y})):[E?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(E({option:l,isMoreView:r,options:h,readonly:y}))):(0,_ui.renderEmptyElement)(N),!d||i||u?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-item-download-btn",onClick(e){{var t=e,o=l;e=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;const i=S.downloadMethod||(0,_ui.getConfig)().upload.downloadMethod;Promise.resolve(!e||e({$upload:N,option:o})).then(e=>{e?i?Promise.resolve(i({$upload:N,option:o})).then(()=>{ie(t,o)}).catch(e=>e):ie(t,o):R("download-fail",{option:o},t)})}}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_DOWNLOAD})]),!s||y||w||i?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-item-remove-btn",onClick(e){oe(e,l,t)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_REMOVE})])])])})},y=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:l,showButtonIcon:a,autoHiddenButton:u}=S,n=B["fileList"],r=P.value,s=L.value,d=X.value,p=W.value,v=Y.value,g=D.default,m=D.tip||D.hint;return s||!t?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-action"},[u&&v?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-action-btn",onClick:te},g?(0,_vn.getSlotVNs)(g({isMoreView:e,options:n,$upload:N})):[(0,_vue.h)(_button.default,{class:"vxe-upload--file-action-button",content:e||l?o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.fileBtnText"):"",icon:a?i||(0,_ui.getIcon)().UPLOAD_FILE_ADD:"",disabled:r})]),d&&(p||m)?(0,_vue.h)("div",{class:"vxe-upload--file-action-tip"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:N})):""+p):(0,_ui.renderEmptyElement)(N)])},I=(e,i)=>{const{showRemoveButton:l,showProgress:a,progressText:u,showPreview:p,showErrorStatus:v,dragSort:g,autoSubmit:m,showSubmitButton:c}=S,{fileList:_,fileCacheMaps:f}=B,h=P.value,x=L.value,w=s.value,y=K.value,I=D.option,b=D.action,C=D.corner,U={onMousedown:ge};return g&&1<e.length&&(U.onDragstart=de,U.onDragover=pe,U.onDragend=ve),e.map((n,r)=>{var e=k(n),t=f[e];let s=!1,d=!1,o=!1;return t&&(s=t.loading,d="error"===t.status,o="pending"===t.status),(0,_vue.h)("div",Object.assign({key:g?e:r,class:["vxe-upload--image-item",{"is--preview":p,"is--circle":w.circle,"is--loading":s,"is--pending":o,"is--error":d}],fileid:e,draggable:!!g||null},U),I?(0,_vn.getSlotVNs)(I({option:n,isMoreView:i,options:_})):[(0,_vue.h)("div",{class:"vxe-upload--image-item-box",style:i?null:y,onClick(e){if(!s&&!d){var t=n;var o=r;var i=S["showDownloadButton"];const a=B["fileList"];var l=S.previewMethod||(0,_ui.getConfig)().upload.previewMethod;const u=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;S.showPreview&&(l?l({$upload:N,option:t}):_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:a.map(e=>q(e)),activeIndex:o,showDownloadButton:i,beforeDownloadMethod:u?({index:e})=>u({$upload:N,option:a[e]}):void 0}))}}},[s&&t?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading"},[(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]),a?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-text"},u?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(u)?u({}):u),{percent:t.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[t.percent])):(0,_ui.renderEmptyElement)(N)]):(0,_ui.renderEmptyElement)(N),(0,_vue.h)("div",{class:"vxe-upload--image-item-img-wrapper",title:(0,_ui.getI18n)("vxe.upload.viewItemTitle")},[(0,_vue.h)("img",{class:"vxe-upload--image-item-img",src:(e=n,(t=S.getThumbnailUrlMethod||(0,_ui.getConfig)().upload.getThumbnailUrlMethod)?t({$upload:N,option:e}):q(e))})]),!s&&(d&&v||o&&c&&!m)?(0,_vue.h)("div",{class:"vxe-upload--image-item-rebtn"},[(0,_vue.h)(_button.default,{icon:d?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:d?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){ee(n)}})]):(0,_ui.renderEmptyElement)(N),(0,_vue.h)("div",{class:"vxe-upload--image-item-btn-wrapper",onClick(e){e.stopPropagation()}},b?(0,_vn.getSlotVNs)(b({option:n,isMoreView:i,options:_,readonly:x})):[C?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(C({option:n,isMoreView:i,options:_,readonly:x}))):(0,_ui.renderEmptyElement)(N),!l||x||h||s?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--image-item-remove-btn",onClick(e){e.stopPropagation(),oe(e,n,r)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_IMAGE_REMOVE})])])])])})},b=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:l,showButtonIcon:a,autoHiddenButton:u}=S,n=B["fileList"],r=L.value,s=X.value,d=W.value,p=Y.value,v=K.value,g=D.default,m=D.tip||D.hint;return r||!t||u&&p?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{key:"action",class:"vxe-upload--image-action"},[(0,_vue.h)("div",{class:"vxe-upload--image-action-btn",onClick:te},g?g({isMoreView:e,options:n,$upload:N}):[(0,_vue.h)("div",{class:"vxe-upload--image-action-box",style:e?null:v},[a?(0,_vue.h)("div",{class:"vxe-upload--image-action-icon"},[(0,_vue.h)("i",{class:i||(0,_ui.getIcon)().UPLOAD_IMAGE_ADD})]):(0,_ui.renderEmptyElement)(N),e||l?(0,_vue.h)("div",{class:"vxe-upload--image-action-content"},o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.imgBtnText")):(0,_ui.renderEmptyElement)(N),s&&(d||m)?(0,_vue.h)("div",{class:"vxe-upload--image-action-hint"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:N})):""+d):(0,_ui.renderEmptyElement)(N)])])])};const o=(0,_vue.ref)(0);return(0,_vue.watch)(()=>S.modelValue?S.modelValue.length:0,()=>{o.value++}),(0,_vue.watch)(()=>S.modelValue,()=>{o.value++}),(0,_vue.watch)(o,()=>{u()}),(0,_vue.onMounted)(()=>{S.multiple&&S.singleMode&&(0,_log.errLog)("vxe.error.errConflicts",["[upload] multiple","single-mode"]),S.imageStyle&&(0,_log.warnLog)("vxe.error.delProp",["[upload] image-style","image-config"]),S.dragSort&&(0,_dom.initTpImg)(),_ui.globalEvents.on(N,"paste",me),_ui.globalEvents.on(N,"mousedown",ce),_ui.globalEvents.on(N,"blur",_e)}),(0,_vue.onUnmounted)(()=>{B.isDragUploadStatus=!1,_ui.globalEvents.off(N,"paste"),_ui.globalEvents.off(N,"mousedown"),_ui.globalEvents.off(N,"blur")}),u(),N.renderVN=()=>{var{showErrorStatus:e,dragToUpload:t,pasteToUpload:o,dragSort:i,dragPlaceholder:l}=S,{isDragUploadStatus:a,showMorePopup:u,isActivated:n,dragIndex:r}=B,s=C.value,d=P.value,p=L.value,v=h.value,g={onMousedown:ge};return t&&-1===r&&(g.onDragover=ae,g.onDragleave=le,g.onDrop=ue),(0,_vue.h)("div",Object.assign({ref:m,class:["vxe-upload",{["size--"+s]:s,"is--active":n,"is--readonly":p,"is--disabled":d,"is--paste":o,"show--error":e,"is--drag":a}]},g),[(v?()=>{var{showList:e,dragSort:t}=S;const{fileList:o,isDragMove:i}=B;var l=J.value;const a=D.moreButton||D["more-button"],{maxCount:u,showMoreButton:n}=l;let r=o,s=0;return u&&o.length>u&&(s=o.length-u,r=o.slice(0,u)),(0,_vue.h)("div",{key:"image",class:"vxe-upload--image-wrapper"},e?[t?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(i?"":"-disabled"),tag:"div",class:"vxe-upload--image-list"},{default:()=>I(r,!1).concat([n&&s?(0,_vue.h)("div",{key:"om",class:"vxe-upload--image-over-more"},a?(0,_vn.getSlotVNs)(a({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(N),b(!1)])}):(0,_vue.h)("div",{class:"vxe-upload--image-list"},I(r,!1).concat([n&&s?(0,_vue.h)("div",{class:"vxe-upload--image-over-more"},a?(0,_vn.getSlotVNs)(a({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(N),b(!1)]))]:[(0,_vue.h)("div",{class:"vxe-upload--image-list"},[b(!1)])])}:()=>{var{showList:e,moreConfig:t,dragSort:o}=S,{fileList:i,isDragMove:l}=B,{maxCount:a,showMoreButton:u,layout:n}=J.value,n="horizontal"===n,r=D.moreButton||D["more-button"];let s=i,d=0;return a&&i.length>a&&(d=i.length-a,s=i.slice(0,a)),(0,_vue.h)("div",{key:"all",class:"vxe-upload--file-wrapper"},e?[u&&t&&n?(0,_ui.renderEmptyElement)(N):y(!0),s.length||u&&n?(0,_vue.h)("div",{class:["vxe-upload--file-list-wrapper",{"is--horizontal":n}]},[s.length?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(l?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(s,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(s,!1)):(0,_ui.renderEmptyElement)(N),u&&d?(0,_vue.h)("div",{class:"vxe-upload--file-over-more"},r?(0,_vn.getSlotVNs)(r({options:i})):[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[i.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(N),u&&t&&n?y(!1):(0,_ui.renderEmptyElement)(N)]):(0,_ui.renderEmptyElement)(N)]:[y(!1)])})(),i?(0,_vue.h)("div",{ref:_,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(N),a&&!u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},l||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(N)])},N},render(){return this.renderVN()}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_dom=require("../../ui/src/dom"),_util=require("./util"),_button=_interopRequireDefault(require("../../button/src/button"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createReactData(){return{isDragUploadStatus:!1,showMorePopup:!1,isActivated:!1,fileList:[],fileCacheMaps:{},isDragMove:!1,dragIndex:-1,dragTipText:""}}function createInternalData(){return{moreId:_xeUtils.default.uniqueId("upload"),imagePreviewTypes:["jpg","jpeg","png","gif"],prevDragIndex:-1}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeUpload",props:{modelValue:[Array,String,Object],showList:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showList},moreConfig:Object,readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},autoSubmit:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoSubmit},mode:{type:String,default:()=>(0,_ui.getConfig)().upload.mode},imageTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageTypes,!0)},imageConfig:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageConfig,!0)},imageStyle:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageStyle,!0)},fileTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.fileTypes,!0)},dragSort:Boolean,dragToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.dragToUpload,!0)},dragPlaceholder:{type:String,default:()=>(0,_ui.getConfig)().upload.dragPlaceholder},pasteToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.pasteToUpload,!0)},keyField:String,singleMode:Boolean,urlMode:Boolean,urlArgs:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.urlArgs},multiple:Boolean,limitSize:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitSize},showLimitSize:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitSize},limitSizeText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitSizeText},limitCount:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitCount},showLimitCount:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitCount},limitCountText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitCountText},nameField:{type:String,default:()=>(0,_ui.getConfig)().upload.nameField},typeField:{type:String,default:()=>(0,_ui.getConfig)().upload.typeField},urlField:{type:String,default:()=>(0,_ui.getConfig)().upload.urlField},sizeField:{type:String,default:()=>(0,_ui.getConfig)().upload.sizeField},showErrorStatus:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showErrorStatus},showProgress:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showProgress},progressText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.progressText},showSubmitButton:Boolean,autoHiddenButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoHiddenButton},showUploadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showUploadButton},buttonText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.buttonText},buttonIcon:{type:String,default:()=>(0,_ui.getConfig)().upload.buttonIcon},showButtonText:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonText},showButtonIcon:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonIcon},showRemoveButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showRemoveButton},showDownloadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showDownloadButton},showPreview:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showPreview},showTip:{type:Boolean,default:()=>null},maxSimultaneousUploads:{type:Number,default:()=>(0,_ui.getConfig)().upload.maxSimultaneousUploads},tipText:[String,Number,Function],hintText:String,previewMethod:Function,uploadMethod:Function,beforeRemoveMethod:Function,removeMethod:Function,beforeDownloadMethod:Function,downloadMethod:Function,getUrlMethod:Function,getThumbnailUrlMethod:Function,size:{type:String,default:()=>(0,_ui.getConfig)().upload.size||(0,_ui.getConfig)().size}},emits:["update:modelValue","add","remove","remove-fail","download","download-fail","upload-success","upload-error","sort-dragend","more-visible"],setup(D,e){const{emit:n,slots:S}=e,U=(0,_vue.inject)("$xeForm",null),E=(0,_vue.inject)("xeFormItemInfo",null),i=(0,_vue.inject)("$xeTable",null);var t=_xeUtils.default.uniqueId();const C=(0,_ui.useSize)(D)["computeSize"],m=(0,_vue.ref)(),c=(0,_vue.ref)(),_=(0,_vue.ref)(),f=(0,_vue.ref)(),B=(0,_vue.reactive)(createReactData()),r=createInternalData(),a={refElem:m},L=(0,_vue.computed)(()=>{var e=D["readonly"];return null===e?!!U&&U.props.readonly:e}),P=(0,_vue.computed)(()=>{var e=D["disabled"];return null===e?!!U&&U.props.disabled:e}),M=(0,_vue.computed)(()=>D.keyField||"_X_KEY"),h=(0,_vue.computed)(()=>"image"===D.mode),V=(0,_vue.computed)(()=>D.nameField||"name"),A=(0,_vue.computed)(()=>D.typeField||"type"),T=(0,_vue.computed)(()=>D.urlField||"url"),F=(0,_vue.computed)(()=>D.sizeField||"size"),H=(0,_vue.computed)(()=>1024*_xeUtils.default.toNumber(D.limitSize)*1024),O=(0,_vue.computed)(()=>D.multiple?_xeUtils.default.toNumber(D.limitCount):1),Y=(0,_vue.computed)(()=>{var e=D["multiple"],t=B["fileList"],o=O.value;return e?!o||t.length>=o:1<=t.length}),Q=(0,_vue.computed)(()=>{var e=_xeUtils.default.toNumber(D.limitSize);return e?1048576<e?e/1048576+"T":1024<e?e/1024+"G":e+"M":""}),X=(0,_vue.computed)(()=>{var{showTip:e,tipText:t}=D;return _xeUtils.default.isBoolean(e)||(e=(0,_ui.getConfig)().upload.showTip,_xeUtils.default.isBoolean(e))?e:!!t}),W=(0,_vue.computed)(()=>{var{limitSize:e,fileTypes:t,multiple:o,limitCount:i}=D,a=D.tipText||D.hintText,l=h.value,u=Q.value;return _xeUtils.default.isString(a)?a:_xeUtils.default.isFunction(a)?""+a({}):(a=[],l?(o&&i&&a.push((0,_ui.getI18n)("vxe.upload.imgCountHint",[i])),e&&u&&a.push((0,_ui.getI18n)("vxe.upload.imgSizeHint",[u]))):(t&&t.length&&a.push((0,_ui.getI18n)("vxe.upload.fileTypeHint",[t.join("/")])),e&&u&&a.push((0,_ui.getI18n)("vxe.upload.fileSizeHint",[u])),o&&i&&a.push((0,_ui.getI18n)("vxe.upload.fileCountHint",[i]))),a.join((0,_ui.getI18n)("vxe.base.comma")))}),s=(0,_vue.computed)(()=>Object.assign({},D.imageConfig||D.imageStyle)),K=(0,_vue.computed)(()=>{var{width:e,height:t}=s.value,o={};return e&&(o.width=(0,_dom.toCssUnit)(e)),t&&(o.height=(0,_dom.toCssUnit)(t)),o}),J=(0,_vue.computed)(()=>Object.assign({showMoreButton:!0},D.moreConfig)),l={},N={xID:t,props:D,context:e,reactData:B,internalData:r,getRefMaps:()=>a,getComputeMaps:()=>l},z=()=>_xeUtils.default.uniqueId(),k=e=>{return e[M.value]},u=()=>{var{modelValue:e,multiple:t}=D,o=L.value;const a=M.value,l=V.value,u=A.value,n=T.value,r=F.value;e=e?(e?_xeUtils.default.isArray(e)?e:[e]:[]).map(e=>{if(!e||_xeUtils.default.isString(e)){var t=""+(e||""),o=_xeUtils.default.parseUrl(e);const i=(o?o.searchQuery[l]:"")||decodeURIComponent(""+(t||"")).split("/").pop()||"";return{[l]:i,[u]:(o?o.searchQuery[u]:"")||R(i),[n]:t,[r]:_xeUtils.default.toNumber(o?o.searchQuery[r]:0)||0,[a]:z()}}const i=e[l]||"";return e[l]=i,e[u]=e[u]||R(i),e[n]=e[n]||"",e[r]=e[r]||0,e[a]=e[a]||z(),e}):[];B.fileList=o||t?e:e.slice(0,1)},R=e=>{var t=e.lastIndexOf(".");return 0<t?e.substring(t+1).toLowerCase():""},j=(e,t,o)=>{n(e,(0,_ui.createEvent)(o,{$upload:N},t))},$=e=>{const{singleMode:t,urlMode:o,urlArgs:i}=D,a=T.value,l=V.value;let u=e?e.slice(0):[];o&&(u=u.map(e=>{var t=e[a];if(t&&i){var o=_xeUtils.default.parseUrl(t);if(!o.searchQuery[l]&&-1===t.indexOf("blob:"))return""+t+(-1===t.indexOf("?")?"?":"&")+l+"="+encodeURIComponent(e[l]||"")}return t})),e=t?u[0]||null:u,n("update:modelValue",e)},q=e=>{var t=D.getUrlMethod||(0,_ui.getConfig)().upload.getUrlMethod,o=T.value;return t?t({$upload:N,option:e}):e[o]},Z=t=>{var{imageTypes:e,showDownloadButton:o}=D;const i=A.value,a=D.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;var l=r["imagePreviewTypes"];l.concat(e||[]).some(e=>(""+e).toLowerCase()===(""+t[i]).toLowerCase())&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:[q(t)],showDownloadButton:o,beforeDownloadMethod:a?()=>a({$upload:N,option:t}):void 0})},G=(o,e)=>{const i=D["showErrorStatus"],a=k(o);var t=D.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod;return t?Promise.resolve(t({$upload:N,file:e,option:o,updateProgress(e){var t=B["fileCacheMaps"],t=t[k(o)];t&&(t.percent=Math.max(0,Math.min(99,_xeUtils.default.toNumber(e))))}})).then(e=>{var t=B["fileCacheMaps"],t=t[a];t&&(t.percent=100,t.status="success"),Object.assign(o,e),j("upload-success",{option:o,data:e},null)}).catch(e=>{var t=B["fileCacheMaps"],t=t[a];t&&(t.status="error"),i?Object.assign(o,e):B.fileList=B.fileList.filter(e=>k(e)!==a),j("upload-error",{option:o,data:e},null)}).finally(()=>{var e=B["fileCacheMaps"],e=e[a];e&&(e.loading=!1)}):(t=B["fileCacheMaps"],(e=t[a])&&(e.loading=!1),Promise.resolve())},ee=e=>{const{uploadMethod:t,urlMode:o}=D;var i,a=B["fileCacheMaps"],a=a[k(e)];(t||(0,_ui.getConfig)().upload.uploadMethod)&&a&&(i=a.file,a.loading=!0,a.status="pending",a.percent=0,G(e,i).then(()=>{o&&$(B.fileList)}))},d=(t,o)=>{const{multiple:e,urlMode:i,showLimitSize:a,limitSizeText:l,showLimitCount:u,limitCountText:n,autoSubmit:r}=D;var s=B["fileList"];const d=D.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod,p=M.value,v=V.value,g=A.value,m=T.value,c=F.value;var _=H.value;const f=O.value;var h=Q.value;let x=t;if(e&&f){if(u&&s.length>=f)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:n?""+(_xeUtils.default.isFunction(n)?n({maxCount:f}):n):(0,_ui.getI18n)("vxe.upload.overCountErr",[f])}));const b=x.length-(f-s.length);if(u&&0<b){const C=x.slice(f-s.length);n?_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:""+(_xeUtils.default.isFunction(n)?n({maxCount:f}):n)}):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",width:null,slots:{default(){return(0,_vue.h)("div",{class:"vxe-upload--file-message-over-error"},[(0,_vue.h)("div",{},(0,_ui.getI18n)("vxe.upload.overCountExtraErr",[f,b])),(0,_vue.h)("div",{class:"vxe-upload--file-message-over-extra"},C.map((e,t)=>(0,_vue.h)("div",{key:t,class:"vxe-upload--file-message-over-extra-item"},e.name)))])}}})}x=x.slice(0,f-s.length)}if(a&&_)for(let e=0;e<t.length;e++)if(t[0].size>_)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:l?""+(_xeUtils.default.isFunction(l)?l({maxSize:_}):l):(0,_ui.getI18n)("vxe.upload.overSizeErr",[h])}));const w=Object.assign({},B.fileCacheMaps),y=e?s:[],I=[];x.forEach(e=>{var t=e["name"],o=z(),t={[v]:t,[g]:R(t),[c]:e.size,[m]:URL.createObjectURL(e),[p]:o},o=(d&&(w[o]={file:e,loading:!!r,status:"pending",percent:0}),(0,_vue.reactive)(t));d&&r&&I.push(G(o,e)),y.push(o)}),B.fileList=y,B.fileCacheMaps=w,y.forEach(e=>{j("add",{option:e},o)}),Promise.all(i?I:[]).then(()=>{$(y),U&&E&&U.triggerItemEvent(o,E.itemConfig.field,y)})},p=t=>{var{multiple:e,imageTypes:o,fileTypes:i}=D,a=P.value,l=h.value;return a?Promise.resolve({status:!1,files:[],file:null}):(0,_util.readLocalFile)({multiple:e,types:l?o:i}).then(e=>(d(e.files,t),e))},te=e=>{p(e).catch(()=>{})},v=(e,t,o)=>{var i=B["fileList"];i.splice(o,1),$(i),U&&E&&U.triggerItemEvent(e,E.itemConfig.field,i),j("remove",{option:t},e)},oe=(t,o,i)=>{var e=D.beforeRemoveMethod||(0,_ui.getConfig)().upload.beforeRemoveMethod;const a=D.removeMethod||(0,_ui.getConfig)().upload.removeMethod;Promise.resolve(!e||e({$upload:N,option:o})).then(e=>{e?a?Promise.resolve(a({$upload:N,option:o})).then(()=>{v(t,o,i)}).catch(e=>e):v(t,o,i):j("remove-fail",{option:o},t)})},ie=(e,t)=>{j("download",{option:t},e)},ae=e=>{var t,o,i,a=e.currentTarget,{clientX:e,clientY:l}=e;a&&({x:a,y:t,height:o,width:i}=a.getBoundingClientRect(),e<a||a+i<e||l<t||t+o<l)&&(B.isDragUploadStatus=!1)},le=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),B.isDragUploadStatus=!0)},g=(e,t)=>{const{imageTypes:o,fileTypes:i}=D;var a=r["imagePreviewTypes"];if(h.value){const l=a.concat(o&&o.length?o:[]);t=t.filter(e=>{const t=(""+(e.type.split("/")[1]||"")).toLowerCase();return!!l.some(e=>(""+e).toLowerCase()===t)})}else if(i&&i.length){const u=[];if(t.forEach(e=>{const t=R(e.name);i.some(e=>(""+e).toLowerCase()===t)||u.push(t)}),u.length)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.notType",[u.join(", ")]),status:"error"}))}t.length?d(t,e):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:(0,_ui.getI18n)("vxe.upload.uploadTypeErr")})},ue=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),(t=ne(t)).length)&&g(e,t),B.isDragUploadStatus=!1},ne=e=>{const t=[];return _xeUtils.default.arrayEach(e,e=>{e=e.getAsFile();e&&t.push(e)}),t},x=e=>{const v=L.value,g=h.value;e=e.$event;_ui.VxeUI.modal&&(_ui.VxeUI.modal.open({id:r.moreId,title:v?(0,_ui.getI18n)("vxe.upload.morePopup.readTitle"):(0,_ui.getI18n)("vxe.upload.morePopup."+(g?"imageTitle":"fileTitle")),width:660,height:500,escClosable:!0,showMaximize:!0,resize:!0,maskClosable:!0,slots:{default(){var{showErrorStatus:e,dragToUpload:t,dragSort:o,dragPlaceholder:i}=D,{isActivated:a,isDragMove:l,isDragUploadStatus:u,dragIndex:n}=B;const r=B["fileList"];var s=P.value,d=S.moreContent||S["more-content"],p={};return t&&-1===n&&(p.onDragover=le,p.onDragleave=ae,p.onDrop=ue),(0,_vue.h)("div",Object.assign({ref:c,class:["vxe-upload--more-popup",{"is--readonly":v,"is--disabled":s,"is--active":a,"show--error":e,"is--drag":u}]},p),d?(0,_vn.getSlotVNs)(d({options:r})):[g?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(l?"":"-disabled"),tag:"div",class:"vxe-upload--image-more-list"},{default:()=>I(r,!0).concat(b(!0))}):(0,_vue.h)("div",{class:"vxe-upload--image-more-list"},I(r,!0).concat(b(!0))):(0,_vue.h)("div",{class:"vxe-upload--file-more-list"},[y(!0),o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(l?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(r,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(r,!0))]),o?(0,_vue.h)("div",{ref:f,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(N),u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},i||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(N)])}},onShow(){B.showMorePopup=!0},onHide({$event:e}){B.showMorePopup=!1,e&&j("more-visible",{visible:!1},e)}}),e)&&j("more-visible",{visible:!0},e)},re=(e,t,o)=>{var i,a=B["showMorePopup"],l=m.value,u=c.value,u=a?u:l;u&&(l=u.getBoundingClientRect(),u=_.value,i=f.value,a=a?i:u)&&(i=t.getBoundingClientRect(),a.style.display="block",a.style.top=Math.max(1,i.y-l.y)+"px",a.style.left=Math.max(1,i.x-l.x)+"px",a.style.height=i.height+"px",a.style.width=i.width-1+"px",a.setAttribute("drag-pos",o))},se=()=>{var e=_.value,t=f.value;e&&(e.style.display=""),t&&(t.style.display="")},de=e=>{e.stopPropagation(),e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0);const t=e.currentTarget;e=t.parentElement,e=_xeUtils.default.findIndexOf(Array.from(e.children),e=>t===e);B.isDragMove=!0,B.dragIndex=e,setTimeout(()=>{B.isDragMove=!1},500)},pe=t=>{t.stopPropagation(),t.preventDefault();var o=B["dragIndex"];if(-1!==o){var i=h.value;const l=t.currentTarget;var a=l.parentElement,a=_xeUtils.default.findIndexOf(Array.from(a.children),e=>l===e);let e="";e=i?t.clientX-l.getBoundingClientRect().x<l.clientWidth/2?"left":"right":t.clientY-l.getBoundingClientRect().y<l.clientHeight/2?"top":"bottom",o===a?re(t,l,e):(re(t,l,e),r.prevDragIndex=a,r.prevDragPos=e)}},ve=e=>{var{fileList:t,dragIndex:o}=B,{prevDragIndex:i,prevDragPos:a}=r,l="bottom"===a||"right"===a?1:0,u=t[o];const n=t[i];u&&n&&(t.splice(o,1),i=_xeUtils.default.findIndexOf(t,e=>n===e)+l,t.splice(i,0,u),j("sort-dragend",{oldItem:u,newItem:n,dragPos:a,offsetIndex:l,_index:{newIndex:i,oldIndex:o}},e)),se(),B.dragIndex=-1},ge=e=>{i&&e.stopPropagation(),B.isActivated=!0},me=e=>{var t=D["pasteToUpload"],o=B["isActivated"];o&&t&&(o=e.clipboardData||e.originalEvent.clipboardData)&&(t=o["items"],t)&&(o=ne(t)).length&&(e.preventDefault(),g(e,o))},ce=e=>{var t=m.value,o=c.value;let i=(0,_dom.getEventTargetNode)(e,t).flag;!i&&o&&(o=(t=o.parentElement||o)&&t.parentElement,i=(0,_dom.getEventTargetNode)(e,o).flag),B.isActivated=i},_e=()=>{B.isActivated=!1};t={dispatchEvent:j,choose(){return p(null)},submit(i){var e=D["maxSimultaneousUploads"],e=_xeUtils.default.toNumber(e||1)||1;const{fileList:t,fileCacheMaps:a}=B,o=t.filter(e=>{e=k(e),e=a[e];return e&&("pending"===e.status||i&&"error"===e.status)}),l=e=>{var t=k(e),t=a[t];if(t){var o=t.file;if(o&&("pending"===t.status||i&&"error"===t.status))return t.loading=!0,t.percent=0,G(e,o).then(u)}return u()},u=()=>{var e;return o.length?(e=o[0],o.splice(0,1),l(e).then(u)):Promise.resolve()};return Promise.all(o.splice(0,e).map(l)).then(()=>{})},getMoreVisible(){return B.showMorePopup},openMore(){return x({$event:new Event("click")}),(0,_vue.nextTick)()},openMoreByEvent(e){return x({$event:e}),(0,_vue.nextTick)()},closeMore(){return _ui.VxeUI.modal&&_ui.VxeUI.modal.close(r.moreId),(0,_vue.nextTick)()}};Object.assign(N,t,{});const w=(e,r)=>{const{showRemoveButton:s,showDownloadButton:d,showProgress:p,progressText:v,showPreview:g,showErrorStatus:m,dragSort:c,autoSubmit:_,showSubmitButton:f}=D,{fileList:h,fileCacheMaps:x}=B,w=P.value,y=L.value,I=V.value,b=A.value,C=S.option,U=S.action,E=S.corner,M=S.name,T={};return c&&1<e.length&&(T.onDragstart=de,T.onDragover=pe,T.onDragend=ve),e.map((a,t)=>{var e=k(a),o=x[e];let i=!1,l=!1,u=!1;var n=""+(a[I]||"");return o&&(i=o.loading,l="error"===o.status,u="pending"===o.status),(0,_vue.h)("div",Object.assign({key:c?e:t,class:["vxe-upload--file-item",{"is--preview":g,"is--loading":i,"is--pending":u,"is--error":l}],fileid:e,draggable:!!c||null},T),C?(0,_vn.getSlotVNs)(C({option:a,isMoreView:r,options:h})):[(0,_vue.h)("div",{class:"vxe-upload--file-item-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)()["UPLOAD_FILE_TYPE_"+(""+a[b]).toLocaleUpperCase()]||(0,_ui.getIcon)().UPLOAD_FILE_TYPE_DEFAULT})]),(0,_vue.h)("div",{class:"vxe-upload--file-item-name",title:n,onClick(e){var t,o;i||l||(t=a,o=D.previewMethod||(0,_ui.getConfig)().upload.previewMethod,D.showPreview&&(o?o({$upload:N,option:t}):Z(t)))}},M?(0,_vn.getSlotVNs)(M({option:a,isMoreView:r,options:h})):n),i?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]):(0,_ui.renderEmptyElement)(N),p&&i&&o?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-text"},v?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(v)?v({}):v),{percent:o.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[o.percent])):(0,_ui.renderEmptyElement)(N),!i&&(l&&m||u&&f&&!_)?(0,_vue.h)("div",{class:"vxe-upload--file-item-rebtn"},[(0,_vue.h)(_button.default,{icon:l?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:l?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){ee(a)}})]):(0,_ui.renderEmptyElement)(N),(0,_vue.h)("div",{class:"vxe-upload--file-item-btn-wrapper"},U?(0,_vn.getSlotVNs)(U({option:a,isMoreView:r,options:h,readonly:y})):[E?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(E({option:a,isMoreView:r,options:h,readonly:y}))):(0,_ui.renderEmptyElement)(N),!d||i||u?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-item-download-btn",onClick(e){{var t=e,o=a;e=D.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;const i=D.downloadMethod||(0,_ui.getConfig)().upload.downloadMethod;Promise.resolve(!e||e({$upload:N,option:o})).then(e=>{e?i?Promise.resolve(i({$upload:N,option:o})).then(()=>{ie(t,o)}).catch(e=>e):ie(t,o):j("download-fail",{option:o},t)})}}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_DOWNLOAD})]),!s||y||w||i?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-item-remove-btn",onClick(e){oe(e,a,t)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_REMOVE})])])])})},y=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:a,showButtonIcon:l,autoHiddenButton:u}=D,n=B["fileList"],r=P.value,s=L.value,d=X.value,p=W.value,v=Y.value,g=S.default,m=S.tip||S.hint;return s||!t?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-action"},[u&&v?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--file-action-btn",onClick:te},g?(0,_vn.getSlotVNs)(g({isMoreView:e,options:n,$upload:N})):[(0,_vue.h)(_button.default,{class:"vxe-upload--file-action-button",content:e||a?o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.fileBtnText"):"",icon:l?i||(0,_ui.getIcon)().UPLOAD_FILE_ADD:"",disabled:r})]),d&&(p||m)?(0,_vue.h)("div",{class:"vxe-upload--file-action-tip"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:N})):""+p):(0,_ui.renderEmptyElement)(N)])},I=(e,i)=>{const{showRemoveButton:a,showProgress:l,progressText:u,showPreview:p,showErrorStatus:v,dragSort:g,autoSubmit:m,showSubmitButton:c}=D,{fileList:_,fileCacheMaps:f}=B,h=P.value,x=L.value,w=s.value,y=K.value,I=S.option,b=S.action,C=S.corner,U={onMousedown:ge};return g&&1<e.length&&(U.onDragstart=de,U.onDragover=pe,U.onDragend=ve),e.map((n,r)=>{var e=k(n),t=f[e];let s=!1,d=!1,o=!1;return t&&(s=t.loading,d="error"===t.status,o="pending"===t.status),(0,_vue.h)("div",Object.assign({key:g?e:r,class:["vxe-upload--image-item",{"is--preview":p,"is--circle":w.circle,"is--loading":s,"is--pending":o,"is--error":d}],fileid:e,draggable:!!g||null},U),I?(0,_vn.getSlotVNs)(I({option:n,isMoreView:i,options:_})):[(0,_vue.h)("div",{class:"vxe-upload--image-item-box",style:i?null:y,onClick(e){if(!s&&!d){var t=n;var o=r;var i=D["showDownloadButton"];const l=B["fileList"];var a=D.previewMethod||(0,_ui.getConfig)().upload.previewMethod;const u=D.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;D.showPreview&&(a?a({$upload:N,option:t}):_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:l.map(e=>q(e)),activeIndex:o,showDownloadButton:i,beforeDownloadMethod:u?({index:e})=>u({$upload:N,option:l[e]}):void 0}))}}},[s&&t?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading"},[(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]),l?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-text"},u?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(u)?u({}):u),{percent:t.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[t.percent])):(0,_ui.renderEmptyElement)(N)]):(0,_ui.renderEmptyElement)(N),(0,_vue.h)("div",{class:"vxe-upload--image-item-img-wrapper",title:(0,_ui.getI18n)("vxe.upload.viewItemTitle")},[(0,_vue.h)("img",{class:"vxe-upload--image-item-img",src:(e=n,(t=D.getThumbnailUrlMethod||(0,_ui.getConfig)().upload.getThumbnailUrlMethod)?t({$upload:N,option:e}):q(e))})]),!s&&(d&&v||o&&c&&!m)?(0,_vue.h)("div",{class:"vxe-upload--image-item-rebtn"},[(0,_vue.h)(_button.default,{icon:d?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:d?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){ee(n)}})]):(0,_ui.renderEmptyElement)(N),(0,_vue.h)("div",{class:"vxe-upload--image-item-btn-wrapper",onClick(e){e.stopPropagation()}},b?(0,_vn.getSlotVNs)(b({option:n,isMoreView:i,options:_,readonly:x})):[C?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(C({option:n,isMoreView:i,options:_,readonly:x}))):(0,_ui.renderEmptyElement)(N),!a||x||h||s?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{class:"vxe-upload--image-item-remove-btn",onClick(e){e.stopPropagation(),oe(e,n,r)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_IMAGE_REMOVE})])])])])})},b=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:a,showButtonIcon:l,autoHiddenButton:u}=D,n=B["fileList"],r=L.value,s=X.value,d=W.value,p=Y.value,v=K.value,g=S.default,m=S.tip||S.hint;return r||!t||u&&p?(0,_ui.renderEmptyElement)(N):(0,_vue.h)("div",{key:"action",class:"vxe-upload--image-action"},[(0,_vue.h)("div",{class:"vxe-upload--image-action-btn",onClick:te},g?g({isMoreView:e,options:n,$upload:N}):[(0,_vue.h)("div",{class:"vxe-upload--image-action-box",style:e?null:v},[l?(0,_vue.h)("div",{class:"vxe-upload--image-action-icon"},[(0,_vue.h)("i",{class:i||(0,_ui.getIcon)().UPLOAD_IMAGE_ADD})]):(0,_ui.renderEmptyElement)(N),e||a?(0,_vue.h)("div",{class:"vxe-upload--image-action-content"},o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.imgBtnText")):(0,_ui.renderEmptyElement)(N),s&&(d||m)?(0,_vue.h)("div",{class:"vxe-upload--image-action-hint"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:N})):""+d):(0,_ui.renderEmptyElement)(N)])])])};const o=(0,_vue.ref)(0);return(0,_vue.watch)(()=>D.modelValue?D.modelValue.length:0,()=>{o.value++}),(0,_vue.watch)(()=>D.modelValue,()=>{o.value++}),(0,_vue.watch)(o,()=>{u()}),(0,_vue.onMounted)(()=>{D.multiple&&D.singleMode&&(0,_log.errLog)("vxe.error.errConflicts",["[upload] multiple","single-mode"]),D.imageStyle&&(0,_log.warnLog)("vxe.error.delProp",["[upload] image-style","image-config"]),D.dragSort&&(0,_dom.initTpImg)(),_ui.globalEvents.on(N,"paste",me),_ui.globalEvents.on(N,"mousedown",ce),_ui.globalEvents.on(N,"blur",_e)}),(0,_vue.onBeforeUnmount)(()=>{B.isDragUploadStatus=!1,_ui.globalEvents.off(N,"paste"),_ui.globalEvents.off(N,"mousedown"),_ui.globalEvents.off(N,"blur"),_xeUtils.default.assign(B,createReactData()),_xeUtils.default.assign(r,createInternalData())}),u(),N.renderVN=()=>{var{showErrorStatus:e,dragToUpload:t,pasteToUpload:o,dragSort:i,dragPlaceholder:a}=D,{isDragUploadStatus:l,showMorePopup:u,isActivated:n,dragIndex:r}=B,s=C.value,d=P.value,p=L.value,v=h.value,g={onMousedown:ge};return t&&-1===r&&(g.onDragover=le,g.onDragleave=ae,g.onDrop=ue),(0,_vue.h)("div",Object.assign({ref:m,class:["vxe-upload",{["size--"+s]:s,"is--active":n,"is--readonly":p,"is--disabled":d,"is--paste":o,"show--error":e,"is--drag":l}]},g),[(v?()=>{var{showList:e,dragSort:t}=D;const{fileList:o,isDragMove:i}=B;var a=J.value;const l=S.moreButton||S["more-button"],{maxCount:u,showMoreButton:n}=a;let r=o,s=0;return u&&o.length>u&&(s=o.length-u,r=o.slice(0,u)),(0,_vue.h)("div",{key:"image",class:"vxe-upload--image-wrapper"},e?[t?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(i?"":"-disabled"),tag:"div",class:"vxe-upload--image-list"},{default:()=>I(r,!1).concat([n&&s?(0,_vue.h)("div",{key:"om",class:"vxe-upload--image-over-more"},l?(0,_vn.getSlotVNs)(l({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(N),b(!1)])}):(0,_vue.h)("div",{class:"vxe-upload--image-list"},I(r,!1).concat([n&&s?(0,_vue.h)("div",{class:"vxe-upload--image-over-more"},l?(0,_vn.getSlotVNs)(l({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(N),b(!1)]))]:[(0,_vue.h)("div",{class:"vxe-upload--image-list"},[b(!1)])])}:()=>{var{showList:e,moreConfig:t,dragSort:o}=D,{fileList:i,isDragMove:a}=B,{maxCount:l,showMoreButton:u,layout:n}=J.value,n="horizontal"===n,r=S.moreButton||S["more-button"];let s=i,d=0;return l&&i.length>l&&(d=i.length-l,s=i.slice(0,l)),(0,_vue.h)("div",{key:"all",class:"vxe-upload--file-wrapper"},e?[u&&t&&n?(0,_ui.renderEmptyElement)(N):y(!0),s.length||u&&n?(0,_vue.h)("div",{class:["vxe-upload--file-list-wrapper",{"is--horizontal":n}]},[s.length?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(s,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(s,!1)):(0,_ui.renderEmptyElement)(N),u&&d?(0,_vue.h)("div",{class:"vxe-upload--file-over-more"},r?(0,_vn.getSlotVNs)(r({options:i})):[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[i.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(N),u&&t&&n?y(!1):(0,_ui.renderEmptyElement)(N)]):(0,_ui.renderEmptyElement)(N)]:[y(!1)])})(),i?(0,_vue.h)("div",{ref:_,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(N),l&&!u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},a||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(N)])},N},render(){return this.renderVN()}});
|
|
@@ -21,76 +21,101 @@
|
|
|
21
21
|
flex-direction: row;
|
|
22
22
|
flex-wrap: wrap;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
.vxe-form--item-row > .vxe-form--item-col_1,
|
|
26
|
+
.vxe-col--inner > .vxe-form--item-col_1 {
|
|
25
27
|
width: 4.16667%;
|
|
26
28
|
}
|
|
27
|
-
.vxe-form--item-row > .vxe-form--item-col_2
|
|
29
|
+
.vxe-form--item-row > .vxe-form--item-col_2,
|
|
30
|
+
.vxe-col--inner > .vxe-form--item-col_2 {
|
|
28
31
|
width: 8.33333%;
|
|
29
32
|
}
|
|
30
|
-
.vxe-form--item-row > .vxe-form--item-col_3
|
|
33
|
+
.vxe-form--item-row > .vxe-form--item-col_3,
|
|
34
|
+
.vxe-col--inner > .vxe-form--item-col_3 {
|
|
31
35
|
width: 12.5%;
|
|
32
36
|
}
|
|
33
|
-
.vxe-form--item-row > .vxe-form--item-col_4
|
|
37
|
+
.vxe-form--item-row > .vxe-form--item-col_4,
|
|
38
|
+
.vxe-col--inner > .vxe-form--item-col_4 {
|
|
34
39
|
width: 16.66667%;
|
|
35
40
|
}
|
|
36
|
-
.vxe-form--item-row > .vxe-form--item-col_5
|
|
41
|
+
.vxe-form--item-row > .vxe-form--item-col_5,
|
|
42
|
+
.vxe-col--inner > .vxe-form--item-col_5 {
|
|
37
43
|
width: 20.83333%;
|
|
38
44
|
}
|
|
39
|
-
.vxe-form--item-row > .vxe-form--item-col_6
|
|
45
|
+
.vxe-form--item-row > .vxe-form--item-col_6,
|
|
46
|
+
.vxe-col--inner > .vxe-form--item-col_6 {
|
|
40
47
|
width: 25%;
|
|
41
48
|
}
|
|
42
|
-
.vxe-form--item-row > .vxe-form--item-col_7
|
|
49
|
+
.vxe-form--item-row > .vxe-form--item-col_7,
|
|
50
|
+
.vxe-col--inner > .vxe-form--item-col_7 {
|
|
43
51
|
width: 29.16667%;
|
|
44
52
|
}
|
|
45
|
-
.vxe-form--item-row > .vxe-form--item-col_8
|
|
53
|
+
.vxe-form--item-row > .vxe-form--item-col_8,
|
|
54
|
+
.vxe-col--inner > .vxe-form--item-col_8 {
|
|
46
55
|
width: 33.33333%;
|
|
47
56
|
}
|
|
48
|
-
.vxe-form--item-row > .vxe-form--item-col_9
|
|
57
|
+
.vxe-form--item-row > .vxe-form--item-col_9,
|
|
58
|
+
.vxe-col--inner > .vxe-form--item-col_9 {
|
|
49
59
|
width: 37.5%;
|
|
50
60
|
}
|
|
51
|
-
.vxe-form--item-row > .vxe-form--item-col_10
|
|
61
|
+
.vxe-form--item-row > .vxe-form--item-col_10,
|
|
62
|
+
.vxe-col--inner > .vxe-form--item-col_10 {
|
|
52
63
|
width: 41.66667%;
|
|
53
64
|
}
|
|
54
|
-
.vxe-form--item-row > .vxe-form--item-col_11
|
|
65
|
+
.vxe-form--item-row > .vxe-form--item-col_11,
|
|
66
|
+
.vxe-col--inner > .vxe-form--item-col_11 {
|
|
55
67
|
width: 45.83333%;
|
|
56
68
|
}
|
|
57
|
-
.vxe-form--item-row > .vxe-form--item-col_12
|
|
69
|
+
.vxe-form--item-row > .vxe-form--item-col_12,
|
|
70
|
+
.vxe-col--inner > .vxe-form--item-col_12 {
|
|
58
71
|
width: 50%;
|
|
59
72
|
}
|
|
60
|
-
.vxe-form--item-row > .vxe-form--item-col_13
|
|
73
|
+
.vxe-form--item-row > .vxe-form--item-col_13,
|
|
74
|
+
.vxe-col--inner > .vxe-form--item-col_13 {
|
|
61
75
|
width: 54.16667%;
|
|
62
76
|
}
|
|
63
|
-
.vxe-form--item-row > .vxe-form--item-col_14
|
|
77
|
+
.vxe-form--item-row > .vxe-form--item-col_14,
|
|
78
|
+
.vxe-col--inner > .vxe-form--item-col_14 {
|
|
64
79
|
width: 58.33333%;
|
|
65
80
|
}
|
|
66
|
-
.vxe-form--item-row > .vxe-form--item-col_15
|
|
81
|
+
.vxe-form--item-row > .vxe-form--item-col_15,
|
|
82
|
+
.vxe-col--inner > .vxe-form--item-col_15 {
|
|
67
83
|
width: 62.5%;
|
|
68
84
|
}
|
|
69
|
-
.vxe-form--item-row > .vxe-form--item-col_16
|
|
85
|
+
.vxe-form--item-row > .vxe-form--item-col_16,
|
|
86
|
+
.vxe-col--inner > .vxe-form--item-col_16 {
|
|
70
87
|
width: 66.66667%;
|
|
71
88
|
}
|
|
72
|
-
.vxe-form--item-row > .vxe-form--item-col_17
|
|
89
|
+
.vxe-form--item-row > .vxe-form--item-col_17,
|
|
90
|
+
.vxe-col--inner > .vxe-form--item-col_17 {
|
|
73
91
|
width: 70.83333%;
|
|
74
92
|
}
|
|
75
|
-
.vxe-form--item-row > .vxe-form--item-col_18
|
|
93
|
+
.vxe-form--item-row > .vxe-form--item-col_18,
|
|
94
|
+
.vxe-col--inner > .vxe-form--item-col_18 {
|
|
76
95
|
width: 75%;
|
|
77
96
|
}
|
|
78
|
-
.vxe-form--item-row > .vxe-form--item-col_19
|
|
97
|
+
.vxe-form--item-row > .vxe-form--item-col_19,
|
|
98
|
+
.vxe-col--inner > .vxe-form--item-col_19 {
|
|
79
99
|
width: 79.16667%;
|
|
80
100
|
}
|
|
81
|
-
.vxe-form--item-row > .vxe-form--item-col_20
|
|
101
|
+
.vxe-form--item-row > .vxe-form--item-col_20,
|
|
102
|
+
.vxe-col--inner > .vxe-form--item-col_20 {
|
|
82
103
|
width: 83.33333%;
|
|
83
104
|
}
|
|
84
|
-
.vxe-form--item-row > .vxe-form--item-col_21
|
|
105
|
+
.vxe-form--item-row > .vxe-form--item-col_21,
|
|
106
|
+
.vxe-col--inner > .vxe-form--item-col_21 {
|
|
85
107
|
width: 87.5%;
|
|
86
108
|
}
|
|
87
|
-
.vxe-form--item-row > .vxe-form--item-col_22
|
|
109
|
+
.vxe-form--item-row > .vxe-form--item-col_22,
|
|
110
|
+
.vxe-col--inner > .vxe-form--item-col_22 {
|
|
88
111
|
width: 91.66667%;
|
|
89
112
|
}
|
|
90
|
-
.vxe-form--item-row > .vxe-form--item-col_23
|
|
113
|
+
.vxe-form--item-row > .vxe-form--item-col_23,
|
|
114
|
+
.vxe-col--inner > .vxe-form--item-col_23 {
|
|
91
115
|
width: 95.83333%;
|
|
92
116
|
}
|
|
93
|
-
.vxe-form--item-row > .vxe-form--item-col_24
|
|
117
|
+
.vxe-form--item-row > .vxe-form--item-col_24,
|
|
118
|
+
.vxe-col--inner > .vxe-form--item-col_24 {
|
|
94
119
|
width: 100%;
|
|
95
120
|
}
|
|
96
121
|
|