vxe-gantt 0.0.1 → 0.0.3
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/LICENSE +21 -0
- package/README.en.md +72 -0
- package/README.ja-JP.md +72 -0
- package/README.md +82 -2
- package/README.zh-TW.md +73 -0
- package/es/components.js +12 -0
- package/es/gantt/index.js +13 -0
- package/es/gantt/src/emits.js +4 -0
- package/es/gantt/src/gantt-body.js +103 -0
- package/es/gantt/src/gantt-chart.js +77 -0
- package/es/gantt/src/gantt-header.js +70 -0
- package/es/gantt/src/gantt-view.js +768 -0
- package/es/gantt/src/gantt.js +1746 -0
- package/es/gantt/src/grid-emits.js +16 -0
- package/es/gantt/src/grid-props.js +7 -0
- package/es/gantt/src/props.js +2 -0
- package/es/gantt/src/table-emits.js +97 -0
- package/es/gantt/src/table-props.js +298 -0
- package/es/gantt/src/util.js +12 -0
- package/es/gantt/style.css +599 -0
- package/es/gantt/style.min.css +1 -0
- package/es/index.esm.js +3 -0
- package/es/style.css +1 -0
- package/es/style.min.css +1 -0
- package/es/ui/index.js +52 -0
- package/es/ui/src/comp.js +2 -0
- package/es/ui/src/dom.js +169 -0
- package/es/ui/src/log.js +4 -0
- package/es/ui/src/utils.js +41 -0
- package/es/ui/src/vn.js +1 -0
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/vxe-gantt/index.js +3 -0
- package/es/vxe-gantt/style.css +599 -0
- package/es/vxe-gantt/style.min.css +1 -0
- package/es/vxe-ui/index.js +3 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/helper/vetur/attributes.json +1 -0
- package/helper/vetur/tags.json +1 -0
- package/lib/components.js +42 -0
- package/lib/components.min.js +1 -0
- package/lib/gantt/index.js +20 -0
- package/lib/gantt/index.min.js +1 -0
- package/lib/gantt/src/emits.js +8 -0
- package/lib/gantt/src/emits.min.js +1 -0
- package/lib/gantt/src/gantt-body.js +118 -0
- package/lib/gantt/src/gantt-body.min.js +1 -0
- package/lib/gantt/src/gantt-chart.js +94 -0
- package/lib/gantt/src/gantt-chart.min.js +1 -0
- package/lib/gantt/src/gantt-header.js +78 -0
- package/lib/gantt/src/gantt-header.min.js +1 -0
- package/lib/gantt/src/gantt-view.js +810 -0
- package/lib/gantt/src/gantt-view.min.js +1 -0
- package/lib/gantt/src/gantt.js +1997 -0
- package/lib/gantt/src/gantt.min.js +1 -0
- package/lib/gantt/src/grid-emits.js +8 -0
- package/lib/gantt/src/grid-emits.min.js +1 -0
- package/lib/gantt/src/grid-props.js +24 -0
- package/lib/gantt/src/grid-props.min.js +1 -0
- package/lib/gantt/src/props.js +13 -0
- package/lib/gantt/src/props.min.js +1 -0
- package/lib/gantt/src/table-emits.js +7 -0
- package/lib/gantt/src/table-emits.min.js +1 -0
- package/lib/gantt/src/table-props.js +306 -0
- package/lib/gantt/src/table-props.min.js +1 -0
- package/lib/gantt/src/util.js +19 -0
- package/lib/gantt/src/util.min.js +1 -0
- package/lib/gantt/style/index.js +1 -0
- package/lib/gantt/style/style.css +599 -0
- package/lib/gantt/style/style.min.css +1 -0
- package/lib/index.common.js +21 -0
- package/lib/index.umd.js +6731 -0
- package/lib/index.umd.min.js +1 -0
- package/lib/style.css +1 -0
- package/lib/style.min.css +1 -0
- package/lib/ui/index.js +69 -0
- package/lib/ui/index.min.js +1 -0
- package/lib/ui/src/comp.js +8 -0
- package/lib/ui/src/comp.min.js +1 -0
- package/lib/ui/src/dom.js +217 -0
- package/lib/ui/src/dom.min.js +1 -0
- package/lib/ui/src/log.js +10 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/ui/src/utils.js +59 -0
- package/lib/ui/src/utils.min.js +1 -0
- package/lib/ui/src/vn.js +1 -0
- package/lib/ui/src/vn.min.js +0 -0
- package/lib/ui/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/vxe-gantt/index.js +21 -0
- package/lib/vxe-gantt/index.min.js +1 -0
- package/lib/vxe-gantt/style/index.js +1 -0
- package/lib/vxe-gantt/style/style.css +599 -0
- package/lib/vxe-gantt/style/style.min.css +1 -0
- package/lib/vxe-ui/index.js +21 -0
- package/lib/vxe-ui/index.min.js +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/package.json +58 -21
- package/packages/components.ts +19 -0
- package/packages/gantt/index.ts +17 -0
- package/packages/gantt/src/emits.ts +7 -0
- package/packages/gantt/src/gantt-body.ts +119 -0
- package/packages/gantt/src/gantt-chart.ts +92 -0
- package/packages/gantt/src/gantt-header.ts +79 -0
- package/packages/gantt/src/gantt-view.ts +840 -0
- package/packages/gantt/src/gantt.ts +1869 -0
- package/packages/gantt/src/grid-emits.ts +19 -0
- package/packages/gantt/src/grid-props.ts +23 -0
- package/packages/gantt/src/props.ts +13 -0
- package/packages/gantt/src/table-emits.ts +109 -0
- package/packages/gantt/src/table-props.ts +304 -0
- package/packages/gantt/src/util.ts +15 -0
- package/packages/index.ts +4 -0
- package/packages/ui/index.ts +58 -0
- package/packages/ui/src/comp.ts +3 -0
- package/packages/ui/src/dom.ts +196 -0
- package/packages/ui/src/log.ts +6 -0
- package/packages/ui/src/utils.ts +50 -0
- package/packages/ui/src/vn.ts +0 -0
- package/styles/all.scss +3 -0
- package/styles/base.scss +2 -0
- package/styles/components/gantt-module/all.scss +1 -0
- package/styles/components/gantt-module/gantt-chart.scss +46 -0
- package/styles/components/gantt.scss +586 -0
- package/styles/components/ui.scss +0 -0
- package/styles/cssvar.scss +0 -0
- package/styles/helpers/baseMixin.scss +96 -0
- package/styles/helpers/baseVar.scss +4 -0
- package/styles/helpers/placement.scss +39 -0
- package/styles/theme/base.scss +7 -0
- package/styles/theme/dark.scss +7 -0
- package/styles/theme/light.scss +7 -0
- package/styles/variable.scss +0 -0
- package/types/all.d.ts +16 -0
- package/types/index.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.vxe-gantt-view--chart-wrapper{position:absolute;top:0;left:0;pointer-events:none}.vxe-gantt-view--chart-row{position:relative}.vxe-gantt-view--chart-bar{display:flex;flex-direction:row;position:absolute;width:100px;top:50%;left:0;color:#fff;transform:translateY(-50%);border-radius:var(--vxe-ui-base-border-radius);height:var(--vxe-ui-gantt-view-chart-bar-height);background-color:var(--vxe-ui-font-primary-lighten-color);pointer-events:all}.vxe-gantt-view--chart-bar:hover::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.1);border-radius:var(--vxe-ui-base-border-radius)}.vxe-gantt-view--chart-progress{flex-shrink:0;width:40px;text-align:left;border-radius:var(--vxe-ui-base-border-radius) 0 0 var(--vxe-ui-base-border-radius);background-color:var(--vxe-ui-font-primary-color)}.vxe-gantt-view--chart-content{flex-grow:1;text-align:right}.vxe-gantt{position:relative;overflow:auto;display:flex;flex-direction:column}.vxe-gantt.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-gantt.is--loading>.vxe-gantt-view .vxe-loading{background-color:transparent}.vxe-gantt.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-gantt.is--split-drag{cursor:col-resize}.vxe-gantt.is--split-drag .vxe-gantt--table-wrapper::after,.vxe-gantt.is--split-drag .vxe-gantt--view-wrapper::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:0 0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vxe-gantt .vxe-gantt--bottom-wrapper,.vxe-gantt .vxe-gantt--form-wrapper,.vxe-gantt .vxe-gantt--top-wrapper{position:relative}.vxe-gantt .vxe-gantt--gantt-container{position:relative;display:flex;flex-direction:row}.vxe-gantt .vxe-gantt--left-wrapper,.vxe-gantt .vxe-gantt--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-gantt .vxe-gantt--table-wrapper,.vxe-gantt .vxe-gantt--view-wrapper{display:none;position:relative;flex-grow:1;overflow:hidden}.vxe-gantt .vxe-gantt--view-split-bar{flex-shrink:0;cursor:col-resize;width:var(--vxe-ui-gantt-view-split-bar-width);background-color:var(--vxe-ui-gantt-view-split-bar-background-color)}.vxe-gantt.show--left .vxe-gantt--table-wrapper{display:block}.vxe-gantt.show--left.show--right .vxe-gantt--table-wrapper{flex-grow:unset;flex-shrink:0;width:30%}.vxe-gantt.show--right .vxe-gantt--view-wrapper{display:block}.vxe-gantt--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-gantt--layout-body-content-wrapper{flex-grow:1;overflow:hidden}.vxe-gantt--layout-aside-left-wrapper,.vxe-gantt--layout-footer-wrapper,.vxe-gantt--layout-header-wrapper{flex-shrink:0;overflow:auto}.vxe-gantt--border-line{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;pointer-events:none;border:var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color)}.vxe-gantt.border--default .vxe-gantt-view--header-wrapper,.vxe-gantt.border--full .vxe-gantt-view--header-wrapper,.vxe-gantt.border--outer .vxe-gantt-view--header-wrapper{background-color:var(--vxe-ui-table-header-background-color)}.vxe-gantt.border--full .vxe-gantt-view--body-column,.vxe-gantt.border--full .vxe-gantt-view--footer-column,.vxe-gantt.border--full .vxe-gantt-view--header-column{background-image:linear-gradient(var(--vxe-ui-table-border-color),var(--vxe-ui-table-border-color)),linear-gradient(var(--vxe-ui-table-border-color),var(--vxe-ui-table-border-color));background-repeat:no-repeat;background-size:var(--vxe-ui-table-border-width) 100%,100% var(--vxe-ui-table-border-width);background-position:right top,right bottom}.vxe-gantt.border--default .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--default .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--inner .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--inner .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--outer .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--outer .vxe-gantt-view--scroll-y-top-corner::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-width:0;border-style:solid;border-color:var(--vxe-ui-table-border-color)}.vxe-gantt.border--default .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--inner .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--outer .vxe-gantt-view--scroll-y-top-corner::before{border-bottom-width:var(--vxe-ui-table-border-width)}.vxe-gantt.border--default .vxe-gantt-view--scroll-y-bottom-corner,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-bottom-corner,.vxe-gantt.border--inner .vxe-gantt-view--scroll-y-bottom-corner,.vxe-gantt.border--outer .vxe-gantt-view--scroll-y-bottom-corner{border-top:var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color)}.vxe-gantt.border--default .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--full .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--inner .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--outer .vxe-gantt-view--scroll-x-wrapper::after{content:"";position:absolute;left:0;width:100%;height:100%;z-index:1;pointer-events:none}.vxe-gantt.border--default.sx-pos--top .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--full.sx-pos--top .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--inner.sx-pos--top .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--outer.sx-pos--top .vxe-gantt-view--scroll-x-wrapper::after{top:0;border-bottom:var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color)}.vxe-gantt.border--default.sx-pos--bottom .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--full.sx-pos--bottom .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--inner.sx-pos--bottom .vxe-gantt-view--scroll-x-wrapper::after,.vxe-gantt.border--outer.sx-pos--bottom .vxe-gantt-view--scroll-x-wrapper::after{bottom:0;height:calc(100% + var(--vxe-ui-table-border-width));border-top:var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color)}.vxe-gantt.border--default .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-top-corner::before{border-left-width:var(--vxe-ui-table-border-width);border-right-width:var(--vxe-ui-table-border-width)}.vxe-gantt.border--default .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-bottom-corner::before{border-left-width:var(--vxe-ui-table-border-width);border-right-width:var(--vxe-ui-table-border-width)}.vxe-gantt.border--default.sy-pos--right .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--default.sy-pos--right .vxe-gantt-view--scroll-y-top-corner::before,.vxe-gantt.border--full.sy-pos--right .vxe-gantt-view--scroll-y-bottom-corner::before,.vxe-gantt.border--full.sy-pos--right .vxe-gantt-view--scroll-y-top-corner::before{width:calc(100% + 1px);left:-1px}.vxe-gantt.border--default .vxe-gantt-view--scroll-y-wrapper::after,.vxe-gantt.border--full .vxe-gantt-view--scroll-y-wrapper::after{content:"";position:absolute;top:0;width:100%;height:100%;z-index:1;pointer-events:none}.vxe-gantt.border--default.sy-pos--left .vxe-gantt-view--scroll-y-wrapper::after,.vxe-gantt.border--full.sy-pos--left .vxe-gantt-view--scroll-y-wrapper::after{left:0;border-right:var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color)}.vxe-gantt.border--default.sy-pos--right .vxe-gantt-view--scroll-y-wrapper::after,.vxe-gantt.border--full.sy-pos--right .vxe-gantt-view--scroll-y-wrapper::after{right:0;width:calc(100% + var(--vxe-ui-table-border-width));border-left:var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color)}.vxe-gantt--view-split-bar{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vxe-gantt--view-split-bar-handle{position:absolute;top:0;left:0;width:100%;height:100%;z-index:13}.vxe-gantt--view-split-bar-btn-wrapper{display:flex;flex-direction:column;align-items:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:15;pointer-events:none}.vxe-gantt--view-split-bar-left-btn,.vxe-gantt--view-split-bar-right-btn{display:flex;flex-direction:row;align-items:center;justify-content:center;font-size:.5em;height:var(--vxe-ui-gantt-view-split-bar-height);width:var(--vxe-ui-gantt-view-split-bar-width);color:var(--vxe-ui-layout-background-color);border-radius:var(--vxe-ui-base-border-radius);background-color:var(--vxe-ui-gantt-view-handle-background-color);border:1px solid var(--vxe-ui-input-border-color);pointer-events:all;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:all .1s ease-in-out}.vxe-gantt--view-split-bar-left-btn:hover,.vxe-gantt--view-split-bar-right-btn:hover{background-color:var(--vxe-ui-font-primary-lighten-color)}.vxe-gantt--view-split-bar-left-btn:active,.vxe-gantt--view-split-bar-right-btn:active{transform:scale(.9)}.vxe-gantt--view-split-bar-right-btn{margin-top:1em}.vxe-gantt--resizable-split-tip{display:none;position:absolute;top:0;left:0;width:1px;height:100%;z-index:18;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:col-resize}.vxe-gantt--resizable-split-tip:before{content:"";display:block;height:100%;background-color:var(--vxe-ui-table-resizable-drag-line-color)}.vxe-gantt--resizable-split-tip-number{position:absolute;top:0;left:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.vxe-gantt--resizable-split-number-left,.vxe-gantt--resizable-split-number-right{position:absolute;padding:.25em .25em;font-size:12px;border-radius:var(--vxe-ui-border-radius);white-space:nowrap;color:#fff;background-color:var(--vxe-ui-table-resizable-drag-line-color)}.vxe-gantt--resizable-split-number-left{right:0}.vxe-gantt--resizable-split-number-right{left:1px}.vxe-gantt.is--loading>.vxe-gantt-view--scroll-x-virtual{visibility:hidden}.vxe-gantt.is--loading>.vxe-gantt-view--layout-wrapper>.vxe-gantt-view--scroll-y-virtual{visibility:hidden}.vxe-gantt .vxe-gantt-view--scroll-x-virtual{height:0}.vxe-gantt .vxe-gantt-view--scroll-y-virtual{width:0}.vxe-gantt .vxe-gantt-view--scroll-x-virtual,.vxe-gantt .vxe-gantt-view--scroll-y-virtual{visibility:hidden;position:relative;flex-shrink:0;z-index:7}.vxe-gantt .vxe-gantt-view--scroll-x-handle,.vxe-gantt .vxe-gantt-view--scroll-x-left-corner,.vxe-gantt .vxe-gantt-view--scroll-x-right-corner,.vxe-gantt .vxe-gantt-view--scroll-x-wrapper,.vxe-gantt .vxe-gantt-view--scroll-y-bottom-corner,.vxe-gantt .vxe-gantt-view--scroll-y-handle,.vxe-gantt .vxe-gantt-view--scroll-y-top-corner,.vxe-gantt .vxe-gantt-view--scroll-y-wrapper{position:absolute}.vxe-gantt .vxe-gantt-view--scroll-x-handle,.vxe-gantt .vxe-gantt-view--scroll-x-wrapper{width:100%;left:0;bottom:0}.vxe-gantt .vxe-gantt-view--scroll-x-handle{overflow-y:hidden;overflow-x:scroll;height:18px}.vxe-gantt .vxe-gantt-view--scroll-x-wrapper{height:100%}.vxe-gantt .vxe-gantt-view--scroll-y-handle,.vxe-gantt .vxe-gantt-view--scroll-y-wrapper{width:100%;height:100%;right:0;top:0}.vxe-gantt .vxe-gantt-view--scroll-y-handle{overflow-y:scroll;overflow-x:hidden;width:18px;height:100%}.vxe-gantt .vxe-gantt-view--scroll-x-space{height:1px}.vxe-gantt .vxe-gantt-view--scroll-y-space{width:1px}.vxe-gantt .vxe-gantt-view--scroll-x-left-corner,.vxe-gantt .vxe-gantt-view--scroll-x-right-corner,.vxe-gantt .vxe-gantt-view--scroll-y-bottom-corner,.vxe-gantt .vxe-gantt-view--scroll-y-top-corner{display:none;position:absolute}.vxe-gantt .vxe-gantt-view--scroll-x-left-corner,.vxe-gantt .vxe-gantt-view--scroll-x-right-corner{bottom:0;width:0;height:100%}.vxe-gantt .vxe-gantt-view--scroll-x-left-corner::before,.vxe-gantt .vxe-gantt-view--scroll-x-right-corner::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-width:var(--vxe-ui-table-border-width);border-style:solid;border-color:var(--vxe-ui-table-border-color)}.vxe-gantt .vxe-gantt-view--scroll-x-left-corner{left:0}.vxe-gantt .vxe-gantt-view--scroll-x-right-corner{right:0}.vxe-gantt.sy-pos--right .vxe-gantt-view--scroll-x-right-corner{right:1px}.vxe-gantt.sy-pos--right .vxe-gantt-view--scroll-x-right-corner::before{border-right:0}.vxe-gantt.sx-pos--bottom .vxe-gantt-view--scroll-x-right-corner{bottom:1px}.vxe-gantt.sx-pos--bottom .vxe-gantt-view--scroll-x-right-corner::before{border-bottom:0}.vxe-gantt .vxe-gantt-view--scroll-y-top-corner{background-color:var(--vxe-ui-table-header-background-color)}.vxe-gantt .vxe-gantt-view--scroll-y-bottom-corner,.vxe-gantt .vxe-gantt-view--scroll-y-top-corner{top:0;right:0;width:100%;height:0}.vxe-gantt .vxe-gantt-view--scroll-y-bottom-corner{margin-top:-1px}.vxe-gantt-view--layout-wrapper{display:flex;flex-direction:row;background-color:var(--vxe-ui-layout-background-color)}.vxe-gantt-view--viewport-wrapper{position:relative;overflow:hidden;flex-grow:1}.vxe-gantt-view--render-vars{width:0;height:0;overflow:hidden}.vxe-gantt-view--column-info{width:var(--vxe-ui-gantt-view-column-width)}.vxe-gantt-view{flex-grow:1;overflow:hidden}.vxe-gantt-view .vxe-body--x-space{width:100%;height:1px;margin-bottom:-1px}.vxe-gantt-view .vxe-body--y-space{width:0;float:left}.vxe-gantt-view--header-table{height:100%}.vxe-gantt-view--body-table,.vxe-gantt-view--header-table{border:0;border-spacing:0;border-collapse:separate;table-layout:fixed}.vxe-gantt-view--body-table col,.vxe-gantt-view--header-table col{width:var(--vxe-ui-gantt-view-column-width)}.vxe-gantt-view--body-wrapper,.vxe-gantt-view--header-wrapper{overflow:hidden}.vxe-gantt-view--header-inner-wrapper{overflow-y:hidden;overflow-x:scroll}.vxe-gantt-view--body-inner-wrapper{overflow-y:auto;overflow-x:auto}.vxe-gantt-view--body-inner-wrapper,.vxe-gantt-view--header-inner-wrapper{position:relative;width:100%;height:100%;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.vxe-gantt-view--header-column{text-align:center;font-size:1em}.vxe-gantt-view--body-column{height:48px}.vxe-gantt-view--body-column,.vxe-gantt-view--footer-column,.vxe-gantt-view--header-column{position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-gantt-view.mode--day .vxe-gantt-view--header-column{height:50%}.vxe-gantt{font-size:var(--vxe-ui-font-size-default)}.vxe-gantt.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-gantt.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-gantt.size--mini{font-size:var(--vxe-ui-font-size-mini)}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _ui = _interopRequireWildcard(require("../ui"));
|
|
9
|
+
Object.keys(_ui).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
12
|
+
if (key in exports && exports[key] === _ui[key]) return;
|
|
13
|
+
Object.defineProperty(exports, key, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _ui[key];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
|
+
var _default = exports.default = _ui.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={},_ui=(exports.default=void 0,_interopRequireWildcard(require("../ui")));function _interopRequireWildcard(e,t){var i,n;return"function"==typeof WeakMap&&(i=new WeakMap,n=new WeakMap),(_interopRequireWildcard=function(t,e){if(!e&&t&&t.__esModule)return t;var r,o,u={__proto__:null,default:t};if(null!==t&&("object"==typeof t||"function"==typeof t)){if(r=e?n:i){if(r.has(t))return r.get(t);r.set(t,u)}for(let e in t)"default"!==e&&{}.hasOwnProperty.call(t,e)&&((o=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,e))&&(o.get||o.set)?r(u,e,o):u[e]=t[e])}return u})(e,t)}Object.keys(_ui).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_ui[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _ui[e]}})});var _default=exports.default=_ui.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./style.css')
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,47 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-gantt",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "A Gantt chart based on Vxe UI and for use on PC systems",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"update": "npm install --legacy-peer-deps",
|
|
7
|
+
"serve": "vue-cli-service serve",
|
|
8
|
+
"lib:pack": "vue-cli-service build --target lib --name index --dest lib_temp index.ts",
|
|
9
|
+
"lib:modules": "gulp build",
|
|
10
|
+
"lib": "npm run lib:pack && npm run lib:modules"
|
|
11
|
+
},
|
|
5
12
|
"files": [
|
|
6
13
|
"lib",
|
|
7
|
-
"
|
|
14
|
+
"es",
|
|
15
|
+
"src",
|
|
16
|
+
"helper",
|
|
17
|
+
"types",
|
|
18
|
+
"styles",
|
|
19
|
+
"packages"
|
|
8
20
|
],
|
|
9
21
|
"main": "lib/index.common.js",
|
|
10
22
|
"module": "es/index.esm.js",
|
|
11
23
|
"unpkg": "lib/index.umd.js",
|
|
12
24
|
"jsdelivr": "lib/index.umd.js",
|
|
25
|
+
"style": "lib/style.css",
|
|
13
26
|
"typings": "types/index.d.ts",
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"vxe-pc-ui": "^4.8.0",
|
|
29
|
+
"vxe-table": "^4.15.0"
|
|
30
|
+
},
|
|
14
31
|
"devDependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"eslint-
|
|
24
|
-
"eslint-
|
|
25
|
-
"
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
33
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
34
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
|
35
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
36
|
+
"@vue/cli-plugin-router": "~5.0.0",
|
|
37
|
+
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
38
|
+
"@vue/cli-plugin-vuex": "~5.0.0",
|
|
39
|
+
"@vue/cli-service": "~5.0.0",
|
|
40
|
+
"@vue/eslint-config-standard": "^6.1.0",
|
|
41
|
+
"@vue/eslint-config-typescript": "^9.1.0",
|
|
42
|
+
"core-js": "^3.8.3",
|
|
43
|
+
"del": "^6.1.1",
|
|
44
|
+
"eslint": "^7.32.0",
|
|
45
|
+
"eslint-plugin-import": "^2.29.1",
|
|
46
|
+
"eslint-plugin-node": "^11.1.0",
|
|
47
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
48
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
26
49
|
"gulp": "^4.0.2",
|
|
27
|
-
"gulp-autoprefixer": "^
|
|
50
|
+
"gulp-autoprefixer": "^8.0.0",
|
|
28
51
|
"gulp-babel": "^8.0.0",
|
|
29
|
-
"gulp-clean-css": "^4.
|
|
52
|
+
"gulp-clean-css": "^4.3.0",
|
|
30
53
|
"gulp-concat": "^2.6.1",
|
|
31
54
|
"gulp-rename": "^2.0.0",
|
|
32
|
-
"gulp-replace": "^1.
|
|
33
|
-
"gulp-sass": "^
|
|
55
|
+
"gulp-replace": "^1.1.4",
|
|
56
|
+
"gulp-sass": "^5.1.0",
|
|
57
|
+
"gulp-sourcemaps": "^3.0.0",
|
|
58
|
+
"gulp-typescript": "^5.0.1",
|
|
34
59
|
"gulp-uglify": "^3.0.2",
|
|
35
|
-
"
|
|
60
|
+
"postcss": "^8.4.38",
|
|
61
|
+
"sass": "^1.80.4",
|
|
62
|
+
"sass-loader": "^14.2.1",
|
|
63
|
+
"typescript": "~4.9.5",
|
|
64
|
+
"vue": "3.4.27",
|
|
65
|
+
"vue-router": "~4.5.1",
|
|
66
|
+
"vxe-pc-ui": "^4.8.13",
|
|
67
|
+
"vxe-table": "^4.15.6"
|
|
68
|
+
},
|
|
69
|
+
"vetur": {
|
|
70
|
+
"tags": "helper/vetur/tags.json",
|
|
71
|
+
"attributes": "helper/vetur/attributes.json"
|
|
36
72
|
},
|
|
37
73
|
"repository": {
|
|
38
74
|
"type": "git",
|
|
39
75
|
"url": "git+https://github.com/x-extends/vxe-gantt.git"
|
|
40
76
|
},
|
|
41
77
|
"keywords": [
|
|
42
|
-
"
|
|
78
|
+
"gantt",
|
|
43
79
|
"table",
|
|
44
|
-
"vxe"
|
|
80
|
+
"vxe-ui",
|
|
81
|
+
"vxe-gantt"
|
|
45
82
|
],
|
|
46
83
|
"author": {
|
|
47
84
|
"name": "Xu Liangzhan",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import { setConfig, VxeGlobalConfig } from '@vxe-ui/core'
|
|
3
|
+
|
|
4
|
+
import VxeGantt from './gantt'
|
|
5
|
+
|
|
6
|
+
const components = [
|
|
7
|
+
VxeGantt
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
export function install (app: App, options?: VxeGlobalConfig) {
|
|
11
|
+
setConfig(options)
|
|
12
|
+
|
|
13
|
+
components.forEach(component => app.use(component))
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export * from './ui'
|
|
17
|
+
|
|
18
|
+
// Components
|
|
19
|
+
export * from './gantt'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import { VxeUI } from '@vxe-ui/core'
|
|
3
|
+
import VxeGanttComponent from './src/gantt'
|
|
4
|
+
|
|
5
|
+
export const VxeGantt = Object.assign({}, VxeGanttComponent, {
|
|
6
|
+
install (app: App) {
|
|
7
|
+
app.component(VxeGanttComponent.name as string, VxeGanttComponent)
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
if (VxeUI.dynamicApp) {
|
|
12
|
+
VxeUI.dynamicApp.use(VxeGantt)
|
|
13
|
+
}
|
|
14
|
+
VxeUI.component(VxeGanttComponent)
|
|
15
|
+
|
|
16
|
+
export const Gantt = VxeGantt
|
|
17
|
+
export default VxeGantt
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { h, inject, VNode, ref, Ref, onMounted, onUnmounted } from 'vue'
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
+
import { getCellRestHeight } from './util'
|
|
4
|
+
import GanttViewChartComponent from './gantt-chart'
|
|
5
|
+
|
|
6
|
+
import type { VxeTablePropTypes } from 'vxe-table'
|
|
7
|
+
import type { VxeGanttViewConstructor, VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types'
|
|
8
|
+
|
|
9
|
+
export default defineVxeComponent({
|
|
10
|
+
name: 'VxeGanttViewBody',
|
|
11
|
+
setup () {
|
|
12
|
+
const $xeGantt = inject('$xeGantt', {} as (VxeGanttConstructor & VxeGanttPrivateMethods))
|
|
13
|
+
const $xeGanttView = inject('$xeGanttView', {} as VxeGanttViewConstructor & VxeGanttViewPrivateMethods)
|
|
14
|
+
|
|
15
|
+
const { reactData, internalData } = $xeGanttView
|
|
16
|
+
const { refTable } = $xeGantt.getRefMaps()
|
|
17
|
+
|
|
18
|
+
const refElem = ref() as Ref<HTMLDivElement>
|
|
19
|
+
const refBodyScroll = ref() as Ref<HTMLDivElement>
|
|
20
|
+
const refBodyTable = ref() as Ref<HTMLTableElement>
|
|
21
|
+
const refBodyXSpace = ref() as Ref<HTMLDivElement>
|
|
22
|
+
const refBodyYSpace = ref() as Ref<HTMLDivElement>
|
|
23
|
+
|
|
24
|
+
const renderRows = () => {
|
|
25
|
+
const $xeTable = refTable.value
|
|
26
|
+
|
|
27
|
+
const fullAllDataRowIdData = $xeTable ? $xeTable.internalData.fullAllDataRowIdData : {}
|
|
28
|
+
let cellOpts: VxeTablePropTypes.CellConfig = {}
|
|
29
|
+
let rowOpts : VxeTablePropTypes.RowConfig = {}
|
|
30
|
+
let defaultRowHeight = 0
|
|
31
|
+
if ($xeTable) {
|
|
32
|
+
const { computeCellOpts, computeRowOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps()
|
|
33
|
+
cellOpts = computeCellOpts.value
|
|
34
|
+
rowOpts = computeRowOpts.value
|
|
35
|
+
defaultRowHeight = computeDefaultRowHeight.value
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const { tableData, tableColumn } = reactData
|
|
39
|
+
|
|
40
|
+
const trVNs:VNode[] = []
|
|
41
|
+
tableData.forEach((row, rIndex) => {
|
|
42
|
+
const rowid = $xeTable ? $xeTable.getRowid(row) : ''
|
|
43
|
+
const rowRest = fullAllDataRowIdData[rowid] || {}
|
|
44
|
+
const cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
|
|
45
|
+
trVNs.push(
|
|
46
|
+
h('tr', {
|
|
47
|
+
key: rIndex
|
|
48
|
+
}, tableColumn.map((column, cIndex) => {
|
|
49
|
+
return h('td', {
|
|
50
|
+
key: cIndex,
|
|
51
|
+
class: 'vxe-gantt-view--body-column',
|
|
52
|
+
style: {
|
|
53
|
+
height: `${cellHeight}px`
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}))
|
|
57
|
+
)
|
|
58
|
+
})
|
|
59
|
+
return trVNs
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const renderVN = () => {
|
|
63
|
+
const { tableColumn } = reactData
|
|
64
|
+
return h('div', {
|
|
65
|
+
ref: refElem,
|
|
66
|
+
class: 'vxe-gantt-view--body-wrapper'
|
|
67
|
+
}, [
|
|
68
|
+
h('div', {
|
|
69
|
+
ref: refBodyScroll,
|
|
70
|
+
class: 'vxe-gantt-view--body-inner-wrapper',
|
|
71
|
+
onScroll: $xeGanttView.triggerBodyScrollEvent
|
|
72
|
+
}, [
|
|
73
|
+
h('div', {
|
|
74
|
+
ref: refBodyXSpace,
|
|
75
|
+
class: 'vxe-body--x-space'
|
|
76
|
+
}),
|
|
77
|
+
h('div', {
|
|
78
|
+
ref: refBodyYSpace,
|
|
79
|
+
class: 'vxe-body--y-space'
|
|
80
|
+
}),
|
|
81
|
+
h('table', {
|
|
82
|
+
ref: refBodyTable,
|
|
83
|
+
class: 'vxe-gantt-view--body-table'
|
|
84
|
+
}, [
|
|
85
|
+
h('colgroup', {}, tableColumn.map((column, cIndex) => {
|
|
86
|
+
return h('col', {
|
|
87
|
+
key: cIndex
|
|
88
|
+
})
|
|
89
|
+
})),
|
|
90
|
+
h('tbody', {}, renderRows())
|
|
91
|
+
]),
|
|
92
|
+
h(GanttViewChartComponent)
|
|
93
|
+
])
|
|
94
|
+
])
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
onMounted(() => {
|
|
98
|
+
const { elemStore } = internalData
|
|
99
|
+
const prefix = 'main-body-'
|
|
100
|
+
elemStore[`${prefix}wrapper`] = refElem
|
|
101
|
+
elemStore[`${prefix}scroll`] = refBodyScroll
|
|
102
|
+
elemStore[`${prefix}table`] = refBodyTable
|
|
103
|
+
elemStore[`${prefix}xSpace`] = refBodyXSpace
|
|
104
|
+
elemStore[`${prefix}ySpace`] = refBodyYSpace
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
onUnmounted(() => {
|
|
108
|
+
const { elemStore } = internalData
|
|
109
|
+
const prefix = 'main-body-'
|
|
110
|
+
elemStore[`${prefix}wrapper`] = null
|
|
111
|
+
elemStore[`${prefix}scroll`] = null
|
|
112
|
+
elemStore[`${prefix}table`] = null
|
|
113
|
+
elemStore[`${prefix}xSpace`] = null
|
|
114
|
+
elemStore[`${prefix}ySpace`] = null
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
return renderVN
|
|
118
|
+
}
|
|
119
|
+
})
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { h, inject, VNode, ref, Ref, onMounted, onUnmounted } from 'vue'
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
+
import XEUtils from 'xe-utils'
|
|
4
|
+
import { getCellRestHeight } from './util'
|
|
5
|
+
|
|
6
|
+
import type { VxeTablePropTypes } from 'vxe-table'
|
|
7
|
+
import type { VxeGanttViewConstructor, VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types'
|
|
8
|
+
|
|
9
|
+
export default defineVxeComponent({
|
|
10
|
+
name: 'VxeGanttViewChart',
|
|
11
|
+
setup () {
|
|
12
|
+
const $xeGantt = inject('$xeGantt', {} as (VxeGanttConstructor & VxeGanttPrivateMethods))
|
|
13
|
+
const $xeGanttView = inject('$xeGanttView', {} as VxeGanttViewConstructor & VxeGanttViewPrivateMethods)
|
|
14
|
+
|
|
15
|
+
const { reactData, internalData } = $xeGanttView
|
|
16
|
+
const { refTable } = $xeGantt.getRefMaps()
|
|
17
|
+
const { computeProgressField } = $xeGantt.getComputeMaps()
|
|
18
|
+
|
|
19
|
+
const refElem = ref() as Ref<HTMLDivElement>
|
|
20
|
+
|
|
21
|
+
const renderVN = () => {
|
|
22
|
+
const $xeTable = refTable.value
|
|
23
|
+
|
|
24
|
+
const fullAllDataRowIdData = $xeTable ? $xeTable.internalData.fullAllDataRowIdData : {}
|
|
25
|
+
let cellOpts: VxeTablePropTypes.CellConfig = {}
|
|
26
|
+
let rowOpts : VxeTablePropTypes.RowConfig = {}
|
|
27
|
+
let defaultRowHeight = 0
|
|
28
|
+
if ($xeTable) {
|
|
29
|
+
const { computeCellOpts, computeRowOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps()
|
|
30
|
+
cellOpts = computeCellOpts.value
|
|
31
|
+
rowOpts = computeRowOpts.value
|
|
32
|
+
defaultRowHeight = computeDefaultRowHeight.value
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const { tableData } = reactData
|
|
36
|
+
const progressField = computeProgressField.value
|
|
37
|
+
|
|
38
|
+
const trVNs:VNode[] = []
|
|
39
|
+
tableData.forEach((row, rIndex) => {
|
|
40
|
+
const rowid = $xeTable ? $xeTable.getRowid(row) : ''
|
|
41
|
+
const rowRest = fullAllDataRowIdData[rowid] || {}
|
|
42
|
+
const cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
|
|
43
|
+
const progressValue = XEUtils.get(row, progressField)
|
|
44
|
+
trVNs.push(
|
|
45
|
+
h('div', {
|
|
46
|
+
key: rIndex,
|
|
47
|
+
rowid,
|
|
48
|
+
class: 'vxe-gantt-view--chart-row',
|
|
49
|
+
style: {
|
|
50
|
+
height: `${cellHeight}px`
|
|
51
|
+
}
|
|
52
|
+
}, [
|
|
53
|
+
h('div', {
|
|
54
|
+
class: 'vxe-gantt-view--chart-bar',
|
|
55
|
+
rowid
|
|
56
|
+
}, [
|
|
57
|
+
h('div', {
|
|
58
|
+
class: 'vxe-gantt-view--chart-progress',
|
|
59
|
+
style: progressValue
|
|
60
|
+
? {
|
|
61
|
+
width: `${progressValue}%`
|
|
62
|
+
}
|
|
63
|
+
: undefined
|
|
64
|
+
}),
|
|
65
|
+
h('div', {
|
|
66
|
+
class: 'vxe-gantt-view--chart-content'
|
|
67
|
+
})
|
|
68
|
+
])
|
|
69
|
+
])
|
|
70
|
+
)
|
|
71
|
+
})
|
|
72
|
+
return h('div', {
|
|
73
|
+
ref: refElem,
|
|
74
|
+
class: 'vxe-gantt-view--chart-wrapper'
|
|
75
|
+
}, trVNs)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
const { elemStore } = internalData
|
|
80
|
+
const prefix = 'main-chart-'
|
|
81
|
+
elemStore[`${prefix}wrapper`] = refElem
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
onUnmounted(() => {
|
|
85
|
+
const { elemStore } = internalData
|
|
86
|
+
const prefix = 'main-chart-'
|
|
87
|
+
elemStore[`${prefix}wrapper`] = null
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
return renderVN
|
|
91
|
+
}
|
|
92
|
+
})
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { h, inject, ref, Ref, onMounted, onUnmounted } from 'vue'
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
+
|
|
4
|
+
import type { VxeGanttViewConstructor, VxeGanttViewPrivateMethods } from '../../../types'
|
|
5
|
+
|
|
6
|
+
export default defineVxeComponent({
|
|
7
|
+
name: 'VxeGanttView',
|
|
8
|
+
setup () {
|
|
9
|
+
const $xeGanttView = inject('$xeGanttView', {} as VxeGanttViewConstructor & VxeGanttViewPrivateMethods)
|
|
10
|
+
|
|
11
|
+
const { reactData, internalData } = $xeGanttView
|
|
12
|
+
|
|
13
|
+
const refElem = ref() as Ref<HTMLDivElement>
|
|
14
|
+
const refHeaderScroll = ref() as Ref<HTMLDivElement>
|
|
15
|
+
const refHeaderTable = ref() as Ref<HTMLTableElement>
|
|
16
|
+
const refHeaderXSpace = ref() as Ref<HTMLDivElement>
|
|
17
|
+
|
|
18
|
+
const renderVN = () => {
|
|
19
|
+
const { tableColumn, headerGroups } = reactData
|
|
20
|
+
return h('div', {
|
|
21
|
+
ref: refElem,
|
|
22
|
+
class: 'vxe-gantt-view--header-wrapper'
|
|
23
|
+
}, [
|
|
24
|
+
h('div', {
|
|
25
|
+
ref: refHeaderScroll,
|
|
26
|
+
class: 'vxe-gantt-view--header-inner-wrapper',
|
|
27
|
+
onScroll: $xeGanttView.triggerHeaderScrollEvent
|
|
28
|
+
}, [
|
|
29
|
+
h('div', {
|
|
30
|
+
ref: refHeaderXSpace,
|
|
31
|
+
class: 'vxe-body--x-space'
|
|
32
|
+
}),
|
|
33
|
+
h('table', {
|
|
34
|
+
ref: refHeaderTable,
|
|
35
|
+
class: 'vxe-gantt-view--header-table'
|
|
36
|
+
}, [
|
|
37
|
+
h('colgroup', {}, tableColumn.map((column, cIndex) => {
|
|
38
|
+
return h('col', {
|
|
39
|
+
key: cIndex
|
|
40
|
+
})
|
|
41
|
+
})),
|
|
42
|
+
h('thead', {}, headerGroups.map((cols, rIndex) => {
|
|
43
|
+
return h('tr', {
|
|
44
|
+
key: rIndex
|
|
45
|
+
}, cols.map((column, cIndex) => {
|
|
46
|
+
return h('th', {
|
|
47
|
+
key: cIndex,
|
|
48
|
+
class: 'vxe-gantt-view--header-column',
|
|
49
|
+
colspan: column.children ? column.children.length : null,
|
|
50
|
+
title: `${column.field}`
|
|
51
|
+
}, column.title)
|
|
52
|
+
}))
|
|
53
|
+
}))
|
|
54
|
+
])
|
|
55
|
+
])
|
|
56
|
+
])
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
onMounted(() => {
|
|
60
|
+
const { elemStore } = internalData
|
|
61
|
+
const prefix = 'main-header-'
|
|
62
|
+
elemStore[`${prefix}wrapper`] = refElem
|
|
63
|
+
elemStore[`${prefix}scroll`] = refHeaderScroll
|
|
64
|
+
elemStore[`${prefix}table`] = refHeaderTable
|
|
65
|
+
elemStore[`${prefix}xSpace`] = refHeaderXSpace
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
onUnmounted(() => {
|
|
69
|
+
const { elemStore } = internalData
|
|
70
|
+
const prefix = 'main-header-'
|
|
71
|
+
elemStore[`${prefix}wrapper`] = null
|
|
72
|
+
elemStore[`${prefix}scroll`] = null
|
|
73
|
+
elemStore[`${prefix}table`] = null
|
|
74
|
+
elemStore[`${prefix}xSpace`] = null
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
return renderVN
|
|
78
|
+
}
|
|
79
|
+
})
|