vxe-pc-ui 4.14.21 → 4.14.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +41989 -0
- package/dist/style.css +1 -0
- package/dist/style.min.css +1 -0
- package/es/form/src/form.js +2 -1
- package/es/form/src/render.js +1 -1
- package/es/tabs/src/tabs.js +4 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/form/src/form.js +2 -1
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +1 -1
- package/lib/form/src/render.min.js +1 -1
- package/lib/index.umd.js +10 -5
- package/lib/index.umd.min.js +1 -1
- package/lib/tabs/src/tabs.js +5 -1
- package/lib/tabs/src/tabs.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/package.json +5 -2
- package/packages/form/src/form.ts +2 -1
- package/packages/form/src/render.ts +1 -1
- package/packages/tabs/src/tabs.ts +4 -1
- package/types/components/colgroup.d.ts +3 -71
- package/types/components/column.d.ts +6 -0
- package/types/components/form-item.d.ts +1 -1
- package/types/components/table.d.ts +1 -0
- /package/es/icon/{iconfont.1779687105351.ttf → iconfont.1779767616126.ttf} +0 -0
- /package/es/icon/{iconfont.1779687105351.woff → iconfont.1779767616126.woff} +0 -0
- /package/es/icon/{iconfont.1779687105351.woff2 → iconfont.1779767616126.woff2} +0 -0
- /package/es/{iconfont.1779687105351.ttf → iconfont.1779767616126.ttf} +0 -0
- /package/es/{iconfont.1779687105351.woff → iconfont.1779767616126.woff} +0 -0
- /package/es/{iconfont.1779687105351.woff2 → iconfont.1779767616126.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1779687105351.ttf → iconfont.1779767616126.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1779687105351.woff → iconfont.1779767616126.woff} +0 -0
- /package/lib/icon/style/{iconfont.1779687105351.woff2 → iconfont.1779767616126.woff2} +0 -0
- /package/lib/{iconfont.1779687105351.ttf → iconfont.1779767616126.ttf} +0 -0
- /package/lib/{iconfont.1779687105351.woff → iconfont.1779767616126.woff} +0 -0
- /package/lib/{iconfont.1779687105351.woff2 → iconfont.1779767616126.woff2} +0 -0
package/lib/tabs/src/tabs.js
CHANGED
|
@@ -125,12 +125,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
125
125
|
});
|
|
126
126
|
const computeWrapperStyle = (0, _vue.computed)(() => {
|
|
127
127
|
const {
|
|
128
|
-
width
|
|
128
|
+
width,
|
|
129
|
+
height
|
|
129
130
|
} = props;
|
|
130
131
|
const stys = {};
|
|
131
132
|
if (width) {
|
|
132
133
|
stys.width = (0, _dom.toCssUnit)(width);
|
|
133
134
|
}
|
|
135
|
+
if (height) {
|
|
136
|
+
stys.height = height === 'auto' ? '100%' : (0, _dom.toCssUnit)(height);
|
|
137
|
+
}
|
|
134
138
|
return stys;
|
|
135
139
|
});
|
|
136
140
|
const computeCloseOpts = (0, _vue.computed)(() => {
|
package/lib/tabs/src/tabs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils")),_loading=_interopRequireDefault(require("../../loading/src/loading"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let scrollbarOffsetSize=20;var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTabs",props:{modelValue:[String,Number,Boolean],options:Array,width:[String,Number],height:[String,Number],destroyOnClose:{type:Boolean,default:()=>(0,_ui.getConfig)().tabs.destroyOnClose},titleWidth:[String,Number],titleAlign:[String,Number],type:{type:String,default:()=>(0,_ui.getConfig)().tabs.type},position:{type:String,default:()=>(0,_ui.getConfig)().tabs.position},showClose:Boolean,showBody:{type:Boolean,default:!0},padding:{type:Boolean,default:()=>(0,_ui.getConfig)().tabs.padding},trigger:String,beforeChangeMethod:Function,closeConfig:Object,refreshConfig:Object,size:{type:String,default:()=>(0,_ui.getConfig)().tabs.size||(0,_ui.getConfig)().size},beforeCloseMethod:Function},emits:["update:modelValue","change","tab-change","tab-change-fail","tab-close","tab-close-fail","tab-click","tab-load"],setup(d,e){let{slots:w,emit:i}=e;var E=_xeUtils.default.uniqueId();let t=(0,_vue.inject)("$xeTabs",null),h=(0,_ui.useSize)(d).computeSize,c=(0,_vue.ref)(),S=(0,_vue.ref)(),u=(0,_vue.ref)(),v=(0,_vue.ref)(),O=(0,_vue.reactive)({staticTabs:[],activeName:null,initNames:[],lintLeft:0,lintTop:0,lintWidth:0,lintHeight:0,scrollbarWidth:0,scrollbarHeight:0,isTabOver:!1,resizeFlag:1,cacheTabMaps:{}}),m={slTimeout:void 0},M={refElem:c},B=(0,_vue.computed)(()=>{var e=d.type;return e||"default"}),z=(0,_vue.computed)(()=>{var e=d.position;return e||"top"}),L=(0,_vue.computed)(()=>{var e=z.value;return"left"===e||"right"===e}),q=(0,_vue.computed)(()=>{var{lintLeft:e,lintTop:t,lintWidth:a,lintHeight:i}=O;return L.value?{top:t+"px",height:i+"px"}:{left:e+"px",width:a+"px"}}),I=(0,_vue.computed)(()=>{var e=d.width,t={};return e&&(t.width=(0,_dom.toCssUnit)(e)),t}),W=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tabs.closeConfig,d.closeConfig)),H=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tabs.refreshConfig,d.refreshConfig)),g=(0,_vue.computed)(()=>{var e=d.options;return(e||[]).filter(e=>a(e))}),b=(0,_vue.computed)(()=>{var e=O.staticTabs;return e.filter(e=>a(e))});var U=(0,_vue.computed)(()=>t?t.reactData.resizeFlag:null);let V={},A={xID:E,props:d,context:e,reactData:O,getRefMaps:()=>M,getComputeMaps:()=>V},a=e=>{e=e.permissionCode;return!(e&&!_ui.permission.checkVisible(e))},k=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=w[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[],F=()=>{var e,t,a,i,l,s=L.value,r=S.value,n=u.value,o=v.value;r&&({scrollLeft:r,scrollTop:e,clientWidth:t,clientHeight:a,scrollWidth:i,scrollHeight:l}=r,n&&(0<(s?e:r)?(0,_dom.addClass):(0,_dom.removeClass))(n,"scrolling--middle"),o)&&((s?a<l-Math.ceil(e):t<i-Math.ceil(r))?(0,_dom.addClass):(0,_dom.removeClass))(o,"scrolling--middle")},p=()=>{var e=()=>{let t=O.activeName;var e,a,i,l,s,r=B.value,n=g.value,o=b.value,u=S.value,v=L.value;let c=0,d=0,h=0,m=0,p=0,f=0,_=!1;u&&(o=_xeUtils.default.findIndexOf(o.length?o:n,e=>e.name===t),{children:n,offsetWidth:u,scrollWidth:e,offsetHeight:i,scrollHeight:l,clientWidth:a,clientHeight:s}=u,p=u-a,f=i-s,v?(_=l!==s,-1<o&&(u=n[o])&&(i=u.clientHeight,v=u.clientWidth,m="card"===r?(c=v,d=i,u.offsetTop):"border-card"===r?(c=v,d=i,u.offsetTop-1):(d=Math.max(4,Math.floor(.6*i)),u.offsetTop+Math.floor((i-d)/2)))):(_=e!==a,-1<o&&(l=n[o])&&(s=l.clientWidth,h="card"===r?(c=s+1,l.offsetLeft):"border-card"===r?(c=s,l.offsetLeft-1):(c=Math.max(4,Math.floor(.6*s)),l.offsetLeft+Math.floor((s-c)/2))))),O.scrollbarWidth=p,O.scrollbarHeight=f,O.lintLeft=h,O.lintTop=m,O.lintWidth=c,O.lintHeight=d,O.isTabOver=_,F()};e(),(0,_vue.nextTick)(e)},f=(e,t,a)=>{i(e,(0,_ui.createEvent)(a,{$tabs:A},t))},n=e=>{i("update:modelValue",e)},o=(e,t)=>{var a=O.initNames;return!(!e||a.includes(e)||(f("tab-load",{name:e},t),a.push(e),0))},l=e=>{let i=null,l={};if(e&&e.length){let a=!1;i=d.modelValue,e.forEach(e=>{var{name:e,preload:t}=e||{};e&&(l[""+e]={loading:!1},i===e&&(a=!0),t)&&o(e,null)}),a||(i=e[0].name,o(i,null),n(i))}O.activeName=i,O.cacheTabMaps=l},R=(t,a)=>{var e=d.trigger,i=d.beforeChangeMethod||(0,_ui.getConfig)().tabs.beforeChangeMethod;let l=O.activeName,s=a.name,r=s;f("tab-click",{name:s},t),"manual"!==e&&s!==l&&Promise.resolve(!i||i({$tabs:A,name:s,oldName:l,newName:s,option:a})).then(e=>{e?(O.activeName=s,n(r),o(s,t),f("change",{value:r,name:s,oldName:l,newName:s,option:a},t),f("tab-change",{value:r,name:s,oldName:l,newName:s,option:a},t)):f("tab-change-fail",{value:r,name:s,oldName:l,newName:s,option:a},t)}).catch(()=>{f("tab-change-fail",{value:r,name:s,oldName:l,newName:s,option:a},t)})},P=(e,t)=>{e.stopPropagation();var{activeName:e,cacheTabMaps:a}=O,i=t.name,l=H.value.queryMethod;let s=i?a[""+i]:null;s&&(l?s.loading||(s.loading=!0,Promise.resolve(l({$tabs:A,value:e,name:i,option:t})).finally(()=>{s.loading=!1})):(0,_log.errLog)("vxe.error.notFunc",["refresh-config.queryMethod"]))},$=(t,e,a,i)=>{t.stopPropagation();var l=O.activeName,s=W.value.beforeMethod||d.beforeCloseMethod||(0,_ui.getConfig)().tabs.beforeCloseMethod;let r=e.name,n=l,o=n;l===r&&(l=a<i.length-1?i[a+1]:i[a-1],o=l?l.name:null),Promise.resolve(!s||s({$tabs:A,value:n,name:r,nextName:o,option:e})).then(e=>{e?f("tab-close",{value:n,name:r,nextName:o},t):f("tab-close-fail",{value:n,name:r,nextName:o},t)}).catch(()=>{f("tab-close-fail",{value:n,name:r,nextName:o},t)})},j=(n,e)=>{var t=m.slTimeout;let o=L.value,u=o?0:e,v=o?e:0,c=6,d=35,h=(t&&(clearTimeout(t),m.slTimeout=void 0),()=>{var e,t,a,i,l,s,r=S.value;0<c&&(c--,r)&&({clientWidth:e,clientHeight:t,scrollWidth:a,scrollHeight:i,scrollLeft:l,scrollTop:s}=r,o?(v=Math.floor(v/2),0<n?t+s<i&&(r.scrollTop+=v,d-=4,m.slTimeout=setTimeout(h,d)):0<s&&(r.scrollTop-=v,d-=4,m.slTimeout=setTimeout(h,d))):(u=Math.floor(u/2),0<n?e+l<a&&(r.scrollLeft+=u,d-=4,m.slTimeout=setTimeout(h,d)):0<l&&(r.scrollLeft-=u,d-=4,m.slTimeout=setTimeout(h,d))),p())});h()},s=e=>{var t,a=L.value,i=S.value;i&&({clientWidth:i,clientHeight:t}=i,a=Math.floor(.75*(a?t:i)),j(e,a))},D=()=>{s(-1)},G=()=>{s(1)},r=n=>{let o=g.value,u=b.value,v=L.value;return(0,_vue.nextTick)().then(()=>{var e,t,a,i,l,s,r=S.value;r&&(-1<(i=_xeUtils.default.findIndexOf(u.length?u:o,e=>e.name===n))&&({scrollLeft:e,scrollTop:s,clientWidth:t,clientHeight:l,children:a}=r,a=a[i])&&(v?(0<(l=(i=a.offsetTop)+a.clientHeight-(s+l))&&(r.scrollTop+=l),i<s&&(r.scrollTop=i)):(0<(s=(l=a.offsetLeft)+a.clientWidth-(e+t))&&(r.scrollLeft+=s),l<e&&(r.scrollLeft=l))),p())})},_=t=>{let a=O.activeName;var i=g.value,l=b.value,l=l.length?l:i,i=_xeUtils.default.findIndexOf(l,e=>e.name===a);if(-1<i){let e=null;t?i<l.length-1&&(e=l[i+1]):0<i&&(e=l[i-1]),e&&(l=t=e.name,O.activeName=t,n(l),o(t,null))}return(0,_vue.nextTick)()},x={dispatchEvent:f,scrollToTab:r,prev(){return _(!1)},next(){return _(!0)},prevTab(){return(0,_log.warnLog)("vxe.error.delFunc",["[tabs] prevTab","prev"]),x.prev()},nextTab(){return(0,_log.warnLog)("vxe.error.delFunc",["[tabs] nextTab","next"]),x.next()}};Object.assign(A,x,{});let T=h=>{let{titleWidth:m,titleAlign:p,showClose:f,closeConfig:_,refreshConfig:g}=d,{activeName:b,scrollbarWidth:e,scrollbarHeight:t,isTabOver:a,cacheTabMaps:x}=O,T=B.value,y=z.value;var i=L.value,l=q.value,s=w.tabPrefix||w["tab-prefix"]||w.prefix,r=w.tabSuffix||w["tab-suffix"]||w.suffix||w.extra;let C=W.value,N=C.visibleMethod,E=H.value,M=E.visibleMethod;return(0,_vue.h)("div",{key:"th",class:["vxe-tabs-header","type--"+T,"pos--"+y]},[s?(0,_vue.h)("div",{class:["vxe-tabs-header--prefix","type--"+T,"pos--"+y]},k(s,{name:b})):(0,_ui.renderEmptyElement)(A),a?(0,_vue.h)("div",{ref:u,class:["vxe-tabs-header--bar vxe-tabs-header--prev-bar","type--"+T,"pos--"+y],onClick:D},[(0,_vue.h)("span",{class:i?(0,_ui.getIcon)().TABS_TAB_BUTTON_TOP:(0,_ui.getIcon)().TABS_TAB_BUTTON_LEFT})]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:["vxe-tabs-header--wrapper","type--"+T,"pos--"+y]},[(0,_vue.h)("div",{ref:S,class:"vxe-tabs-header--item-wrapper",style:i?{marginRight:`-${e+scrollbarOffsetSize}px`,paddingRight:scrollbarOffsetSize+"px"}:{marginBottom:`-${t+scrollbarOffsetSize}px`,paddingBottom:scrollbarOffsetSize+"px"},onScroll:F},h.map((t,a)=>{var{title:e,titleWidth:i,titleAlign:l,icon:s,name:r}=t,n=t.slots||{},o=n.title||n.tab,u=n.titlePrefix||n["title-prefix"],n=n.titleSuffix||n["title-suffix"],i=i||m,l=l||p,v={$tabs:A,value:b,name:r,option:t},c=b===r,d=r?x[""+r]:null,d=!!d&&d.loading;return(0,_vue.h)("div",{key:""+r,class:["vxe-tabs-header--item","type--"+T,"pos--"+y,l?"align--"+l:"",{"is--active":c}],style:i?{width:(0,_dom.toCssUnit)(i)}:void 0,onClick(e){R(e,t)}},[(0,_vue.h)("div",{class:"vxe-tabs-header--item-inner"},[(0,_vue.h)("div",{class:"vxe-tabs-header--item-content"},[s?(0,_vue.h)("span",{class:"vxe-tabs-header--item-icon"},[(0,_vue.h)("i",{class:s})]):(0,_ui.renderEmptyElement)(A),u?(0,_vue.h)("span",{class:"vxe-tabs-header--item-prefix"},k(u,{name:r,title:e})):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("span",{class:"vxe-tabs-header--item-name"},o?k(o,{name:r,title:e}):""+e),n?(0,_vue.h)("span",{class:"vxe-tabs-header--item-suffix"},k(n,{name:r,title:e})):(0,_ui.renderEmptyElement)(A)]),!(0,_utils.isEnableConf)(g)&&!E.enabled||M&&!M(v)?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:["vxe-tabs-header--refresh-btn",{"is--active":c,"is--loading":d,"is--disabled":d}],onClick(e){P(e,t)}},[(0,_vue.h)("i",{class:d?(0,_ui.getIcon)().TABS_TAB_REFRESH_LOADING:(0,_ui.getIcon)().TABS_TAB_REFRESH})]),!(f||(0,_utils.isEnableConf)(_)||C.enabled)||N&&!N(v)?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:["vxe-tabs-header--close-btn",{"is--active":c}],onClick(e){$(e,t,a,h)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().TABS_TAB_CLOSE})])])])}).concat([(0,_vue.h)("span",{key:"line",class:["vxe-tabs-header--active-line","type--"+T,"pos--"+y],style:l})]))]),a?(0,_vue.h)("div",{ref:v,class:["vxe-tabs-header--bar vxe-tabs-header--next-bar","type--"+T,"pos--"+y],onClick:G},[(0,_vue.h)("span",{class:i?(0,_ui.getIcon)().TABS_TAB_BUTTON_BOTTOM:(0,_ui.getIcon)().TABS_TAB_BUTTON_RIGHT})]):(0,_ui.renderEmptyElement)(A),r?(0,_vue.h)("div",{class:["vxe-tabs-header--suffix","type--"+T,"pos--"+y]},k(r,{name:b})):(0,_ui.renderEmptyElement)(A)])},y=e=>{var{initNames:t,activeName:a}=O,{name:e,slots:i}=e,i=i?i.default:null;return e&&t.includes(e)?(0,_vue.h)("div",{key:""+e,class:["vxe-tabs-pane--item",{"is--visible":a===e}]},i?k(i,{name:e}):[]):(0,_ui.renderEmptyElement)(A)},J=e=>{var t=d.destroyOnClose;let a=O.activeName;return t?[(t=e.find(e=>e.name===a))?y(t):(0,_ui.renderEmptyElement)(A)]:e.map(e=>y(e))},K=e=>{var{height:t,padding:a,showBody:i}=d,{activeName:l,cacheTabMaps:s}=O,r=h.value,n=B.value,o=z.value,u=H.value.showLoading,v=w.header,c=w.footer;return i?(s=!!(s=l?s[""+l]:null)&&s.loading,l={name:l},(0,_vue.h)("div",{key:"tb",class:["vxe-tabs-pane--wrapper","type--"+n,"pos--"+o,{"is--content":i}]},[v?(0,_vue.h)("div",{class:"vxe-tabs-pane--header"},k(v,l)):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:["vxe-tabs-pane--body","type--"+n,"pos--"+o,{["size--"+r]:r,"is--padding":a,"is--height":t}]},J(e)),c?(0,_vue.h)("div",{class:"vxe-tabs-pane--footer"},k(c,l)):(0,_ui.renderEmptyElement)(A),u&&s?(0,_ui.renderEmptyElement)(A):(0,_vue.h)(_loading.default,{class:"vxe-tabs--loading",modelValue:s})])):(0,_ui.renderEmptyElement)(A)};(0,_vue.watch)(()=>d.position,()=>{O.resizeFlag++}),(0,_vue.watch)(()=>d.modelValue,e=>{o(e,null),O.activeName=e}),(0,_vue.watch)(()=>O.activeName,e=>{r(e)});let C=(0,_vue.ref)(0),N=((0,_vue.watch)(()=>d.options?d.options.length:-1,()=>{C.value++}),(0,_vue.watch)(()=>d.options,()=>{C.value++}),(0,_vue.watch)(C,()=>{l(d.options),O.resizeFlag++}),(0,_vue.ref)(0));return(0,_vue.watch)(()=>O.staticTabs?O.staticTabs.length:-1,()=>{N.value++}),(0,_vue.watch)(()=>O.staticTabs,()=>{N.value++}),(0,_vue.watch)(N,()=>{l(O.staticTabs),O.resizeFlag++}),(0,_vue.watch)(U,()=>{O.resizeFlag++}),(0,_vue.watch)(()=>O.resizeFlag,()=>{(0,_vue.nextTick)(()=>{p()})}),(0,_vue.onMounted)(()=>{p(),_ui.globalEvents.on(A,"resize",p)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(A,"resize")}),(0,_vue.provide)("$xeTabs",A),o(d.modelValue,null),l(O.staticTabs.length?O.staticTabs:d.options),A.renderVN=()=>{var{height:e,padding:t,trigger:a}=d,i=O.activeName,l=h.value,s=g.value,r=b.value,n=B.value,o=z.value,u=I.value,v=w.default,r=v?r:s,s=[(0,_vue.h)("div",{key:"ts",class:"vxe-tabs-slots"},v?v({name:i}):[])];return"right"===o||"bottom"===o?s.push(K(r),T(r)):s.push(T(r),K(r)),(0,_vue.h)("div",{ref:c,class:["vxe-tabs","pos--"+o,"vxe-tabs--"+n,"trigger--"+("manual"===a?"trigger":"default"),{["size--"+l]:l,"is--padding":t,"is--height":e}],style:u},s)},A},render(){return this.renderVN()}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils")),_loading=_interopRequireDefault(require("../../loading/src/loading"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let scrollbarOffsetSize=20;var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTabs",props:{modelValue:[String,Number,Boolean],options:Array,width:[String,Number],height:[String,Number],destroyOnClose:{type:Boolean,default:()=>(0,_ui.getConfig)().tabs.destroyOnClose},titleWidth:[String,Number],titleAlign:[String,Number],type:{type:String,default:()=>(0,_ui.getConfig)().tabs.type},position:{type:String,default:()=>(0,_ui.getConfig)().tabs.position},showClose:Boolean,showBody:{type:Boolean,default:!0},padding:{type:Boolean,default:()=>(0,_ui.getConfig)().tabs.padding},trigger:String,beforeChangeMethod:Function,closeConfig:Object,refreshConfig:Object,size:{type:String,default:()=>(0,_ui.getConfig)().tabs.size||(0,_ui.getConfig)().size},beforeCloseMethod:Function},emits:["update:modelValue","change","tab-change","tab-change-fail","tab-close","tab-close-fail","tab-click","tab-load"],setup(c,e){let{slots:w,emit:i}=e;var E=_xeUtils.default.uniqueId();let t=(0,_vue.inject)("$xeTabs",null),h=(0,_ui.useSize)(c).computeSize,d=(0,_vue.ref)(),S=(0,_vue.ref)(),u=(0,_vue.ref)(),v=(0,_vue.ref)(),O=(0,_vue.reactive)({staticTabs:[],activeName:null,initNames:[],lintLeft:0,lintTop:0,lintWidth:0,lintHeight:0,scrollbarWidth:0,scrollbarHeight:0,isTabOver:!1,resizeFlag:1,cacheTabMaps:{}}),m={slTimeout:void 0},M={refElem:d},B=(0,_vue.computed)(()=>{var e=c.type;return e||"default"}),z=(0,_vue.computed)(()=>{var e=c.position;return e||"top"}),L=(0,_vue.computed)(()=>{var e=z.value;return"left"===e||"right"===e}),q=(0,_vue.computed)(()=>{var{lintLeft:e,lintTop:t,lintWidth:a,lintHeight:i}=O;return L.value?{top:t+"px",height:i+"px"}:{left:e+"px",width:a+"px"}}),U=(0,_vue.computed)(()=>{var{width:e,height:t}=c,a={};return e&&(a.width=(0,_dom.toCssUnit)(e)),t&&(a.height="auto"===t?"100%":(0,_dom.toCssUnit)(t)),a}),W=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tabs.closeConfig,c.closeConfig)),H=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().tabs.refreshConfig,c.refreshConfig)),g=(0,_vue.computed)(()=>{var e=c.options;return(e||[]).filter(e=>a(e))}),b=(0,_vue.computed)(()=>{var e=O.staticTabs;return e.filter(e=>a(e))});var I=(0,_vue.computed)(()=>t?t.reactData.resizeFlag:null);let V={},A={xID:E,props:c,context:e,reactData:O,getRefMaps:()=>M,getComputeMaps:()=>V},a=e=>{e=e.permissionCode;return!(e&&!_ui.permission.checkVisible(e))},k=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=w[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[],F=()=>{var e,t,a,i,l,s=L.value,r=S.value,n=u.value,o=v.value;r&&({scrollLeft:r,scrollTop:e,clientWidth:t,clientHeight:a,scrollWidth:i,scrollHeight:l}=r,n&&(0<(s?e:r)?(0,_dom.addClass):(0,_dom.removeClass))(n,"scrolling--middle"),o)&&((s?a<l-Math.ceil(e):t<i-Math.ceil(r))?(0,_dom.addClass):(0,_dom.removeClass))(o,"scrolling--middle")},p=()=>{var e=()=>{let t=O.activeName;var e,a,i,l,s,r=B.value,n=g.value,o=b.value,u=S.value,v=L.value;let d=0,c=0,h=0,m=0,p=0,f=0,_=!1;u&&(o=_xeUtils.default.findIndexOf(o.length?o:n,e=>e.name===t),{children:n,offsetWidth:u,scrollWidth:e,offsetHeight:i,scrollHeight:l,clientWidth:a,clientHeight:s}=u,p=u-a,f=i-s,v?(_=l!==s,-1<o&&(u=n[o])&&(i=u.clientHeight,v=u.clientWidth,m="card"===r?(d=v,c=i,u.offsetTop):"border-card"===r?(d=v,c=i,u.offsetTop-1):(c=Math.max(4,Math.floor(.6*i)),u.offsetTop+Math.floor((i-c)/2)))):(_=e!==a,-1<o&&(l=n[o])&&(s=l.clientWidth,h="card"===r?(d=s+1,l.offsetLeft):"border-card"===r?(d=s,l.offsetLeft-1):(d=Math.max(4,Math.floor(.6*s)),l.offsetLeft+Math.floor((s-d)/2))))),O.scrollbarWidth=p,O.scrollbarHeight=f,O.lintLeft=h,O.lintTop=m,O.lintWidth=d,O.lintHeight=c,O.isTabOver=_,F()};e(),(0,_vue.nextTick)(e)},f=(e,t,a)=>{i(e,(0,_ui.createEvent)(a,{$tabs:A},t))},n=e=>{i("update:modelValue",e)},o=(e,t)=>{var a=O.initNames;return!(!e||a.includes(e)||(f("tab-load",{name:e},t),a.push(e),0))},l=e=>{let i=null,l={};if(e&&e.length){let a=!1;i=c.modelValue,e.forEach(e=>{var{name:e,preload:t}=e||{};e&&(l[""+e]={loading:!1},i===e&&(a=!0),t)&&o(e,null)}),a||(i=e[0].name,o(i,null),n(i))}O.activeName=i,O.cacheTabMaps=l},R=(t,a)=>{var e=c.trigger,i=c.beforeChangeMethod||(0,_ui.getConfig)().tabs.beforeChangeMethod;let l=O.activeName,s=a.name,r=s;f("tab-click",{name:s},t),"manual"!==e&&s!==l&&Promise.resolve(!i||i({$tabs:A,name:s,oldName:l,newName:s,option:a})).then(e=>{e?(O.activeName=s,n(r),o(s,t),f("change",{value:r,name:s,oldName:l,newName:s,option:a},t),f("tab-change",{value:r,name:s,oldName:l,newName:s,option:a},t)):f("tab-change-fail",{value:r,name:s,oldName:l,newName:s,option:a},t)}).catch(()=>{f("tab-change-fail",{value:r,name:s,oldName:l,newName:s,option:a},t)})},P=(e,t)=>{e.stopPropagation();var{activeName:e,cacheTabMaps:a}=O,i=t.name,l=H.value.queryMethod;let s=i?a[""+i]:null;s&&(l?s.loading||(s.loading=!0,Promise.resolve(l({$tabs:A,value:e,name:i,option:t})).finally(()=>{s.loading=!1})):(0,_log.errLog)("vxe.error.notFunc",["refresh-config.queryMethod"]))},$=(t,e,a,i)=>{t.stopPropagation();var l=O.activeName,s=W.value.beforeMethod||c.beforeCloseMethod||(0,_ui.getConfig)().tabs.beforeCloseMethod;let r=e.name,n=l,o=n;l===r&&(l=a<i.length-1?i[a+1]:i[a-1],o=l?l.name:null),Promise.resolve(!s||s({$tabs:A,value:n,name:r,nextName:o,option:e})).then(e=>{e?f("tab-close",{value:n,name:r,nextName:o},t):f("tab-close-fail",{value:n,name:r,nextName:o},t)}).catch(()=>{f("tab-close-fail",{value:n,name:r,nextName:o},t)})},j=(n,e)=>{var t=m.slTimeout;let o=L.value,u=o?0:e,v=o?e:0,d=6,c=35,h=(t&&(clearTimeout(t),m.slTimeout=void 0),()=>{var e,t,a,i,l,s,r=S.value;0<d&&(d--,r)&&({clientWidth:e,clientHeight:t,scrollWidth:a,scrollHeight:i,scrollLeft:l,scrollTop:s}=r,o?(v=Math.floor(v/2),0<n?t+s<i&&(r.scrollTop+=v,c-=4,m.slTimeout=setTimeout(h,c)):0<s&&(r.scrollTop-=v,c-=4,m.slTimeout=setTimeout(h,c))):(u=Math.floor(u/2),0<n?e+l<a&&(r.scrollLeft+=u,c-=4,m.slTimeout=setTimeout(h,c)):0<l&&(r.scrollLeft-=u,c-=4,m.slTimeout=setTimeout(h,c))),p())});h()},s=e=>{var t,a=L.value,i=S.value;i&&({clientWidth:i,clientHeight:t}=i,a=Math.floor(.75*(a?t:i)),j(e,a))},D=()=>{s(-1)},G=()=>{s(1)},r=n=>{let o=g.value,u=b.value,v=L.value;return(0,_vue.nextTick)().then(()=>{var e,t,a,i,l,s,r=S.value;r&&(-1<(i=_xeUtils.default.findIndexOf(u.length?u:o,e=>e.name===n))&&({scrollLeft:e,scrollTop:s,clientWidth:t,clientHeight:l,children:a}=r,a=a[i])&&(v?(0<(l=(i=a.offsetTop)+a.clientHeight-(s+l))&&(r.scrollTop+=l),i<s&&(r.scrollTop=i)):(0<(s=(l=a.offsetLeft)+a.clientWidth-(e+t))&&(r.scrollLeft+=s),l<e&&(r.scrollLeft=l))),p())})},_=t=>{let a=O.activeName;var i=g.value,l=b.value,l=l.length?l:i,i=_xeUtils.default.findIndexOf(l,e=>e.name===a);if(-1<i){let e=null;t?i<l.length-1&&(e=l[i+1]):0<i&&(e=l[i-1]),e&&(l=t=e.name,O.activeName=t,n(l),o(t,null))}return(0,_vue.nextTick)()},x={dispatchEvent:f,scrollToTab:r,prev(){return _(!1)},next(){return _(!0)},prevTab(){return(0,_log.warnLog)("vxe.error.delFunc",["[tabs] prevTab","prev"]),x.prev()},nextTab(){return(0,_log.warnLog)("vxe.error.delFunc",["[tabs] nextTab","next"]),x.next()}};Object.assign(A,x,{});let T=h=>{let{titleWidth:m,titleAlign:p,showClose:f,closeConfig:_,refreshConfig:g}=c,{activeName:b,scrollbarWidth:e,scrollbarHeight:t,isTabOver:a,cacheTabMaps:x}=O,T=B.value,y=z.value;var i=L.value,l=q.value,s=w.tabPrefix||w["tab-prefix"]||w.prefix,r=w.tabSuffix||w["tab-suffix"]||w.suffix||w.extra;let C=W.value,N=C.visibleMethod,E=H.value,M=E.visibleMethod;return(0,_vue.h)("div",{key:"th",class:["vxe-tabs-header","type--"+T,"pos--"+y]},[s?(0,_vue.h)("div",{class:["vxe-tabs-header--prefix","type--"+T,"pos--"+y]},k(s,{name:b})):(0,_ui.renderEmptyElement)(A),a?(0,_vue.h)("div",{ref:u,class:["vxe-tabs-header--bar vxe-tabs-header--prev-bar","type--"+T,"pos--"+y],onClick:D},[(0,_vue.h)("span",{class:i?(0,_ui.getIcon)().TABS_TAB_BUTTON_TOP:(0,_ui.getIcon)().TABS_TAB_BUTTON_LEFT})]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:["vxe-tabs-header--wrapper","type--"+T,"pos--"+y]},[(0,_vue.h)("div",{ref:S,class:"vxe-tabs-header--item-wrapper",style:i?{marginRight:`-${e+scrollbarOffsetSize}px`,paddingRight:scrollbarOffsetSize+"px"}:{marginBottom:`-${t+scrollbarOffsetSize}px`,paddingBottom:scrollbarOffsetSize+"px"},onScroll:F},h.map((t,a)=>{var{title:e,titleWidth:i,titleAlign:l,icon:s,name:r}=t,n=t.slots||{},o=n.title||n.tab,u=n.titlePrefix||n["title-prefix"],n=n.titleSuffix||n["title-suffix"],i=i||m,l=l||p,v={$tabs:A,value:b,name:r,option:t},d=b===r,c=r?x[""+r]:null,c=!!c&&c.loading;return(0,_vue.h)("div",{key:""+r,class:["vxe-tabs-header--item","type--"+T,"pos--"+y,l?"align--"+l:"",{"is--active":d}],style:i?{width:(0,_dom.toCssUnit)(i)}:void 0,onClick(e){R(e,t)}},[(0,_vue.h)("div",{class:"vxe-tabs-header--item-inner"},[(0,_vue.h)("div",{class:"vxe-tabs-header--item-content"},[s?(0,_vue.h)("span",{class:"vxe-tabs-header--item-icon"},[(0,_vue.h)("i",{class:s})]):(0,_ui.renderEmptyElement)(A),u?(0,_vue.h)("span",{class:"vxe-tabs-header--item-prefix"},k(u,{name:r,title:e})):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("span",{class:"vxe-tabs-header--item-name"},o?k(o,{name:r,title:e}):""+e),n?(0,_vue.h)("span",{class:"vxe-tabs-header--item-suffix"},k(n,{name:r,title:e})):(0,_ui.renderEmptyElement)(A)]),!(0,_utils.isEnableConf)(g)&&!E.enabled||M&&!M(v)?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:["vxe-tabs-header--refresh-btn",{"is--active":d,"is--loading":c,"is--disabled":c}],onClick(e){P(e,t)}},[(0,_vue.h)("i",{class:c?(0,_ui.getIcon)().TABS_TAB_REFRESH_LOADING:(0,_ui.getIcon)().TABS_TAB_REFRESH})]),!(f||(0,_utils.isEnableConf)(_)||C.enabled)||N&&!N(v)?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:["vxe-tabs-header--close-btn",{"is--active":d}],onClick(e){$(e,t,a,h)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().TABS_TAB_CLOSE})])])])}).concat([(0,_vue.h)("span",{key:"line",class:["vxe-tabs-header--active-line","type--"+T,"pos--"+y],style:l})]))]),a?(0,_vue.h)("div",{ref:v,class:["vxe-tabs-header--bar vxe-tabs-header--next-bar","type--"+T,"pos--"+y],onClick:G},[(0,_vue.h)("span",{class:i?(0,_ui.getIcon)().TABS_TAB_BUTTON_BOTTOM:(0,_ui.getIcon)().TABS_TAB_BUTTON_RIGHT})]):(0,_ui.renderEmptyElement)(A),r?(0,_vue.h)("div",{class:["vxe-tabs-header--suffix","type--"+T,"pos--"+y]},k(r,{name:b})):(0,_ui.renderEmptyElement)(A)])},y=e=>{var{initNames:t,activeName:a}=O,{name:e,slots:i}=e,i=i?i.default:null;return e&&t.includes(e)?(0,_vue.h)("div",{key:""+e,class:["vxe-tabs-pane--item",{"is--visible":a===e}]},i?k(i,{name:e}):[]):(0,_ui.renderEmptyElement)(A)},J=e=>{var t=c.destroyOnClose;let a=O.activeName;return t?[(t=e.find(e=>e.name===a))?y(t):(0,_ui.renderEmptyElement)(A)]:e.map(e=>y(e))},K=e=>{var{height:t,padding:a,showBody:i}=c,{activeName:l,cacheTabMaps:s}=O,r=h.value,n=B.value,o=z.value,u=H.value.showLoading,v=w.header,d=w.footer;return i?(s=!!(s=l?s[""+l]:null)&&s.loading,l={name:l},(0,_vue.h)("div",{key:"tb",class:["vxe-tabs-pane--wrapper","type--"+n,"pos--"+o,{"is--content":i}]},[v?(0,_vue.h)("div",{class:"vxe-tabs-pane--header"},k(v,l)):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:["vxe-tabs-pane--body","type--"+n,"pos--"+o,{["size--"+r]:r,"is--padding":a,"is--height":t}]},J(e)),d?(0,_vue.h)("div",{class:"vxe-tabs-pane--footer"},k(d,l)):(0,_ui.renderEmptyElement)(A),u&&s?(0,_ui.renderEmptyElement)(A):(0,_vue.h)(_loading.default,{class:"vxe-tabs--loading",modelValue:s})])):(0,_ui.renderEmptyElement)(A)};(0,_vue.watch)(()=>c.position,()=>{O.resizeFlag++}),(0,_vue.watch)(()=>c.modelValue,e=>{o(e,null),O.activeName=e}),(0,_vue.watch)(()=>O.activeName,e=>{r(e)});let C=(0,_vue.ref)(0),N=((0,_vue.watch)(()=>c.options?c.options.length:-1,()=>{C.value++}),(0,_vue.watch)(()=>c.options,()=>{C.value++}),(0,_vue.watch)(C,()=>{l(c.options),O.resizeFlag++}),(0,_vue.ref)(0));return(0,_vue.watch)(()=>O.staticTabs?O.staticTabs.length:-1,()=>{N.value++}),(0,_vue.watch)(()=>O.staticTabs,()=>{N.value++}),(0,_vue.watch)(N,()=>{l(O.staticTabs),O.resizeFlag++}),(0,_vue.watch)(I,()=>{O.resizeFlag++}),(0,_vue.watch)(()=>O.resizeFlag,()=>{(0,_vue.nextTick)(()=>{p()})}),(0,_vue.onMounted)(()=>{p(),_ui.globalEvents.on(A,"resize",p)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(A,"resize")}),(0,_vue.provide)("$xeTabs",A),o(c.modelValue,null),l(O.staticTabs.length?O.staticTabs:c.options),A.renderVN=()=>{var{height:e,padding:t,trigger:a}=c,i=O.activeName,l=h.value,s=g.value,r=b.value,n=B.value,o=z.value,u=U.value,v=w.default,r=v?r:s,s=[(0,_vue.h)("div",{key:"ts",class:"vxe-tabs-slots"},v?v({name:i}):[])];return"right"===o||"bottom"===o?s.push(K(r),T(r)):s.push(T(r),K(r)),(0,_vue.h)("div",{ref:d,class:["vxe-tabs","pos--"+o,"vxe-tabs--"+n,"trigger--"+("manual"===a?"trigger":"default"),{["size--"+l]:l,"is--padding":t,"is--height":e}],style:u},s)},A},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.14.
|
|
29
|
+
const version = exports.version = "4.14.22";
|
|
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
|
-
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");let version=exports.version="4.14.21";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:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!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,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},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:null,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,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let 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
|
+
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");let version=exports.version="4.14.22";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:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!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,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},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:null,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,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let 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.14.
|
|
8
|
+
const version = `ui v${"4.14.22"}`;
|
|
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
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let version="ui v4.14.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let version="ui v4.14.22",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-pc-ui",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.22",
|
|
4
4
|
"description": "A vue based PC component library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"lib": "npm run lib:pack && npm run lib:modules"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
|
+
"dist",
|
|
13
14
|
"lib",
|
|
14
15
|
"es",
|
|
15
16
|
"src",
|
|
@@ -25,9 +26,10 @@
|
|
|
25
26
|
"style": "lib/style.css",
|
|
26
27
|
"typings": "types/index.d.ts",
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@vxe-ui/core": "^4.4.
|
|
29
|
+
"@vxe-ui/core": "^4.4.13"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
32
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
31
33
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
32
34
|
"@typescript-eslint/parser": "^6.21.0",
|
|
33
35
|
"@vue/cli-plugin-babel": "~5.0.0",
|
|
@@ -57,6 +59,7 @@
|
|
|
57
59
|
"gulp-typescript": "^5.0.1",
|
|
58
60
|
"gulp-uglify": "^3.0.2",
|
|
59
61
|
"postcss": "^8.4.38",
|
|
62
|
+
"rollup": "^4.53.3",
|
|
60
63
|
"sass": "^1.80.4",
|
|
61
64
|
"sass-loader": "^14.2.1",
|
|
62
65
|
"typescript": "~4.9.5",
|
|
@@ -529,7 +529,8 @@ export default defineVxeComponent({
|
|
|
529
529
|
const errorRules: Rule[] = []
|
|
530
530
|
const syncVailds: Promise<any>[] = []
|
|
531
531
|
if (property && formRules) {
|
|
532
|
-
const
|
|
532
|
+
const item = getItemByField(property)
|
|
533
|
+
const rules = item && item.rules ? item.rules : XEUtils.get(formRules, property)
|
|
533
534
|
if (rules) {
|
|
534
535
|
const itemValue = XEUtils.isUndefined(val) ? XEUtils.get(data, property) : val
|
|
535
536
|
rules.forEach((rule) => {
|
|
@@ -58,7 +58,7 @@ export function getItemClass ($xeForm: VxeFormConstructor & VxeFormPrivateMethod
|
|
|
58
58
|
let isRequired = false
|
|
59
59
|
let isValid = false
|
|
60
60
|
if (!readonly && rules) {
|
|
61
|
-
const itemRules = rules[field]
|
|
61
|
+
const itemRules = item.rules ? item.rules : rules[field]
|
|
62
62
|
if (itemRules && itemRules.length) {
|
|
63
63
|
isValid = true
|
|
64
64
|
isRequired = itemRules.some((rule) => rule.required)
|
|
@@ -130,11 +130,14 @@ export default defineVxeComponent({
|
|
|
130
130
|
})
|
|
131
131
|
|
|
132
132
|
const computeWrapperStyle = computed(() => {
|
|
133
|
-
const { width } = props
|
|
133
|
+
const { width, height } = props
|
|
134
134
|
const stys: VxeComponentStyleType = {}
|
|
135
135
|
if (width) {
|
|
136
136
|
stys.width = toCssUnit(width)
|
|
137
137
|
}
|
|
138
|
+
if (height) {
|
|
139
|
+
stys.height = height === 'auto' ? '100%' : toCssUnit(height)
|
|
140
|
+
}
|
|
138
141
|
return stys
|
|
139
142
|
})
|
|
140
143
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref } from 'vue'
|
|
2
2
|
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf } from '@vxe-ui/core'
|
|
3
|
-
import {
|
|
3
|
+
import { VxeColumnProps, VxeColumnSlots } from './column'
|
|
4
4
|
|
|
5
5
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
6
6
|
|
|
@@ -26,67 +26,7 @@ export interface VxeColgroupPrivateRef extends ColgroupPrivateRef { }
|
|
|
26
26
|
export namespace VxeColgroupPropTypes {
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export
|
|
30
|
-
/**
|
|
31
|
-
* 渲染类型
|
|
32
|
-
*/
|
|
33
|
-
type?: VxeColumnPropTypes.Type
|
|
34
|
-
/**
|
|
35
|
-
* 列字段名
|
|
36
|
-
*/
|
|
37
|
-
field?: VxeColumnPropTypes.Field
|
|
38
|
-
/**
|
|
39
|
-
* 列标题
|
|
40
|
-
*/
|
|
41
|
-
title?: VxeColumnPropTypes.Title
|
|
42
|
-
/**
|
|
43
|
-
* 列宽度
|
|
44
|
-
*/
|
|
45
|
-
width?: VxeColumnPropTypes.Width
|
|
46
|
-
/**
|
|
47
|
-
* 列最小宽度,把剩余宽度按比例分配
|
|
48
|
-
*/
|
|
49
|
-
minWidth?: VxeColumnPropTypes.MinWidth
|
|
50
|
-
/**
|
|
51
|
-
* 是否允许拖动列宽调整大小
|
|
52
|
-
*/
|
|
53
|
-
resizable?: VxeColumnPropTypes.Resizable
|
|
54
|
-
/**
|
|
55
|
-
* 将列固定在左侧或者右侧
|
|
56
|
-
*/
|
|
57
|
-
fixed?: VxeColumnPropTypes.Fixed
|
|
58
|
-
/**
|
|
59
|
-
* 列对齐方式
|
|
60
|
-
*/
|
|
61
|
-
align?: VxeColumnPropTypes.Align
|
|
62
|
-
/**
|
|
63
|
-
* 表头对齐方式
|
|
64
|
-
*/
|
|
65
|
-
headerAlign?: VxeColumnPropTypes.HeaderAlign
|
|
66
|
-
/**
|
|
67
|
-
* 当内容过长时显示为省略号
|
|
68
|
-
*/
|
|
69
|
-
showOverflow?: VxeColumnPropTypes.ShowOverflow
|
|
70
|
-
/**
|
|
71
|
-
* 当表头内容过长时显示为省略号
|
|
72
|
-
*/
|
|
73
|
-
showHeaderOverflow?: VxeColumnPropTypes.ShowHeaderOverflow
|
|
74
|
-
/**
|
|
75
|
-
* 给单元格附加 className
|
|
76
|
-
*/
|
|
77
|
-
className?: VxeColumnPropTypes.ClassName
|
|
78
|
-
/**
|
|
79
|
-
* 给表头单元格附加 className
|
|
80
|
-
*/
|
|
81
|
-
headerClassName?: VxeColumnPropTypes.HeaderClassName
|
|
82
|
-
/**
|
|
83
|
-
* 是否可视
|
|
84
|
-
*/
|
|
85
|
-
visible?: VxeColumnPropTypes.Visible
|
|
86
|
-
/**
|
|
87
|
-
* 额外的参数
|
|
88
|
-
*/
|
|
89
|
-
params?: VxeColumnPropTypes.Params
|
|
29
|
+
export interface VxeColgroupProps extends VxeColumnProps {
|
|
90
30
|
}
|
|
91
31
|
|
|
92
32
|
export interface ColgroupPrivateComputed {
|
|
@@ -122,15 +62,7 @@ export namespace VxeColgroupSlotTypes {
|
|
|
122
62
|
export interface DefaultSlotParams {}
|
|
123
63
|
}
|
|
124
64
|
|
|
125
|
-
export interface VxeColgroupSlots<D = any> {
|
|
126
|
-
/**
|
|
127
|
-
* 自定义表头内容的模板
|
|
128
|
-
*/
|
|
129
|
-
header?: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
|
|
130
|
-
/**
|
|
131
|
-
* 只对 type=checkbox,radio 有效,自定义标题模板
|
|
132
|
-
*/
|
|
133
|
-
title?: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
|
|
65
|
+
export interface VxeColgroupSlots<D = any> extends VxeColumnSlots<D> {
|
|
134
66
|
}
|
|
135
67
|
|
|
136
68
|
export const Colgroup: typeof VxeColgroup
|
|
@@ -48,6 +48,8 @@ export namespace VxeColumnPropTypes {
|
|
|
48
48
|
export type Padding = boolean
|
|
49
49
|
export type VerticalAlign = '' | 'top' | 'center' | null
|
|
50
50
|
|
|
51
|
+
export type Rules<D = any> = VxeTableDefines.ValidatorRule<D>[]
|
|
52
|
+
|
|
51
53
|
export type Formatter<D = any> = ((params: VxeColumnDefines.CellFormatterParams<D>) => string | number) | any[] | string
|
|
52
54
|
|
|
53
55
|
export type HeaderFormatter = ((params: {
|
|
@@ -557,6 +559,10 @@ export interface VxeColumnProps<D = any> {
|
|
|
557
559
|
* 是否启用浮动筛选
|
|
558
560
|
*/
|
|
559
561
|
floatingFilters?: VxeColumnPropTypes.FloatingFilters
|
|
562
|
+
/**
|
|
563
|
+
* 列的校验规则
|
|
564
|
+
*/
|
|
565
|
+
rules?: VxeColumnPropTypes.Rules<D>
|
|
560
566
|
/**
|
|
561
567
|
* 设置为分组节点
|
|
562
568
|
*/
|
|
@@ -277,7 +277,7 @@ export interface VxeFormItemProps<D = any> {
|
|
|
277
277
|
* 项渲染配置项
|
|
278
278
|
*/
|
|
279
279
|
itemRender?: VxeFormItemPropTypes.ItemRender
|
|
280
|
-
|
|
280
|
+
rules?: VxeFormItemPropTypes.Rules<D>
|
|
281
281
|
slots?: VxeFormItemPropTypes.Slots
|
|
282
282
|
children?: VxeFormItemProps<D>[]
|
|
283
283
|
|
|
@@ -6165,6 +6165,7 @@ export namespace VxeTableDefines {
|
|
|
6165
6165
|
filterRecoverMethod: VxeColumnPropTypes.FilterRecoverMethod<D>
|
|
6166
6166
|
filterRender: VxeColumnPropTypes.FilterRender
|
|
6167
6167
|
floatingFilters: VxeColumnPropTypes.FloatingFilters
|
|
6168
|
+
rules: VxeColumnPropTypes.Rules<D>
|
|
6168
6169
|
rowGroupNode: VxeColumnPropTypes.RowGroupNode
|
|
6169
6170
|
treeNode: VxeColumnPropTypes.TreeNode
|
|
6170
6171
|
dragSort: VxeColumnPropTypes.DragSort
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|