@qynpm/ui 1.0.44 → 1.0.46
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/README.md +9 -2
- package/dist/index.cjs +20 -13
- package/dist/index.mjs +268 -102
- package/dist/qy-action-bar/index.cjs +3 -1
- package/dist/qy-action-bar/index.mjs +7 -2
- package/dist/qy-autocomplete/index.cjs +1 -1
- package/dist/qy-autocomplete/index.mjs +1 -1
- package/dist/qy-button/index.cjs +1 -1
- package/dist/qy-button/index.mjs +1 -1
- package/dist/qy-cascader/index.cjs +1 -1
- package/dist/qy-cascader/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +1 -1
- package/dist/qy-checkbox-group/index.cjs +1 -1
- package/dist/qy-checkbox-group/index.mjs +1 -1
- package/dist/qy-collapse/index.cjs +1 -1
- package/dist/qy-collapse/index.mjs +1 -1
- package/dist/qy-color-picker/index.cjs +1 -1
- package/dist/qy-color-picker/index.mjs +1 -1
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +3 -2
- package/dist/qy-dialog/index.mjs +7 -5
- package/dist/qy-drawer/index.cjs +1 -1
- package/dist/qy-drawer/index.mjs +1 -1
- package/dist/qy-dropdown/index.cjs +2 -2
- package/dist/qy-dropdown/index.mjs +2 -2
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +3 -1
- package/dist/qy-form-section/index.mjs +7 -2
- package/dist/qy-fullscreen/index.cjs +1 -1
- package/dist/qy-fullscreen/index.mjs +1 -1
- package/dist/qy-icon/index.cjs +1 -1
- package/dist/qy-icon/index.mjs +2 -2
- package/dist/qy-icon-picker/index.cjs +1 -1
- package/dist/qy-icon-picker/index.mjs +1 -1
- package/dist/qy-iframe/index.cjs +1 -1
- package/dist/qy-iframe/index.mjs +1 -1
- package/dist/qy-image/index.cjs +1 -1
- package/dist/qy-image/index.mjs +1 -1
- package/dist/qy-image-preview/index.cjs +1 -1
- package/dist/qy-image-preview/index.mjs +2 -2
- package/dist/qy-image-upload/index.cjs +3 -1
- package/dist/qy-image-upload/index.mjs +7 -2
- package/dist/qy-input/index.cjs +1 -1
- package/dist/qy-input/index.mjs +1 -1
- package/dist/qy-input-number/index.cjs +1 -1
- package/dist/qy-input-number/index.mjs +1 -1
- package/dist/qy-input-tag/index.cjs +1 -1
- package/dist/qy-input-tag/index.mjs +151 -5
- package/dist/qy-legacy-selection-dialog/index.cjs +8 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +12 -2
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +1 -1
- package/dist/qy-pagination/index.cjs +1 -1
- package/dist/qy-pagination/index.mjs +1 -1
- package/dist/qy-popconfirm/index.cjs +1 -1
- package/dist/qy-popconfirm/index.mjs +1 -1
- package/dist/qy-popover/index.cjs +1 -1
- package/dist/qy-popover/index.mjs +1 -1
- package/dist/qy-radio/index.cjs +1 -1
- package/dist/qy-radio/index.mjs +1 -1
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +4 -1
- package/dist/qy-record-quote-search/index.mjs +8 -2
- package/dist/qy-remark-image/index.cjs +3 -1
- package/dist/qy-remark-image/index.mjs +11 -2
- package/dist/qy-remote-select/index.cjs +3 -1
- package/dist/qy-remote-select/index.mjs +7 -2
- package/dist/qy-result/index.cjs +1 -1
- package/dist/qy-result/index.mjs +1 -1
- package/dist/qy-scrollbar/index.cjs +1 -1
- package/dist/qy-scrollbar/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +3 -1
- package/dist/qy-search-input/index.mjs +7 -2
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +7 -1
- package/dist/qy-selection-dialog/index.mjs +11 -2
- package/dist/qy-switch/index.cjs +1 -1
- package/dist/qy-switch/index.mjs +1 -1
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tabs/index.cjs +1 -1
- package/dist/qy-tabs/index.mjs +1 -1
- package/dist/qy-tag/index.cjs +1 -1
- package/dist/qy-tag/index.mjs +1 -1
- package/dist/qy-tooltip/index.cjs +1 -1
- package/dist/qy-tooltip/index.mjs +1 -1
- package/dist/qy-tree/index.cjs +1 -1
- package/dist/qy-tree/index.mjs +1 -1
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/index-AvNvmJe5.cjs +1 -0
- package/dist/shared/{index-DvFMgAcu.mjs → index-B0CTzdRW.mjs} +1 -1
- package/dist/shared/index-B1J7PQMl.mjs +79 -0
- package/dist/shared/{index-DRIoLeFE.mjs → index-B1gnVI8Y.mjs} +44 -45
- package/dist/shared/{index-Co84fsS5.mjs → index-B7j9BtSm.mjs} +88 -80
- package/dist/shared/{index-CiE6qJCJ.mjs → index-BAOV5iYx.mjs} +151 -143
- package/dist/shared/index-BN4A-O6P.mjs +727 -0
- package/dist/shared/index-BR7tIt2k.mjs +211 -0
- package/dist/shared/index-BaRw7pWi.mjs +156 -0
- package/dist/shared/index-BgAP_K2E.cjs +1 -0
- package/dist/shared/index-Blgz8PJc.cjs +1 -0
- package/dist/shared/index-BqzKToOL.cjs +1 -0
- package/dist/shared/{index-BNssRW4d.mjs → index-BuVrLl5B.mjs} +13 -13
- package/dist/shared/index-Bv1DrJ32.mjs +71 -0
- package/dist/shared/index-Bz9WjKdL.cjs +1 -0
- package/dist/shared/{index-BjqJCq-6.mjs → index-Bzr2RHi5.mjs} +3 -3
- package/dist/shared/index-C50jpQ11.mjs +295 -0
- package/dist/shared/index-C6G9eVku.cjs +1 -0
- package/dist/shared/index-CB0v25oB.cjs +1 -0
- package/dist/shared/{index-gMrQlV5n.cjs → index-CIXJwYI-.cjs} +1 -1
- package/dist/shared/index-CKkanVur.cjs +1 -0
- package/dist/shared/index-CLvL8LAM.cjs +1 -0
- package/dist/shared/index-CN2mgT5V.cjs +1 -0
- package/dist/shared/{index-DNnWRAFl.mjs → index-CW4s627w.mjs} +1 -1
- package/dist/shared/{index-8Iwma3ls.mjs → index-CXOCZlps.mjs} +2 -2
- package/dist/shared/{index-CUlhX6fW.cjs → index-CXnL-0Kp.cjs} +1 -1
- package/dist/shared/index-CZs0V4ze.cjs +1 -0
- package/dist/shared/index-Cqr-L0yd.mjs +285 -0
- package/dist/shared/index-Cu6yAwdj.mjs +124 -0
- package/dist/shared/index-CxTyKMEH.cjs +1 -0
- package/dist/shared/index-D5HS8M1P.cjs +1 -0
- package/dist/shared/index-D6QwZtYV.mjs +56 -0
- package/dist/shared/index-DCsun70c.cjs +1 -0
- package/dist/shared/{index-BweLwi2_.cjs → index-DEzFHeJL.cjs} +1 -1
- package/dist/shared/{index-2D5AFexl.mjs → index-DNMRIYkm.mjs} +1 -1
- package/dist/shared/index-DY2IXvwl.cjs +1 -0
- package/dist/shared/{index-C4F8hXzQ.mjs → index-DdGlwebp.mjs} +90 -81
- package/dist/shared/index-DiN5vXXD.cjs +1 -0
- package/dist/shared/{index-Mj7JZt7y.cjs → index-Duq5XZ5w.cjs} +1 -1
- package/dist/shared/index-DwHM9eYc.cjs +1 -0
- package/dist/shared/index-FZ5gl2au.cjs +1 -0
- package/dist/shared/index-PM5yNugz.mjs +573 -0
- package/dist/shared/index-VtM0GmfU.mjs +361 -0
- package/dist/shared/index-ykI9hKtc.mjs +88 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-4CNzVpgF.mjs +40 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-B38X3tvf.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DIWWHODS.mjs → index.vue_vue_type_script_setup_true_lang-BtMkNw_I.mjs} +49 -47
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CeVvm5Ph.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Cn0JqB5r.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-D3MxDFk1.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Dn29lZTs.mjs → index.vue_vue_type_script_setup_true_lang-DECgTYqI.mjs} +20 -18
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DMHhx9lY.mjs +133 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DW2JKXjA.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DeFEEJk8.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-GUuWAB0o.mjs +238 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-mWNAIcqc.mjs +63 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B4fDeQox.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BLRxKB-e.mjs +413 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Ba6d5zw4.mjs +142 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BzJsAWKD.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-OHPkiKBo.cjs → index.vue_vue_type_style_index_0_lang-C4yXFBV_.cjs} +1 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CFp5MK6j.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CVAm3ApY.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-DbQkbvgb.mjs → index.vue_vue_type_style_index_0_lang-CuTyK1Ey.mjs} +3 -3
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CvVl_Y56.mjs +219 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D-p1u8y8.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D9T_xdbu.mjs +176 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DGV7FQlw.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs → index.vue_vue_type_style_index_0_lang-DZOPXZov.mjs} +59 -57
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-DSur831A.mjs → index.vue_vue_type_style_index_0_lang-KXiTSh4t.mjs} +24 -18
- package/dist/shared/js.cookie-BA-dL3zT.mjs +74 -0
- package/dist/shared/js.cookie-BmJmHEx1.cjs +1 -0
- package/dist/shared/overlay-stack-DeKq7jZu.cjs +1 -0
- package/dist/shared/overlay-stack-eI-yzYU6.mjs +34 -0
- package/dist/shared/{utils-DoyI5oM8.mjs → utils-DpZkMLkb.mjs} +63 -49
- package/dist/shared/utils-DpkN3Zat.cjs +1 -0
- package/index.d.ts +44 -15
- package/package.json +1 -1
- package/qy-action-bar/index.d.ts +16 -4
- package/qy-autocomplete/index.d.ts +43 -2
- package/qy-checkbox/index.d.ts +1 -0
- package/qy-checkbox-group/index.d.ts +1 -0
- package/qy-date-picker/index.d.ts +1 -0
- package/qy-dialog/index.d.ts +4 -0
- package/qy-form-section/index.d.ts +22 -4
- package/qy-image/index.d.ts +1 -0
- package/qy-image-preview/index.d.ts +8 -4
- package/qy-menu-actions/index.d.ts +21 -2
- package/qy-money-input/index.d.ts +1 -0
- package/qy-pagination/index.d.ts +4 -0
- package/qy-popover/index.d.ts +4 -0
- package/qy-radio-group/index.d.ts +1 -0
- package/qy-record-quote-search/index.d.ts +53 -4
- package/qy-remark-image/index.d.ts +48 -4
- package/qy-remote-select/index.d.ts +53 -2
- package/qy-search-input/index.d.ts +66 -4
- package/qy-select/index.d.ts +4 -0
- package/qy-selection-dialog/index.d.ts +63 -2
- package/qy-switch/index.d.ts +1 -0
- package/qy-table-column-settings/index.d.ts +19 -2
- package/qy-tooltip/index.d.ts +5 -0
- package/qy-tree-select/index.d.ts +1 -0
- package/dist/shared/index-5dxbpQb_.cjs +0 -1
- package/dist/shared/index-BEcS8y8g.mjs +0 -68
- package/dist/shared/index-BSTMCPDj.mjs +0 -72
- package/dist/shared/index-Bh9hxVFh.mjs +0 -766
- package/dist/shared/index-CGq7Q_hV.mjs +0 -119
- package/dist/shared/index-CVYNG8Fc.cjs +0 -1
- package/dist/shared/index-CmgTSaFS.cjs +0 -1
- package/dist/shared/index-CnVhquq5.cjs +0 -1
- package/dist/shared/index-D27mwR57.cjs +0 -1
- package/dist/shared/index-DKw-seoh.cjs +0 -1
- package/dist/shared/index-DRugp8x0.cjs +0 -1
- package/dist/shared/index-DTbGlDqr.cjs +0 -1
- package/dist/shared/index-MyDDX-zj.cjs +0 -1
- package/dist/shared/index-afOuq3YX.cjs +0 -1
- package/dist/shared/index-rSrDnOpu.cjs +0 -1
- package/dist/shared/index-rjciSHaR.mjs +0 -2362
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DwFGEW4B.mjs +0 -143
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +0 -94
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs +0 -48
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-r7iyZzDS.mjs +0 -61
- package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B2thgQml.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BMZqMPZb.mjs +0 -215
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs +0 -406
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-C4Yk-UdJ.mjs +0 -172
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DsOg_Rum.mjs +0 -128
- package/dist/shared/index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs +0 -1
- package/dist/shared/utils-BjEXwY3L.cjs +0 -1
- /package/dist/shared/{index-DiEag4sK.cjs → index-5UAiwqdT.cjs} +0 -0
- /package/dist/shared/{index-B3GsIwhf.mjs → index-BKdw4jD_.mjs} +0 -0
- /package/dist/shared/{index-B25yA5j-.mjs → index-BVaIvVMi.mjs} +0 -0
- /package/dist/shared/{index-HNFq7v-A.cjs → index-Bdlzmh8A.cjs} +0 -0
- /package/dist/shared/{index-Bq9quq2D.cjs → index-BsNtvE6i.cjs} +0 -0
- /package/dist/shared/{index-B3YHS3Aa.mjs → index-CGH2ROZV.mjs} +0 -0
- /package/dist/shared/{index-ByQyMTPg.mjs → index-DvXzDAmi.mjs} +0 -0
- /package/dist/shared/{index-EIFVul2W.cjs → index-O6K0DO_k.cjs} +0 -0
- /package/dist/shared/{index-B3XwO-Lc.mjs → index-QN7-6GpS.mjs} +0 -0
- /package/dist/shared/{index-CVWru9T3.cjs → index-_Bagw0Pj.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs → index.vue_vue_type_script_setup_true_lang-2ZOn9XPM.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-wG7OTsWa.mjs → index.vue_vue_type_script_setup_true_lang-DM0MGPZh.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CVdFZeHK.mjs → index.vue_vue_type_style_index_0_lang-90f2jQr7.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs → index.vue_vue_type_style_index_0_lang-BNL5vyrU.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs → index.vue_vue_type_style_index_0_lang-BvBAR8A1.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs → index.vue_vue_type_style_index_0_lang-C7L66EnO.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Tzo8o6M8.mjs → index.vue_vue_type_style_index_0_lang-CN3dJjUV.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs → index.vue_vue_type_style_index_0_lang-CNdV3Mnk.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-B1FgJZbw.mjs → index.vue_vue_type_style_index_0_lang-CgScSrRJ.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs → index.vue_vue_type_style_index_0_lang-Clt7QDAK.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs → index.vue_vue_type_style_index_0_lang-CvlRVqcl.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-KHk9wRYT.mjs → index.vue_vue_type_style_index_0_lang-DGt78p3G.mjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs → index.vue_vue_type_style_index_0_lang-J7wvS2CR.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs → index.vue_vue_type_style_index_0_lang-YEjVWWsy.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-D9DraThL.cjs → index.vue_vue_type_style_index_0_lang-nS-EDK4t.cjs} +0 -0
- /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs → index.vue_vue_type_style_index_0_lang-yci929so.cjs} +0 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { defineComponent as _, useAttrs as ee, ref as te, reactive as V, computed as P, watch as y, openBlock as g, createElementBlock as T, Fragment as B, createVNode as f, mergeProps as R, unref as u, withCtx as s, renderSlot as m, createBlock as b, createCommentVNode as S, renderList as ae, withKeys as re, withModifiers as oe, createTextVNode as ne, nextTick as le } from "vue";
|
|
2
|
+
import { ElForm as ie, ElFormItem as C, ElTreeSelect as ce, ElSelect as ue, ElOption as se, ElInput as de, ElButton as ye } from "element-plus";
|
|
3
|
+
import { C as fe } from "./index-PM5yNugz.mjs";
|
|
4
|
+
import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const me = /* @__PURE__ */ _({
|
|
6
|
+
name: "QyLegacySelectionDialog",
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
open: { type: Boolean, default: !0 },
|
|
11
|
+
title: { default: "选择数据" },
|
|
12
|
+
width: { default: "1200px" },
|
|
13
|
+
query: { type: Function, default: void 0 },
|
|
14
|
+
responseFormatter: { type: Function, default: void 0 },
|
|
15
|
+
selection: { default: "single" },
|
|
16
|
+
selected: { default: () => [] },
|
|
17
|
+
mainKey: { default: "" },
|
|
18
|
+
tagName: { default: "" },
|
|
19
|
+
searchKey: { default: "conditions" },
|
|
20
|
+
queryParams: { default: () => ({}) },
|
|
21
|
+
category: { type: [Array, Function, Boolean], default: !1 },
|
|
22
|
+
categoryFormatter: { type: [Function, Array], default: void 0 },
|
|
23
|
+
type: { type: [Array, Boolean], default: !1 },
|
|
24
|
+
typeSelectionProps: { default: () => ({}) },
|
|
25
|
+
tableProps: { default: () => ({}) },
|
|
26
|
+
append: { type: Boolean, default: !1 },
|
|
27
|
+
delete: { type: Boolean, default: !1 },
|
|
28
|
+
select: { default: null }
|
|
29
|
+
},
|
|
30
|
+
emits: ["close", "submit", "openDialog", "changeIndexShow"],
|
|
31
|
+
setup(i, { expose: x, emit: E }) {
|
|
32
|
+
const a = i, p = E, O = ee(), v = te(null), l = V({
|
|
33
|
+
category: [],
|
|
34
|
+
code: "",
|
|
35
|
+
...a.searchKey ? { [a.searchKey]: "" } : {},
|
|
36
|
+
page: 1,
|
|
37
|
+
pageSize: 10,
|
|
38
|
+
type: "",
|
|
39
|
+
...a.queryParams
|
|
40
|
+
}), o = V({
|
|
41
|
+
total: 0,
|
|
42
|
+
tableData: [],
|
|
43
|
+
open: !1,
|
|
44
|
+
selection: [],
|
|
45
|
+
categories: [],
|
|
46
|
+
types: [],
|
|
47
|
+
tableRef: null,
|
|
48
|
+
drag: !1,
|
|
49
|
+
dialogOpen: !1,
|
|
50
|
+
pasteData: "",
|
|
51
|
+
pasteDataDialog: !1
|
|
52
|
+
}), h = P(() => a.type || []), z = P(() => o.categories), I = async (e) => {
|
|
53
|
+
if (!a.query) return { data: { records: [], total: 0 } };
|
|
54
|
+
const t = await a.query(H(e)), r = a.responseFormatter ? await a.responseFormatter(t) : t;
|
|
55
|
+
return o.total = Y(r), r;
|
|
56
|
+
};
|
|
57
|
+
y(
|
|
58
|
+
() => a.open,
|
|
59
|
+
(e) => {
|
|
60
|
+
o.open = e;
|
|
61
|
+
},
|
|
62
|
+
{ immediate: !0 }
|
|
63
|
+
), y(
|
|
64
|
+
h,
|
|
65
|
+
(e) => {
|
|
66
|
+
o.types = [...e];
|
|
67
|
+
},
|
|
68
|
+
{ immediate: !0, deep: !0 }
|
|
69
|
+
), y(
|
|
70
|
+
[() => a.selected, () => a.open],
|
|
71
|
+
() => {
|
|
72
|
+
a.open && (o.selection = w(a.selected));
|
|
73
|
+
},
|
|
74
|
+
{ immediate: !0, deep: !0 }
|
|
75
|
+
), y(
|
|
76
|
+
() => a.queryParams,
|
|
77
|
+
() => {
|
|
78
|
+
Object.assign(l, a.queryParams);
|
|
79
|
+
},
|
|
80
|
+
{ deep: !0 }
|
|
81
|
+
), y(
|
|
82
|
+
() => o.pasteDataDialog,
|
|
83
|
+
(e) => {
|
|
84
|
+
e || (o.pasteData = "");
|
|
85
|
+
}
|
|
86
|
+
), y(
|
|
87
|
+
() => a.select,
|
|
88
|
+
async () => {
|
|
89
|
+
a.select && await G(a.select);
|
|
90
|
+
},
|
|
91
|
+
{ deep: !0 }
|
|
92
|
+
), y(
|
|
93
|
+
() => a.open,
|
|
94
|
+
async (e) => {
|
|
95
|
+
e && (o.dialogOpen = !1, await $());
|
|
96
|
+
},
|
|
97
|
+
{ immediate: !0 }
|
|
98
|
+
);
|
|
99
|
+
async function $() {
|
|
100
|
+
if (!a.category) {
|
|
101
|
+
o.categories = [];
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const e = typeof a.category == "function" ? await a.category() : a.category;
|
|
105
|
+
o.categories = W(e);
|
|
106
|
+
}
|
|
107
|
+
async function c() {
|
|
108
|
+
var e;
|
|
109
|
+
return await le(), (e = v.value) == null ? void 0 : e.handleQuerySearch();
|
|
110
|
+
}
|
|
111
|
+
function L(e) {
|
|
112
|
+
o.selection = w(e);
|
|
113
|
+
}
|
|
114
|
+
function N(e) {
|
|
115
|
+
var t;
|
|
116
|
+
o.tableData = e, o.tableRef = (t = v.value) == null ? void 0 : t.getTableRef();
|
|
117
|
+
}
|
|
118
|
+
function Q(e) {
|
|
119
|
+
o.selection = w(e), p("submit", o);
|
|
120
|
+
}
|
|
121
|
+
function U() {
|
|
122
|
+
p("close");
|
|
123
|
+
}
|
|
124
|
+
function M() {
|
|
125
|
+
o.dialogOpen = !0, p("openDialog");
|
|
126
|
+
}
|
|
127
|
+
function j(e) {
|
|
128
|
+
p("changeIndexShow", e);
|
|
129
|
+
}
|
|
130
|
+
async function G(e) {
|
|
131
|
+
if (!a.query || !a.searchKey || !a.mainKey) return;
|
|
132
|
+
const t = await a.query({
|
|
133
|
+
...l,
|
|
134
|
+
[a.searchKey]: e[a.mainKey],
|
|
135
|
+
category: []
|
|
136
|
+
}), r = a.responseFormatter ? await a.responseFormatter(t) : t, [n] = D(r);
|
|
137
|
+
n && (a.selection === "multi" ? (o.selection = o.selection.filter(
|
|
138
|
+
(d) => d[a.mainKey] !== n[a.mainKey]
|
|
139
|
+
), o.selection.push(n)) : o.selection = [n]);
|
|
140
|
+
}
|
|
141
|
+
function H(e = {}) {
|
|
142
|
+
l.page = e.page ?? l.page, l.pageSize = e.pageSize ?? l.pageSize;
|
|
143
|
+
const t = {
|
|
144
|
+
...l,
|
|
145
|
+
category: J()
|
|
146
|
+
};
|
|
147
|
+
return a.searchKey && (t[a.searchKey] = String(t[a.searchKey] || "").trim()), t;
|
|
148
|
+
}
|
|
149
|
+
function J() {
|
|
150
|
+
if (a.queryParams.category)
|
|
151
|
+
return a.queryParams.category;
|
|
152
|
+
const e = l.category;
|
|
153
|
+
if (Array.isArray(e)) return e;
|
|
154
|
+
if (!e) return [];
|
|
155
|
+
const t = K(o.categories, e);
|
|
156
|
+
return t ? q(t) : [e];
|
|
157
|
+
}
|
|
158
|
+
function K(e, t) {
|
|
159
|
+
for (const r of e || []) {
|
|
160
|
+
if (r.value === t) return r;
|
|
161
|
+
const n = K(r.children || [], t);
|
|
162
|
+
if (n) return n;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function q(e) {
|
|
166
|
+
return [e.value, ...(e.children || []).flatMap(q)];
|
|
167
|
+
}
|
|
168
|
+
function W(e) {
|
|
169
|
+
const t = (e == null ? void 0 : e.data) ?? e;
|
|
170
|
+
if (!Array.isArray(t)) return [];
|
|
171
|
+
if (typeof a.categoryFormatter == "function")
|
|
172
|
+
return a.categoryFormatter(t);
|
|
173
|
+
if (Array.isArray(a.categoryFormatter)) {
|
|
174
|
+
const [r, n] = a.categoryFormatter;
|
|
175
|
+
return F(X(t, n), r, n);
|
|
176
|
+
}
|
|
177
|
+
return t;
|
|
178
|
+
}
|
|
179
|
+
function X(e, t) {
|
|
180
|
+
const r = e.map((d) => ({ ...d })), n = [];
|
|
181
|
+
return r.forEach((d) => {
|
|
182
|
+
const k = d.parentCateCode;
|
|
183
|
+
if (!k) {
|
|
184
|
+
n.push(d);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const A = r.find((Z) => Z[t] === k);
|
|
188
|
+
A ? (A.children || (A.children = [])).push(d) : n.push(d);
|
|
189
|
+
}), n;
|
|
190
|
+
}
|
|
191
|
+
function F(e, t, r) {
|
|
192
|
+
return e.map((n) => ({
|
|
193
|
+
...n,
|
|
194
|
+
label: n[t],
|
|
195
|
+
value: n[r],
|
|
196
|
+
children: Array.isArray(n.children) ? F(n.children, t, r) : n.children
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
function D(e) {
|
|
200
|
+
if (Array.isArray(e)) return e;
|
|
201
|
+
const t = e == null ? void 0 : e.data;
|
|
202
|
+
return Array.isArray(t) ? t : (e == null ? void 0 : e.records) || (e == null ? void 0 : e.rows) || (t == null ? void 0 : t.records) || [];
|
|
203
|
+
}
|
|
204
|
+
function Y(e) {
|
|
205
|
+
if (Array.isArray(e)) return e.length;
|
|
206
|
+
const t = D(e), r = e == null ? void 0 : e.data;
|
|
207
|
+
return (e == null ? void 0 : e.total) ?? (Array.isArray(r) ? r.length : r == null ? void 0 : r.total) ?? t.length;
|
|
208
|
+
}
|
|
209
|
+
function w(e = []) {
|
|
210
|
+
return e.map((t) => ({ ...t }));
|
|
211
|
+
}
|
|
212
|
+
return x({
|
|
213
|
+
search: c,
|
|
214
|
+
handleSearch: c,
|
|
215
|
+
handleConditionChange: c,
|
|
216
|
+
getTableRef: () => o.tableRef,
|
|
217
|
+
getTableData: () => o.tableData,
|
|
218
|
+
getSelection: () => w(o.selection)
|
|
219
|
+
}), (e, t) => (g(), T(B, null, [
|
|
220
|
+
f(fe, R({
|
|
221
|
+
ref_key: "selectionDialogRef",
|
|
222
|
+
ref: v
|
|
223
|
+
}, u(O), {
|
|
224
|
+
modelValue: o.selection,
|
|
225
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => o.selection = r),
|
|
226
|
+
open: i.open,
|
|
227
|
+
title: i.title,
|
|
228
|
+
width: i.width,
|
|
229
|
+
query: I,
|
|
230
|
+
"response-formatter": i.responseFormatter,
|
|
231
|
+
selection: i.selection,
|
|
232
|
+
"row-key": i.mainKey,
|
|
233
|
+
"label-key": i.tagName,
|
|
234
|
+
"search-key": i.searchKey,
|
|
235
|
+
"query-params": {},
|
|
236
|
+
"category-options": z.value,
|
|
237
|
+
"type-options": h.value,
|
|
238
|
+
"type-select-props": i.typeSelectionProps,
|
|
239
|
+
"table-props": i.tableProps,
|
|
240
|
+
"show-copy-paste": !0,
|
|
241
|
+
"show-append": i.append,
|
|
242
|
+
onSelectionChange: L,
|
|
243
|
+
onConfirm: Q,
|
|
244
|
+
onCancel: U,
|
|
245
|
+
onAppend: M,
|
|
246
|
+
onLoaded: N
|
|
247
|
+
}), {
|
|
248
|
+
side: s(() => [
|
|
249
|
+
m(e.$slots, "side", {
|
|
250
|
+
state: o,
|
|
251
|
+
cate: o.categories,
|
|
252
|
+
form: l,
|
|
253
|
+
query: l,
|
|
254
|
+
getData: c,
|
|
255
|
+
search: c,
|
|
256
|
+
changeIndexShow: j
|
|
257
|
+
}, void 0, !0)
|
|
258
|
+
]),
|
|
259
|
+
search: s(() => [
|
|
260
|
+
f(u(ie), {
|
|
261
|
+
inline: "",
|
|
262
|
+
model: l
|
|
263
|
+
}, {
|
|
264
|
+
default: s(() => [
|
|
265
|
+
o.categories.length ? (g(), b(u(C), {
|
|
266
|
+
key: 0,
|
|
267
|
+
label: "分类"
|
|
268
|
+
}, {
|
|
269
|
+
default: s(() => [
|
|
270
|
+
f(u(ce), {
|
|
271
|
+
modelValue: l.category,
|
|
272
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => l.category = r),
|
|
273
|
+
class: "qy-legacy-selection-dialog__category",
|
|
274
|
+
data: o.categories,
|
|
275
|
+
clearable: "",
|
|
276
|
+
filterable: "",
|
|
277
|
+
"check-strictly": "",
|
|
278
|
+
"render-after-expand": !1,
|
|
279
|
+
onChange: c
|
|
280
|
+
}, null, 8, ["modelValue", "data"])
|
|
281
|
+
]),
|
|
282
|
+
_: 1
|
|
283
|
+
})) : S("", !0),
|
|
284
|
+
h.value.length ? (g(), b(u(C), {
|
|
285
|
+
key: 1,
|
|
286
|
+
label: "类型"
|
|
287
|
+
}, {
|
|
288
|
+
default: s(() => [
|
|
289
|
+
f(u(ue), R({
|
|
290
|
+
modelValue: l.type,
|
|
291
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => l.type = r),
|
|
292
|
+
clearable: ""
|
|
293
|
+
}, i.typeSelectionProps, { onChange: c }), {
|
|
294
|
+
default: s(() => [
|
|
295
|
+
(g(!0), T(B, null, ae(h.value, (r) => (g(), b(u(se), {
|
|
296
|
+
key: r.value,
|
|
297
|
+
label: r.label,
|
|
298
|
+
value: r.value
|
|
299
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
300
|
+
]),
|
|
301
|
+
_: 1
|
|
302
|
+
}, 16, ["modelValue"])
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
})) : S("", !0),
|
|
306
|
+
i.searchKey ? (g(), b(u(C), {
|
|
307
|
+
key: 2,
|
|
308
|
+
label: "搜索"
|
|
309
|
+
}, {
|
|
310
|
+
default: s(() => [
|
|
311
|
+
f(u(de), {
|
|
312
|
+
modelValue: l[i.searchKey],
|
|
313
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => l[i.searchKey] = r),
|
|
314
|
+
clearable: "",
|
|
315
|
+
class: "qy-legacy-selection-dialog__search-input",
|
|
316
|
+
onKeydown: re(oe(c, ["prevent"]), ["enter"])
|
|
317
|
+
}, null, 8, ["modelValue", "onKeydown"])
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
})) : S("", !0),
|
|
321
|
+
f(u(C), null, {
|
|
322
|
+
default: s(() => [
|
|
323
|
+
f(u(ye), {
|
|
324
|
+
type: "primary",
|
|
325
|
+
onClick: c
|
|
326
|
+
}, {
|
|
327
|
+
default: s(() => [...t[4] || (t[4] = [
|
|
328
|
+
ne("查询", -1)
|
|
329
|
+
])]),
|
|
330
|
+
_: 1
|
|
331
|
+
})
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
})
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
}, 8, ["model"])
|
|
338
|
+
]),
|
|
339
|
+
toolbar: s(() => [
|
|
340
|
+
m(e.$slots, "bar", {
|
|
341
|
+
query: l,
|
|
342
|
+
search: c
|
|
343
|
+
}, void 0, !0)
|
|
344
|
+
]),
|
|
345
|
+
columns: s(() => [
|
|
346
|
+
m(e.$slots, "cols", {}, void 0, !0),
|
|
347
|
+
m(e.$slots, "columns", {}, void 0, !0)
|
|
348
|
+
]),
|
|
349
|
+
_: 3
|
|
350
|
+
}, 16, ["modelValue", "open", "title", "width", "response-formatter", "selection", "row-key", "label-key", "search-key", "category-options", "type-options", "type-select-props", "table-props", "show-append"]),
|
|
351
|
+
m(e.$slots, "dialog", {
|
|
352
|
+
state: o,
|
|
353
|
+
form: l,
|
|
354
|
+
getData: c
|
|
355
|
+
}, void 0, !0)
|
|
356
|
+
], 64));
|
|
357
|
+
}
|
|
358
|
+
}), Ce = /* @__PURE__ */ ge(me, [["__scopeId", "data-v-5c8cd0de"]]);
|
|
359
|
+
export {
|
|
360
|
+
Ce as C
|
|
361
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as b, ref as p, watch as v, openBlock as i, createElementBlock as l, normalizeClass as n, createElementVNode as d, renderSlot as s, toDisplayString as c, createCommentVNode as r, withModifiers as h, withDirectives as g, vShow as C } from "vue";
|
|
2
|
+
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const q = { class: "qy-form-section__heading" }, $ = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "qy-form-section__title"
|
|
6
|
+
}, E = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "qy-form-section__description"
|
|
9
|
+
}, w = { class: "qy-form-section__actions" }, B = /* @__PURE__ */ b({
|
|
10
|
+
name: "QyFormSection",
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
title: { default: "" },
|
|
14
|
+
description: { default: "" },
|
|
15
|
+
tip: { default: "" },
|
|
16
|
+
tipType: { default: "info" },
|
|
17
|
+
collapsible: { type: Boolean, default: !1 },
|
|
18
|
+
defaultExpanded: { type: Boolean, default: !0 },
|
|
19
|
+
bordered: { type: Boolean, default: !0 },
|
|
20
|
+
background: { default: "white" },
|
|
21
|
+
bodyClass: { default: "" },
|
|
22
|
+
headerClass: { default: "" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["toggle"],
|
|
25
|
+
setup(e, { emit: f }) {
|
|
26
|
+
const a = e, m = f, o = p(a.defaultExpanded);
|
|
27
|
+
v(
|
|
28
|
+
() => a.defaultExpanded,
|
|
29
|
+
(t) => {
|
|
30
|
+
o.value = t;
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
function u() {
|
|
34
|
+
a.collapsible && (o.value = !o.value, m("toggle", o.value));
|
|
35
|
+
}
|
|
36
|
+
function y() {
|
|
37
|
+
a.collapsible && u();
|
|
38
|
+
}
|
|
39
|
+
return (t, x) => (i(), l("section", {
|
|
40
|
+
class: n(["qy-form-section", [
|
|
41
|
+
`is-bg-${e.background}`,
|
|
42
|
+
{
|
|
43
|
+
"is-bordered": e.bordered,
|
|
44
|
+
"is-collapsible": e.collapsible
|
|
45
|
+
}
|
|
46
|
+
]])
|
|
47
|
+
}, [
|
|
48
|
+
d("header", {
|
|
49
|
+
class: n(["qy-form-section__header", e.headerClass]),
|
|
50
|
+
onClick: y
|
|
51
|
+
}, [
|
|
52
|
+
d("div", q, [
|
|
53
|
+
s(t.$slots, "title", {}, () => [
|
|
54
|
+
e.title ? (i(), l("div", $, c(e.title), 1)) : r("", !0)
|
|
55
|
+
], !0),
|
|
56
|
+
s(t.$slots, "description", {}, () => [
|
|
57
|
+
e.description ? (i(), l("div", E, c(e.description), 1)) : r("", !0)
|
|
58
|
+
], !0)
|
|
59
|
+
]),
|
|
60
|
+
d("div", w, [
|
|
61
|
+
s(t.$slots, "actions", {}, void 0, !0),
|
|
62
|
+
e.collapsible ? (i(), l("button", {
|
|
63
|
+
key: 0,
|
|
64
|
+
type: "button",
|
|
65
|
+
class: "qy-form-section__toggle",
|
|
66
|
+
onClick: h(u, ["stop"])
|
|
67
|
+
}, c(o.value ? "收起" : "展开"), 1)) : r("", !0)
|
|
68
|
+
])
|
|
69
|
+
], 2),
|
|
70
|
+
g(d("div", {
|
|
71
|
+
class: n(["qy-form-section__body", e.bodyClass])
|
|
72
|
+
}, [
|
|
73
|
+
s(t.$slots, "tip", {}, () => [
|
|
74
|
+
e.tip ? (i(), l("div", {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: n(["qy-form-section__tip", `is-${e.tipType}`])
|
|
77
|
+
}, c(e.tip), 3)) : r("", !0)
|
|
78
|
+
], !0),
|
|
79
|
+
s(t.$slots, "default", {}, void 0, !0)
|
|
80
|
+
], 2), [
|
|
81
|
+
[C, o.value]
|
|
82
|
+
])
|
|
83
|
+
], 2));
|
|
84
|
+
}
|
|
85
|
+
}), D = /* @__PURE__ */ k(B, [["__scopeId", "data-v-3b271926"]]);
|
|
86
|
+
export {
|
|
87
|
+
D as C
|
|
88
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as m, computed as s, ref as c, watch as f, onBeforeUnmount as p, openBlock as x, createBlock as h, unref as v, createCommentVNode as I } from "vue";
|
|
2
|
+
import { useZIndex as y, ElImageViewer as B } from "element-plus";
|
|
3
|
+
import { r as C } from "./overlay-stack-eI-yzYU6.mjs";
|
|
4
|
+
import { n as g, a as k } from "./utils-DpZkMLkb.mjs";
|
|
5
|
+
const P = /* @__PURE__ */ m({
|
|
6
|
+
name: "QyImagePreview",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
open: { type: Boolean, default: !1 },
|
|
10
|
+
urlList: { default: () => [] },
|
|
11
|
+
initialIndex: { default: 0 },
|
|
12
|
+
hideOnClickModal: { type: Boolean, default: !0 }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:open", "close"],
|
|
15
|
+
setup(n, { emit: d }) {
|
|
16
|
+
const o = n, l = d, i = s(
|
|
17
|
+
() => o.urlList.map((t) => g(t)).filter(Boolean)
|
|
18
|
+
);
|
|
19
|
+
let e;
|
|
20
|
+
const a = c(0), { nextZIndex: r } = y();
|
|
21
|
+
f(() => o.open && i.value.length > 0, (t) => {
|
|
22
|
+
t ? (a.value = C(r()), e ?? (e = k())) : (e == null || e(), e = void 0);
|
|
23
|
+
}, { immediate: !0, flush: "sync" }), p(() => e == null ? void 0 : e());
|
|
24
|
+
function u() {
|
|
25
|
+
l("update:open", !1), l("close");
|
|
26
|
+
}
|
|
27
|
+
return (t, z) => n.open && i.value.length ? (x(), h(v(B), {
|
|
28
|
+
key: 0,
|
|
29
|
+
"url-list": i.value,
|
|
30
|
+
"initial-index": n.initialIndex,
|
|
31
|
+
"hide-on-click-modal": n.hideOnClickModal,
|
|
32
|
+
teleported: !0,
|
|
33
|
+
"z-index": a.value,
|
|
34
|
+
onClose: u
|
|
35
|
+
}, null, 8, ["url-list", "initial-index", "hide-on-click-modal", "z-index"])) : I("", !0);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
P as _
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("vue"),T=require("element-plus"),q=n.defineComponent({name:"QyMoneyInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},precision:{default:2},min:{default:void 0},max:{default:void 0},allowNegative:{type:Boolean,default:!1},formatTrigger:{default:"blur"},emptyValue:{default:""},placeholder:{default:void 0},clearable:{type:Boolean,default:!1},validateEvent:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:!1},size:{default:void 0},name:{default:void 0},id:{default:void 0},autocomplete:{default:void 0},autofocus:{type:Boolean,default:!1},maxlength:{default:void 0},minlength:{default:void 0},tabindex:{default:void 0},ariaLabel:{default:void 0}},emits:["update:modelValue","input","change","focus","blur","clear","enter"],setup(l,{expose:y,emit:g}){const a=l,o=g,V=n.useAttrs(),d=n.ref(null),s=n.ref(i(a.modelValue)),B=n.computed(()=>i(a.modelValue));n.watch(()=>a.modelValue,e=>{s.value=i(e)});function i(e){return e==null?"":String(e)}function v(e){return Number.isFinite(e)?Math.max(0,Math.floor(e)):2}function m(e){const t=i(e);let r="",c=!1,x=!1;const h=v(a.precision);for(let f=0;f<t.length;f+=1){const u=t[f];if(u>="0"&&u<="9"){r+=u;continue}if(u==="."&&h>0&&!c){r+=u,c=!0;continue}u==="-"&&a.allowNegative&&f===0&&!x&&(r+=u,x=!0)}if(h>0&&c){const[f,u=""]=r.split(".");return`${f}.${u.slice(0,h)}`}return r}function N(e){let t=e;return typeof a.min=="number"&&Number.isFinite(a.min)&&(t=Math.max(t,a.min)),typeof a.max=="number"&&Number.isFinite(a.max)&&(t=Math.min(t,a.max)),t}function b(e){const t=m(e);if(!t||t==="-"||t===".")return i(a.emptyValue);const r=Number(t);if(Number.isNaN(r))return i(a.emptyValue);const c=v(a.precision);return N(r).toFixed(c)}function p(e){s.value=e,o("update:modelValue",e)}function $(e){const t=m(e);p(t)}function w(e){const t=m(e);s.value=t,o("input",t)}function C(e){const t=a.formatTrigger==="change"?b(e):m(e);t!==i(a.modelValue)&&p(t),o("change",t)}function M(e){o("focus",e)}function k(e){if(a.formatTrigger==="blur"){const t=b(s.value);t!==i(a.modelValue)&&p(t)}o("blur",e)}function z(){const e=i(a.emptyValue);s.value=e,o("update:modelValue",e),o("clear")}function F(e){o("enter",e)}function I(){var e,t;(t=(e=d.value)==null?void 0:e.focus)==null||t.call(e)}function S(){var e,t;(t=(e=d.value)==null?void 0:e.blur)==null||t.call(e)}function E(){var e,t;(t=(e=d.value)==null?void 0:e.select)==null||t.call(e)}function A(){var e,t;(t=(e=d.value)==null?void 0:e.clear)==null||t.call(e)}function P(){var e;return((e=d.value)==null?void 0:e.input)||null}return y({focus:I,blur:S,select:E,clear:A,getNativeInput:P}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(T.ElInput),n.mergeProps({ref_key:"inputRef",ref:d},n.unref(V),{"model-value":B.value,inputmode:"decimal",placeholder:l.placeholder,clearable:l.clearable,disabled:l.disabled,"validate-event":l.validateEvent,readonly:l.readonly,size:l.size,name:l.name,id:l.id,autocomplete:l.autocomplete,autofocus:l.autofocus,maxlength:l.maxlength,minlength:l.minlength,tabindex:l.tabindex,"aria-label":l.ariaLabel,"onUpdate:modelValue":$,onInput:w,onChange:C,onFocus:M,onBlur:k,onClear:z,onKeydown:n.withKeys(F,["enter"])}),n.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prepend")]),key:"2"}:void 0,e.$slots.append?{name:"append",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"append")]),key:"3"}:void 0]),1040,["model-value","placeholder","clearable","disabled","validate-event","readonly","size","name","id","autocomplete","autofocus","maxlength","minlength","tabindex","aria-label"]))}});exports._sfc_main=q;
|