vxe-table 3.8.8-beta.5 → 3.8.8-beta.7
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 +5 -10
- package/lib/custom/src/mixin.min.js +1 -1
- package/lib/custom/src/panel.js +102 -42
- 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/edit/src/mixin.js +2 -2
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/export/src/mixin.js +2 -2
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/filter/src/mixin.js +2 -2
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/filter/src/panel.js +5 -5
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/form/src/form-config-item.js +9 -8
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +9 -8
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +3 -2
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +2 -1
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +5 -4
- package/lib/form/src/util.min.js +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 +299 -120
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +2 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +2 -1
- package/lib/locale/lang/zh-TC.js +2 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +2 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +2 -1
- 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/body.js +7 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +17 -11
- package/lib/table/src/cell.min.js +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 +111 -16
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +4 -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 +4 -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 +5 -10
- package/packages/custom/src/panel.js +120 -59
- package/packages/edit/src/mixin.js +2 -2
- package/packages/export/src/mixin.js +2 -2
- package/packages/filter/src/mixin.js +2 -2
- package/packages/filter/src/panel.js +5 -5
- package/packages/form/src/form-config-item.js +9 -8
- package/packages/form/src/form-item.js +9 -8
- package/packages/form/src/form.js +3 -2
- package/packages/form/src/render.js +2 -1
- package/packages/form/src/util.js +5 -4
- package/packages/locale/lang/en-US.js +2 -1
- package/packages/locale/lang/es-ES.js +2 -1
- package/packages/locale/lang/ja-JP.js +2 -1
- package/packages/locale/lang/pt-BR.js +2 -1
- package/packages/locale/lang/zh-CN.js +2 -1
- package/packages/locale/lang/zh-TC.js +2 -1
- package/packages/pager/src/pager.js +5 -1
- package/packages/table/src/body.js +7 -5
- package/packages/table/src/cell.js +17 -11
- package/packages/table/src/columnInfo.js +2 -0
- package/packages/table/src/methods.js +98 -11
- package/packages/table/src/table.js +1 -1
- package/packages/v-x-e-table/src/conf.js +5 -1
- package/styles/custom.scss +41 -5
- package/styles/table.scss +10 -0
- package/styles/variable.scss +2 -0
- package/types/v-x-e-table/renderer.d.ts +158 -9
- /package/lib/icon/style/{iconfont.1717729278146.ttf → iconfont.1718470675024.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1717729278146.woff → iconfont.1718470675024.woff} +0 -0
- /package/lib/icon/style/{iconfont.1717729278146.woff2 → iconfont.1718470675024.woff2} +0 -0
- /package/lib/{iconfont.1717729278146.ttf → iconfont.1718470675024.ttf} +0 -0
- /package/lib/{iconfont.1717729278146.woff → iconfont.1718470675024.woff} +0 -0
- /package/lib/{iconfont.1717729278146.woff2 → iconfont.1718470675024.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--top-left{top:2px;left:2px}.vxe-table-custom-wrapper.placement--top-right{top:2px;right:2px}.vxe-table-custom-wrapper.placement--bottom-left{bottom:2px;left:2px}.vxe-table-custom-wrapper.placement--bottom-right{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,19 +37,13 @@ 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
|
|
@@ -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,8 @@ 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 { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
242
|
+
const modalOpts = Object.assign({}, modalOptions)
|
|
239
243
|
const trVNs = []
|
|
240
244
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
241
245
|
const isVisible = visibleMethod ? visibleMethod({ column }) : true
|
|
@@ -260,7 +264,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
260
264
|
dragover: _vm.sortDragoverEvent
|
|
261
265
|
}
|
|
262
266
|
}, [
|
|
263
|
-
h('td', {
|
|
267
|
+
allowVisible ? h('td', {
|
|
264
268
|
class: 'vxe-table-custom-popup--column-item col--visible'
|
|
265
269
|
}, [
|
|
266
270
|
h('div', {
|
|
@@ -284,7 +288,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
284
288
|
class: ['vxe-checkbox--icon', isIndeterminate ? GlobalConfig.icon.TABLE_CHECKBOX_INDETERMINATE : (isChecked ? GlobalConfig.icon.TABLE_CHECKBOX_CHECKED : GlobalConfig.icon.TABLE_CHECKBOX_UNCHECKED)]
|
|
285
289
|
})
|
|
286
290
|
])
|
|
287
|
-
]),
|
|
291
|
+
]) : _e(),
|
|
288
292
|
allowSort
|
|
289
293
|
? h('td', {
|
|
290
294
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
@@ -304,7 +308,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
304
308
|
class: GlobalConfig.icon.TABLE_CUSTOM_SORT
|
|
305
309
|
})
|
|
306
310
|
])
|
|
307
|
-
:
|
|
311
|
+
: h('span', '-')
|
|
308
312
|
])
|
|
309
313
|
: _e(),
|
|
310
314
|
h('td', {
|
|
@@ -317,12 +321,33 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
317
321
|
}
|
|
318
322
|
}, colTitle)
|
|
319
323
|
]),
|
|
324
|
+
allowResizable
|
|
325
|
+
? h('td', {
|
|
326
|
+
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
327
|
+
}, [
|
|
328
|
+
!isChecked || (column.children && column.children.length)
|
|
329
|
+
? h('span', '-')
|
|
330
|
+
: h('vxe-input', {
|
|
331
|
+
props: {
|
|
332
|
+
type: 'integer',
|
|
333
|
+
min: 40,
|
|
334
|
+
value: column.renderResizeWidth
|
|
335
|
+
},
|
|
336
|
+
on: {
|
|
337
|
+
modelValue (value) {
|
|
338
|
+
column.renderResizeWidth = Math.max(40, Number(value))
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
})
|
|
342
|
+
])
|
|
343
|
+
: _e(),
|
|
320
344
|
allowFixed
|
|
321
345
|
? h('td', {
|
|
322
346
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
323
347
|
}, [
|
|
324
|
-
|
|
325
|
-
? h('
|
|
348
|
+
parent
|
|
349
|
+
? h('span', '-')
|
|
350
|
+
: h('vxe-radio-group', {
|
|
326
351
|
props: {
|
|
327
352
|
value: column.renderFixed || '',
|
|
328
353
|
type: 'button',
|
|
@@ -342,7 +367,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
342
367
|
// }
|
|
343
368
|
}
|
|
344
369
|
})
|
|
345
|
-
: null
|
|
346
370
|
])
|
|
347
371
|
: _e()
|
|
348
372
|
])
|
|
@@ -354,13 +378,13 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
354
378
|
return h('vxe-modal', {
|
|
355
379
|
key: 'popup',
|
|
356
380
|
props: {
|
|
357
|
-
className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
|
|
381
|
+
className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
358
382
|
value: customStore.visible,
|
|
359
|
-
title: GlobalConfig.i18n('vxe.custom.cstmTitle'),
|
|
360
|
-
width: '
|
|
361
|
-
minWidth:
|
|
362
|
-
height: '50vh',
|
|
363
|
-
minHeight:
|
|
383
|
+
title: modalOpts.title || GlobalConfig.i18n('vxe.custom.cstmTitle'),
|
|
384
|
+
width: modalOpts.width || '50vw',
|
|
385
|
+
minWidth: modalOpts.minWidth || 700,
|
|
386
|
+
height: modalOpts.height || '50vh',
|
|
387
|
+
minHeight: modalOpts.minHeight || 400,
|
|
364
388
|
mask: true,
|
|
365
389
|
lockView: true,
|
|
366
390
|
showFooter: true,
|
|
@@ -384,11 +408,11 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
384
408
|
}, [
|
|
385
409
|
h('table', {}, [
|
|
386
410
|
h('colgroup', {}, [
|
|
387
|
-
h('col', {
|
|
411
|
+
allowVisible ? h('col', {
|
|
388
412
|
style: {
|
|
389
413
|
width: '80px'
|
|
390
414
|
}
|
|
391
|
-
}),
|
|
415
|
+
}) : _e(),
|
|
392
416
|
allowSort
|
|
393
417
|
? h('col', {
|
|
394
418
|
style: {
|
|
@@ -401,6 +425,13 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
401
425
|
minWidth: '120px'
|
|
402
426
|
}
|
|
403
427
|
}),
|
|
428
|
+
allowResizable
|
|
429
|
+
? h('col', {
|
|
430
|
+
style: {
|
|
431
|
+
width: '140px'
|
|
432
|
+
}
|
|
433
|
+
})
|
|
434
|
+
: _e(),
|
|
404
435
|
allowFixed
|
|
405
436
|
? h('col', {
|
|
406
437
|
style: {
|
|
@@ -411,7 +442,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
411
442
|
]),
|
|
412
443
|
h('thead', {}, [
|
|
413
444
|
h('tr', {}, [
|
|
414
|
-
h('th', {}, [
|
|
445
|
+
allowVisible ? h('th', {}, [
|
|
415
446
|
h('div', {
|
|
416
447
|
class: ['vxe-table-custom--checkbox-option', {
|
|
417
448
|
'is--checked': isAllChecked,
|
|
@@ -432,7 +463,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
432
463
|
class: 'vxe-checkbox--label'
|
|
433
464
|
}, GlobalConfig.i18n('vxe.toolbar.customAll'))
|
|
434
465
|
])
|
|
435
|
-
]),
|
|
466
|
+
]) : _e(),
|
|
436
467
|
allowSort
|
|
437
468
|
? h('th', {}, [
|
|
438
469
|
h('span', {
|
|
@@ -454,6 +485,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
454
485
|
])
|
|
455
486
|
: _e(),
|
|
456
487
|
h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colTitle')),
|
|
488
|
+
allowResizable
|
|
489
|
+
? h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colResizable'))
|
|
490
|
+
: _e(),
|
|
457
491
|
allowFixed
|
|
458
492
|
? h('th', {}, GlobalConfig.i18n('vxe.custom.setting.colFixed', [columnOpts.maxFixedSize || 0]))
|
|
459
493
|
: _e()
|
|
@@ -563,18 +597,35 @@ export default {
|
|
|
563
597
|
updateStore({
|
|
564
598
|
id,
|
|
565
599
|
type,
|
|
566
|
-
storeData:
|
|
600
|
+
storeData: $xetable.getCustomStoreData()
|
|
567
601
|
})
|
|
568
602
|
}
|
|
569
603
|
},
|
|
570
604
|
confirmCustomEvent (evnt) {
|
|
571
605
|
const { $xetable } = this
|
|
572
|
-
const { customColumnList } = $xetable
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
606
|
+
const { customOpts, customColumnList } = $xetable
|
|
607
|
+
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
|
|
608
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
609
|
+
if (!parent) {
|
|
610
|
+
if (allowSort) {
|
|
611
|
+
const sortIndex = index + 1
|
|
612
|
+
column.renderSortNumber = sortIndex
|
|
613
|
+
}
|
|
614
|
+
if (allowFixed) {
|
|
615
|
+
column.fixed = column.renderFixed
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if (allowResizable) {
|
|
619
|
+
if (column.renderVisible && (!column.children || column.children.length)) {
|
|
620
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
621
|
+
column.resizeWidth = column.renderResizeWidth
|
|
622
|
+
column.renderWidth = column.renderResizeWidth
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
if (allowVisible) {
|
|
627
|
+
column.visible = column.renderVisible
|
|
628
|
+
}
|
|
578
629
|
})
|
|
579
630
|
$xetable.closeCustom()
|
|
580
631
|
$xetable.emitCustomEvent('confirm', evnt)
|
|
@@ -582,17 +633,27 @@ export default {
|
|
|
582
633
|
},
|
|
583
634
|
cancelCustomEvent (evnt) {
|
|
584
635
|
const { $xetable } = this
|
|
585
|
-
const { customStore, customColumnList } = $xetable
|
|
636
|
+
const { customStore, customOpts, customColumnList } = $xetable
|
|
586
637
|
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
|
|
638
|
+
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
|
|
587
639
|
XEUtils.eachTree(customColumnList, column => {
|
|
588
640
|
const colid = column.getKey()
|
|
589
641
|
const visible = !!oldVisibleMaps[colid]
|
|
590
642
|
const fixed = oldFixedMaps[colid] || ''
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
643
|
+
if (allowVisible) {
|
|
644
|
+
column.renderVisible = visible
|
|
645
|
+
column.visible = visible
|
|
646
|
+
}
|
|
647
|
+
if (allowFixed) {
|
|
648
|
+
column.renderFixed = fixed
|
|
649
|
+
column.fixed = fixed
|
|
650
|
+
}
|
|
651
|
+
if (allowSort) {
|
|
652
|
+
column.renderSortNumber = oldSortMaps[colid] || 0
|
|
653
|
+
}
|
|
654
|
+
if (allowResizable) {
|
|
655
|
+
column.renderResizeWidth = column.renderWidth
|
|
656
|
+
}
|
|
596
657
|
}, { children: 'children' })
|
|
597
658
|
$xetable.closeCustom()
|
|
598
659
|
$xetable.emitCustomEvent('cancel', evnt)
|
|
@@ -602,7 +663,7 @@ export default {
|
|
|
602
663
|
$xetable.resetColumn(true)
|
|
603
664
|
$xetable.closeCustom()
|
|
604
665
|
$xetable.emitCustomEvent('reset', evnt)
|
|
605
|
-
this.handleSaveStore('
|
|
666
|
+
this.handleSaveStore('reset')
|
|
606
667
|
},
|
|
607
668
|
resetCustomEvent (evnt) {
|
|
608
669
|
if (VXETable.modal) {
|
|
@@ -615,10 +615,10 @@ export default {
|
|
|
615
615
|
let { autofocus, autoselect } = editRender
|
|
616
616
|
let inputElem
|
|
617
617
|
if (!autofocus && compRender) {
|
|
618
|
-
autofocus = compRender.autofocus
|
|
618
|
+
autofocus = compRender.tableAutofocus || compRender.autofocus
|
|
619
619
|
}
|
|
620
620
|
if (!autoselect && compRender) {
|
|
621
|
-
autoselect = compRender.autoselect
|
|
621
|
+
autoselect = compRender.tableAutoSelect || compRender.autoselect
|
|
622
622
|
}
|
|
623
623
|
// 如果指定了聚焦 class
|
|
624
624
|
if (XEUtils.isFunction(autofocus)) {
|
|
@@ -105,7 +105,7 @@ function getLabelData ($xetable, opts, columns, datas) {
|
|
|
105
105
|
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
106
106
|
const compConf = VXETable.renderer.get(renderOpts.name)
|
|
107
107
|
if (compConf) {
|
|
108
|
-
bodyExportMethod = compConf.exportMethod || compConf.cellExportMethod
|
|
108
|
+
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod || compConf.cellExportMethod
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
if (!bodyExportMethod) {
|
|
@@ -233,7 +233,7 @@ function getFooterCellValue ($xetable, opts, items, column) {
|
|
|
233
233
|
if (!footLabelMethod && renderOpts && renderOpts.name) {
|
|
234
234
|
const compConf = VXETable.renderer.get(renderOpts.name)
|
|
235
235
|
if (compConf) {
|
|
236
|
-
footLabelMethod = compConf.footerExportMethod || compConf.footerCellExportMethod
|
|
236
|
+
footLabelMethod = compConf.tableFooterExportMethod || compConf.footerExportMethod || compConf.footerCellExportMethod
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
if (!footLabelMethod) {
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
const { target: targetElem, pageX } = evnt
|
|
59
59
|
const { filters, filterMultiple, filterRender } = column
|
|
60
60
|
const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
|
|
61
|
-
const filterRecoverMethod = column.filterRecoverMethod || (compConf ? compConf.filterRecoverMethod : null)
|
|
61
|
+
const filterRecoverMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null)
|
|
62
62
|
const { visibleWidth } = DomTools.getDomNode()
|
|
63
63
|
Object.assign(filterStore, {
|
|
64
64
|
args: params,
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
206
206
|
const { filters, filterRender } = column
|
|
207
207
|
if (filters) {
|
|
208
208
|
const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
|
|
209
|
-
const filterResetMethod = column.filterResetMethod || (compConf ? compConf.filterResetMethod : null)
|
|
209
|
+
const filterResetMethod = column.filterResetMethod || (compConf ? (compConf.tableFilterResetMethod || compConf.filterResetMethod) : null)
|
|
210
210
|
filters.forEach((item) => {
|
|
211
211
|
item._checked = false
|
|
212
212
|
item.checked = false
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
2
2
|
import VXETable from '../../v-x-e-table'
|
|
3
3
|
import UtilTools from '../../tools/utils'
|
|
4
|
-
import XEUtils from 'xe-utils'
|
|
5
4
|
import { getSlotVNs } from '../../tools/vn'
|
|
6
5
|
|
|
7
6
|
export default {
|
|
@@ -20,7 +19,7 @@ export default {
|
|
|
20
19
|
const { args, column } = filterStore
|
|
21
20
|
const filterRender = column ? column.filterRender : null
|
|
22
21
|
const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
|
|
23
|
-
const filterClassName = compConf ? compConf.filterClassName : ''
|
|
22
|
+
const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
|
|
24
23
|
return h('div', {
|
|
25
24
|
class: [
|
|
26
25
|
'vxe-table--filter-wrapper',
|
|
@@ -41,17 +40,18 @@ export default {
|
|
|
41
40
|
const { $parent: $xetable, filterStore } = this
|
|
42
41
|
const { args, column, multiple, maxHeight } = filterStore
|
|
43
42
|
const { slots } = column
|
|
43
|
+
const rtFilter = compConf ? (compConf.renderTableFilter || compConf.renderFilter) : null
|
|
44
44
|
if (slots && slots.filter) {
|
|
45
45
|
return [
|
|
46
46
|
h('div', {
|
|
47
47
|
class: 'vxe-table--filter-template'
|
|
48
48
|
}, $xetable.callSlot(slots.filter, Object.assign({ $panel: this, context: this }, args), h))
|
|
49
49
|
]
|
|
50
|
-
} else if (
|
|
50
|
+
} else if (rtFilter) {
|
|
51
51
|
return [
|
|
52
52
|
h('div', {
|
|
53
53
|
class: 'vxe-table--filter-template'
|
|
54
|
-
}, getSlotVNs(
|
|
54
|
+
}, getSlotVNs(rtFilter.call($xetable, h, filterRender, Object.assign({ $panel: this, context: this }, args))))
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some(item => item._checked)
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
const filterRender = column.filterRender
|
|
123
123
|
const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
|
|
124
124
|
const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
|
|
125
|
-
return multiple
|
|
125
|
+
return multiple(compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false) : true) ? [
|
|
126
126
|
h('div', {
|
|
127
127
|
class: 'vxe-table--filter-footer'
|
|
128
128
|
}, [
|
|
@@ -30,12 +30,12 @@ const VxeFormConfigItem = {
|
|
|
30
30
|
const { rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = $xeform
|
|
31
31
|
const { slots, title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, children, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
|
|
32
32
|
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
|
33
|
-
const itemClassName = compConf ? compConf.itemClassName : ''
|
|
34
|
-
const itemStyle = compConf ? compConf.itemStyle : null
|
|
35
|
-
const itemContentClassName = compConf ? compConf.itemContentClassName : ''
|
|
36
|
-
const itemContentStyle = compConf ? compConf.itemContentStyle : null
|
|
37
|
-
const itemTitleClassName = compConf ? compConf.itemTitleClassName : ''
|
|
38
|
-
const itemTitleStyle = compConf ? compConf.itemTitleStyle : null
|
|
33
|
+
const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
|
|
34
|
+
const itemStyle = compConf ? (compConf.formItemStyle || compConf.itemStyle) : null
|
|
35
|
+
const itemContentClassName = compConf ? (compConf.formItemContentClassName || compConf.itemContentClassName) : ''
|
|
36
|
+
const itemContentStyle = compConf ? (compConf.formItemContentStyle || compConf.itemContentStyle) : null
|
|
37
|
+
const itemTitleClassName = compConf ? (compConf.formItemTitleClassName || compConf.itemTitleClassName) : ''
|
|
38
|
+
const itemTitleStyle = compConf ? (compConf.formItemTitleStyle || compConf.itemTitleStyle) : null
|
|
39
39
|
const span = item.span || $xeform.span
|
|
40
40
|
const align = item.align || $xeform.align
|
|
41
41
|
const titleAlign = XEUtils.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign
|
|
@@ -75,10 +75,11 @@ const VxeFormConfigItem = {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
let contentVNs = []
|
|
78
|
+
const rfiContent = compConf ? (compConf.renderFormItemContent || compConf.renderItemContent) : null
|
|
78
79
|
if (slots && slots.default) {
|
|
79
80
|
contentVNs = $xeform.callSlot(slots.default, params, h)
|
|
80
|
-
} else if (
|
|
81
|
-
contentVNs = getSlotVNs(
|
|
81
|
+
} else if (rfiContent) {
|
|
82
|
+
contentVNs = getSlotVNs(rfiContent.call($xeform, h, itemRender, params))
|
|
82
83
|
} else if (compConf && compConf.renderItem) {
|
|
83
84
|
contentVNs = getSlotVNs(compConf.renderItem.call($xeform, h, itemRender, params))
|
|
84
85
|
} else if (field) {
|
|
@@ -67,12 +67,12 @@ const renderItem = (h, _vm, item, slots) => {
|
|
|
67
67
|
const { _e, rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = _vm
|
|
68
68
|
const { title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
|
|
69
69
|
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
|
70
|
-
const itemClassName = compConf ? compConf.itemClassName : ''
|
|
71
|
-
const itemStyle = compConf ? compConf.itemStyle : null
|
|
72
|
-
const itemContentClassName = compConf ? compConf.itemContentClassName : ''
|
|
73
|
-
const itemContentStyle = compConf ? compConf.itemContentStyle : null
|
|
74
|
-
const itemTitleClassName = compConf ? compConf.itemTitleClassName : ''
|
|
75
|
-
const itemTitleStyle = compConf ? compConf.itemTitleStyle : null
|
|
70
|
+
const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
|
|
71
|
+
const itemStyle = compConf ? (compConf.formItemStyle || compConf.itemStyle) : null
|
|
72
|
+
const itemContentClassName = compConf ? (compConf.formItemContentClassName || compConf.itemContentClassName) : ''
|
|
73
|
+
const itemContentStyle = compConf ? (compConf.formItemContentStyle || compConf.itemContentStyle) : null
|
|
74
|
+
const itemTitleClassName = compConf ? (compConf.formItemTitleClassName || compConf.itemTitleClassName) : ''
|
|
75
|
+
const itemTitleStyle = compConf ? (compConf.formItemTitleStyle || compConf.itemTitleStyle) : null
|
|
76
76
|
const span = item.span || _vm.span
|
|
77
77
|
const align = item.align || _vm.align
|
|
78
78
|
const titleAlign = XEUtils.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign
|
|
@@ -97,10 +97,11 @@ const renderItem = (h, _vm, item, slots) => {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
let contentVNs = []
|
|
100
|
+
const rfiContent = compConf ? (compConf.renderFormItemContent || compConf.renderItemContent) : null
|
|
100
101
|
if (slots && slots.default) {
|
|
101
102
|
contentVNs = _vm.callSlot(slots.default, params, h)
|
|
102
|
-
} else if (
|
|
103
|
-
contentVNs = getSlotVNs(
|
|
103
|
+
} else if (rfiContent) {
|
|
104
|
+
contentVNs = getSlotVNs(rfiContent.call(_vm, h, itemRender, params))
|
|
104
105
|
} else if (compConf && compConf.renderItem) {
|
|
105
106
|
contentVNs = getSlotVNs(compConf.renderItem.call(_vm, h, itemRender, params))
|
|
106
107
|
} else if (field) {
|
|
@@ -271,8 +271,9 @@ export default {
|
|
|
271
271
|
const { field, resetValue, itemRender } = item
|
|
272
272
|
if (isEnableConf(itemRender)) {
|
|
273
273
|
const compConf = VXETable.renderer.get(itemRender.name)
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
const fiResetMethod = compConf ? (compConf.formItemResetMethod || compConf.itemResetMethod) : null
|
|
275
|
+
if (compConf && fiResetMethod) {
|
|
276
|
+
fiResetMethod({ data, field, property: field, item, $form: this, $grid: this.xegrid })
|
|
276
277
|
} else if (field) {
|
|
277
278
|
XEUtils.set(data, field, resetValue === null ? getResetValue(XEUtils.get(data, field), undefined) : XEUtils.clone(resetValue, true))
|
|
278
279
|
}
|
|
@@ -45,10 +45,11 @@ export function renderTitle (h, _vm, item) {
|
|
|
45
45
|
: renderPrefixIcon(h, titlePrefix)
|
|
46
46
|
)
|
|
47
47
|
}
|
|
48
|
+
const rfiTitle = compConf ? (compConf.renderFormItemTitle || compConf.renderItemTitle) : null
|
|
48
49
|
titVNs.push(
|
|
49
50
|
h('span', {
|
|
50
51
|
class: 'vxe-form--item-title-label'
|
|
51
|
-
},
|
|
52
|
+
}, rfiTitle ? getSlotVNs(rfiTitle(itemRender, params)) : (slots && slots.title ? _vm.callSlot(slots.title, params, h) : getFuncText(item.title)))
|
|
52
53
|
)
|
|
53
54
|
contVNs.push(
|
|
54
55
|
h('div', {
|