@dinert/element-plus 1.1.38 → 1.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/element-plus.umd.js +1 -1
- package/dist/element-plus.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/es/packages/assets/scss/dinert-form.scss +3 -4
- package/es/packages/components/form/src/index.mjs +32 -30
- package/es/packages/components/form/src/index.mjs.map +1 -1
- package/es/packages/components/form/utils/index.mjs +40 -39
- package/es/packages/components/form/utils/index.mjs.map +1 -1
- package/es/src/components/form/types/index.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/src/components/form/types/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tree-item{width:100%}.tree-item .el-tooltip__trigger{display:block;overflow:hidden;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap}.dinert-popover-classify{overflow-y:auto;margin:0;padding:0;list-style:none}.dinert-popover-classify li{margin:0;padding:0;list-style:none}.dinert-popover-classify li:first-child{border-bottom:1px solid var(--el-fill-color);line-height:32px}.dinert-popover-classify>.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__expand-icon.is-leaf{display:none}.dinert-popover-classify .el-tree-node__children{overflow:unset}.dinert-table{display:flex;padding:20px;height:100%;border-radius:var(--el-bg-radius);background-color:var(--el-bg-color);flex-direction:column;box-sizing:border-box}.dinert-table .dinert-table-header{display:flex;justify-content:space-between;margin-bottom:12px;text-align:right}.dinert-table .dinert-table-header .dinert-popover-classify li .el-checkbox{width:100%;line-height:24px;height:24px}.dinert-table .dinert-table-header .dinert-table-header-left{text-align:left}.dinert-table .dinert-table-body{flex:1;height:0}.dinert-table .dinert-table-body .el-table .el-popper{max-width:50%}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell.setting .setting-icon{display:inline-block}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell .setting-icon{vertical-align:-1px;margin-left:4px;cursor:pointer}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item .cell-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .el-dropdown{vertical-align:-2px}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell{display:flex;justify-content:center;align-items:center}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button{margin-right:8px;margin-left:0}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button:focus-visible{outline:none}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon{font-size:14px;color:var(--el-color-primary);cursor:pointer;flex:1}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon.delete{color:var(--el-color-danger)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon{width:16px;height:16px;vertical-align:-2px;flex:1;color:var(--el-color-primary);cursor:pointer;fill:var(--el-color-primary)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon.f-14{width:14px;height:14px}.dinert-table .dinert-table-footer{display:flex;margin-top:16px}.dinert-table .dinert-table-footer .el-pagination{display:flex;flex-wrap:wrap}.el-form.dinert-form{display:flex;overflow:hidden;padding:0;min-height:50px;border-radius:4px;background-color:var(--el-bg-color);transition:all .3s cubic-bezier(.645,.045,.355,1);box-sizing:content-box}.el-form.dinert-form.near.packUp{max-height:50px}.el-form.dinert-form.near .dinert-form-left .el-col{display:flex;align-items:center;margin-right:10px;width:auto;max-width:unset;flex:unset}.el-form.dinert-form.near .dinert-form-left .el-col .label-text>div>.el-cascader{width:210px}.el-form.dinert-form.near .dinert-form-right.isArrow{width:230px;flex:0 0 230px}.el-form.dinert-form.dialog .dinert-form-left{flex:1}.el-form.dinert-form.dialog .dinert-form-left .el-col .label-text>div{width:100%}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text{overflow:unset}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider{padding-left:12px}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider .el-input-number{width:auto}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-radio.is-bordered,.el-form.dinert-form .dinert-form-left .el-col .label-text .el-checkbox.is-bordered{margin-right:16px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--daterange{width:260px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-input{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-select{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--datetimerange{width:400px}.el-form.dinert-form .dinert-form-right{display:flex;margin-left:24px}.el-form.dinert-form .dinert-form-right .dinert-form-right-operation{padding:0}.el-form.dinert-form .dinert-form-right .dinert-form-right-operation.el-button.is-text{padding-right:0;background-color:unset}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top){position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top).show-label .label-text{overflow:unset;text-overflow:unset;white-space:unset}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top).label-wrap .el-form-item__label{height:auto}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top).label-wrap .el-form-item__label .label-text{display:inline;text-align:left;white-space:normal}.el-form.dinert-form div.el-form-item.el-form-item--label-top{margin-right:0}.el-form.dinert-form div.el-form-item.el-form-item--label-top .el-form-item__label{display:inline-flex}.el-form.dinert-form div.el-form-item.el-form-item--label-top .dinert-tooltip.el-tooltip__trigger .label-text{white-space:normal}.el-form.dinert-form .el-form-item__content{flex:1;margin-left:0}.el-form.dinert-form .el-form-item__content .el-tooltip__trigger:not(.el-slider__button){width:100%}.el-form.dinert-form .el-form-item__content .el-input-number{width:100%}.el-form.dinert-form .el-form-item__content .el-input-number .el-input__inner{text-align:center}.el-form.dinert-form .el-form-item__content .el-textarea .el-textarea__inner{height:80px}.el-form.dinert-form .el-form-item__content .el-date-editor,.el-form.dinert-form .el-form-item__content .el-date-editor .el-input__wrapper{width:100%;box-sizing:border-box}.el-form.dinert-form .el-form-item__content .el-input__inner{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label{overflow:hidden;width:80px;max-width:80px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip,.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip .label-text{display:inline}.dinert-table-page{display:flex;flex-direction:column;box-sizing:border-box}.dinert-table-page.text-wrap .el-table__header .cell{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell,.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell>.cell-item,.dinert-table-page.text-wrap .el-table__body .el-table__row td .cell.el-tooltip>.cell-item{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row .el-button>span{text-align:left}.dinert-table-page.text-wrap .el-table__body .el-table__row span{white-space:pre-wrap;line-height:23px}.dinert-table-page.header-center .el-table__header .el-table__cell{text-align:center}.dinert-table-page.near .dinert-form-left{flex:unset}.dinert-table-page.near .dinert-form-left .el-col{margin-right:16px;width:auto;max-width:unset;flex:unset}.dinert-table-page.near .dinert-table-footer .el-pagination{margin-left:auto}.dinert-table-page.maxWidthAuto .el-form .el-form-item .el-form-item__label{max-width:unset}.dinert-table-page .el-form.dinert-form{padding:20px 20px 0;max-height:300px}.dinert-table-page .dinert-table{padding-top:0;height:0;flex:1}.dinert-tooltip.el-tooltip__trigger{display:block;height:100%}.dinert-tooltip.el-tooltip__trigger .text-tooltip{position:absolute;left:-999999999999px}.dinert-tooltip.el-tooltip__trigger .label-text{display:block;overflow:hidden;width:100%;height:100%;text-overflow:ellipsis;white-space:nowrap}.dinert-overlay.el-overlay.autoHeight .el-dialog{height:80%}.dinert-overlay.el-overlay.notPadding .el-dialog__body{padding:0}.dinert-overlay.el-overlay .el-dialog{top:10%;display:flex;min-width:310px;max-height:80%;border-radius:4px;flex-direction:column;--el-dialog-margin-top: 0;--el-dialog-padding-primary: 0}.dinert-overlay.el-overlay .el-dialog.is-fullscreen{top:unset;max-height:unset}.dinert-overlay.el-overlay .el-dialog__headerbtn{right:0;width:40px;height:100%;color:var(--el-color-info)}.dinert-overlay.el-overlay .el-dialog .full{position:absolute;top:-1.5px;right:34px;display:flex;justify-content:center;align-items:center;width:40px;height:100%;font-size:var(--el-message-close-size, 16px);border:none;color:var(--el-color-info);background:transparent;outline:none;cursor:pointer}.dinert-overlay.el-overlay .el-dialog .full:hover .icon{fill:var(--el-color-primary);color:var(--el-color-primary)}.dinert-overlay.el-overlay .el-dialog .full .icon{overflow:hidden;width:14px;height:14px;vertical-align:-.15em;fill:var(--el-color-info)}.dinert-overlay.el-overlay .el-dialog__header{position:relative;margin-right:0;padding:16px 24px;height:54px;box-sizing:border-box}.dinert-overlay.el-overlay .el-dialog__body{display:flex;overflow-y:auto;padding:24px;flex-direction:column;flex:1;word-wrap:break-word}.dinert-overlay.el-overlay .el-dialog__body>.el-form{overflow:unset}.dinert-overlay.el-overlay .el-dialog__footer{display:flex;justify-content:center;align-items:center;clear:both;padding:12px 24px 16px}.dinert-overlay.el-overlay .el-dialog__footer .el-button{margin:0}.dinert-overlay.el-overlay .el-dialog__footer .el-button+.el-button{margin-left:12px}
|
|
1
|
+
.tree-item{width:100%}.tree-item .el-tooltip__trigger{display:block;overflow:hidden;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap}.dinert-popover-classify{overflow-y:auto;margin:0;padding:0;list-style:none}.dinert-popover-classify li{margin:0;padding:0;list-style:none}.dinert-popover-classify li:first-child{border-bottom:1px solid var(--el-fill-color);line-height:32px}.dinert-popover-classify>.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__expand-icon.is-leaf{display:none}.dinert-popover-classify .el-tree-node__children{overflow:unset}.dinert-table{display:flex;padding:20px;height:100%;border-radius:var(--el-bg-radius);background-color:var(--el-bg-color);flex-direction:column;box-sizing:border-box}.dinert-table .dinert-table-header{display:flex;justify-content:space-between;margin-bottom:12px;text-align:right}.dinert-table .dinert-table-header .dinert-popover-classify li .el-checkbox{width:100%;line-height:24px;height:24px}.dinert-table .dinert-table-header .dinert-table-header-left{text-align:left}.dinert-table .dinert-table-body{flex:1;height:0}.dinert-table .dinert-table-body .el-table .el-popper{max-width:50%}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell.setting .setting-icon{display:inline-block}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell .setting-icon{vertical-align:-1px;margin-left:4px;cursor:pointer}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item .cell-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .el-dropdown{vertical-align:-2px}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell{display:flex;justify-content:center;align-items:center}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button{margin-right:8px;margin-left:0}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button:focus-visible{outline:none}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon{font-size:14px;color:var(--el-color-primary);cursor:pointer;flex:1}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon.delete{color:var(--el-color-danger)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon{width:16px;height:16px;vertical-align:-2px;flex:1;color:var(--el-color-primary);cursor:pointer;fill:var(--el-color-primary)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon.f-14{width:14px;height:14px}.dinert-table .dinert-table-footer{display:flex;margin-top:16px}.dinert-table .dinert-table-footer .el-pagination{display:flex;flex-wrap:wrap}.el-form.dinert-form{display:flex;overflow:hidden;padding:0;min-height:50px;border-radius:4px;background-color:var(--el-bg-color);transition:all .3s cubic-bezier(.645,.045,.355,1);box-sizing:content-box}.el-form.dinert-form.near.packUp{max-height:50px}.el-form.dinert-form.near .dinert-form-left .el-col{display:flex;align-items:center;margin-right:10px;width:auto;max-width:unset;flex:unset}.el-form.dinert-form.near .dinert-form-left .el-col .label-text>div>.el-cascader{width:210px}.el-form.dinert-form.near .dinert-form-right.isArrow{width:230px;flex:0 0 230px}.el-form.dinert-form.dialog .dinert-form-left{flex:1}.el-form.dinert-form.dialog .dinert-form-left .el-col .label-text>div{width:100%}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text{overflow:unset}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider{padding-left:12px}.el-form.dinert-form.dialog .dinert-form-left .el-col.slider .label-text .el-slider .el-input-number{width:auto}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-radio.is-bordered,.el-form.dinert-form .dinert-form-left .el-col .label-text .el-checkbox.is-bordered{margin-right:16px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--daterange{width:260px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-input{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text>.el-select{width:210px}.el-form.dinert-form .dinert-form-left .el-col .label-text .el-date-editor--datetimerange{width:400px}.el-form.dinert-form .dinert-form-right{display:flex;margin-left:24px}.el-form.dinert-form .dinert-form-right .dinert-form-right-operation{padding:0}.el-form.dinert-form .dinert-form-right .dinert-form-right-operation.el-button.is-text{padding-right:0;background-color:unset}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top){position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top).show-label .el-form-item__content{width:0}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top).label-wrap .el-form-item__label{height:auto}.el-form.dinert-form div.el-form-item:not(.el-form-item--label-top).label-wrap .el-form-item__label .label-text{display:inline;text-align:left;white-space:normal}.el-form.dinert-form div.el-form-item.el-form-item--label-top{margin-right:0}.el-form.dinert-form div.el-form-item.el-form-item--label-top .el-form-item__label{display:inline-flex}.el-form.dinert-form div.el-form-item.el-form-item--label-top .dinert-tooltip.el-tooltip__trigger .label-text{white-space:normal}.el-form.dinert-form .el-form-item__content{flex:1;margin-left:0}.el-form.dinert-form .el-form-item__content .el-tooltip__trigger:not(.el-slider__button){width:100%}.el-form.dinert-form .el-form-item__content .el-input-number{width:100%}.el-form.dinert-form .el-form-item__content .el-input-number .el-input__inner{text-align:center}.el-form.dinert-form .el-form-item__content .el-textarea .el-textarea__inner{height:80px}.el-form.dinert-form .el-form-item__content .el-date-editor,.el-form.dinert-form .el-form-item__content .el-date-editor .el-input__wrapper{width:100%;box-sizing:border-box}.el-form.dinert-form .el-form-item__content .el-input__inner{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label{overflow:hidden;width:80px;max-width:80px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip,.el-form.dinert-form .el-form-item__content .el-form-item__label .el-tooltip .label-text{display:inline}.dinert-table-page{display:flex;flex-direction:column;box-sizing:border-box}.dinert-table-page.text-wrap .el-table__header .cell{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell,.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell>.cell-item,.dinert-table-page.text-wrap .el-table__body .el-table__row td .cell.el-tooltip>.cell-item{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row .el-button>span{text-align:left}.dinert-table-page.text-wrap .el-table__body .el-table__row span{white-space:pre-wrap;line-height:23px}.dinert-table-page.header-center .el-table__header .el-table__cell{text-align:center}.dinert-table-page.near .dinert-form-left{flex:unset}.dinert-table-page.near .dinert-form-left .el-col{margin-right:16px;width:auto;max-width:unset;flex:unset}.dinert-table-page.near .dinert-table-footer .el-pagination{margin-left:auto}.dinert-table-page.maxWidthAuto .el-form .el-form-item .el-form-item__label{max-width:unset}.dinert-table-page .el-form.dinert-form{padding:20px 20px 0;max-height:300px}.dinert-table-page .dinert-table{padding-top:0;height:0;flex:1}.dinert-tooltip.el-tooltip__trigger{display:block;height:100%}.dinert-tooltip.el-tooltip__trigger .text-tooltip{position:absolute;left:-999999999999px}.dinert-tooltip.el-tooltip__trigger .label-text{display:block;overflow:hidden;width:100%;height:100%;text-overflow:ellipsis;white-space:nowrap}.dinert-overlay.el-overlay.autoHeight .el-dialog{height:80%}.dinert-overlay.el-overlay.notPadding .el-dialog__body{padding:0}.dinert-overlay.el-overlay .el-dialog{top:10%;display:flex;min-width:310px;max-height:80%;border-radius:4px;flex-direction:column;--el-dialog-margin-top: 0;--el-dialog-padding-primary: 0}.dinert-overlay.el-overlay .el-dialog.is-fullscreen{top:unset;max-height:unset}.dinert-overlay.el-overlay .el-dialog__headerbtn{right:0;width:40px;height:100%;color:var(--el-color-info)}.dinert-overlay.el-overlay .el-dialog .full{position:absolute;top:-1.5px;right:34px;display:flex;justify-content:center;align-items:center;width:40px;height:100%;font-size:var(--el-message-close-size, 16px);border:none;color:var(--el-color-info);background:transparent;outline:none;cursor:pointer}.dinert-overlay.el-overlay .el-dialog .full:hover .icon{fill:var(--el-color-primary);color:var(--el-color-primary)}.dinert-overlay.el-overlay .el-dialog .full .icon{overflow:hidden;width:14px;height:14px;vertical-align:-.15em;fill:var(--el-color-info)}.dinert-overlay.el-overlay .el-dialog__header{position:relative;margin-right:0;padding:16px 24px;height:54px;box-sizing:border-box}.dinert-overlay.el-overlay .el-dialog__body{display:flex;overflow-y:auto;padding:24px;flex-direction:column;flex:1;word-wrap:break-word}.dinert-overlay.el-overlay .el-dialog__body>.el-form{overflow:unset}.dinert-overlay.el-overlay .el-dialog__footer{display:flex;justify-content:center;align-items:center;clear:both;padding:12px 24px 16px}.dinert-overlay.el-overlay .el-dialog__footer .el-button{margin:0}.dinert-overlay.el-overlay .el-dialog__footer .el-button+.el-button{margin-left:12px}
|
|
@@ -5,11 +5,11 @@ import U from "./input-autocomplete.mjs";
|
|
|
5
5
|
import q from "./select.mjs";
|
|
6
6
|
import A from "./select-v2.mjs";
|
|
7
7
|
import B from "./switch.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
8
|
+
import V from "./date.mjs";
|
|
9
|
+
import D from "./radio.mjs";
|
|
10
|
+
import M from "./tree-select.mjs";
|
|
11
|
+
import E from "./rate.mjs";
|
|
12
|
+
import j from "./checkbox.mjs";
|
|
13
13
|
import O from "./cascader.mjs";
|
|
14
14
|
import N from "./slider.mjs";
|
|
15
15
|
import P from "./time-picker.mjs";
|
|
@@ -40,26 +40,26 @@ const Fe = /* @__PURE__ */ R({
|
|
|
40
40
|
}) {
|
|
41
41
|
const {
|
|
42
42
|
form: a
|
|
43
|
-
} = F(u), l = k(a.value.packUp === void 0), p = k(!1), g = k(),
|
|
44
|
-
|
|
43
|
+
} = F(u), l = k(a.value.packUp === void 0), p = k(!1), g = k(), n = k({}), d = (f, o) => {
|
|
44
|
+
n.value[f] = o;
|
|
45
45
|
}, w = k("form_" + Q());
|
|
46
46
|
I(() => {
|
|
47
|
-
|
|
47
|
+
n.value = {};
|
|
48
48
|
});
|
|
49
49
|
const r = C(() => {
|
|
50
|
-
const
|
|
50
|
+
const f = [];
|
|
51
51
|
return Object.keys(a.value.formItem).forEach((o) => {
|
|
52
52
|
const b = a.value.formItem[o];
|
|
53
|
-
|
|
53
|
+
f.push({
|
|
54
54
|
...b,
|
|
55
55
|
key: o
|
|
56
56
|
});
|
|
57
|
-
}),
|
|
57
|
+
}), f.sort((o, b) => (o.sort || 1 / 0) - (b.sort || 1 / 0)), f;
|
|
58
58
|
}), s = () => {
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
const o =
|
|
62
|
-
o !== b ? p.value = !0 : (l.value || (l.value = !0), p.value = !1),
|
|
59
|
+
let f = document.querySelectorAll(`.${w.value} .dinert-form-left > div`);
|
|
60
|
+
f[0] && (p.value = !1, x(() => {
|
|
61
|
+
const o = f[0].getBoundingClientRect().top, b = f[f.length - 1].getBoundingClientRect().top;
|
|
62
|
+
o !== b ? p.value = !0 : (l.value || (l.value = !0), p.value = !1), f = null;
|
|
63
63
|
}));
|
|
64
64
|
};
|
|
65
65
|
return H(() => {
|
|
@@ -67,7 +67,7 @@ const Fe = /* @__PURE__ */ R({
|
|
|
67
67
|
}, 100, !0), {
|
|
68
68
|
formItemMap: r,
|
|
69
69
|
formClass: w,
|
|
70
|
-
formTypeRef:
|
|
70
|
+
formTypeRef: n,
|
|
71
71
|
formRef: g,
|
|
72
72
|
packUp: l,
|
|
73
73
|
isArrow: p,
|
|
@@ -102,15 +102,15 @@ const Fe = /* @__PURE__ */ R({
|
|
|
102
102
|
...e.options
|
|
103
103
|
}, p || (a.display = "none"), l) {
|
|
104
104
|
const g = typeof this.form.showLabel == "function" ? this.form.showLabel(this.form.model) : this.form.showLabel;
|
|
105
|
-
let
|
|
106
|
-
e.required = e.required === void 0 ? e.required || this.form.required : e.required,
|
|
105
|
+
let n = typeof e.showLabel == "function" ? e.showLabel(this.form.model) : e.showLabel;
|
|
106
|
+
e.required = e.required === void 0 ? e.required || this.form.required : e.required, n = n === void 0 ? n || g : n, e.required = n ? !1 : e.required;
|
|
107
107
|
let d = e.rules || [];
|
|
108
108
|
d = e.required ? [{
|
|
109
109
|
required: !0,
|
|
110
110
|
trigger: ["blur", "change"],
|
|
111
111
|
message: v(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type)
|
|
112
|
-
}].concat(d) : d, d =
|
|
113
|
-
const w =
|
|
112
|
+
}].concat(d) : d, d = n ? [] : d;
|
|
113
|
+
const w = e.itemValueDisabled !== void 0 ? e.itemValueDisabled : e.tempValueDisabled;
|
|
114
114
|
return t(i("el-col"), h({
|
|
115
115
|
style: a,
|
|
116
116
|
class: [e.type, e.key],
|
|
@@ -127,7 +127,7 @@ const Fe = /* @__PURE__ */ R({
|
|
|
127
127
|
default: () => [t(i("el-form-item"), h({
|
|
128
128
|
key: e.key,
|
|
129
129
|
prop: e.key,
|
|
130
|
-
class: [e.labelWrap ? "label-wrap" : "",
|
|
130
|
+
class: [e.labelWrap ? "label-wrap" : "", n ? "show-label" : ""]
|
|
131
131
|
}, {
|
|
132
132
|
...e,
|
|
133
133
|
label: typeof e.label == "function" ? e.label(this.form.model) : e.label,
|
|
@@ -142,7 +142,9 @@ const Fe = /* @__PURE__ */ R({
|
|
|
142
142
|
key: e.key,
|
|
143
143
|
content: typeof e.label == "function" ? e.label(this.form.model) : e.label,
|
|
144
144
|
disabled: e.labelDisabled,
|
|
145
|
-
onLabelMouseEnter: (y) =>
|
|
145
|
+
onLabelMouseEnter: (y) => {
|
|
146
|
+
W(y, e, this);
|
|
147
|
+
}
|
|
146
148
|
}, null);
|
|
147
149
|
},
|
|
148
150
|
default: () => t(i("dinert-tooltip"), {
|
|
@@ -154,16 +156,16 @@ const Fe = /* @__PURE__ */ R({
|
|
|
154
156
|
}, {
|
|
155
157
|
// eslint-disable-next-line max-statements
|
|
156
158
|
default: () => {
|
|
157
|
-
var y,
|
|
159
|
+
var y, f;
|
|
158
160
|
const r = {};
|
|
159
161
|
let s = t("span", null, [X(K(this.form.model[e.key], e))]);
|
|
160
162
|
if (this.$slots[c(e.key)])
|
|
161
|
-
s = (
|
|
163
|
+
s = (f = (y = this.$slots)[c(e.key)]) == null ? void 0 : f.call(y, {
|
|
162
164
|
...e,
|
|
163
165
|
model: this.form.model
|
|
164
166
|
});
|
|
165
167
|
else {
|
|
166
|
-
if (
|
|
168
|
+
if (n || g && [!0, void 0].includes(n))
|
|
167
169
|
return s;
|
|
168
170
|
["input", "textarea"].includes(e.type) ? (m(["prefix", "suffix", "prepend", "append"], this, r, e), s = t(L, {
|
|
169
171
|
form: this.form,
|
|
@@ -192,23 +194,23 @@ const Fe = /* @__PURE__ */ R({
|
|
|
192
194
|
form: this.form,
|
|
193
195
|
formItem: e,
|
|
194
196
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
195
|
-
}, r)) : ["datetime", "date", "dates", "week", "month", "year", "years", "datetimerange", "daterange", "monthrange", "yearrange"].includes(e.type) ? (m(["range-separator", "prev-month", "next-month", "prev-year", "next-year"], this, r, e), s = t(
|
|
197
|
+
}, r)) : ["datetime", "date", "dates", "week", "month", "year", "years", "datetimerange", "daterange", "monthrange", "yearrange"].includes(e.type) ? (m(["range-separator", "prev-month", "next-month", "prev-year", "next-year"], this, r, e), s = t(V, {
|
|
196
198
|
form: this.form,
|
|
197
199
|
formItem: e,
|
|
198
200
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
199
|
-
}, r)) : ["radio", "radio-button"].includes(e.type) ? s = t(
|
|
201
|
+
}, r)) : ["radio", "radio-button"].includes(e.type) ? s = t(D, {
|
|
200
202
|
form: this.form,
|
|
201
203
|
formItem: e,
|
|
202
204
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
203
|
-
}, r) : ["tree-select"].includes(e.type) ? (m(["header", "footer", "prefix", "empty", "tag", "loading", "label"], this, r, e), s = t(
|
|
205
|
+
}, r) : ["tree-select"].includes(e.type) ? (m(["header", "footer", "prefix", "empty", "tag", "loading", "label"], this, r, e), s = t(M, {
|
|
204
206
|
form: this.form,
|
|
205
207
|
formItem: e,
|
|
206
208
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
207
|
-
}, r)) : ["rate"].includes(e.type) ? s = t(
|
|
209
|
+
}, r)) : ["rate"].includes(e.type) ? s = t(E, {
|
|
208
210
|
form: this.form,
|
|
209
211
|
formItem: e,
|
|
210
212
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
211
|
-
}, r) : ["checkbox", "checkbox-button"].includes(e.type) ? s = t(
|
|
213
|
+
}, r) : ["checkbox", "checkbox-button"].includes(e.type) ? s = t(j, {
|
|
212
214
|
form: this.form,
|
|
213
215
|
formItem: e,
|
|
214
216
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/src/index.tsx"],"sourcesContent":["import {defineComponent, ref, computed, nextTick, toRefs, onBeforeUpdate, withModifiers} from 'vue'\nimport CustomInput from './input'\nimport CustomInputNumber from './input-number'\nimport CustomInputAutocomplete from './input-autocomplete'\nimport CustomSelect from './select'\nimport CustomSelectV2 from './select-v2'\nimport CustomSwitch from './switch'\nimport CustomDate from './date'\nimport CustomRadio from './radio'\nimport CustomSelectTree from './tree-select'\nimport CustomRate from './rate'\nimport CustomCheckbox from './checkbox'\nimport CustomCascader from './cascader'\nimport CustomSlider from './slider'\nimport CustomTimePicker from './time-picker'\nimport CustomTimeSelect from './time-select'\n\nimport useWindowResize from '@packages/hooks/useWindowResize'\nimport {labelMouseEnter, valueMouseEnter, getTooltipValue, getSpanValue, formItemSlot, customPlaceholder, renderSlot} from '@packages/components/form/utils'\n\nimport {dataTransformRod, getUuid} from '@packages/utils/tools'\nimport {ElForm} from 'element-plus'\n\nimport {ArrowUp, ArrowDown} from '@element-plus/icons-vue'\n\n\nimport '@packages/assets/scss/dinert-form.scss'\n\nimport type {PropType} from 'vue'\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\n// 展开还是收起状态\nexport default defineComponent({\n name: 'dinert-form',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n search: {\n type: Boolean,\n default: true\n }\n },\n emits: ['UnFold', 'SearchFn', 'ResetFn'],\n setup(props, {emit}) {\n const {form} = toRefs(props)\n const packUp = ref(form.value.packUp === undefined)\n const isArrow = ref(false)\n const formRef = ref<InstanceType<typeof ElForm>>()\n const formTypeRef = ref<any>({})\n const setFormTypeRefs = (type: string, el: any) => {\n formTypeRef.value[type] = el\n }\n const formClass = ref('form_' + getUuid())\n\n onBeforeUpdate(() => {\n formTypeRef.value = {}\n })\n\n const formItemMap = computed(() => {\n const result: any = []\n Object.keys(form.value.formItem).forEach(key => {\n const value = form.value.formItem[key] as Partial<CustomFormItemProps>\n result.push({\n ...value,\n key: key,\n })\n })\n\n result.sort((a: any, b: any) => {\n return (a.sort || Infinity) - (b.sort || Infinity)\n })\n\n return result\n })\n\n const resizeForm = () => {\n let elFormLeft = document.querySelectorAll(`.${formClass.value} .dinert-form-left > div`) as any\n if (elFormLeft[0]) {\n isArrow.value = false\n nextTick(() => {\n const firstTop = elFormLeft[0].getBoundingClientRect().top\n const lastTop = elFormLeft[elFormLeft.length - 1].getBoundingClientRect().top\n const isHeight = firstTop !== lastTop\n if (isHeight) {\n isArrow.value = true\n } else {\n if (!packUp.value) {\n packUp.value = true\n }\n isArrow.value = false\n }\n elFormLeft = null\n })\n\n }\n }\n\n useWindowResize(() => {\n resizeForm()\n }, 100, true)\n\n\n const unfold = () => {\n if (packUp.value) {\n packUp.value = false\n } else {\n packUp.value = true\n }\n\n emit('UnFold', packUp.value)\n }\n\n\n return {\n formItemMap,\n formClass,\n formTypeRef,\n formRef,\n packUp,\n isArrow,\n\n setFormTypeRefs,\n unfold,\n }\n },\n render() {\n return (\n <el-form inline={true}\n {...this.form}\n ref={el => {this.formRef = el}}\n class={[this.formClass, this.packUp ? '' : 'packUp', 'dinert-form']}\n onSubmit={withModifiers(() => undefined, ['stop', 'prevent'])}\n key={this.form.key}>\n\n <el-row {...this.form.row} class=\"dinert-form-left\">\n {/* eslint-disable-next-line array-callback-return, consistent-return */}\n { this.formItemMap.map((item: CustomFormItemProps) => {\n const style: any = {}\n let vif = typeof item.vif === 'function' ? item.vif(this.form.model) : item.vif\n vif = vif === undefined ? typeof this.form.vif === 'function' ? this.form.vif(this.form.model) : vif : vif\n vif = vif === undefined ? true : vif\n\n let show = typeof item.show === 'function' ? item.show(this.form.model) : item.show\n show = show === undefined ? true : show\n item.options = {placeholder: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type), ...item.options}\n\n\n if (!show) {\n style.display = 'none'\n }\n if (vif) {\n const formShowLabel = typeof this.form.showLabel === 'function' ? this.form.showLabel(this.form.model) : this.form.showLabel\n let itemShowLabel = typeof item.showLabel === 'function' ? item.showLabel(this.form.model) : item.showLabel\n item.required = item.required === undefined ? item.required || this.form.required : item.required\n itemShowLabel = itemShowLabel === undefined ? itemShowLabel || formShowLabel : itemShowLabel\n item.required = itemShowLabel ? false : item.required\n\n let rules = item.rules || []\n rules = item.required ? [{required: true, trigger: ['blur', 'change'], message: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type)}].concat(rules as any) : rules\n rules = itemShowLabel ? [] : rules\n const valDisabled = itemShowLabel ? true : item.tempValueDisabled\n\n return (\n <el-col\n style= {style}\n class={[item.type, item.key]}\n key={item.key}\n {\n ...{\n // xl: 3, // ≥1920px\n // lg: 4, // ≥1200px\n // md: 8, // ≥992px\n // sm: 12, // ≥768px\n // xs: 24, // <768px\n ...this.form.colLayout,\n ...item.colLayout\n }\n }\n >\n <el-form-item\n key={item.key}\n prop={item.key}\n class={[item.labelWrap ? 'label-wrap' : '', itemShowLabel ? 'show-label' : '']}\n {...{\n ...item,\n label: typeof item.label === 'function' ? item.label(this.form.model) : item.label,\n rules: rules\n }}\n v-slots={{\n label: () => {\n if (this.$slots[formItemSlot(item.key, 'formItem_label_')]) {\n return (this.$slots[formItemSlot(item.key, 'formItem_label_')]?.({...item, model: this.form.model}))\n }\n return (\n <dinert-tooltip\n key={item.key}\n content={typeof item.label === 'function' ? item.label(this.form.model) : item.label}\n disabled={item.labelDisabled}\n onLabelMouseEnter={(e: MouseEvent) => labelMouseEnter(e, item, this)}\n >\n </dinert-tooltip>\n )\n },\n default: () => {\n return (\n <dinert-tooltip\n key={item.key}\n content={String(getTooltipValue(this.form.model[item.key], item))}\n disabled={valDisabled}\n item={item}\n onLabelMouseEnter={(e: MouseEvent) => valueMouseEnter(e, item, this.form.model[item.key], this)}\n v-slots={\n {\n // eslint-disable-next-line max-statements\n default: () => {\n\n const slots: any = {}\n let componentResult = <span>{dataTransformRod(getSpanValue(this.form.model[item.key], item))}</span>\n\n if (this.$slots[formItemSlot(item.key)]) {\n componentResult = (this.$slots[formItemSlot(item.key)]?.({...item, model: this.form.model}))\n } else if (itemShowLabel || (formShowLabel && [true, undefined].includes(itemShowLabel))) {\n return componentResult\n } else if (['input', 'textarea'].includes(item.type)) {\n renderSlot(['prefix', 'suffix', 'prepend', 'append'], this, slots, item)\n componentResult = (<CustomInput form={this.form} formItem={item} v-slots={slots} onEnterSearch={() => {\n this.$emit('SearchFn')}}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomInput>)\n } else if (['input-number'].includes(item.type)) {\n renderSlot(['decrease-icon', 'increase-icon'], this, slots, item)\n componentResult = (<CustomInputNumber form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomInputNumber>)\n } else if (['input-autocomplete'].includes(item.type)) {\n renderSlot(['prefix', 'suffix', 'prepend', 'append', 'loading'], this, slots, item)\n componentResult = (<CustomInputAutocomplete form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomInputAutocomplete>)\n } else if (['select'].includes(item.type)) {\n renderSlot(['header', 'footer', 'prefix', 'empty', 'tag', 'loading', 'label'], this, slots, item)\n componentResult = (<CustomSelect form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSelect>)\n } else if (['select-v2'].includes(item.type)) {\n renderSlot(['header', 'footer', 'prefix', 'empty', 'tag', 'loading', 'label'], this, slots, item)\n componentResult = (<CustomSelectV2 form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSelectV2>)\n } else if (['switch'].includes(item.type)) {\n renderSlot(['active-action', 'inactive-action'], this, slots, item)\n componentResult = (<CustomSwitch form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSwitch>)\n } else if ([\n 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',\n ].includes(item.type)) {\n renderSlot(['range-separator', 'prev-month', 'next-month', 'prev-year', 'next-year'], this, slots, item)\n componentResult = (<CustomDate form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomDate>)\n } else if (['radio', 'radio-button'].includes(item.type)) {\n componentResult = (<CustomRadio form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomRadio>)\n } else if (['tree-select'].includes(item.type)) {\n renderSlot(['header', 'footer', 'prefix', 'empty', 'tag', 'loading', 'label'], this, slots, item)\n componentResult = (<CustomSelectTree form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSelectTree>)\n } else if (['rate'].includes(item.type)) {\n componentResult = (<CustomRate form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomRate>)\n } else if (['checkbox', 'checkbox-button'].includes(item.type)) {\n componentResult = (<CustomCheckbox form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomCheckbox>)\n } else if (['cascader'].includes(item.type)) {\n renderSlot(['empty'], this, slots, item)\n componentResult = (<CustomCascader ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomCascader>)\n } else if (['slider'].includes(item.type)) {\n componentResult = (<CustomSlider ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomSlider>)\n } else if (['time-picker'].includes(item.type)) {\n componentResult = (<CustomTimePicker ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomTimePicker>)\n } else if (['time-select'].includes(item.type)) {\n componentResult = (<CustomTimeSelect ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomTimeSelect>)\n }\n\n return componentResult\n },\n defaultAfter: () => this.$slots[formItemSlot('after_' + item.key)]?.({...item, model: this.form.model}),\n defaultBefore: () => this.$slots[formItemSlot('before_' + item.key)]?.({...item, model: this.form.model}),\n }\n }\n >\n </dinert-tooltip>\n )\n }\n }}\n >\n </el-form-item>\n </el-col>\n )\n }\n\n })\n }\n </el-row>\n {\n this.search\n && <el-row class={['dinert-form-right', this.isArrow ? 'isArrow' : '']}>\n {this.isArrow\n && <el-button class=\"dinert-form-right-operation\" text type=\"primary\"\n onClick={this.unfold}\n >\n <el-icon>\n {this.packUp ? <ArrowUp/> : <ArrowDown/>}\n </el-icon>\n {this.packUp ? '收起' : '展开'}\n </el-button>\n }\n {this.$slots.form_search?.()\n || (\n <>\n <el-button type=\"primary\" onClick={() => this.$emit('SearchFn')} {...this.form.searchButton}>{this.form.searchButton?.message || '搜索'}</el-button>\n <el-button type=\"primary\" plain\n onClick={() => this.$emit('ResetFn')}\n {...this.form.resetButton}\n >{this.form.resetButton?.message || '重置'}</el-button>\n </>\n )\n }\n </el-row>\n }\n {\n this.$slots.form_search_operations\n && <el-row class={'el-form-right-after'}>\n {this.$slots.form_search_operations?.()}\n </el-row>\n }\n </el-form>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","search","Boolean","emits","setup","emit","toRefs","packUp","ref","value","undefined","isArrow","formRef","formTypeRef","setFormTypeRefs","el","formClass","getUuid","onBeforeUpdate","formItemMap","computed","result","keys","formItem","forEach","key","push","sort","a","b","Infinity","resizeForm","elFormLeft","document","querySelectorAll","nextTick","firstTop","getBoundingClientRect","top","lastTop","length","useWindowResize","unfold","render","_slot","_createVNode","_resolveComponent","_mergeProps","withModifiers","row","map","item","style","vif","model","show","options","placeholder","customPlaceholder","label","display","formShowLabel","showLabel","itemShowLabel","required","rules","trigger","message","concat","valDisabled","tempValueDisabled","colLayout","labelWrap","$slots","formItemSlot","_b","_a","labelDisabled","e","labelMouseEnter","String","getTooltipValue","valueMouseEnter","slots","componentResult","dataTransformRod","getSpanValue","includes","renderSlot","CustomInput","onEnterSearch","$emit","CustomInputNumber","CustomInputAutocomplete","CustomSelect","CustomSelectV2","CustomSwitch","CustomDate","CustomRadio","CustomSelectTree","CustomRate","CustomCheckbox","CustomCascader","CustomSlider","CustomTimePicker","CustomTimeSelect","defaultAfter","defaultBefore","ArrowUp","ArrowDown","form_search","_Fragment","onClick","searchButton","resetButton","form_search_operations"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0B+C,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAM/C,MAAeM,uBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,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A,KAAAC,EAAsC;AAAA;AAAA,OAClC,CAAA;AAAA,IAAA,CAAA;AAAA,EAIb;AACJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/src/index.tsx"],"sourcesContent":["import {defineComponent, ref, computed, nextTick, toRefs, onBeforeUpdate, withModifiers} from 'vue'\nimport CustomInput from './input'\nimport CustomInputNumber from './input-number'\nimport CustomInputAutocomplete from './input-autocomplete'\nimport CustomSelect from './select'\nimport CustomSelectV2 from './select-v2'\nimport CustomSwitch from './switch'\nimport CustomDate from './date'\nimport CustomRadio from './radio'\nimport CustomSelectTree from './tree-select'\nimport CustomRate from './rate'\nimport CustomCheckbox from './checkbox'\nimport CustomCascader from './cascader'\nimport CustomSlider from './slider'\nimport CustomTimePicker from './time-picker'\nimport CustomTimeSelect from './time-select'\n\nimport useWindowResize from '@packages/hooks/useWindowResize'\nimport {labelMouseEnter, valueMouseEnter, getTooltipValue, getSpanValue, formItemSlot, customPlaceholder, renderSlot} from '@packages/components/form/utils'\n\nimport {dataTransformRod, getUuid} from '@packages/utils/tools'\nimport {ElForm} from 'element-plus'\n\nimport {ArrowUp, ArrowDown} from '@element-plus/icons-vue'\n\n\nimport '@packages/assets/scss/dinert-form.scss'\n\nimport type {PropType} from 'vue'\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\n// 展开还是收起状态\nexport default defineComponent({\n name: 'dinert-form',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n search: {\n type: Boolean,\n default: true\n }\n },\n emits: ['UnFold', 'SearchFn', 'ResetFn'],\n setup(props, {emit}) {\n const {form} = toRefs(props)\n const packUp = ref(form.value.packUp === undefined)\n const isArrow = ref(false)\n const formRef = ref<InstanceType<typeof ElForm>>()\n const formTypeRef = ref<any>({})\n const setFormTypeRefs = (type: string, el: any) => {\n formTypeRef.value[type] = el\n }\n const formClass = ref('form_' + getUuid())\n\n onBeforeUpdate(() => {\n formTypeRef.value = {}\n })\n\n const formItemMap = computed(() => {\n const result: any = []\n Object.keys(form.value.formItem).forEach(key => {\n const value = form.value.formItem[key] as Partial<CustomFormItemProps>\n result.push({\n ...value,\n key: key,\n })\n })\n\n result.sort((a: any, b: any) => {\n return (a.sort || Infinity) - (b.sort || Infinity)\n })\n\n return result\n })\n\n const resizeForm = () => {\n let elFormLeft = document.querySelectorAll(`.${formClass.value} .dinert-form-left > div`) as any\n if (elFormLeft[0]) {\n isArrow.value = false\n nextTick(() => {\n const firstTop = elFormLeft[0].getBoundingClientRect().top\n const lastTop = elFormLeft[elFormLeft.length - 1].getBoundingClientRect().top\n const isHeight = firstTop !== lastTop\n if (isHeight) {\n isArrow.value = true\n } else {\n if (!packUp.value) {\n packUp.value = true\n }\n isArrow.value = false\n }\n elFormLeft = null\n })\n\n }\n }\n\n useWindowResize(() => {\n resizeForm()\n }, 100, true)\n\n\n const unfold = () => {\n if (packUp.value) {\n packUp.value = false\n } else {\n packUp.value = true\n }\n\n emit('UnFold', packUp.value)\n }\n\n\n return {\n formItemMap,\n formClass,\n formTypeRef,\n formRef,\n packUp,\n isArrow,\n\n setFormTypeRefs,\n unfold,\n }\n },\n render() {\n return (\n <el-form inline={true}\n {...this.form}\n ref={el => {this.formRef = el}}\n class={[this.formClass, this.packUp ? '' : 'packUp', 'dinert-form']}\n onSubmit={withModifiers(() => undefined, ['stop', 'prevent'])}\n key={this.form.key}>\n\n <el-row {...this.form.row} class=\"dinert-form-left\">\n {/* eslint-disable-next-line array-callback-return, consistent-return */}\n { this.formItemMap.map((item: CustomFormItemProps) => {\n const style: any = {}\n let vif = typeof item.vif === 'function' ? item.vif(this.form.model) : item.vif\n vif = vif === undefined ? typeof this.form.vif === 'function' ? this.form.vif(this.form.model) : vif : vif\n vif = vif === undefined ? true : vif\n\n let show = typeof item.show === 'function' ? item.show(this.form.model) : item.show\n show = show === undefined ? true : show\n item.options = {placeholder: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type), ...item.options}\n\n\n if (!show) {\n style.display = 'none'\n }\n if (vif) {\n const formShowLabel = typeof this.form.showLabel === 'function' ? this.form.showLabel(this.form.model) : this.form.showLabel\n let itemShowLabel = typeof item.showLabel === 'function' ? item.showLabel(this.form.model) : item.showLabel\n item.required = item.required === undefined ? item.required || this.form.required : item.required\n itemShowLabel = itemShowLabel === undefined ? itemShowLabel || formShowLabel : itemShowLabel\n item.required = itemShowLabel ? false : item.required\n\n let rules = item.rules || []\n rules = item.required ? [{required: true, trigger: ['blur', 'change'], message: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type)}].concat(rules as any) : rules\n rules = itemShowLabel ? [] : rules\n const valDisabled = item.itemValueDisabled !== undefined ? item.itemValueDisabled : item.tempValueDisabled\n\n return (\n <el-col\n style= {style}\n class={[item.type, item.key]}\n key={item.key}\n {\n ...{\n // xl: 3, // ≥1920px\n // lg: 4, // ≥1200px\n // md: 8, // ≥992px\n // sm: 12, // ≥768px\n // xs: 24, // <768px\n ...this.form.colLayout,\n ...item.colLayout\n }\n }\n >\n <el-form-item\n key={item.key}\n prop={item.key}\n class={[item.labelWrap ? 'label-wrap' : '', itemShowLabel ? 'show-label' : '']}\n {...{\n ...item,\n label: typeof item.label === 'function' ? item.label(this.form.model) : item.label,\n rules: rules\n }}\n v-slots={{\n label: () => {\n if (this.$slots[formItemSlot(item.key, 'formItem_label_')]) {\n return (this.$slots[formItemSlot(item.key, 'formItem_label_')]?.({...item, model: this.form.model}))\n }\n return (\n <dinert-tooltip\n key={item.key}\n content={typeof item.label === 'function' ? item.label(this.form.model) : item.label}\n disabled={item.labelDisabled}\n onLabelMouseEnter={(e: MouseEvent) => {labelMouseEnter(e, item, this)}}\n >\n </dinert-tooltip>\n )\n },\n default: () => {\n return (\n <dinert-tooltip\n key={item.key}\n content={String(getTooltipValue(this.form.model[item.key], item))}\n disabled={valDisabled}\n item={item}\n onLabelMouseEnter={(e: MouseEvent) => valueMouseEnter(e, item, this.form.model[item.key], this)}\n v-slots={\n {\n // eslint-disable-next-line max-statements\n default: () => {\n\n const slots: any = {}\n let componentResult = <span>{dataTransformRod(getSpanValue(this.form.model[item.key], item))}</span>\n\n if (this.$slots[formItemSlot(item.key)]) {\n componentResult = (this.$slots[formItemSlot(item.key)]?.({...item, model: this.form.model}))\n } else if (itemShowLabel || (formShowLabel && [true, undefined].includes(itemShowLabel))) {\n return componentResult\n } else if (['input', 'textarea'].includes(item.type)) {\n renderSlot(['prefix', 'suffix', 'prepend', 'append'], this, slots, item)\n componentResult = (<CustomInput form={this.form} formItem={item} v-slots={slots} onEnterSearch={() => {\n this.$emit('SearchFn')}}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomInput>)\n } else if (['input-number'].includes(item.type)) {\n renderSlot(['decrease-icon', 'increase-icon'], this, slots, item)\n componentResult = (<CustomInputNumber form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomInputNumber>)\n } else if (['input-autocomplete'].includes(item.type)) {\n renderSlot(['prefix', 'suffix', 'prepend', 'append', 'loading'], this, slots, item)\n componentResult = (<CustomInputAutocomplete form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomInputAutocomplete>)\n } else if (['select'].includes(item.type)) {\n renderSlot(['header', 'footer', 'prefix', 'empty', 'tag', 'loading', 'label'], this, slots, item)\n componentResult = (<CustomSelect form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSelect>)\n } else if (['select-v2'].includes(item.type)) {\n renderSlot(['header', 'footer', 'prefix', 'empty', 'tag', 'loading', 'label'], this, slots, item)\n componentResult = (<CustomSelectV2 form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSelectV2>)\n } else if (['switch'].includes(item.type)) {\n renderSlot(['active-action', 'inactive-action'], this, slots, item)\n componentResult = (<CustomSwitch form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSwitch>)\n } else if ([\n 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',\n ].includes(item.type)) {\n renderSlot(['range-separator', 'prev-month', 'next-month', 'prev-year', 'next-year'], this, slots, item)\n componentResult = (<CustomDate form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomDate>)\n } else if (['radio', 'radio-button'].includes(item.type)) {\n componentResult = (<CustomRadio form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomRadio>)\n } else if (['tree-select'].includes(item.type)) {\n renderSlot(['header', 'footer', 'prefix', 'empty', 'tag', 'loading', 'label'], this, slots, item)\n componentResult = (<CustomSelectTree form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomSelectTree>)\n } else if (['rate'].includes(item.type)) {\n componentResult = (<CustomRate form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomRate>)\n } else if (['checkbox', 'checkbox-button'].includes(item.type)) {\n componentResult = (<CustomCheckbox form={this.form} formItem={item} v-slots={slots}\n ref={el => this.setFormTypeRefs(item.key, el)}></CustomCheckbox>)\n } else if (['cascader'].includes(item.type)) {\n renderSlot(['empty'], this, slots, item)\n componentResult = (<CustomCascader ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomCascader>)\n } else if (['slider'].includes(item.type)) {\n componentResult = (<CustomSlider ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomSlider>)\n } else if (['time-picker'].includes(item.type)) {\n componentResult = (<CustomTimePicker ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomTimePicker>)\n } else if (['time-select'].includes(item.type)) {\n componentResult = (<CustomTimeSelect ref={el => this.setFormTypeRefs(item.key, el)}\n form={this.form} formItem={item} v-slots={slots}></CustomTimeSelect>)\n }\n\n return componentResult\n },\n defaultAfter: () => this.$slots[formItemSlot('after_' + item.key)]?.({...item, model: this.form.model}),\n defaultBefore: () => this.$slots[formItemSlot('before_' + item.key)]?.({...item, model: this.form.model}),\n }\n }\n >\n </dinert-tooltip>\n )\n }\n }}\n >\n </el-form-item>\n </el-col>\n )\n }\n\n })\n }\n </el-row>\n {\n this.search\n && <el-row class={['dinert-form-right', this.isArrow ? 'isArrow' : '']}>\n {this.isArrow\n && <el-button class=\"dinert-form-right-operation\" text type=\"primary\"\n onClick={this.unfold}\n >\n <el-icon>\n {this.packUp ? <ArrowUp/> : <ArrowDown/>}\n </el-icon>\n {this.packUp ? '收起' : '展开'}\n </el-button>\n }\n {this.$slots.form_search?.()\n || (\n <>\n <el-button type=\"primary\" onClick={() => this.$emit('SearchFn')} {...this.form.searchButton}>{this.form.searchButton?.message || '搜索'}</el-button>\n <el-button type=\"primary\" plain\n onClick={() => this.$emit('ResetFn')}\n {...this.form.resetButton}\n >{this.form.resetButton?.message || '重置'}</el-button>\n </>\n )\n }\n </el-row>\n }\n {\n this.$slots.form_search_operations\n && <el-row class={'el-form-right-after'}>\n {this.$slots.form_search_operations?.()}\n </el-row>\n }\n </el-form>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","search","Boolean","emits","setup","emit","toRefs","packUp","ref","value","undefined","isArrow","formRef","formTypeRef","setFormTypeRefs","el","formClass","getUuid","onBeforeUpdate","formItemMap","computed","result","keys","formItem","forEach","key","push","sort","a","b","Infinity","resizeForm","elFormLeft","document","querySelectorAll","nextTick","firstTop","getBoundingClientRect","top","lastTop","length","useWindowResize","unfold","render","_slot","_createVNode","_resolveComponent","_mergeProps","withModifiers","row","map","item","style","vif","model","show","options","placeholder","customPlaceholder","label","display","formShowLabel","showLabel","itemShowLabel","required","rules","trigger","message","concat","valDisabled","itemValueDisabled","tempValueDisabled","colLayout","labelWrap","$slots","formItemSlot","_b","_a","labelDisabled","e","labelMouseEnter","String","getTooltipValue","valueMouseEnter","slots","componentResult","dataTransformRod","getSpanValue","includes","renderSlot","CustomInput","onEnterSearch","$emit","CustomInputNumber","CustomInputAutocomplete","CustomSelect","CustomSelectV2","CustomSwitch","CustomDate","CustomRadio","CustomSelectTree","CustomRate","CustomCheckbox","CustomCascader","CustomSlider","CustomTimePicker","CustomTimeSelect","defaultAfter","defaultBefore","ArrowUp","ArrowDown","form_search","_Fragment","onClick","searchButton","resetButton","form_search_operations"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0B+C,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAM/C,MAAeM,uBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,QAAQ;AAAA,MACJF,MAAMG;AAAAA,MACNF,SAAS;AAAA,IACb;AAAA,EACH;AAAA,EACDG,OAAO,CAAC,UAAU,YAAY,SAAS;AAAA,EACvCC,MAAMP,GAAO;AAAA,IAACQ,MAAAA;AAAAA,EAAI,GAAG;AACjB,UAAM;AAAA,MAACP,MAAAA;AAAAA,IAAI,IAAIQ,EAAOT,CAAK,GACrBU,IAASC,EAAIV,EAAKW,MAAMF,WAAWG,MAAS,GAC5CC,IAAUH,EAAI,EAAK,GACnBI,IAAUJ,KACVK,IAAcL,EAAS,CAAA,CAAE,GACzBM,IAAkBA,CAACf,GAAcgB,MAAY;AAC/CF,MAAAA,EAAYJ,MAAMV,CAAI,IAAIgB;AAAAA,OAExBC,IAAYR,EAAI,UAAUS,EAAS,CAAA;AAEzCC,IAAAA,EAAe,MAAM;AACjBL,MAAAA,EAAYJ,Q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AA,YAAA,SAGmBkE,MAAM,KAAKrB,MAAM,UAAU;AAAA,UAAC,GAAM,KAAK9F,KAAKoH,YAAY,GAAA;AAAA,YAAAlH,SAAAA,MAAA;;AAAA,wBAAG6E,IAAA,KAAK/E,KAAKoH,iBAAV,gBAAArC,EAAwBV,YAAW,IAAI;AAAA;AAAA,UAAA,CAAA,GAAAtB,EAAAC,EAAA,WAAA,GAAAC,EAAA;AAAA,YAAA,MAAA;AAAA,YAAA,OAAA;AAAA,YAAA,SAExHkE,MAAM,KAAKrB,MAAM,SAAS;AAAA,UAAC,GAChC,KAAK9F,KAAKqH,WAAW,GAAA;AAAA,YAAAnH,SAAAA,MAAA;;AAAA,wBAC3B6E,IAAA,KAAK/E,KAAKqH,gBAAV,gBAAAtC,EAAuBV,YAAW,IAAI;AAAA;AAAA,UAE/C,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA,OAEA,GAGL,KAAKO,OAAO0C,0BAAsBvE,EAAAC,EAAA,QAAA,GAAA;AAAA,QAAA,OAC5B;AAAA,MAAqB,GAAA;AAAA,QAAA9C,SAAAA,MAAAA;;AAClC,mBAAA4E,KAAAC,IAAA,KAAKH,QAAO0C,2BAAZ,gBAAAxC,EAAA,KAAAC,EAAsC;AAAA;AAAA,OAClC,CAAA;AAAA,IAAA,CAAA;AAAA,EAIb;AACJ,CAAC;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { isSlotsValue as
|
|
2
|
-
const
|
|
3
|
-
const e = t.target.parentElement.parentElement,
|
|
4
|
-
|
|
1
|
+
import { isSlotsValue as b } from "../../../utils/tools.mjs";
|
|
2
|
+
const h = (t, l, o) => {
|
|
3
|
+
const e = t.target.parentElement.parentElement, s = window.getComputedStyle(e, null), n = l.rules ? 12 : l.beforeWidth || 0, r = parseInt(s.getPropertyValue("max-width")) - n - parseInt(s.getPropertyValue("padding-right")), p = t.target.previousElementSibling.offsetWidth;
|
|
4
|
+
console.log("tooltipWidth", p), p >= r ? o.form.formItem[l.key].labelDisabled = !1 : o.form.formItem[l.key].labelDisabled = !0;
|
|
5
5
|
}, d = (t, l, o) => {
|
|
6
6
|
const e = [];
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
function s(n) {
|
|
8
|
+
n.forEach((r) => {
|
|
9
|
+
r && ((Array.isArray(o) && o.includes(r[l]) || o === r[l]) && e.push(r), r.children && r.children.length && s(r.children));
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
return
|
|
13
|
-
},
|
|
14
|
-
var
|
|
15
|
-
const o = l.type, e = l.options || {},
|
|
12
|
+
return s(t), e;
|
|
13
|
+
}, E = (t, l) => {
|
|
14
|
+
var n, r, p, a;
|
|
15
|
+
const o = l.type, e = l.options || {}, s = [];
|
|
16
16
|
if (["input", "input-autocomplete", "input-number"].includes(o))
|
|
17
17
|
return t;
|
|
18
18
|
if (["select", "tree-select", "select-v2"].includes(o)) {
|
|
@@ -21,18 +21,18 @@ const y = (t, l, o) => {
|
|
|
21
21
|
c = c || "value";
|
|
22
22
|
let u = ["select-v2"].includes(o) ? e.props && e.props.label : e.label;
|
|
23
23
|
return u = u || "label", e.valueKey && (i = t && t[e.valueKey]), d(e.options, e.value === "object" ? e.valueKey : c, i || t).forEach((f) => {
|
|
24
|
-
|
|
25
|
-
}),
|
|
24
|
+
s.push(f[u]);
|
|
25
|
+
}), s && s.length ? s.join(",") : t;
|
|
26
26
|
}
|
|
27
27
|
} else if (["cascader"].includes(o) && e && e.options && e.options.length) {
|
|
28
|
-
(((
|
|
28
|
+
(((n = e.props) == null ? void 0 : n.emitPath) === void 0 || ((r = e.props) == null ? void 0 : r.emitPath) === !0) && (t = t && t[0]);
|
|
29
29
|
const i = d(e.options, ((p = e.props) == null ? void 0 : p.value) || "value", t)[0];
|
|
30
30
|
return i && i[((a = e.props) == null ? void 0 : a.label) || "label"];
|
|
31
31
|
}
|
|
32
32
|
return null;
|
|
33
|
-
},
|
|
34
|
-
var
|
|
35
|
-
const o = l.type, e = l.options || {},
|
|
33
|
+
}, I = (t, l) => {
|
|
34
|
+
var n, r, p, a;
|
|
35
|
+
const o = l.type, e = l.options || {}, s = [];
|
|
36
36
|
if ([
|
|
37
37
|
"input",
|
|
38
38
|
"input-autocomplete",
|
|
@@ -57,28 +57,27 @@ const y = (t, l, o) => {
|
|
|
57
57
|
c = c || "value";
|
|
58
58
|
let u = ["select-v2"].includes(o) ? e.props && e.props.label : e.label;
|
|
59
59
|
return u = u || "label", e.valueKey && (i = t && t[e.valueKey]), d(e.options, e.value === "object" ? e.valueKey : c, i || t).forEach((f) => {
|
|
60
|
-
|
|
61
|
-
}),
|
|
60
|
+
s.push(f[u]);
|
|
61
|
+
}), s && s.length ? s.join(",") : t;
|
|
62
62
|
}
|
|
63
63
|
} else if (["cascader"].includes(o) && e && e.options && e.options.length) {
|
|
64
|
-
(((
|
|
64
|
+
(((n = e.props) == null ? void 0 : n.emitPath) === void 0 || ((r = e.props) == null ? void 0 : r.emitPath) === !0) && (t = t && t[0]);
|
|
65
65
|
const i = d(e.options, ((p = e.props) == null ? void 0 : p.value) || "value", t)[0];
|
|
66
66
|
return i && i[((a = e.props) == null ? void 0 : a.label) || "label"];
|
|
67
67
|
}
|
|
68
68
|
return null;
|
|
69
69
|
}, V = (t, l, o, e) => {
|
|
70
|
-
|
|
71
|
-
if (!o || l.showLabel || !r.includes(l.type)) {
|
|
70
|
+
if (!o || !["input", "input-autocomplete", "cascader", "input-number", "select", "tree-select", "select-v2"].includes(l.type) && l.showLabel !== !0) {
|
|
72
71
|
e.form.formItem[l.key].tempValueDisabled = !0;
|
|
73
72
|
return;
|
|
74
73
|
}
|
|
75
|
-
let
|
|
76
|
-
if (["input", "input-autocomplete", "cascader", "input-number"].includes(l.type) ?
|
|
77
|
-
const
|
|
78
|
-
|
|
74
|
+
let n = null;
|
|
75
|
+
if (l.showLabel ? n = t.target : ["input", "input-autocomplete", "cascader", "input-number"].includes(l.type) ? n = t.target.parentElement.querySelector(".el-input__inner") || t.target.parentElement.querySelector(".busy-input__inner") : ["select", "tree-select", "select-v2"].includes(l.type) && (n = t.target.parentElement.querySelector(".el-select__selected-item.el-select__placeholder") || t.target.parentElement.querySelector(".busy-select__selected-item.el-select__placeholder"), n = n || t.target.parentElement.querySelector(".el-select__selection") || t.target.parentElement.querySelector(".busy-select__selection")), n) {
|
|
76
|
+
const r = window.getComputedStyle(n, null), p = n.offsetWidth - parseInt(r.getPropertyValue("padding-right")) - parseInt(r.getPropertyValue("padding-left")), i = t.target.previousElementSibling.offsetWidth;
|
|
77
|
+
console.log(i, p), i >= p ? e.form.formItem[l.key].tempValueDisabled = !1 : e.form.formItem[l.key].tempValueDisabled = !0;
|
|
79
78
|
} else
|
|
80
79
|
e.form.formItem[l.key].tempValueDisabled = !0;
|
|
81
|
-
},
|
|
80
|
+
}, _ = (t, l = "input", o = "请输入") => (o = [
|
|
82
81
|
"select",
|
|
83
82
|
"tree-select",
|
|
84
83
|
"cascader",
|
|
@@ -93,25 +92,27 @@ const y = (t, l, o) => {
|
|
|
93
92
|
"monthrange",
|
|
94
93
|
"year",
|
|
95
94
|
"years",
|
|
96
|
-
"time-picker"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
"time-picker",
|
|
96
|
+
"radio",
|
|
97
|
+
"radio-button"
|
|
98
|
+
].includes(l) ? "请选择" : o, o + (t || "")), g = (t, l = "formItem_") => l + (t || ""), v = (t = [], l, o, e) => {
|
|
99
|
+
var s, n;
|
|
100
|
+
for (const r in l.$slots) {
|
|
101
|
+
const p = r.split("formItem_").join("").split("_")[1];
|
|
101
102
|
let a = null;
|
|
102
103
|
if (!p)
|
|
103
104
|
return;
|
|
104
|
-
t.includes(p) &&
|
|
105
|
+
t.includes(p) && g(e.key) + "_" + p === r && (a = (n = (s = l.$slots)[r]) == null ? void 0 : n.call(s, e), b(a) && (o[p] = () => a));
|
|
105
106
|
}
|
|
106
107
|
};
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
_ as customPlaceholder,
|
|
109
110
|
d as findTreeNode,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
g as formItemSlot,
|
|
112
|
+
I as getSpanValue,
|
|
113
|
+
E as getTooltipValue,
|
|
114
|
+
h as labelMouseEnter,
|
|
115
|
+
v as renderSlot,
|
|
115
116
|
V as valueMouseEnter
|
|
116
117
|
};
|
|
117
118
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/utils/index.ts"],"sourcesContent":["import {isSlotsValue} from '@packages/utils/tools'\n\nexport const labelMouseEnter = (e: MouseEvent, item: any, _this: any) => {\n const el = (e.target as any).parentElement.parentElement\n const labelEl = window.getComputedStyle(el, null)\n const isRequried = item.rules ? 12 : item.beforeWidth || 0\n const labelWidth\n = parseInt(labelEl.getPropertyValue('max-width')) - isRequried\n - parseInt(labelEl.getPropertyValue('padding-right'))\n const tooltipWidth = (e.target as any).previousElementSibling.offsetWidth\n if (tooltipWidth >= labelWidth) {\n _this.form.formItem[item.key].labelDisabled = false\n\n } else {\n _this.form.formItem[item.key].labelDisabled = true\n }\n}\n\nexport const findTreeNode = (treeData: any, key: string, value: string) => {\n const result: any[] = []\n function filterResult(treeData: any) {\n treeData.forEach((item: any) => {\n if (item) {\n if ((Array.isArray(value) && value.includes(item[key])) || value === item[key]) {\n result.push(item)\n }\n if (item.children && item.children.length) {\n filterResult(item.children)\n }\n }\n\n })\n }\n filterResult(treeData)\n return result\n}\n\n\nexport const getTooltipValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n if (['input', 'input-autocomplete', 'input-number'].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n\n let optValue = ['select-v2'].includes(type) ? options.props && options.props.value : options.value\n optValue = optValue || 'value'\n let optLabel = ['select-v2'].includes(type) ? options.props && options.props.label : options.label\n optLabel = optLabel || 'label'\n\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : optValue, newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[optLabel])\n })\n if (tempArr && tempArr.length) {\n return tempArr.join(',')\n }\n return value\n }\n } else if (['cascader'].includes(type)) {\n if (options && options.options && options.options.length) {\n if (options.props?.emitPath === undefined || options.props?.emitPath === true) {\n value = value && value[0]\n }\n\n const selectItem = findTreeNode(options.options, options.props?.value || 'value', value)[0]\n return selectItem && selectItem[options.props?.label || 'label']\n }\n }\n return null\n}\n\nexport const getSpanValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n\n\n if (['input', 'input-autocomplete', 'input-number', 'textarea', 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2', 'radio', 'radio-button', 'checkbox', 'checkbox-button'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n let optValue = ['select-v2'].includes(type) ? options.props && options.props.value : options.value\n optValue = optValue || 'value'\n let optLabel = ['select-v2'].includes(type) ? options.props && options.props.label : options.label\n optLabel = optLabel || 'label'\n\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : optValue, newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[optLabel])\n })\n if (tempArr && tempArr.length) {\n return tempArr.join(',')\n }\n return value\n }\n } else if (['cascader'].includes(type)) {\n if (options && options.options && options.options.length) {\n if (options.props?.emitPath === undefined || options.props?.emitPath === true) {\n value = value && value[0]\n }\n\n const selectItem = findTreeNode(options.options, options.props?.value || 'value', value)[0]\n return selectItem && selectItem[options.props?.label || 'label']\n }\n }\n return null\n}\n\nexport const valueMouseEnter = (e: MouseEvent, item: any, value: any, _this) => {\n const showCom = ['input', 'input-autocomplete', 'cascader', 'input-number', 'select', 'tree-select', 'select-v2']\n\n if (!value || item.showLabel || !showCom.includes(item.type)) {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n return\n }\n let el: HTMLElement | null = null\n if (['input', 'input-autocomplete', 'cascader', 'input-number'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-input__inner') as HTMLElement\n } else if (['select', 'tree-select', 'select-v2'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-select__selected-item.el-select__placeholder') as HTMLElement\n el = el || (e.target as any).parentElement.querySelector('.el-select__selection') as HTMLElement\n }\n\n if (el) {\n const inputEl = window.getComputedStyle(el, null)\n const textWidth\n = el.offsetWidth\n - parseInt(inputEl.getPropertyValue('padding-right'))\n - parseInt(inputEl.getPropertyValue('padding-left'))\n const tooltipEl = (e.target as any).previousElementSibling\n const tooltipWidth = tooltipEl.offsetWidth\n\n if (tooltipWidth >= textWidth) {\n _this.form.formItem[item.key].tempValueDisabled = false\n } else {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n }\n } else {\n _this.form.formItem[item.key].tempValueDisabled = true\n }\n\n}\n\nexport const customPlaceholder = (customName: any, type: string = 'input', name: string = '请输入') => {\n name = ['select', 'tree-select', 'cascader', 'select-v2', 'datetime',\n 'datetimerange', 'date', 'daterange', 'dates', 'week', 'month', 'monthrange', 'year', 'years', 'time-picker'].includes(type) ? '请选择' : name\n return name + ((customName) || '')\n}\n\nexport const formItemSlot = (customName: any, name: string = 'formItem_') => {\n return name + (customName || '')\n}\n\n\nexport const renderSlot = (arr: string[] = [], _this: any, slots, item: any): any => {\n for (const prop in _this.$slots) {\n const slotName = prop.split('formItem_').join('').split('_')[1]\n\n let slotFn: any = null\n if (!slotName) {\n return\n }\n\n if (arr.includes(slotName) && formItemSlot(item.key) + '_' + slotName === prop) {\n\n slotFn = _this.$slots[prop]?.(item)\n // eslint-disable-next-line consistent-return\n isSlotsValue(slotFn) && (slots[slotName] = () => slotFn)\n }\n }\n}\n"],"names":["labelMouseEnter","e","item","_this","el","labelEl","isRequried","labelWidth","findTreeNode","treeData","key","value","result","filterResult","getTooltipValue","type","options","tempArr","newVal","optValue","optLabel","_a","_b","selectItem","_c","_d","getSpanValue","valueMouseEnter","showCom","inputEl","textWidth","customPlaceholder","customName","name","formItemSlot","renderSlot","arr","slots","prop","slotName","slotFn","isSlotsValue"],"mappings":";AAEO,MAAMA,IAAkB,CAACC,GAAeC,GAAWC,MAAe;AAC/D,QAAAC,IAAMH,EAAE,OAAe,cAAc,eACrCI,IAAU,OAAO,iBAAiBD,GAAI,IAAI,GAC1CE,IAAaJ,EAAK,QAAQ,KAAKA,EAAK,eAAe,GACnDK,IACA,SAASF,EAAQ,iBAAiB,WAAW,CAAC,IAAIC,IAC9C,SAASD,EAAQ,iBAAiB,eAAe,CAAC;AAE5D,EADsBJ,EAAE,OAAe,uBAAuB,eAC1CM,IAChBJ,EAAM,KAAK,SAASD,EAAK,GAAG,EAAE,gBAAgB,KAG9CC,EAAM,KAAK,SAASD,EAAK,GAAG,EAAE,gBAAgB;AAEtD,GAEaM,IAAe,CAACC,GAAeC,GAAaC,MAAkB;AACvE,QAAMC,IAAgB,CAAA;AACtB,WAASC,EAAaJ,GAAe;AACjCA,IAAAA,EAAS,QAAQ,CAACP,MAAc;AAC5B,MAAIA,OACK,MAAM,QAAQS,CAAK,KAAKA,EAAM,SAAST,EAAKQ,CAAG,CAAC,KAAMC,MAAUT,EAAKQ,CAAG,MACzEE,EAAO,KAAKV,CAAI,GAEhBA,EAAK,YAAYA,EAAK,SAAS,UAC/BW,EAAaX,EAAK,QAAQ;AAAA,IAElC,CAEH;AAAA,EACL;AACA,SAAAW,EAAaJ,CAAQ,GACdG;AACX,GAGaE,IAAkB,CAACH,GAAYT,MAAmB;;AAC3D,QAAMa,IAAOb,EAAK,MACZc,IAAUd,EAAK,WAAW,IAC1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IAAe,SAASkB,IAAe,WAC/EA,IAAA;AAAA,EAAC;AAAA,EAAU;AAAA,EAAe;AAAA,EAAY;AAAA,EAAa;AAAA,EACtD;AAAA,EAAiB;AAAA,EAAQ;AAAA,EAAa;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAc;AAAA,EAAQ;AAAA,EAAS;AAAe,EAAA,SAASlB,CAAI,IAAI,QAAQkB,GACpIA,KAASD,KAAe,MAGtBE,IAAe,CAACF,GAAiBC,IAAe,gBAClDA,KAAQD,KAAc,KAIpBG,IAAa,CAACC,IAAgB,CAAA,GAAIjC,GAAYkC,GAAOnC,MAAmB;;AACtE,aAAAoC,KAAQnC,EAAM,QAAQ;AACvB,UAAAoC,IAAWD,EAAK,MAAM,WAAW,EAAE,KAAK,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AAE9D,QAAIE,IAAc;AAClB,QAAI,CAACD;AACD;AAGA,IAAAH,EAAI,SAASG,CAAQ,KAAKL,EAAahC,EAAK,GAAG,IAAI,MAAMqC,MAAaD,MAEtEE,KAASlB,KAAAD,IAAAlB,EAAM,QAAOmC,OAAb,gBAAAhB,EAAA,KAAAD,GAAqBnB,IAE9BuC,EAAaD,CAAM,MAAMH,EAAME,CAAQ,IAAI,MAAMC;AAAA,EAEzD;AACJ;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/utils/index.ts"],"sourcesContent":["import {isSlotsValue} from '@packages/utils/tools'\n\nexport const labelMouseEnter = (e: MouseEvent, item: any, _this: any) => {\n const el = (e.target as any).parentElement.parentElement\n const labelEl = window.getComputedStyle(el, null)\n const isRequried = item.rules ? 12 : item.beforeWidth || 0\n const labelWidth\n = parseInt(labelEl.getPropertyValue('max-width')) - isRequried\n - parseInt(labelEl.getPropertyValue('padding-right'))\n const tooltipWidth = (e.target as any).previousElementSibling.offsetWidth\n console.log('tooltipWidth', tooltipWidth)\n if (tooltipWidth >= labelWidth) {\n _this.form.formItem[item.key].labelDisabled = false\n\n } else {\n _this.form.formItem[item.key].labelDisabled = true\n }\n}\n\nexport const findTreeNode = (treeData: any, key: string, value: string) => {\n const result: any[] = []\n function filterResult(treeData: any) {\n treeData.forEach((item: any) => {\n if (item) {\n if ((Array.isArray(value) && value.includes(item[key])) || value === item[key]) {\n result.push(item)\n }\n if (item.children && item.children.length) {\n filterResult(item.children)\n }\n }\n\n })\n }\n filterResult(treeData)\n return result\n}\n\n\nexport const getTooltipValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n if (['input', 'input-autocomplete', 'input-number'].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n\n let optValue = ['select-v2'].includes(type) ? options.props && options.props.value : options.value\n optValue = optValue || 'value'\n let optLabel = ['select-v2'].includes(type) ? options.props && options.props.label : options.label\n optLabel = optLabel || 'label'\n\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : optValue, newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[optLabel])\n })\n if (tempArr && tempArr.length) {\n return tempArr.join(',')\n }\n return value\n }\n } else if (['cascader'].includes(type)) {\n if (options && options.options && options.options.length) {\n if (options.props?.emitPath === undefined || options.props?.emitPath === true) {\n value = value && value[0]\n }\n\n const selectItem = findTreeNode(options.options, options.props?.value || 'value', value)[0]\n return selectItem && selectItem[options.props?.label || 'label']\n }\n }\n return null\n}\n\nexport const getSpanValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n\n\n if (['input', 'input-autocomplete', 'input-number', 'textarea', 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2', 'radio', 'radio-button', 'checkbox', 'checkbox-button'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n let optValue = ['select-v2'].includes(type) ? options.props && options.props.value : options.value\n optValue = optValue || 'value'\n let optLabel = ['select-v2'].includes(type) ? options.props && options.props.label : options.label\n optLabel = optLabel || 'label'\n\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : optValue, newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[optLabel])\n })\n if (tempArr && tempArr.length) {\n return tempArr.join(',')\n }\n return value\n }\n } else if (['cascader'].includes(type)) {\n if (options && options.options && options.options.length) {\n if (options.props?.emitPath === undefined || options.props?.emitPath === true) {\n value = value && value[0]\n }\n\n const selectItem = findTreeNode(options.options, options.props?.value || 'value', value)[0]\n return selectItem && selectItem[options.props?.label || 'label']\n }\n }\n return null\n}\n\nexport const valueMouseEnter = (e: MouseEvent, item: any, value: any, _this) => {\n const showCom = ['input', 'input-autocomplete', 'cascader', 'input-number', 'select', 'tree-select', 'select-v2']\n\n if (!value || (!showCom.includes(item.type) && item.showLabel !== true)) {\n _this.form.formItem[item.key].tempValueDisabled = true\n return\n }\n let el: HTMLElement | null = null\n if (item.showLabel) {\n el = e.target as any\n } else if (['input', 'input-autocomplete', 'cascader', 'input-number'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-input__inner') || (e.target as any).parentElement.querySelector('.busy-input__inner') as HTMLElement\n } else if (['select', 'tree-select', 'select-v2'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-select__selected-item.el-select__placeholder') || (e.target as any).parentElement.querySelector('.busy-select__selected-item.el-select__placeholder') as HTMLElement\n el = el || (e.target as any).parentElement.querySelector('.el-select__selection') || (e.target as any).parentElement.querySelector('.busy-select__selection') as HTMLElement\n }\n\n\n if (el) {\n const inputEl = window.getComputedStyle(el, null)\n const textWidth\n = el.offsetWidth\n - parseInt(inputEl.getPropertyValue('padding-right'))\n - parseInt(inputEl.getPropertyValue('padding-left'))\n const tooltipEl = (e.target as any).previousElementSibling\n const tooltipWidth = tooltipEl.offsetWidth\n\n console.log(tooltipWidth, textWidth)\n if (tooltipWidth >= textWidth) {\n _this.form.formItem[item.key].tempValueDisabled = false\n } else {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n }\n } else {\n _this.form.formItem[item.key].tempValueDisabled = true\n }\n\n}\n\nexport const customPlaceholder = (customName: any, type: string = 'input', name: string = '请输入') => {\n name = ['select', 'tree-select', 'cascader', 'select-v2', 'datetime',\n 'datetimerange', 'date', 'daterange', 'dates', 'week', 'month', 'monthrange', 'year', 'years', 'time-picker', 'radio', 'radio-button'].includes(type) ? '请选择' : name\n return name + ((customName) || '')\n}\n\nexport const formItemSlot = (customName: any, name: string = 'formItem_') => {\n return name + (customName || '')\n}\n\n\nexport const renderSlot = (arr: string[] = [], _this: any, slots, item: any): any => {\n for (const prop in _this.$slots) {\n const slotName = prop.split('formItem_').join('').split('_')[1]\n\n let slotFn: any = null\n if (!slotName) {\n return\n }\n\n if (arr.includes(slotName) && formItemSlot(item.key) + '_' + slotName === prop) {\n\n slotFn = _this.$slots[prop]?.(item)\n // eslint-disable-next-line consistent-return\n isSlotsValue(slotFn) && (slots[slotName] = () => slotFn)\n }\n }\n}\n"],"names":["labelMouseEnter","e","item","_this","el","labelEl","isRequried","labelWidth","tooltipWidth","findTreeNode","treeData","key","value","result","filterResult","getTooltipValue","type","options","tempArr","newVal","optValue","optLabel","_a","_b","selectItem","_c","_d","getSpanValue","valueMouseEnter","inputEl","textWidth","customPlaceholder","customName","name","formItemSlot","renderSlot","arr","slots","prop","slotName","slotFn","isSlotsValue"],"mappings":";AAEO,MAAMA,IAAkB,CAACC,GAAeC,GAAWC,MAAe;AAC/D,QAAAC,IAAMH,EAAE,OAAe,cAAc,eACrCI,IAAU,OAAO,iBAAiBD,GAAI,IAAI,GAC1CE,IAAaJ,EAAK,QAAQ,KAAKA,EAAK,eAAe,GACnDK,IACA,SAASF,EAAQ,iBAAiB,WAAW,CA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