vxe-table 3.8.8-beta.4 → 3.8.8-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/custom/src/mixin.js +7 -12
- package/lib/custom/src/mixin.min.js +1 -1
- package/lib/custom/src/panel.js +97 -40
- package/lib/custom/src/panel.min.js +1 -1
- package/lib/custom/style/style.css +38 -6
- package/lib/custom/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +184 -61
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +1 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +1 -0
- package/lib/locale/lang/zh-TC.js +1 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +1 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +1 -0
- package/lib/pager/src/pager.js +7 -1
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +63 -5
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +1 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- 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 +5 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/vxe-table/style/style.css +1 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-table-custom-module/style/style.css +38 -6
- package/lib/vxe-table-custom-module/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/custom/src/mixin.js +7 -12
- package/packages/custom/src/panel.js +116 -57
- package/packages/locale/lang/en-US.js +1 -0
- package/packages/locale/lang/es-ES.js +1 -0
- package/packages/locale/lang/ja-JP.js +1 -0
- package/packages/locale/lang/pt-BR.js +1 -0
- package/packages/locale/lang/zh-CN.js +1 -0
- package/packages/locale/lang/zh-TC.js +1 -0
- package/packages/pager/src/pager.js +5 -1
- package/packages/table/src/columnInfo.js +2 -0
- package/packages/table/src/methods.js +59 -5
- package/packages/v-x-e-table/src/conf.js +5 -1
- package/styles/custom.scss +41 -5
- package/styles/modules.scss +1 -0
- package/styles/table.scss +1 -0
- /package/lib/icon/style/{iconfont.1717666909963.ttf → iconfont.1717772226455.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1717666909963.woff → iconfont.1717772226455.woff} +0 -0
- /package/lib/icon/style/{iconfont.1717666909963.woff2 → iconfont.1717772226455.woff2} +0 -0
- /package/lib/{iconfont.1717666909963.ttf → iconfont.1717772226455.ttf} +0 -0
- /package/lib/{iconfont.1717666909963.woff → iconfont.1717772226455.woff} +0 -0
- /package/lib/{iconfont.1717666909963.woff2 → iconfont.1717772226455.woff2} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
[class*=vxe-],[class*=vxe-] :after,[class*=vxe-] :before,[class*=vxe-]:after,[class*=vxe-]:before{box-sizing:border-box}[class*=vxe-]{font-variant:tabular-nums;font-feature-settings:"tnum"}.vxe-primary-color{color:#409eff}.vxe-success-color{color:#67c23a}.vxe-info-color{color:#909399}.vxe-warning-color{color:#e6a23c}.vxe-danger-color{color:#f56c6c}.vxe-perfect-color{color:#f8f8f9}.vxe-row:after{content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden}.vxe-row>.vxe-col--1{float:left;width:4.16667%}.vxe-row>.vxe-col--2{float:left;width:8.33333%}.vxe-row>.vxe-col--3{float:left;width:12.5%}.vxe-row>.vxe-col--4{float:left;width:16.66667%}.vxe-row>.vxe-col--5{float:left;width:20.83333%}.vxe-row>.vxe-col--6{float:left;width:25%}.vxe-row>.vxe-col--7{float:left;width:29.16667%}.vxe-row>.vxe-col--8{float:left;width:33.33333%}.vxe-row>.vxe-col--9{float:left;width:37.5%}.vxe-row>.vxe-col--10{float:left;width:41.66667%}.vxe-row>.vxe-col--11{float:left;width:45.83333%}.vxe-row>.vxe-col--12{float:left;width:50%}.vxe-row>.vxe-col--13{float:left;width:54.16667%}.vxe-row>.vxe-col--14{float:left;width:58.33333%}.vxe-row>.vxe-col--15{float:left;width:62.5%}.vxe-row>.vxe-col--16{float:left;width:66.66667%}.vxe-row>.vxe-col--17{float:left;width:70.83333%}.vxe-row>.vxe-col--18{float:left;width:75%}.vxe-row>.vxe-col--19{float:left;width:79.16667%}.vxe-row>.vxe-col--20{float:left;width:83.33333%}.vxe-row>.vxe-col--21{float:left;width:87.5%}.vxe-row>.vxe-col--22{float:left;width:91.66667%}.vxe-row>.vxe-col--23{float:left;width:95.83333%}.vxe-row>.vxe-col--24{float:left;width:100%}.is--animat .vxe-filter--btn:after,.is--animat .vxe-filter--btn:before,.is--animat .vxe-sort--asc-btn:after,.is--animat .vxe-sort--asc-btn:before,.is--animat .vxe-sort--desc-btn:after,.is--animat .vxe-sort--desc-btn:before{transition:border .1s ease-in-out}.is--animat .vxe-input--wrapper .vxe-input{transition:border .1s ease-in-out}.is--animat .vxe-table--expand-btn,.is--animat .vxe-tree--node-btn{transition:transform .1s ease-in-out}.is--animat .vxe-checkbox>input:checked+span,.is--animat .vxe-radio>input:checked+span{transition:background-color .1s ease-in-out}.vxe-table-custom--option{position:relative;display:flex;flex-direction:row}.vxe-table-custom--option.active--drag-target[drag-pos=top]::after{display:block;top:-2px}.vxe-table-custom--option.active--drag-target[drag-pos=bottom]::after{display:block;bottom:-2px}.vxe-table-custom--option:first-child[drag-pos=top]::after{top:0}.vxe-table-custom--option:last-child[drag-pos=bottom]::after{bottom:0}.vxe-table-custom--option::after{display:none;content:"";position:absolute;left:-1px;width:calc(100% + 1px);height:3px;background-color:#409eff;z-index:12}.vxe-table-custom--option:last-child::after{width:100%}.vxe-table-custom-wrapper{display:none;position:absolute;top:1px;right:2px;text-align:left;background-color:#fff;z-index:19;border:1px solid #e8eaec;border-radius:4px;box-shadow:0 0 10px 0 rgba(0,0,0,.16)}.vxe-table-custom-wrapper.is--active{display:block}.vxe-table-custom--list-wrapper{display:block}.vxe-table-custom--body,.vxe-table-custom--header{list-style-type:none;overflow-x:hidden;overflow-y:auto;margin:0;padding:0}.vxe-table-custom--body>li,.vxe-table-custom--header>li{max-width:26em;min-width:18em;padding:.2em 1em .2em 1em}.vxe-table-custom--body>li.level--2,.vxe-table-custom--header>li.level--2{padding-left:3.5em}.vxe-table-custom--body>li.level--2 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--2 .vxe-checkbox--icon{left:1.8em}.vxe-table-custom--body>li.level--3,.vxe-table-custom--header>li.level--3{padding-left:4.5em}.vxe-table-custom--body>li.level--3 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--3 .vxe-checkbox--icon{left:2.8em}.vxe-table-custom--body>li.level--4,.vxe-table-custom--header>li.level--4{padding-left:5.5em}.vxe-table-custom--body>li.level--4 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--4 .vxe-checkbox--icon{left:3.8em}.vxe-table-custom--body>li.level--5,.vxe-table-custom--header>li.level--5{padding-left:6.5em}.vxe-table-custom--body>li.level--5 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--5 .vxe-checkbox--icon{left:4.8em}.vxe-table-custom--body>li.level--6,.vxe-table-custom--header>li.level--6{padding-left:7.5em}.vxe-table-custom--body>li.level--6 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--6 .vxe-checkbox--icon{left:5.8em}.vxe-table-custom--body>li.level--7,.vxe-table-custom--header>li.level--7{padding-left:8.5em}.vxe-table-custom--body>li.level--7 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--7 .vxe-checkbox--icon{left:6.8em}.vxe-table-custom--body>li.level--8,.vxe-table-custom--header>li.level--8{padding-left:9.5em}.vxe-table-custom--body>li.level--8 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--8 .vxe-checkbox--icon{left:7.8em}.vxe-table-custom--header{padding:.28em 0;font-weight:700;border-bottom:1px solid #dadce0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--body{padding:.2em 0;max-height:20em}.vxe-table-custom--body .vxe-table-custom--checkbox-option:hover{background-color:#f5f7fa}.vxe-table-custom--footer{display:flex;flex-direction:row;border-top:1px solid #dadce0;text-align:right}.vxe-table-custom--footer button{background-color:transparent;width:50%;height:2.8em;border:0;color:#606266;text-align:center;cursor:pointer}.vxe-table-custom--footer button:focus{outline:0}.vxe-table-custom--footer button:hover{color:#409eff}.vxe-table-custom--checkbox-option .vxe-checkbox--icon{font-size:1.34em}.vxe-table-custom--checkbox-option .vxe-checkbox--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--checkbox-option.is--checked,.vxe-table-custom--checkbox-option.is--indeterminate{color:#409eff}.vxe-table-custom--checkbox-option.is--checked .vxe-checkbox--icon,.vxe-table-custom--checkbox-option.is--indeterminate .vxe-checkbox--icon{color:#409eff}.vxe-table-custom--checkbox-option:not(.is--disabled){cursor:pointer}.vxe-table-custom--checkbox-option:not(.is--disabled):hover .vxe-checkbox--icon{color:#409eff}.vxe-table-custom--checkbox-option.is--disabled{color:#bfbfbf;cursor:not-allowed}.vxe-table-custom--checkbox-option.is--disabled .vxe-checkbox--icon{color:#dcdfe6}.vxe-table-custom--checkbox-option .vxe-checkbox--label{padding-left:.5em;vertical-align:middle}.vxe-table-custom--checkbox-option,.vxe-table-custom--sort-option{padding-right:.4em;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--sort-option{display:flex;flex-direction:row;align-items:center;justify-content:center}.vxe-table-custom--sort-btn{padding-left:.2em;padding-right:.4em;cursor:grabbing}.vxe-table-custom--sort-btn:hover{color:#409eff}.vxe-table-custom--checkbox-label{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-table-custom--fixed-option{flex-shrink:0;padding-left:.5em;display:flex;flex-direction:row;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--fixed-left-option,.vxe-table-custom--fixed-right-option{line-height:1.34em;font-size:1.1em;padding:0 .2em;cursor:pointer}.vxe-table-custom--fixed-left-option.is--checked,.vxe-table-custom--fixed-left-option:hover,.vxe-table-custom--fixed-right-option.is--checked,.vxe-table-custom--fixed-right-option:hover{color:#409eff}.vxe-table-custom--fixed-left-option.is--disabled,.vxe-table-custom--fixed-right-option.is--disabled{cursor:no-drop;color:#dcdfe6}.vxe-table-custom-popup--body{overflow:auto;height:100%}.vxe-table-custom-popup--table-wrapper{border-bottom:1px solid #e8eaec}.vxe-table-custom-popup--table-wrapper table{width:100%;border:0;table-layout:fixed;word-break:break-all;border-spacing:0;border-collapse:separate}.vxe-table-custom-popup--table-wrapper table th{position:sticky;top:0;text-align:left;border-top:1px solid #e8eaec;border-bottom:1px solid #e8eaec;border-left:1px solid #e8eaec;background-color:#f8f8f9;z-index:7}.vxe-table-custom-popup--table-wrapper table td{border-top:1px solid #e8eaec;border-left:1px solid #e8eaec}.vxe-table-custom-popup--table-wrapper table tr:first-child td{border-top:0}.vxe-table-custom-popup--table-wrapper table tr:hover{background-color:#f5f7fa}.vxe-table-custom-popup--table-wrapper table td,.vxe-table-custom-popup--table-wrapper table th{height:44px;padding:0 .6em}.vxe-table-custom-popup--table-wrapper table td:last-child,.vxe-table-custom-popup--table-wrapper table th:last-child{border-right:1px solid #e8eaec}.vxe-table-custom-popup--drag-hint{display:none;position:absolute;top:0;left:0;padding:.6em 1em .6em 1.8em;max-width:300px;border-radius:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;background-color:#fff;box-shadow:0 0 10px 0 rgba(0,0,0,.2);z-index:33}.vxe-table-custom-popup--name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-table-custom-popup--row.level--2 .vxe-table-custom-popup--name{padding-left:24px}.vxe-table-custom-popup--row.level--3 .vxe-table-custom-popup--name{padding-left:48px}.vxe-table-custom-popup--row.level--4 .vxe-table-custom-popup--name{padding-left:72px}.vxe-table-custom-popup--row.level--5 .vxe-table-custom-popup--name{padding-left:96px}.vxe-table-custom-popup--row.level--6 .vxe-table-custom-popup--name{padding-left:120px}.vxe-table-custom-popup--row.level--7 .vxe-table-custom-popup--name{padding-left:144px}.vxe-table-custom-popup--row.level--8 .vxe-table-custom-popup--name{padding-left:168px}.vxe-table-custom-popup--row.level--9 .vxe-table-custom-popup--name{padding-left:192px}.vxe-table-custom-popup--column-item{position:relative}.vxe-table-custom-popup--column-item.col--fixed,.vxe-table-custom-popup--column-item.col--sort,.vxe-table-custom-popup--column-item.col--visible{text-align:center}.vxe-table-custom-popup--row.active--drag-target[drag-pos=top] .vxe-table-custom-popup--column-item::after{display:block;top:-2px}.vxe-table-custom-popup--row.active--drag-target[drag-pos=bottom] .vxe-table-custom-popup--column-item::after{display:block;bottom:-2px}.vxe-table-custom-popup--row:first-child[drag-pos=top] .vxe-table-custom-popup--column-item::after{top:0}.vxe-table-custom-popup--row:last-child[drag-pos=bottom] .vxe-table-custom-popup--column-item::after{bottom:0}.vxe-table-custom-popup--column-item::after{display:none;content:"";position:absolute;left:-1px;width:calc(100% + 1px);height:3px;background-color:#409eff;z-index:12}.vxe-table-custom-popup--column-item:last-child::after{width:100%}.vxe-table-custom--list-move{transition:transform .35s}.vxe-table-custom-popup--column-sort-btn{font-size:1.2em;padding:.2em .5em;cursor:grab}.vxe-table-custom-popup--column-sort-btn:hover{color:#409eff}.vxe-table-custom-popup--column-sort-btn:active{cursor:grabbing}.vxe-table-custom-popup--table-sort-help-icon,.vxe-table-custom-popup--table-sort-help-title{vertical-align:middle}.vxe-table-custom-popup--table-sort-help-icon{margin-left:5px;cursor:help}
|
|
1
|
+
[class*=vxe-],[class*=vxe-] :after,[class*=vxe-] :before,[class*=vxe-]:after,[class*=vxe-]:before{box-sizing:border-box}[class*=vxe-]{font-variant:tabular-nums;font-feature-settings:"tnum"}.vxe-primary-color{color:#409eff}.vxe-success-color{color:#67c23a}.vxe-info-color{color:#909399}.vxe-warning-color{color:#e6a23c}.vxe-danger-color{color:#f56c6c}.vxe-perfect-color{color:#f8f8f9}.vxe-row:after{content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden}.vxe-row>.vxe-col--1{float:left;width:4.16667%}.vxe-row>.vxe-col--2{float:left;width:8.33333%}.vxe-row>.vxe-col--3{float:left;width:12.5%}.vxe-row>.vxe-col--4{float:left;width:16.66667%}.vxe-row>.vxe-col--5{float:left;width:20.83333%}.vxe-row>.vxe-col--6{float:left;width:25%}.vxe-row>.vxe-col--7{float:left;width:29.16667%}.vxe-row>.vxe-col--8{float:left;width:33.33333%}.vxe-row>.vxe-col--9{float:left;width:37.5%}.vxe-row>.vxe-col--10{float:left;width:41.66667%}.vxe-row>.vxe-col--11{float:left;width:45.83333%}.vxe-row>.vxe-col--12{float:left;width:50%}.vxe-row>.vxe-col--13{float:left;width:54.16667%}.vxe-row>.vxe-col--14{float:left;width:58.33333%}.vxe-row>.vxe-col--15{float:left;width:62.5%}.vxe-row>.vxe-col--16{float:left;width:66.66667%}.vxe-row>.vxe-col--17{float:left;width:70.83333%}.vxe-row>.vxe-col--18{float:left;width:75%}.vxe-row>.vxe-col--19{float:left;width:79.16667%}.vxe-row>.vxe-col--20{float:left;width:83.33333%}.vxe-row>.vxe-col--21{float:left;width:87.5%}.vxe-row>.vxe-col--22{float:left;width:91.66667%}.vxe-row>.vxe-col--23{float:left;width:95.83333%}.vxe-row>.vxe-col--24{float:left;width:100%}.is--animat .vxe-filter--btn:after,.is--animat .vxe-filter--btn:before,.is--animat .vxe-sort--asc-btn:after,.is--animat .vxe-sort--asc-btn:before,.is--animat .vxe-sort--desc-btn:after,.is--animat .vxe-sort--desc-btn:before{transition:border .1s ease-in-out}.is--animat .vxe-input--wrapper .vxe-input{transition:border .1s ease-in-out}.is--animat .vxe-table--expand-btn,.is--animat .vxe-tree--node-btn{transition:transform .1s ease-in-out}.is--animat .vxe-checkbox>input:checked+span,.is--animat .vxe-radio>input:checked+span{transition:background-color .1s ease-in-out}.vxe-table-custom--option{position:relative;display:flex;flex-direction:row}.vxe-table-custom--option.active--drag-target[drag-pos=top]::after{display:block;top:-2px}.vxe-table-custom--option.active--drag-target[drag-pos=bottom]::after{display:block;bottom:-2px}.vxe-table-custom--option:first-child[drag-pos=top]::after{top:0}.vxe-table-custom--option:last-child[drag-pos=bottom]::after{bottom:0}.vxe-table-custom--option::after{display:none;content:"";position:absolute;left:-1px;width:calc(100% + 1px);height:3px;background-color:#409eff;z-index:12}.vxe-table-custom--option:last-child::after{width:100%}.vxe-table-custom-wrapper{display:none;flex-direction:column;position:absolute;top:1px;right:2px;text-align:left;background-color:#fff;z-index:19;border:1px solid #e8eaec;border-radius:4px;box-shadow:0 0 10px 0 rgba(0,0,0,.16)}.vxe-table-custom-wrapper.placement--topLeft{top:2px;left:2px}.vxe-table-custom-wrapper.placement--topRight{top:2px;right:2px}.vxe-table-custom-wrapper.placement--bottomLeft{bottom:2px;left:2px}.vxe-table-custom-wrapper.placement--bottomRight{bottom:2px;right:2px}.vxe-table-custom-wrapper.placement--left{left:2px}.vxe-table-custom-wrapper.placement--right{right:2px}.vxe-table-custom-wrapper.placement--left,.vxe-table-custom-wrapper.placement--right{top:2px;height:calc(100% - 4px)}.vxe-table-custom-wrapper.is--active{display:flex}.vxe-table-custom--list-wrapper{display:block;flex-grow:1;overflow-x:hidden;overflow-y:auto}.vxe-table-custom--body,.vxe-table-custom--header{list-style-type:none;margin:0;padding:0}.vxe-table-custom--body>li,.vxe-table-custom--header>li{max-width:26em;min-width:17em;padding:.2em 1em .2em 1em}.vxe-table-custom--body>li.level--2,.vxe-table-custom--header>li.level--2{padding-left:3.5em}.vxe-table-custom--body>li.level--2 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--2 .vxe-checkbox--icon{left:1.8em}.vxe-table-custom--body>li.level--3,.vxe-table-custom--header>li.level--3{padding-left:4.5em}.vxe-table-custom--body>li.level--3 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--3 .vxe-checkbox--icon{left:2.8em}.vxe-table-custom--body>li.level--4,.vxe-table-custom--header>li.level--4{padding-left:5.5em}.vxe-table-custom--body>li.level--4 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--4 .vxe-checkbox--icon{left:3.8em}.vxe-table-custom--body>li.level--5,.vxe-table-custom--header>li.level--5{padding-left:6.5em}.vxe-table-custom--body>li.level--5 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--5 .vxe-checkbox--icon{left:4.8em}.vxe-table-custom--body>li.level--6,.vxe-table-custom--header>li.level--6{padding-left:7.5em}.vxe-table-custom--body>li.level--6 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--6 .vxe-checkbox--icon{left:5.8em}.vxe-table-custom--body>li.level--7,.vxe-table-custom--header>li.level--7{padding-left:8.5em}.vxe-table-custom--body>li.level--7 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--7 .vxe-checkbox--icon{left:6.8em}.vxe-table-custom--body>li.level--8,.vxe-table-custom--header>li.level--8{padding-left:9.5em}.vxe-table-custom--body>li.level--8 .vxe-checkbox--icon,.vxe-table-custom--header>li.level--8 .vxe-checkbox--icon{left:7.8em}.vxe-table-custom--header{flex-shrink:0;padding:.28em 0;font-weight:700;border-bottom:1px solid #dadce0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--body{padding:.2em 0}.vxe-table-custom--body .vxe-table-custom--checkbox-option:hover{background-color:#f5f7fa}.vxe-table-custom--footer{display:flex;flex-direction:row;flex-shrink:0;border-top:1px solid #dadce0;text-align:right}.vxe-table-custom--footer button{background-color:transparent;width:50%;height:2.8em;border:0;color:#606266;text-align:center;cursor:pointer}.vxe-table-custom--footer button:focus{outline:0}.vxe-table-custom--footer button:hover{color:#409eff}.vxe-table-custom--checkbox-option .vxe-checkbox--icon{font-size:1.34em}.vxe-table-custom--checkbox-option .vxe-checkbox--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--checkbox-option.is--checked,.vxe-table-custom--checkbox-option.is--indeterminate{color:#409eff}.vxe-table-custom--checkbox-option.is--checked .vxe-checkbox--icon,.vxe-table-custom--checkbox-option.is--indeterminate .vxe-checkbox--icon{color:#409eff}.vxe-table-custom--checkbox-option:not(.is--disabled){cursor:pointer}.vxe-table-custom--checkbox-option:not(.is--disabled):hover .vxe-checkbox--icon{color:#409eff}.vxe-table-custom--checkbox-option.is--disabled{color:#bfbfbf;cursor:not-allowed}.vxe-table-custom--checkbox-option.is--disabled .vxe-checkbox--icon{color:#dcdfe6}.vxe-table-custom--checkbox-option .vxe-checkbox--label{padding-left:.5em;vertical-align:middle}.vxe-table-custom--checkbox-option,.vxe-table-custom--sort-option{padding-right:.4em;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--sort-option{display:flex;flex-direction:row;align-items:center;justify-content:center}.vxe-table-custom--sort-btn{padding-left:.2em;padding-right:.4em;cursor:grabbing}.vxe-table-custom--sort-btn:hover{color:#409eff}.vxe-table-custom--checkbox-label{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-table-custom--fixed-option{flex-shrink:0;padding-left:.5em;display:flex;flex-direction:row;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-table-custom--fixed-left-option,.vxe-table-custom--fixed-right-option{line-height:1.34em;font-size:1.1em;padding:0 .2em;cursor:pointer}.vxe-table-custom--fixed-left-option.is--checked,.vxe-table-custom--fixed-left-option:hover,.vxe-table-custom--fixed-right-option.is--checked,.vxe-table-custom--fixed-right-option:hover{color:#409eff}.vxe-table-custom--fixed-left-option.is--disabled,.vxe-table-custom--fixed-right-option.is--disabled{cursor:no-drop;color:#dcdfe6}.vxe-table-custom-popup--body{overflow:auto;height:100%}.vxe-table-custom-popup--table-wrapper{border-bottom:1px solid #e8eaec}.vxe-table-custom-popup--table-wrapper table{width:100%;border:0;table-layout:fixed;word-break:break-all;border-spacing:0;border-collapse:separate}.vxe-table-custom-popup--table-wrapper table th{position:sticky;top:0;text-align:left;border-top:1px solid #e8eaec;border-bottom:1px solid #e8eaec;border-left:1px solid #e8eaec;background-color:#f8f8f9;z-index:7}.vxe-table-custom-popup--table-wrapper table td{border-top:1px solid #e8eaec;border-left:1px solid #e8eaec}.vxe-table-custom-popup--table-wrapper table tr:first-child td{border-top:0}.vxe-table-custom-popup--table-wrapper table tr:hover{background-color:#f5f7fa}.vxe-table-custom-popup--table-wrapper table td,.vxe-table-custom-popup--table-wrapper table th{height:44px;padding:0 .6em}.vxe-table-custom-popup--table-wrapper table td:last-child,.vxe-table-custom-popup--table-wrapper table th:last-child{border-right:1px solid #e8eaec}.vxe-table-custom-popup--drag-hint{display:none;position:absolute;top:0;left:0;padding:.6em 1em .6em 1.8em;max-width:300px;border-radius:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;background-color:#fff;box-shadow:0 0 10px 0 rgba(0,0,0,.2);z-index:33}.vxe-table-custom-popup--name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-table-custom-popup--row.level--2 .vxe-table-custom-popup--name{padding-left:24px}.vxe-table-custom-popup--row.level--3 .vxe-table-custom-popup--name{padding-left:48px}.vxe-table-custom-popup--row.level--4 .vxe-table-custom-popup--name{padding-left:72px}.vxe-table-custom-popup--row.level--5 .vxe-table-custom-popup--name{padding-left:96px}.vxe-table-custom-popup--row.level--6 .vxe-table-custom-popup--name{padding-left:120px}.vxe-table-custom-popup--row.level--7 .vxe-table-custom-popup--name{padding-left:144px}.vxe-table-custom-popup--row.level--8 .vxe-table-custom-popup--name{padding-left:168px}.vxe-table-custom-popup--row.level--9 .vxe-table-custom-popup--name{padding-left:192px}.vxe-table-custom-popup--column-item{position:relative}.vxe-table-custom-popup--column-item.col--fixed,.vxe-table-custom-popup--column-item.col--resizable,.vxe-table-custom-popup--column-item.col--sort,.vxe-table-custom-popup--column-item.col--visible{text-align:center}.vxe-table-custom-popup--column-item.col--resizable>.vxe-input{width:100%}.vxe-table-custom-popup--row.active--drag-target[drag-pos=top] .vxe-table-custom-popup--column-item::after{display:block;top:-2px}.vxe-table-custom-popup--row.active--drag-target[drag-pos=bottom] .vxe-table-custom-popup--column-item::after{display:block;bottom:-2px}.vxe-table-custom-popup--row:first-child[drag-pos=top] .vxe-table-custom-popup--column-item::after{top:0}.vxe-table-custom-popup--row:last-child[drag-pos=bottom] .vxe-table-custom-popup--column-item::after{bottom:0}.vxe-table-custom-popup--column-item::after{display:none;content:"";position:absolute;left:-1px;width:calc(100% + 1px);height:3px;background-color:#409eff;z-index:12}.vxe-table-custom-popup--column-item:last-child::after{width:100%}.vxe-table-custom--list-move{transition:transform .35s}.vxe-table-custom-popup--column-sort-btn{font-size:1.2em;padding:.2em .5em;cursor:grab}.vxe-table-custom-popup--column-sort-btn:hover{color:#409eff}.vxe-table-custom-popup--column-sort-btn:active{cursor:grabbing}.vxe-table-custom-popup--table-sort-help-icon,.vxe-table-custom-popup--table-sort-help-title{vertical-align:middle}.vxe-table-custom-popup--table-sort-help-icon{margin-left:5px;cursor:help}
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ export default {
|
|
|
11
11
|
const colid = column.getKey()
|
|
12
12
|
column.renderFixed = column.fixed
|
|
13
13
|
column.renderVisible = column.visible
|
|
14
|
+
column.renderResizeWidth = column.renderWidth
|
|
14
15
|
sortMaps[colid] = column.renderSortNumber
|
|
15
16
|
fixedMaps[colid] = column.fixed
|
|
16
17
|
visibleMaps[colid] = column.visible
|
|
@@ -36,25 +37,19 @@ export default {
|
|
|
36
37
|
return this.$nextTick()
|
|
37
38
|
},
|
|
38
39
|
calcMaxHeight () {
|
|
39
|
-
const { $
|
|
40
|
-
const customWrapperElem = $refs.customWrapper ? $refs.customWrapper.$el : null
|
|
41
|
-
const headElem = $refs.tableHeader ? $refs.tableHeader.$el : null
|
|
42
|
-
const bodyElem = $refs.tableBody ? $refs.tableBody.$el : null
|
|
40
|
+
const { $el, customStore } = this
|
|
43
41
|
// 判断面板不能大于表格高度
|
|
44
42
|
let tableHeight = 0
|
|
45
|
-
if (
|
|
46
|
-
tableHeight
|
|
43
|
+
if ($el) {
|
|
44
|
+
tableHeight = $el.clientHeight - 30
|
|
47
45
|
}
|
|
48
|
-
|
|
49
|
-
tableHeight += bodyElem.clientHeight
|
|
50
|
-
}
|
|
51
|
-
customStore.maxHeight = Math.max(0, customWrapperElem ? Math.min(customWrapperElem.clientHeight, tableHeight - 80) : 0)
|
|
46
|
+
customStore.maxHeight = Math.max(4, tableHeight)
|
|
52
47
|
},
|
|
53
48
|
checkCustomStatus () {
|
|
54
49
|
const { customStore, collectColumn, customOpts } = this
|
|
55
50
|
const { checkMethod } = customOpts
|
|
56
|
-
customStore.isAll = collectColumn.every((column) => (checkMethod ? !checkMethod({ column }) : false) || column.
|
|
57
|
-
customStore.isIndeterminate = !customStore.isAll && collectColumn.some((column) => (!checkMethod || checkMethod({ column })) && (column.
|
|
51
|
+
customStore.isAll = collectColumn.every((column) => (checkMethod ? !checkMethod({ column }) : false) || column.renderVisible)
|
|
52
|
+
customStore.isIndeterminate = !customStore.isAll && collectColumn.some((column) => (!checkMethod || checkMethod({ column })) && (column.renderVisible || column.halfVisible))
|
|
58
53
|
},
|
|
59
54
|
emitCustomEvent (type, evnt) {
|
|
60
55
|
const comp = this.$xegrid || this
|
|
@@ -27,7 +27,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
27
27
|
const { _e, $xetable, customStore } = _vm
|
|
28
28
|
const { customColumnList, customOpts, isMaxFixedColumn } = $xetable
|
|
29
29
|
const { maxHeight } = customStore
|
|
30
|
-
const { checkMethod, visibleMethod, allowSort, allowFixed, trigger } = customOpts
|
|
30
|
+
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts
|
|
31
31
|
const colVNs = []
|
|
32
32
|
const customWrapperOns = {}
|
|
33
33
|
// hover 触发
|
|
@@ -58,7 +58,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
58
58
|
dragover: _vm.sortDragoverEvent
|
|
59
59
|
}
|
|
60
60
|
}, [
|
|
61
|
-
h('div', {
|
|
61
|
+
allowVisible ? h('div', {
|
|
62
62
|
class: ['vxe-table-custom--checkbox-option', {
|
|
63
63
|
'is--checked': isChecked,
|
|
64
64
|
'is--indeterminate': isIndeterminate,
|
|
@@ -78,7 +78,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
78
78
|
h('span', {
|
|
79
79
|
class: ['vxe-checkbox--icon', isIndeterminate ? GlobalConfig.icon.TABLE_CHECKBOX_INDETERMINATE : (isChecked ? GlobalConfig.icon.TABLE_CHECKBOX_CHECKED : GlobalConfig.icon.TABLE_CHECKBOX_UNCHECKED)]
|
|
80
80
|
})
|
|
81
|
-
]),
|
|
81
|
+
]) : _e(),
|
|
82
82
|
allowSort && column.level === 1
|
|
83
83
|
? h('div', {
|
|
84
84
|
class: 'vxe-table-custom--sort-option'
|
|
@@ -148,9 +148,14 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
148
148
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
149
149
|
return h('div', {
|
|
150
150
|
key: 'simple',
|
|
151
|
-
class: ['vxe-table-custom-wrapper', {
|
|
151
|
+
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
152
152
|
'is--active': customStore.visible
|
|
153
|
-
}]
|
|
153
|
+
}],
|
|
154
|
+
style: maxHeight && !['left', 'right'].includes(placement)
|
|
155
|
+
? {
|
|
156
|
+
maxHeight: `${maxHeight}px`
|
|
157
|
+
}
|
|
158
|
+
: {}
|
|
154
159
|
}, customStore.visible
|
|
155
160
|
? [
|
|
156
161
|
h('ul', {
|
|
@@ -159,25 +164,28 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
159
164
|
h('li', {
|
|
160
165
|
class: 'vxe-table-custom--option'
|
|
161
166
|
}, [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
'
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
167
|
+
allowVisible
|
|
168
|
+
? h('div', {
|
|
169
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
170
|
+
'is--checked': isAllChecked,
|
|
171
|
+
'is--indeterminate': isAllIndeterminate
|
|
172
|
+
}],
|
|
173
|
+
attrs: {
|
|
174
|
+
title: GlobalConfig.i18n('vxe.table.allTitle')
|
|
175
|
+
},
|
|
176
|
+
on: {
|
|
177
|
+
click: _vm.allCustomEvent
|
|
178
|
+
}
|
|
179
|
+
}, [
|
|
180
|
+
h('span', {
|
|
181
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? GlobalConfig.icon.TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? GlobalConfig.icon.TABLE_CHECKBOX_CHECKED : GlobalConfig.icon.TABLE_CHECKBOX_UNCHECKED)]
|
|
182
|
+
}),
|
|
183
|
+
h('span', {
|
|
184
|
+
class: 'vxe-checkbox--label'
|
|
185
|
+
}, GlobalConfig.i18n('vxe.toolbar.customAll'))
|
|
186
|
+
]) : h('span', {
|
|
178
187
|
class: 'vxe-checkbox--label'
|
|
179
|
-
}, GlobalConfig.i18n('vxe.
|
|
180
|
-
])
|
|
188
|
+
}, GlobalConfig.i18n('vxe.table.customTitle'))
|
|
181
189
|
])
|
|
182
190
|
]),
|
|
183
191
|
h('div', {
|
|
@@ -190,11 +198,6 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
190
198
|
name: 'vxe-table-custom--list',
|
|
191
199
|
tag: 'ul'
|
|
192
200
|
},
|
|
193
|
-
style: maxHeight
|
|
194
|
-
? {
|
|
195
|
-
maxHeight: `${maxHeight}px`
|
|
196
|
-
}
|
|
197
|
-
: {},
|
|
198
201
|
on: customWrapperOns
|
|
199
202
|
}, colVNs),
|
|
200
203
|
h('div', {
|
|
@@ -235,7 +238,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
235
238
|
const renderPopupPanel = (h, _vm) => {
|
|
236
239
|
const { _e, $xetable, customStore } = _vm
|
|
237
240
|
const { customOpts, customColumnList, columnOpts, isMaxFixedColumn } = $xetable
|
|
238
|
-
const { allowSort, allowFixed, checkMethod, visibleMethod } = customOpts
|
|
241
|
+
const { allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
239
242
|
const trVNs = []
|
|
240
243
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
241
244
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true
|
|
@@ -260,7 +263,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
260
263
|
dragover: _vm.sortDragoverEvent
|
|
261
264
|
}
|
|
262
265
|
}, [
|
|
263
|
-
h('td', {
|
|
266
|
+
allowVisible ? h('td', {
|
|
264
267
|
class: 'vxe-table-custom-popup--column-item col--visible'
|
|
265
268
|
}, [
|
|
266
269
|
h('div', {
|
|
@@ -284,7 +287,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
284
287
|
class: ['vxe-checkbox--icon', isIndeterminate ? GlobalConfig.icon.TABLE_CHECKBOX_INDETERMINATE : (isChecked ? GlobalConfig.icon.TABLE_CHECKBOX_CHECKED : GlobalConfig.icon.TABLE_CHECKBOX_UNCHECKED)]
|
|
285
288
|
})
|
|
286
289
|
])
|
|
287
|
-
]),
|
|
290
|
+
]) : _e(),
|
|
288
291
|
allowSort
|
|
289
292
|
? h('td', {
|
|
290
293
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
@@ -304,7 +307,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
304
307
|
class: GlobalConfig.icon.TABLE_CUSTOM_SORT
|
|
305
308
|
})
|
|
306
309
|
])
|
|
307
|
-
:
|
|
310
|
+
: h('span', '-')
|
|
308
311
|
])
|
|
309
312
|
: _e(),
|
|
310
313
|
h('td', {
|
|
@@ -317,12 +320,33 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
317
320
|
}
|
|
318
321
|
}, colTitle)
|
|
319
322
|
]),
|
|
323
|
+
allowResizable
|
|
324
|
+
? h('td', {
|
|
325
|
+
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
326
|
+
}, [
|
|
327
|
+
!isChecked || (column.children && column.children.length)
|
|
328
|
+
? h('span', '-')
|
|
329
|
+
: h('vxe-input', {
|
|
330
|
+
props: {
|
|
331
|
+
type: 'integer',
|
|
332
|
+
min: 40,
|
|
333
|
+
value: column.renderResizeWidth
|
|
334
|
+
},
|
|
335
|
+
on: {
|
|
336
|
+
modelValue (value) {
|
|
337
|
+
column.renderResizeWidth = Math.max(40, Number(value))
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
])
|
|
342
|
+
: _e(),
|
|
320
343
|
allowFixed
|
|
321
344
|
? h('td', {
|
|
322
345
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
323
346
|
}, [
|
|
324
|
-
|
|
325
|
-
? h('
|
|
347
|
+
parent
|
|
348
|
+
? h('span', '-')
|
|
349
|
+
: h('vxe-radio-group', {
|
|
326
350
|
props: {
|
|
327
351
|
value: column.renderFixed || '',
|
|
328
352
|
type: 'button',
|
|
@@ -342,7 +366,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
342
366
|
// }
|
|
343
367
|
}
|
|
344
368
|
})
|
|
345
|
-
: null
|
|
346
369
|
])
|
|
347
370
|
: _e()
|
|
348
371
|
])
|
|
@@ -357,10 +380,10 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
357
380
|
className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
|
|
358
381
|
value: customStore.visible,
|
|
359
382
|
title: GlobalConfig.i18n('vxe.custom.cstmTitle'),
|
|
360
|
-
width:
|
|
361
|
-
minWidth:
|
|
362
|
-
height:
|
|
363
|
-
minHeight:
|
|
383
|
+
width: 700,
|
|
384
|
+
minWidth: 700,
|
|
385
|
+
height: 400,
|
|
386
|
+
minHeight: 400,
|
|
364
387
|
mask: true,
|
|
365
388
|
lockView: true,
|
|
366
389
|
showFooter: true,
|
|
@@ -384,11 +407,11 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
384
407
|
}, [
|
|
385
408
|
h('table', {}, [
|
|
386
409
|
h('colgroup', {}, [
|
|
387
|
-
h('col', {
|
|
410
|
+
allowVisible ? h('col', {
|
|
388
411
|
style: {
|
|
389
412
|
width: '80px'
|
|
390
413
|
}
|
|
391
|
-
}),
|
|
414
|
+
}) : _e(),
|
|
392
415
|
allowSort
|
|
393
416
|
? h('col', {
|
|
394
417
|
style: {
|
|
@@ -401,6 +424,13 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
401
424
|
minWidth: '120px'
|
|
402
425
|
}
|
|
403
426
|
}),
|
|
427
|
+
allowResizable
|
|
428
|
+
? h('col', {
|
|
429
|
+
style: {
|
|
430
|
+
width: '140px'
|
|
431
|
+
}
|
|
432
|
+
})
|
|
433
|
+
: _e(),
|
|
404
434
|
allowFixed
|
|
405
435
|
? h('col', {
|
|
406
436
|
style: {
|
|
@@ -411,7 +441,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
411
441
|
]),
|
|
412
442
|
h('thead', {}, [
|
|
413
443
|
h('tr', {}, [
|
|
414
|
-
h('th', {}, [
|
|
444
|
+
allowVisible ? h('th', {}, [
|
|
415
445
|
h('div', {
|
|
416
446
|
class: ['vxe-table-custom--checkbox-option', {
|
|
417
447
|
'is--checked': isAllChecked,
|
|
@@ -432,7 +462,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
432
462
|
class: 'vxe-checkbox--label'
|
|
433
463
|
}, GlobalConfig.i18n('vxe.toolbar.customAll'))
|
|
434
464
|
])
|
|
435
|
-
]),
|
|
465
|
+
]) : _e(),
|
|
436
466
|
allowSort
|
|
437
467
|
? h('th', {}, [
|
|
438
468
|
h('span', {
|
|
@@ -454,6 +484,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
454
484
|
])
|
|
455
485
|
: _e(),
|
|
456
486
|
h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colTitle')),
|
|
487
|
+
allowResizable
|
|
488
|
+
? h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colResizable'))
|
|
489
|
+
: _e(),
|
|
457
490
|
allowFixed
|
|
458
491
|
? h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colFixed', [columnOpts.maxFixedSize || 0]))
|
|
459
492
|
: _e()
|
|
@@ -563,18 +596,34 @@ export default {
|
|
|
563
596
|
updateStore({
|
|
564
597
|
id,
|
|
565
598
|
type,
|
|
566
|
-
storeData:
|
|
599
|
+
storeData: $xetable.getCustomStoreData()
|
|
567
600
|
})
|
|
568
601
|
}
|
|
569
602
|
},
|
|
570
603
|
confirmCustomEvent (evnt) {
|
|
571
604
|
const { $xetable } = this
|
|
572
|
-
const { customColumnList } = $xetable
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
605
|
+
const { customOpts, customColumnList } = $xetable
|
|
606
|
+
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
|
|
607
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
608
|
+
if (!parent) {
|
|
609
|
+
if (allowSort) {
|
|
610
|
+
const sortIndex = index + 1
|
|
611
|
+
column.renderSortNumber = sortIndex
|
|
612
|
+
}
|
|
613
|
+
if (allowFixed) {
|
|
614
|
+
column.fixed = column.renderFixed
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
if (allowResizable) {
|
|
618
|
+
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
619
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
620
|
+
column.resizeWidth = column.renderResizeWidth
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if (allowVisible) {
|
|
625
|
+
column.visible = column.renderVisible
|
|
626
|
+
}
|
|
578
627
|
})
|
|
579
628
|
$xetable.closeCustom()
|
|
580
629
|
$xetable.emitCustomEvent('confirm', evnt)
|
|
@@ -582,17 +631,27 @@ export default {
|
|
|
582
631
|
},
|
|
583
632
|
cancelCustomEvent (evnt) {
|
|
584
633
|
const { $xetable } = this
|
|
585
|
-
const { customStore, customColumnList } = $xetable
|
|
634
|
+
const { customStore, customOpts, customColumnList } = $xetable
|
|
586
635
|
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
|
|
636
|
+
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
|
|
587
637
|
XEUtils.eachTree(customColumnList, column => {
|
|
588
638
|
const colid = column.getKey()
|
|
589
639
|
const visible = !!oldVisibleMaps[colid]
|
|
590
640
|
const fixed = oldFixedMaps[colid] || ''
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
641
|
+
if (allowVisible) {
|
|
642
|
+
column.renderVisible = visible
|
|
643
|
+
column.visible = visible
|
|
644
|
+
}
|
|
645
|
+
if (allowFixed) {
|
|
646
|
+
column.renderFixed = fixed
|
|
647
|
+
column.fixed = fixed
|
|
648
|
+
}
|
|
649
|
+
if (allowSort) {
|
|
650
|
+
column.renderSortNumber = oldSortMaps[colid] || 0
|
|
651
|
+
}
|
|
652
|
+
if (allowResizable) {
|
|
653
|
+
column.renderResizeWidth = column.renderWidth
|
|
654
|
+
}
|
|
596
655
|
}, { children: 'children' })
|
|
597
656
|
$xetable.closeCustom()
|
|
598
657
|
$xetable.emitCustomEvent('cancel', evnt)
|
|
@@ -602,7 +661,7 @@ export default {
|
|
|
602
661
|
$xetable.resetColumn(true)
|
|
603
662
|
$xetable.closeCustom()
|
|
604
663
|
$xetable.emitCustomEvent('reset', evnt)
|
|
605
|
-
this.handleSaveStore('
|
|
664
|
+
this.handleSaveStore('reset')
|
|
606
665
|
},
|
|
607
666
|
resetCustomEvent (evnt) {
|
|
608
667
|
if (VXETable.modal) {
|
|
@@ -117,6 +117,7 @@ export default {
|
|
|
117
117
|
colSort: 'Sort',
|
|
118
118
|
sortHelpTip: 'Click and drag the icon to adjust the order of the columns.',
|
|
119
119
|
colTitle: 'Title',
|
|
120
|
+
colResizable: 'Column width (px)',
|
|
120
121
|
colVisible: 'Visible',
|
|
121
122
|
colFixed: 'Freeze columns (Max. {0})',
|
|
122
123
|
fixedLeft: 'Left',
|
|
@@ -117,6 +117,7 @@ export default {
|
|
|
117
117
|
colSort: 'Sort',
|
|
118
118
|
sortHelpTip: 'Click and drag the icon to adjust the order of the columns.',
|
|
119
119
|
colTitle: 'Title',
|
|
120
|
+
colResizable: 'Column width (px)',
|
|
120
121
|
colVisible: 'Visible',
|
|
121
122
|
colFixed: 'Freeze columns (Max {0})',
|
|
122
123
|
fixedLeft: 'Left',
|
|
@@ -117,6 +117,7 @@ export default {
|
|
|
117
117
|
colSort: 'Sort',
|
|
118
118
|
sortHelpTip: 'Click and drag the icon to adjust the order of the columns.',
|
|
119
119
|
colTitle: 'Title',
|
|
120
|
+
colResizable: 'Column width (px)',
|
|
120
121
|
colVisible: 'Visible',
|
|
121
122
|
colFixed: 'Freeze columns (Max {0})',
|
|
122
123
|
fixedLeft: 'Left',
|
|
@@ -34,6 +34,10 @@ export default {
|
|
|
34
34
|
autoHidden: { type: Boolean, default: () => GlobalConfig.pager.autoHidden },
|
|
35
35
|
transfer: { type: Boolean, default: () => GlobalConfig.pager.transfer },
|
|
36
36
|
className: [String, Function],
|
|
37
|
+
pageSizePlacement: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: () => GlobalConfig.pager.pageSizePlacement
|
|
40
|
+
},
|
|
37
41
|
// 自定义图标
|
|
38
42
|
iconPrevPage: String,
|
|
39
43
|
iconJumpPrev: String,
|
|
@@ -271,7 +275,7 @@ export default {
|
|
|
271
275
|
class: 'vxe-pager--sizes',
|
|
272
276
|
props: {
|
|
273
277
|
value: this.pageSize,
|
|
274
|
-
placement:
|
|
278
|
+
placement: this.pageSizePlacement,
|
|
275
279
|
transfer: this.transfer,
|
|
276
280
|
options: this.sizeList
|
|
277
281
|
},
|
|
@@ -1596,6 +1596,7 @@ const Methods = {
|
|
|
1596
1596
|
if (!checkMethod || checkMethod({ column })) {
|
|
1597
1597
|
column.visible = column.defaultVisible
|
|
1598
1598
|
}
|
|
1599
|
+
column.renderResizeWidth = column.renderWidth
|
|
1599
1600
|
})
|
|
1600
1601
|
if (opts.resizable) {
|
|
1601
1602
|
this.saveCustomResizable(true)
|
|
@@ -1798,6 +1799,61 @@ const Methods = {
|
|
|
1798
1799
|
localStorage.setItem(visibleStorageKey, XEUtils.toJSONString(columnVisibleStorageMap))
|
|
1799
1800
|
}
|
|
1800
1801
|
},
|
|
1802
|
+
getCustomStoreData () {
|
|
1803
|
+
const { id, collectColumn, customOpts } = this
|
|
1804
|
+
const { checkMethod } = customOpts
|
|
1805
|
+
const resizableData = {}
|
|
1806
|
+
const sortData = {}
|
|
1807
|
+
const visibleData = {}
|
|
1808
|
+
const fixedData = {}
|
|
1809
|
+
const storeData = {
|
|
1810
|
+
resizableData,
|
|
1811
|
+
sortData,
|
|
1812
|
+
visibleData,
|
|
1813
|
+
fixedData
|
|
1814
|
+
}
|
|
1815
|
+
if (!id) {
|
|
1816
|
+
errLog('vxe.error.reqProp', ['id'])
|
|
1817
|
+
return storeData
|
|
1818
|
+
}
|
|
1819
|
+
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
1820
|
+
// 排序只支持一级
|
|
1821
|
+
if (!parent) {
|
|
1822
|
+
collectColumn.forEach((column) => {
|
|
1823
|
+
const colKey = column.getKey()
|
|
1824
|
+
if (colKey) {
|
|
1825
|
+
sortData[colKey] = column.renderSortNumber
|
|
1826
|
+
}
|
|
1827
|
+
})
|
|
1828
|
+
}
|
|
1829
|
+
if (column.resizeWidth) {
|
|
1830
|
+
const colKey = column.getKey()
|
|
1831
|
+
if (colKey) {
|
|
1832
|
+
resizableData[colKey] = column.renderWidth
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
if (column.fixed && column.fixed !== column.defaultFixed) {
|
|
1836
|
+
const colKey = column.getKey()
|
|
1837
|
+
if (colKey) {
|
|
1838
|
+
fixedData[colKey] = column.fixed
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
1842
|
+
if (!column.visible && column.defaultVisible) {
|
|
1843
|
+
const colKey = column.getKey()
|
|
1844
|
+
if (colKey) {
|
|
1845
|
+
visibleData[colKey] = false
|
|
1846
|
+
}
|
|
1847
|
+
} else if (column.visible && !column.defaultVisible) {
|
|
1848
|
+
const colKey = column.getKey()
|
|
1849
|
+
if (colKey) {
|
|
1850
|
+
visibleData[colKey] = true
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
})
|
|
1855
|
+
return storeData
|
|
1856
|
+
},
|
|
1801
1857
|
saveCustomResizable (isReset) {
|
|
1802
1858
|
const { id, collectColumn, customConfig, customOpts } = this
|
|
1803
1859
|
const { storage } = customOpts
|
|
@@ -1843,11 +1899,9 @@ const Methods = {
|
|
|
1843
1899
|
columnWidthStorage = XEUtils.isPlainObject(columnSortStorageMap[id]) ? columnSortStorageMap[id] : {}
|
|
1844
1900
|
// 排序只支持一级
|
|
1845
1901
|
collectColumn.forEach(column => {
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
columnWidthStorage[colKey] = column.renderSortNumber
|
|
1850
|
-
}
|
|
1902
|
+
const colKey = column.getKey()
|
|
1903
|
+
if (colKey) {
|
|
1904
|
+
columnWidthStorage[colKey] = column.renderSortNumber
|
|
1851
1905
|
}
|
|
1852
1906
|
})
|
|
1853
1907
|
}
|
|
@@ -59,9 +59,12 @@ export default {
|
|
|
59
59
|
// visibleMethod () {}
|
|
60
60
|
// },
|
|
61
61
|
customConfig: {
|
|
62
|
+
allowVisible: true,
|
|
63
|
+
allowResizable: true,
|
|
62
64
|
allowFixed: true,
|
|
63
65
|
allowSort: true,
|
|
64
|
-
showFooter: true
|
|
66
|
+
showFooter: true,
|
|
67
|
+
placement: 'topRight'
|
|
65
68
|
// storage: false,
|
|
66
69
|
// checkMethod () {}
|
|
67
70
|
},
|
|
@@ -273,6 +276,7 @@ export default {
|
|
|
273
276
|
leaveDelay: 300
|
|
274
277
|
},
|
|
275
278
|
pager: {
|
|
279
|
+
pageSizePlacement: 'top'
|
|
276
280
|
// size: null,
|
|
277
281
|
// autoHidden: false,
|
|
278
282
|
// perfect: true,
|