@qynpm/ui 1.0.40 → 1.0.42
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 +1797 -1797
- package/dist/index.cjs +19 -19
- package/dist/index.mjs +21 -21
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-alert/index.cjs +1 -1
- package/dist/qy-alert/index.mjs +4 -4
- package/dist/qy-aside/index.cjs +1 -1
- package/dist/qy-aside/index.mjs +4 -4
- package/dist/qy-autocomplete/index.cjs +1 -1
- package/dist/qy-autocomplete/index.mjs +3 -3
- package/dist/qy-avatar/index.cjs +1 -1
- package/dist/qy-avatar/index.mjs +1 -1
- package/dist/qy-badge/index.cjs +1 -1
- package/dist/qy-badge/index.mjs +4 -4
- package/dist/qy-button/index.cjs +2 -2
- package/dist/qy-button/index.mjs +2 -2
- package/dist/qy-card/index.cjs +1 -1
- package/dist/qy-card/index.mjs +1 -1
- package/dist/qy-cascader/index.cjs +1 -1
- package/dist/qy-cascader/index.mjs +3 -3
- 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 +4 -4
- package/dist/qy-col/index.cjs +1 -1
- package/dist/qy-col/index.mjs +4 -4
- package/dist/qy-collapse/index.cjs +1 -1
- package/dist/qy-collapse/index.mjs +2 -2
- package/dist/qy-collapse-item/index.cjs +1 -1
- package/dist/qy-collapse-item/index.mjs +5 -5
- package/dist/qy-color-picker/index.cjs +1 -1
- package/dist/qy-color-picker/index.mjs +4 -4
- package/dist/qy-container/index.cjs +1 -1
- package/dist/qy-container/index.mjs +3 -3
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +1 -1
- package/dist/qy-descriptions/index.cjs +1 -1
- package/dist/qy-descriptions/index.mjs +1 -1
- package/dist/qy-descriptions-item/index.cjs +1 -1
- package/dist/qy-descriptions-item/index.mjs +4 -4
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +4 -4
- package/dist/qy-divider/index.cjs +1 -1
- package/dist/qy-divider/index.mjs +4 -4
- package/dist/qy-drawer/index.cjs +1 -1
- package/dist/qy-drawer/index.mjs +2 -2
- package/dist/qy-dropdown/index.cjs +2 -2
- package/dist/qy-dropdown/index.mjs +2 -2
- package/dist/qy-empty/index.cjs +1 -1
- package/dist/qy-empty/index.mjs +4 -4
- 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 +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- 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 +2 -2
- package/dist/qy-icon-picker/index.mjs +5 -5
- 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 +1 -1
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- 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 +2 -2
- package/dist/qy-input-tag/index.cjs +1 -1
- package/dist/qy-input-tag/index.mjs +4 -4
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-link/index.cjs +1 -1
- package/dist/qy-link/index.mjs +5 -5
- package/dist/qy-main/index.cjs +1 -1
- package/dist/qy-main/index.mjs +4 -4
- 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 +4 -4
- 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 +5 -5
- package/dist/qy-popover/index.cjs +1 -1
- package/dist/qy-popover/index.mjs +4 -4
- package/dist/qy-progress/index.cjs +1 -1
- package/dist/qy-progress/index.mjs +3 -3
- 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 +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-result/index.cjs +1 -1
- package/dist/qy-result/index.mjs +4 -4
- package/dist/qy-row/index.cjs +1 -1
- package/dist/qy-row/index.mjs +4 -4
- package/dist/qy-scrollbar/index.cjs +1 -1
- package/dist/qy-scrollbar/index.mjs +3 -3
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-skeleton/index.cjs +1 -1
- package/dist/qy-skeleton/index.mjs +4 -4
- package/dist/qy-skeleton-item/index.cjs +1 -1
- package/dist/qy-skeleton-item/index.mjs +4 -4
- package/dist/qy-statistic/index.cjs +1 -1
- package/dist/qy-statistic/index.mjs +3 -3
- package/dist/qy-step/index.cjs +1 -1
- package/dist/qy-step/index.mjs +5 -5
- package/dist/qy-steps/index.cjs +1 -1
- package/dist/qy-steps/index.mjs +4 -4
- package/dist/qy-switch/index.cjs +1 -1
- package/dist/qy-switch/index.mjs +1 -1
- package/dist/qy-tab-pane/index.cjs +1 -1
- package/dist/qy-tab-pane/index.mjs +4 -4
- 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 +4 -4
- 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 +4 -4
- package/dist/qy-tree/index.cjs +1 -1
- package/dist/qy-tree/index.mjs +5 -5
- 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/qy-watermark/index.cjs +1 -1
- package/dist/qy-watermark/index.mjs +1 -1
- package/dist/shared/{index-CBhrdEIf.mjs → index-2D5AFexl.mjs} +1 -1
- package/dist/shared/index-8Iwma3ls.mjs +222 -0
- package/dist/shared/index-B25yA5j-.mjs +71 -0
- package/dist/shared/index-B3GsIwhf.mjs +142 -0
- package/dist/shared/index-B3XwO-Lc.mjs +127 -0
- package/dist/shared/index-B3YHS3Aa.mjs +54 -0
- package/dist/shared/index-BEcS8y8g.mjs +68 -0
- package/dist/shared/index-BNssRW4d.mjs +90 -0
- package/dist/shared/index-BPnHycGa.cjs +1 -0
- package/dist/shared/index-BSTMCPDj.mjs +72 -0
- package/dist/shared/index-BhvOSOfi.mjs +766 -0
- package/dist/shared/index-BjqJCq-6.mjs +293 -0
- package/dist/shared/index-Bq9quq2D.cjs +1 -0
- package/dist/shared/index-ByQyMTPg.mjs +285 -0
- package/dist/shared/index-CGq7Q_hV.mjs +119 -0
- package/dist/shared/{index-D97QYFZw.cjs → index-CUlhX6fW.cjs} +1 -1
- package/dist/shared/index-CVWru9T3.cjs +1 -0
- package/dist/shared/index-CVYNG8Fc.cjs +1 -0
- package/dist/shared/index-CiE6qJCJ.mjs +377 -0
- package/dist/shared/index-CnVhquq5.cjs +1 -0
- package/dist/shared/index-Co84fsS5.mjs +225 -0
- package/dist/shared/index-D27mwR57.cjs +1 -0
- package/dist/shared/index-DAztNKSp.cjs +1 -0
- package/dist/shared/index-DKw-seoh.cjs +1 -0
- package/dist/shared/index-DRIoLeFE.mjs +162 -0
- package/dist/shared/index-DRugp8x0.cjs +1 -0
- package/dist/shared/index-DTbGlDqr.cjs +1 -0
- package/dist/shared/index-DXZ6Y6wd.mjs +107 -0
- package/dist/shared/index-DiEag4sK.cjs +1 -0
- package/dist/shared/index-DuP-b_eY.cjs +1 -0
- package/dist/shared/index-DvFMgAcu.mjs +149 -0
- package/dist/shared/index-EIFVul2W.cjs +1 -0
- package/dist/shared/index-HNFq7v-A.cjs +1 -0
- package/dist/shared/index-Mj7JZt7y.cjs +1 -0
- package/dist/shared/index-MyDDX-zj.cjs +1 -0
- package/dist/shared/index-QewoB6N4.mjs +2362 -0
- package/dist/shared/index-d76Z3yrB.cjs +1 -0
- package/dist/shared/index-gMrQlV5n.cjs +1 -0
- package/dist/shared/index-rSrDnOpu.cjs +1 -0
- package/dist/shared/index-zo5J-y0C.mjs +157 -0
- package/dist/shared/{index-CCVlab6d.mjs → index.vue_vue_type_script_lang-69zSOotQ.mjs} +10 -11
- package/dist/shared/index.vue_vue_type_script_lang-8AT3-xU-.cjs +1 -0
- package/dist/shared/{index-EPcAlzgc.mjs → index.vue_vue_type_script_lang-BGAdXWIL.mjs} +11 -12
- package/dist/shared/index.vue_vue_type_script_lang-BO9Ju_i0.cjs +1 -0
- package/dist/shared/{index-1Vw54aYL.mjs → index.vue_vue_type_script_lang-BaIOvoQn.mjs} +5 -6
- package/dist/shared/index.vue_vue_type_script_lang-Bc3tktk9.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-BgapsQjI.cjs +1 -0
- package/dist/shared/{index-BG3XKumS.mjs → index.vue_vue_type_script_lang-Bk0kLg5l.mjs} +8 -9
- package/dist/shared/index.vue_vue_type_script_lang-BkoqbceR.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-BnmY1ndj.mjs +77 -0
- package/dist/shared/index.vue_vue_type_script_lang-By3jd4gw.cjs +1 -0
- package/dist/shared/{index-Se0xx6vl.mjs → index.vue_vue_type_script_lang-C4JHCuXz.mjs} +13 -14
- package/dist/shared/{index-D_Imq4-m.mjs → index.vue_vue_type_script_lang-C9X0V5AK.mjs} +12 -13
- package/dist/shared/index.vue_vue_type_script_lang-CCL57H5c.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CIOi2ahp.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CKZUcaZ5.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CWnNQBPN.mjs +31 -0
- package/dist/shared/{index-CrlLsoRF.mjs → index.vue_vue_type_script_lang-CZK0hDYa.mjs} +20 -21
- package/dist/shared/index.vue_vue_type_script_lang-CfjfZCT3.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-ChS-3_vl.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_lang-Cv4Pf58E.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-CwrbII5c.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-D42aRlO2.cjs +1 -0
- package/dist/shared/{index-BPXJkcM1.mjs → index.vue_vue_type_script_lang-D7b9ABei.mjs} +19 -20
- package/dist/shared/{index-LDtOVxCE.mjs → index.vue_vue_type_script_lang-D7nzeBUR.mjs} +7 -8
- package/dist/shared/index.vue_vue_type_script_lang-DIKHRo0o.mjs +72 -0
- package/dist/shared/index.vue_vue_type_script_lang-DLmUPDR5.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-DMrpLmWN.cjs +1 -0
- package/dist/shared/{index-TVUj4Yp4.mjs → index.vue_vue_type_script_lang-DOOT2grg.mjs} +10 -11
- package/dist/shared/index.vue_vue_type_script_lang-DRvk4-_O.mjs +43 -0
- package/dist/shared/{index-BQzQcTgt.mjs → index.vue_vue_type_script_lang-Dfq7D3mJ.mjs} +3 -4
- package/dist/shared/index.vue_vue_type_script_lang-DpSaB5eg.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_lang-WJ63_A7F.cjs +1 -0
- package/dist/shared/{index-B1I7mCIm.mjs → index.vue_vue_type_script_lang-chBiq2cG.mjs} +3 -4
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-4KZSABSM.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-B4JrNUDc.mjs +43 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJe7Uo6S.mjs +42 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BWi3g3mb.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BXnZt9UT.mjs +63 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Bdz9oDDW.mjs +62 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-C96ZaggL.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-COAUEujY.mjs +48 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Cr9PdvyR.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DIWWHODS.mjs +197 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DUEhuwGQ.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Dd_nKJvH.mjs +19 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Dn29lZTs.mjs +106 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DwFGEW4B.mjs +143 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +94 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs +48 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-r7iyZzDS.mjs +61 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-wG7OTsWa.mjs +331 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B1FgJZbw.mjs +148 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B2thgQml.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BMZqMPZb.mjs +215 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BXAUYDO7.mjs +404 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs +67 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-C4Yk-UdJ.mjs +172 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs +286 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CVdFZeHK.mjs +98 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs +166 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D9DraThL.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Da67JRFL.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DbQkbvgb.mjs +317 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DsOg_Rum.mjs +128 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-KHk9wRYT.mjs +298 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-OHPkiKBo.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs +1 -0
- package/dist/shared/{index-DZU3jXf9.mjs → index.vue_vue_type_style_index_0_lang-Tzo8o6M8.mjs} +9 -10
- package/dist/shared/index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs +1 -0
- package/dist/shared/{index-GRwpbz1m.mjs → index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs} +17 -18
- package/dist/shared/index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs +1 -0
- package/index.d.ts +592 -592
- package/package.json +14 -10
- package/qy-action-bar/index.d.ts +5 -5
- package/qy-aside/index.d.ts +47 -47
- package/qy-button/index.d.ts +34 -34
- package/qy-checkbox/index.d.ts +45 -45
- package/qy-checkbox-group/index.d.ts +48 -48
- package/qy-col/index.d.ts +65 -65
- package/qy-color-picker/index.d.ts +36 -36
- package/qy-container/index.d.ts +49 -49
- package/qy-date-picker/index.d.ts +140 -140
- package/qy-dropdown/index.d.ts +40 -40
- package/qy-file-picker/index.d.ts +48 -48
- package/qy-form-section/index.d.ts +5 -5
- package/qy-fullscreen/index.d.ts +72 -72
- package/qy-icon/index.d.ts +99 -99
- package/qy-icon-picker/index.d.ts +56 -56
- package/qy-input/index.d.ts +32 -32
- package/qy-input-number/index.d.ts +15 -15
- package/qy-legacy-selection-dialog/index.d.ts +5 -5
- package/qy-main/index.d.ts +45 -45
- package/qy-popconfirm/index.d.ts +55 -55
- package/qy-popover/index.d.ts +63 -63
- package/qy-radio/index.d.ts +44 -44
- package/qy-radio-group/index.d.ts +60 -60
- package/qy-record-quote-search/index.d.ts +5 -5
- package/qy-remark-image/index.d.ts +5 -5
- package/qy-remote-select/index.d.ts +12 -12
- package/qy-row/index.d.ts +59 -59
- package/qy-search-input/index.d.ts +5 -5
- package/qy-select/index.d.ts +67 -67
- package/qy-selection-dialog/index.d.ts +5 -5
- package/qy-statistic/index.d.ts +61 -61
- package/qy-switch/index.d.ts +46 -46
- package/qy-tag/index.d.ts +44 -44
- package/qy-tooltip/index.d.ts +54 -54
- package/qy-watermark/index.d.ts +72 -72
- package/dist/shared/index-5vWL_IJI.mjs +0 -150
- package/dist/shared/index-7fIb2Tqw.mjs +0 -129
- package/dist/shared/index-9T0p3USM.cjs +0 -1
- package/dist/shared/index-B-zfoMbw.cjs +0 -1
- package/dist/shared/index-B1aU9mew.mjs +0 -77
- package/dist/shared/index-B26-GlFX.cjs +0 -1
- package/dist/shared/index-B63vgrS4.mjs +0 -73
- package/dist/shared/index-B97hTd-h.cjs +0 -1
- package/dist/shared/index-B9zEH5Yq.cjs +0 -1
- package/dist/shared/index-BA_tJgLE.cjs +0 -1
- package/dist/shared/index-BBIPQa5N.mjs +0 -76
- package/dist/shared/index-BCWvMvRL.cjs +0 -1
- package/dist/shared/index-BDJIWxaw.cjs +0 -1
- package/dist/shared/index-BFbAB8UH.mjs +0 -307
- package/dist/shared/index-BHGDbXoK.mjs +0 -82
- package/dist/shared/index-BInkt-Al.cjs +0 -1
- package/dist/shared/index-BKEw_9fh.mjs +0 -2660
- package/dist/shared/index-BNfu2YgX.mjs +0 -47
- package/dist/shared/index-BUSdZ-x8.cjs +0 -1
- package/dist/shared/index-BZDbBD41.cjs +0 -1
- package/dist/shared/index-Bc1ny9GC.cjs +0 -1
- package/dist/shared/index-BcscC86C.mjs +0 -206
- package/dist/shared/index-BiowqiSD.cjs +0 -1
- package/dist/shared/index-Bpl6Jh4H.cjs +0 -1
- package/dist/shared/index-BqojE7aF.cjs +0 -1
- package/dist/shared/index-BrZzYI8x.cjs +0 -1
- package/dist/shared/index-BsXys36-.cjs +0 -1
- package/dist/shared/index-BvmXE8aK.cjs +0 -1
- package/dist/shared/index-Bw3nETeY.cjs +0 -1
- package/dist/shared/index-BxxuaQGJ.cjs +0 -1
- package/dist/shared/index-BxymsnW0.cjs +0 -1
- package/dist/shared/index-BzpgGytE.mjs +0 -52
- package/dist/shared/index-BzzZmppN.mjs +0 -63
- package/dist/shared/index-C0rOcDsc.cjs +0 -1
- package/dist/shared/index-C1hAuubZ.mjs +0 -157
- package/dist/shared/index-C2BQtQPa.mjs +0 -61
- package/dist/shared/index-C62Loq0f.cjs +0 -1
- package/dist/shared/index-C7N8x3DK.mjs +0 -206
- package/dist/shared/index-C8aLbb8l.cjs +0 -1
- package/dist/shared/index-CA279UZp.mjs +0 -87
- package/dist/shared/index-CDjAMIpe.cjs +0 -1
- package/dist/shared/index-CDleTMJj.mjs +0 -395
- package/dist/shared/index-CG4I3nRK.cjs +0 -1
- package/dist/shared/index-CHt1R1WD.cjs +0 -1
- package/dist/shared/index-CZIsLBLq.cjs +0 -1
- package/dist/shared/index-CcEXTVYA.mjs +0 -69
- package/dist/shared/index-CedTjtZr.cjs +0 -1
- package/dist/shared/index-CgXuleV-.mjs +0 -205
- package/dist/shared/index-CkfWS0Ba.cjs +0 -1
- package/dist/shared/index-Cm7k9j8a.cjs +0 -1
- package/dist/shared/index-CmgT_pgc.mjs +0 -154
- package/dist/shared/index-CngdcQWi.cjs +0 -1
- package/dist/shared/index-CqdhLbMe.cjs +0 -1
- package/dist/shared/index-CsI1WBRp.cjs +0 -1
- package/dist/shared/index-CsXA7Qfy.mjs +0 -105
- package/dist/shared/index-CsaDF9d4.mjs +0 -175
- package/dist/shared/index-CvdUJpAu.mjs +0 -365
- package/dist/shared/index-CvfLEIFE.mjs +0 -526
- package/dist/shared/index-CwcD7q4B.mjs +0 -446
- package/dist/shared/index-D0kCG3Ov.mjs +0 -278
- package/dist/shared/index-D1-QYDXi.cjs +0 -1
- package/dist/shared/index-D1BK66mG.cjs +0 -1
- package/dist/shared/index-D3IHte_d.cjs +0 -1
- package/dist/shared/index-D3VO2Ccd.mjs +0 -73
- package/dist/shared/index-D5spJ8nj.cjs +0 -1
- package/dist/shared/index-D7uPizqd.cjs +0 -1
- package/dist/shared/index-D8OJx-hy.mjs +0 -104
- package/dist/shared/index-DAiFZxwY.mjs +0 -51
- package/dist/shared/index-DBz3lz62.mjs +0 -53
- package/dist/shared/index-DCKEecrx.mjs +0 -138
- package/dist/shared/index-DCneRuMf.mjs +0 -78
- package/dist/shared/index-DD-zKgrO.cjs +0 -1
- package/dist/shared/index-DEHvfBYQ.mjs +0 -295
- package/dist/shared/index-DF_Q6c4g.mjs +0 -27
- package/dist/shared/index-DFeV2CL8.cjs +0 -1
- package/dist/shared/index-DIckpqrH.cjs +0 -1
- package/dist/shared/index-DKKMSKqm.cjs +0 -1
- package/dist/shared/index-DPhYSn9g.mjs +0 -130
- package/dist/shared/index-DSq7WIiO.cjs +0 -1
- package/dist/shared/index-DTHRZ-aL.mjs +0 -74
- package/dist/shared/index-DTqCwGN_.cjs +0 -1
- package/dist/shared/index-DVwCIrin.mjs +0 -100
- package/dist/shared/index-DbxSDJ7e.mjs +0 -81
- package/dist/shared/index-Dc4A_1-H.mjs +0 -53
- package/dist/shared/index-Dchy1DNn.mjs +0 -197
- package/dist/shared/index-DdKCUobQ.mjs +0 -311
- package/dist/shared/index-DdX40CzJ.cjs +0 -1
- package/dist/shared/index-DfP6txWq.mjs +0 -198
- package/dist/shared/index-Dh_dh3TS.cjs +0 -1
- package/dist/shared/index-DjRDV62n.mjs +0 -153
- package/dist/shared/index-DpGlBnUl.cjs +0 -1
- package/dist/shared/index-DsDUAk2R.cjs +0 -1
- package/dist/shared/index-DxUzSONj.cjs +0 -1
- package/dist/shared/index-DypZJHmM.cjs +0 -1
- package/dist/shared/index-DzCwEfCQ.cjs +0 -1
- package/dist/shared/index-Gyu5R4Gn.cjs +0 -1
- package/dist/shared/index-IJJI2ylC.mjs +0 -234
- package/dist/shared/index-OaA2R7Ur.mjs +0 -369
- package/dist/shared/index-S2TDFo5d.cjs +0 -1
- package/dist/shared/index-U3c1apvC.cjs +0 -1
- package/dist/shared/index-VExJFRrd.mjs +0 -156
- package/dist/shared/index-Xw2_Py_V.mjs +0 -63
- package/dist/shared/index-ZbSETCxZ.cjs +0 -1
- package/dist/shared/index-ZkHMbIv4.cjs +0 -1
- package/dist/shared/index-aveXATNw.cjs +0 -1
- package/dist/shared/index-byOl9Vtk.cjs +0 -1
- package/dist/shared/index-fiuhurmv.cjs +0 -1
- package/dist/shared/index-pqwrEshN.cjs +0 -1
- package/dist/shared/index-rowlxa3p.mjs +0 -245
- package/dist/shared/index-trf8Dvbk.cjs +0 -1
- package/dist/shared/index-tsfRa5ze.cjs +0 -1
- package/dist/shared/index-uRVIiLjP.mjs +0 -892
|
@@ -1,2660 +0,0 @@
|
|
|
1
|
-
import { D as xe } from "./index-CvfLEIFE.mjs";
|
|
2
|
-
import { U as De, a as va } from "./index-uRVIiLjP.mjs";
|
|
3
|
-
import { I as ba } from "./index-5vWL_IJI.mjs";
|
|
4
|
-
import { I as Sa } from "./index-C2BQtQPa.mjs";
|
|
5
|
-
import { openBlock as b, createBlock as oe, mergeProps as fe, useAttrs as pe, ref as x, computed as C, defineComponent as he, watch as le, onMounted as qa, nextTick as ke, onUnmounted as Qa, createElementBlock as F, normalizeStyle as Re, normalizeClass as ge, createElementVNode as $, withCtx as v, Fragment as Qe, renderList as Te, createCommentVNode as I, createVNode as O, createTextVNode as ie, onBeforeUnmount as _a, createSlots as Pe, renderSlot as _, normalizeProps as ze, guardReactiveProps as Ke, withKeys as Ie, toDisplayString as ce, useSlots as wa, getCurrentInstance as Ca, reactive as Ce, withModifiers as Fe, withDirectives as Me, vShow as ka } from "vue";
|
|
6
|
-
import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
|
-
import { ElMessage as be, ElUpload as Ta, ElSelect as Le, ElPopover as Pa, ElOption as Ue, ElInput as Be, ElButton as we, ElAutocomplete as Ia, ElTableColumn as Fa, ElTable as Ba, ElPagination as Aa, ElFormItem as je, ElForm as Ne, ElTreeSelect as Va } from "element-plus";
|
|
8
|
-
import { B as Ea } from "./index-DCKEecrx.mjs";
|
|
9
|
-
import { D as Oa } from "./index-DfP6txWq.mjs";
|
|
10
|
-
import { I as xa } from "./index-DjRDV62n.mjs";
|
|
11
|
-
import { I as Da } from "./index-CmgT_pgc.mjs";
|
|
12
|
-
import { I as Ra } from "./index-C1hAuubZ.mjs";
|
|
13
|
-
import { M as za } from "./index-BcscC86C.mjs";
|
|
14
|
-
import { D as Ka } from "./index-CsaDF9d4.mjs";
|
|
15
|
-
import { C as Ma } from "./index-DbxSDJ7e.mjs";
|
|
16
|
-
import { C as La } from "./index-BHGDbXoK.mjs";
|
|
17
|
-
import { R as Ua } from "./index-D8OJx-hy.mjs";
|
|
18
|
-
import { A as ja } from "./index-DVwCIrin.mjs";
|
|
19
|
-
import { M as Na } from "./index-CgXuleV-.mjs";
|
|
20
|
-
import { T as Wa } from "./index-CwcD7q4B.mjs";
|
|
21
|
-
import { R as Ga } from "./index-DPhYSn9g.mjs";
|
|
22
|
-
import { S as Ae } from "./index-rowlxa3p.mjs";
|
|
23
|
-
import { T as We } from "./index-CDleTMJj.mjs";
|
|
24
|
-
import { ElLoadingDirective as Ha } from "element-plus/es";
|
|
25
|
-
import { T as Ge } from "./index-BzzZmppN.mjs";
|
|
26
|
-
import { F as Ja } from "./index-7fIb2Tqw.mjs";
|
|
27
|
-
import { S as Za } from "./index-BBIPQa5N.mjs";
|
|
28
|
-
import { B as Xa } from "./index-B63vgrS4.mjs";
|
|
29
|
-
import { C as Ya } from "./index-DEHvfBYQ.mjs";
|
|
30
|
-
import { T as $a } from "./index-CA279UZp.mjs";
|
|
31
|
-
import { P as eo } from "./index-VExJFRrd.mjs";
|
|
32
|
-
import { P as to } from "./index-D0kCG3Ov.mjs";
|
|
33
|
-
import { S as ao } from "./index-DAiFZxwY.mjs";
|
|
34
|
-
import { S as oo } from "./index-DF_Q6c4g.mjs";
|
|
35
|
-
import { T as lo } from "./index-GRwpbz1m.mjs";
|
|
36
|
-
import { T as ro } from "./index-BQzQcTgt.mjs";
|
|
37
|
-
import { S as no } from "./index-CrlLsoRF.mjs";
|
|
38
|
-
import { S as io } from "./index-CCVlab6d.mjs";
|
|
39
|
-
import { F as so } from "./index-IJJI2ylC.mjs";
|
|
40
|
-
import { Q as He } from "./index-CBhrdEIf.mjs";
|
|
41
|
-
import { P as uo } from "./index-CvdUJpAu.mjs";
|
|
42
|
-
import { P as co } from "./index-C7N8x3DK.mjs";
|
|
43
|
-
import { R as fo } from "./index-BG3XKumS.mjs";
|
|
44
|
-
import { C as yo } from "./index-1Vw54aYL.mjs";
|
|
45
|
-
import { C as mo } from "./index-Dc4A_1-H.mjs";
|
|
46
|
-
import { A as go } from "./index-DBz3lz62.mjs";
|
|
47
|
-
import { M as po } from "./index-BNfu2YgX.mjs";
|
|
48
|
-
import { D as ho } from "./index-BPXJkcM1.mjs";
|
|
49
|
-
import { D as vo } from "./index-B1I7mCIm.mjs";
|
|
50
|
-
import { C as bo } from "./index-DTHRZ-aL.mjs";
|
|
51
|
-
import { C as So } from "./index-CcEXTVYA.mjs";
|
|
52
|
-
import { L as qo } from "./index-D3VO2Ccd.mjs";
|
|
53
|
-
import { I as Qo } from "./index-B1aU9mew.mjs";
|
|
54
|
-
import { D as _o } from "./index-BzpgGytE.mjs";
|
|
55
|
-
import { E as wo } from "./index-LDtOVxCE.mjs";
|
|
56
|
-
import { A as Co } from "./index-D_Imq4-m.mjs";
|
|
57
|
-
import { C as ko } from "./index-Se0xx6vl.mjs";
|
|
58
|
-
import { R as To } from "./index-DZU3jXf9.mjs";
|
|
59
|
-
import { W as Po } from "./index-Xw2_Py_V.mjs";
|
|
60
|
-
import { S as Io } from "./index-CsXA7Qfy.mjs";
|
|
61
|
-
import { P as Fo } from "./index-EPcAlzgc.mjs";
|
|
62
|
-
import { S as Bo } from "./index-DCneRuMf.mjs";
|
|
63
|
-
import { A as Ao } from "./index-TVUj4Yp4.mjs";
|
|
64
|
-
import { T as Vo } from "./index-BFbAB8UH.mjs";
|
|
65
|
-
import { P as Eo } from "./index-Dchy1DNn.mjs";
|
|
66
|
-
import { w as c } from "./install-CxBnxbuN.mjs";
|
|
67
|
-
import { v as Oo, Q as Je } from "./index-B1zDCCqy.mjs";
|
|
68
|
-
import { D as xo } from "./index-OaA2R7Ur.mjs";
|
|
69
|
-
import { o as Do } from "./utils-DoyI5oM8.mjs";
|
|
70
|
-
import { openQyLoading as Ro } from "@qynpm/hooks";
|
|
71
|
-
const zo = /* @__PURE__ */ Object.assign({
|
|
72
|
-
name: "QyImageUpload",
|
|
73
|
-
inheritAttrs: !1
|
|
74
|
-
}, {
|
|
75
|
-
__name: "index",
|
|
76
|
-
props: {
|
|
77
|
-
/** 单图/单文件 URL;multiple=true 时为 URL 数组。 */
|
|
78
|
-
modelValue: { type: [String, Array], default: "" },
|
|
79
|
-
/** 上传接口路径。 */
|
|
80
|
-
api: { type: String, default: "/permission-api/common/uploads" },
|
|
81
|
-
/** FormData 中文件字段名。 */
|
|
82
|
-
name: { type: String, default: "files" },
|
|
83
|
-
/** 是否禁用。 */
|
|
84
|
-
disabled: { type: Boolean, default: !1 },
|
|
85
|
-
/** 是否多选;开启后 v-model 输出 string[]。 */
|
|
86
|
-
multiple: { type: Boolean, default: !1 },
|
|
87
|
-
/** 上传模式。voucher 用于承接旧 CopyImgUpload 的凭证图片场景。 */
|
|
88
|
-
mode: { type: String, default: "default" },
|
|
89
|
-
/** 是否启用凭证图片模式。 */
|
|
90
|
-
voucher: { type: Boolean, default: !1 },
|
|
91
|
-
/** 允许的文件类型后缀。 */
|
|
92
|
-
fileType: { type: Array, default: () => [] },
|
|
93
|
-
/** 单个文件大小限制(MB)。 */
|
|
94
|
-
fileSize: { type: Number, default: 10 },
|
|
95
|
-
/** 是否显示格式/大小提示。 */
|
|
96
|
-
isShowTip: { type: Boolean, default: !1 },
|
|
97
|
-
/** 文件数量限制;不传时单图为 1,多图为 9。 */
|
|
98
|
-
limit: { type: Number, default: void 0 },
|
|
99
|
-
/** token 读取 key。 */
|
|
100
|
-
tokenKey: { type: String, default: "Admin-Token" },
|
|
101
|
-
/** 是否为视频上传。 */
|
|
102
|
-
supportVideo: { type: Boolean, default: !1 },
|
|
103
|
-
/** 上传卡片尺寸。 */
|
|
104
|
-
size: { type: String, default: "128px" },
|
|
105
|
-
/** 禁用拖拽。 */
|
|
106
|
-
disableDrag: { type: Boolean, default: !1 },
|
|
107
|
-
/** 是否显示纯粘贴入口。 */
|
|
108
|
-
showPasteInput: { type: Boolean, default: !0 },
|
|
109
|
-
/** 粘贴入口提示文案。 */
|
|
110
|
-
pastePlaceholder: { type: String, default: "粘贴图片上传" },
|
|
111
|
-
/** 成功回调。 */
|
|
112
|
-
callBack: { type: Function, default: null },
|
|
113
|
-
/** 上传时附加的额外 FormData 字段。 */
|
|
114
|
-
extraData: { type: Object, default: () => ({}) },
|
|
115
|
-
/** 自定义上传请求,用于接入宿主项目 request / 鉴权 / baseURL。 */
|
|
116
|
-
uploadRequest: { type: Function, default: null }
|
|
117
|
-
},
|
|
118
|
-
emits: [
|
|
119
|
-
"update:modelValue",
|
|
120
|
-
"change",
|
|
121
|
-
"success",
|
|
122
|
-
"error",
|
|
123
|
-
"remove",
|
|
124
|
-
"updateImg"
|
|
125
|
-
],
|
|
126
|
-
setup(t, { expose: i, emit: a }) {
|
|
127
|
-
const e = t, n = a, B = pe(), y = x(null), u = ["jpg", "jpeg", "png", "gif", "bmp", "webp"], m = C(
|
|
128
|
-
() => e.voucher || e.mode === "voucher"
|
|
129
|
-
), D = C(() => Array.isArray(e.modelValue) ? e.modelValue.filter(Boolean) : e.modelValue ? String(e.modelValue).split(",").filter(Boolean) : []), Q = C(() => e.supportVideo ? 1 : m.value ? e.limit ?? 30 : e.limit ?? (e.multiple ? 9 : 1)), R = C(() => {
|
|
130
|
-
var o;
|
|
131
|
-
return (o = e.fileType) != null && o.length ? e.fileType : m.value && !e.supportVideo ? u : [];
|
|
132
|
-
});
|
|
133
|
-
function w(o) {
|
|
134
|
-
return Array.isArray(o) ? o.filter(Boolean) : [];
|
|
135
|
-
}
|
|
136
|
-
function A(o) {
|
|
137
|
-
const d = w(o);
|
|
138
|
-
return e.multiple ? d : d[0] || "";
|
|
139
|
-
}
|
|
140
|
-
function Z(o) {
|
|
141
|
-
n("update:modelValue", A(o));
|
|
142
|
-
}
|
|
143
|
-
function U(o) {
|
|
144
|
-
n("change", A(o == null ? void 0 : o.files));
|
|
145
|
-
}
|
|
146
|
-
function K(o) {
|
|
147
|
-
var H, s;
|
|
148
|
-
if (typeof o == "string") return o;
|
|
149
|
-
const d = o || {}, E = d.url ?? d.urls ?? ((H = d.data) == null ? void 0 : H.url) ?? ((s = d.data) == null ? void 0 : s.urls) ?? "";
|
|
150
|
-
return Array.isArray(E) ? E[0] || "" : E || "";
|
|
151
|
-
}
|
|
152
|
-
function V(o) {
|
|
153
|
-
const d = K(o);
|
|
154
|
-
d && n("updateImg", d), n("success", p(), o);
|
|
155
|
-
}
|
|
156
|
-
function X(o) {
|
|
157
|
-
n("error", o);
|
|
158
|
-
}
|
|
159
|
-
function ee(o, d) {
|
|
160
|
-
n("remove", o, d);
|
|
161
|
-
}
|
|
162
|
-
function N() {
|
|
163
|
-
var o, d;
|
|
164
|
-
(d = (o = y.value) == null ? void 0 : o.openFileDialog) == null || d.call(o);
|
|
165
|
-
}
|
|
166
|
-
function W() {
|
|
167
|
-
var o, d;
|
|
168
|
-
(d = (o = y.value) == null ? void 0 : o.clearFiles) == null || d.call(o);
|
|
169
|
-
}
|
|
170
|
-
function M() {
|
|
171
|
-
var o, d;
|
|
172
|
-
return ((d = (o = y.value) == null ? void 0 : o.getPathList) == null ? void 0 : d.call(o)) || [];
|
|
173
|
-
}
|
|
174
|
-
const G = C(() => M()), j = C(() => M());
|
|
175
|
-
function te() {
|
|
176
|
-
return M();
|
|
177
|
-
}
|
|
178
|
-
function p() {
|
|
179
|
-
const o = M();
|
|
180
|
-
return e.multiple ? o : o[0] || "";
|
|
181
|
-
}
|
|
182
|
-
i({
|
|
183
|
-
openFileDialog: N,
|
|
184
|
-
clearFiles: W,
|
|
185
|
-
getPathList: M,
|
|
186
|
-
getFullPathList: te,
|
|
187
|
-
fullPathList: G,
|
|
188
|
-
pathList: j,
|
|
189
|
-
getValue: p
|
|
190
|
-
});
|
|
191
|
-
const S = { props: e, emit: n, attrs: B, uploadRef: y, voucherImageTypes: u, isVoucherMode: m, modelAsArray: D, uploadLimit: Q, effectiveFileType: R, normalizeValue: w, formatValue: A, handleUpdateModelValue: Z, handleChange: U, resolveUploadUrl: K, handleSuccess: V, handleError: X, handleRemove: ee, openFileDialog: N, clearFiles: W, getPathList: M, fullPathList: G, pathList: j, getFullPathList: te, getValue: p, computed: C, ref: x, useAttrs: pe, QyUpload: De };
|
|
192
|
-
return Object.defineProperty(S, "__isScriptSetup", { enumerable: !1, value: !0 }), S;
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
function Ko(t, i, a, e, n, B) {
|
|
196
|
-
return b(), oe(e.QyUpload, fe({ ref: "uploadRef" }, e.attrs, {
|
|
197
|
-
"model-value": e.modelAsArray,
|
|
198
|
-
"value-format": "array",
|
|
199
|
-
api: a.api,
|
|
200
|
-
name: a.name,
|
|
201
|
-
multiple: a.multiple,
|
|
202
|
-
disabled: a.disabled,
|
|
203
|
-
"file-type": e.effectiveFileType,
|
|
204
|
-
"file-size": a.fileSize,
|
|
205
|
-
limit: e.uploadLimit,
|
|
206
|
-
"is-show-tip": a.isShowTip,
|
|
207
|
-
"token-key": a.tokenKey,
|
|
208
|
-
"support-video": a.supportVideo,
|
|
209
|
-
size: a.size,
|
|
210
|
-
"disable-drag": a.disableDrag,
|
|
211
|
-
"call-back": a.callBack,
|
|
212
|
-
"extra-data": a.extraData,
|
|
213
|
-
"upload-request": a.uploadRequest,
|
|
214
|
-
"show-text": !1,
|
|
215
|
-
"show-paste-input": a.showPasteInput,
|
|
216
|
-
"paste-placeholder": a.pastePlaceholder,
|
|
217
|
-
"onUpdate:modelValue": e.handleUpdateModelValue,
|
|
218
|
-
onChange: e.handleChange,
|
|
219
|
-
onSuccess: e.handleSuccess,
|
|
220
|
-
onError: e.handleError,
|
|
221
|
-
onRemove: e.handleRemove
|
|
222
|
-
}), null, 16, ["model-value", "api", "name", "multiple", "disabled", "file-type", "file-size", "limit", "is-show-tip", "token-key", "support-video", "size", "disable-drag", "call-back", "extra-data", "upload-request", "show-paste-input", "paste-placeholder"]);
|
|
223
|
-
}
|
|
224
|
-
const Mo = /* @__PURE__ */ ye(zo, [["render", Ko], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-image-upload/index.vue"]]);
|
|
225
|
-
function Ee(t) {
|
|
226
|
-
const i = t == null ? void 0 : t.match(/(\[url\:(.*?)\])(.*)/);
|
|
227
|
-
return i ? {
|
|
228
|
-
imageUrl: i[2],
|
|
229
|
-
text: i[3]
|
|
230
|
-
} : {
|
|
231
|
-
imageUrl: "",
|
|
232
|
-
text: t || ""
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function Lo(t) {
|
|
236
|
-
const i = String(t || "").match(/(\[url\:.*?\])([\s\S]*)/);
|
|
237
|
-
return i ? i[2] : t;
|
|
238
|
-
}
|
|
239
|
-
function Oe(t, i) {
|
|
240
|
-
return i ? `[url:${i}]${t}` : t;
|
|
241
|
-
}
|
|
242
|
-
const Uo = /* @__PURE__ */ he({
|
|
243
|
-
__name: "index",
|
|
244
|
-
props: {
|
|
245
|
-
defaultValue: { type: String, required: !1, default: "" },
|
|
246
|
-
defaultImage: { type: String, required: !1, default: "" },
|
|
247
|
-
rows: { type: [String, Number], required: !1, default: 6 },
|
|
248
|
-
width: { type: [String, Number], required: !1, default: "" },
|
|
249
|
-
autosize: { type: [Boolean, Object], required: !1, default: !1 },
|
|
250
|
-
disabled: { type: Boolean, required: !1, default: !1 },
|
|
251
|
-
placeholder: { type: String, required: !1, default: "粘贴图片上传" },
|
|
252
|
-
type: { type: String, required: !1, default: "textarea" },
|
|
253
|
-
layout: { type: String, required: !1, default: "default" },
|
|
254
|
-
selectValue: { type: [String, Number, Boolean], required: !1, default: "" },
|
|
255
|
-
selectOptions: { type: Array, required: !1, default: () => [] },
|
|
256
|
-
selectDisabled: { type: Boolean, required: !1, default: !1 },
|
|
257
|
-
api: { type: String, required: !1, default: "/permission-api/common/uploads" },
|
|
258
|
-
tokenKey: { type: String, required: !1, default: "Admin-Token" },
|
|
259
|
-
uploadName: { type: String, required: !1, default: "files" },
|
|
260
|
-
uploadRequest: { type: Function, required: !1 }
|
|
261
|
-
},
|
|
262
|
-
emits: ["change", "update:selectValue", "select-change"],
|
|
263
|
-
setup(t, { expose: i, emit: a }) {
|
|
264
|
-
const e = t, n = a, B = pe(), y = x(null), u = x(""), m = x(""), D = x(!1), Q = C(
|
|
265
|
-
() => e.layout === "select-prefix"
|
|
266
|
-
), R = C(() => ({
|
|
267
|
-
"qy-remark-image--select-prefix": Q.value
|
|
268
|
-
})), w = C(
|
|
269
|
-
() => Q.value || e.type === "text" ? "text" : "textarea"
|
|
270
|
-
), A = C(() => {
|
|
271
|
-
if (e.width)
|
|
272
|
-
return {
|
|
273
|
-
width: typeof e.width == "number" ? `${e.width}px` : e.width
|
|
274
|
-
};
|
|
275
|
-
});
|
|
276
|
-
le(
|
|
277
|
-
() => e.defaultValue,
|
|
278
|
-
(p) => {
|
|
279
|
-
const S = Ee(p || "");
|
|
280
|
-
u.value = S.text, m.value = S.imageUrl || e.defaultImage || "";
|
|
281
|
-
},
|
|
282
|
-
{ immediate: !0 }
|
|
283
|
-
), le(
|
|
284
|
-
() => e.defaultImage,
|
|
285
|
-
(p) => {
|
|
286
|
-
p !== void 0 && !Ee(e.defaultValue || "").imageUrl && (m.value = p || "");
|
|
287
|
-
},
|
|
288
|
-
{ immediate: !0 }
|
|
289
|
-
), qa(() => {
|
|
290
|
-
ke(U);
|
|
291
|
-
}), Qa(() => {
|
|
292
|
-
const p = Z();
|
|
293
|
-
p && p.removeEventListener("paste", N);
|
|
294
|
-
});
|
|
295
|
-
function Z() {
|
|
296
|
-
var p, S;
|
|
297
|
-
return ((p = y.value) == null ? void 0 : p.textarea) || ((S = y.value) == null ? void 0 : S.input) || null;
|
|
298
|
-
}
|
|
299
|
-
function U() {
|
|
300
|
-
const p = Z();
|
|
301
|
-
p && (p.removeEventListener("paste", N), p.addEventListener("paste", N));
|
|
302
|
-
}
|
|
303
|
-
function K(p) {
|
|
304
|
-
u.value = Lo(p || "");
|
|
305
|
-
}
|
|
306
|
-
function V(p) {
|
|
307
|
-
n("update:selectValue", p), n("select-change", p);
|
|
308
|
-
}
|
|
309
|
-
function X() {
|
|
310
|
-
m.value = "", j();
|
|
311
|
-
}
|
|
312
|
-
function ee() {
|
|
313
|
-
u.value = "", m.value = "", j();
|
|
314
|
-
}
|
|
315
|
-
async function N(p) {
|
|
316
|
-
var d;
|
|
317
|
-
const o = Array.from(((d = p.clipboardData) == null ? void 0 : d.files) || []).find((E) => E.type.startsWith("image/"));
|
|
318
|
-
o && (p.preventDefault(), await W({
|
|
319
|
-
file: o,
|
|
320
|
-
onError: () => {
|
|
321
|
-
},
|
|
322
|
-
onProgress: () => {
|
|
323
|
-
},
|
|
324
|
-
onSuccess: () => {
|
|
325
|
-
}
|
|
326
|
-
}));
|
|
327
|
-
}
|
|
328
|
-
async function W(p) {
|
|
329
|
-
var S, o;
|
|
330
|
-
if (p.file.size > 51200 * 1e3)
|
|
331
|
-
return be.error("图片过大"), !1;
|
|
332
|
-
D.value = !0;
|
|
333
|
-
try {
|
|
334
|
-
const d = await M(p);
|
|
335
|
-
return m.value = G(d), j(), be.success("上传图片成功"), (S = p.onSuccess) == null || S.call(p, d), !0;
|
|
336
|
-
} catch (d) {
|
|
337
|
-
return (o = p.onError) == null || o.call(p, d), be.error("上传失败"), !1;
|
|
338
|
-
} finally {
|
|
339
|
-
D.value = !1;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
async function M(p) {
|
|
343
|
-
const S = new FormData();
|
|
344
|
-
if (S.append(e.uploadName, p.file), e.uploadRequest)
|
|
345
|
-
return e.uploadRequest({
|
|
346
|
-
file: p.file,
|
|
347
|
-
formData: S,
|
|
348
|
-
options: p,
|
|
349
|
-
api: e.api,
|
|
350
|
-
tokenKey: e.tokenKey
|
|
351
|
-
});
|
|
352
|
-
const o = va.get(e.tokenKey);
|
|
353
|
-
return (await fetch(e.api, {
|
|
354
|
-
method: "POST",
|
|
355
|
-
body: S,
|
|
356
|
-
credentials: "include",
|
|
357
|
-
headers: o ? { Authorization: `Bearer ${o}` } : void 0
|
|
358
|
-
})).json();
|
|
359
|
-
}
|
|
360
|
-
function G(p) {
|
|
361
|
-
var d, E;
|
|
362
|
-
if (typeof p == "string") return p;
|
|
363
|
-
const S = p, o = (S == null ? void 0 : S.urls) ?? ((d = S == null ? void 0 : S.data) == null ? void 0 : d.urls) ?? ((E = S == null ? void 0 : S.data) == null ? void 0 : E.url) ?? (S == null ? void 0 : S.url) ?? "";
|
|
364
|
-
return Array.isArray(o) ? o[0] || "" : o || "";
|
|
365
|
-
}
|
|
366
|
-
function j() {
|
|
367
|
-
n(
|
|
368
|
-
"change",
|
|
369
|
-
Oe(u.value || "", m.value || ""),
|
|
370
|
-
m.value || ""
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
i({
|
|
374
|
-
deleteImage: X,
|
|
375
|
-
// 兼容旧 remarkImage,在表单 reset/clearFrom 时清空文字和图片。
|
|
376
|
-
clearContent: ee,
|
|
377
|
-
// 给表单保存或外部调试读取当前拆分值。
|
|
378
|
-
getValue: () => ({
|
|
379
|
-
text: u.value || "",
|
|
380
|
-
imageUrl: m.value || "",
|
|
381
|
-
value: Oe(u.value || "", m.value || "")
|
|
382
|
-
})
|
|
383
|
-
});
|
|
384
|
-
const te = { props: e, emit: n, attrs: B, inputRef: y, remarkText: u, remarkImg: m, uploading: D, isSelectPrefixLayout: Q, rootClass: R, inputType: w, wrapperStyle: A, getTextarea: Z, bindPasteListener: U, handleTextChange: K, handleSelectChange: V, deleteImage: X, clearContent: ee, handlePaste: N, uploadImage: W, requestUpload: M, resolveUploadUrl: G, emitChange: j, get ElButton() {
|
|
385
|
-
return we;
|
|
386
|
-
}, get ElInput() {
|
|
387
|
-
return Be;
|
|
388
|
-
}, get ElOption() {
|
|
389
|
-
return Ue;
|
|
390
|
-
}, get ElPopover() {
|
|
391
|
-
return Pa;
|
|
392
|
-
}, get ElSelect() {
|
|
393
|
-
return Le;
|
|
394
|
-
}, get ElUpload() {
|
|
395
|
-
return Ta;
|
|
396
|
-
} };
|
|
397
|
-
return Object.defineProperty(te, "__isScriptSetup", { enumerable: !1, value: !0 }), te;
|
|
398
|
-
}
|
|
399
|
-
}), jo = { class: "qy-remark-image__field" }, No = {
|
|
400
|
-
key: 1,
|
|
401
|
-
class: "qy-remark-image__divider"
|
|
402
|
-
}, Wo = { class: "qy-remark-image__upload-anchor" }, Go = {
|
|
403
|
-
key: 0,
|
|
404
|
-
class: "icon-[line-md--loading-twotone-loop]",
|
|
405
|
-
role: "img",
|
|
406
|
-
"aria-hidden": "true"
|
|
407
|
-
}, Ho = {
|
|
408
|
-
key: 1,
|
|
409
|
-
class: "icon-[ion--cloud-upload-outline]",
|
|
410
|
-
role: "img",
|
|
411
|
-
"aria-hidden": "true"
|
|
412
|
-
}, Jo = {
|
|
413
|
-
key: 2,
|
|
414
|
-
class: "icon-[ph--images-thin]",
|
|
415
|
-
role: "img",
|
|
416
|
-
"aria-hidden": "true"
|
|
417
|
-
}, Zo = { class: "qy-remark-image__popover" }, Xo = ["src"], Yo = { class: "qy-remark-image__popover-footer" };
|
|
418
|
-
function $o(t, i, a, e, n, B) {
|
|
419
|
-
return b(), F(
|
|
420
|
-
"div",
|
|
421
|
-
{
|
|
422
|
-
class: ge(["qy-remark-image", e.rootClass]),
|
|
423
|
-
style: Re(e.wrapperStyle)
|
|
424
|
-
},
|
|
425
|
-
[
|
|
426
|
-
$("div", jo, [
|
|
427
|
-
e.isSelectPrefixLayout ? (b(), oe(e.ElSelect, {
|
|
428
|
-
key: 0,
|
|
429
|
-
class: "qy-remark-image__prefix-select",
|
|
430
|
-
"model-value": a.selectValue,
|
|
431
|
-
options: a.selectOptions,
|
|
432
|
-
disabled: a.disabled || a.selectDisabled,
|
|
433
|
-
size: "small",
|
|
434
|
-
"onUpdate:modelValue": e.handleSelectChange
|
|
435
|
-
}, {
|
|
436
|
-
default: v(() => [
|
|
437
|
-
(b(!0), F(
|
|
438
|
-
Qe,
|
|
439
|
-
null,
|
|
440
|
-
Te(a.selectOptions, (y) => (b(), oe(e.ElOption, {
|
|
441
|
-
key: String(y.value),
|
|
442
|
-
label: y.label,
|
|
443
|
-
value: y.value,
|
|
444
|
-
disabled: y.disabled
|
|
445
|
-
}, null, 8, ["label", "value", "disabled"]))),
|
|
446
|
-
128
|
|
447
|
-
/* KEYED_FRAGMENT */
|
|
448
|
-
))
|
|
449
|
-
]),
|
|
450
|
-
_: 1
|
|
451
|
-
/* STABLE */
|
|
452
|
-
}, 8, ["model-value", "options", "disabled"])) : I("v-if", !0),
|
|
453
|
-
e.isSelectPrefixLayout ? (b(), F("span", No)) : I("v-if", !0),
|
|
454
|
-
O(e.ElInput, fe({
|
|
455
|
-
ref: "inputRef",
|
|
456
|
-
"model-value": e.remarkText,
|
|
457
|
-
type: e.inputType,
|
|
458
|
-
rows: a.rows,
|
|
459
|
-
autosize: a.autosize,
|
|
460
|
-
disabled: a.disabled,
|
|
461
|
-
placeholder: a.placeholder
|
|
462
|
-
}, e.attrs, {
|
|
463
|
-
"onUpdate:modelValue": e.handleTextChange,
|
|
464
|
-
onBlur: e.emitChange
|
|
465
|
-
}), null, 16, ["model-value", "type", "rows", "autosize", "disabled", "placeholder"]),
|
|
466
|
-
O(e.ElPopover, {
|
|
467
|
-
placement: "top-start",
|
|
468
|
-
width: 400,
|
|
469
|
-
trigger: "hover",
|
|
470
|
-
disabled: !e.remarkImg
|
|
471
|
-
}, {
|
|
472
|
-
reference: v(() => [
|
|
473
|
-
$("div", Wo, [
|
|
474
|
-
O(e.ElUpload, {
|
|
475
|
-
disabled: e.uploading || a.disabled,
|
|
476
|
-
class: "qy-remark-image__upload",
|
|
477
|
-
"show-file-list": !1,
|
|
478
|
-
"http-request": e.uploadImage
|
|
479
|
-
}, {
|
|
480
|
-
default: v(() => [
|
|
481
|
-
e.uploading ? (b(), F("span", Go)) : e.remarkImg ? (b(), F("span", Jo)) : (b(), F("span", Ho))
|
|
482
|
-
]),
|
|
483
|
-
_: 1
|
|
484
|
-
/* STABLE */
|
|
485
|
-
}, 8, ["disabled"])
|
|
486
|
-
])
|
|
487
|
-
]),
|
|
488
|
-
default: v(() => [
|
|
489
|
-
$("div", Zo, [
|
|
490
|
-
$("img", {
|
|
491
|
-
src: e.remarkImg,
|
|
492
|
-
class: "qy-remark-image__preview-img"
|
|
493
|
-
}, null, 8, Xo),
|
|
494
|
-
$("div", Yo, [
|
|
495
|
-
i[1] || (i[1] = $(
|
|
496
|
-
"span",
|
|
497
|
-
{ class: "qy-remark-image__popover-tip" },
|
|
498
|
-
"再次点击按钮可更换图片",
|
|
499
|
-
-1
|
|
500
|
-
/* CACHED */
|
|
501
|
-
)),
|
|
502
|
-
O(e.ElButton, {
|
|
503
|
-
link: "",
|
|
504
|
-
size: "small",
|
|
505
|
-
type: "danger",
|
|
506
|
-
disabled: a.disabled,
|
|
507
|
-
onClick: e.deleteImage
|
|
508
|
-
}, {
|
|
509
|
-
default: v(() => [...i[0] || (i[0] = [
|
|
510
|
-
ie(
|
|
511
|
-
" 删除图片 ",
|
|
512
|
-
-1
|
|
513
|
-
/* CACHED */
|
|
514
|
-
)
|
|
515
|
-
])]),
|
|
516
|
-
_: 1
|
|
517
|
-
/* STABLE */
|
|
518
|
-
}, 8, ["disabled"])
|
|
519
|
-
])
|
|
520
|
-
])
|
|
521
|
-
]),
|
|
522
|
-
_: 1
|
|
523
|
-
/* STABLE */
|
|
524
|
-
}, 8, ["disabled"])
|
|
525
|
-
])
|
|
526
|
-
],
|
|
527
|
-
6
|
|
528
|
-
/* CLASS, STYLE */
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
const el = /* @__PURE__ */ ye(Uo, [["render", $o], ["__scopeId", "data-v-e5764ee0"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/remark-image/index.vue"]]), tl = /* @__PURE__ */ he({
|
|
532
|
-
name: "QyRemoteSelect",
|
|
533
|
-
inheritAttrs: !1,
|
|
534
|
-
__name: "index",
|
|
535
|
-
props: {
|
|
536
|
-
modelValue: { type: [String, Number, Boolean, Array, null], required: !1, default: void 0 },
|
|
537
|
-
fetchMethod: { type: Function, required: !0 },
|
|
538
|
-
defaultOptions: { type: Array, required: !1, default: () => [] },
|
|
539
|
-
labelKey: { type: String, required: !1, default: "label" },
|
|
540
|
-
valueKey: { type: String, required: !1, default: "value" },
|
|
541
|
-
disabledKey: { type: String, required: !1, default: "disabled" },
|
|
542
|
-
placeholder: { type: String, required: !1, default: "请选择" },
|
|
543
|
-
disabled: { type: Boolean, required: !1, default: !1 },
|
|
544
|
-
clearable: { type: Boolean, required: !1, default: !0 },
|
|
545
|
-
multiple: { type: Boolean, required: !1, default: !1 },
|
|
546
|
-
collapseTags: { type: Boolean, required: !1, default: !1 },
|
|
547
|
-
collapseTagsTooltip: { type: Boolean, required: !1, default: !1 },
|
|
548
|
-
autoSelectSingle: { type: Boolean, required: !1, default: !1 },
|
|
549
|
-
size: { type: String, required: !1, default: void 0 },
|
|
550
|
-
teleported: { type: Boolean, required: !1, default: !0 },
|
|
551
|
-
appendTo: { type: String, required: !1, default: "body" },
|
|
552
|
-
fitInputWidth: { type: Boolean, required: !1, default: !0 },
|
|
553
|
-
popperClass: { type: String, required: !1, default: "" },
|
|
554
|
-
debounce: { type: Number, required: !1, default: 300 },
|
|
555
|
-
minLength: { type: Number, required: !1, default: 1 },
|
|
556
|
-
remoteOnFocus: { type: Boolean, required: !1, default: !1 },
|
|
557
|
-
remoteShowSuffix: { type: Boolean, required: !1, default: !0 },
|
|
558
|
-
loading: { type: Boolean, required: !1, default: !1 },
|
|
559
|
-
reserveSelectedOption: { type: Boolean, required: !1, default: !0 },
|
|
560
|
-
allowCreate: { type: Boolean, required: !1, default: !1 },
|
|
561
|
-
commitOnBlur: { type: Boolean, required: !1, default: !1 }
|
|
562
|
-
},
|
|
563
|
-
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur", "options-change", "loading-change", "error"],
|
|
564
|
-
setup(t, { expose: i, emit: a }) {
|
|
565
|
-
const e = t, n = a, B = pe(), y = x(null), u = x([]), m = x(/* @__PURE__ */ new Map()), D = x(!1), Q = x(""), R = x("");
|
|
566
|
-
let w = 0, A = null;
|
|
567
|
-
const Z = C(() => e.loading || D.value), U = x(!1), K = C(() => Q.value !== ""), V = C(() => {
|
|
568
|
-
if (K.value) return u.value;
|
|
569
|
-
const f = /* @__PURE__ */ new Map(), L = (l) => {
|
|
570
|
-
f.set(X(l), l);
|
|
571
|
-
};
|
|
572
|
-
return e.defaultOptions.forEach(L), e.reserveSelectedOption && m.value.forEach((l) => L(l)), u.value.forEach(L), Array.from(f.values());
|
|
573
|
-
});
|
|
574
|
-
le(
|
|
575
|
-
() => e.defaultOptions,
|
|
576
|
-
(f) => {
|
|
577
|
-
f.forEach(N);
|
|
578
|
-
},
|
|
579
|
-
{ immediate: !0 }
|
|
580
|
-
), le(
|
|
581
|
-
() => e.modelValue,
|
|
582
|
-
() => {
|
|
583
|
-
V.value.forEach(N);
|
|
584
|
-
},
|
|
585
|
-
{ immediate: !0 }
|
|
586
|
-
);
|
|
587
|
-
function X(f) {
|
|
588
|
-
return (f == null ? void 0 : f[e.valueKey]) ?? (f == null ? void 0 : f.value) ?? (f == null ? void 0 : f.label);
|
|
589
|
-
}
|
|
590
|
-
function ee(f) {
|
|
591
|
-
return Array.isArray(e.modelValue) ? e.modelValue.includes(f) : e.modelValue === f;
|
|
592
|
-
}
|
|
593
|
-
function N(f) {
|
|
594
|
-
if (!e.reserveSelectedOption) return;
|
|
595
|
-
const L = X(f);
|
|
596
|
-
ee(L) && m.value.set(L, f);
|
|
597
|
-
}
|
|
598
|
-
function W(f) {
|
|
599
|
-
return e.disabled ? !1 : f ? f.length >= e.minLength : e.remoteOnFocus;
|
|
600
|
-
}
|
|
601
|
-
function M(f) {
|
|
602
|
-
D.value !== f && (D.value = f, n("loading-change", f));
|
|
603
|
-
}
|
|
604
|
-
async function G(f) {
|
|
605
|
-
const L = P(f), l = ++w;
|
|
606
|
-
if (ae(L), !W(L)) {
|
|
607
|
-
u.value = [], M(!1), n("options-change", V.value);
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
M(!0);
|
|
611
|
-
try {
|
|
612
|
-
const g = await e.fetchMethod(L);
|
|
613
|
-
if (l !== w) return;
|
|
614
|
-
u.value = Array.isArray(g) ? g : [], u.value.forEach(N), n("options-change", V.value);
|
|
615
|
-
} catch (g) {
|
|
616
|
-
if (l !== w) return;
|
|
617
|
-
u.value = [], n("error", g), n("options-change", V.value);
|
|
618
|
-
} finally {
|
|
619
|
-
l === w && M(!1);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function j() {
|
|
623
|
-
U.value || (U.value = !0, G(""));
|
|
624
|
-
}
|
|
625
|
-
function te(f) {
|
|
626
|
-
const L = P(f);
|
|
627
|
-
R.value = L, w += 1, ae(L), A && (clearTimeout(A), A = null), A = setTimeout(() => {
|
|
628
|
-
G(L);
|
|
629
|
-
}, e.debounce);
|
|
630
|
-
}
|
|
631
|
-
function p() {
|
|
632
|
-
U.value = !0, G("");
|
|
633
|
-
}
|
|
634
|
-
function S() {
|
|
635
|
-
G(Q.value);
|
|
636
|
-
}
|
|
637
|
-
function o(f) {
|
|
638
|
-
R.value = "", n("update:modelValue", f);
|
|
639
|
-
}
|
|
640
|
-
function d(f) {
|
|
641
|
-
R.value = "", V.value.forEach(N), n("change", f);
|
|
642
|
-
}
|
|
643
|
-
function E() {
|
|
644
|
-
R.value = "", n("clear");
|
|
645
|
-
}
|
|
646
|
-
function H(f) {
|
|
647
|
-
f && e.remoteOnFocus && !Q.value && j(), n("visible-change", f);
|
|
648
|
-
}
|
|
649
|
-
function s(f) {
|
|
650
|
-
e.remoteOnFocus && !Q.value && j(), n("focus", f);
|
|
651
|
-
}
|
|
652
|
-
function q(f) {
|
|
653
|
-
k(), n("blur", f);
|
|
654
|
-
}
|
|
655
|
-
function k() {
|
|
656
|
-
if (!e.allowCreate || !e.commitOnBlur || e.disabled) return;
|
|
657
|
-
const f = R.value;
|
|
658
|
-
f.trim() && (R.value = "", n("update:modelValue", f), n("change", f));
|
|
659
|
-
}
|
|
660
|
-
function P(f) {
|
|
661
|
-
return String(f ?? "");
|
|
662
|
-
}
|
|
663
|
-
function ae(f) {
|
|
664
|
-
Q.value = f, u.value = [], n("options-change", V.value);
|
|
665
|
-
}
|
|
666
|
-
function se() {
|
|
667
|
-
var f, L;
|
|
668
|
-
(L = (f = y.value) == null ? void 0 : f.focus) == null || L.call(f);
|
|
669
|
-
}
|
|
670
|
-
function ne() {
|
|
671
|
-
var f, L;
|
|
672
|
-
(L = (f = y.value) == null ? void 0 : f.blur) == null || L.call(f);
|
|
673
|
-
}
|
|
674
|
-
function ue() {
|
|
675
|
-
n("update:modelValue", e.multiple ? [] : ""), n("clear");
|
|
676
|
-
}
|
|
677
|
-
_a(() => {
|
|
678
|
-
A && clearTimeout(A);
|
|
679
|
-
}), i({
|
|
680
|
-
// 暴露远程选择常用控制方法,供弹窗打开后聚焦或请求失败后重试。
|
|
681
|
-
focus: se,
|
|
682
|
-
blur: ne,
|
|
683
|
-
clear: ue,
|
|
684
|
-
retryFetch: S,
|
|
685
|
-
fetchDefaultOptions: p
|
|
686
|
-
});
|
|
687
|
-
const me = { props: e, emit: n, attrs: B, selectRef: y, remoteOptions: u, selectedOptionMap: m, innerLoading: D, lastKeyword: Q, pendingCreateText: R, get requestId() {
|
|
688
|
-
return w;
|
|
689
|
-
}, set requestId(f) {
|
|
690
|
-
w = f;
|
|
691
|
-
}, get debounceTimer() {
|
|
692
|
-
return A;
|
|
693
|
-
}, set debounceTimer(f) {
|
|
694
|
-
A = f;
|
|
695
|
-
}, mergedLoading: Z, defaultOptionsFetched: U, hasSearchKeyword: K, mergedOptions: V, getOptionValue: X, isValueSelected: ee, cacheOptionIfSelected: N, canFetch: W, setInnerLoading: M, fetchOptions: G, maybeFetchDefaultOptions: j, handleRemoteMethod: te, fetchDefaultOptions: p, retryFetch: S, handleUpdateModelValue: o, handleChange: d, handleClear: E, handleVisibleChange: H, handleFocus: s, handleBlur: q, commitPendingCreateText: k, normalizeKeyword: P, clearRemoteOptionsForKeyword: ae, focus: se, blur: ne, clear: ue, QySelect: Ae };
|
|
696
|
-
return Object.defineProperty(me, "__isScriptSetup", { enumerable: !1, value: !0 }), me;
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
|
-
function al(t, i, a, e, n, B) {
|
|
700
|
-
return b(), F(
|
|
701
|
-
Qe,
|
|
702
|
-
null,
|
|
703
|
-
[
|
|
704
|
-
I(" 远程防抖由本组件统一维护,底层需即时同步关键字,避免快速失焦丢失手输文本。 "),
|
|
705
|
-
O(e.QySelect, fe({ ref: "selectRef" }, e.attrs, {
|
|
706
|
-
"model-value": a.modelValue,
|
|
707
|
-
options: e.mergedOptions,
|
|
708
|
-
"label-key": a.labelKey,
|
|
709
|
-
"value-key": a.valueKey,
|
|
710
|
-
"disabled-key": a.disabledKey,
|
|
711
|
-
placeholder: a.placeholder,
|
|
712
|
-
disabled: a.disabled,
|
|
713
|
-
clearable: a.clearable,
|
|
714
|
-
filterable: !0,
|
|
715
|
-
multiple: a.multiple,
|
|
716
|
-
"collapse-tags": a.collapseTags,
|
|
717
|
-
"collapse-tags-tooltip": a.collapseTagsTooltip,
|
|
718
|
-
"auto-select-single": a.autoSelectSingle,
|
|
719
|
-
size: a.size,
|
|
720
|
-
teleported: a.teleported,
|
|
721
|
-
"append-to": a.appendTo,
|
|
722
|
-
"fit-input-width": a.fitInputWidth,
|
|
723
|
-
"popper-class": a.popperClass,
|
|
724
|
-
remote: "",
|
|
725
|
-
debounce: 0,
|
|
726
|
-
"remote-show-suffix": a.remoteShowSuffix,
|
|
727
|
-
"remote-method": e.handleRemoteMethod,
|
|
728
|
-
loading: e.mergedLoading,
|
|
729
|
-
"onUpdate:modelValue": e.handleUpdateModelValue,
|
|
730
|
-
onChange: e.handleChange,
|
|
731
|
-
onClear: e.handleClear,
|
|
732
|
-
onVisibleChange: e.handleVisibleChange,
|
|
733
|
-
onFocus: e.handleFocus,
|
|
734
|
-
onBlur: e.handleBlur
|
|
735
|
-
}), Pe({
|
|
736
|
-
default: v(() => [
|
|
737
|
-
t.$slots.default ? _(t.$slots, "default", {}, void 0, void 0, 0) : I("v-if", !0)
|
|
738
|
-
]),
|
|
739
|
-
_: 2
|
|
740
|
-
/* DYNAMIC */
|
|
741
|
-
}, [
|
|
742
|
-
t.$slots.prefix ? {
|
|
743
|
-
name: "prefix",
|
|
744
|
-
fn: v(() => [
|
|
745
|
-
_(t.$slots, "prefix")
|
|
746
|
-
]),
|
|
747
|
-
key: "0"
|
|
748
|
-
} : void 0,
|
|
749
|
-
t.$slots.empty ? {
|
|
750
|
-
name: "empty",
|
|
751
|
-
fn: v(() => [
|
|
752
|
-
_(t.$slots, "empty")
|
|
753
|
-
]),
|
|
754
|
-
key: "1"
|
|
755
|
-
} : void 0,
|
|
756
|
-
t.$slots.loading ? {
|
|
757
|
-
name: "loading",
|
|
758
|
-
fn: v(() => [
|
|
759
|
-
_(t.$slots, "loading")
|
|
760
|
-
]),
|
|
761
|
-
key: "2"
|
|
762
|
-
} : void 0,
|
|
763
|
-
t.$slots.tag ? {
|
|
764
|
-
name: "tag",
|
|
765
|
-
fn: v((y) => [
|
|
766
|
-
_(t.$slots, "tag", ze(Ke(y)))
|
|
767
|
-
]),
|
|
768
|
-
key: "3"
|
|
769
|
-
} : void 0
|
|
770
|
-
]), 1040, ["model-value", "options", "label-key", "value-key", "disabled-key", "placeholder", "disabled", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "auto-select-single", "size", "teleported", "append-to", "fit-input-width", "popper-class", "remote-show-suffix", "loading"])
|
|
771
|
-
],
|
|
772
|
-
2112
|
|
773
|
-
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
774
|
-
);
|
|
775
|
-
}
|
|
776
|
-
const ol = /* @__PURE__ */ ye(tl, [["render", al], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-remote-select/index.vue"]]), ll = /* @__PURE__ */ he({
|
|
777
|
-
name: "QySearchInput",
|
|
778
|
-
inheritAttrs: !1,
|
|
779
|
-
__name: "index",
|
|
780
|
-
props: {
|
|
781
|
-
modelValue: { type: [String, Number, null], required: !1, default: "" },
|
|
782
|
-
loading: { type: Boolean, required: !1, default: !1 },
|
|
783
|
-
disabled: { type: Boolean, required: !1, default: !1 },
|
|
784
|
-
placeholder: { type: String, required: !1, default: "请输入搜索内容" },
|
|
785
|
-
removeSpace: { type: Boolean, required: !1, default: !1 },
|
|
786
|
-
trimMode: { type: String, required: !1, default: "none" },
|
|
787
|
-
clearable: { type: Boolean, required: !1, default: !0 },
|
|
788
|
-
showButton: { type: Boolean, required: !1, default: !0 },
|
|
789
|
-
buttonText: { type: String, required: !1, default: "搜索" },
|
|
790
|
-
buttonProps: { type: Object, required: !1, default: () => ({}) },
|
|
791
|
-
suggestions: { type: Array, required: !1, default: () => [] },
|
|
792
|
-
fetchSuggestions: { type: [Function, null], required: !1, default: null },
|
|
793
|
-
fetchSuggestionsMethod: { type: [Function, null], required: !1, default: null },
|
|
794
|
-
debounce: { type: Number, required: !1, default: 300 },
|
|
795
|
-
minLength: { type: Number, required: !1, default: 1 },
|
|
796
|
-
triggerOnFocus: { type: Boolean, required: !1, default: !1 },
|
|
797
|
-
searchOnEnter: { type: Boolean, required: !1, default: !0 },
|
|
798
|
-
searchOnSelect: { type: Boolean, required: !1, default: !1 },
|
|
799
|
-
highlightKeyword: { type: Boolean, required: !1, default: !0 },
|
|
800
|
-
teleported: { type: Boolean, required: !1, default: !0 },
|
|
801
|
-
appendTo: { type: String, required: !1, default: "body" },
|
|
802
|
-
popperClass: { type: String, required: !1, default: "" },
|
|
803
|
-
fitInputWidth: { type: Boolean, required: !1, default: !0 }
|
|
804
|
-
},
|
|
805
|
-
emits: ["update:modelValue", "search", "clear", "input", "change", "focus", "blur", "enter", "select", "visible-change", "suggestions-change", "error"],
|
|
806
|
-
setup(t, { expose: i, emit: a }) {
|
|
807
|
-
const e = t, n = a, B = pe(), y = x(null), u = x(w(e.modelValue)), m = C(() => w(e.modelValue)), D = C(
|
|
808
|
-
() => ["qy-search-input__popper", e.popperClass].filter(Boolean).join(" ")
|
|
809
|
-
), Q = C(() => w(e.modelValue)), R = x("");
|
|
810
|
-
le(
|
|
811
|
-
() => e.modelValue,
|
|
812
|
-
(l) => {
|
|
813
|
-
u.value = w(l);
|
|
814
|
-
}
|
|
815
|
-
);
|
|
816
|
-
function w(l) {
|
|
817
|
-
return l == null ? "" : String(l);
|
|
818
|
-
}
|
|
819
|
-
function A(l) {
|
|
820
|
-
return e.removeSpace ? l.replace(/\s+/g, "") : l;
|
|
821
|
-
}
|
|
822
|
-
function Z(l, g) {
|
|
823
|
-
return e.trimMode !== g ? l : l.trim();
|
|
824
|
-
}
|
|
825
|
-
function U(l) {
|
|
826
|
-
return A(w(l));
|
|
827
|
-
}
|
|
828
|
-
function K(l) {
|
|
829
|
-
u.value = l, n("update:modelValue", l);
|
|
830
|
-
}
|
|
831
|
-
function V(l, g = "") {
|
|
832
|
-
return {
|
|
833
|
-
...l,
|
|
834
|
-
label: l.label || l.value,
|
|
835
|
-
value: l.value || l.label,
|
|
836
|
-
description: l.description || g
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
function X(l = []) {
|
|
840
|
-
return l.flatMap((g) => {
|
|
841
|
-
if (Array.isArray(g.items)) {
|
|
842
|
-
const J = g;
|
|
843
|
-
return J.items.map((re) => V(re, J.groupLabel));
|
|
844
|
-
}
|
|
845
|
-
return V(g);
|
|
846
|
-
});
|
|
847
|
-
}
|
|
848
|
-
function ee(l) {
|
|
849
|
-
const g = l.toLowerCase();
|
|
850
|
-
return (J) => [J.label, J.value, J.description].filter(Boolean).some((re) => String(re).toLowerCase().includes(g));
|
|
851
|
-
}
|
|
852
|
-
function N(l) {
|
|
853
|
-
return l ? l.length >= e.minLength : e.triggerOnFocus;
|
|
854
|
-
}
|
|
855
|
-
function W(l) {
|
|
856
|
-
n("suggestions-change", l), n("visible-change", l.length > 0);
|
|
857
|
-
}
|
|
858
|
-
async function M(l) {
|
|
859
|
-
if (!N(l))
|
|
860
|
-
return W([]), [];
|
|
861
|
-
if (e.fetchSuggestionsMethod) {
|
|
862
|
-
const re = await new Promise((Y) => {
|
|
863
|
-
var _e;
|
|
864
|
-
(_e = e.fetchSuggestionsMethod) == null || _e.call(e, l, (Se) => {
|
|
865
|
-
Y(X(Se));
|
|
866
|
-
});
|
|
867
|
-
});
|
|
868
|
-
return W(re), re;
|
|
869
|
-
}
|
|
870
|
-
if (e.fetchSuggestions) {
|
|
871
|
-
const re = await e.fetchSuggestions(l), Y = X(Array.isArray(re) ? re : []);
|
|
872
|
-
return W(Y), Y;
|
|
873
|
-
}
|
|
874
|
-
const g = X(e.suggestions), J = l ? g.filter(ee(l)) : g;
|
|
875
|
-
return W(J), J;
|
|
876
|
-
}
|
|
877
|
-
async function G(l, g) {
|
|
878
|
-
R.value = l;
|
|
879
|
-
try {
|
|
880
|
-
const J = await M(l);
|
|
881
|
-
g(J);
|
|
882
|
-
} catch (J) {
|
|
883
|
-
n("error", J), W([]), g([]);
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
function j() {
|
|
887
|
-
var l, g;
|
|
888
|
-
R.value && ((g = (l = y.value) == null ? void 0 : l.getData) == null || g.call(l, R.value));
|
|
889
|
-
}
|
|
890
|
-
function te(l) {
|
|
891
|
-
const g = U(l);
|
|
892
|
-
K(g);
|
|
893
|
-
}
|
|
894
|
-
function p(l) {
|
|
895
|
-
const g = U(l);
|
|
896
|
-
u.value = g, n("input", g);
|
|
897
|
-
}
|
|
898
|
-
function S(l) {
|
|
899
|
-
const g = Z(U(l), "change");
|
|
900
|
-
g !== w(e.modelValue) && K(g), n("change", g);
|
|
901
|
-
}
|
|
902
|
-
function o(l) {
|
|
903
|
-
n("focus", l);
|
|
904
|
-
}
|
|
905
|
-
function d(l) {
|
|
906
|
-
const g = Z(u.value, "blur");
|
|
907
|
-
g !== w(e.modelValue) && K(g), n("blur", l), n("visible-change", !1);
|
|
908
|
-
}
|
|
909
|
-
function E() {
|
|
910
|
-
u.value = "", n("update:modelValue", ""), n("clear"), W([]);
|
|
911
|
-
}
|
|
912
|
-
function H(l) {
|
|
913
|
-
n("enter", l), e.searchOnEnter && s();
|
|
914
|
-
}
|
|
915
|
-
function s() {
|
|
916
|
-
n("search", w(e.modelValue));
|
|
917
|
-
}
|
|
918
|
-
function q(l) {
|
|
919
|
-
n("select", l), e.searchOnSelect && n("search", l.value);
|
|
920
|
-
}
|
|
921
|
-
function k(l) {
|
|
922
|
-
return l.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
923
|
-
}
|
|
924
|
-
function P(l) {
|
|
925
|
-
return l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
926
|
-
}
|
|
927
|
-
function ae(l) {
|
|
928
|
-
const g = k(l || "");
|
|
929
|
-
if (!e.highlightKeyword || !m.value) return g;
|
|
930
|
-
const J = P(k(m.value));
|
|
931
|
-
return J ? g.replace(
|
|
932
|
-
new RegExp(`(${J})`, "ig"),
|
|
933
|
-
'<mark class="qy-search-input__mark">$1</mark>'
|
|
934
|
-
) : g;
|
|
935
|
-
}
|
|
936
|
-
function se() {
|
|
937
|
-
var l, g;
|
|
938
|
-
(g = (l = y.value) == null ? void 0 : l.focus) == null || g.call(l);
|
|
939
|
-
}
|
|
940
|
-
function ne() {
|
|
941
|
-
var l, g;
|
|
942
|
-
(g = (l = y.value) == null ? void 0 : l.blur) == null || g.call(l);
|
|
943
|
-
}
|
|
944
|
-
function ue() {
|
|
945
|
-
var l, g, J;
|
|
946
|
-
(J = (g = (l = y.value) == null ? void 0 : l.inputRef) == null ? void 0 : g.select) == null || J.call(g);
|
|
947
|
-
}
|
|
948
|
-
function me() {
|
|
949
|
-
var l, g;
|
|
950
|
-
(g = (l = y.value) == null ? void 0 : l.clear) == null || g.call(l);
|
|
951
|
-
}
|
|
952
|
-
function f() {
|
|
953
|
-
var l, g;
|
|
954
|
-
(g = (l = y.value) == null ? void 0 : l.close) == null || g.call(l);
|
|
955
|
-
}
|
|
956
|
-
i({
|
|
957
|
-
// 暴露搜索框常用控制方法,供弹窗打开后聚焦或失败后重试建议项。
|
|
958
|
-
focus: se,
|
|
959
|
-
blur: ne,
|
|
960
|
-
select: ue,
|
|
961
|
-
clear: me,
|
|
962
|
-
closePanel: f,
|
|
963
|
-
retryFetch: j
|
|
964
|
-
});
|
|
965
|
-
const L = { props: e, emit: n, attrs: B, autocompleteRef: y, innerValue: u, normalizedKeyword: m, mergedPopperClass: D, displayValue: Q, lastQuery: R, stringifyValue: w, sanitizeSpaces: A, sanitizeTrim: Z, sanitizeImmediate: U, emitModelValue: K, normalizeItem: V, flattenSuggestionList: X, createFilter: ee, canQuery: N, emitSuggestions: W, resolveSuggestionList: M, querySuggestions: G, retryFetch: j, handleUpdateModelValue: te, handleInput: p, handleChange: S, handleFocus: o, handleBlur: d, handleClear: E, handleEnter: H, triggerSearch: s, handleSelect: q, escapeHtml: k, escapeRegExp: P, renderHighlighted: ae, focus: se, blur: ne, select: ue, clear: me, closePanel: f, get ElAutocomplete() {
|
|
966
|
-
return Ia;
|
|
967
|
-
}, get ElButton() {
|
|
968
|
-
return we;
|
|
969
|
-
} };
|
|
970
|
-
return Object.defineProperty(L, "__isScriptSetup", { enumerable: !1, value: !0 }), L;
|
|
971
|
-
}
|
|
972
|
-
}), rl = { class: "qy-search-input__item" }, nl = ["innerHTML"], il = {
|
|
973
|
-
key: 0,
|
|
974
|
-
class: "qy-search-input__item-description"
|
|
975
|
-
};
|
|
976
|
-
function sl(t, i, a, e, n, B) {
|
|
977
|
-
return b(), F(
|
|
978
|
-
"div",
|
|
979
|
-
{
|
|
980
|
-
class: ge(["qy-search-input", { "is-disabled": a.disabled }])
|
|
981
|
-
},
|
|
982
|
-
[
|
|
983
|
-
O(e.ElAutocomplete, fe({ ref: "autocompleteRef" }, e.attrs, {
|
|
984
|
-
"model-value": e.displayValue,
|
|
985
|
-
disabled: a.disabled,
|
|
986
|
-
placeholder: a.placeholder,
|
|
987
|
-
clearable: a.clearable,
|
|
988
|
-
debounce: a.debounce,
|
|
989
|
-
"fetch-suggestions": e.querySuggestions,
|
|
990
|
-
"trigger-on-focus": a.triggerOnFocus,
|
|
991
|
-
teleported: a.teleported,
|
|
992
|
-
"fit-input-width": a.fitInputWidth,
|
|
993
|
-
"popper-class": e.mergedPopperClass,
|
|
994
|
-
"append-to": a.appendTo,
|
|
995
|
-
"value-key": "value",
|
|
996
|
-
"onUpdate:modelValue": e.handleUpdateModelValue,
|
|
997
|
-
onInput: e.handleInput,
|
|
998
|
-
onChange: e.handleChange,
|
|
999
|
-
onFocus: e.handleFocus,
|
|
1000
|
-
onBlur: e.handleBlur,
|
|
1001
|
-
onClear: e.handleClear,
|
|
1002
|
-
onSelect: e.handleSelect,
|
|
1003
|
-
onKeydown: Ie(e.handleEnter, ["enter"])
|
|
1004
|
-
}), Pe({
|
|
1005
|
-
default: v(({ item: y }) => [
|
|
1006
|
-
_(t.$slots, "item", {
|
|
1007
|
-
item: y,
|
|
1008
|
-
keyword: e.normalizedKeyword
|
|
1009
|
-
}, () => [
|
|
1010
|
-
$("div", rl, [
|
|
1011
|
-
$("div", {
|
|
1012
|
-
class: "qy-search-input__item-label",
|
|
1013
|
-
innerHTML: e.renderHighlighted(y.label || y.value || "")
|
|
1014
|
-
}, null, 8, nl),
|
|
1015
|
-
y.description ? (b(), F(
|
|
1016
|
-
"div",
|
|
1017
|
-
il,
|
|
1018
|
-
ce(y.description),
|
|
1019
|
-
1
|
|
1020
|
-
/* TEXT */
|
|
1021
|
-
)) : I("v-if", !0)
|
|
1022
|
-
])
|
|
1023
|
-
], !0)
|
|
1024
|
-
]),
|
|
1025
|
-
_: 2
|
|
1026
|
-
/* DYNAMIC */
|
|
1027
|
-
}, [
|
|
1028
|
-
t.$slots.prefix ? {
|
|
1029
|
-
name: "prefix",
|
|
1030
|
-
fn: v(() => [
|
|
1031
|
-
_(t.$slots, "prefix", {}, void 0, !0)
|
|
1032
|
-
]),
|
|
1033
|
-
key: "0"
|
|
1034
|
-
} : void 0,
|
|
1035
|
-
t.$slots.suffix ? {
|
|
1036
|
-
name: "suffix",
|
|
1037
|
-
fn: v(() => [
|
|
1038
|
-
_(t.$slots, "suffix", {}, void 0, !0)
|
|
1039
|
-
]),
|
|
1040
|
-
key: "1"
|
|
1041
|
-
} : void 0,
|
|
1042
|
-
t.$slots.prepend ? {
|
|
1043
|
-
name: "prepend",
|
|
1044
|
-
fn: v(() => [
|
|
1045
|
-
_(t.$slots, "prepend", {}, void 0, !0)
|
|
1046
|
-
]),
|
|
1047
|
-
key: "2"
|
|
1048
|
-
} : void 0,
|
|
1049
|
-
t.$slots.append || a.showButton ? {
|
|
1050
|
-
name: "append",
|
|
1051
|
-
fn: v(() => [
|
|
1052
|
-
t.$slots.append ? _(t.$slots, "append", {}, void 0, !0, 0) : (b(), oe(e.ElButton, fe({ key: 1 }, a.buttonProps, {
|
|
1053
|
-
loading: a.loading,
|
|
1054
|
-
disabled: a.disabled,
|
|
1055
|
-
onClick: e.triggerSearch
|
|
1056
|
-
}), {
|
|
1057
|
-
default: v(() => [
|
|
1058
|
-
ie(
|
|
1059
|
-
ce(a.buttonText),
|
|
1060
|
-
1
|
|
1061
|
-
/* TEXT */
|
|
1062
|
-
)
|
|
1063
|
-
]),
|
|
1064
|
-
_: 1
|
|
1065
|
-
/* STABLE */
|
|
1066
|
-
}, 16, ["loading", "disabled"]))
|
|
1067
|
-
]),
|
|
1068
|
-
key: "3"
|
|
1069
|
-
} : void 0
|
|
1070
|
-
]), 1040, ["model-value", "disabled", "placeholder", "clearable", "debounce", "trigger-on-focus", "teleported", "fit-input-width", "popper-class", "append-to"])
|
|
1071
|
-
],
|
|
1072
|
-
2
|
|
1073
|
-
/* CLASS */
|
|
1074
|
-
);
|
|
1075
|
-
}
|
|
1076
|
-
const Ze = /* @__PURE__ */ ye(ll, [["render", sl], ["__scopeId", "data-v-e2afec40"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-search-input/index.vue"]]), ul = /* @__PURE__ */ he({
|
|
1077
|
-
name: "QyRecordQuoteSearch",
|
|
1078
|
-
inheritAttrs: !1,
|
|
1079
|
-
__name: "index",
|
|
1080
|
-
props: {
|
|
1081
|
-
modelValue: { type: [String, null], required: !1, default: "" },
|
|
1082
|
-
loading: { type: Boolean, required: !1, default: !1 },
|
|
1083
|
-
disabled: { type: Boolean, required: !1, default: !1 },
|
|
1084
|
-
placeholder: { type: String, required: !1, default: "请输入报价单号" },
|
|
1085
|
-
buttonText: { type: String, required: !1, default: "查询报价单" },
|
|
1086
|
-
autoNormalize: { type: Boolean, required: !1, default: !0 },
|
|
1087
|
-
showStatus: { type: Boolean, required: !1, default: !0 },
|
|
1088
|
-
status: { type: String, required: !1, default: "default" },
|
|
1089
|
-
statusText: { type: String, required: !1, default: "" },
|
|
1090
|
-
suggestions: { type: Array, required: !1, default: () => [] },
|
|
1091
|
-
fetchSuggestions: { type: [Function, null], required: !1, default: null },
|
|
1092
|
-
fetchSuggestionsMethod: { type: [Function, null], required: !1, default: null },
|
|
1093
|
-
debounce: { type: Number, required: !1, default: 300 },
|
|
1094
|
-
minLength: { type: Number, required: !1, default: 1 },
|
|
1095
|
-
searchOnSelect: { type: Boolean, required: !1, default: !0 },
|
|
1096
|
-
searchMethod: { type: [Function, null], required: !1, default: null },
|
|
1097
|
-
extractMethod: { type: [Function, null], required: !1, default: null },
|
|
1098
|
-
normalizeMethod: { type: [Function, null], required: !1, default: null },
|
|
1099
|
-
label: { type: String, required: !1, default: "报价单号" },
|
|
1100
|
-
description: { type: String, required: !1, default: "" },
|
|
1101
|
-
trimMode: { type: String, required: !1, default: "blur" }
|
|
1102
|
-
},
|
|
1103
|
-
emits: ["update:modelValue", "search", "clear", "normalize", "enter", "select", "error", "success"],
|
|
1104
|
-
setup(t, { expose: i, emit: a }) {
|
|
1105
|
-
const e = t, n = a, B = pe(), y = x(null), u = x(!1), m = C(() => e.statusText || ""), D = C(() => e.loading || u.value);
|
|
1106
|
-
function Q(o) {
|
|
1107
|
-
return o == null ? "" : String(o);
|
|
1108
|
-
}
|
|
1109
|
-
function R(o) {
|
|
1110
|
-
const d = Q(o).trim(), E = w(d), H = E.match(/BJ\d{8}[A-Z0-9]{4}/i);
|
|
1111
|
-
return H ? H[0] : E;
|
|
1112
|
-
}
|
|
1113
|
-
function w(o) {
|
|
1114
|
-
return Q(o).replace(/\s+/g, "").trim().toUpperCase();
|
|
1115
|
-
}
|
|
1116
|
-
function A(o) {
|
|
1117
|
-
return e.extractMethod ? e.extractMethod(o) : R(o);
|
|
1118
|
-
}
|
|
1119
|
-
function Z(o) {
|
|
1120
|
-
return e.normalizeMethod ? e.normalizeMethod(o) : w(o);
|
|
1121
|
-
}
|
|
1122
|
-
function U(o, d) {
|
|
1123
|
-
const E = Q(o), H = A(E), s = e.autoNormalize ? Z(H) : H;
|
|
1124
|
-
return n("normalize", { rawValue: E, code: s }), {
|
|
1125
|
-
rawValue: E,
|
|
1126
|
-
code: s,
|
|
1127
|
-
item: d
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
function K(o) {
|
|
1131
|
-
n("update:modelValue", o);
|
|
1132
|
-
}
|
|
1133
|
-
async function V(o) {
|
|
1134
|
-
if (n("search", o), !!e.searchMethod) {
|
|
1135
|
-
u.value = !0;
|
|
1136
|
-
try {
|
|
1137
|
-
const d = await e.searchMethod(o);
|
|
1138
|
-
n("success", d);
|
|
1139
|
-
} catch (d) {
|
|
1140
|
-
n("error", d);
|
|
1141
|
-
} finally {
|
|
1142
|
-
u.value = !1;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
function X(o) {
|
|
1147
|
-
const d = U(o);
|
|
1148
|
-
d.code !== Q(e.modelValue) && n("update:modelValue", d.code), V(d);
|
|
1149
|
-
}
|
|
1150
|
-
function ee() {
|
|
1151
|
-
n("clear");
|
|
1152
|
-
}
|
|
1153
|
-
function N(o) {
|
|
1154
|
-
n("enter", o);
|
|
1155
|
-
}
|
|
1156
|
-
function W(o) {
|
|
1157
|
-
if (n("select", o), !e.searchOnSelect) return;
|
|
1158
|
-
const d = U(o.value, o);
|
|
1159
|
-
d.code !== Q(e.modelValue) && n("update:modelValue", d.code), V(d);
|
|
1160
|
-
}
|
|
1161
|
-
function M(o) {
|
|
1162
|
-
n("error", o);
|
|
1163
|
-
}
|
|
1164
|
-
function G() {
|
|
1165
|
-
var o, d;
|
|
1166
|
-
(d = (o = y.value) == null ? void 0 : o.focus) == null || d.call(o);
|
|
1167
|
-
}
|
|
1168
|
-
function j() {
|
|
1169
|
-
var o, d;
|
|
1170
|
-
(d = (o = y.value) == null ? void 0 : o.blur) == null || d.call(o);
|
|
1171
|
-
}
|
|
1172
|
-
function te() {
|
|
1173
|
-
var o, d;
|
|
1174
|
-
(d = (o = y.value) == null ? void 0 : o.select) == null || d.call(o);
|
|
1175
|
-
}
|
|
1176
|
-
function p() {
|
|
1177
|
-
var o, d;
|
|
1178
|
-
(d = (o = y.value) == null ? void 0 : o.clear) == null || d.call(o);
|
|
1179
|
-
}
|
|
1180
|
-
i({
|
|
1181
|
-
focus: G,
|
|
1182
|
-
blur: j,
|
|
1183
|
-
select: te,
|
|
1184
|
-
clear: p,
|
|
1185
|
-
extractQuoteOrderCode: A,
|
|
1186
|
-
normalizeQuoteOrderCode: Z
|
|
1187
|
-
});
|
|
1188
|
-
const S = { props: e, emit: n, attrs: B, searchRef: y, internalLoading: u, currentStatusText: m, mergedLoading: D, stringifyValue: Q, defaultExtractQuoteOrderCode: R, defaultNormalizeQuoteOrderCode: w, extractQuoteOrderCode: A, normalizeQuoteOrderCode: Z, buildSearchPayload: U, handleUpdateModelValue: K, dispatchSearch: V, handleSearch: X, handleClear: ee, handleEnter: N, handleSelect: W, handleError: M, focus: G, blur: j, select: te, clear: p, QySearchInput: Ze };
|
|
1189
|
-
return Object.defineProperty(S, "__isScriptSetup", { enumerable: !1, value: !0 }), S;
|
|
1190
|
-
}
|
|
1191
|
-
}), dl = { class: "qy-record-quote-search" }, cl = {
|
|
1192
|
-
key: 0,
|
|
1193
|
-
class: "qy-record-quote-search__header"
|
|
1194
|
-
}, fl = {
|
|
1195
|
-
key: 0,
|
|
1196
|
-
class: "qy-record-quote-search__label"
|
|
1197
|
-
}, yl = {
|
|
1198
|
-
key: 1,
|
|
1199
|
-
class: "qy-record-quote-search__description"
|
|
1200
|
-
};
|
|
1201
|
-
function ml(t, i, a, e, n, B) {
|
|
1202
|
-
return b(), F("div", dl, [
|
|
1203
|
-
_(t.$slots, "label", {}, () => [
|
|
1204
|
-
a.label || a.description ? (b(), F("div", cl, [
|
|
1205
|
-
a.label ? (b(), F(
|
|
1206
|
-
"div",
|
|
1207
|
-
fl,
|
|
1208
|
-
ce(a.label),
|
|
1209
|
-
1
|
|
1210
|
-
/* TEXT */
|
|
1211
|
-
)) : I("v-if", !0),
|
|
1212
|
-
a.description ? (b(), F(
|
|
1213
|
-
"div",
|
|
1214
|
-
yl,
|
|
1215
|
-
ce(a.description),
|
|
1216
|
-
1
|
|
1217
|
-
/* TEXT */
|
|
1218
|
-
)) : I("v-if", !0)
|
|
1219
|
-
])) : I("v-if", !0)
|
|
1220
|
-
], !0),
|
|
1221
|
-
O(e.QySearchInput, fe({ ref: "searchRef" }, e.attrs, {
|
|
1222
|
-
"model-value": a.modelValue,
|
|
1223
|
-
loading: e.mergedLoading,
|
|
1224
|
-
disabled: a.disabled,
|
|
1225
|
-
placeholder: a.placeholder,
|
|
1226
|
-
"remove-space": !0,
|
|
1227
|
-
"trim-mode": a.trimMode,
|
|
1228
|
-
"button-text": a.buttonText,
|
|
1229
|
-
suggestions: a.suggestions,
|
|
1230
|
-
"fetch-suggestions": a.fetchSuggestions,
|
|
1231
|
-
"fetch-suggestions-method": a.fetchSuggestionsMethod,
|
|
1232
|
-
debounce: a.debounce,
|
|
1233
|
-
"min-length": a.minLength,
|
|
1234
|
-
"search-on-select": !1,
|
|
1235
|
-
"onUpdate:modelValue": e.handleUpdateModelValue,
|
|
1236
|
-
onSearch: e.handleSearch,
|
|
1237
|
-
onClear: e.handleClear,
|
|
1238
|
-
onEnter: e.handleEnter,
|
|
1239
|
-
onSelect: e.handleSelect,
|
|
1240
|
-
onError: e.handleError
|
|
1241
|
-
}), Pe({
|
|
1242
|
-
_: 2
|
|
1243
|
-
/* DYNAMIC */
|
|
1244
|
-
}, [
|
|
1245
|
-
t.$slots.prefix ? {
|
|
1246
|
-
name: "prefix",
|
|
1247
|
-
fn: v(() => [
|
|
1248
|
-
_(t.$slots, "prefix", {}, void 0, !0)
|
|
1249
|
-
]),
|
|
1250
|
-
key: "0"
|
|
1251
|
-
} : void 0,
|
|
1252
|
-
t.$slots.suffix ? {
|
|
1253
|
-
name: "suffix",
|
|
1254
|
-
fn: v(() => [
|
|
1255
|
-
_(t.$slots, "suffix", {}, void 0, !0)
|
|
1256
|
-
]),
|
|
1257
|
-
key: "1"
|
|
1258
|
-
} : void 0,
|
|
1259
|
-
t.$slots.item ? {
|
|
1260
|
-
name: "item",
|
|
1261
|
-
fn: v((y) => [
|
|
1262
|
-
_(t.$slots, "item", ze(Ke(y)), void 0, !0)
|
|
1263
|
-
]),
|
|
1264
|
-
key: "2"
|
|
1265
|
-
} : void 0,
|
|
1266
|
-
t.$slots.empty ? {
|
|
1267
|
-
name: "empty",
|
|
1268
|
-
fn: v(() => [
|
|
1269
|
-
_(t.$slots, "empty", {}, void 0, !0)
|
|
1270
|
-
]),
|
|
1271
|
-
key: "3"
|
|
1272
|
-
} : void 0,
|
|
1273
|
-
t.$slots.loading ? {
|
|
1274
|
-
name: "loading",
|
|
1275
|
-
fn: v(() => [
|
|
1276
|
-
_(t.$slots, "loading", {}, void 0, !0)
|
|
1277
|
-
]),
|
|
1278
|
-
key: "4"
|
|
1279
|
-
} : void 0
|
|
1280
|
-
]), 1040, ["model-value", "loading", "disabled", "placeholder", "trim-mode", "button-text", "suggestions", "fetch-suggestions", "fetch-suggestions-method", "debounce", "min-length"]),
|
|
1281
|
-
a.showStatus && e.currentStatusText ? _(t.$slots, "status", {
|
|
1282
|
-
status: a.status,
|
|
1283
|
-
statusText: e.currentStatusText
|
|
1284
|
-
}, () => [
|
|
1285
|
-
$(
|
|
1286
|
-
"div",
|
|
1287
|
-
{
|
|
1288
|
-
class: ge(["qy-record-quote-search__status", `is-${a.status}`])
|
|
1289
|
-
},
|
|
1290
|
-
ce(e.currentStatusText),
|
|
1291
|
-
3
|
|
1292
|
-
/* TEXT, CLASS */
|
|
1293
|
-
)
|
|
1294
|
-
], !0, 0) : I("v-if", !0)
|
|
1295
|
-
]);
|
|
1296
|
-
}
|
|
1297
|
-
const gl = /* @__PURE__ */ ye(ul, [["render", ml], ["__scopeId", "data-v-b95ce153"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-record-quote-search/index.vue"]]), pl = /* @__PURE__ */ he({
|
|
1298
|
-
name: "QySelectionDialog",
|
|
1299
|
-
inheritAttrs: !1,
|
|
1300
|
-
__name: "index",
|
|
1301
|
-
props: {
|
|
1302
|
-
modelValue: { type: Array, required: !1, default: () => [] },
|
|
1303
|
-
open: { type: Boolean, required: !1, default: !0 },
|
|
1304
|
-
title: { type: String, required: !1, default: "选择数据" },
|
|
1305
|
-
width: { type: [String, Number], required: !1, default: "1200px" },
|
|
1306
|
-
fetchMethod: { type: Function, required: !1, default: void 0 },
|
|
1307
|
-
query: { type: Function, required: !1, default: void 0 },
|
|
1308
|
-
responseFormatter: { type: Function, required: !1, default: void 0 },
|
|
1309
|
-
selectionMode: { type: String, required: !1, default: void 0 },
|
|
1310
|
-
selection: { type: String, required: !1, default: "single" },
|
|
1311
|
-
selected: { type: Array, required: !1, default: () => [] },
|
|
1312
|
-
rowKey: { type: String, required: !1, default: "id" },
|
|
1313
|
-
mainKey: { type: String, required: !1, default: void 0 },
|
|
1314
|
-
labelKey: { type: String, required: !1, default: "name" },
|
|
1315
|
-
tagName: { type: String, required: !1, default: void 0 },
|
|
1316
|
-
searchKey: { type: [String, null], required: !1, default: "conditions" },
|
|
1317
|
-
queryParams: { type: Object, required: !1, default: () => ({}) },
|
|
1318
|
-
category: { type: [Array, Function, Boolean], required: !1, default: !1 },
|
|
1319
|
-
categoryFormatter: { type: [Function, Array], required: !1, default: void 0 },
|
|
1320
|
-
categoryOptions: { type: Array, required: !1, default: () => [] },
|
|
1321
|
-
categoryFetchMethod: { type: [Function, null], required: !1, default: null },
|
|
1322
|
-
type: { type: [Array, Boolean], required: !1, default: !1 },
|
|
1323
|
-
typeOptions: { type: Array, required: !1, default: () => [] },
|
|
1324
|
-
typeSelectionProps: { type: Object, required: !1, default: () => ({}) },
|
|
1325
|
-
typeSelectProps: { type: Object, required: !1, default: () => ({}) },
|
|
1326
|
-
tableProps: { type: Object, required: !1, default: () => ({}) },
|
|
1327
|
-
showSelected: { type: Boolean, required: !1, default: !0 },
|
|
1328
|
-
showSearch: { type: Boolean, required: !1, default: !0 },
|
|
1329
|
-
showPagination: { type: Boolean, required: !1, default: !0 },
|
|
1330
|
-
showCopyPaste: { type: Boolean, required: !1, default: !1 },
|
|
1331
|
-
append: { type: Boolean, required: !1, default: !1 },
|
|
1332
|
-
showAppend: { type: Boolean, required: !1, default: !1 },
|
|
1333
|
-
pageSizes: { type: Array, required: !1, default: () => [10, 20, 50, 100] }
|
|
1334
|
-
},
|
|
1335
|
-
emits: ["update:modelValue", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
|
|
1336
|
-
setup(t, { expose: i, emit: a }) {
|
|
1337
|
-
const e = t, n = a, B = pe(), y = wa(), u = Ca(), m = x(null), D = x([]), Q = x([]), R = x([]), w = x(!1), A = x(0), Z = x(!1), U = x(""), K = Ce({
|
|
1338
|
-
category: [],
|
|
1339
|
-
type: "",
|
|
1340
|
-
page: 1,
|
|
1341
|
-
pageSize: 10,
|
|
1342
|
-
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
1343
|
-
...e.queryParams
|
|
1344
|
-
}), V = C(() => e.selectionMode ? e.selectionMode : e.selection === "multi" ? "multiple" : e.selection), X = C(() => e.mainKey || e.rowKey), ee = C(() => e.tagName || e.labelKey), N = C(() => e.typeOptions.length ? e.typeOptions : e.type || []), W = C(() => ({
|
|
1345
|
-
...e.typeSelectionProps,
|
|
1346
|
-
...e.typeSelectProps
|
|
1347
|
-
})), M = C(() => e.tableProps || {}), G = C(
|
|
1348
|
-
() => e.showSearch || !!B["search-visible"]
|
|
1349
|
-
), j = C(() => e.showAppend || e.append), te = C(
|
|
1350
|
-
() => j.value || !!y.toolbar || !!y.bar
|
|
1351
|
-
), p = C(() => e.fetchMethod || e.query), S = C(() => o() ? e.modelValue : e.selected);
|
|
1352
|
-
function o() {
|
|
1353
|
-
const r = (u == null ? void 0 : u.vnode.props) || {};
|
|
1354
|
-
return Object.prototype.hasOwnProperty.call(r, "modelValue") || Object.prototype.hasOwnProperty.call(r, "model-value") || Object.prototype.hasOwnProperty.call(r, "onUpdate:modelValue");
|
|
1355
|
-
}
|
|
1356
|
-
le(
|
|
1357
|
-
[() => e.modelValue, () => e.selected, () => e.open],
|
|
1358
|
-
() => {
|
|
1359
|
-
e.open && (Q.value = ve(S.value), g());
|
|
1360
|
-
},
|
|
1361
|
-
{ immediate: !0, deep: !0 }
|
|
1362
|
-
), le(
|
|
1363
|
-
[() => e.categoryOptions, () => e.category],
|
|
1364
|
-
(r) => {
|
|
1365
|
-
if (Array.isArray(e.category) && e.category.length) {
|
|
1366
|
-
R.value = e.category;
|
|
1367
|
-
return;
|
|
1368
|
-
}
|
|
1369
|
-
R.value = e.categoryOptions || [];
|
|
1370
|
-
},
|
|
1371
|
-
{ immediate: !0 }
|
|
1372
|
-
), le(Z, (r) => {
|
|
1373
|
-
r || (U.value = "");
|
|
1374
|
-
});
|
|
1375
|
-
async function d() {
|
|
1376
|
-
Q.value = ve(S.value), await E(), await H(), g();
|
|
1377
|
-
}
|
|
1378
|
-
async function E() {
|
|
1379
|
-
const r = e.categoryFetchMethod || (typeof e.category == "function" ? e.category : null);
|
|
1380
|
-
if (!r) return;
|
|
1381
|
-
const h = await r();
|
|
1382
|
-
R.value = se(h);
|
|
1383
|
-
}
|
|
1384
|
-
async function H() {
|
|
1385
|
-
if (p.value) {
|
|
1386
|
-
w.value = !0;
|
|
1387
|
-
try {
|
|
1388
|
-
const r = await p.value(ue()), h = e.responseFormatter ? await e.responseFormatter(r) : r, { rows: T, total: z } = ae(h);
|
|
1389
|
-
return D.value = T, A.value = z, n("loaded", T), g(), h;
|
|
1390
|
-
} finally {
|
|
1391
|
-
w.value = !1;
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
function s() {
|
|
1396
|
-
return K.page = 1, H();
|
|
1397
|
-
}
|
|
1398
|
-
function q() {
|
|
1399
|
-
return K.page = 1, H();
|
|
1400
|
-
}
|
|
1401
|
-
function k() {
|
|
1402
|
-
return Object.assign(K, {
|
|
1403
|
-
category: [],
|
|
1404
|
-
type: "",
|
|
1405
|
-
page: 1,
|
|
1406
|
-
pageSize: K.pageSize,
|
|
1407
|
-
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
1408
|
-
...e.queryParams
|
|
1409
|
-
}), H();
|
|
1410
|
-
}
|
|
1411
|
-
function P() {
|
|
1412
|
-
n("append");
|
|
1413
|
-
}
|
|
1414
|
-
function ae(r) {
|
|
1415
|
-
if (Array.isArray(r))
|
|
1416
|
-
return { rows: r, total: r.length };
|
|
1417
|
-
const h = r == null ? void 0 : r.data;
|
|
1418
|
-
if (Array.isArray(h))
|
|
1419
|
-
return { rows: h, total: (r == null ? void 0 : r.total) ?? h.length };
|
|
1420
|
-
const T = (r == null ? void 0 : r.records) || (r == null ? void 0 : r.rows) || (h == null ? void 0 : h.records) || [], z = (r == null ? void 0 : r.total) ?? (h == null ? void 0 : h.total) ?? T.length;
|
|
1421
|
-
return { rows: T, total: z };
|
|
1422
|
-
}
|
|
1423
|
-
function se(r) {
|
|
1424
|
-
const h = (r == null ? void 0 : r.data) ?? r;
|
|
1425
|
-
if (!Array.isArray(h)) return [];
|
|
1426
|
-
if (typeof e.categoryFormatter == "function")
|
|
1427
|
-
return e.categoryFormatter(h);
|
|
1428
|
-
if (Array.isArray(e.categoryFormatter)) {
|
|
1429
|
-
const [T, z] = e.categoryFormatter;
|
|
1430
|
-
return h.map((de) => ({
|
|
1431
|
-
...de,
|
|
1432
|
-
label: de[T],
|
|
1433
|
-
value: de[z],
|
|
1434
|
-
children: Array.isArray(de.children) ? ne(de.children, T, z) : de.children
|
|
1435
|
-
}));
|
|
1436
|
-
}
|
|
1437
|
-
return h;
|
|
1438
|
-
}
|
|
1439
|
-
function ne(r, h, T) {
|
|
1440
|
-
return r.map((z) => ({
|
|
1441
|
-
...z,
|
|
1442
|
-
label: z[h],
|
|
1443
|
-
value: z[T],
|
|
1444
|
-
children: Array.isArray(z.children) ? ne(z.children, h, T) : z.children
|
|
1445
|
-
}));
|
|
1446
|
-
}
|
|
1447
|
-
function ue() {
|
|
1448
|
-
const r = { ...e.queryParams, ...K };
|
|
1449
|
-
return e.searchKey && (r[e.searchKey] = String(r[e.searchKey] || "").trim()), r.category = me(), r;
|
|
1450
|
-
}
|
|
1451
|
-
function me() {
|
|
1452
|
-
if (Object.prototype.hasOwnProperty.call(e.queryParams, "category"))
|
|
1453
|
-
return e.queryParams.category;
|
|
1454
|
-
const r = K.category;
|
|
1455
|
-
return Array.isArray(r) ? r : r ? [r] : [];
|
|
1456
|
-
}
|
|
1457
|
-
function f(r) {
|
|
1458
|
-
var h, T;
|
|
1459
|
-
if (V.value !== "none") {
|
|
1460
|
-
if (V.value === "single") {
|
|
1461
|
-
Q.value = [r], (h = m.value) == null || h.setCurrentRow(r), qe();
|
|
1462
|
-
return;
|
|
1463
|
-
}
|
|
1464
|
-
J(r) && ((T = m.value) == null || T.toggleRowSelection(r, !re(r)));
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
function L(r) {
|
|
1468
|
-
if (V.value !== "multiple") return;
|
|
1469
|
-
const h = new Set(D.value.map(Y)), T = new Set(r.map(Y));
|
|
1470
|
-
Q.value = Q.value.filter(
|
|
1471
|
-
(z) => !h.has(Y(z)) || T.has(Y(z))
|
|
1472
|
-
), r.forEach((z) => {
|
|
1473
|
-
re(z) || Q.value.push(z);
|
|
1474
|
-
}), qe();
|
|
1475
|
-
}
|
|
1476
|
-
function l(r) {
|
|
1477
|
-
var T, z;
|
|
1478
|
-
Q.value = Q.value.filter(
|
|
1479
|
-
(de) => Y(de) !== Y(r)
|
|
1480
|
-
);
|
|
1481
|
-
const h = D.value.find((de) => Y(de) === Y(r));
|
|
1482
|
-
h && (V.value === "multiple" ? (T = m.value) == null || T.toggleRowSelection(h, !1) : (z = m.value) == null || z.setCurrentRow()), qe();
|
|
1483
|
-
}
|
|
1484
|
-
function g() {
|
|
1485
|
-
ke(() => {
|
|
1486
|
-
var r;
|
|
1487
|
-
if (m.value) {
|
|
1488
|
-
if (V.value === "single") {
|
|
1489
|
-
const [h] = Q.value, T = D.value.find(
|
|
1490
|
-
(z) => h && Y(z) === Y(h)
|
|
1491
|
-
);
|
|
1492
|
-
(r = m.value) == null || r.setCurrentRow(T);
|
|
1493
|
-
return;
|
|
1494
|
-
}
|
|
1495
|
-
V.value === "multiple" && D.value.forEach((h) => {
|
|
1496
|
-
var T;
|
|
1497
|
-
(T = m.value) == null || T.toggleRowSelection(h, re(h));
|
|
1498
|
-
});
|
|
1499
|
-
}
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
function J(r) {
|
|
1503
|
-
var T;
|
|
1504
|
-
const h = (T = M.value) == null ? void 0 : T.selectable;
|
|
1505
|
-
return typeof h == "function" ? h(r) !== !1 : !0;
|
|
1506
|
-
}
|
|
1507
|
-
function re(r) {
|
|
1508
|
-
return Q.value.some((h) => Y(h) === Y(r));
|
|
1509
|
-
}
|
|
1510
|
-
function Y(r) {
|
|
1511
|
-
return Se(r, X.value);
|
|
1512
|
-
}
|
|
1513
|
-
function _e(r) {
|
|
1514
|
-
return Se(r, ee.value) ?? Y(r);
|
|
1515
|
-
}
|
|
1516
|
-
function Se(r, h) {
|
|
1517
|
-
if (!(!r || !h))
|
|
1518
|
-
return h.split(".").reduce((T, z) => T == null ? void 0 : T[z], r);
|
|
1519
|
-
}
|
|
1520
|
-
function qe() {
|
|
1521
|
-
const r = ve(Q.value);
|
|
1522
|
-
n("selection-change", r);
|
|
1523
|
-
}
|
|
1524
|
-
function ma() {
|
|
1525
|
-
const r = ve(Q.value);
|
|
1526
|
-
n("update:modelValue", r), n("confirm", r), n("submit", { selection: r, rows: r, query: { ...K } });
|
|
1527
|
-
}
|
|
1528
|
-
function ga() {
|
|
1529
|
-
Q.value = ve(S.value), n("cancel"), n("close");
|
|
1530
|
-
}
|
|
1531
|
-
async function pa() {
|
|
1532
|
-
var h;
|
|
1533
|
-
const r = JSON.stringify(Q.value);
|
|
1534
|
-
await ((h = navigator.clipboard) == null ? void 0 : h.writeText(r)), be.success("复制成功");
|
|
1535
|
-
}
|
|
1536
|
-
function ha() {
|
|
1537
|
-
try {
|
|
1538
|
-
const r = JSON.parse(U.value);
|
|
1539
|
-
if (!Array.isArray(r)) {
|
|
1540
|
-
be.error("粘贴内容需要是数组");
|
|
1541
|
-
return;
|
|
1542
|
-
}
|
|
1543
|
-
r.forEach((h) => {
|
|
1544
|
-
re(h) || Q.value.push(h);
|
|
1545
|
-
}), Z.value = !1, qe(), g();
|
|
1546
|
-
} catch (r) {
|
|
1547
|
-
be.error(`粘贴错误: ${(r == null ? void 0 : r.message) || "内容格式错误"}`);
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
function ve(r = []) {
|
|
1551
|
-
return r.map((h) => ({ ...h }));
|
|
1552
|
-
}
|
|
1553
|
-
i({
|
|
1554
|
-
search: s,
|
|
1555
|
-
handleSearch: H,
|
|
1556
|
-
handleQuerySearch: s,
|
|
1557
|
-
resetSearch: k,
|
|
1558
|
-
getTableRef: () => m.value,
|
|
1559
|
-
getTableData: () => D.value,
|
|
1560
|
-
getSelection: () => ve(Q.value)
|
|
1561
|
-
});
|
|
1562
|
-
const Ve = { props: e, emit: n, attrs: B, slots: y, instance: u, tableRef: m, tableData: D, innerSelectedRows: Q, categoryOptions: R, loading: w, total: A, pasteDialogOpen: Z, pasteText: U, queryForm: K, selectionMode: V, resolvedRowKey: X, resolvedLabelKey: ee, resolvedTypeOptions: N, resolvedTypeSelectProps: W, resolvedTableProps: M, showSearchBar: G, showAppendButton: j, showToolbar: te, fetcher: p, sourceSelectedRows: S, hasModelValueBinding: o, handleOpened: d, loadCategoryOptions: E, handleSearch: H, handleQuerySearch: s, handlePageSizeChange: q, resetSearch: k, handleAppend: P, normalizeResponse: ae, normalizeCategoryOptions: se, normalizeCategoryChildren: ne, getRequestQuery: ue, getCategoryQueryParam: me, handleRowClick: f, handleSelectionChange: L, removeSelectedRow: l, syncTableSelection: g, isRowSelectable: J, hasSelected: re, getRowKey: Y, getRowLabel: _e, getValueByPath: Se, emitDraftSelection: qe, handleConfirm: ma, handleCancel: ga, copySelection: pa, applyPastedSelection: ha, cloneRows: ve, get ElButton() {
|
|
1563
|
-
return we;
|
|
1564
|
-
}, get ElForm() {
|
|
1565
|
-
return Ne;
|
|
1566
|
-
}, get ElFormItem() {
|
|
1567
|
-
return je;
|
|
1568
|
-
}, get ElInput() {
|
|
1569
|
-
return Be;
|
|
1570
|
-
}, get ElPagination() {
|
|
1571
|
-
return Aa;
|
|
1572
|
-
}, get ElTable() {
|
|
1573
|
-
return Ba;
|
|
1574
|
-
}, get ElTableColumn() {
|
|
1575
|
-
return Fa;
|
|
1576
|
-
}, QyDialog: xe, QySelect: Ae, QyTag: Ge, QyTreeSelect: We };
|
|
1577
|
-
return Object.defineProperty(Ve, "__isScriptSetup", { enumerable: !1, value: !0 }), Ve;
|
|
1578
|
-
}
|
|
1579
|
-
}), hl = { class: "qy-selection-dialog" }, vl = { class: "qy-selection-dialog__main" }, bl = {
|
|
1580
|
-
key: 0,
|
|
1581
|
-
class: "qy-selection-dialog__selected"
|
|
1582
|
-
}, Sl = { class: "qy-selection-dialog__selected-tags" }, ql = {
|
|
1583
|
-
key: 0,
|
|
1584
|
-
class: "qy-selection-dialog__selected-actions"
|
|
1585
|
-
}, Ql = {
|
|
1586
|
-
key: 1,
|
|
1587
|
-
class: "qy-selection-dialog__search-row"
|
|
1588
|
-
}, _l = {
|
|
1589
|
-
key: 0,
|
|
1590
|
-
class: "qy-selection-dialog__toolbar"
|
|
1591
|
-
}, wl = {
|
|
1592
|
-
key: 2,
|
|
1593
|
-
class: "qy-selection-dialog__pagination"
|
|
1594
|
-
}, Cl = { class: "qy-selection-dialog__paste-actions" };
|
|
1595
|
-
function kl(t, i, a, e, n, B) {
|
|
1596
|
-
const y = Ha;
|
|
1597
|
-
return b(), oe(e.QyDialog, {
|
|
1598
|
-
open: a.open,
|
|
1599
|
-
title: a.title,
|
|
1600
|
-
width: a.width,
|
|
1601
|
-
onOpened: e.handleOpened,
|
|
1602
|
-
onConfirm: e.handleConfirm,
|
|
1603
|
-
onCancel: e.handleCancel
|
|
1604
|
-
}, {
|
|
1605
|
-
default: v(() => [
|
|
1606
|
-
$("div", hl, [
|
|
1607
|
-
_(t.$slots, "side", {}, void 0, !0),
|
|
1608
|
-
$("div", vl, [
|
|
1609
|
-
a.showSelected ? (b(), F("div", bl, [
|
|
1610
|
-
i[12] || (i[12] = $(
|
|
1611
|
-
"span",
|
|
1612
|
-
{ class: "qy-selection-dialog__selected-label" },
|
|
1613
|
-
"已选项",
|
|
1614
|
-
-1
|
|
1615
|
-
/* CACHED */
|
|
1616
|
-
)),
|
|
1617
|
-
$("div", Sl, [
|
|
1618
|
-
(b(!0), F(
|
|
1619
|
-
Qe,
|
|
1620
|
-
null,
|
|
1621
|
-
Te(e.innerSelectedRows, (u) => (b(), oe(e.QyTag, {
|
|
1622
|
-
key: e.getRowKey(u),
|
|
1623
|
-
closable: "",
|
|
1624
|
-
class: "qy-selection-dialog__selected-tag",
|
|
1625
|
-
onClose: (m) => e.removeSelectedRow(u)
|
|
1626
|
-
}, {
|
|
1627
|
-
default: v(() => [
|
|
1628
|
-
ie(
|
|
1629
|
-
ce(e.getRowLabel(u)),
|
|
1630
|
-
1
|
|
1631
|
-
/* TEXT */
|
|
1632
|
-
)
|
|
1633
|
-
]),
|
|
1634
|
-
_: 2
|
|
1635
|
-
/* DYNAMIC */
|
|
1636
|
-
}, 1032, ["onClose"]))),
|
|
1637
|
-
128
|
|
1638
|
-
/* KEYED_FRAGMENT */
|
|
1639
|
-
)),
|
|
1640
|
-
e.innerSelectedRows.length ? I("v-if", !0) : (b(), oe(e.QyTag, {
|
|
1641
|
-
key: 0,
|
|
1642
|
-
tone: "info"
|
|
1643
|
-
}, {
|
|
1644
|
-
default: v(() => [...i[9] || (i[9] = [
|
|
1645
|
-
ie(
|
|
1646
|
-
"无",
|
|
1647
|
-
-1
|
|
1648
|
-
/* CACHED */
|
|
1649
|
-
)
|
|
1650
|
-
])]),
|
|
1651
|
-
_: 1
|
|
1652
|
-
/* STABLE */
|
|
1653
|
-
}))
|
|
1654
|
-
]),
|
|
1655
|
-
a.showCopyPaste ? (b(), F("div", ql, [
|
|
1656
|
-
O(e.ElButton, {
|
|
1657
|
-
size: "small",
|
|
1658
|
-
onClick: e.copySelection
|
|
1659
|
-
}, {
|
|
1660
|
-
default: v(() => [...i[10] || (i[10] = [
|
|
1661
|
-
ie(
|
|
1662
|
-
"复制",
|
|
1663
|
-
-1
|
|
1664
|
-
/* CACHED */
|
|
1665
|
-
)
|
|
1666
|
-
])]),
|
|
1667
|
-
_: 1
|
|
1668
|
-
/* STABLE */
|
|
1669
|
-
}),
|
|
1670
|
-
O(e.ElButton, {
|
|
1671
|
-
size: "small",
|
|
1672
|
-
onClick: i[0] || (i[0] = (u) => e.pasteDialogOpen = !0)
|
|
1673
|
-
}, {
|
|
1674
|
-
default: v(() => [...i[11] || (i[11] = [
|
|
1675
|
-
ie(
|
|
1676
|
-
"粘贴",
|
|
1677
|
-
-1
|
|
1678
|
-
/* CACHED */
|
|
1679
|
-
)
|
|
1680
|
-
])]),
|
|
1681
|
-
_: 1
|
|
1682
|
-
/* STABLE */
|
|
1683
|
-
})
|
|
1684
|
-
])) : I("v-if", !0)
|
|
1685
|
-
])) : I("v-if", !0),
|
|
1686
|
-
e.showSearchBar ? (b(), F("div", Ql, [
|
|
1687
|
-
O(e.ElForm, {
|
|
1688
|
-
class: "qy-selection-dialog__search",
|
|
1689
|
-
inline: "",
|
|
1690
|
-
model: e.queryForm
|
|
1691
|
-
}, {
|
|
1692
|
-
default: v(() => [
|
|
1693
|
-
_(t.$slots, "search", {
|
|
1694
|
-
query: e.queryForm,
|
|
1695
|
-
search: e.handleQuerySearch,
|
|
1696
|
-
reset: e.resetSearch
|
|
1697
|
-
}, () => [
|
|
1698
|
-
e.categoryOptions.length ? (b(), oe(e.ElFormItem, {
|
|
1699
|
-
key: 0,
|
|
1700
|
-
label: "分类"
|
|
1701
|
-
}, {
|
|
1702
|
-
default: v(() => [
|
|
1703
|
-
O(e.QyTreeSelect, {
|
|
1704
|
-
modelValue: e.queryForm.category,
|
|
1705
|
-
"onUpdate:modelValue": i[1] || (i[1] = (u) => e.queryForm.category = u),
|
|
1706
|
-
class: "qy-selection-dialog__category",
|
|
1707
|
-
options: e.categoryOptions,
|
|
1708
|
-
clearable: "",
|
|
1709
|
-
filterable: "",
|
|
1710
|
-
"check-strictly": "",
|
|
1711
|
-
"render-after-expand": !1,
|
|
1712
|
-
onChange: e.handleQuerySearch
|
|
1713
|
-
}, null, 8, ["modelValue", "options"])
|
|
1714
|
-
]),
|
|
1715
|
-
_: 1
|
|
1716
|
-
/* STABLE */
|
|
1717
|
-
})) : I("v-if", !0),
|
|
1718
|
-
e.resolvedTypeOptions.length ? (b(), oe(e.ElFormItem, {
|
|
1719
|
-
key: 1,
|
|
1720
|
-
label: "类型"
|
|
1721
|
-
}, {
|
|
1722
|
-
default: v(() => [
|
|
1723
|
-
O(e.QySelect, fe({
|
|
1724
|
-
modelValue: e.queryForm.type,
|
|
1725
|
-
"onUpdate:modelValue": i[2] || (i[2] = (u) => e.queryForm.type = u),
|
|
1726
|
-
class: "qy-selection-dialog__type",
|
|
1727
|
-
options: e.resolvedTypeOptions,
|
|
1728
|
-
placeholder: "请选择类型",
|
|
1729
|
-
clearable: ""
|
|
1730
|
-
}, e.resolvedTypeSelectProps, { onChange: e.handleQuerySearch }), null, 16, ["modelValue", "options"])
|
|
1731
|
-
]),
|
|
1732
|
-
_: 1
|
|
1733
|
-
/* STABLE */
|
|
1734
|
-
})) : I("v-if", !0),
|
|
1735
|
-
a.searchKey ? (b(), oe(e.ElFormItem, {
|
|
1736
|
-
key: 2,
|
|
1737
|
-
label: "搜索"
|
|
1738
|
-
}, {
|
|
1739
|
-
default: v(() => [
|
|
1740
|
-
O(e.ElInput, {
|
|
1741
|
-
modelValue: e.queryForm[a.searchKey],
|
|
1742
|
-
"onUpdate:modelValue": i[3] || (i[3] = (u) => e.queryForm[a.searchKey] = u),
|
|
1743
|
-
clearable: "",
|
|
1744
|
-
placeholder: "请输入",
|
|
1745
|
-
class: "qy-selection-dialog__search-input",
|
|
1746
|
-
onKeydown: Ie(Fe(e.handleQuerySearch, ["prevent"]), ["enter"])
|
|
1747
|
-
}, null, 8, ["modelValue", "onKeydown"])
|
|
1748
|
-
]),
|
|
1749
|
-
_: 1
|
|
1750
|
-
/* STABLE */
|
|
1751
|
-
})) : I("v-if", !0),
|
|
1752
|
-
O(e.ElFormItem, null, {
|
|
1753
|
-
default: v(() => [
|
|
1754
|
-
O(e.ElButton, {
|
|
1755
|
-
type: "primary",
|
|
1756
|
-
onClick: e.handleQuerySearch
|
|
1757
|
-
}, {
|
|
1758
|
-
default: v(() => [...i[13] || (i[13] = [
|
|
1759
|
-
ie(
|
|
1760
|
-
"查询",
|
|
1761
|
-
-1
|
|
1762
|
-
/* CACHED */
|
|
1763
|
-
)
|
|
1764
|
-
])]),
|
|
1765
|
-
_: 1
|
|
1766
|
-
/* STABLE */
|
|
1767
|
-
}),
|
|
1768
|
-
O(e.ElButton, { onClick: e.resetSearch }, {
|
|
1769
|
-
default: v(() => [...i[14] || (i[14] = [
|
|
1770
|
-
ie(
|
|
1771
|
-
"重置",
|
|
1772
|
-
-1
|
|
1773
|
-
/* CACHED */
|
|
1774
|
-
)
|
|
1775
|
-
])]),
|
|
1776
|
-
_: 1
|
|
1777
|
-
/* STABLE */
|
|
1778
|
-
})
|
|
1779
|
-
]),
|
|
1780
|
-
_: 1
|
|
1781
|
-
/* STABLE */
|
|
1782
|
-
})
|
|
1783
|
-
], !0)
|
|
1784
|
-
]),
|
|
1785
|
-
_: 3
|
|
1786
|
-
/* FORWARDED */
|
|
1787
|
-
}, 8, ["model"]),
|
|
1788
|
-
e.showToolbar ? (b(), F("div", _l, [
|
|
1789
|
-
e.showAppendButton ? (b(), oe(e.ElButton, {
|
|
1790
|
-
key: 0,
|
|
1791
|
-
type: "primary",
|
|
1792
|
-
onClick: e.handleAppend
|
|
1793
|
-
}, {
|
|
1794
|
-
default: v(() => [...i[15] || (i[15] = [
|
|
1795
|
-
ie(
|
|
1796
|
-
" 新增 ",
|
|
1797
|
-
-1
|
|
1798
|
-
/* CACHED */
|
|
1799
|
-
)
|
|
1800
|
-
])]),
|
|
1801
|
-
_: 1
|
|
1802
|
-
/* STABLE */
|
|
1803
|
-
})) : I("v-if", !0),
|
|
1804
|
-
_(t.$slots, "toolbar", {
|
|
1805
|
-
query: e.queryForm,
|
|
1806
|
-
search: e.handleQuerySearch
|
|
1807
|
-
}, void 0, !0),
|
|
1808
|
-
_(t.$slots, "bar", {
|
|
1809
|
-
query: e.queryForm,
|
|
1810
|
-
search: e.handleQuerySearch
|
|
1811
|
-
}, void 0, !0)
|
|
1812
|
-
])) : I("v-if", !0)
|
|
1813
|
-
])) : I("v-if", !0),
|
|
1814
|
-
Me((b(), oe(e.ElTable, fe({
|
|
1815
|
-
ref: "tableRef",
|
|
1816
|
-
data: e.tableData,
|
|
1817
|
-
"row-key": e.resolvedRowKey,
|
|
1818
|
-
border: "",
|
|
1819
|
-
"highlight-current-row": "",
|
|
1820
|
-
"max-height": "550px"
|
|
1821
|
-
}, e.resolvedTableProps, {
|
|
1822
|
-
onSelectionChange: e.handleSelectionChange,
|
|
1823
|
-
onRowClick: e.handleRowClick
|
|
1824
|
-
}), {
|
|
1825
|
-
default: v(() => {
|
|
1826
|
-
var u;
|
|
1827
|
-
return [
|
|
1828
|
-
e.selectionMode === "multiple" ? (b(), oe(e.ElTableColumn, {
|
|
1829
|
-
key: 0,
|
|
1830
|
-
type: "selection",
|
|
1831
|
-
"reserve-selection": "",
|
|
1832
|
-
width: "42",
|
|
1833
|
-
selectable: (u = e.resolvedTableProps) == null ? void 0 : u.selectable
|
|
1834
|
-
}, null, 8, ["selectable"])) : I("v-if", !0),
|
|
1835
|
-
_(t.$slots, "columns", {}, void 0, !0),
|
|
1836
|
-
_(t.$slots, "cols", {}, void 0, !0)
|
|
1837
|
-
];
|
|
1838
|
-
}),
|
|
1839
|
-
_: 3
|
|
1840
|
-
/* FORWARDED */
|
|
1841
|
-
}, 16, ["data", "row-key"])), [
|
|
1842
|
-
[y, e.loading]
|
|
1843
|
-
]),
|
|
1844
|
-
a.showPagination && e.total > 0 ? (b(), F("div", wl, [
|
|
1845
|
-
O(e.ElPagination, {
|
|
1846
|
-
"current-page": e.queryForm.page,
|
|
1847
|
-
"onUpdate:currentPage": i[4] || (i[4] = (u) => e.queryForm.page = u),
|
|
1848
|
-
"page-size": e.queryForm.pageSize,
|
|
1849
|
-
"onUpdate:pageSize": i[5] || (i[5] = (u) => e.queryForm.pageSize = u),
|
|
1850
|
-
total: e.total,
|
|
1851
|
-
"page-sizes": a.pageSizes,
|
|
1852
|
-
layout: "total, sizes, prev, pager, next, jumper",
|
|
1853
|
-
onSizeChange: e.handlePageSizeChange,
|
|
1854
|
-
onCurrentChange: e.handleSearch
|
|
1855
|
-
}, null, 8, ["current-page", "page-size", "total", "page-sizes"])
|
|
1856
|
-
])) : I("v-if", !0)
|
|
1857
|
-
])
|
|
1858
|
-
]),
|
|
1859
|
-
O(e.QyDialog, {
|
|
1860
|
-
open: e.pasteDialogOpen,
|
|
1861
|
-
title: "粘贴数据",
|
|
1862
|
-
"show-footer": !1,
|
|
1863
|
-
width: "560px",
|
|
1864
|
-
"onUpdate:open": i[8] || (i[8] = (u) => e.pasteDialogOpen = u)
|
|
1865
|
-
}, {
|
|
1866
|
-
default: v(() => [
|
|
1867
|
-
O(e.ElInput, {
|
|
1868
|
-
modelValue: e.pasteText,
|
|
1869
|
-
"onUpdate:modelValue": i[6] || (i[6] = (u) => e.pasteText = u),
|
|
1870
|
-
type: "textarea",
|
|
1871
|
-
rows: 8
|
|
1872
|
-
}, null, 8, ["modelValue"]),
|
|
1873
|
-
$("div", Cl, [
|
|
1874
|
-
O(e.ElButton, {
|
|
1875
|
-
onClick: i[7] || (i[7] = (u) => e.pasteDialogOpen = !1)
|
|
1876
|
-
}, {
|
|
1877
|
-
default: v(() => [...i[16] || (i[16] = [
|
|
1878
|
-
ie(
|
|
1879
|
-
"取消",
|
|
1880
|
-
-1
|
|
1881
|
-
/* CACHED */
|
|
1882
|
-
)
|
|
1883
|
-
])]),
|
|
1884
|
-
_: 1
|
|
1885
|
-
/* STABLE */
|
|
1886
|
-
}),
|
|
1887
|
-
O(e.ElButton, {
|
|
1888
|
-
type: "primary",
|
|
1889
|
-
onClick: e.applyPastedSelection
|
|
1890
|
-
}, {
|
|
1891
|
-
default: v(() => [...i[17] || (i[17] = [
|
|
1892
|
-
ie(
|
|
1893
|
-
"确认",
|
|
1894
|
-
-1
|
|
1895
|
-
/* CACHED */
|
|
1896
|
-
)
|
|
1897
|
-
])]),
|
|
1898
|
-
_: 1
|
|
1899
|
-
/* STABLE */
|
|
1900
|
-
})
|
|
1901
|
-
])
|
|
1902
|
-
]),
|
|
1903
|
-
_: 1
|
|
1904
|
-
/* STABLE */
|
|
1905
|
-
}, 8, ["open"])
|
|
1906
|
-
]),
|
|
1907
|
-
_: 3
|
|
1908
|
-
/* FORWARDED */
|
|
1909
|
-
}, 8, ["open", "title", "width"]);
|
|
1910
|
-
}
|
|
1911
|
-
const Xe = /* @__PURE__ */ ye(pl, [["render", kl], ["__scopeId", "data-v-58940077"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-selection-dialog/index.vue"]]), Tl = /* @__PURE__ */ he({
|
|
1912
|
-
name: "QyLegacySelectionDialog",
|
|
1913
|
-
inheritAttrs: !1,
|
|
1914
|
-
__name: "index",
|
|
1915
|
-
props: {
|
|
1916
|
-
open: { type: Boolean, required: !1, default: !0 },
|
|
1917
|
-
title: { type: String, required: !1, default: "选择数据" },
|
|
1918
|
-
width: { type: [String, Number], required: !1, default: "1200px" },
|
|
1919
|
-
query: { type: Function, required: !1, default: void 0 },
|
|
1920
|
-
responseFormatter: { type: Function, required: !1, default: void 0 },
|
|
1921
|
-
selection: { type: String, required: !1, default: "single" },
|
|
1922
|
-
selected: { type: Array, required: !1, default: () => [] },
|
|
1923
|
-
mainKey: { type: String, required: !1, default: "" },
|
|
1924
|
-
tagName: { type: String, required: !1, default: "" },
|
|
1925
|
-
searchKey: { type: [String, null], required: !1, default: "conditions" },
|
|
1926
|
-
queryParams: { type: Object, required: !1, default: () => ({}) },
|
|
1927
|
-
category: { type: [Array, Function, Boolean], required: !1, default: !1 },
|
|
1928
|
-
categoryFormatter: { type: [Function, Array], required: !1, default: void 0 },
|
|
1929
|
-
type: { type: [Array, Boolean], required: !1, default: !1 },
|
|
1930
|
-
typeSelectionProps: { type: Object, required: !1, default: () => ({}) },
|
|
1931
|
-
tableProps: { type: Object, required: !1, default: () => ({}) },
|
|
1932
|
-
append: { type: Boolean, required: !1, default: !1 },
|
|
1933
|
-
delete: { type: Boolean, required: !1, default: !1 },
|
|
1934
|
-
select: { type: [Object, null], required: !1, default: null }
|
|
1935
|
-
},
|
|
1936
|
-
emits: ["close", "submit", "openDialog", "changeIndexShow"],
|
|
1937
|
-
setup(t, { expose: i, emit: a }) {
|
|
1938
|
-
const e = t, n = a, B = pe(), y = x(null), u = Ce({
|
|
1939
|
-
category: [],
|
|
1940
|
-
code: "",
|
|
1941
|
-
...e.searchKey ? { [e.searchKey]: "" } : {},
|
|
1942
|
-
page: 1,
|
|
1943
|
-
pageSize: 10,
|
|
1944
|
-
type: "",
|
|
1945
|
-
...e.queryParams
|
|
1946
|
-
}), m = Ce({
|
|
1947
|
-
total: 0,
|
|
1948
|
-
tableData: [],
|
|
1949
|
-
open: !1,
|
|
1950
|
-
selection: [],
|
|
1951
|
-
categories: [],
|
|
1952
|
-
types: [],
|
|
1953
|
-
tableRef: null,
|
|
1954
|
-
drag: !1,
|
|
1955
|
-
dialogOpen: !1,
|
|
1956
|
-
pasteData: "",
|
|
1957
|
-
pasteDataDialog: !1
|
|
1958
|
-
}), D = C(() => e.type || []), Q = C(() => m.categories), R = async (s) => {
|
|
1959
|
-
if (!e.query) return { data: { records: [], total: 0 } };
|
|
1960
|
-
const q = await e.query(W(s)), k = e.responseFormatter ? await e.responseFormatter(q) : q;
|
|
1961
|
-
return m.total = d(k), k;
|
|
1962
|
-
};
|
|
1963
|
-
le(
|
|
1964
|
-
() => e.open,
|
|
1965
|
-
(s) => {
|
|
1966
|
-
m.open = s;
|
|
1967
|
-
},
|
|
1968
|
-
{ immediate: !0 }
|
|
1969
|
-
), le(
|
|
1970
|
-
D,
|
|
1971
|
-
(s) => {
|
|
1972
|
-
m.types = [...s];
|
|
1973
|
-
},
|
|
1974
|
-
{ immediate: !0, deep: !0 }
|
|
1975
|
-
), le(
|
|
1976
|
-
[() => e.selected, () => e.open],
|
|
1977
|
-
() => {
|
|
1978
|
-
e.open && (m.selection = E(e.selected));
|
|
1979
|
-
},
|
|
1980
|
-
{ immediate: !0, deep: !0 }
|
|
1981
|
-
), le(
|
|
1982
|
-
() => e.queryParams,
|
|
1983
|
-
() => {
|
|
1984
|
-
Object.assign(u, e.queryParams);
|
|
1985
|
-
},
|
|
1986
|
-
{ deep: !0 }
|
|
1987
|
-
), le(
|
|
1988
|
-
() => m.pasteDataDialog,
|
|
1989
|
-
(s) => {
|
|
1990
|
-
s || (m.pasteData = "");
|
|
1991
|
-
}
|
|
1992
|
-
), le(
|
|
1993
|
-
() => e.select,
|
|
1994
|
-
async () => {
|
|
1995
|
-
e.select && await N(e.select);
|
|
1996
|
-
},
|
|
1997
|
-
{ deep: !0 }
|
|
1998
|
-
), le(
|
|
1999
|
-
() => e.open,
|
|
2000
|
-
async (s) => {
|
|
2001
|
-
s && (m.dialogOpen = !1, await w());
|
|
2002
|
-
},
|
|
2003
|
-
{ immediate: !0 }
|
|
2004
|
-
);
|
|
2005
|
-
async function w() {
|
|
2006
|
-
if (!e.category) {
|
|
2007
|
-
m.categories = [];
|
|
2008
|
-
return;
|
|
2009
|
-
}
|
|
2010
|
-
const s = typeof e.category == "function" ? await e.category() : e.category;
|
|
2011
|
-
m.categories = te(s);
|
|
2012
|
-
}
|
|
2013
|
-
async function A() {
|
|
2014
|
-
var s;
|
|
2015
|
-
return await ke(), (s = y.value) == null ? void 0 : s.handleQuerySearch();
|
|
2016
|
-
}
|
|
2017
|
-
function Z(s) {
|
|
2018
|
-
m.selection = E(s);
|
|
2019
|
-
}
|
|
2020
|
-
function U(s) {
|
|
2021
|
-
var q;
|
|
2022
|
-
m.tableData = s, m.tableRef = (q = y.value) == null ? void 0 : q.getTableRef();
|
|
2023
|
-
}
|
|
2024
|
-
function K(s) {
|
|
2025
|
-
m.selection = E(s), n("submit", m);
|
|
2026
|
-
}
|
|
2027
|
-
function V() {
|
|
2028
|
-
n("close");
|
|
2029
|
-
}
|
|
2030
|
-
function X() {
|
|
2031
|
-
m.dialogOpen = !0, n("openDialog");
|
|
2032
|
-
}
|
|
2033
|
-
function ee(s) {
|
|
2034
|
-
n("changeIndexShow", s);
|
|
2035
|
-
}
|
|
2036
|
-
async function N(s) {
|
|
2037
|
-
if (!e.query || !e.searchKey || !e.mainKey) return;
|
|
2038
|
-
const q = await e.query({
|
|
2039
|
-
...u,
|
|
2040
|
-
[e.searchKey]: s[e.mainKey],
|
|
2041
|
-
category: []
|
|
2042
|
-
}), k = e.responseFormatter ? await e.responseFormatter(q) : q, [P] = o(k);
|
|
2043
|
-
P && (e.selection === "multi" ? (m.selection = m.selection.filter(
|
|
2044
|
-
(ae) => ae[e.mainKey] !== P[e.mainKey]
|
|
2045
|
-
), m.selection.push(P)) : m.selection = [P]);
|
|
2046
|
-
}
|
|
2047
|
-
function W(s = {}) {
|
|
2048
|
-
u.page = s.page ?? u.page, u.pageSize = s.pageSize ?? u.pageSize;
|
|
2049
|
-
const q = {
|
|
2050
|
-
...u,
|
|
2051
|
-
category: M()
|
|
2052
|
-
};
|
|
2053
|
-
return e.searchKey && (q[e.searchKey] = String(q[e.searchKey] || "").trim()), q;
|
|
2054
|
-
}
|
|
2055
|
-
function M() {
|
|
2056
|
-
if (e.queryParams.category)
|
|
2057
|
-
return e.queryParams.category;
|
|
2058
|
-
const s = u.category;
|
|
2059
|
-
if (Array.isArray(s)) return s;
|
|
2060
|
-
if (!s) return [];
|
|
2061
|
-
const q = G(m.categories, s);
|
|
2062
|
-
return q ? j(q) : [s];
|
|
2063
|
-
}
|
|
2064
|
-
function G(s, q) {
|
|
2065
|
-
for (const k of s || []) {
|
|
2066
|
-
if (k.value === q) return k;
|
|
2067
|
-
const P = G(k.children || [], q);
|
|
2068
|
-
if (P) return P;
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
function j(s) {
|
|
2072
|
-
return [s.value, ...(s.children || []).flatMap(j)];
|
|
2073
|
-
}
|
|
2074
|
-
function te(s) {
|
|
2075
|
-
const q = (s == null ? void 0 : s.data) ?? s;
|
|
2076
|
-
if (!Array.isArray(q)) return [];
|
|
2077
|
-
if (typeof e.categoryFormatter == "function")
|
|
2078
|
-
return e.categoryFormatter(q);
|
|
2079
|
-
if (Array.isArray(e.categoryFormatter)) {
|
|
2080
|
-
const [k, P] = e.categoryFormatter;
|
|
2081
|
-
return S(p(q, P), k, P);
|
|
2082
|
-
}
|
|
2083
|
-
return q;
|
|
2084
|
-
}
|
|
2085
|
-
function p(s, q) {
|
|
2086
|
-
const k = s.map((ae) => ({ ...ae })), P = [];
|
|
2087
|
-
return k.forEach((ae) => {
|
|
2088
|
-
const se = ae.parentCateCode;
|
|
2089
|
-
if (!se) {
|
|
2090
|
-
P.push(ae);
|
|
2091
|
-
return;
|
|
2092
|
-
}
|
|
2093
|
-
const ne = k.find((ue) => ue[q] === se);
|
|
2094
|
-
ne ? (ne.children || (ne.children = [])).push(ae) : P.push(ae);
|
|
2095
|
-
}), P;
|
|
2096
|
-
}
|
|
2097
|
-
function S(s, q, k) {
|
|
2098
|
-
return s.map((P) => ({
|
|
2099
|
-
...P,
|
|
2100
|
-
label: P[q],
|
|
2101
|
-
value: P[k],
|
|
2102
|
-
children: Array.isArray(P.children) ? S(P.children, q, k) : P.children
|
|
2103
|
-
}));
|
|
2104
|
-
}
|
|
2105
|
-
function o(s) {
|
|
2106
|
-
if (Array.isArray(s)) return s;
|
|
2107
|
-
const q = s == null ? void 0 : s.data;
|
|
2108
|
-
return Array.isArray(q) ? q : (s == null ? void 0 : s.records) || (s == null ? void 0 : s.rows) || (q == null ? void 0 : q.records) || [];
|
|
2109
|
-
}
|
|
2110
|
-
function d(s) {
|
|
2111
|
-
if (Array.isArray(s)) return s.length;
|
|
2112
|
-
const q = o(s), k = s == null ? void 0 : s.data;
|
|
2113
|
-
return (s == null ? void 0 : s.total) ?? (Array.isArray(k) ? k.length : k == null ? void 0 : k.total) ?? q.length;
|
|
2114
|
-
}
|
|
2115
|
-
function E(s = []) {
|
|
2116
|
-
return s.map((q) => ({ ...q }));
|
|
2117
|
-
}
|
|
2118
|
-
i({
|
|
2119
|
-
search: A,
|
|
2120
|
-
handleSearch: A,
|
|
2121
|
-
handleConditionChange: A,
|
|
2122
|
-
getTableRef: () => m.tableRef,
|
|
2123
|
-
getTableData: () => m.tableData,
|
|
2124
|
-
getSelection: () => E(m.selection)
|
|
2125
|
-
});
|
|
2126
|
-
const H = { props: e, emit: n, attrs: B, selectionDialogRef: y, queryForm: u, state: m, resolvedTypeOptions: D, categoryOptions: Q, legacyQuery: R, loadCategoryOptions: w, handleConditionChange: A, handleSelectionChange: Z, handleLoaded: U, handleConfirm: K, handleCancel: V, openDialog: X, handleChangeIndexShow: ee, selectByLegacyValue: N, buildRequestQuery: W, getCategoryQueryParam: M, findCategory: G, collectCategoryValues: j, normalizeCategoryOptions: te, arrayToTree: p, addTreeSelectFields: S, normalizeRows: o, normalizeTotal: d, cloneRows: E, get ElButton() {
|
|
2127
|
-
return we;
|
|
2128
|
-
}, get ElForm() {
|
|
2129
|
-
return Ne;
|
|
2130
|
-
}, get ElFormItem() {
|
|
2131
|
-
return je;
|
|
2132
|
-
}, get ElInput() {
|
|
2133
|
-
return Be;
|
|
2134
|
-
}, get ElOption() {
|
|
2135
|
-
return Ue;
|
|
2136
|
-
}, get ElSelect() {
|
|
2137
|
-
return Le;
|
|
2138
|
-
}, get ElTreeSelect() {
|
|
2139
|
-
return Va;
|
|
2140
|
-
}, QySelectionDialog: Xe };
|
|
2141
|
-
return Object.defineProperty(H, "__isScriptSetup", { enumerable: !1, value: !0 }), H;
|
|
2142
|
-
}
|
|
2143
|
-
});
|
|
2144
|
-
function Pl(t, i, a, e, n, B) {
|
|
2145
|
-
return b(), F(
|
|
2146
|
-
Qe,
|
|
2147
|
-
null,
|
|
2148
|
-
[
|
|
2149
|
-
O(e.QySelectionDialog, fe({ ref: "selectionDialogRef" }, e.attrs, {
|
|
2150
|
-
modelValue: e.state.selection,
|
|
2151
|
-
"onUpdate:modelValue": i[3] || (i[3] = (y) => e.state.selection = y),
|
|
2152
|
-
open: a.open,
|
|
2153
|
-
title: a.title,
|
|
2154
|
-
width: a.width,
|
|
2155
|
-
query: e.legacyQuery,
|
|
2156
|
-
"response-formatter": a.responseFormatter,
|
|
2157
|
-
selection: a.selection,
|
|
2158
|
-
"row-key": a.mainKey,
|
|
2159
|
-
"label-key": a.tagName,
|
|
2160
|
-
"search-key": a.searchKey,
|
|
2161
|
-
"query-params": {},
|
|
2162
|
-
"category-options": e.categoryOptions,
|
|
2163
|
-
"type-options": e.resolvedTypeOptions,
|
|
2164
|
-
"type-select-props": a.typeSelectionProps,
|
|
2165
|
-
"table-props": a.tableProps,
|
|
2166
|
-
"show-copy-paste": !0,
|
|
2167
|
-
"show-append": a.append,
|
|
2168
|
-
onSelectionChange: e.handleSelectionChange,
|
|
2169
|
-
onConfirm: e.handleConfirm,
|
|
2170
|
-
onCancel: e.handleCancel,
|
|
2171
|
-
onAppend: e.openDialog,
|
|
2172
|
-
onLoaded: e.handleLoaded
|
|
2173
|
-
}), {
|
|
2174
|
-
side: v(() => [
|
|
2175
|
-
_(t.$slots, "side", {
|
|
2176
|
-
state: e.state,
|
|
2177
|
-
cate: e.state.categories,
|
|
2178
|
-
form: e.queryForm,
|
|
2179
|
-
query: e.queryForm,
|
|
2180
|
-
getData: e.handleConditionChange,
|
|
2181
|
-
search: e.handleConditionChange,
|
|
2182
|
-
changeIndexShow: e.handleChangeIndexShow
|
|
2183
|
-
}, void 0, !0)
|
|
2184
|
-
]),
|
|
2185
|
-
search: v(() => [
|
|
2186
|
-
O(e.ElForm, {
|
|
2187
|
-
inline: "",
|
|
2188
|
-
model: e.queryForm
|
|
2189
|
-
}, {
|
|
2190
|
-
default: v(() => [
|
|
2191
|
-
e.state.categories.length ? (b(), oe(e.ElFormItem, {
|
|
2192
|
-
key: 0,
|
|
2193
|
-
label: "分类"
|
|
2194
|
-
}, {
|
|
2195
|
-
default: v(() => [
|
|
2196
|
-
O(e.ElTreeSelect, {
|
|
2197
|
-
modelValue: e.queryForm.category,
|
|
2198
|
-
"onUpdate:modelValue": i[0] || (i[0] = (y) => e.queryForm.category = y),
|
|
2199
|
-
class: "qy-legacy-selection-dialog__category",
|
|
2200
|
-
data: e.state.categories,
|
|
2201
|
-
clearable: "",
|
|
2202
|
-
filterable: "",
|
|
2203
|
-
"check-strictly": "",
|
|
2204
|
-
"render-after-expand": !1,
|
|
2205
|
-
onChange: e.handleConditionChange
|
|
2206
|
-
}, null, 8, ["modelValue", "data"])
|
|
2207
|
-
]),
|
|
2208
|
-
_: 1
|
|
2209
|
-
/* STABLE */
|
|
2210
|
-
})) : I("v-if", !0),
|
|
2211
|
-
e.resolvedTypeOptions.length ? (b(), oe(e.ElFormItem, {
|
|
2212
|
-
key: 1,
|
|
2213
|
-
label: "类型"
|
|
2214
|
-
}, {
|
|
2215
|
-
default: v(() => [
|
|
2216
|
-
O(e.ElSelect, fe({
|
|
2217
|
-
modelValue: e.queryForm.type,
|
|
2218
|
-
"onUpdate:modelValue": i[1] || (i[1] = (y) => e.queryForm.type = y),
|
|
2219
|
-
clearable: ""
|
|
2220
|
-
}, a.typeSelectionProps, { onChange: e.handleConditionChange }), {
|
|
2221
|
-
default: v(() => [
|
|
2222
|
-
(b(!0), F(
|
|
2223
|
-
Qe,
|
|
2224
|
-
null,
|
|
2225
|
-
Te(e.resolvedTypeOptions, (y) => (b(), oe(e.ElOption, {
|
|
2226
|
-
key: y.value,
|
|
2227
|
-
label: y.label,
|
|
2228
|
-
value: y.value
|
|
2229
|
-
}, null, 8, ["label", "value"]))),
|
|
2230
|
-
128
|
|
2231
|
-
/* KEYED_FRAGMENT */
|
|
2232
|
-
))
|
|
2233
|
-
]),
|
|
2234
|
-
_: 1
|
|
2235
|
-
/* STABLE */
|
|
2236
|
-
}, 16, ["modelValue"])
|
|
2237
|
-
]),
|
|
2238
|
-
_: 1
|
|
2239
|
-
/* STABLE */
|
|
2240
|
-
})) : I("v-if", !0),
|
|
2241
|
-
a.searchKey ? (b(), oe(e.ElFormItem, {
|
|
2242
|
-
key: 2,
|
|
2243
|
-
label: "搜索"
|
|
2244
|
-
}, {
|
|
2245
|
-
default: v(() => [
|
|
2246
|
-
O(e.ElInput, {
|
|
2247
|
-
modelValue: e.queryForm[a.searchKey],
|
|
2248
|
-
"onUpdate:modelValue": i[2] || (i[2] = (y) => e.queryForm[a.searchKey] = y),
|
|
2249
|
-
clearable: "",
|
|
2250
|
-
class: "qy-legacy-selection-dialog__search-input",
|
|
2251
|
-
onKeydown: Ie(Fe(e.handleConditionChange, ["prevent"]), ["enter"])
|
|
2252
|
-
}, null, 8, ["modelValue", "onKeydown"])
|
|
2253
|
-
]),
|
|
2254
|
-
_: 1
|
|
2255
|
-
/* STABLE */
|
|
2256
|
-
})) : I("v-if", !0),
|
|
2257
|
-
O(e.ElFormItem, null, {
|
|
2258
|
-
default: v(() => [
|
|
2259
|
-
O(e.ElButton, {
|
|
2260
|
-
type: "primary",
|
|
2261
|
-
onClick: e.handleConditionChange
|
|
2262
|
-
}, {
|
|
2263
|
-
default: v(() => [...i[4] || (i[4] = [
|
|
2264
|
-
ie(
|
|
2265
|
-
"查询",
|
|
2266
|
-
-1
|
|
2267
|
-
/* CACHED */
|
|
2268
|
-
)
|
|
2269
|
-
])]),
|
|
2270
|
-
_: 1
|
|
2271
|
-
/* STABLE */
|
|
2272
|
-
})
|
|
2273
|
-
]),
|
|
2274
|
-
_: 1
|
|
2275
|
-
/* STABLE */
|
|
2276
|
-
})
|
|
2277
|
-
]),
|
|
2278
|
-
_: 1
|
|
2279
|
-
/* STABLE */
|
|
2280
|
-
}, 8, ["model"])
|
|
2281
|
-
]),
|
|
2282
|
-
toolbar: v(() => [
|
|
2283
|
-
_(t.$slots, "bar", {
|
|
2284
|
-
query: e.queryForm,
|
|
2285
|
-
search: e.handleConditionChange
|
|
2286
|
-
}, void 0, !0)
|
|
2287
|
-
]),
|
|
2288
|
-
columns: v(() => [
|
|
2289
|
-
_(t.$slots, "cols", {}, void 0, !0),
|
|
2290
|
-
_(t.$slots, "columns", {}, void 0, !0)
|
|
2291
|
-
]),
|
|
2292
|
-
_: 3
|
|
2293
|
-
/* FORWARDED */
|
|
2294
|
-
}, 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"]),
|
|
2295
|
-
_(t.$slots, "dialog", {
|
|
2296
|
-
state: e.state,
|
|
2297
|
-
form: e.queryForm,
|
|
2298
|
-
getData: e.handleConditionChange
|
|
2299
|
-
}, void 0, !0)
|
|
2300
|
-
],
|
|
2301
|
-
64
|
|
2302
|
-
/* STABLE_FRAGMENT */
|
|
2303
|
-
);
|
|
2304
|
-
}
|
|
2305
|
-
const Il = /* @__PURE__ */ ye(Tl, [["render", Pl], ["__scopeId", "data-v-e4bb0886"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-legacy-selection-dialog/index.vue"]]), Fl = /* @__PURE__ */ he({
|
|
2306
|
-
name: "QyFormSection",
|
|
2307
|
-
__name: "index",
|
|
2308
|
-
props: {
|
|
2309
|
-
title: { type: String, required: !1, default: "" },
|
|
2310
|
-
description: { type: String, required: !1, default: "" },
|
|
2311
|
-
tip: { type: String, required: !1, default: "" },
|
|
2312
|
-
tipType: { type: String, required: !1, default: "info" },
|
|
2313
|
-
collapsible: { type: Boolean, required: !1, default: !1 },
|
|
2314
|
-
defaultExpanded: { type: Boolean, required: !1, default: !0 },
|
|
2315
|
-
bordered: { type: Boolean, required: !1, default: !0 },
|
|
2316
|
-
background: { type: String, required: !1, default: "white" },
|
|
2317
|
-
bodyClass: { type: String, required: !1, default: "" },
|
|
2318
|
-
headerClass: { type: String, required: !1, default: "" }
|
|
2319
|
-
},
|
|
2320
|
-
emits: ["toggle"],
|
|
2321
|
-
setup(t, { expose: i, emit: a }) {
|
|
2322
|
-
i();
|
|
2323
|
-
const e = t, n = a, B = x(e.defaultExpanded);
|
|
2324
|
-
le(
|
|
2325
|
-
() => e.defaultExpanded,
|
|
2326
|
-
(D) => {
|
|
2327
|
-
B.value = D;
|
|
2328
|
-
}
|
|
2329
|
-
);
|
|
2330
|
-
function y() {
|
|
2331
|
-
e.collapsible && (B.value = !B.value, n("toggle", B.value));
|
|
2332
|
-
}
|
|
2333
|
-
function u() {
|
|
2334
|
-
e.collapsible && y();
|
|
2335
|
-
}
|
|
2336
|
-
const m = { props: e, emit: n, expanded: B, toggleExpanded: y, handleHeaderClick: u };
|
|
2337
|
-
return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
|
|
2338
|
-
}
|
|
2339
|
-
}), Bl = { class: "qy-form-section__heading" }, Al = {
|
|
2340
|
-
key: 0,
|
|
2341
|
-
class: "qy-form-section__title"
|
|
2342
|
-
}, Vl = {
|
|
2343
|
-
key: 0,
|
|
2344
|
-
class: "qy-form-section__description"
|
|
2345
|
-
}, El = { class: "qy-form-section__actions" };
|
|
2346
|
-
function Ol(t, i, a, e, n, B) {
|
|
2347
|
-
return b(), F(
|
|
2348
|
-
"section",
|
|
2349
|
-
{
|
|
2350
|
-
class: ge(["qy-form-section", [
|
|
2351
|
-
`is-bg-${a.background}`,
|
|
2352
|
-
{
|
|
2353
|
-
"is-bordered": a.bordered,
|
|
2354
|
-
"is-collapsible": a.collapsible
|
|
2355
|
-
}
|
|
2356
|
-
]])
|
|
2357
|
-
},
|
|
2358
|
-
[
|
|
2359
|
-
$(
|
|
2360
|
-
"header",
|
|
2361
|
-
{
|
|
2362
|
-
class: ge(["qy-form-section__header", a.headerClass]),
|
|
2363
|
-
onClick: e.handleHeaderClick
|
|
2364
|
-
},
|
|
2365
|
-
[
|
|
2366
|
-
$("div", Bl, [
|
|
2367
|
-
_(t.$slots, "title", {}, () => [
|
|
2368
|
-
a.title ? (b(), F(
|
|
2369
|
-
"div",
|
|
2370
|
-
Al,
|
|
2371
|
-
ce(a.title),
|
|
2372
|
-
1
|
|
2373
|
-
/* TEXT */
|
|
2374
|
-
)) : I("v-if", !0)
|
|
2375
|
-
], !0),
|
|
2376
|
-
_(t.$slots, "description", {}, () => [
|
|
2377
|
-
a.description ? (b(), F(
|
|
2378
|
-
"div",
|
|
2379
|
-
Vl,
|
|
2380
|
-
ce(a.description),
|
|
2381
|
-
1
|
|
2382
|
-
/* TEXT */
|
|
2383
|
-
)) : I("v-if", !0)
|
|
2384
|
-
], !0)
|
|
2385
|
-
]),
|
|
2386
|
-
$("div", El, [
|
|
2387
|
-
_(t.$slots, "actions", {}, void 0, !0),
|
|
2388
|
-
a.collapsible ? (b(), F(
|
|
2389
|
-
"button",
|
|
2390
|
-
{
|
|
2391
|
-
key: 0,
|
|
2392
|
-
type: "button",
|
|
2393
|
-
class: "qy-form-section__toggle",
|
|
2394
|
-
onClick: Fe(e.toggleExpanded, ["stop"])
|
|
2395
|
-
},
|
|
2396
|
-
ce(e.expanded ? "收起" : "展开"),
|
|
2397
|
-
1
|
|
2398
|
-
/* TEXT */
|
|
2399
|
-
)) : I("v-if", !0)
|
|
2400
|
-
])
|
|
2401
|
-
],
|
|
2402
|
-
2
|
|
2403
|
-
/* CLASS */
|
|
2404
|
-
),
|
|
2405
|
-
Me($(
|
|
2406
|
-
"div",
|
|
2407
|
-
{
|
|
2408
|
-
class: ge(["qy-form-section__body", a.bodyClass])
|
|
2409
|
-
},
|
|
2410
|
-
[
|
|
2411
|
-
_(t.$slots, "tip", {}, () => [
|
|
2412
|
-
a.tip ? (b(), F(
|
|
2413
|
-
"div",
|
|
2414
|
-
{
|
|
2415
|
-
key: 0,
|
|
2416
|
-
class: ge(["qy-form-section__tip", `is-${a.tipType}`])
|
|
2417
|
-
},
|
|
2418
|
-
ce(a.tip),
|
|
2419
|
-
3
|
|
2420
|
-
/* TEXT, CLASS */
|
|
2421
|
-
)) : I("v-if", !0)
|
|
2422
|
-
], !0),
|
|
2423
|
-
_(t.$slots, "default", {}, void 0, !0)
|
|
2424
|
-
],
|
|
2425
|
-
2
|
|
2426
|
-
/* CLASS */
|
|
2427
|
-
), [
|
|
2428
|
-
[ka, e.expanded]
|
|
2429
|
-
])
|
|
2430
|
-
],
|
|
2431
|
-
2
|
|
2432
|
-
/* CLASS */
|
|
2433
|
-
);
|
|
2434
|
-
}
|
|
2435
|
-
const xl = /* @__PURE__ */ ye(Fl, [["render", Ol], ["__scopeId", "data-v-b1a327a2"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-form-section/index.vue"]]), Dl = /* @__PURE__ */ he({
|
|
2436
|
-
name: "QyActionBar",
|
|
2437
|
-
__name: "index",
|
|
2438
|
-
props: {
|
|
2439
|
-
sticky: { type: Boolean, required: !1, default: !0 },
|
|
2440
|
-
offsetBottom: { type: Number, required: !1, default: 0 },
|
|
2441
|
-
bordered: { type: Boolean, required: !1, default: !0 },
|
|
2442
|
-
shadow: { type: Boolean, required: !1, default: !1 },
|
|
2443
|
-
wrap: { type: Boolean, required: !1, default: !0 },
|
|
2444
|
-
justify: { type: String, required: !1, default: "between" },
|
|
2445
|
-
background: { type: String, required: !1, default: "#fff" }
|
|
2446
|
-
},
|
|
2447
|
-
setup(t, { expose: i }) {
|
|
2448
|
-
i();
|
|
2449
|
-
const a = t, e = C(() => ({
|
|
2450
|
-
// offsetBottom 只负责业务偏移,安全区补偿由 CSS padding 处理。
|
|
2451
|
-
bottom: `${a.offsetBottom}px`,
|
|
2452
|
-
background: a.background
|
|
2453
|
-
})), n = { props: a, barStyle: e };
|
|
2454
|
-
return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
|
|
2455
|
-
}
|
|
2456
|
-
}), Rl = {
|
|
2457
|
-
key: 0,
|
|
2458
|
-
class: "qy-action-bar__left"
|
|
2459
|
-
}, zl = {
|
|
2460
|
-
key: 1,
|
|
2461
|
-
class: "qy-action-bar__center"
|
|
2462
|
-
}, Kl = {
|
|
2463
|
-
key: 2,
|
|
2464
|
-
class: "qy-action-bar__right"
|
|
2465
|
-
};
|
|
2466
|
-
function Ml(t, i, a, e, n, B) {
|
|
2467
|
-
return b(), F(
|
|
2468
|
-
"div",
|
|
2469
|
-
{
|
|
2470
|
-
class: ge(["qy-action-bar", [
|
|
2471
|
-
`is-justify-${a.justify}`,
|
|
2472
|
-
{
|
|
2473
|
-
"is-sticky": a.sticky,
|
|
2474
|
-
"is-bordered": a.bordered,
|
|
2475
|
-
"is-shadow": a.shadow,
|
|
2476
|
-
"is-wrap": a.wrap
|
|
2477
|
-
}
|
|
2478
|
-
]]),
|
|
2479
|
-
style: Re(e.barStyle)
|
|
2480
|
-
},
|
|
2481
|
-
[
|
|
2482
|
-
t.$slots.left ? (b(), F("div", Rl, [
|
|
2483
|
-
_(t.$slots, "left", {}, void 0, !0)
|
|
2484
|
-
])) : I("v-if", !0),
|
|
2485
|
-
t.$slots.default ? (b(), F("div", zl, [
|
|
2486
|
-
_(t.$slots, "default", {}, void 0, !0)
|
|
2487
|
-
])) : I("v-if", !0),
|
|
2488
|
-
t.$slots.right ? (b(), F("div", Kl, [
|
|
2489
|
-
_(t.$slots, "right", {}, void 0, !0)
|
|
2490
|
-
])) : I("v-if", !0)
|
|
2491
|
-
],
|
|
2492
|
-
6
|
|
2493
|
-
/* CLASS, STYLE */
|
|
2494
|
-
);
|
|
2495
|
-
}
|
|
2496
|
-
const Ll = /* @__PURE__ */ ye(Dl, [["render", Ml], ["__scopeId", "data-v-1efb467b"], ["__file", "D:/xushenz/qy-components/packages/ui/lib/qy-action-bar/index.vue"]]), Ye = c(De, "QyUpload"), $e = c(ba, "QyImage"), et = c(Sa, "QyImagePreview"), tt = c(Mo, "QyImageUpload"), at = c(xe, "QyDialog"), ot = c(el, "QyRemarkImage"), lt = c(Ea, "QyButton"), rt = c(Oa, "QyDropdown"), nt = c(xa, "QyInput"), it = c(Da, "QyInputTag"), st = c(Ra, "QyInputNumber"), ut = c(za, "QyMoneyInput"), dt = c(Ka, "QyDatePicker"), ct = c(Ma, "QyCheckbox"), ft = c(La, "QyCheckboxGroup"), yt = c(Ua, "QyRadio"), mt = c(ja, "QyAutocomplete"), gt = c(Na, "QyMenuActions"), pt = c(
|
|
2497
|
-
Wa,
|
|
2498
|
-
"QyTableColumnSettings"
|
|
2499
|
-
), ht = c(Ga, "QyRadioGroup"), vt = c(ol, "QyRemoteSelect"), bt = c(Ze, "QySearchInput"), St = c(
|
|
2500
|
-
gl,
|
|
2501
|
-
"QyRecordQuoteSearch"
|
|
2502
|
-
), qt = c(Ae, "QySelect"), Qt = c(We, "QyTreeSelect"), _t = c(Xe, "QySelectionDialog"), wt = c(
|
|
2503
|
-
Il,
|
|
2504
|
-
"QyLegacySelectionDialog"
|
|
2505
|
-
), Ct = c(xl, "QyFormSection"), kt = c(Ll, "QyActionBar"), Tt = c(Ja, "QyFilePicker"), Pt = c(Za, "QySwitch"), It = c(Ge, "QyTag"), Ft = c(Xa, "QyBadge"), Bt = c(Ya, "QyCascader"), At = c($a, "QyTooltip"), Vt = c(eo, "QyPopover"), Et = c(to, "QyPopconfirm"), Ot = c(ao, "QySkeleton"), xt = c(oo, "QySkeletonItem"), Dt = c(lo, "QyTabs"), Rt = c(ro, "QyTabPane"), zt = c(no, "QySteps"), Kt = c(io, "QyStep"), Mt = c(so, "QyFullscreen"), Lt = c(fo, "QyRow"), Ut = c(yo, "QyCol"), jt = c(mo, "QyContainer"), Nt = c(go, "QyAside"), Wt = c(po, "QyMain"), Gt = c(ho, "QyDescriptions"), Ht = c(vo, "QyDescriptionsItem"), Jt = c(bo, "QyCollapse"), Zt = c(So, "QyCollapseItem"), Xt = c(qo, "QyLink"), Yt = c(Qo, "QyIframe"), $t = c(_o, "QyDivider"), ea = c(wo, "QyEmpty"), ta = c(Co, "QyAlert"), aa = c(ko, "QyCard"), oa = c(To, "QyResult"), la = c(Po, "QyWatermark"), ra = c(Io, "QyScrollbar"), na = c(Fo, "QyProgress"), ia = c(Bo, "QyStatistic"), sa = c(Ao, "QyAvatar"), ua = c(Vo, "QyTree"), da = c(Eo, "QyPagination"), ca = c(uo, "QyIconPicker"), fa = c(co, "QyColorPicker"), ya = c(xo, "QyDrawer"), Ul = (t) => {
|
|
2506
|
-
Je.install(t), t.component("QyDialog", at), t.component("QyDrawer", ya), t.component("QyUpload", Ye), t.component("QyImage", $e), t.component("QyImagePreview", et), t.component("QyImageUpload", tt), t.component("QyRemarkImage", ot), t.component("QyButton", lt), t.component("QyDropdown", rt), t.component("QyInput", nt), t.component("QyInputTag", it), t.component("QyInputNumber", st), t.component("QyMoneyInput", ut), t.component("QyDatePicker", dt), t.component("QyCheckbox", ct), t.component("QyCheckboxGroup", ft), t.component("QyRadio", yt), t.component("QyAutocomplete", mt), t.component("QyMenuActions", gt), t.component("QyTableColumnSettings", pt), t.component("QyRadioGroup", ht), t.component("QyRemoteSelect", vt), t.component("QySearchInput", bt), t.component("QyRecordQuoteSearch", St), t.component("QySelect", qt), t.component("QyTreeSelect", Qt), t.component("QySelectionDialog", _t), t.component("QyLegacySelectionDialog", wt), t.component("QyFormSection", Ct), t.component("QyActionBar", kt), t.component("QyFilePicker", Tt), t.component("QySwitch", Pt), t.component("QyTag", It), t.component("QyBadge", Ft), t.component("QyCascader", Bt), t.component("QyTooltip", At), t.component("QyPopover", Vt), t.component("QyPopconfirm", Et), t.component("QySkeleton", Ot), t.component("QySkeletonItem", xt), t.component("QyTabs", Dt), t.component("QyTabPane", Rt), t.component("QySteps", zt), t.component("QyStep", Kt), t.component("QyFullscreen", Mt), t.component("QyIcon", He), t.component("QyIconPicker", ca), t.component("QyColorPicker", fa), t.component("QyRow", Lt), t.component("QyCol", Ut), t.component("QyContainer", jt), t.component("QyAside", Nt), t.component("QyMain", Wt), t.component("QyDescriptions", Gt), t.component("QyDescriptionsItem", Ht), t.component("QyCollapse", Jt), t.component("QyCollapseItem", Zt), t.component("QyLink", Xt), t.component("QyIframe", Yt), t.component("QyDivider", $t), t.component("QyEmpty", ea), t.component("QyAlert", ta), t.component("QyCard", aa), t.component("QyResult", oa), t.component("QyWatermark", la), t.component("QyScrollbar", ra), t.component("QyProgress", na), t.component("QyStatistic", ia), t.component("QyAvatar", sa), t.component("QyTree", ua), t.component("QyPagination", da);
|
|
2507
|
-
}, nn = {
|
|
2508
|
-
install: Ul,
|
|
2509
|
-
QyUpload: Ye,
|
|
2510
|
-
QyImage: $e,
|
|
2511
|
-
QyImagePreview: et,
|
|
2512
|
-
openQyImagePreview: Do,
|
|
2513
|
-
QyImageUpload: tt,
|
|
2514
|
-
QyDialog: at,
|
|
2515
|
-
QyButton: lt,
|
|
2516
|
-
QyDropdown: rt,
|
|
2517
|
-
QyInput: nt,
|
|
2518
|
-
QyInputTag: it,
|
|
2519
|
-
QyInputNumber: st,
|
|
2520
|
-
QyMoneyInput: ut,
|
|
2521
|
-
QyDatePicker: dt,
|
|
2522
|
-
QyCheckbox: ct,
|
|
2523
|
-
QyCheckboxGroup: ft,
|
|
2524
|
-
QyRadio: yt,
|
|
2525
|
-
QyAutocomplete: mt,
|
|
2526
|
-
QyMenuActions: gt,
|
|
2527
|
-
QyTableColumnSettings: pt,
|
|
2528
|
-
QyRadioGroup: ht,
|
|
2529
|
-
QyRemoteSelect: vt,
|
|
2530
|
-
QySearchInput: bt,
|
|
2531
|
-
QyRecordQuoteSearch: St,
|
|
2532
|
-
QySelect: qt,
|
|
2533
|
-
QyTreeSelect: Qt,
|
|
2534
|
-
QySelectionDialog: _t,
|
|
2535
|
-
QyLegacySelectionDialog: wt,
|
|
2536
|
-
QyFormSection: Ct,
|
|
2537
|
-
QyActionBar: kt,
|
|
2538
|
-
QyFilePicker: Tt,
|
|
2539
|
-
QySwitch: Pt,
|
|
2540
|
-
QyTag: It,
|
|
2541
|
-
QyBadge: Ft,
|
|
2542
|
-
QyCascader: Bt,
|
|
2543
|
-
QyTooltip: At,
|
|
2544
|
-
QyPopover: Vt,
|
|
2545
|
-
QyPopconfirm: Et,
|
|
2546
|
-
QySkeleton: Ot,
|
|
2547
|
-
QySkeletonItem: xt,
|
|
2548
|
-
QyTabs: Dt,
|
|
2549
|
-
QyTabPane: Rt,
|
|
2550
|
-
QySteps: zt,
|
|
2551
|
-
QyStep: Kt,
|
|
2552
|
-
QyFullscreen: Mt,
|
|
2553
|
-
QyDrawer: ya,
|
|
2554
|
-
QyIcon: He,
|
|
2555
|
-
QyIconPicker: ca,
|
|
2556
|
-
QyColorPicker: fa,
|
|
2557
|
-
QyRow: Lt,
|
|
2558
|
-
QyCol: Ut,
|
|
2559
|
-
QyContainer: jt,
|
|
2560
|
-
QyAside: Nt,
|
|
2561
|
-
QyMain: Wt,
|
|
2562
|
-
QyDescriptions: Gt,
|
|
2563
|
-
QyDescriptionsItem: Ht,
|
|
2564
|
-
QyCollapse: Jt,
|
|
2565
|
-
QyCollapseItem: Zt,
|
|
2566
|
-
QyLink: Xt,
|
|
2567
|
-
QyIframe: Yt,
|
|
2568
|
-
QyDivider: $t,
|
|
2569
|
-
QyEmpty: ea,
|
|
2570
|
-
QyAlert: ta,
|
|
2571
|
-
QyCard: aa,
|
|
2572
|
-
QyResult: oa,
|
|
2573
|
-
QyWatermark: la,
|
|
2574
|
-
QyScrollbar: ra,
|
|
2575
|
-
QyProgress: na,
|
|
2576
|
-
QyStatistic: ia,
|
|
2577
|
-
QyAvatar: sa,
|
|
2578
|
-
QyTree: ua,
|
|
2579
|
-
QyPagination: da,
|
|
2580
|
-
QyRemarkImage: ot,
|
|
2581
|
-
QyLoading: Je,
|
|
2582
|
-
vQyLoading: Oo,
|
|
2583
|
-
openQyLoading: Ro
|
|
2584
|
-
};
|
|
2585
|
-
export {
|
|
2586
|
-
qt as $,
|
|
2587
|
-
ca as A,
|
|
2588
|
-
Yt as B,
|
|
2589
|
-
$e as C,
|
|
2590
|
-
et as D,
|
|
2591
|
-
tt as E,
|
|
2592
|
-
nt as F,
|
|
2593
|
-
st as G,
|
|
2594
|
-
it as H,
|
|
2595
|
-
wt as I,
|
|
2596
|
-
Xt as J,
|
|
2597
|
-
Wt as K,
|
|
2598
|
-
gt as L,
|
|
2599
|
-
ut as M,
|
|
2600
|
-
da as N,
|
|
2601
|
-
Et as O,
|
|
2602
|
-
Vt as P,
|
|
2603
|
-
kt as Q,
|
|
2604
|
-
na as R,
|
|
2605
|
-
yt as S,
|
|
2606
|
-
ht as T,
|
|
2607
|
-
St as U,
|
|
2608
|
-
ot as V,
|
|
2609
|
-
vt as W,
|
|
2610
|
-
oa as X,
|
|
2611
|
-
Lt as Y,
|
|
2612
|
-
ra as Z,
|
|
2613
|
-
bt as _,
|
|
2614
|
-
ta as a,
|
|
2615
|
-
_t as a0,
|
|
2616
|
-
Ot as a1,
|
|
2617
|
-
xt as a2,
|
|
2618
|
-
ia as a3,
|
|
2619
|
-
Kt as a4,
|
|
2620
|
-
zt as a5,
|
|
2621
|
-
Pt as a6,
|
|
2622
|
-
Rt as a7,
|
|
2623
|
-
pt as a8,
|
|
2624
|
-
Dt as a9,
|
|
2625
|
-
It as aa,
|
|
2626
|
-
At as ab,
|
|
2627
|
-
ua as ac,
|
|
2628
|
-
Qt as ad,
|
|
2629
|
-
Ye as ae,
|
|
2630
|
-
la as af,
|
|
2631
|
-
nn as ag,
|
|
2632
|
-
Lo as ah,
|
|
2633
|
-
Ee as ai,
|
|
2634
|
-
Oe as aj,
|
|
2635
|
-
Nt as b,
|
|
2636
|
-
mt as c,
|
|
2637
|
-
sa as d,
|
|
2638
|
-
Ft as e,
|
|
2639
|
-
lt as f,
|
|
2640
|
-
aa as g,
|
|
2641
|
-
Bt as h,
|
|
2642
|
-
ct as i,
|
|
2643
|
-
ft as j,
|
|
2644
|
-
Ut as k,
|
|
2645
|
-
Jt as l,
|
|
2646
|
-
Zt as m,
|
|
2647
|
-
fa as n,
|
|
2648
|
-
jt as o,
|
|
2649
|
-
dt as p,
|
|
2650
|
-
Gt as q,
|
|
2651
|
-
Ht as r,
|
|
2652
|
-
at as s,
|
|
2653
|
-
$t as t,
|
|
2654
|
-
ya as u,
|
|
2655
|
-
rt as v,
|
|
2656
|
-
ea as w,
|
|
2657
|
-
Tt as x,
|
|
2658
|
-
Ct as y,
|
|
2659
|
-
Mt as z
|
|
2660
|
-
};
|