vxe-table 3.8.21 → 3.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/helper/vetur/attributes.json +1 -1966
- package/helper/vetur/tags.json +1 -648
- package/lib/button/src/button.js +4 -2
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +11 -0
- package/lib/button/style/style.min.css +1 -1
- package/lib/button-group/style/style.css +1 -0
- package/lib/checkbox/style/style.css +1 -0
- package/lib/checkbox-group/style/style.css +1 -0
- package/lib/colgroup/style/style.css +1 -0
- package/lib/column/style/style.css +1 -0
- package/lib/custom/src/panel.js +157 -71
- package/lib/custom/src/panel.min.js +1 -1
- package/lib/custom/style/style.css +19 -34
- package/lib/custom/style/style.min.css +1 -1
- package/lib/edit/style/style.css +1 -0
- package/lib/export/src/export-panel.js +7 -1
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/style/style.css +1 -0
- package/lib/filter/style/style.css +1 -0
- package/lib/form/src/form.js +0 -3
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +1 -0
- package/lib/form-gather/style/style.css +1 -0
- package/lib/form-item/style/style.css +1 -0
- package/lib/grid/style/style.css +2 -0
- package/lib/grid/style/style.min.css +1 -1
- package/lib/icon/style/style.css +4 -2
- package/lib/icon/style/style.min.css +4 -2
- package/lib/index.css +1 -1
- package/lib/index.umd.js +4561 -4261
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +9 -2
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +4 -3
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/style/style.css +1 -0
- package/lib/list/style/style.css +1 -0
- package/lib/loading/style/style.css +1 -0
- package/lib/locale/lang/en-US.js +201 -9
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +201 -9
- package/lib/locale/lang/es-ES.js +202 -10
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +202 -10
- package/lib/locale/lang/ja-JP.js +214 -22
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +214 -22
- package/lib/locale/lang/pt-BR.js +201 -9
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +201 -9
- package/lib/locale/lang/zh-CN.js +196 -4
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +196 -4
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +200 -8
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +200 -8
- package/lib/locale/lang/zh-TC.js +200 -8
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +200 -8
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +200 -8
- package/lib/menu/src/panel.js +24 -8
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/menu/style/style.css +11 -27
- package/lib/menu/style/style.min.css +1 -1
- package/lib/modal/style/style.css +4 -0
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/style/style.css +1 -0
- package/lib/option/style/style.css +1 -0
- package/lib/pager/src/pager.js +29 -25
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +2 -19
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/style/style.css +3 -1
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/style/style.css +1 -0
- package/lib/radio-button/style/style.css +1 -0
- package/lib/radio-group/style/style.css +1 -0
- package/lib/select/src/select.js +5 -4
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +2 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/style/style.css +1 -0
- package/lib/table/src/header.js +4 -3
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +33 -46
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +17 -10
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/style/style.css +1 -0
- package/lib/toolbar/style/style.css +1 -0
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tooltip/style/style.css +1 -0
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +1 -0
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +3 -1
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/validator/style/style.css +1 -0
- package/lib/vxe-button/style/style.css +11 -0
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-button-group/style/style.css +1 -0
- package/lib/vxe-checkbox/style/style.css +1 -0
- package/lib/vxe-checkbox-group/style/style.css +1 -0
- package/lib/vxe-colgroup/style/style.css +1 -0
- package/lib/vxe-column/style/style.css +1 -0
- package/lib/vxe-form/style/style.css +1 -0
- package/lib/vxe-form-gather/style/style.css +1 -0
- package/lib/vxe-form-item/style/style.css +1 -0
- package/lib/vxe-grid/style/style.css +2 -0
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +3 -1
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-input/style/style.css +4 -3
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-list/style/style.css +1 -0
- package/lib/vxe-loading/style/style.css +1 -0
- package/lib/vxe-modal/style/style.css +4 -0
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-optgroup/style/style.css +1 -0
- package/lib/vxe-option/style/style.css +1 -0
- package/lib/vxe-pager/style/style.css +2 -19
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-pulldown/style/style.css +3 -1
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-radio/style/style.css +1 -0
- package/lib/vxe-radio-button/style/style.css +1 -0
- package/lib/vxe-radio-group/style/style.css +1 -0
- package/lib/vxe-select/style/style.css +2 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-switch/style/style.css +1 -0
- package/lib/vxe-table/style/style.css +17 -10
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-table-custom-module/style/style.css +19 -34
- package/lib/vxe-table-custom-module/style/style.min.css +1 -1
- package/lib/vxe-table-edit-module/style/style.css +1 -0
- package/lib/vxe-table-export-module/style/style.css +1 -0
- package/lib/vxe-table-filter-module/style/style.css +1 -0
- package/lib/vxe-table-keyboard-module/style/style.css +1 -0
- package/lib/vxe-table-menu-module/style/style.css +11 -27
- package/lib/vxe-table-menu-module/style/style.min.css +1 -1
- package/lib/vxe-table-validator-module/style/style.css +1 -0
- package/lib/vxe-textarea/style/style.css +1 -0
- package/lib/vxe-toolbar/style/style.css +1 -0
- package/lib/vxe-tooltip/style/style.css +1 -0
- package/package.json +1 -1
- package/packages/button/src/button.js +4 -3
- package/packages/custom/src/panel.js +167 -85
- package/packages/export/src/export-panel.js +11 -3
- package/packages/form/src/form.js +0 -3
- package/packages/input/src/input.js +9 -2
- package/packages/locale/lang/en-US.js +201 -9
- package/packages/locale/lang/es-ES.js +202 -10
- package/packages/locale/lang/ja-JP.js +214 -22
- package/packages/locale/lang/pt-BR.js +201 -9
- package/packages/locale/lang/zh-CN.js +196 -4
- package/packages/locale/lang/zh-TC.js +200 -8
- package/packages/menu/src/panel.js +38 -10
- package/packages/pager/src/pager.js +24 -21
- package/packages/select/src/select.js +5 -4
- package/packages/table/src/header.js +4 -3
- package/packages/table/src/methods.js +28 -38
- package/packages/v-x-e-table/src/conf.js +1 -0
- package/styles/button.scss +10 -0
- package/styles/custom.scss +23 -37
- package/styles/grid.scss +1 -0
- package/styles/input.scss +3 -3
- package/styles/menu.scss +21 -39
- package/styles/modal.scss +3 -0
- package/styles/old-icon.scss +1 -1
- package/styles/pager.scss +1 -19
- package/styles/pulldown.scss +2 -1
- package/styles/select.scss +1 -0
- package/styles/table.scss +14 -8
- package/styles/variable.scss +5 -1
- package/types/module/menu.d.ts +40 -3
- package/types/v-x-e-table/renderer.d.ts +6 -1
- /package/lib/icon/style/{iconfont.1724212116436.ttf → iconfont.1724894779531.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1724212116436.woff → iconfont.1724894779531.woff} +0 -0
- /package/lib/icon/style/{iconfont.1724212116436.woff2 → iconfont.1724894779531.woff2} +0 -0
- /package/lib/{iconfont.1724212116436.ttf → iconfont.1724894779531.ttf} +0 -0
- /package/lib/{iconfont.1724212116436.woff → iconfont.1724894779531.woff} +0 -0
- /package/lib/{iconfont.1724212116436.woff2 → iconfont.1724894779531.woff2} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_size=_interopRequireDefault(require("../../mixins/size")),_utils=_interopRequireWildcard(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_event=require("../../tools/event");function _getRequireWildcardCache(e){var t,n;return"function"!=typeof WeakMap?null:(t=new WeakMap,n=new WeakMap,(_getRequireWildcardCache=function(e){return e?n:t})(e))}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return{default:e};t=_getRequireWildcardCache(t);if(t&&t.has(e))return t.get(e);var n,i,o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((i=r?Object.getOwnPropertyDescriptor(e,n):null)&&(i.get||i.set)?Object.defineProperty(o,n,i):o[n]=e[n]);return o.default=e,t&&t.set(e,o),o}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default={name:"VxeButton",mixins:[_size.default],props:{type:String,mode:String,size:{type:String,default:function(){return _conf.default.button.size||_conf.default.size}},name:[String,Number],content:String,placement:String,status:String,icon:String,round:Boolean,circle:Boolean,title:String,disabled:Boolean,loading:Boolean,trigger:{type:String,default:function(){return _conf.default.button.trigger}},destroyOnClose:Boolean,className:[String,Function],popupClassName:[String,Function],transfer:{type:Boolean,default:function(){return _conf.default.button.transfer}}},inject:{$xebuttonggroup:{default:null}},data:function(){return{inited:!1,visiblePanel:!1,animatVisible:!1,isActivated:!1,panelIndex:0,panelStyle:null,panelPlacement:null}},computed:{isFormBtn:function(){var e=this.type;return!!e&&-1<["submit","reset","button"].indexOf(e)},btnMode:function(){var e=this.$xebuttonggroup,t=this.mode,n=this.type;return"text"===t||"text"===n||e&&"text"===e.mode?"text":"button"},btnStatus:function(){var e=this.$xebuttonggroup,t=this.status;return t||(e?e.status:"")},btnRound:function(){var e=this.$xebuttonggroup,t=this.round;return t||!!e&&e.round},btnCircle:function(){var e=this.$xebuttonggroup,t=this.circle;return t||!!e&&e.circle}},created:function(){_event.GlobalEvent.on(this,"mousewheel",this.handleGlobalMousewheelEvent),_event.GlobalEvent.on(this,"mousedown",this.handleGlobalMousedownEvent)},beforeDestroy:function(){var e=this.$refs.btnPanel;e&&e.parentNode&&e.parentNode.removeChild(e)},destroyed:function(){_event.GlobalEvent.off(this,"mousewheel"),_event.GlobalEvent.off(this,"mousedown")},render:function(e){var t=this.$scopedSlots,n=this.className,i=this.popupClassName,o=this.trigger,r=this.title,s=this.inited,a=this.type,l=this.destroyOnClose,u=this.isFormBtn,c=this.btnMode,d=this.btnStatus,f=this.btnRound,p=this.btnCircle,h=this.vSize,v=this.name,b=this.disabled,m=this.loading,g=this.visiblePanel,y=this.animatVisible,_=this.panelPlacement,t=t.dropdowns,P={},x={};return t&&"hover"===o&&(P.mouseenter=this.mouseenterTargetEvent,P.mouseleave=this.mouseleaveTargetEvent,x.mouseenter=this.mouseenterDropdownEvent,x.mouseleave=this.mouseleaveDropdownEvent),t?e("div",{class:["vxe-button--dropdown",n?_xeUtils.default.isFunction(n)?n({$button:this}):n:"",_defineProperty(_defineProperty({},"size--".concat(h),h),"is--active",g)]},[e("button",{ref:"xBtn",class:["vxe-button","type--".concat(c),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"theme--".concat(d),d),"is--round",f),"is--circle",p),"is--disabled",b||m),"is--loading",m)],attrs:{name:v,title:r,type:u?a:"button",disabled:b||m},on:_objectSpread({click:this.clickTargetEvent},P)},this.renderContent(e).concat([e("i",{class:"vxe-button--dropdown-arrow ".concat(_conf.default.icon.BUTTON_DROPDOWN)})])),e("div",{ref:"btnPanel",class:["vxe-button--dropdown-panel",i?_xeUtils.default.isFunction(i)?i({$button:this}):i:"",_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"animat--leave",y),"animat--enter",g)],attrs:{placement:_},style:this.panelStyle,on:x},s?[e("div",{class:"vxe-button--dropdown-wrapper",on:{mousedown:this.mousedownDropdownEvent,click:this.clickDropdownEvent}},l&&!g?[]:t.call(this,{},e))]:null)]):e("button",{ref:"xBtn",class:["vxe-button","type--".concat(c),n?_xeUtils.default.isFunction(n)?n({$button:this}):n:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"theme--".concat(d),d),"is--round",f),"is--circle",p),"is--disabled",b||m),"is--loading",m)],attrs:{name:v,title:r,type:u?a:"button",disabled:b||m},on:{click:this.clickEvent,onMouseenter:this.mouseenterEvent,onMouseleave:this.mouseleaveEvent}},this.renderContent(e))},methods:{renderContent:function(e){var t=this.$scopedSlots,n=this.content,i=this.icon,o=[];return this.loading?o.push(e("i",{class:["vxe-button--loading-icon",_conf.default.icon.BUTTON_LOADING]})):t.icon?o.push(e("span",{class:"vxe-button--custom-icon"},t.icon.call(this,{}))):i&&o.push(e("i",{class:["vxe-button--icon",i]})),t.default?o.push(e("span",{class:"vxe-button--content"},t.default.call(this,{}))):n&&o.push(e("span",{class:"vxe-button--content"},[(0,_utils.getFuncText)(n)])),o},handleGlobalMousewheelEvent:function(e){this.visiblePanel&&!_dom.default.getEventTargetNode(e,this.$refs.btnPanel).flag&&this.closePanel()},handleGlobalMousedownEvent:function(e){var t,n=this.disabled,i=this.visiblePanel;n||(n=this.$refs.$el,t=this.$refs.btnPanel,this.isActivated=_dom.default.getEventTargetNode(e,n).flag||_dom.default.getEventTargetNode(e,t).flag,i&&!this.isActivated&&this.closePanel())},updateZindex:function(){this.panelIndex<_utils.default.getLastZIndex()&&(this.panelIndex=_utils.default.nextZIndex())},mousedownDropdownEvent:function(e){0===e.button&&e.stopPropagation()},clickEvent:function(e){var t=this.$xebuttonggroup;t?t.handleClick({name:this.name},e):this.$emit("click",{$event:e})},clickDropdownEvent:function(e){var t=this,n=e.currentTarget,i=this.$refs.btnPanel,n=_dom.default.getEventTargetNode(e,n,"vxe-button"),o=n.flag,n=n.targetElem;o&&(i&&(i.dataset.active="N"),this.visiblePanel=!1,setTimeout(function(){i&&"Y"===i.dataset.active||(t.animatVisible=!1)},350),this.$emit("dropdown-click",{name:n.getAttribute("name"),$event:e}))},mouseleaveTargetEvent:function(e){this.closePanel(),this.mouseleaveEvent(e)},mouseenterEvent:function(e){this.$emit("mouseenter",{$event:e})},mouseleaveEvent:function(e){this.$emit("mouseleave",{$event:e})},mouseenterTargetEvent:function(e){this.openPanel(),this.$emit("mouseenter",{$event:e})},mouseenterDropdownEvent:function(){var e=this,t=this.$refs.btnPanel;t&&(t.dataset.active="Y",this.animatVisible=!0,setTimeout(function(){"Y"===t.dataset.active&&(e.visiblePanel=!0,e.updateZindex(),e.updatePlacement(),setTimeout(function(){e.visiblePanel&&e.updatePlacement()},50))},20))},mouseleaveDropdownEvent:function(){this.closePanel()},clickTargetEvent:function(e){"click"===this.trigger&&(this.visiblePanel?this.closePanel():this.openPanel()),this.clickEvent(e)},openPanel:function(){var e=this,t=this.trigger,n=this.$refs.btnPanel;return n&&(n.dataset.active="Y",this.inited||(this.inited=!0,this.transfer&&document.body.appendChild(n)),this.showTime=setTimeout(function(){"Y"===n.dataset.active?e.mouseenterDropdownEvent():e.animatVisible=!1},"click"===t?50:250)),this.$nextTick()},closePanel:function(){var e=this,t=this.$refs.btnPanel;return clearTimeout(this.showTime),t?(t.dataset.active="N",setTimeout(function(){"Y"!==t.dataset.active&&(e.visiblePanel=!1,setTimeout(function(){"Y"!==t.dataset.active&&(e.animatVisible=!1)},350))},100)):(this.animatVisible=!1,this.visiblePanel=!1),this.$nextTick()},updatePlacement:function(){var p=this;return this.$nextTick().then(function(){var e,t,n,i,o,r,s,a,l=p.$refs,u=p.transfer,c=p.placement,d=p.panelIndex,f=l.xBtn,l=l.btnPanel;if(l&&f)return e=f.offsetHeight,t=f.offsetWidth,n=l.offsetHeight,l=l.offsetWidth,d={zIndex:d},a=(f=_dom.default.getAbsolutePos(f)).top,i=f.left,o=f.boundingTop,r=f.visibleHeight,f=f.visibleWidth,s="bottom",u?(u=a+e,"top"===c?(s="top",u=a-n):c||(r<o+e+n+5&&(s="top",u=a-n),u<5&&(s="bottom",u=a+e)),f<(a=i+t-l)+l+5&&(a-=a+l+5-f),a<5&&(a=5),Object.assign(d,{left:"".concat(a,"px"),right:"auto",top:"".concat(u,"px"),minWidth:"".concat(t,"px")})):"top"===c?(s="top",d.bottom="".concat(e,"px")):c||r<o+e+n&&5<o-e-n&&(s="top",d.bottom="".concat(e,"px")),p.panelStyle=d,p.panelPlacement=s,p.$nextTick()})},focus:function(){return this.$el.focus(),this.$nextTick()},blur:function(){return this.$el.blur(),this.$nextTick()}}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_size=_interopRequireDefault(require("../../mixins/size")),_utils=_interopRequireWildcard(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_event=require("../../tools/event");function _getRequireWildcardCache(e){var t,n;return"function"!=typeof WeakMap?null:(t=new WeakMap,n=new WeakMap,(_getRequireWildcardCache=function(e){return e?n:t})(e))}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return{default:e};t=_getRequireWildcardCache(t);if(t&&t.has(e))return t.get(e);var n,i,o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((i=r?Object.getOwnPropertyDescriptor(e,n):null)&&(i.get||i.set)?Object.defineProperty(o,n,i):o[n]=e[n]);return o.default=e,t&&t.set(e,o),o}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default={name:"VxeButton",mixins:[_size.default],props:{type:String,mode:String,size:{type:String,default:function(){return _conf.default.button.size||_conf.default.size}},name:[String,Number],content:String,placement:String,status:String,icon:String,round:Boolean,circle:Boolean,title:String,disabled:Boolean,loading:Boolean,trigger:{type:String,default:function(){return _conf.default.button.trigger}},align:String,destroyOnClose:Boolean,className:[String,Function],popupClassName:[String,Function],transfer:{type:Boolean,default:function(){return _conf.default.button.transfer}}},inject:{$xebuttonggroup:{default:null}},data:function(){return{inited:!1,visiblePanel:!1,animatVisible:!1,isActivated:!1,panelIndex:0,panelStyle:null,panelPlacement:null}},computed:{isFormBtn:function(){var e=this.type;return!!e&&-1<["submit","reset","button"].indexOf(e)},btnMode:function(){var e=this.$xebuttonggroup,t=this.mode,n=this.type;return"text"===t||"text"===n||e&&"text"===e.mode?"text":"button"},btnStatus:function(){var e=this.$xebuttonggroup,t=this.status;return t||(e?e.status:"")},btnRound:function(){var e=this.$xebuttonggroup,t=this.round;return t||!!e&&e.round},btnCircle:function(){var e=this.$xebuttonggroup,t=this.circle;return t||!!e&&e.circle}},created:function(){_event.GlobalEvent.on(this,"mousewheel",this.handleGlobalMousewheelEvent),_event.GlobalEvent.on(this,"mousedown",this.handleGlobalMousedownEvent)},beforeDestroy:function(){var e=this.$refs.btnPanel;e&&e.parentNode&&e.parentNode.removeChild(e)},destroyed:function(){_event.GlobalEvent.off(this,"mousewheel"),_event.GlobalEvent.off(this,"mousedown")},render:function(e){var t=this.$scopedSlots,n=this.className,i=this.popupClassName,o=this.trigger,r=this.align,s=this.title,a=this.inited,l=this.type,u=this.destroyOnClose,c=this.isFormBtn,d=this.btnMode,f=this.btnStatus,p=this.btnRound,h=this.btnCircle,v=this.vSize,b=this.name,m=this.disabled,g=this.loading,y=this.visiblePanel,_=this.animatVisible,P=this.panelPlacement,t=t.dropdowns,x={},w={};return t&&"hover"===o&&(x.mouseenter=this.mouseenterTargetEvent,x.mouseleave=this.mouseleaveTargetEvent,w.mouseenter=this.mouseenterDropdownEvent,w.mouseleave=this.mouseleaveDropdownEvent),t?e("div",{class:["vxe-button--dropdown",n?_xeUtils.default.isFunction(n)?n({$button:this}):n:"",_defineProperty(_defineProperty({},"size--".concat(v),v),"is--active",y)]},[e("button",{ref:"xBtn",class:["vxe-button","type--".concat(d),r?"align--".concat(r):"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(v),v),"theme--".concat(f),f),"is--round",p),"is--circle",h),"is--disabled",m||g),"is--loading",g)],attrs:{name:b,title:s,type:c?l:"button",disabled:m||g},on:_objectSpread({click:this.clickTargetEvent},x)},this.renderContent(e).concat([e("i",{class:"vxe-button--dropdown-arrow ".concat(_conf.default.icon.BUTTON_DROPDOWN)})])),e("div",{ref:"btnPanel",class:["vxe-button--dropdown-panel",i?_xeUtils.default.isFunction(i)?i({$button:this}):i:"",_defineProperty(_defineProperty(_defineProperty({},"size--".concat(v),v),"animat--leave",_),"animat--enter",y)],attrs:{placement:P},style:this.panelStyle,on:w},a?[e("div",{class:"vxe-button--dropdown-wrapper",on:{mousedown:this.mousedownDropdownEvent,click:this.clickDropdownEvent}},u&&!y?[]:t.call(this,{},e))]:null)]):e("button",{ref:"xBtn",class:["vxe-button","type--".concat(d),r?"align--".concat(r):"",n?_xeUtils.default.isFunction(n)?n({$button:this}):n:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(v),v),"theme--".concat(f),f),"is--round",p),"is--circle",h),"is--disabled",m||g),"is--loading",g)],attrs:{name:b,title:s,type:c?l:"button",disabled:m||g},on:{click:this.clickEvent,onMouseenter:this.mouseenterEvent,onMouseleave:this.mouseleaveEvent}},this.renderContent(e))},methods:{renderContent:function(e){var t=this.$scopedSlots,n=this.content,i=this.icon,o=[];return this.loading?o.push(e("i",{class:["vxe-button--loading-icon",_conf.default.icon.BUTTON_LOADING]})):t.icon?o.push(e("span",{class:"vxe-button--custom-icon"},t.icon.call(this,{}))):i&&o.push(e("i",{class:["vxe-button--icon",i]})),t.default?o.push(e("span",{class:"vxe-button--content"},t.default.call(this,{}))):n&&o.push(e("span",{class:"vxe-button--content"},[(0,_utils.getFuncText)(n)])),o},handleGlobalMousewheelEvent:function(e){this.visiblePanel&&!_dom.default.getEventTargetNode(e,this.$refs.btnPanel).flag&&this.closePanel()},handleGlobalMousedownEvent:function(e){var t,n=this.disabled,i=this.visiblePanel;n||(n=this.$refs.$el,t=this.$refs.btnPanel,this.isActivated=_dom.default.getEventTargetNode(e,n).flag||_dom.default.getEventTargetNode(e,t).flag,i&&!this.isActivated&&this.closePanel())},updateZindex:function(){this.panelIndex<_utils.default.getLastZIndex()&&(this.panelIndex=_utils.default.nextZIndex())},mousedownDropdownEvent:function(e){0===e.button&&e.stopPropagation()},clickEvent:function(e){var t=this.$xebuttonggroup;t?t.handleClick({name:this.name},e):this.$emit("click",{$event:e})},clickDropdownEvent:function(e){var t=this,n=e.currentTarget,i=this.$refs.btnPanel,n=_dom.default.getEventTargetNode(e,n,"vxe-button"),o=n.flag,n=n.targetElem;o&&(i&&(i.dataset.active="N"),this.visiblePanel=!1,setTimeout(function(){i&&"Y"===i.dataset.active||(t.animatVisible=!1)},350),this.$emit("dropdown-click",{name:n.getAttribute("name"),$event:e}))},mouseleaveTargetEvent:function(e){this.closePanel(),this.mouseleaveEvent(e)},mouseenterEvent:function(e){this.$emit("mouseenter",{$event:e})},mouseleaveEvent:function(e){this.$emit("mouseleave",{$event:e})},mouseenterTargetEvent:function(e){this.openPanel(),this.$emit("mouseenter",{$event:e})},mouseenterDropdownEvent:function(){var e=this,t=this.$refs.btnPanel;t&&(t.dataset.active="Y",this.animatVisible=!0,setTimeout(function(){"Y"===t.dataset.active&&(e.visiblePanel=!0,e.updateZindex(),e.updatePlacement(),setTimeout(function(){e.visiblePanel&&e.updatePlacement()},50))},20))},mouseleaveDropdownEvent:function(){this.closePanel()},clickTargetEvent:function(e){"click"===this.trigger&&(this.visiblePanel?this.closePanel():this.openPanel()),this.clickEvent(e)},openPanel:function(){var e=this,t=this.trigger,n=this.$refs.btnPanel;return n&&(n.dataset.active="Y",this.inited||(this.inited=!0,this.transfer&&document.body.appendChild(n)),this.showTime=setTimeout(function(){"Y"===n.dataset.active?e.mouseenterDropdownEvent():e.animatVisible=!1},"click"===t?50:250)),this.$nextTick()},closePanel:function(){var e=this,t=this.$refs.btnPanel;return clearTimeout(this.showTime),t?(t.dataset.active="N",setTimeout(function(){"Y"!==t.dataset.active&&(e.visiblePanel=!1,setTimeout(function(){"Y"!==t.dataset.active&&(e.animatVisible=!1)},350))},100)):(this.animatVisible=!1,this.visiblePanel=!1),this.$nextTick()},updatePlacement:function(){var p=this;return this.$nextTick().then(function(){var e,t,n,i,o,r,s,a,l=p.$refs,u=p.transfer,c=p.placement,d=p.panelIndex,f=l.xBtn,l=l.btnPanel;if(l&&f)return e=f.offsetHeight,t=f.offsetWidth,n=l.offsetHeight,l=l.offsetWidth,d={zIndex:d},a=(f=_dom.default.getAbsolutePos(f)).top,i=f.left,o=f.boundingTop,r=f.visibleHeight,f=f.visibleWidth,s="bottom",u?(u=a+e,"top"===c?(s="top",u=a-n):c||(r<o+e+n+5&&(s="top",u=a-n),u<5&&(s="bottom",u=a+e)),f<(a=i+t-l)+l+5&&(a-=a+l+5-f),a<5&&(a=5),Object.assign(d,{left:"".concat(a,"px"),right:"auto",top:"".concat(u,"px"),minWidth:"".concat(t,"px")})):"top"===c?(s="top",d.bottom="".concat(e,"px")):c||r<o+e+n&&5<o-e-n&&(s="top",d.bottom="".concat(e,"px")),p.panelStyle=d,p.panelPlacement=s,p.$nextTick()})},focus:function(){return this.$el.focus(),this.$nextTick()},blur:function(){return this.$el.blur(),this.$nextTick()}}};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/*size*/
|
|
3
3
|
/*icon*/
|
|
4
4
|
/*color*/
|
|
5
|
+
/*layout*/
|
|
5
6
|
/*input/radio/checkbox*/
|
|
6
7
|
/*popup*/
|
|
7
8
|
/*table*/
|
|
@@ -44,6 +45,15 @@
|
|
|
44
45
|
appearance: none;
|
|
45
46
|
transition: border 0.2s ease-in-out;
|
|
46
47
|
}
|
|
48
|
+
.vxe-button.align--left {
|
|
49
|
+
text-align: left;
|
|
50
|
+
}
|
|
51
|
+
.vxe-button.align--center {
|
|
52
|
+
text-align: center;
|
|
53
|
+
}
|
|
54
|
+
.vxe-button.align--right {
|
|
55
|
+
text-align: right;
|
|
56
|
+
}
|
|
47
57
|
.vxe-button:not(.is--disabled) {
|
|
48
58
|
color: #606266;
|
|
49
59
|
cursor: pointer;
|
|
@@ -429,6 +439,7 @@
|
|
|
429
439
|
|
|
430
440
|
.vxe-button--dropdown {
|
|
431
441
|
position: relative;
|
|
442
|
+
outline: 0;
|
|
432
443
|
}
|
|
433
444
|
.vxe-button--dropdown + .vxe-button-wrapper, .vxe-button--dropdown + .vxe-button.type--button, .vxe-button--dropdown + .vxe-button--dropdown {
|
|
434
445
|
margin-left: 12px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-button{position:relative;text-align:center;background-color:#fff;outline:0;font-size:14px;max-width:500px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:border .2s ease-in-out}.vxe-button:not(.is--disabled){color:#606266;cursor:pointer}.vxe-button.is--loading{cursor:progress}.vxe-button.is--loading:before{content:"";position:absolute;left:-1px;top:-1px;right:-1px;bottom:-1px;border-radius:inherit;background-color:hsla(0,0%,100%,.35);pointer-events:none}.vxe-button.is--disabled{color:#bfbfbf}.vxe-button.is--disabled:not(.is--loading){cursor:no-drop}.vxe-button.type--text{text-decoration:none;border:0;padding:.1em .5em;background-color:transparent}.vxe-button.type--text:not(.is--disabled):focus{color:#47494c}.vxe-button.type--text:not(.is--disabled):hover{color:#73b8ff}.vxe-button.type--text:not(.is--disabled):active{color:#0d84ff}.vxe-button.type--text.theme--primary{color:#409eff}.vxe-button.type--text.theme--primary:not(.is--disabled):focus{color:#0d84ff}.vxe-button.type--text.theme--primary:not(.is--disabled):hover{color:#73b8ff}.vxe-button.type--text.theme--primary:not(.is--disabled):active{color:#0d84ff}.vxe-button.type--text.theme--primary.is--disabled{color:#a6d2ff}.vxe-button.type--text.theme--success{color:#67c23a}.vxe-button.type--text.theme--success:not(.is--disabled):focus{color:#529b2e}.vxe-button.type--text.theme--success:not(.is--disabled):hover{color:#85cf60}.vxe-button.type--text.theme--success:not(.is--disabled):active{color:#529b2e}.vxe-button.type--text.theme--success.is--disabled{color:#a3db87}.vxe-button.type--text.theme--info{color:#909399}.vxe-button.type--text.theme--info:not(.is--disabled):focus{color:#767980}.vxe-button.type--text.theme--info:not(.is--disabled):hover{color:#abadb1}.vxe-button.type--text.theme--info:not(.is--disabled):active{color:#767980}.vxe-button.type--text.theme--info.is--disabled{color:#c5c7ca}.vxe-button.type--text.theme--warning{color:#e6a23c}.vxe-button.type--text.theme--warning:not(.is--disabled):focus{color:#d48a1b}.vxe-button.type--text.theme--warning:not(.is--disabled):hover{color:#ecb869}.vxe-button.type--text.theme--warning:not(.is--disabled):active{color:#d48a1b}.vxe-button.type--text.theme--warning.is--disabled{color:#f2cd96}.vxe-button.type--text.theme--danger{color:#f56c6c}.vxe-button.type--text.theme--danger:not(.is--disabled):focus{color:#f23c3c}.vxe-button.type--text.theme--danger:not(.is--disabled):hover{color:#f89c9c}.vxe-button.type--text.theme--danger:not(.is--disabled):active{color:#f23c3c}.vxe-button.type--text.theme--danger.is--disabled{color:#fbcccc}.vxe-button.type--text.theme--perfect{color:#f8f8f9}.vxe-button.type--text.theme--perfect:not(.is--disabled):focus{color:#f8f8f9}.vxe-button.type--text.theme--perfect:not(.is--disabled):hover{color:#f8f8f9}.vxe-button.type--text.theme--perfect:not(.is--disabled):active{color:#f8f8f9}.vxe-button.type--text.theme--perfect.is--disabled{color:#f8f8f9}.vxe-button.type--button{font-family:inherit;height:34px;line-height:1;border:1px solid #dcdfe6}.vxe-button.type--button.is--round{border-radius:17px}.vxe-button.type--button:not(.is--round){border-radius:4px}.vxe-button.type--button.is--circle{padding:0 .5em;min-width:34px;border-radius:50%}.vxe-button.type--button:not(.is--circle){padding:0 1em}.vxe-button.type--button:not(.is--disabled):hover{color:#73b8ff}.vxe-button.type--button:not(.is--disabled):focus{border-color:#409eff}.vxe-button.type--button:not(.is--disabled):active{color:#0d84ff;border-color:#0d84ff;background-color:#fff}.vxe-button.type--button.theme--primary{color:#fff}.vxe-button.type--button.theme--primary:not(.is--disabled){border-color:#409eff;background-color:#409eff}.vxe-button.type--button.theme--primary:not(.is--disabled):hover{color:#fff;background-color:#73b8ff;border-color:#73b8ff}.vxe-button.type--button.theme--primary:not(.is--disabled):active{color:#fff;background-color:#0d84ff;border-color:#0d84ff}.vxe-button.type--button.theme--primary.is--disabled{border-color:#a6d2ff;background-color:#a6d2ff}.vxe-button.type--button.theme--primary.is--loading{border-color:#409eff;background-color:#409eff}.vxe-button.type--button.theme--success{color:#fff}.vxe-button.type--button.theme--success:not(.is--disabled){border-color:#67c23a;background-color:#67c23a}.vxe-button.type--button.theme--success:not(.is--disabled):hover{color:#fff;background-color:#85cf60;border-color:#85cf60}.vxe-button.type--button.theme--success:not(.is--disabled):active{color:#fff;background-color:#529b2e;border-color:#529b2e}.vxe-button.type--button.theme--success.is--disabled{border-color:#a3db87;background-color:#a3db87}.vxe-button.type--button.theme--success.is--loading{border-color:#67c23a;background-color:#67c23a}.vxe-button.type--button.theme--info{color:#fff}.vxe-button.type--button.theme--info:not(.is--disabled){border-color:#909399;background-color:#909399}.vxe-button.type--button.theme--info:not(.is--disabled):hover{color:#fff;background-color:#abadb1;border-color:#abadb1}.vxe-button.type--button.theme--info:not(.is--disabled):active{color:#fff;background-color:#767980;border-color:#767980}.vxe-button.type--button.theme--info.is--disabled{border-color:#c5c7ca;background-color:#c5c7ca}.vxe-button.type--button.theme--info.is--loading{border-color:#909399;background-color:#909399}.vxe-button.type--button.theme--warning{color:#fff}.vxe-button.type--button.theme--warning:not(.is--disabled){border-color:#e6a23c;background-color:#e6a23c}.vxe-button.type--button.theme--warning:not(.is--disabled):hover{color:#fff;background-color:#ecb869;border-color:#ecb869}.vxe-button.type--button.theme--warning:not(.is--disabled):active{color:#fff;background-color:#d48a1b;border-color:#d48a1b}.vxe-button.type--button.theme--warning.is--disabled{border-color:#f2cd96;background-color:#f2cd96}.vxe-button.type--button.theme--warning.is--loading{border-color:#e6a23c;background-color:#e6a23c}.vxe-button.type--button.theme--danger{color:#fff}.vxe-button.type--button.theme--danger:not(.is--disabled){border-color:#f56c6c;background-color:#f56c6c}.vxe-button.type--button.theme--danger:not(.is--disabled):hover{color:#fff;background-color:#f89c9c;border-color:#f89c9c}.vxe-button.type--button.theme--danger:not(.is--disabled):active{color:#fff;background-color:#f23c3c;border-color:#f23c3c}.vxe-button.type--button.theme--danger.is--disabled{border-color:#fbcccc;background-color:#fbcccc}.vxe-button.type--button.theme--danger.is--loading{border-color:#f56c6c;background-color:#f56c6c}.vxe-button.type--button.theme--perfect{color:#606266}.vxe-button.type--button.theme--perfect:not(.is--disabled){border-color:#f8f8f9;background-color:#f8f8f9}.vxe-button.type--button.theme--perfect:not(.is--disabled):hover{color:#606266;background-color:#f8f8f9;border-color:#f8f8f9}.vxe-button.type--button.theme--perfect:not(.is--disabled):active{color:#606266;background-color:#f8f8f9;border-color:#f8f8f9}.vxe-button.type--button.theme--perfect.is--disabled{border-color:#f8f8f9;background-color:#f8f8f9}.vxe-button.type--button.theme--perfect.is--loading{border-color:#f8f8f9;background-color:#f8f8f9}.vxe-button.size--medium{font-size:14px}.vxe-button.size--medium.type--button{height:32px}.vxe-button.size--medium.type--button.is--circle{min-width:32px}.vxe-button.size--medium.type--button.is--round{border-radius:16px}.vxe-button.size--medium .vxe-button--icon,.vxe-button.size--medium .vxe-button--loading-icon{min-width:14px}.vxe-button.size--small{font-size:13px}.vxe-button.size--small.type--button{height:30px}.vxe-button.size--small.type--button.is--circle{min-width:30px}.vxe-button.size--small.type--button.is--round{border-radius:15px}.vxe-button.size--small .vxe-button--icon,.vxe-button.size--small .vxe-button--loading-icon{min-width:13px}.vxe-button.size--mini{font-size:12px}.vxe-button.size--mini.type--button{height:28px}.vxe-button.size--mini.type--button.is--circle{min-width:28px}.vxe-button.size--mini.type--button.is--round{border-radius:14px}.vxe-button.size--mini .vxe-button--icon,.vxe-button.size--mini .vxe-button--loading-icon{min-width:12px}.vxe-button+.vxe-button--dropdown,.vxe-button+.vxe-button-wrapper,.vxe-button+.vxe-button.type--button,.vxe-button-wrapper+.vxe-button--dropdown,.vxe-button-wrapper+.vxe-button-wrapper,.vxe-button-wrapper+.vxe-button.type--button,.vxe-input+.vxe-button--dropdown,.vxe-input+.vxe-button-wrapper,.vxe-input+.vxe-button.type--button{margin-left:12px}.vxe-button--icon,.vxe-button--loading-icon{min-width:14px}.vxe-button--icon+.vxe-button--content,.vxe-button--loading-icon+.vxe-button--content{margin-left:4px}.vxe-button--dropdown,.vxe-button--wrapper{display:inline-block}.vxe-button--dropdown{position:relative}.vxe-button--dropdown+.vxe-button--dropdown,.vxe-button--dropdown+.vxe-button-wrapper,.vxe-button--dropdown+.vxe-button.type--button{margin-left:12px}.vxe-button--dropdown>.vxe-button.type--button.theme--primary{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--success{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--info{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--warning{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--danger{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--perfect{color:#606266}.vxe-button--dropdown.is--active>.vxe-button:not(.is--disabled){color:#73b8ff}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--primary{color:#73b8ff}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--success{color:#85cf60}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--info{color:#abadb1}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--warning{color:#ecb869}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--danger{color:#f89c9c}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--perfect{color:#f8f8f9}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--primary{color:#fff;background-color:#73b8ff;border-color:#73b8ff}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--success{color:#fff;background-color:#85cf60;border-color:#85cf60}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--info{color:#fff;background-color:#abadb1;border-color:#abadb1}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--warning{color:#fff;background-color:#ecb869;border-color:#ecb869}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--danger{color:#fff;background-color:#f89c9c;border-color:#f89c9c}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--perfect{color:#606266;background-color:#f8f8f9;border-color:#f8f8f9}.vxe-button--dropdown.is--active .vxe-button--dropdown-arrow{transform:rotate(180deg)}.vxe-button--dropdown-arrow{display:inline-block;font-size:12px;margin-left:4px;transition:transform .2s ease-in-out}.vxe-button--dropdown-panel{display:none;position:absolute;right:0;padding:4px 0}.vxe-button--dropdown-panel.animat--leave{display:block;opacity:0;transform:scaleY(.5);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transform-origin:center top;backface-visibility:hidden;transform-style:preserve-3d}.vxe-button--dropdown-panel.animat--leave[placement=top]{transform-origin:center bottom}.vxe-button--dropdown-panel.animat--enter{opacity:1;transform:scaleY(1)}.vxe-button--dropdown-wrapper{padding:5px;background-color:#fff;border-radius:4px;border:1px solid #dcdfe6;box-shadow:0 1px 6px rgba(0,0,0,.2)}.vxe-button--dropdown-wrapper>.vxe-button.type--button,.vxe-button--dropdown-wrapper>.vxe-button.type--text{display:block;width:100%;border:0;margin:.4em 0 0 0}.vxe-button--dropdown-wrapper>.vxe-button.type--text{padding:2px 8px}.vxe-button--dropdown-wrapper>.vxe-button:first-child{margin-top:0}.vxe-button--dropdown-wrapper>.vxe-button:last-child{margin-bottom:0}
|
|
1
|
+
.vxe-button{position:relative;text-align:center;background-color:#fff;outline:0;font-size:14px;max-width:500px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:border .2s ease-in-out}.vxe-button.align--left{text-align:left}.vxe-button.align--center{text-align:center}.vxe-button.align--right{text-align:right}.vxe-button:not(.is--disabled){color:#606266;cursor:pointer}.vxe-button.is--loading{cursor:progress}.vxe-button.is--loading:before{content:"";position:absolute;left:-1px;top:-1px;right:-1px;bottom:-1px;border-radius:inherit;background-color:hsla(0,0%,100%,.35);pointer-events:none}.vxe-button.is--disabled{color:#bfbfbf}.vxe-button.is--disabled:not(.is--loading){cursor:no-drop}.vxe-button.type--text{text-decoration:none;border:0;padding:.1em .5em;background-color:transparent}.vxe-button.type--text:not(.is--disabled):focus{color:#47494c}.vxe-button.type--text:not(.is--disabled):hover{color:#73b8ff}.vxe-button.type--text:not(.is--disabled):active{color:#0d84ff}.vxe-button.type--text.theme--primary{color:#409eff}.vxe-button.type--text.theme--primary:not(.is--disabled):focus{color:#0d84ff}.vxe-button.type--text.theme--primary:not(.is--disabled):hover{color:#73b8ff}.vxe-button.type--text.theme--primary:not(.is--disabled):active{color:#0d84ff}.vxe-button.type--text.theme--primary.is--disabled{color:#a6d2ff}.vxe-button.type--text.theme--success{color:#67c23a}.vxe-button.type--text.theme--success:not(.is--disabled):focus{color:#529b2e}.vxe-button.type--text.theme--success:not(.is--disabled):hover{color:#85cf60}.vxe-button.type--text.theme--success:not(.is--disabled):active{color:#529b2e}.vxe-button.type--text.theme--success.is--disabled{color:#a3db87}.vxe-button.type--text.theme--info{color:#909399}.vxe-button.type--text.theme--info:not(.is--disabled):focus{color:#767980}.vxe-button.type--text.theme--info:not(.is--disabled):hover{color:#abadb1}.vxe-button.type--text.theme--info:not(.is--disabled):active{color:#767980}.vxe-button.type--text.theme--info.is--disabled{color:#c5c7ca}.vxe-button.type--text.theme--warning{color:#e6a23c}.vxe-button.type--text.theme--warning:not(.is--disabled):focus{color:#d48a1b}.vxe-button.type--text.theme--warning:not(.is--disabled):hover{color:#ecb869}.vxe-button.type--text.theme--warning:not(.is--disabled):active{color:#d48a1b}.vxe-button.type--text.theme--warning.is--disabled{color:#f2cd96}.vxe-button.type--text.theme--danger{color:#f56c6c}.vxe-button.type--text.theme--danger:not(.is--disabled):focus{color:#f23c3c}.vxe-button.type--text.theme--danger:not(.is--disabled):hover{color:#f89c9c}.vxe-button.type--text.theme--danger:not(.is--disabled):active{color:#f23c3c}.vxe-button.type--text.theme--danger.is--disabled{color:#fbcccc}.vxe-button.type--text.theme--perfect{color:#f8f8f9}.vxe-button.type--text.theme--perfect:not(.is--disabled):focus{color:#f8f8f9}.vxe-button.type--text.theme--perfect:not(.is--disabled):hover{color:#f8f8f9}.vxe-button.type--text.theme--perfect:not(.is--disabled):active{color:#f8f8f9}.vxe-button.type--text.theme--perfect.is--disabled{color:#f8f8f9}.vxe-button.type--button{font-family:inherit;height:34px;line-height:1;border:1px solid #dcdfe6}.vxe-button.type--button.is--round{border-radius:17px}.vxe-button.type--button:not(.is--round){border-radius:4px}.vxe-button.type--button.is--circle{padding:0 .5em;min-width:34px;border-radius:50%}.vxe-button.type--button:not(.is--circle){padding:0 1em}.vxe-button.type--button:not(.is--disabled):hover{color:#73b8ff}.vxe-button.type--button:not(.is--disabled):focus{border-color:#409eff}.vxe-button.type--button:not(.is--disabled):active{color:#0d84ff;border-color:#0d84ff;background-color:#fff}.vxe-button.type--button.theme--primary{color:#fff}.vxe-button.type--button.theme--primary:not(.is--disabled){border-color:#409eff;background-color:#409eff}.vxe-button.type--button.theme--primary:not(.is--disabled):hover{color:#fff;background-color:#73b8ff;border-color:#73b8ff}.vxe-button.type--button.theme--primary:not(.is--disabled):active{color:#fff;background-color:#0d84ff;border-color:#0d84ff}.vxe-button.type--button.theme--primary.is--disabled{border-color:#a6d2ff;background-color:#a6d2ff}.vxe-button.type--button.theme--primary.is--loading{border-color:#409eff;background-color:#409eff}.vxe-button.type--button.theme--success{color:#fff}.vxe-button.type--button.theme--success:not(.is--disabled){border-color:#67c23a;background-color:#67c23a}.vxe-button.type--button.theme--success:not(.is--disabled):hover{color:#fff;background-color:#85cf60;border-color:#85cf60}.vxe-button.type--button.theme--success:not(.is--disabled):active{color:#fff;background-color:#529b2e;border-color:#529b2e}.vxe-button.type--button.theme--success.is--disabled{border-color:#a3db87;background-color:#a3db87}.vxe-button.type--button.theme--success.is--loading{border-color:#67c23a;background-color:#67c23a}.vxe-button.type--button.theme--info{color:#fff}.vxe-button.type--button.theme--info:not(.is--disabled){border-color:#909399;background-color:#909399}.vxe-button.type--button.theme--info:not(.is--disabled):hover{color:#fff;background-color:#abadb1;border-color:#abadb1}.vxe-button.type--button.theme--info:not(.is--disabled):active{color:#fff;background-color:#767980;border-color:#767980}.vxe-button.type--button.theme--info.is--disabled{border-color:#c5c7ca;background-color:#c5c7ca}.vxe-button.type--button.theme--info.is--loading{border-color:#909399;background-color:#909399}.vxe-button.type--button.theme--warning{color:#fff}.vxe-button.type--button.theme--warning:not(.is--disabled){border-color:#e6a23c;background-color:#e6a23c}.vxe-button.type--button.theme--warning:not(.is--disabled):hover{color:#fff;background-color:#ecb869;border-color:#ecb869}.vxe-button.type--button.theme--warning:not(.is--disabled):active{color:#fff;background-color:#d48a1b;border-color:#d48a1b}.vxe-button.type--button.theme--warning.is--disabled{border-color:#f2cd96;background-color:#f2cd96}.vxe-button.type--button.theme--warning.is--loading{border-color:#e6a23c;background-color:#e6a23c}.vxe-button.type--button.theme--danger{color:#fff}.vxe-button.type--button.theme--danger:not(.is--disabled){border-color:#f56c6c;background-color:#f56c6c}.vxe-button.type--button.theme--danger:not(.is--disabled):hover{color:#fff;background-color:#f89c9c;border-color:#f89c9c}.vxe-button.type--button.theme--danger:not(.is--disabled):active{color:#fff;background-color:#f23c3c;border-color:#f23c3c}.vxe-button.type--button.theme--danger.is--disabled{border-color:#fbcccc;background-color:#fbcccc}.vxe-button.type--button.theme--danger.is--loading{border-color:#f56c6c;background-color:#f56c6c}.vxe-button.type--button.theme--perfect{color:#606266}.vxe-button.type--button.theme--perfect:not(.is--disabled){border-color:#f8f8f9;background-color:#f8f8f9}.vxe-button.type--button.theme--perfect:not(.is--disabled):hover{color:#606266;background-color:#f8f8f9;border-color:#f8f8f9}.vxe-button.type--button.theme--perfect:not(.is--disabled):active{color:#606266;background-color:#f8f8f9;border-color:#f8f8f9}.vxe-button.type--button.theme--perfect.is--disabled{border-color:#f8f8f9;background-color:#f8f8f9}.vxe-button.type--button.theme--perfect.is--loading{border-color:#f8f8f9;background-color:#f8f8f9}.vxe-button.size--medium{font-size:14px}.vxe-button.size--medium.type--button{height:32px}.vxe-button.size--medium.type--button.is--circle{min-width:32px}.vxe-button.size--medium.type--button.is--round{border-radius:16px}.vxe-button.size--medium .vxe-button--icon,.vxe-button.size--medium .vxe-button--loading-icon{min-width:14px}.vxe-button.size--small{font-size:13px}.vxe-button.size--small.type--button{height:30px}.vxe-button.size--small.type--button.is--circle{min-width:30px}.vxe-button.size--small.type--button.is--round{border-radius:15px}.vxe-button.size--small .vxe-button--icon,.vxe-button.size--small .vxe-button--loading-icon{min-width:13px}.vxe-button.size--mini{font-size:12px}.vxe-button.size--mini.type--button{height:28px}.vxe-button.size--mini.type--button.is--circle{min-width:28px}.vxe-button.size--mini.type--button.is--round{border-radius:14px}.vxe-button.size--mini .vxe-button--icon,.vxe-button.size--mini .vxe-button--loading-icon{min-width:12px}.vxe-button+.vxe-button--dropdown,.vxe-button+.vxe-button-wrapper,.vxe-button+.vxe-button.type--button,.vxe-button-wrapper+.vxe-button--dropdown,.vxe-button-wrapper+.vxe-button-wrapper,.vxe-button-wrapper+.vxe-button.type--button,.vxe-input+.vxe-button--dropdown,.vxe-input+.vxe-button-wrapper,.vxe-input+.vxe-button.type--button{margin-left:12px}.vxe-button--icon,.vxe-button--loading-icon{min-width:14px}.vxe-button--icon+.vxe-button--content,.vxe-button--loading-icon+.vxe-button--content{margin-left:4px}.vxe-button--dropdown,.vxe-button--wrapper{display:inline-block}.vxe-button--dropdown{position:relative;outline:0}.vxe-button--dropdown+.vxe-button--dropdown,.vxe-button--dropdown+.vxe-button-wrapper,.vxe-button--dropdown+.vxe-button.type--button{margin-left:12px}.vxe-button--dropdown>.vxe-button.type--button.theme--primary{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--success{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--info{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--warning{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--danger{color:#fff}.vxe-button--dropdown>.vxe-button.type--button.theme--perfect{color:#606266}.vxe-button--dropdown.is--active>.vxe-button:not(.is--disabled){color:#73b8ff}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--primary{color:#73b8ff}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--success{color:#85cf60}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--info{color:#abadb1}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--warning{color:#ecb869}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--danger{color:#f89c9c}.vxe-button--dropdown.is--active>.vxe-button.type--text.theme--perfect{color:#f8f8f9}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--primary{color:#fff;background-color:#73b8ff;border-color:#73b8ff}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--success{color:#fff;background-color:#85cf60;border-color:#85cf60}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--info{color:#fff;background-color:#abadb1;border-color:#abadb1}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--warning{color:#fff;background-color:#ecb869;border-color:#ecb869}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--danger{color:#fff;background-color:#f89c9c;border-color:#f89c9c}.vxe-button--dropdown.is--active>.vxe-button.type--button.theme--perfect{color:#606266;background-color:#f8f8f9;border-color:#f8f8f9}.vxe-button--dropdown.is--active .vxe-button--dropdown-arrow{transform:rotate(180deg)}.vxe-button--dropdown-arrow{display:inline-block;font-size:12px;margin-left:4px;transition:transform .2s ease-in-out}.vxe-button--dropdown-panel{display:none;position:absolute;right:0;padding:4px 0}.vxe-button--dropdown-panel.animat--leave{display:block;opacity:0;transform:scaleY(.5);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transform-origin:center top;backface-visibility:hidden;transform-style:preserve-3d}.vxe-button--dropdown-panel.animat--leave[placement=top]{transform-origin:center bottom}.vxe-button--dropdown-panel.animat--enter{opacity:1;transform:scaleY(1)}.vxe-button--dropdown-wrapper{padding:5px;background-color:#fff;border-radius:4px;border:1px solid #dcdfe6;box-shadow:0 1px 6px rgba(0,0,0,.2)}.vxe-button--dropdown-wrapper>.vxe-button.type--button,.vxe-button--dropdown-wrapper>.vxe-button.type--text{display:block;width:100%;border:0;margin:.4em 0 0 0}.vxe-button--dropdown-wrapper>.vxe-button.type--text{padding:2px 8px}.vxe-button--dropdown-wrapper>.vxe-button:first-child{margin-top:0}.vxe-button--dropdown-wrapper>.vxe-button:last-child{margin-bottom:0}
|
package/lib/custom/src/panel.js
CHANGED
|
@@ -9,6 +9,7 @@ var _utils = _interopRequireDefault(require("../../tools/utils"));
|
|
|
9
9
|
var _dom = _interopRequireDefault(require("../../tools/dom"));
|
|
10
10
|
var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
11
11
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
12
|
+
var _button = _interopRequireDefault(require("../../button/src/button"));
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
14
|
var formatText = _utils.default.formatText;
|
|
14
15
|
var addClass = _dom.default.addClass,
|
|
@@ -31,7 +32,8 @@ function updateDropHint(_vm, evnt) {
|
|
|
31
32
|
var renderSimplePanel = function renderSimplePanel(h, _vm) {
|
|
32
33
|
var _e = _vm._e,
|
|
33
34
|
$xetable = _vm.$xetable,
|
|
34
|
-
customStore = _vm.customStore
|
|
35
|
+
customStore = _vm.customStore,
|
|
36
|
+
dragColumn = _vm.dragColumn;
|
|
35
37
|
var customColumnList = $xetable.customColumnList,
|
|
36
38
|
customOpts = $xetable.customOpts,
|
|
37
39
|
isMaxFixedColumn = $xetable.isMaxFixedColumn;
|
|
@@ -62,12 +64,14 @@ var renderSimplePanel = function renderSimplePanel(h, _vm) {
|
|
|
62
64
|
var isDisabled = checkMethod ? !checkMethod({
|
|
63
65
|
column: column
|
|
64
66
|
}) : false;
|
|
67
|
+
var isHidden = !isChecked;
|
|
65
68
|
colVNs.push(h('li', {
|
|
66
69
|
key: column.id,
|
|
67
70
|
attrs: {
|
|
68
71
|
colid: column.id
|
|
69
72
|
},
|
|
70
73
|
class: ['vxe-table-custom--option', "level--".concat(column.level), {
|
|
74
|
+
'is--hidden': isHidden,
|
|
71
75
|
'is--group': isColGroup
|
|
72
76
|
}],
|
|
73
77
|
on: {
|
|
@@ -96,29 +100,38 @@ var renderSimplePanel = function renderSimplePanel(h, _vm) {
|
|
|
96
100
|
})]) : _e(), allowSort && column.level === 1 ? h('div', {
|
|
97
101
|
class: 'vxe-table-custom--sort-option'
|
|
98
102
|
}, [h('span', {
|
|
99
|
-
class: 'vxe-table-custom--sort-btn',
|
|
103
|
+
class: ['vxe-table-custom--sort-btn', {
|
|
104
|
+
'is--disabled': isHidden
|
|
105
|
+
}],
|
|
100
106
|
attrs: {
|
|
101
107
|
title: _conf.default.i18n('vxe.custom.setting.sortHelpTip')
|
|
102
108
|
},
|
|
103
|
-
on: {
|
|
109
|
+
on: isHidden ? {} : {
|
|
104
110
|
mousedown: _vm.sortMousedownEvent,
|
|
105
111
|
mouseup: _vm.sortMouseupEvent
|
|
106
112
|
}
|
|
107
113
|
}, [h('i', {
|
|
108
114
|
class: _conf.default.icon.TABLE_CUSTOM_SORT
|
|
109
|
-
})])]) : _e(), h('div', {
|
|
115
|
+
})])]) : _e(), column.type === 'html' ? h('div', {
|
|
116
|
+
key: '1',
|
|
117
|
+
class: 'vxe-table-custom--checkbox-label',
|
|
118
|
+
domProps: {
|
|
119
|
+
innerHTML: colTitle
|
|
120
|
+
}
|
|
121
|
+
}) : h('div', {
|
|
122
|
+
key: '0',
|
|
110
123
|
class: 'vxe-table-custom--checkbox-label',
|
|
111
124
|
attrs: {
|
|
112
125
|
title: colTitle
|
|
113
126
|
}
|
|
114
127
|
}, colTitle), !parent && allowFixed ? h('div', {
|
|
115
128
|
class: 'vxe-table-custom--fixed-option'
|
|
116
|
-
}, [h(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
'
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
}, [h(_button.default, {
|
|
130
|
+
props: {
|
|
131
|
+
mode: 'text',
|
|
132
|
+
icon: column.renderFixed === 'left' ? _conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : _conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT,
|
|
133
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
134
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
122
135
|
title: _conf.default.i18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
123
136
|
},
|
|
124
137
|
on: {
|
|
@@ -126,12 +139,12 @@ var renderSimplePanel = function renderSimplePanel(h, _vm) {
|
|
|
126
139
|
_vm.changeFixedOption(column, 'left');
|
|
127
140
|
}
|
|
128
141
|
}
|
|
129
|
-
}), h(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
'
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
}), h(_button.default, {
|
|
143
|
+
props: {
|
|
144
|
+
mode: 'text',
|
|
145
|
+
icon: column.renderFixed === 'right' ? _conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : _conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
146
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
147
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
135
148
|
title: _conf.default.i18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
136
149
|
},
|
|
137
150
|
on: {
|
|
@@ -165,7 +178,7 @@ var renderSimplePanel = function renderSimplePanel(h, _vm) {
|
|
|
165
178
|
title: _conf.default.i18n('vxe.table.allTitle')
|
|
166
179
|
},
|
|
167
180
|
on: {
|
|
168
|
-
click: _vm.
|
|
181
|
+
click: _vm.allOptionEvent
|
|
169
182
|
}
|
|
170
183
|
}, [h('span', {
|
|
171
184
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? _conf.default.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? _conf.default.icon.TABLE_CHECKBOX_CHECKED : _conf.default.icon.TABLE_CHECKBOX_UNCHECKED]
|
|
@@ -186,24 +199,42 @@ var renderSimplePanel = function renderSimplePanel(h, _vm) {
|
|
|
186
199
|
}, colVNs), h('div', {
|
|
187
200
|
ref: 'dragHintElemRef',
|
|
188
201
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
189
|
-
}, _conf.default.i18n('vxe.custom.cstmDragTarget', [
|
|
202
|
+
}, _conf.default.i18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))]), customOpts.showFooter ? h('div', {
|
|
190
203
|
class: 'vxe-table-custom--footer'
|
|
191
|
-
}, [h(
|
|
192
|
-
|
|
204
|
+
}, [h(_button.default, {
|
|
205
|
+
props: {
|
|
206
|
+
mode: 'text',
|
|
207
|
+
content: customOpts.resetButtonText || _conf.default.i18n('vxe.table.customRestore')
|
|
208
|
+
},
|
|
193
209
|
on: {
|
|
194
210
|
click: _vm.resetCustomEvent
|
|
195
211
|
}
|
|
196
|
-
}
|
|
197
|
-
|
|
212
|
+
}), customOpts.immediate ? h(_button.default, {
|
|
213
|
+
props: {
|
|
214
|
+
mode: 'text',
|
|
215
|
+
content: customOpts.closeButtonText || _conf.default.i18n('vxe.table.customClose')
|
|
216
|
+
},
|
|
217
|
+
on: {
|
|
218
|
+
click: _vm.cancelCloseEvent
|
|
219
|
+
}
|
|
220
|
+
}) : h(_button.default, {
|
|
221
|
+
props: {
|
|
222
|
+
mode: 'text',
|
|
223
|
+
content: customOpts.resetButtonText || _conf.default.i18n('vxe.table.customCancel')
|
|
224
|
+
},
|
|
198
225
|
on: {
|
|
199
226
|
click: _vm.cancelCustomEvent
|
|
200
227
|
}
|
|
201
|
-
}, customOpts.
|
|
202
|
-
|
|
228
|
+
}), customOpts.immediate ? _e() : h(_button.default, {
|
|
229
|
+
props: {
|
|
230
|
+
mode: 'text',
|
|
231
|
+
status: 'primary',
|
|
232
|
+
content: customOpts.confirmButtonText || _conf.default.i18n('vxe.table.customConfirm')
|
|
233
|
+
},
|
|
203
234
|
on: {
|
|
204
235
|
click: _vm.confirmCustomEvent
|
|
205
236
|
}
|
|
206
|
-
}
|
|
237
|
+
})]) : null] : []);
|
|
207
238
|
};
|
|
208
239
|
var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
209
240
|
var _e = _vm._e,
|
|
@@ -235,6 +266,7 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
235
266
|
var isDisabled = checkMethod ? !checkMethod({
|
|
236
267
|
column: column
|
|
237
268
|
}) : false;
|
|
269
|
+
var isHidden = !isChecked;
|
|
238
270
|
trVNs.push(h('tr', {
|
|
239
271
|
key: column.id,
|
|
240
272
|
attrs: {
|
|
@@ -271,11 +303,13 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
271
303
|
})])]) : _e(), allowSort ? h('td', {
|
|
272
304
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
273
305
|
}, [column.level === 1 ? h('span', {
|
|
274
|
-
class: 'vxe-table-custom-popup--column-sort-btn',
|
|
306
|
+
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
307
|
+
'is--disabled': isHidden
|
|
308
|
+
}],
|
|
275
309
|
attrs: {
|
|
276
310
|
title: _conf.default.i18n('vxe.custom.setting.sortHelpTip')
|
|
277
311
|
},
|
|
278
|
-
on: {
|
|
312
|
+
on: isHidden ? {} : {
|
|
279
313
|
mousedown: _vm.sortMousedownEvent,
|
|
280
314
|
mouseup: _vm.sortMouseupEvent
|
|
281
315
|
}
|
|
@@ -283,16 +317,24 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
283
317
|
class: _conf.default.icon.TABLE_CUSTOM_SORT
|
|
284
318
|
})]) : h('span', '-')]) : _e(), h('td', {
|
|
285
319
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
286
|
-
}, [h('div', {
|
|
320
|
+
}, [column.type === 'html' ? h('div', {
|
|
321
|
+
key: '1',
|
|
322
|
+
class: 'vxe-table-custom-popup--name',
|
|
323
|
+
domProps: {
|
|
324
|
+
innerHTML: colTitle
|
|
325
|
+
}
|
|
326
|
+
}) : h('div', {
|
|
327
|
+
key: '0',
|
|
287
328
|
class: 'vxe-table-custom-popup--name',
|
|
288
329
|
attrs: {
|
|
289
330
|
title: colTitle
|
|
290
331
|
}
|
|
291
332
|
}, colTitle)]), allowResizable ? h('td', {
|
|
292
333
|
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
293
|
-
}, [
|
|
334
|
+
}, [column.children && column.children.length ? h('span', '-') : h('vxe-input', {
|
|
294
335
|
props: {
|
|
295
336
|
type: 'integer',
|
|
337
|
+
disabled: isHidden,
|
|
296
338
|
value: column.renderResizeWidth
|
|
297
339
|
},
|
|
298
340
|
on: {
|
|
@@ -307,25 +349,25 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
307
349
|
value: column.renderFixed || '',
|
|
308
350
|
type: 'button',
|
|
309
351
|
size: 'mini',
|
|
352
|
+
disabled: isHidden,
|
|
310
353
|
options: [{
|
|
311
354
|
label: _conf.default.i18n('vxe.custom.setting.fixedLeft'),
|
|
312
355
|
value: 'left',
|
|
313
|
-
disabled: isMaxFixedColumn
|
|
356
|
+
disabled: isHidden || isMaxFixedColumn
|
|
314
357
|
}, {
|
|
315
358
|
label: _conf.default.i18n('vxe.custom.setting.fixedUnset'),
|
|
316
|
-
value: ''
|
|
359
|
+
value: '',
|
|
360
|
+
disabled: isHidden
|
|
317
361
|
}, {
|
|
318
362
|
label: _conf.default.i18n('vxe.custom.setting.fixedRight'),
|
|
319
363
|
value: 'right',
|
|
320
|
-
disabled: isMaxFixedColumn
|
|
364
|
+
disabled: isHidden || isMaxFixedColumn
|
|
321
365
|
}]
|
|
322
366
|
},
|
|
323
367
|
on: {
|
|
324
368
|
input: function input(value) {
|
|
325
369
|
column.renderFixed = value;
|
|
326
|
-
}
|
|
327
|
-
// changePopupFixedOption(column)
|
|
328
|
-
// }
|
|
370
|
+
}
|
|
329
371
|
}
|
|
330
372
|
})]) : _e()]));
|
|
331
373
|
}
|
|
@@ -391,7 +433,7 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
391
433
|
title: _conf.default.i18n('vxe.table.allTitle')
|
|
392
434
|
},
|
|
393
435
|
on: {
|
|
394
|
-
click: _vm.
|
|
436
|
+
click: _vm.allOptionEvent
|
|
395
437
|
}
|
|
396
438
|
}, [h('span', {
|
|
397
439
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? _conf.default.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? _conf.default.icon.TABLE_CHECKBOX_CHECKED : _conf.default.icon.TABLE_CHECKBOX_UNCHECKED]
|
|
@@ -426,21 +468,21 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
426
468
|
footer: function footer() {
|
|
427
469
|
return h('div', {
|
|
428
470
|
class: 'vxe-table-custom-popup--footer'
|
|
429
|
-
}, [h(
|
|
471
|
+
}, [h(_button.default, {
|
|
430
472
|
props: {
|
|
431
473
|
content: customOpts.resetButtonText || _conf.default.i18n('vxe.custom.cstmRestore')
|
|
432
474
|
},
|
|
433
475
|
on: {
|
|
434
476
|
click: _vm.resetCustomEvent
|
|
435
477
|
}
|
|
436
|
-
}), h(
|
|
478
|
+
}), h(_button.default, {
|
|
437
479
|
props: {
|
|
438
480
|
content: customOpts.resetButtonText || _conf.default.i18n('vxe.custom.cstmCancel')
|
|
439
481
|
},
|
|
440
482
|
on: {
|
|
441
483
|
click: _vm.cancelCustomEvent
|
|
442
484
|
}
|
|
443
|
-
}), h(
|
|
485
|
+
}), h(_button.default, {
|
|
444
486
|
props: {
|
|
445
487
|
status: 'primary',
|
|
446
488
|
content: customOpts.confirmButtonText || _conf.default.i18n('vxe.custom.cstmConfirm')
|
|
@@ -536,6 +578,12 @@ var _default2 = exports.default = {
|
|
|
536
578
|
$xetable.emitCustomEvent('confirm', evnt);
|
|
537
579
|
$xetable.saveCustomStore('confirm');
|
|
538
580
|
},
|
|
581
|
+
cancelCloseEvent: function cancelCloseEvent(_ref) {
|
|
582
|
+
var $event = _ref.$event;
|
|
583
|
+
var $xetable = this.$xetable;
|
|
584
|
+
$xetable.closeCustom();
|
|
585
|
+
$xetable.emitCustomEvent('cancel', $event);
|
|
586
|
+
},
|
|
539
587
|
cancelCustomEvent: function cancelCustomEvent(evnt) {
|
|
540
588
|
var $xetable = this.$xetable;
|
|
541
589
|
var customStore = $xetable.customStore,
|
|
@@ -633,53 +681,80 @@ var _default2 = exports.default = {
|
|
|
633
681
|
var $xetable = this.$xetable;
|
|
634
682
|
var customOpts = $xetable.customOpts;
|
|
635
683
|
var isChecked = !column.renderVisible;
|
|
636
|
-
_xeUtils.default.eachTree([column], function (item) {
|
|
637
|
-
item.renderVisible = isChecked;
|
|
638
|
-
item.halfVisible = false;
|
|
639
|
-
});
|
|
640
|
-
this.handleOptionCheck(column);
|
|
641
684
|
if (customOpts.immediate) {
|
|
685
|
+
_xeUtils.default.eachTree([column], function (item) {
|
|
686
|
+
item.visible = isChecked;
|
|
687
|
+
item.renderVisible = isChecked;
|
|
688
|
+
item.halfVisible = false;
|
|
689
|
+
});
|
|
642
690
|
$xetable.handleCustom();
|
|
643
691
|
$xetable.saveCustomStore('update:visible');
|
|
692
|
+
} else {
|
|
693
|
+
_xeUtils.default.eachTree([column], function (item) {
|
|
694
|
+
item.renderVisible = isChecked;
|
|
695
|
+
item.halfVisible = false;
|
|
696
|
+
});
|
|
644
697
|
}
|
|
698
|
+
this.handleOptionCheck(column);
|
|
645
699
|
$xetable.checkCustomStatus();
|
|
646
700
|
},
|
|
647
701
|
changeFixedOption: function changeFixedOption(column, colFixed) {
|
|
648
702
|
var $xetable = this.$xetable;
|
|
649
|
-
var isMaxFixedColumn = $xetable.isMaxFixedColumn
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
703
|
+
var isMaxFixedColumn = $xetable.isMaxFixedColumn,
|
|
704
|
+
customOpts = $xetable.customOpts;
|
|
705
|
+
if (customOpts.immediate) {
|
|
706
|
+
if (column.renderFixed === colFixed) {
|
|
707
|
+
column.fixed = '';
|
|
708
|
+
column.renderFixed = '';
|
|
709
|
+
} else {
|
|
710
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
711
|
+
column.fixed = colFixed;
|
|
712
|
+
column.renderFixed = colFixed;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
$xetable.handleCustom();
|
|
716
|
+
$xetable.saveCustomStore('update:fixed');
|
|
653
717
|
} else {
|
|
654
|
-
if (
|
|
655
|
-
column.renderFixed =
|
|
656
|
-
|
|
718
|
+
if (column.renderFixed === colFixed) {
|
|
719
|
+
column.renderFixed = '';
|
|
720
|
+
} else {
|
|
721
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
722
|
+
column.renderFixed = colFixed;
|
|
723
|
+
}
|
|
657
724
|
}
|
|
658
725
|
}
|
|
659
726
|
},
|
|
660
|
-
|
|
661
|
-
// const { $xetable } = this
|
|
662
|
-
// const { isMaxFixedColumn } = $xetable
|
|
663
|
-
// if (!isMaxFixedColumn) {
|
|
664
|
-
// $xetable.setColumnFixed(column, column.fixed)
|
|
665
|
-
// }
|
|
666
|
-
// },
|
|
667
|
-
allCustomEvent: function allCustomEvent() {
|
|
727
|
+
allOptionEvent: function allOptionEvent() {
|
|
668
728
|
var $xetable = this.$xetable,
|
|
669
729
|
customStore = this.customStore;
|
|
670
|
-
var
|
|
671
|
-
|
|
730
|
+
var customColumnList = $xetable.customColumnList,
|
|
731
|
+
customOpts = $xetable.customOpts;
|
|
672
732
|
var checkMethod = customOpts.checkMethod;
|
|
673
733
|
var isAll = !customStore.isAll;
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
734
|
+
if (customOpts.immediate) {
|
|
735
|
+
_xeUtils.default.eachTree(customColumnList, function (column) {
|
|
736
|
+
if (!checkMethod || checkMethod({
|
|
737
|
+
column: column
|
|
738
|
+
})) {
|
|
739
|
+
column.visible = isAll;
|
|
740
|
+
column.renderVisible = isAll;
|
|
741
|
+
column.halfVisible = false;
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
customStore.isAll = isAll;
|
|
745
|
+
$xetable.handleCustom();
|
|
746
|
+
$xetable.saveCustomStore('update:visible');
|
|
747
|
+
} else {
|
|
748
|
+
_xeUtils.default.eachTree(customColumnList, function (column) {
|
|
749
|
+
if (!checkMethod || checkMethod({
|
|
750
|
+
column: column
|
|
751
|
+
})) {
|
|
752
|
+
column.renderVisible = isAll;
|
|
753
|
+
column.halfVisible = false;
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
customStore.isAll = isAll;
|
|
757
|
+
}
|
|
683
758
|
$xetable.checkCustomStatus();
|
|
684
759
|
},
|
|
685
760
|
sortMousedownEvent: function sortMousedownEvent(evnt) {
|
|
@@ -714,7 +789,8 @@ var _default2 = exports.default = {
|
|
|
714
789
|
sortDragendEvent: function sortDragendEvent(evnt) {
|
|
715
790
|
var $xetable = this.$xetable,
|
|
716
791
|
prevDropTrEl = this.prevDropTrEl;
|
|
717
|
-
var customColumnList = $xetable.customColumnList
|
|
792
|
+
var customColumnList = $xetable.customColumnList,
|
|
793
|
+
customOpts = $xetable.customOpts;
|
|
718
794
|
var trEl = evnt.currentTarget;
|
|
719
795
|
var dragHintEl = this.$refs.dragHintElemRef;
|
|
720
796
|
if (prevDropTrEl) {
|
|
@@ -754,6 +830,16 @@ var _default2 = exports.default = {
|
|
|
754
830
|
}
|
|
755
831
|
removeClass(trEl, 'active--drag-target');
|
|
756
832
|
removeClass(trEl, 'active--drag-origin');
|
|
833
|
+
if (customOpts.immediate) {
|
|
834
|
+
_xeUtils.default.eachTree(customColumnList, function (column, index, items, path, parent) {
|
|
835
|
+
if (!parent) {
|
|
836
|
+
var sortIndex = index + 1;
|
|
837
|
+
column.renderSortNumber = sortIndex;
|
|
838
|
+
}
|
|
839
|
+
});
|
|
840
|
+
$xetable.handleCustom();
|
|
841
|
+
$xetable.saveCustomStore('update:sort');
|
|
842
|
+
}
|
|
757
843
|
},
|
|
758
844
|
sortDragoverEvent: function sortDragoverEvent(evnt) {
|
|
759
845
|
var $xetable = this.$xetable,
|