@dinert/element-plus 1.1.36 → 1.1.38
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 +2 -2
- package/dist/element-plus.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/es/packages/assets/scss/dinert-form.scss +20 -2
- package/es/packages/components/form/src/checkbox.mjs +13 -11
- package/es/packages/components/form/src/checkbox.mjs.map +1 -1
- package/es/packages/components/form/src/index.mjs +42 -36
- package/es/packages/components/form/src/index.mjs.map +1 -1
- package/es/packages/components/form/src/radio.mjs +13 -11
- package/es/packages/components/form/src/radio.mjs.map +1 -1
- package/es/packages/components/form/utils/index.mjs +14 -14
- package/es/packages/components/form/utils/index.mjs.map +1 -1
- package/es/packages/components/table/src/index.mjs +115 -111
- package/es/packages/components/table/src/index.mjs.map +1 -1
- package/es/src/components/form/types/index.d.ts +2 -1
- 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 +2 -1
- 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-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,.el-form.dinert-form .dinert-form-left .el-col .label-text>div>.el-cascader{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{position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.el-form.dinert-form div.el-form-item.show-label .label-text{overflow:unset;text-overflow:unset;white-space:unset}.el-form.dinert-form div.el-form-item.label-wrap .el-form-item__label{height:auto}.el-form.dinert-form div.el-form-item.label-wrap .el-form-item__label .label-text{display:inline;text-align:left;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 .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}
|
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
width: auto;
|
|
25
25
|
max-width: unset;
|
|
26
26
|
flex: unset;
|
|
27
|
+
|
|
28
|
+
.label-text {
|
|
29
|
+
& > div > .#{$namespace}-cascader {
|
|
30
|
+
width: 210px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
}
|
|
29
35
|
|
|
@@ -83,7 +89,7 @@
|
|
|
83
89
|
width: 210px;
|
|
84
90
|
}
|
|
85
91
|
|
|
86
|
-
& > .#{$namespace}-select
|
|
92
|
+
& > .#{$namespace}-select {
|
|
87
93
|
width: 210px;
|
|
88
94
|
}
|
|
89
95
|
|
|
@@ -108,7 +114,7 @@
|
|
|
108
114
|
}
|
|
109
115
|
}
|
|
110
116
|
|
|
111
|
-
div.#{$namespace}-form-item {
|
|
117
|
+
div.#{$namespace}-form-item:not(.#{$namespace}-form-item--label-top) {
|
|
112
118
|
position: relative;
|
|
113
119
|
display: flex;
|
|
114
120
|
margin-right: 0;
|
|
@@ -136,6 +142,18 @@
|
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
div.#{$namespace}-form-item.#{$namespace}-form-item--label-top {
|
|
146
|
+
margin-right: 0;
|
|
147
|
+
|
|
148
|
+
.#{$namespace}-form-item__label {
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.dinert-tooltip.#{$namespace}-tooltip__trigger .label-text {
|
|
153
|
+
white-space: normal;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
139
157
|
.#{$namespace}-form-item__content {
|
|
140
158
|
flex: 1;
|
|
141
159
|
margin-left: 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
function
|
|
3
|
-
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !
|
|
1
|
+
import { defineComponent as p, computed as i, createVNode as n, resolveComponent as s, mergeProps as r, isVNode as u } from "vue";
|
|
2
|
+
function a(o) {
|
|
3
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !u(o);
|
|
4
4
|
}
|
|
5
|
-
const
|
|
5
|
+
const h = /* @__PURE__ */ p({
|
|
6
6
|
name: "dinert-checkbox",
|
|
7
7
|
props: {
|
|
8
8
|
form: {
|
|
@@ -16,21 +16,23 @@ const a = /* @__PURE__ */ r({
|
|
|
16
16
|
},
|
|
17
17
|
setup(o) {
|
|
18
18
|
return {
|
|
19
|
-
options:
|
|
19
|
+
options: i(() => o.formItem.options || {})
|
|
20
20
|
};
|
|
21
21
|
},
|
|
22
22
|
render() {
|
|
23
|
+
var e;
|
|
23
24
|
let o;
|
|
24
|
-
const
|
|
25
|
-
return
|
|
25
|
+
const l = this.options.options || [];
|
|
26
|
+
return n(s("el-checkbox-group"), {
|
|
26
27
|
modelValue: this.form.model[this.formItem.key],
|
|
27
|
-
"onUpdate:modelValue": (t) => this.form.model[this.formItem.key] = t
|
|
28
|
-
|
|
28
|
+
"onUpdate:modelValue": (t) => this.form.model[this.formItem.key] = t,
|
|
29
|
+
onChange: (e = this.options) == null ? void 0 : e.onChange
|
|
30
|
+
}, a(o = l.map((t) => this.formItem.type === "checkbox-button" ? n(s("el-checkbox-button"), r(t, {
|
|
29
31
|
value: t[this.options.value || "value"]
|
|
30
32
|
}), {
|
|
31
33
|
default: () => [t[this.options.label || "label"]],
|
|
32
34
|
...this.$slots
|
|
33
|
-
}) :
|
|
35
|
+
}) : n(s("el-checkbox"), r(t, {
|
|
34
36
|
value: t[this.options.value || "value"]
|
|
35
37
|
}), {
|
|
36
38
|
default: () => [t[this.options.label || "label"]],
|
|
@@ -41,6 +43,6 @@ const a = /* @__PURE__ */ r({
|
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
h as default
|
|
45
47
|
};
|
|
46
48
|
//# sourceMappingURL=checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","sources":["../../../../../packages/components/form/src/checkbox.tsx"],"sourcesContent":["import {computed, defineComponent, PropType} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\nexport default defineComponent({\n name: 'dinert-checkbox',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['checkbox']>(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options,\n }\n },\n render() {\n const options = this.options.options || []\n return (\n <el-checkbox-group v-model={this.form.model[this.formItem.key]}>\n {\n options.map(item => {\n if (this.formItem.type === 'checkbox-button') {\n return (<el-checkbox-button\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n </el-checkbox-button>)\n }\n\n return (<el-checkbox\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n </el-checkbox>)\n })\n }\n </el-checkbox-group>\n\n )\n }\n})\n\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","formItem","setup","options","computed","render","_slot","_createVNode","_resolveComponent","model","key","$event","map","item","_mergeProps","value","label","$slots"],"mappings":";AAAuD,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAIvD,MAAeM,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNF,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;AAOT,WAAO;AAAA,MACHM,SANYC,EAAqE,MACjEP,EAAMI,SAASE,WAAW,CAAA,CAE7C;AAAA;EAKJ;AAAA,EACDE,SAAS
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","sources":["../../../../../packages/components/form/src/checkbox.tsx"],"sourcesContent":["import {computed, defineComponent, PropType} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\nexport default defineComponent({\n name: 'dinert-checkbox',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['checkbox']>(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options,\n }\n },\n render() {\n const options = this.options.options || []\n return (\n <el-checkbox-group v-model={this.form.model[this.formItem.key]} onChange={this.options?.onChange}>\n {\n options.map(item => {\n if (this.formItem.type === 'checkbox-button') {\n return (<el-checkbox-button\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n </el-checkbox-button>)\n }\n\n return (<el-checkbox\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n </el-checkbox>)\n })\n }\n </el-checkbox-group>\n\n )\n }\n})\n\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","formItem","setup","options","computed","render","_slot","_createVNode","_resolveComponent","model","key","$event","_a","onChange","map","item","_mergeProps","value","label","$slots"],"mappings":";AAAuD,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAIvD,MAAeM,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNF,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;AAOT,WAAO;AAAA,MACHM,SANYC,EAAqE,MACjEP,EAAMI,SAASE,WAAW,CAAA,CAE7C;AAAA;EAKJ;AAAA,EACDE,SAAS;;AAAA,QAAAC;AACL,UAAMH,IAAU,KAAKA,QAAQA,WAAW,CAAA;AACxC,WAAAI,EAAAC,EAAA,mBAAA,GAAA;AAAA,MAAA,YACgC,KAAKV,KAAKW,MAAM,KAAKR,SAASS,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKb,KAAKW,MAAM,KAAKR,SAASS,GAAG,IAACC;AAAAA,MAAA,WAAYC,IAAA,KAAKT,YAAL,gBAAAS,EAAcC;AAAAA,IAAQzB,GAAAA,EAAAkB,IAExFH,EAAQW,IAAIC,CAAAA,MACJ,KAAKd,SAASF,SAAS,oBACvBQ,EAAAC,EAAAQ,oBAAAA,GAAAA,EACQD,GAAI;AAAA,MAAA,OAEDA,EAAK,KAAKZ,QAAQc,SAAS,OAAO;AAAA,IAAC,CAAA,GAAA;AAAA,MAAAjB,SAAAA,MAEzCe,CAAAA,EAAK,KAAKZ,QAAQe,SAAS,OAAO,CAAC;AAAA,MAAA,GAH3B,KAAKC;AAAAA,IAAM,CAAA,IAO5BZ,EAAAC,EAAAQ,aAAAA,GAAAA,EACQD,GAAI;AAAA,MAAA,OAEDA,EAAK,KAAKZ,QAAQc,SAAS,OAAO;AAAA,IAAC,CAAA,GAAA;AAAA,MAAAjB,SAAAA,MAEzCe,CAAAA,EAAK,KAAKZ,QAAQe,SAAS,OAAO,CAAC;AAAA,MAAA,GAH3B,KAAKC;AAAAA,IAAM,CAAA,CAK3B,CAAC,IAAAb,IAAA;AAAA,MAAAN,SAAAA,MAAA,CAAAM,CAAA;AAAA,IAAA,CAAA;AAAA,EAKlB;AACJ,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as R, toRefs as F, ref as
|
|
1
|
+
import { defineComponent as R, toRefs as F, ref as k, onBeforeUpdate as I, computed as C, createVNode as t, resolveComponent as i, mergeProps as h, withModifiers as T, Fragment as S, isVNode as _, nextTick as x } from "vue";
|
|
2
2
|
import L from "./input.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import $ from "./input-number.mjs";
|
|
4
|
+
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";
|
|
@@ -15,12 +15,12 @@ import N from "./slider.mjs";
|
|
|
15
15
|
import P from "./time-picker.mjs";
|
|
16
16
|
import z from "./time-select.mjs";
|
|
17
17
|
import H from "../../../hooks/useWindowResize.mjs";
|
|
18
|
-
import { customPlaceholder as v, labelMouseEnter as W, getTooltipValue as G, valueMouseEnter as J, getSpanValue as K,
|
|
18
|
+
import { customPlaceholder as v, formItemSlot as c, labelMouseEnter as W, getTooltipValue as G, valueMouseEnter as J, getSpanValue as K, renderSlot as m } from "../utils/index.mjs";
|
|
19
19
|
import { getUuid as Q, dataTransformRod as X } from "../../../utils/tools.mjs";
|
|
20
20
|
import { ArrowUp as Y, ArrowDown as Z } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
21
21
|
import "../../../assets/scss/dinert-form.scss.mjs";
|
|
22
22
|
function ee(u) {
|
|
23
|
-
return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !
|
|
23
|
+
return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !_(u);
|
|
24
24
|
}
|
|
25
25
|
const Fe = /* @__PURE__ */ R({
|
|
26
26
|
name: "dinert-form",
|
|
@@ -40,35 +40,35 @@ const Fe = /* @__PURE__ */ R({
|
|
|
40
40
|
}) {
|
|
41
41
|
const {
|
|
42
42
|
form: a
|
|
43
|
-
} = F(u), l =
|
|
43
|
+
} = F(u), l = k(a.value.packUp === void 0), p = k(!1), g = k(), f = k({}), d = (n, o) => {
|
|
44
44
|
f.value[n] = o;
|
|
45
|
-
},
|
|
46
|
-
|
|
45
|
+
}, w = k("form_" + Q());
|
|
46
|
+
I(() => {
|
|
47
47
|
f.value = {};
|
|
48
48
|
});
|
|
49
|
-
const r =
|
|
49
|
+
const r = C(() => {
|
|
50
50
|
const n = [];
|
|
51
51
|
return Object.keys(a.value.formItem).forEach((o) => {
|
|
52
|
-
const
|
|
52
|
+
const b = a.value.formItem[o];
|
|
53
53
|
n.push({
|
|
54
|
-
...
|
|
54
|
+
...b,
|
|
55
55
|
key: o
|
|
56
56
|
});
|
|
57
|
-
}), n.sort((o,
|
|
57
|
+
}), n.sort((o, b) => (o.sort || 1 / 0) - (b.sort || 1 / 0)), n;
|
|
58
58
|
}), s = () => {
|
|
59
|
-
let n = document.querySelectorAll(`.${
|
|
60
|
-
n[0] && (p.value = !1,
|
|
61
|
-
const o = n[0].getBoundingClientRect().top,
|
|
62
|
-
o !==
|
|
59
|
+
let n = document.querySelectorAll(`.${w.value} .dinert-form-left > div`);
|
|
60
|
+
n[0] && (p.value = !1, x(() => {
|
|
61
|
+
const o = n[0].getBoundingClientRect().top, b = n[n.length - 1].getBoundingClientRect().top;
|
|
62
|
+
o !== b ? p.value = !0 : (l.value || (l.value = !0), p.value = !1), n = null;
|
|
63
63
|
}));
|
|
64
64
|
};
|
|
65
65
|
return H(() => {
|
|
66
66
|
s();
|
|
67
67
|
}, 100, !0), {
|
|
68
68
|
formItemMap: r,
|
|
69
|
-
formClass:
|
|
69
|
+
formClass: w,
|
|
70
70
|
formTypeRef: f,
|
|
71
|
-
formRef:
|
|
71
|
+
formRef: g,
|
|
72
72
|
packUp: l,
|
|
73
73
|
isArrow: p,
|
|
74
74
|
setFormTypeRefs: d,
|
|
@@ -101,16 +101,16 @@ const Fe = /* @__PURE__ */ R({
|
|
|
101
101
|
placeholder: v(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type),
|
|
102
102
|
...e.options
|
|
103
103
|
}, p || (a.display = "none"), l) {
|
|
104
|
-
const
|
|
104
|
+
const g = typeof this.form.showLabel == "function" ? this.form.showLabel(this.form.model) : this.form.showLabel;
|
|
105
105
|
let f = 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, f = f === void 0 ? f ||
|
|
106
|
+
e.required = e.required === void 0 ? e.required || this.form.required : e.required, f = f === void 0 ? f || g : f, e.required = f ? !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
112
|
}].concat(d) : d, d = f ? [] : d;
|
|
113
|
-
const
|
|
113
|
+
const w = f ? !0 : e.tempValueDisabled;
|
|
114
114
|
return t(i("el-col"), h({
|
|
115
115
|
style: a,
|
|
116
116
|
class: [e.type, e.key],
|
|
@@ -133,31 +133,37 @@ const Fe = /* @__PURE__ */ R({
|
|
|
133
133
|
label: typeof e.label == "function" ? e.label(this.form.model) : e.label,
|
|
134
134
|
rules: d
|
|
135
135
|
}), {
|
|
136
|
-
label: () =>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
label: () => {
|
|
137
|
+
var r, s;
|
|
138
|
+
return this.$slots[c(e.key, "formItem_label_")] ? (s = (r = this.$slots)[c(e.key, "formItem_label_")]) == null ? void 0 : s.call(r, {
|
|
139
|
+
...e,
|
|
140
|
+
model: this.form.model
|
|
141
|
+
}) : t(i("dinert-tooltip"), {
|
|
142
|
+
key: e.key,
|
|
143
|
+
content: typeof e.label == "function" ? e.label(this.form.model) : e.label,
|
|
144
|
+
disabled: e.labelDisabled,
|
|
145
|
+
onLabelMouseEnter: (y) => W(y, e, this)
|
|
146
|
+
}, null);
|
|
147
|
+
},
|
|
142
148
|
default: () => t(i("dinert-tooltip"), {
|
|
143
149
|
key: e.key,
|
|
144
150
|
content: String(G(this.form.model[e.key], e)),
|
|
145
|
-
disabled:
|
|
151
|
+
disabled: w,
|
|
146
152
|
item: e,
|
|
147
153
|
onLabelMouseEnter: (r) => J(r, e, this.form.model[e.key], this)
|
|
148
154
|
}, {
|
|
149
155
|
// eslint-disable-next-line max-statements
|
|
150
156
|
default: () => {
|
|
151
|
-
var
|
|
157
|
+
var y, n;
|
|
152
158
|
const r = {};
|
|
153
159
|
let s = t("span", null, [X(K(this.form.model[e.key], e))]);
|
|
154
|
-
if (this.$slots[
|
|
155
|
-
s = (n = (
|
|
160
|
+
if (this.$slots[c(e.key)])
|
|
161
|
+
s = (n = (y = this.$slots)[c(e.key)]) == null ? void 0 : n.call(y, {
|
|
156
162
|
...e,
|
|
157
163
|
model: this.form.model
|
|
158
164
|
});
|
|
159
165
|
else {
|
|
160
|
-
if (f ||
|
|
166
|
+
if (f || g && [!0, void 0].includes(f))
|
|
161
167
|
return s;
|
|
162
168
|
["input", "textarea"].includes(e.type) ? (m(["prefix", "suffix", "prepend", "append"], this, r, e), s = t(L, {
|
|
163
169
|
form: this.form,
|
|
@@ -166,11 +172,11 @@ const Fe = /* @__PURE__ */ R({
|
|
|
166
172
|
this.$emit("SearchFn");
|
|
167
173
|
},
|
|
168
174
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
169
|
-
}, r)) : ["input-number"].includes(e.type) ? (m(["decrease-icon", "increase-icon"], this, r, e), s = t(
|
|
175
|
+
}, r)) : ["input-number"].includes(e.type) ? (m(["decrease-icon", "increase-icon"], this, r, e), s = t($, {
|
|
170
176
|
form: this.form,
|
|
171
177
|
formItem: e,
|
|
172
178
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
173
|
-
}, r)) : ["input-autocomplete"].includes(e.type) ? (m(["prefix", "suffix", "prepend", "append", "loading"], this, r, e), s = t(
|
|
179
|
+
}, r)) : ["input-autocomplete"].includes(e.type) ? (m(["prefix", "suffix", "prepend", "append", "loading"], this, r, e), s = t(U, {
|
|
174
180
|
form: this.form,
|
|
175
181
|
formItem: e,
|
|
176
182
|
ref: (o) => this.setFormTypeRefs(e.key, o)
|
|
@@ -228,14 +234,14 @@ const Fe = /* @__PURE__ */ R({
|
|
|
228
234
|
},
|
|
229
235
|
defaultAfter: () => {
|
|
230
236
|
var r, s;
|
|
231
|
-
return (s = (r = this.$slots)[
|
|
237
|
+
return (s = (r = this.$slots)[c("after_" + e.key)]) == null ? void 0 : s.call(r, {
|
|
232
238
|
...e,
|
|
233
239
|
model: this.form.model
|
|
234
240
|
});
|
|
235
241
|
},
|
|
236
242
|
defaultBefore: () => {
|
|
237
243
|
var r, s;
|
|
238
|
-
return (s = (r = this.$slots)[
|
|
244
|
+
return (s = (r = this.$slots)[c("before_" + e.key)]) == null ? void 0 : s.call(r, {
|
|
239
245
|
...e,
|
|
240
246
|
model: this.form.model
|
|
241
247
|
});
|
|
@@ -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 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","labelDisabled","e","labelMouseEnter","String","getTooltipValue","valueMouseEnter","slots","componentResult","dataTransformRod","getSpanValue","$slots","formItemSlot","_b","_a","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,QAAQ;IACxB,CAAC;AAED,UAAMU,IAAcC,EAAS,MAAM;AAC/B,YAAMC,IAAc,CAAA;AACpB/B,oBAAOgC,K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AAAA,YAAAlH,SAAAA,MAAA;;AAAA,wBAC3BsF,IAAA,KAAKxF,KAAKoH,gBAAV,gBAAA5B,EAAuBnB,YAAW,IAAI;AAAA;AAAA,UAE/C,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA,OAEA,GAGL,KAAKgB,OAAOgC,0BAAsBtE,EAAAC,EAAA,QAAA,GAAA;AAAA,QAAA,OAC5B;AAAA,MAAqB,GAAA;AAAA,QAAA9C,SAAAA,MAAAA;;AAClC,mBAAAqF,KAAAC,IAAA,KAAKH,QAAOgC,2BAAZ,gBAAA9B,EAAA,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 = 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,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,IA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import { defineComponent as i, computed as a, createVNode as n, resolveComponent as s, mergeProps as l, isVNode as p } from "vue";
|
|
2
|
+
function u(o) {
|
|
3
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !p(o);
|
|
4
4
|
}
|
|
5
|
-
const
|
|
5
|
+
const m = /* @__PURE__ */ i({
|
|
6
6
|
name: "dinert-radio",
|
|
7
7
|
props: {
|
|
8
8
|
form: {
|
|
@@ -16,21 +16,23 @@ const d = /* @__PURE__ */ l({
|
|
|
16
16
|
},
|
|
17
17
|
setup(o) {
|
|
18
18
|
return {
|
|
19
|
-
options:
|
|
19
|
+
options: a(() => o.formItem.options || {})
|
|
20
20
|
};
|
|
21
21
|
},
|
|
22
22
|
render() {
|
|
23
|
+
var e;
|
|
23
24
|
let o;
|
|
24
|
-
const
|
|
25
|
-
return
|
|
25
|
+
const r = this.options.options || [];
|
|
26
|
+
return n(s("el-radio-group"), {
|
|
26
27
|
modelValue: this.form.model[this.formItem.key],
|
|
27
|
-
"onUpdate:modelValue": (t) => this.form.model[this.formItem.key] = t
|
|
28
|
-
|
|
28
|
+
"onUpdate:modelValue": (t) => this.form.model[this.formItem.key] = t,
|
|
29
|
+
onChange: (e = this.options) == null ? void 0 : e.onChange
|
|
30
|
+
}, u(o = r.map((t) => this.formItem.type === "radio-button" ? n(s("el-radio-button"), l(t, {
|
|
29
31
|
value: t[this.options.value || "value"]
|
|
30
32
|
}), {
|
|
31
33
|
default: () => [t[this.options.label || "label"]],
|
|
32
34
|
...this.$slots
|
|
33
|
-
}) :
|
|
35
|
+
}) : n(s("el-radio"), l(t, {
|
|
34
36
|
value: t[this.options.value || "value"]
|
|
35
37
|
}), {
|
|
36
38
|
default: () => [t[this.options.label || "label"]],
|
|
@@ -41,6 +43,6 @@ const d = /* @__PURE__ */ l({
|
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
m as default
|
|
45
47
|
};
|
|
46
48
|
//# sourceMappingURL=radio.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.mjs","sources":["../../../../../packages/components/form/src/radio.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nexport default defineComponent({\n name: 'dinert-radio',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['radio']>(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options\n }\n },\n render() {\n const options = this.options.options || []\n\n return (\n <el-radio-group v-model={this.form.model[this.formItem.key]}>\n {\n options.map(item => {\n if (this.formItem.type === 'radio-button') {\n return (<el-radio-button\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n\n </el-radio-button>)\n }\n return (<el-radio\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n\n </el-radio>)\n })\n }\n\n </el-radio-group>\n )\n }\n})\n\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","formItem","setup","options","computed","render","_slot","_createVNode","_resolveComponent","model","key","$event","map","item","_mergeProps","value","label","$slots"],"mappings":";AAA6C,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAM7C,MAAeM,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNF,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;AAOT,WAAO;AAAA,MACHM,SANYC,EAAkE,MAC9DP,EAAMI,SAASE,WAAW,CAAA,CAE7C;AAAA;EAKJ;AAAA,EACDE,SAAS
|
|
1
|
+
{"version":3,"file":"radio.mjs","sources":["../../../../../packages/components/form/src/radio.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nexport default defineComponent({\n name: 'dinert-radio',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['radio']>(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options\n }\n },\n render() {\n const options = this.options.options || []\n\n return (\n <el-radio-group v-model={this.form.model[this.formItem.key]} onChange={this.options?.onChange}>\n {\n options.map(item => {\n if (this.formItem.type === 'radio-button') {\n return (<el-radio-button\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n\n </el-radio-button>)\n }\n return (<el-radio\n {...item}\n v-slots={this.$slots}\n value={item[this.options.value || 'value']}\n >\n {item[this.options.label || 'label']}\n\n </el-radio>)\n })\n }\n\n </el-radio-group>\n )\n }\n})\n\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","formItem","setup","options","computed","render","_slot","_createVNode","_resolveComponent","model","key","$event","_a","onChange","map","item","_mergeProps","value","label","$slots"],"mappings":";AAA6C,SAAAA,EAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAM7C,MAAeM,sBAAgB;AAAA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