fast-element-plus 1.0.0 → 1.0.1
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/Fast.png +0 -0
- package/LICENSE +201 -0
- package/README.md +164 -0
- package/README.zh.md +164 -0
- package/dist/index.full.js +28446 -0
- package/dist/index.full.js.map +1 -0
- package/dist/index.full.min.js +36 -0
- package/dist/index.full.min.js.map +1 -0
- package/dist/index.full.min.mjs +36 -0
- package/dist/index.full.min.mjs.map +1 -0
- package/dist/index.full.mjs +28445 -0
- package/dist/index.full.mjs.map +1 -0
- package/dist/styles/index.css +984 -0
- package/dist/styles/index.css.map +1 -0
- package/es/component.d.ts +3 -0
- package/es/component.mjs +52 -0
- package/es/component.mjs.map +1 -0
- package/es/components/avatar/index.d.ts +14 -0
- package/es/components/avatar/index.mjs +8 -0
- package/es/components/avatar/index.mjs.map +1 -0
- package/es/components/avatar/src/avatar.d.ts +96 -0
- package/es/components/avatar/src/avatar.mjs +76 -0
- package/es/components/avatar/src/avatar.mjs.map +1 -0
- package/es/components/button/index.d.ts +15 -0
- package/es/components/button/index.mjs +11 -0
- package/es/components/button/index.mjs.map +1 -0
- package/es/components/button/src/button.d.ts +173 -0
- package/es/components/button/src/button.mjs +118 -0
- package/es/components/button/src/button.mjs.map +1 -0
- package/es/components/carNumber/index.d.ts +9 -0
- package/es/components/carNumber/index.mjs +12 -0
- package/es/components/carNumber/index.mjs.map +1 -0
- package/es/components/carNumber/src/carNumber.d.ts +217 -0
- package/es/components/carNumber/src/carNumber.mjs +164 -0
- package/es/components/carNumber/src/carNumber.mjs.map +1 -0
- package/es/components/carNumber/src/common.d.ts +15 -0
- package/es/components/carNumber/src/common.mjs +75 -0
- package/es/components/carNumber/src/common.mjs.map +1 -0
- package/es/components/contextMenu/index.d.ts +9 -0
- package/es/components/contextMenu/index.mjs +9 -0
- package/es/components/contextMenu/index.mjs.map +1 -0
- package/es/components/contextMenu/src/contextMenu.d.ts +32 -0
- package/es/components/contextMenu/src/contextMenu.mjs +85 -0
- package/es/components/contextMenu/src/contextMenu.mjs.map +1 -0
- package/es/components/contextMenu/src/contextMenu.type.d.ts +33 -0
- package/es/components/contextMenu/src/contextMenu.type.mjs +2 -0
- package/es/components/contextMenu/src/contextMenu.type.mjs.map +1 -0
- package/es/components/dialog/index.d.ts +14 -0
- package/es/components/dialog/index.mjs +11 -0
- package/es/components/dialog/index.mjs.map +1 -0
- package/es/components/dialog/src/dialog.d.ts +454 -0
- package/es/components/dialog/src/dialog.mjs +285 -0
- package/es/components/dialog/src/dialog.mjs.map +1 -0
- package/es/components/drawer/index.d.ts +14 -0
- package/es/components/drawer/index.mjs +8 -0
- package/es/components/drawer/index.mjs.map +1 -0
- package/es/components/drawer/src/drawer.d.ts +449 -0
- package/es/components/drawer/src/drawer.mjs +284 -0
- package/es/components/drawer/src/drawer.mjs.map +1 -0
- package/es/components/form/index.d.ts +23 -0
- package/es/components/form/index.mjs +19 -0
- package/es/components/form/index.mjs.map +1 -0
- package/es/components/form/src/form.d.ts +194 -0
- package/es/components/form/src/form.mjs +109 -0
- package/es/components/form/src/form.mjs.map +1 -0
- package/es/components/form/src/formItem.d.ts +190 -0
- package/es/components/form/src/formItem.mjs +117 -0
- package/es/components/form/src/formItem.mjs.map +1 -0
- package/es/components/form/utils/form.d.ts +81 -0
- package/es/components/form/utils/form.mjs +217 -0
- package/es/components/form/utils/form.mjs.map +1 -0
- package/es/components/formItemTip/index.d.ts +12 -0
- package/es/components/formItemTip/index.mjs +10 -0
- package/es/components/formItemTip/index.mjs.map +1 -0
- package/es/components/formItemTip/src/formItemTip.d.ts +22 -0
- package/es/components/formItemTip/src/formItemTip.mjs +38 -0
- package/es/components/formItemTip/src/formItemTip.mjs.map +1 -0
- package/es/components/icon/index.d.ts +12 -0
- package/es/components/icon/index.mjs +8 -0
- package/es/components/icon/index.mjs.map +1 -0
- package/es/components/icon/src/icon.d.ts +39 -0
- package/es/components/icon/src/icon.mjs +69 -0
- package/es/components/icon/src/icon.mjs.map +1 -0
- package/es/components/iconSelector/index.d.ts +7 -0
- package/es/components/iconSelector/index.mjs +8 -0
- package/es/components/iconSelector/index.mjs.map +1 -0
- package/es/components/iconSelector/src/iconSelector.d.ts +23 -0
- package/es/components/iconSelector/src/iconSelector.mjs +143 -0
- package/es/components/iconSelector/src/iconSelector.mjs.map +1 -0
- package/es/components/image/index.d.ts +12 -0
- package/es/components/image/index.mjs +10 -0
- package/es/components/image/index.mjs.map +1 -0
- package/es/components/image/src/image.d.ts +225 -0
- package/es/components/image/src/image.mjs +90 -0
- package/es/components/image/src/image.mjs.map +1 -0
- package/es/components/index.d.ts +21 -0
- package/es/components/index.mjs +100 -0
- package/es/components/index.mjs.map +1 -0
- package/es/components/layoutGrid/index.d.ts +16 -0
- package/es/components/layoutGrid/index.mjs +14 -0
- package/es/components/layoutGrid/index.mjs.map +1 -0
- package/es/components/layoutGrid/src/layoutGrid.d.ts +60 -0
- package/es/components/layoutGrid/src/layoutGrid.mjs +178 -0
- package/es/components/layoutGrid/src/layoutGrid.mjs.map +1 -0
- package/es/components/layoutGrid/src/layoutGrid.type.d.ts +12 -0
- package/es/components/layoutGrid/src/layoutGrid.type.mjs +2 -0
- package/es/components/layoutGrid/src/layoutGrid.type.mjs.map +1 -0
- package/es/components/layoutGrid/src/layoutGridItem.d.ts +100 -0
- package/es/components/layoutGrid/src/layoutGridItem.mjs +97 -0
- package/es/components/layoutGrid/src/layoutGridItem.mjs.map +1 -0
- package/es/components/select/index.d.ts +22 -0
- package/es/components/select/index.mjs +17 -0
- package/es/components/select/index.mjs.map +1 -0
- package/es/components/select/src/select.d.ts +1201 -0
- package/es/components/select/src/select.mjs +559 -0
- package/es/components/select/src/select.mjs.map +1 -0
- package/es/components/select/src/select.type.d.ts +28 -0
- package/es/components/select/src/select.type.mjs +2 -0
- package/es/components/select/src/select.type.mjs.map +1 -0
- package/es/components/select/src/selectOption.d.ts +99 -0
- package/es/components/select/src/selectOption.mjs +71 -0
- package/es/components/select/src/selectOption.mjs.map +1 -0
- package/es/components/selectPage/index.d.ts +14 -0
- package/es/components/selectPage/index.mjs +11 -0
- package/es/components/selectPage/index.mjs.map +1 -0
- package/es/components/selectPage/src/selectPage.d.ts +595 -0
- package/es/components/selectPage/src/selectPage.mjs +381 -0
- package/es/components/selectPage/src/selectPage.mjs.map +1 -0
- package/es/components/selectV2/index.d.ts +14 -0
- package/es/components/selectV2/index.mjs +11 -0
- package/es/components/selectV2/index.mjs.map +1 -0
- package/es/components/selectV2/src/selectV2.d.ts +1407 -0
- package/es/components/selectV2/src/selectV2.mjs +606 -0
- package/es/components/selectV2/src/selectV2.mjs.map +1 -0
- package/es/components/table/images/artwork.png.mjs +5 -0
- package/es/components/table/images/artwork.png.mjs.map +1 -0
- package/es/components/table/images/index.d.ts +4 -0
- package/es/components/table/images/notImage.png.mjs +5 -0
- package/es/components/table/images/notImage.png.mjs.map +1 -0
- package/es/components/table/index.d.ts +35 -0
- package/es/components/table/index.mjs +32 -0
- package/es/components/table/index.mjs.map +1 -0
- package/es/components/table/src/page.type.d.ts +145 -0
- package/es/components/table/src/page.type.mjs +16 -0
- package/es/components/table/src/page.type.mjs.map +1 -0
- package/es/components/table/src/table.d.ts +1382 -0
- package/es/components/table/src/table.mjs +1046 -0
- package/es/components/table/src/table.mjs.map +1 -0
- package/es/components/table/src/table.state.d.ts +115 -0
- package/es/components/table/src/table.state.mjs +2 -0
- package/es/components/table/src/table.state.mjs.map +1 -0
- package/es/components/table/src/table.type.d.ts +316 -0
- package/es/components/table/src/table.type.mjs +14 -0
- package/es/components/table/src/table.type.mjs.map +1 -0
- package/es/components/table/src/tableColumn.d.ts +644 -0
- package/es/components/table/src/tableColumn.mjs +604 -0
- package/es/components/table/src/tableColumn.mjs.map +1 -0
- package/es/components/table/src/tableColumnSettingDialog.d.ts +18 -0
- package/es/components/table/src/tableColumnSettingDialog.mjs +430 -0
- package/es/components/table/src/tableColumnSettingDialog.mjs.map +1 -0
- package/es/components/table/src/tablePagination.d.ts +24 -0
- package/es/components/table/src/tablePagination.mjs +56 -0
- package/es/components/table/src/tablePagination.mjs.map +1 -0
- package/es/components/table/src/tableSearchForm.d.ts +88 -0
- package/es/components/table/src/tableSearchForm.mjs +269 -0
- package/es/components/table/src/tableSearchForm.mjs.map +1 -0
- package/es/components/table/src/tableSearchFormItem.d.ts +37 -0
- package/es/components/table/src/tableSearchFormItem.mjs +121 -0
- package/es/components/table/src/tableSearchFormItem.mjs.map +1 -0
- package/es/components/table/src/useTable.d.ts +32 -0
- package/es/components/table/src/useTable.mjs +374 -0
- package/es/components/table/src/useTable.mjs.map +1 -0
- package/es/components/table/utils/table.d.ts +45 -0
- package/es/components/table/utils/table.mjs +122 -0
- package/es/components/table/utils/table.mjs.map +1 -0
- package/es/components/tree/index.d.ts +15 -0
- package/es/components/tree/index.mjs +12 -0
- package/es/components/tree/index.mjs.map +1 -0
- package/es/components/tree/src/tree.d.ts +668 -0
- package/es/components/tree/src/tree.mjs +364 -0
- package/es/components/tree/src/tree.mjs.map +1 -0
- package/es/components/tree/src/tree.props.d.ts +81 -0
- package/es/components/tree/src/tree.props.mjs +71 -0
- package/es/components/tree/src/tree.props.mjs.map +1 -0
- package/es/components/tree/src/tree.type.d.ts +36 -0
- package/es/components/tree/src/tree.type.mjs +2 -0
- package/es/components/tree/src/tree.type.mjs.map +1 -0
- package/es/components/treeSelect/index.d.ts +14 -0
- package/es/components/treeSelect/index.mjs +11 -0
- package/es/components/treeSelect/index.mjs.map +1 -0
- package/es/components/treeSelect/src/treeSelect.d.ts +1063 -0
- package/es/components/treeSelect/src/treeSelect.mjs +492 -0
- package/es/components/treeSelect/src/treeSelect.mjs.map +1 -0
- package/es/components/upload/index.d.ts +15 -0
- package/es/components/upload/index.mjs +11 -0
- package/es/components/upload/index.mjs.map +1 -0
- package/es/components/upload/src/upload.d.ts +525 -0
- package/es/components/upload/src/upload.mjs +140 -0
- package/es/components/upload/src/upload.mjs.map +1 -0
- package/es/components/upload/src/useUpload.d.ts +65 -0
- package/es/components/upload/src/useUpload.mjs +150 -0
- package/es/components/upload/src/useUpload.mjs.map +1 -0
- package/es/components/upload/utils/upload.d.ts +30 -0
- package/es/components/upload/utils/upload.mjs +119 -0
- package/es/components/upload/utils/upload.mjs.map +1 -0
- package/es/components/uploadImage/index.d.ts +14 -0
- package/es/components/uploadImage/index.mjs +11 -0
- package/es/components/uploadImage/index.mjs.map +1 -0
- package/es/components/uploadImage/src/uploadImage.d.ts +575 -0
- package/es/components/uploadImage/src/uploadImage.mjs +207 -0
- package/es/components/uploadImage/src/uploadImage.mjs.map +1 -0
- package/es/components/uploadImages/index.d.ts +14 -0
- package/es/components/uploadImages/index.mjs +8 -0
- package/es/components/uploadImages/index.mjs.map +1 -0
- package/es/components/uploadImages/src/uploadImages.d.ts +544 -0
- package/es/components/uploadImages/src/uploadImages.mjs +194 -0
- package/es/components/uploadImages/src/uploadImages.mjs.map +1 -0
- package/es/constants/index.d.ts +2 -0
- package/es/constants/index.mjs +7 -0
- package/es/constants/index.mjs.map +1 -0
- package/es/constants/mime.d.ts +61 -0
- package/es/constants/mime.mjs +62 -0
- package/es/constants/mime.mjs.map +1 -0
- package/es/constants/regex.d.ts +78 -0
- package/es/constants/regex.mjs +79 -0
- package/es/constants/regex.mjs.map +1 -0
- package/es/directive.d.ts +2 -0
- package/es/directive.mjs +11 -0
- package/es/directive.mjs.map +1 -0
- package/es/directives/click-copy/index.d.ts +2 -0
- package/es/directives/click-copy/index.mjs +36 -0
- package/es/directives/click-copy/index.mjs.map +1 -0
- package/es/directives/click-debounce/index.d.ts +2 -0
- package/es/directives/click-debounce/index.mjs +20 -0
- package/es/directives/click-debounce/index.mjs.map +1 -0
- package/es/directives/click-draggable/index.d.ts +2 -0
- package/es/directives/click-draggable/index.mjs +38 -0
- package/es/directives/click-draggable/index.mjs.map +1 -0
- package/es/directives/click-icon-copy/index.d.ts +2 -0
- package/es/directives/click-icon-copy/index.mjs +54 -0
- package/es/directives/click-icon-copy/index.mjs.map +1 -0
- package/es/directives/click-longpress/index.d.ts +2 -0
- package/es/directives/click-longpress/index.mjs +42 -0
- package/es/directives/click-longpress/index.mjs.map +1 -0
- package/es/directives/click-throttle/index.d.ts +2 -0
- package/es/directives/click-throttle/index.mjs +31 -0
- package/es/directives/click-throttle/index.mjs.map +1 -0
- package/es/directives/index.d.ts +6 -0
- package/es/directives/index.mjs +15 -0
- package/es/directives/index.mjs.map +1 -0
- package/es/element-plus.d.ts +2 -0
- package/es/element-plus.mjs +304 -0
- package/es/element-plus.mjs.map +1 -0
- package/es/hooks/index.d.ts +3 -0
- package/es/hooks/index.mjs +9 -0
- package/es/hooks/index.mjs.map +1 -0
- package/es/hooks/use-loading/index.d.ts +4 -0
- package/es/hooks/use-loading/index.mjs +34 -0
- package/es/hooks/use-loading/index.mjs.map +1 -0
- package/es/hooks/use-overlay/index.d.ts +4 -0
- package/es/hooks/use-overlay/index.mjs +26 -0
- package/es/hooks/use-overlay/index.mjs.map +1 -0
- package/es/hooks/use-screenFull/index.d.ts +7 -0
- package/es/hooks/use-screenFull/index.mjs +45 -0
- package/es/hooks/use-screenFull/index.mjs.map +1 -0
- package/es/index.d.ts +14 -0
- package/es/index.es.d.ts +6 -0
- package/es/index.mjs +138 -0
- package/es/index.mjs.map +1 -0
- package/es/make-installer.d.ts +6 -0
- package/es/make-installer.mjs +27 -0
- package/es/make-installer.mjs.map +1 -0
- package/es/version.d.ts +1 -0
- package/es/version.mjs +5 -0
- package/es/version.mjs.map +1 -0
- package/global.d.ts +2 -0
- package/lib/component.d.ts +3 -0
- package/lib/component.js +2 -0
- package/lib/component.js.map +1 -0
- package/lib/components/avatar/index.d.ts +14 -0
- package/lib/components/avatar/index.js +2 -0
- package/lib/components/avatar/index.js.map +1 -0
- package/lib/components/avatar/src/avatar.d.ts +96 -0
- package/lib/components/avatar/src/avatar.js +2 -0
- package/lib/components/avatar/src/avatar.js.map +1 -0
- package/lib/components/button/index.d.ts +15 -0
- package/lib/components/button/index.js +2 -0
- package/lib/components/button/index.js.map +1 -0
- package/lib/components/button/src/button.d.ts +173 -0
- package/lib/components/button/src/button.js +2 -0
- package/lib/components/button/src/button.js.map +1 -0
- package/lib/components/carNumber/index.d.ts +9 -0
- package/lib/components/carNumber/index.js +2 -0
- package/lib/components/carNumber/index.js.map +1 -0
- package/lib/components/carNumber/src/carNumber.d.ts +217 -0
- package/lib/components/carNumber/src/carNumber.js +2 -0
- package/lib/components/carNumber/src/carNumber.js.map +1 -0
- package/lib/components/carNumber/src/common.d.ts +15 -0
- package/lib/components/carNumber/src/common.js +2 -0
- package/lib/components/carNumber/src/common.js.map +1 -0
- package/lib/components/contextMenu/index.d.ts +9 -0
- package/lib/components/contextMenu/index.js +2 -0
- package/lib/components/contextMenu/index.js.map +1 -0
- package/lib/components/contextMenu/src/contextMenu.d.ts +32 -0
- package/lib/components/contextMenu/src/contextMenu.js +2 -0
- package/lib/components/contextMenu/src/contextMenu.js.map +1 -0
- package/lib/components/contextMenu/src/contextMenu.type.d.ts +33 -0
- package/lib/components/contextMenu/src/contextMenu.type.js +2 -0
- package/lib/components/contextMenu/src/contextMenu.type.js.map +1 -0
- package/lib/components/dialog/index.d.ts +14 -0
- package/lib/components/dialog/index.js +2 -0
- package/lib/components/dialog/index.js.map +1 -0
- package/lib/components/dialog/src/dialog.d.ts +454 -0
- package/lib/components/dialog/src/dialog.js +2 -0
- package/lib/components/dialog/src/dialog.js.map +1 -0
- package/lib/components/drawer/index.d.ts +14 -0
- package/lib/components/drawer/index.js +2 -0
- package/lib/components/drawer/index.js.map +1 -0
- package/lib/components/drawer/src/drawer.d.ts +449 -0
- package/lib/components/drawer/src/drawer.js +2 -0
- package/lib/components/drawer/src/drawer.js.map +1 -0
- package/lib/components/form/index.d.ts +23 -0
- package/lib/components/form/index.js +2 -0
- package/lib/components/form/index.js.map +1 -0
- package/lib/components/form/src/form.d.ts +194 -0
- package/lib/components/form/src/form.js +2 -0
- package/lib/components/form/src/form.js.map +1 -0
- package/lib/components/form/src/formItem.d.ts +190 -0
- package/lib/components/form/src/formItem.js +2 -0
- package/lib/components/form/src/formItem.js.map +1 -0
- package/lib/components/form/utils/form.d.ts +81 -0
- package/lib/components/form/utils/form.js +2 -0
- package/lib/components/form/utils/form.js.map +1 -0
- package/lib/components/formItemTip/index.d.ts +12 -0
- package/lib/components/formItemTip/index.js +2 -0
- package/lib/components/formItemTip/index.js.map +1 -0
- package/lib/components/formItemTip/src/formItemTip.d.ts +22 -0
- package/lib/components/formItemTip/src/formItemTip.js +2 -0
- package/lib/components/formItemTip/src/formItemTip.js.map +1 -0
- package/lib/components/icon/index.d.ts +12 -0
- package/lib/components/icon/index.js +2 -0
- package/lib/components/icon/index.js.map +1 -0
- package/lib/components/icon/src/icon.d.ts +39 -0
- package/lib/components/icon/src/icon.js +2 -0
- package/lib/components/icon/src/icon.js.map +1 -0
- package/lib/components/iconSelector/index.d.ts +7 -0
- package/lib/components/iconSelector/index.js +2 -0
- package/lib/components/iconSelector/index.js.map +1 -0
- package/lib/components/iconSelector/src/iconSelector.d.ts +23 -0
- package/lib/components/iconSelector/src/iconSelector.js +2 -0
- package/lib/components/iconSelector/src/iconSelector.js.map +1 -0
- package/lib/components/image/index.d.ts +12 -0
- package/lib/components/image/index.js +2 -0
- package/lib/components/image/index.js.map +1 -0
- package/lib/components/image/src/image.d.ts +225 -0
- package/lib/components/image/src/image.js +2 -0
- package/lib/components/image/src/image.js.map +1 -0
- package/lib/components/index.d.ts +21 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/layoutGrid/index.d.ts +16 -0
- package/lib/components/layoutGrid/index.js +2 -0
- package/lib/components/layoutGrid/index.js.map +1 -0
- package/lib/components/layoutGrid/src/layoutGrid.d.ts +60 -0
- package/lib/components/layoutGrid/src/layoutGrid.js +2 -0
- package/lib/components/layoutGrid/src/layoutGrid.js.map +1 -0
- package/lib/components/layoutGrid/src/layoutGrid.type.d.ts +12 -0
- package/lib/components/layoutGrid/src/layoutGrid.type.js +2 -0
- package/lib/components/layoutGrid/src/layoutGrid.type.js.map +1 -0
- package/lib/components/layoutGrid/src/layoutGridItem.d.ts +100 -0
- package/lib/components/layoutGrid/src/layoutGridItem.js +2 -0
- package/lib/components/layoutGrid/src/layoutGridItem.js.map +1 -0
- package/lib/components/select/index.d.ts +22 -0
- package/lib/components/select/index.js +2 -0
- package/lib/components/select/index.js.map +1 -0
- package/lib/components/select/src/select.d.ts +1201 -0
- package/lib/components/select/src/select.js +2 -0
- package/lib/components/select/src/select.js.map +1 -0
- package/lib/components/select/src/select.type.d.ts +28 -0
- package/lib/components/select/src/select.type.js +2 -0
- package/lib/components/select/src/select.type.js.map +1 -0
- package/lib/components/select/src/selectOption.d.ts +99 -0
- package/lib/components/select/src/selectOption.js +2 -0
- package/lib/components/select/src/selectOption.js.map +1 -0
- package/lib/components/selectPage/index.d.ts +14 -0
- package/lib/components/selectPage/index.js +2 -0
- package/lib/components/selectPage/index.js.map +1 -0
- package/lib/components/selectPage/src/selectPage.d.ts +595 -0
- package/lib/components/selectPage/src/selectPage.js +2 -0
- package/lib/components/selectPage/src/selectPage.js.map +1 -0
- package/lib/components/selectV2/index.d.ts +14 -0
- package/lib/components/selectV2/index.js +2 -0
- package/lib/components/selectV2/index.js.map +1 -0
- package/lib/components/selectV2/src/selectV2.d.ts +1407 -0
- package/lib/components/selectV2/src/selectV2.js +2 -0
- package/lib/components/selectV2/src/selectV2.js.map +1 -0
- package/lib/components/table/images/artwork.png.js +2 -0
- package/lib/components/table/images/artwork.png.js.map +1 -0
- package/lib/components/table/images/index.d.ts +4 -0
- package/lib/components/table/images/notImage.png.js +2 -0
- package/lib/components/table/images/notImage.png.js.map +1 -0
- package/lib/components/table/index.d.ts +35 -0
- package/lib/components/table/index.js +2 -0
- package/lib/components/table/index.js.map +1 -0
- package/lib/components/table/src/page.type.d.ts +145 -0
- package/lib/components/table/src/page.type.js +2 -0
- package/lib/components/table/src/page.type.js.map +1 -0
- package/lib/components/table/src/table.d.ts +1382 -0
- package/lib/components/table/src/table.js +2 -0
- package/lib/components/table/src/table.js.map +1 -0
- package/lib/components/table/src/table.state.d.ts +115 -0
- package/lib/components/table/src/table.state.js +2 -0
- package/lib/components/table/src/table.state.js.map +1 -0
- package/lib/components/table/src/table.type.d.ts +316 -0
- package/lib/components/table/src/table.type.js +2 -0
- package/lib/components/table/src/table.type.js.map +1 -0
- package/lib/components/table/src/tableColumn.d.ts +644 -0
- package/lib/components/table/src/tableColumn.js +2 -0
- package/lib/components/table/src/tableColumn.js.map +1 -0
- package/lib/components/table/src/tableColumnSettingDialog.d.ts +18 -0
- package/lib/components/table/src/tableColumnSettingDialog.js +2 -0
- package/lib/components/table/src/tableColumnSettingDialog.js.map +1 -0
- package/lib/components/table/src/tablePagination.d.ts +24 -0
- package/lib/components/table/src/tablePagination.js +2 -0
- package/lib/components/table/src/tablePagination.js.map +1 -0
- package/lib/components/table/src/tableSearchForm.d.ts +88 -0
- package/lib/components/table/src/tableSearchForm.js +2 -0
- package/lib/components/table/src/tableSearchForm.js.map +1 -0
- package/lib/components/table/src/tableSearchFormItem.d.ts +37 -0
- package/lib/components/table/src/tableSearchFormItem.js +2 -0
- package/lib/components/table/src/tableSearchFormItem.js.map +1 -0
- package/lib/components/table/src/useTable.d.ts +32 -0
- package/lib/components/table/src/useTable.js +2 -0
- package/lib/components/table/src/useTable.js.map +1 -0
- package/lib/components/table/utils/table.d.ts +45 -0
- package/lib/components/table/utils/table.js +2 -0
- package/lib/components/table/utils/table.js.map +1 -0
- package/lib/components/tree/index.d.ts +15 -0
- package/lib/components/tree/index.js +2 -0
- package/lib/components/tree/index.js.map +1 -0
- package/lib/components/tree/src/tree.d.ts +668 -0
- package/lib/components/tree/src/tree.js +2 -0
- package/lib/components/tree/src/tree.js.map +1 -0
- package/lib/components/tree/src/tree.props.d.ts +81 -0
- package/lib/components/tree/src/tree.props.js +2 -0
- package/lib/components/tree/src/tree.props.js.map +1 -0
- package/lib/components/tree/src/tree.type.d.ts +36 -0
- package/lib/components/tree/src/tree.type.js +2 -0
- package/lib/components/tree/src/tree.type.js.map +1 -0
- package/lib/components/treeSelect/index.d.ts +14 -0
- package/lib/components/treeSelect/index.js +2 -0
- package/lib/components/treeSelect/index.js.map +1 -0
- package/lib/components/treeSelect/src/treeSelect.d.ts +1063 -0
- package/lib/components/treeSelect/src/treeSelect.js +2 -0
- package/lib/components/treeSelect/src/treeSelect.js.map +1 -0
- package/lib/components/upload/index.d.ts +15 -0
- package/lib/components/upload/index.js +2 -0
- package/lib/components/upload/index.js.map +1 -0
- package/lib/components/upload/src/upload.d.ts +525 -0
- package/lib/components/upload/src/upload.js +2 -0
- package/lib/components/upload/src/upload.js.map +1 -0
- package/lib/components/upload/src/useUpload.d.ts +65 -0
- package/lib/components/upload/src/useUpload.js +2 -0
- package/lib/components/upload/src/useUpload.js.map +1 -0
- package/lib/components/upload/utils/upload.d.ts +30 -0
- package/lib/components/upload/utils/upload.js +2 -0
- package/lib/components/upload/utils/upload.js.map +1 -0
- package/lib/components/uploadImage/index.d.ts +14 -0
- package/lib/components/uploadImage/index.js +2 -0
- package/lib/components/uploadImage/index.js.map +1 -0
- package/lib/components/uploadImage/src/uploadImage.d.ts +575 -0
- package/lib/components/uploadImage/src/uploadImage.js +2 -0
- package/lib/components/uploadImage/src/uploadImage.js.map +1 -0
- package/lib/components/uploadImages/index.d.ts +14 -0
- package/lib/components/uploadImages/index.js +2 -0
- package/lib/components/uploadImages/index.js.map +1 -0
- package/lib/components/uploadImages/src/uploadImages.d.ts +544 -0
- package/lib/components/uploadImages/src/uploadImages.js +2 -0
- package/lib/components/uploadImages/src/uploadImages.js.map +1 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/index.js +2 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/mime.d.ts +61 -0
- package/lib/constants/mime.js +2 -0
- package/lib/constants/mime.js.map +1 -0
- package/lib/constants/regex.d.ts +78 -0
- package/lib/constants/regex.js +2 -0
- package/lib/constants/regex.js.map +1 -0
- package/lib/directive.d.ts +2 -0
- package/lib/directive.js +2 -0
- package/lib/directive.js.map +1 -0
- package/lib/directives/click-copy/index.d.ts +2 -0
- package/lib/directives/click-copy/index.js +2 -0
- package/lib/directives/click-copy/index.js.map +1 -0
- package/lib/directives/click-debounce/index.d.ts +2 -0
- package/lib/directives/click-debounce/index.js +2 -0
- package/lib/directives/click-debounce/index.js.map +1 -0
- package/lib/directives/click-draggable/index.d.ts +2 -0
- package/lib/directives/click-draggable/index.js +2 -0
- package/lib/directives/click-draggable/index.js.map +1 -0
- package/lib/directives/click-icon-copy/index.d.ts +2 -0
- package/lib/directives/click-icon-copy/index.js +2 -0
- package/lib/directives/click-icon-copy/index.js.map +1 -0
- package/lib/directives/click-longpress/index.d.ts +2 -0
- package/lib/directives/click-longpress/index.js +2 -0
- package/lib/directives/click-longpress/index.js.map +1 -0
- package/lib/directives/click-throttle/index.d.ts +2 -0
- package/lib/directives/click-throttle/index.js +2 -0
- package/lib/directives/click-throttle/index.js.map +1 -0
- package/lib/directives/index.d.ts +6 -0
- package/lib/directives/index.js +2 -0
- package/lib/directives/index.js.map +1 -0
- package/lib/element-plus.d.ts +2 -0
- package/lib/element-plus.js +2 -0
- package/lib/element-plus.js.map +1 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/use-loading/index.d.ts +4 -0
- package/lib/hooks/use-loading/index.js +2 -0
- package/lib/hooks/use-loading/index.js.map +1 -0
- package/lib/hooks/use-overlay/index.d.ts +4 -0
- package/lib/hooks/use-overlay/index.js +2 -0
- package/lib/hooks/use-overlay/index.js.map +1 -0
- package/lib/hooks/use-screenFull/index.d.ts +7 -0
- package/lib/hooks/use-screenFull/index.js +2 -0
- package/lib/hooks/use-screenFull/index.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.es.d.ts +6 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/make-installer.d.ts +6 -0
- package/lib/make-installer.js +2 -0
- package/lib/make-installer.js.map +1 -0
- package/lib/version.d.ts +1 -0
- package/lib/version.js +2 -0
- package/lib/version.js.map +1 -0
- package/package.json +139 -26
- package/styles/common/animation.scss +46 -0
- package/styles/common/common.scss +44 -0
- package/styles/common/loading.scss +29 -0
- package/styles/common/overlay.scss +12 -0
- package/styles/components/carNumber.scss +44 -0
- package/styles/components/contextMenu.scss +34 -0
- package/styles/components/dialog.scss +88 -0
- package/styles/components/drawer.scss +87 -0
- package/styles/components/form.scss +44 -0
- package/styles/components/formItemTip.scss +7 -0
- package/styles/components/image.scss +19 -0
- package/styles/components/selectPage.scss +74 -0
- package/styles/components/selectV2.scss +22 -0
- package/styles/components/table.scss +439 -0
- package/styles/components/tree.scss +100 -0
- package/styles/components/uploadImage.scss +61 -0
- package/styles/components/uploadImages.scss +9 -0
- package/styles/index.scss +18 -0
- package/types/components.d.ts +36 -0
- package/types/env.d.ts +17 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import "../../../constants/index.mjs";
|
|
2
|
+
import { consoleWarn } from "@fast-china/utils";
|
|
3
|
+
import { RegExps } from "../../../constants/regex.mjs";
|
|
4
|
+
const formUtil = {
|
|
5
|
+
/**
|
|
6
|
+
* ElForm 表单验证
|
|
7
|
+
* @param elFormRef ElForm 组件ref
|
|
8
|
+
*/
|
|
9
|
+
validate(elFormRef) {
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
elFormRef.value.validate((isValid, invalidFields) => {
|
|
12
|
+
if (isValid) {
|
|
13
|
+
resolve(isValid);
|
|
14
|
+
} else {
|
|
15
|
+
if (invalidFields) {
|
|
16
|
+
consoleWarn("formUtil", false, invalidFields);
|
|
17
|
+
}
|
|
18
|
+
reject(isValid);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* ElForm 表单验证,带滚动
|
|
25
|
+
* @param elFormRef ElForm 组件ref
|
|
26
|
+
*/
|
|
27
|
+
validateScrollToField(elFormRef) {
|
|
28
|
+
return new Promise((resolve, reject) => {
|
|
29
|
+
elFormRef.value.validate((isValid, invalidFields) => {
|
|
30
|
+
if (isValid) {
|
|
31
|
+
resolve(isValid);
|
|
32
|
+
} else {
|
|
33
|
+
elFormRef.value.scrollToField(Object.keys(invalidFields));
|
|
34
|
+
if (invalidFields) {
|
|
35
|
+
consoleWarn("formUtil", false, invalidFields);
|
|
36
|
+
}
|
|
37
|
+
reject(isValid);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* 手机号
|
|
44
|
+
*/
|
|
45
|
+
mobile(rule, value, callback) {
|
|
46
|
+
if (!value) {
|
|
47
|
+
callback(new Error("请输入手机号码"));
|
|
48
|
+
} else if (RegExps.Mobile.test(value)) {
|
|
49
|
+
callback();
|
|
50
|
+
} else {
|
|
51
|
+
callback(new Error("请输入正确的手机号码"));
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* 电话号码
|
|
56
|
+
*/
|
|
57
|
+
phone(rule, value, callback) {
|
|
58
|
+
if (!value) {
|
|
59
|
+
callback();
|
|
60
|
+
} else if (RegExps.Phone.test(value)) {
|
|
61
|
+
callback();
|
|
62
|
+
} else {
|
|
63
|
+
callback(new Error("请输入正确的电话号码"));
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* 邮箱
|
|
68
|
+
*/
|
|
69
|
+
email(rule, value, callback) {
|
|
70
|
+
if (!value) {
|
|
71
|
+
callback();
|
|
72
|
+
} else if (RegExps.Email.test(value)) {
|
|
73
|
+
callback();
|
|
74
|
+
} else {
|
|
75
|
+
callback(new Error("请输入正确的邮箱地址"));
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* 身份证
|
|
80
|
+
*/
|
|
81
|
+
idCard(rule, value, callback) {
|
|
82
|
+
if (RegExps.IdCard.test(value) || !value) {
|
|
83
|
+
callback();
|
|
84
|
+
} else {
|
|
85
|
+
callback(new Error("请输入正确的身份证号码"));
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* 车牌号
|
|
90
|
+
*/
|
|
91
|
+
carNumber(rule, value, callback) {
|
|
92
|
+
let success = false;
|
|
93
|
+
if (value?.length === 7) {
|
|
94
|
+
success = RegExps.CarNumber.test(value);
|
|
95
|
+
} else if (value?.length === 8) {
|
|
96
|
+
success = RegExps.NewEnergyCarNumber.test(value);
|
|
97
|
+
}
|
|
98
|
+
if (success) {
|
|
99
|
+
callback();
|
|
100
|
+
} else {
|
|
101
|
+
callback(new Error("请输入正确的车牌号码"));
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* editor 必填
|
|
106
|
+
*/
|
|
107
|
+
editorRequired(rule, value, callback) {
|
|
108
|
+
if (value === "<p><br></p>") {
|
|
109
|
+
return callback(new Error("内容不能为空"));
|
|
110
|
+
}
|
|
111
|
+
return callback();
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* 外部链接
|
|
115
|
+
*/
|
|
116
|
+
external(rule, value, callback) {
|
|
117
|
+
if (RegExps.External.test(value)) {
|
|
118
|
+
callback();
|
|
119
|
+
} else {
|
|
120
|
+
callback(new Error("请输入正确的外部链接"));
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* 有效的URL
|
|
125
|
+
*/
|
|
126
|
+
url(rule, value, callback) {
|
|
127
|
+
if (RegExps.Url.test(value)) {
|
|
128
|
+
callback();
|
|
129
|
+
} else {
|
|
130
|
+
callback(new Error("请输入有效的Url"));
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* 邮政编码
|
|
135
|
+
*/
|
|
136
|
+
postCode(rule, value, callback) {
|
|
137
|
+
if (RegExps.PostCode.test(value)) {
|
|
138
|
+
callback();
|
|
139
|
+
} else {
|
|
140
|
+
callback(new Error("请输入有效的邮政编码"));
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* 账号(6-20位字母或数字,必须以字母开头,不能全为数字)
|
|
145
|
+
*/
|
|
146
|
+
account(rule, value, callback) {
|
|
147
|
+
if (RegExps.Account.test(value)) {
|
|
148
|
+
callback();
|
|
149
|
+
} else {
|
|
150
|
+
callback(new Error("请输入有效的账号(6-20位字母或数字,必须以字母开头,不能全为数字)"));
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* 弱密码(只包含字母和数字,长度为6到18位)
|
|
155
|
+
*/
|
|
156
|
+
password(rule, value, callback) {
|
|
157
|
+
if (RegExps.Password.test(value)) {
|
|
158
|
+
callback();
|
|
159
|
+
} else {
|
|
160
|
+
callback(new Error("请输入有效的密码(只包含字母和数字,长度为6到18位)"));
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* 强密码(8到20位,包含大小写字母、数字及特殊字符)
|
|
165
|
+
*/
|
|
166
|
+
strongPassword(rule, value, callback) {
|
|
167
|
+
if (RegExps.StrongPassword.test(value)) {
|
|
168
|
+
callback();
|
|
169
|
+
} else {
|
|
170
|
+
callback(new Error("请输入有效的密码(8到20位,包含大小写字母、数字及特殊字符)"));
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
/**
|
|
174
|
+
* 中文字符
|
|
175
|
+
*/
|
|
176
|
+
chinese(rule, value, callback) {
|
|
177
|
+
if (RegExps.Chinese.test(value)) {
|
|
178
|
+
callback();
|
|
179
|
+
} else {
|
|
180
|
+
callback(new Error("请输入有效的中文字符"));
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* 英文字符
|
|
185
|
+
*/
|
|
186
|
+
english(rule, value, callback) {
|
|
187
|
+
if (RegExps.English.test(value)) {
|
|
188
|
+
callback();
|
|
189
|
+
} else {
|
|
190
|
+
callback(new Error("请输入有效的英文字符"));
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* 文本框必填
|
|
195
|
+
*/
|
|
196
|
+
inputRequired(message, trigger = "blur") {
|
|
197
|
+
return {
|
|
198
|
+
required: true,
|
|
199
|
+
message,
|
|
200
|
+
trigger
|
|
201
|
+
};
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
* 选择器必选
|
|
205
|
+
*/
|
|
206
|
+
selectRequired(message, trigger = "change") {
|
|
207
|
+
return {
|
|
208
|
+
required: true,
|
|
209
|
+
message,
|
|
210
|
+
trigger
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
export {
|
|
215
|
+
formUtil
|
|
216
|
+
};
|
|
217
|
+
//# sourceMappingURL=form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.mjs","sources":["../../../../../packages/components/form/utils/form.ts"],"sourcesContent":["import { RegExps } from \"@fast-element-plus/constants\";\nimport { consoleWarn } from \"@fast-china/utils\";\nimport type { FormInstance, FormItemRule, FormValidationResult } from \"element-plus\";\nimport type { Ref } from \"vue\";\n\n/**\n * 表单工具类\n */\nexport const formUtil = {\n\t/**\n\t * ElForm 表单验证\n\t * @param elFormRef ElForm 组件ref\n\t */\n\tvalidate(elFormRef: Ref<FormInstance, FormInstance>): FormValidationResult {\n\t\treturn new Promise<boolean>((resolve, reject) => {\n\t\t\telFormRef.value.validate((isValid: boolean, invalidFields?) => {\n\t\t\t\tif (isValid) {\n\t\t\t\t\tresolve(isValid);\n\t\t\t\t} else {\n\t\t\t\t\tif (invalidFields) {\n\t\t\t\t\t\tconsoleWarn(\"formUtil\", false, invalidFields);\n\t\t\t\t\t}\n\t\t\t\t\treject(isValid);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t * ElForm 表单验证,带滚动\n\t * @param elFormRef ElForm 组件ref\n\t */\n\tvalidateScrollToField(elFormRef: Ref<FormInstance>): FormValidationResult {\n\t\treturn new Promise<boolean>((resolve, reject) => {\n\t\t\telFormRef.value.validate((isValid: boolean, invalidFields?) => {\n\t\t\t\tif (isValid) {\n\t\t\t\t\tresolve(isValid);\n\t\t\t\t} else {\n\t\t\t\t\telFormRef.value.scrollToField(Object.keys(invalidFields));\n\t\t\t\t\tif (invalidFields) {\n\t\t\t\t\t\tconsoleWarn(\"formUtil\", false, invalidFields);\n\t\t\t\t\t}\n\t\t\t\t\treject(isValid);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t * 手机号\n\t */\n\tmobile(rule: any, value: string, callback: any): void {\n\t\tif (!value) {\n\t\t\tcallback(new Error(\"请输入手机号码\"));\n\t\t} else if (RegExps.Mobile.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入正确的手机号码\"));\n\t\t}\n\t},\n\t/**\n\t * 电话号码\n\t */\n\tphone(rule: any, value: string, callback: any): void {\n\t\tif (!value) {\n\t\t\tcallback();\n\t\t} else if (RegExps.Phone.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入正确的电话号码\"));\n\t\t}\n\t},\n\t/**\n\t * 邮箱\n\t */\n\temail(rule: any, value: string, callback: any): void {\n\t\tif (!value) {\n\t\t\tcallback();\n\t\t} else if (RegExps.Email.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入正确的邮箱地址\"));\n\t\t}\n\t},\n\t/**\n\t * 身份证\n\t */\n\tidCard(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.IdCard.test(value) || !value) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入正确的身份证号码\"));\n\t\t}\n\t},\n\t/**\n\t * 车牌号\n\t */\n\tcarNumber(rule: any, value: string, callback: any): void {\n\t\tlet success = false;\n\t\tif (value?.length === 7) {\n\t\t\tsuccess = RegExps.CarNumber.test(value);\n\t\t} else if (value?.length === 8) {\n\t\t\tsuccess = RegExps.NewEnergyCarNumber.test(value);\n\t\t}\n\t\tif (success) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入正确的车牌号码\"));\n\t\t}\n\t},\n\t/**\n\t * editor 必填\n\t */\n\teditorRequired(rule: any, value: string, callback: any): void {\n\t\tif (value === \"<p><br></p>\") {\n\t\t\treturn callback(new Error(\"内容不能为空\"));\n\t\t}\n\t\treturn callback();\n\t},\n\t/**\n\t * 外部链接\n\t */\n\texternal(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.External.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入正确的外部链接\"));\n\t\t}\n\t},\n\t/**\n\t * 有效的URL\n\t */\n\turl(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.Url.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的Url\"));\n\t\t}\n\t},\n\t/**\n\t * 邮政编码\n\t */\n\tpostCode(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.PostCode.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的邮政编码\"));\n\t\t}\n\t},\n\t/**\n\t * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)\n\t */\n\taccount(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.Account.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的账号(6-20位字母或数字,必须以字母开头,不能全为数字)\"));\n\t\t}\n\t},\n\t/**\n\t * 弱密码(只包含字母和数字,长度为6到18位)\n\t */\n\tpassword(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.Password.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的密码(只包含字母和数字,长度为6到18位)\"));\n\t\t}\n\t},\n\t/**\n\t * 强密码(8到20位,包含大小写字母、数字及特殊字符)\n\t */\n\tstrongPassword(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.StrongPassword.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的密码(8到20位,包含大小写字母、数字及特殊字符)\"));\n\t\t}\n\t},\n\t/**\n\t * 中文字符\n\t */\n\tchinese(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.Chinese.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的中文字符\"));\n\t\t}\n\t},\n\t/**\n\t * 英文字符\n\t */\n\tenglish(rule: any, value: string, callback: any): void {\n\t\tif (RegExps.English.test(value)) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tcallback(new Error(\"请输入有效的英文字符\"));\n\t\t}\n\t},\n\t/**\n\t * 文本框必填\n\t */\n\tinputRequired(message: string, trigger = \"blur\"): FormItemRule {\n\t\treturn {\n\t\t\trequired: true,\n\t\t\tmessage,\n\t\t\ttrigger,\n\t\t};\n\t},\n\t/**\n\t * 选择器必选\n\t */\n\tselectRequired(message: string, trigger = \"change\"): FormItemRule {\n\t\treturn {\n\t\t\trequired: true,\n\t\t\tmessage,\n\t\t\ttrigger,\n\t\t};\n\t},\n};\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TSXWithInstall } from "@fast-china/utils";
|
|
2
|
+
import type { default as FormItemTip, faFormItemTipProps } from "./src/formItemTip";
|
|
3
|
+
import type { ExtractPropTypes } from "vue";
|
|
4
|
+
|
|
5
|
+
export declare const FaFormItemTip: TSXWithInstall<typeof FormItemTip>;
|
|
6
|
+
export default FaFormItemTip;
|
|
7
|
+
|
|
8
|
+
export { faFormItemTipProps };
|
|
9
|
+
|
|
10
|
+
export type FaFormItemTipInstance = InstanceType<typeof FormItemTip>;
|
|
11
|
+
|
|
12
|
+
export type FaFormItemTipProps = ExtractPropTypes<typeof faFormItemTipProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { withInstall } from "@fast-china/utils";
|
|
2
|
+
import FormItemTip from "./src/formItemTip.mjs";
|
|
3
|
+
import { faFormItemTipProps } from "./src/formItemTip.mjs";
|
|
4
|
+
const FaFormItemTip = withInstall(FormItemTip);
|
|
5
|
+
export {
|
|
6
|
+
FaFormItemTip,
|
|
7
|
+
FaFormItemTip as default,
|
|
8
|
+
faFormItemTipProps
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/formItemTip/index.ts"],"sourcesContent":["import { withInstall } from \"@fast-china/utils\";\nimport FormItemTip, { faFormItemTipProps } from \"./src/formItemTip\";\nimport type { ExtractPropTypes } from \"vue\";\n\nexport const FaFormItemTip = withInstall(FormItemTip);\nexport default FaFormItemTip;\n\nexport { faFormItemTipProps };\n\nexport type FaFormItemTipInstance = InstanceType<typeof FormItemTip>;\n\nexport type FaFormItemTipProps = ExtractPropTypes<typeof faFormItemTipProps>;\n"],"names":[],"mappings":";;;AAIO,MAAM,gBAAgB,YAAY,WAAW;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const faFormItemTipProps: {
|
|
2
|
+
/** @description 提示 */
|
|
3
|
+
tips: StringConstructor;
|
|
4
|
+
/** @description 显示 */
|
|
5
|
+
label: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
type FaFormItemTipSlots = {
|
|
8
|
+
/** @description 显示插槽 */
|
|
9
|
+
label: never;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
|
+
/** @description 提示 */
|
|
13
|
+
tips: StringConstructor;
|
|
14
|
+
/** @description 显示 */
|
|
15
|
+
label: StringConstructor;
|
|
16
|
+
}>, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
/** @description 提示 */
|
|
18
|
+
tips: StringConstructor;
|
|
19
|
+
/** @description 显示 */
|
|
20
|
+
label: StringConstructor;
|
|
21
|
+
}>> & Readonly<{}>, {}, import('vue').SlotsType<Partial<import('@fast-china/utils').MakeSlots<FaFormItemTipSlots>>>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from "vue";
|
|
2
|
+
import { ElTooltip, ElIcon } from "element-plus";
|
|
3
|
+
import { QuestionFilled } from "@element-plus/icons-vue";
|
|
4
|
+
import { useRender, makeSlots } from "@fast-china/utils";
|
|
5
|
+
const faFormItemTipProps = {
|
|
6
|
+
/** @description 提示 */
|
|
7
|
+
tips: String,
|
|
8
|
+
/** @description 显示 */
|
|
9
|
+
label: String
|
|
10
|
+
};
|
|
11
|
+
const FormItemTip = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "FaFormItemTip",
|
|
13
|
+
props: faFormItemTipProps,
|
|
14
|
+
slots: makeSlots(),
|
|
15
|
+
setup(props, {
|
|
16
|
+
slots
|
|
17
|
+
}) {
|
|
18
|
+
useRender(() => createVNode("div", {
|
|
19
|
+
"class": "fa-form-item-tip"
|
|
20
|
+
}, [createVNode(ElTooltip, {
|
|
21
|
+
"effect": "dark",
|
|
22
|
+
"rawContent": true,
|
|
23
|
+
"content": props.tips,
|
|
24
|
+
"placement": "top"
|
|
25
|
+
}, {
|
|
26
|
+
default: () => [createVNode(ElIcon, null, {
|
|
27
|
+
default: () => [createVNode(QuestionFilled, null, null)]
|
|
28
|
+
})]
|
|
29
|
+
}), createVNode("span", {
|
|
30
|
+
"class": "fa-form-item-tip__label"
|
|
31
|
+
}, [slots.label ? slots.label() : props.label])]));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
FormItemTip as default,
|
|
36
|
+
faFormItemTipProps
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=formItemTip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formItemTip.mjs","sources":["../../../../../packages/components/formItemTip/src/formItemTip.tsx"],"sourcesContent":["import { defineComponent } from \"vue\";\nimport { ElIcon, ElTooltip } from \"element-plus\";\nimport { QuestionFilled } from \"@element-plus/icons-vue\";\nimport { makeSlots, useRender } from \"@fast-china/utils\";\n\nexport const faFormItemTipProps = {\n\t/** @description 提示 */\n\ttips: String,\n\t/** @description 显示 */\n\tlabel: String,\n};\n\ntype FaFormItemTipSlots = {\n\t/** @description 显示插槽 */\n\tlabel: never;\n};\n\nexport default defineComponent({\n\tname: \"FaFormItemTip\",\n\tprops: faFormItemTipProps,\n\tslots: makeSlots<FaFormItemTipSlots>(),\n\tsetup(props, { slots }) {\n\t\tuseRender(() => (\n\t\t\t<div class=\"fa-form-item-tip\">\n\t\t\t\t<ElTooltip effect=\"dark\" rawContent content={props.tips} placement=\"top\">\n\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t<QuestionFilled />\n\t\t\t\t\t</ElIcon>\n\t\t\t\t</ElTooltip>\n\t\t\t\t<span class=\"fa-form-item-tip__label\">{slots.label ? slots.label() : props.label}</span>\n\t\t\t</div>\n\t\t));\n\t},\n});\n"],"names":["faFormItemTipProps","tips","String","label","name","props","slots","makeSlots","setup","useRender","_createVNode","ElTooltip","default","ElIcon","QuestionFilled"],"mappings":";;;;AAKO,MAAMA,qBAAqB;AAAA;AAAA,EAEjCC,MAAMC;AAAAA;AAAAA,EAENC,OAAOD;AACR;AAOA,MAAA,8CAA+B;AAAA,EAC9BE,MAAM;AAAA,EACNC,OAAOL;AAAAA,EACPM,OAAOC,UAAS;AAAA,EAChBC,MAAMH,OAAO;AAAA,IAAEC;AAAAA,EAAM,GAAG;AACvBG,cAAU,MAAAC,YAAA,OAAA;AAAA,MAAA,SAAA;AAAA,OAAA,CAAAA,YAAAC,WAAA;AAAA,MAAA,UAAA;AAAA,MAAA,cAAA;AAAA,MAAA,WAEqCN,MAAMJ;AAAAA,MAAI,aAAA;AAAA,IAAA,GAAA;AAAA,MAAAW,SAAAA,MAAA,CAAAF,YAAAG,QAAA,MAAA;AAAA,QAAAD,SAAAA,MAAA,CAAAF,YAAAI,gBAAA,MAAA,IAAA,CAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA,CAAA,GAAAJ,YAAA,QAAA;AAAA,MAAA,SAAA;AAAA,IAAA,GAAA,CAKhBJ,MAAMH,QAAQG,MAAMH,MAAK,IAAKE,MAAMF,KAAK,IAEjF;AAAA,EACF;AACD,CAAC;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TSXWithInstall } from "@fast-china/utils";
|
|
2
|
+
import type { default as Icon, faIconProps } from "./src/icon";
|
|
3
|
+
import type { ExtractPropTypes } from "vue";
|
|
4
|
+
|
|
5
|
+
export declare const FaIcon: TSXWithInstall<typeof Icon>;
|
|
6
|
+
export default FaIcon;
|
|
7
|
+
|
|
8
|
+
export { faIconProps };
|
|
9
|
+
|
|
10
|
+
export type FaIconInstance = InstanceType<typeof Icon>;
|
|
11
|
+
|
|
12
|
+
export type FaIconProps = ExtractPropTypes<typeof faIconProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/icon/index.ts"],"sourcesContent":["import { withInstall } from \"@fast-china/utils\";\nimport Icon from \"./src/icon\";\nimport type { faIconProps } from \"./src/icon\";\nimport type { ExtractPropTypes } from \"vue\";\n\nexport const FaIcon = withInstall(Icon);\nexport default FaIcon;\n\nexport { faIconProps };\n\nexport type FaIconInstance = InstanceType<typeof Icon>;\n\nexport type FaIconProps = ExtractPropTypes<typeof faIconProps>;\n"],"names":[],"mappings":";;AAKO,MAAM,SAAS,YAAY,IAAI;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const faIconProps: {
|
|
2
|
+
/** @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库; */
|
|
3
|
+
name: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
required: boolean;
|
|
6
|
+
};
|
|
7
|
+
/** @description 大小 */
|
|
8
|
+
size: {
|
|
9
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
10
|
+
};
|
|
11
|
+
/** @description 颜色*/
|
|
12
|
+
color: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
15
|
+
/** @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库; */
|
|
16
|
+
name: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
required: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** @description 大小 */
|
|
21
|
+
size: {
|
|
22
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
};
|
|
24
|
+
/** @description 颜色*/
|
|
25
|
+
color: StringConstructor;
|
|
26
|
+
}>, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
+
/** @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库; */
|
|
28
|
+
name: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** @description 大小 */
|
|
33
|
+
size: {
|
|
34
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
35
|
+
};
|
|
36
|
+
/** @description 颜色*/
|
|
37
|
+
color: StringConstructor;
|
|
38
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { isVNode, defineComponent, reactive, computed, createVNode, mergeProps, h, resolveComponent } from "vue";
|
|
2
|
+
import { ElIcon } from "element-plus";
|
|
3
|
+
import "../../../constants/index.mjs";
|
|
4
|
+
import { addUnit, useRender } from "@fast-china/utils";
|
|
5
|
+
import { RegExps } from "../../../constants/regex.mjs";
|
|
6
|
+
function _isSlot(s) {
|
|
7
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
+
}
|
|
9
|
+
const faIconProps = {
|
|
10
|
+
/** @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库; */
|
|
11
|
+
name: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
/** @description 大小 */
|
|
16
|
+
size: {
|
|
17
|
+
type: [String, Number]
|
|
18
|
+
},
|
|
19
|
+
/** @description 颜色*/
|
|
20
|
+
color: String
|
|
21
|
+
};
|
|
22
|
+
const Icon = /* @__PURE__ */ defineComponent({
|
|
23
|
+
name: "FaIcon",
|
|
24
|
+
props: faIconProps,
|
|
25
|
+
setup(props, {
|
|
26
|
+
attrs
|
|
27
|
+
}) {
|
|
28
|
+
const state = reactive({
|
|
29
|
+
isUrl: computed(() => RegExps.External.test(props.name)),
|
|
30
|
+
style: computed(() => {
|
|
31
|
+
const result = {};
|
|
32
|
+
if (props.size) {
|
|
33
|
+
result.size = addUnit(props.size);
|
|
34
|
+
}
|
|
35
|
+
if (props.color) {
|
|
36
|
+
result.color = props.color;
|
|
37
|
+
}
|
|
38
|
+
if (state.isUrl) {
|
|
39
|
+
result.mask = `url(${props.name}) no-repeat 50% 50%`;
|
|
40
|
+
result["-webkit-mask"] = `url(${props.name}) no-repeat 50% 50%`;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
useRender(() => {
|
|
46
|
+
let _slot, _slot2;
|
|
47
|
+
return props.name.indexOf("el-icon-") === 0 ? createVNode(ElIcon, mergeProps(attrs, props, {
|
|
48
|
+
"class": ["fa-icon", props.name]
|
|
49
|
+
}), _isSlot(_slot = h(resolveComponent(props.name))) ? _slot : {
|
|
50
|
+
default: () => [_slot]
|
|
51
|
+
}) : props.name.indexOf("fa-icon") === 0 ? createVNode(ElIcon, mergeProps(attrs, props, {
|
|
52
|
+
"class": ["fa-icon", props.name]
|
|
53
|
+
}), _isSlot(_slot2 = h(resolveComponent(props.name))) ? _slot2 : {
|
|
54
|
+
default: () => [_slot2]
|
|
55
|
+
}) : state.isUrl ? createVNode("div", mergeProps(attrs, {
|
|
56
|
+
"class": "el-icon fa-icon url-icon",
|
|
57
|
+
"style": state.style
|
|
58
|
+
}), null) : createVNode("i", mergeProps(attrs, {
|
|
59
|
+
"class": ["el-icon fa-icon", props.name],
|
|
60
|
+
"style": state.style
|
|
61
|
+
}), null);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
Icon as default,
|
|
67
|
+
faIconProps
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=icon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.mjs","sources":["../../../../../packages/components/icon/src/icon.tsx"],"sourcesContent":["import { computed, defineComponent, h, reactive, resolveComponent } from \"vue\";\nimport { ElIcon } from \"element-plus\";\nimport { RegExps } from \"@fast-element-plus/constants\";\nimport { addUnit, useRender } from \"@fast-china/utils\";\nimport type { CSSProperties } from \"vue\";\n\nexport const faIconProps = {\n\t/** @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库; */\n\tname: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\t/** @description 大小 */\n\tsize: {\n\t\ttype: [String, Number],\n\t},\n\t/** @description 颜色*/\n\tcolor: String,\n};\n\nexport default defineComponent({\n\tname: \"FaIcon\",\n\tprops: faIconProps,\n\tsetup(props, { attrs }) {\n\t\tconst state = reactive({\n\t\t\tisUrl: computed(() => RegExps.External.test(props.name)),\n\t\t\tstyle: computed((): CSSProperties => {\n\t\t\t\tconst result: any = {};\n\t\t\t\tif (props.size) {\n\t\t\t\t\tresult.size = addUnit(props.size);\n\t\t\t\t}\n\t\t\t\tif (props.color) {\n\t\t\t\t\tresult.color = props.color;\n\t\t\t\t}\n\t\t\t\tif (state.isUrl) {\n\t\t\t\t\tresult.mask = `url(${props.name}) no-repeat 50% 50%`;\n\t\t\t\t\tresult[\"-webkit-mask\"] = `url(${props.name}) no-repeat 50% 50%`;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}),\n\t\t});\n\n\t\tuseRender(() =>\n\t\t\tprops.name.indexOf(\"el-icon-\") === 0 ? (\n\t\t\t\t<ElIcon {...attrs} {...props} class={[\"fa-icon\", props.name]}>\n\t\t\t\t\t{h(resolveComponent(props.name))}\n\t\t\t\t</ElIcon>\n\t\t\t) : props.name.indexOf(\"fa-icon\") === 0 ? (\n\t\t\t\t<ElIcon {...attrs} {...props} class={[\"fa-icon\", props.name]}>\n\t\t\t\t\t{h(resolveComponent(props.name))}\n\t\t\t\t</ElIcon>\n\t\t\t) : state.isUrl ? (\n\t\t\t\t<div {...attrs} class=\"el-icon fa-icon url-icon\" style={state.style} />\n\t\t\t) : (\n\t\t\t\t<i {...attrs} class={[\"el-icon fa-icon\", props.name]} style={state.style} />\n\t\t\t)\n\t\t);\n\t},\n});\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","faIconProps","name","type","String","required","size","Number","color","props","setup","attrs","state","reactive","isUrl","computed","RegExps","External","test","style","result","addUnit","mask","useRender","_slot","_slot2","indexOf","_createVNode","ElIcon","_mergeProps","h","resolveComponent","default"],"mappings":";;;;;AAGuD,SAAAA,QAAAC,GAAA;AAAA,SAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAA,qBAAA,CAAAK,QAAAL,CAAA;AAAA;AAGhD,MAAMM,cAAc;AAAA;AAAA,EAE1BC,MAAM;AAAA,IACLC,MAAMC;AAAAA,IACNC,UAAU;AAAA;;EAGXC,MAAM;AAAA,IACLH,MAAM,CAACC,QAAQG,MAAM;AAAA;;EAGtBC,OAAOJ;AACR;AAEA,MAAA,uCAA+B;AAAA,EAC9BF,MAAM;AAAA,EACNO,OAAOR;AAAAA,EACPS,MAAMD,OAAO;AAAA,IAAEE;AAAAA,EAAM,GAAG;AACvB,UAAMC,QAAQC,SAAS;AAAA,MACtBC,OAAOC,SAAS,MAAMC,QAAQC,SAASC,KAAKT,MAAMP,IAAI,CAAC;AAAA,MACvDiB,OAAOJ,SAAS,MAAqB;AACpC,cAAMK,SAAc,CAAA;AACpB,YAAIX,MAAMH,MAAM;AACfc,iBAAOd,OAAOe,QAAQZ,MAAMH,IAAI;AAAA,QACjC;AACA,YAAIG,MAAMD,OAAO;AAChBY,iBAAOZ,QAAQC,MAAMD;AAAAA,QACtB;AACA,YAAII,MAAME,OAAO;AAChBM,iBAAOE,OAAO,OAAOb,MAAMP,IAAI;AAC/BkB,iBAAO,cAAc,IAAI,OAAOX,MAAMP,IAAI;AAAA,QAC3C;AACA,eAAOkB;AAAAA,MACR,CAAC;AAAA,IACF,CAAC;AAEDG,cAAU,MAAA;AAAA,UAAAC,OAAAC;AAAA,aACThB,MAAMP,KAAKwB,QAAQ,UAAU,MAAM,IAACC,YAAAC,QAAAC,WACvBlB,OAAWF,OAAK;AAAA,QAAA,SAAS,CAAC,WAAWA,MAAMP,IAAI;AAAA,MAAC,CAAA,GAAAR,QAAA8B,QAC1DM,EAAEC,iBAAiBtB,MAAMP,IAAI,CAAC,CAAC,IAAAsB,QAAA;AAAA,QAAAQ,SAAAA,MAAA,CAAAR,KAAA;AAAA,MAAA,CAAA,IAE9Bf,MAAMP,KAAKwB,QAAQ,SAAS,MAAM,IAACC,YAAAC,QAAAC,WAC1BlB,OAAWF,OAAK;AAAA,QAAA,SAAS,CAAC,WAAWA,MAAMP,IAAI;AAAA,MAAC,CAAA,GAAAR,QAAA+B,SAC1DK,EAAEC,iBAAiBtB,MAAMP,IAAI,CAAC,CAAC,IAAAuB,SAAA;AAAA,QAAAO,SAAAA,MAAA,CAAAP,MAAA;AAAA,OAAA,IAE9Bb,MAAME,QAAKa,YAAA,OAAAE,WACLlB,OAAK;AAAA,QAAA,SAAA;AAAA,QAAA,SAA0CC,MAAMO;AAAAA,MAAK,CAAA,GAAA,IAAA,IAAAQ,YAAA,KAAAE,WAE5DlB,OAAK;AAAA,QAAA,SAAS,CAAC,mBAAmBF,MAAMP,IAAI;AAAA,QAAC,SAASU,MAAMO;AAAAA,OAAK,GAAA,IAAA;AAAA,IACxE,CACF;AAAA,EACD;AACD,CAAC;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TSXWithInstall } from "@fast-china/utils";
|
|
2
|
+
import type { default as IconSelector } from "./src/iconSelector";
|
|
3
|
+
|
|
4
|
+
export declare const FaIconSelector: TSXWithInstall<typeof IconSelector>;
|
|
5
|
+
export default FaIconSelector;
|
|
6
|
+
|
|
7
|
+
export type FaIconSelectorInstance = InstanceType<typeof IconSelector>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/components/iconSelector/index.ts"],"sourcesContent":["import { withInstall } from \"@fast-china/utils\";\nimport IconSelector from \"./src/iconSelector\";\n\nexport const FaIconSelector = withInstall(IconSelector);\nexport default FaIconSelector;\n\nexport type FaIconSelectorInstance = InstanceType<typeof IconSelector>;\n"],"names":[],"mappings":";;AAGO,MAAM,iBAAiB,YAAY,YAAY;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type IconType = "ele" | "fastEle" | "local";
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
/** @description v-model绑定值 */
|
|
4
|
+
modelValue: StringConstructor;
|
|
5
|
+
/** @description 自定义图标 */
|
|
6
|
+
customIcons: import('vue').PropType<string[]>;
|
|
7
|
+
}>, {
|
|
8
|
+
iconType: IconType;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
/** @description v-model 回调 */
|
|
11
|
+
"update:modelValue": (value: string) => boolean;
|
|
12
|
+
/** @description 改变 */
|
|
13
|
+
change: (value: string) => boolean;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
/** @description v-model绑定值 */
|
|
16
|
+
modelValue: StringConstructor;
|
|
17
|
+
/** @description 自定义图标 */
|
|
18
|
+
customIcons: import('vue').PropType<string[]>;
|
|
19
|
+
}>> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
21
|
+
onChange?: (value: string) => any;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|