@qynpm/ui 1.0.38 → 1.0.39
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 +117 -113
- package/dist/index.cjs +19 -18
- package/dist/index.mjs +67 -65
- 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 -0
- package/dist/qy-pagination/index.mjs +7 -0
- 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-9GEoEe00.cjs +1 -0
- package/dist/shared/index-B25yA5j-.mjs +71 -0
- package/dist/shared/index-B3GsIwhf.mjs +142 -0
- package/dist/shared/index-BFG8tzQV.mjs +149 -0
- package/dist/shared/index-BXWEn5kQ.mjs +766 -0
- package/dist/shared/index-Bd_aS-_F.mjs +162 -0
- package/dist/shared/index-Br_34fum.cjs +1 -0
- package/dist/shared/index-BsDC3meI.cjs +1 -0
- package/dist/shared/index-BzjGYfVd.mjs +222 -0
- package/dist/shared/index-C1gEZRI5.cjs +1 -0
- package/dist/shared/index-CCd7dB4w.cjs +1 -0
- package/dist/shared/index-CGq7Q_hV.mjs +119 -0
- package/dist/shared/index-CJeoAmoJ.mjs +293 -0
- package/dist/shared/index-CiE6qJCJ.mjs +377 -0
- package/dist/shared/index-CnVhquq5.cjs +1 -0
- package/dist/shared/index-D0hSquu3.cjs +1 -0
- package/dist/shared/index-D1Xkf7rL.mjs +107 -0
- package/dist/shared/index-D377Dw9z.cjs +1 -0
- package/dist/shared/index-D7WmSi5s.mjs +127 -0
- package/dist/shared/index-D8OXRBGc.mjs +285 -0
- package/dist/shared/index-DQosPVrl.mjs +68 -0
- package/dist/shared/index-DRugp8x0.cjs +1 -0
- package/dist/shared/{index-BsRfuMop.cjs → index-DYLQNCm_.cjs} +1 -1
- package/dist/shared/index-Db0-JPH3.cjs +1 -0
- package/dist/shared/index-DpSbQfft.mjs +90 -0
- package/dist/shared/index-Dt5TyzGy.cjs +1 -0
- package/dist/shared/index-DuP-b_eY.cjs +1 -0
- package/dist/shared/index-Dus42W4E.cjs +1 -0
- package/dist/shared/index-EIFVul2W.cjs +1 -0
- package/dist/shared/index-G3BezuiV.cjs +1 -0
- package/dist/shared/index-GQheV777.mjs +54 -0
- package/dist/shared/index-HNFq7v-A.cjs +1 -0
- package/dist/shared/index-KNAOQ6lE.mjs +225 -0
- package/dist/shared/index-MNEYnZEw.cjs +1 -0
- package/dist/shared/index-MPd3qxAh.cjs +1 -0
- package/dist/shared/index-_IQS5Lxm.mjs +2362 -0
- package/dist/shared/index-elwxiSmc.cjs +1 -0
- package/dist/shared/{index-BE4CELs-.mjs → index-lKF1vwdE.mjs} +1 -1
- package/dist/shared/index-nVNx7f9k.mjs +72 -0
- package/dist/shared/index-zo5J-y0C.mjs +157 -0
- package/dist/shared/index.vue_vue_type_script_lang-69zSOotQ.mjs +47 -0
- package/dist/shared/index.vue_vue_type_script_lang-8AT3-xU-.cjs +1 -0
- package/dist/shared/{index-Cp0dxH7g.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-WUwab92q.mjs → index.vue_vue_type_script_lang-BaIOvoQn.mjs} +10 -11
- 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-B-d53uut.mjs → index.vue_vue_type_script_lang-Bk0kLg5l.mjs} +10 -11
- package/dist/shared/index.vue_vue_type_script_lang-BkoqbceR.cjs +1 -0
- package/dist/shared/{index-0aCI4Gj1.mjs → index.vue_vue_type_script_lang-BnmY1ndj.mjs} +24 -25
- package/dist/shared/index.vue_vue_type_script_lang-By3jd4gw.cjs +1 -0
- package/dist/shared/{index-9KXqMXBF.mjs → index.vue_vue_type_script_lang-C4JHCuXz.mjs} +14 -15
- package/dist/shared/index.vue_vue_type_script_lang-C9X0V5AK.mjs +71 -0
- 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.vue_vue_type_script_lang-CZK0hDYa.mjs +77 -0
- 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-CaM4EpCy.mjs → index.vue_vue_type_script_lang-D7b9ABei.mjs} +22 -23
- package/dist/shared/index.vue_vue_type_script_lang-D7nzeBUR.mjs +35 -0
- 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-BA6hc-j-.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-Q8rXwNnM.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-qLomEtF6.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-BvnOeUIM.mjs +61 -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-CcbBUYM3.cjs +1 -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-Cswf_owk.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-Dd_nKJvH.mjs +19 -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-OmrHTMpe.mjs +106 -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-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-BXTkWo5P.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BfQd7yxi.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-D2CH70ZX.cjs +1 -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-DOAbOPGO.mjs +403 -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-Daww52B9.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-RiwA2WPO.cjs +1 -0
- package/dist/shared/{index-DAoXMHpO.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-u7VYI7Kg.mjs → index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs} +16 -17
- package/dist/shared/index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs +1 -0
- package/index.d.ts +122 -113
- package/package.json +8 -2
- package/qy-alert/index.d.ts +64 -64
- package/qy-autocomplete/index.d.ts +5 -5
- package/qy-avatar/index.d.ts +67 -67
- package/qy-badge/index.d.ts +63 -63
- package/qy-card/index.d.ts +64 -64
- package/qy-cascader/index.d.ts +198 -198
- package/qy-collapse/index.d.ts +59 -59
- package/qy-collapse-item/index.d.ts +45 -45
- package/qy-descriptions/index.d.ts +47 -47
- package/qy-descriptions-item/index.d.ts +46 -46
- package/qy-dialog/index.d.ts +63 -63
- package/qy-divider/index.d.ts +53 -53
- package/qy-drawer/index.d.ts +55 -55
- package/qy-empty/index.d.ts +51 -51
- package/qy-file-picker/index.d.ts +4 -4
- package/qy-icon/index.d.ts +9 -9
- package/qy-iframe/index.d.ts +66 -66
- package/qy-image/index.d.ts +28 -28
- package/qy-image-preview/index.d.ts +20 -20
- package/qy-image-upload/index.d.ts +69 -69
- package/qy-input/index.d.ts +76 -76
- package/qy-input-number/index.d.ts +64 -64
- package/qy-input-tag/index.d.ts +69 -69
- package/qy-link/index.d.ts +69 -69
- package/qy-loading/index.d.ts +25 -25
- package/qy-menu-actions/index.d.ts +29 -29
- package/qy-money-input/index.d.ts +87 -87
- package/qy-pagination/index.d.ts +40 -0
- package/qy-progress/index.d.ts +74 -74
- package/qy-result/index.d.ts +64 -64
- package/qy-scrollbar/index.d.ts +85 -85
- package/qy-skeleton/index.d.ts +54 -54
- package/qy-skeleton-item/index.d.ts +48 -48
- package/qy-step/index.d.ts +55 -55
- package/qy-steps/index.d.ts +62 -62
- package/qy-tab-pane/index.d.ts +40 -40
- package/qy-table-column-settings/index.d.ts +18 -18
- package/qy-tabs/index.d.ts +84 -84
- package/qy-tree/index.d.ts +132 -132
- package/qy-tree-select/index.d.ts +123 -123
- package/qy-upload/index.d.ts +99 -99
- package/dist/shared/index--I-pLtO3.cjs +0 -1
- package/dist/shared/index-0mok5nS2.cjs +0 -1
- package/dist/shared/index-2xIkj7uz.cjs +0 -1
- package/dist/shared/index-4uXwnK7G.cjs +0 -1
- package/dist/shared/index-B-PlDm1A.cjs +0 -1
- package/dist/shared/index-B0aY8Q_T.cjs +0 -1
- package/dist/shared/index-B1-htEYJ.mjs +0 -100
- package/dist/shared/index-B1ZuGEIr.cjs +0 -1
- package/dist/shared/index-B3wIgwN7.cjs +0 -1
- package/dist/shared/index-B71cpH4T.cjs +0 -1
- package/dist/shared/index-B8S5RT2Z.mjs +0 -206
- package/dist/shared/index-B8znc-qD.cjs +0 -1
- package/dist/shared/index-BCfULlZK.cjs +0 -1
- package/dist/shared/index-BFFnf0Bn.cjs +0 -1
- package/dist/shared/index-BIWER6Wa.cjs +0 -1
- package/dist/shared/index-BM3ueCK9.cjs +0 -1
- package/dist/shared/index-BOLL0aGP.mjs +0 -47
- package/dist/shared/index-BWO4qxne.mjs +0 -395
- package/dist/shared/index-Ba3qQVYM.cjs +0 -1
- package/dist/shared/index-Ba5CLmrh.mjs +0 -157
- package/dist/shared/index-BcPpl_OJ.mjs +0 -892
- package/dist/shared/index-Bg_o9zrB.cjs +0 -1
- package/dist/shared/index-Bguu2ys0.cjs +0 -1
- package/dist/shared/index-BhO1ARf9.cjs +0 -1
- package/dist/shared/index-BiCdxX0E.mjs +0 -63
- package/dist/shared/index-BigCKPUY.mjs +0 -153
- package/dist/shared/index-BmWDUjpi.mjs +0 -73
- package/dist/shared/index-BoGA3Pdv.cjs +0 -1
- package/dist/shared/index-Brxx2EqN.mjs +0 -156
- package/dist/shared/index-BsTSa25A.cjs +0 -1
- package/dist/shared/index-Btwke2ql.cjs +0 -1
- package/dist/shared/index-BxQnJVT8.cjs +0 -1
- package/dist/shared/index-Bx_faI_u.mjs +0 -53
- package/dist/shared/index-C7GXprxF.cjs +0 -1
- package/dist/shared/index-C97qoSgI.cjs +0 -1
- package/dist/shared/index-CCqfQb_M.mjs +0 -82
- package/dist/shared/index-CDGjUhaC.mjs +0 -72
- package/dist/shared/index-CF3vimnX.mjs +0 -73
- package/dist/shared/index-CJxpEc9q.cjs +0 -1
- package/dist/shared/index-COpowa-E.mjs +0 -48
- package/dist/shared/index-CRU4YvLz.cjs +0 -1
- package/dist/shared/index-CSMOYD1R.cjs +0 -1
- package/dist/shared/index-CWB5fAb7.mjs +0 -154
- package/dist/shared/index-CXAVVShG.mjs +0 -278
- package/dist/shared/index-CeasMt4r.mjs +0 -63
- package/dist/shared/index-CftZiihF.mjs +0 -525
- package/dist/shared/index-ChEefC0G.cjs +0 -1
- package/dist/shared/index-CioDI8Ys.cjs +0 -1
- package/dist/shared/index-CjKfmMG4.cjs +0 -1
- package/dist/shared/index-CnIZoCkL.mjs +0 -77
- package/dist/shared/index-CndG7UWF.mjs +0 -138
- package/dist/shared/index-CrwhANF5.mjs +0 -78
- package/dist/shared/index-Cs-LC7ZG.mjs +0 -150
- package/dist/shared/index-CutbNRjY.mjs +0 -198
- package/dist/shared/index-CyJHJCj8.cjs +0 -1
- package/dist/shared/index-CypWMqI4.cjs +0 -1
- package/dist/shared/index-Cz6Lo9RL.cjs +0 -1
- package/dist/shared/index-CzyB5ttX.cjs +0 -1
- package/dist/shared/index-D1cbnYac.mjs +0 -446
- package/dist/shared/index-D8-4wR07.mjs +0 -130
- package/dist/shared/index-D9dQaZtu.cjs +0 -1
- package/dist/shared/index-DEosiUQV.mjs +0 -245
- package/dist/shared/index-DFTSBy3g.mjs +0 -206
- package/dist/shared/index-DFnpyAa1.mjs +0 -69
- package/dist/shared/index-DI5COVol.cjs +0 -1
- package/dist/shared/index-DNMOtH4s.mjs +0 -36
- package/dist/shared/index-DQn_5j_f.cjs +0 -1
- package/dist/shared/index-DRICnDix.mjs +0 -295
- package/dist/shared/index-DS539-rn.mjs +0 -87
- package/dist/shared/index-DTOfhAXP.mjs +0 -74
- package/dist/shared/index-DULBwiHC.mjs +0 -234
- package/dist/shared/index-DVPk0jMO.cjs +0 -1
- package/dist/shared/index-DWrymMO5.cjs +0 -1
- package/dist/shared/index-DYYPqv3Y.cjs +0 -1
- package/dist/shared/index-DZzMTGSJ.cjs +0 -1
- package/dist/shared/index-D_l30Gzr.cjs +0 -1
- package/dist/shared/index-Db7PhnjA.cjs +0 -1
- package/dist/shared/index-DdoFHdjY.mjs +0 -307
- package/dist/shared/index-DeBjILEK.cjs +0 -1
- package/dist/shared/index-DePXY0TI.cjs +0 -1
- package/dist/shared/index-DgPQ8292.cjs +0 -1
- package/dist/shared/index-Di3R0FOU.cjs +0 -1
- package/dist/shared/index-DiNSSXC8.mjs +0 -76
- package/dist/shared/index-DmEwKHe4.cjs +0 -1
- package/dist/shared/index-DnFQkBfl.cjs +0 -1
- package/dist/shared/index-DnexuGuJ.cjs +0 -1
- package/dist/shared/index-DniPcZnL.mjs +0 -52
- package/dist/shared/index-DpitpmqK.mjs +0 -205
- package/dist/shared/index-DtXU2qQS.cjs +0 -1
- package/dist/shared/index-Du-FNseo.cjs +0 -1
- package/dist/shared/index-DwHzztSj.cjs +0 -1
- package/dist/shared/index-DxFfP2Fn.cjs +0 -1
- package/dist/shared/index-DyqFfMhy.mjs +0 -365
- package/dist/shared/index-Hn-IGtqe.cjs +0 -1
- package/dist/shared/index-Nx_w1JYm.cjs +0 -1
- package/dist/shared/index-R6vvV3td.cjs +0 -1
- package/dist/shared/index-TMhQv4oD.mjs +0 -104
- package/dist/shared/index-VtJrvPka.mjs +0 -27
- package/dist/shared/index-YWKumDEW.mjs +0 -61
- package/dist/shared/index-_AB6uqZw.mjs +0 -51
- package/dist/shared/index-bvvNTmuM.mjs +0 -105
- package/dist/shared/index-fVS62tLm.mjs +0 -81
- package/dist/shared/index-gOUVgYd_.cjs +0 -1
- package/dist/shared/index-gU6HjdHv.mjs +0 -311
- package/dist/shared/index-hPaHbb1Y.cjs +0 -1
- package/dist/shared/index-i0G6DcP0.cjs +0 -1
- package/dist/shared/index-jP71VQxo.cjs +0 -1
- package/dist/shared/index-jdGrSpGg.mjs +0 -2657
- package/dist/shared/index-jsEFCWaY.mjs +0 -175
- package/dist/shared/index-lsWZ_M5R.mjs +0 -369
- package/dist/shared/index-mKnRWsLn.cjs +0 -1
- package/dist/shared/index-xdsYNS2u.mjs +0 -53
- package/dist/shared/index-xhROPBam.mjs +0 -129
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineComponent as g, useAttrs as y, computed as n, ref as V, onMounted as x, onBeforeUnmount as B, openBlock as C, createBlock as N, unref as S, mergeProps as R, withCtx as w, renderSlot as z, createTextVNode as E, toDisplayString as L } from "vue";
|
|
2
|
+
import { ElRadio as U } from "element-plus";
|
|
3
|
+
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const q = /* @__PURE__ */ g({
|
|
5
|
+
name: "QyRadio",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: [Boolean, String, Number] },
|
|
10
|
+
value: { type: [Boolean, String, Number], default: !0 },
|
|
11
|
+
label: {},
|
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
|
13
|
+
size: { default: void 0 },
|
|
14
|
+
name: {},
|
|
15
|
+
border: { type: Boolean, default: !1 },
|
|
16
|
+
id: {},
|
|
17
|
+
tabindex: {},
|
|
18
|
+
ariaLabel: {},
|
|
19
|
+
ariaControls: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
22
|
+
setup(s, { emit: c }) {
|
|
23
|
+
const a = s, o = c, f = y(), m = n(
|
|
24
|
+
() => Object.fromEntries(
|
|
25
|
+
Object.entries(f).filter(
|
|
26
|
+
([e]) => e === "class" || e === "style" || e === "role" || e === "title" || e.startsWith("data-") || e.startsWith("aria-")
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
), l = n(() => a.value), i = V(null);
|
|
30
|
+
let t = null;
|
|
31
|
+
const b = n(() => a.modelValue !== void 0 ? a.modelValue : l.value === !0 ? !1 : l.value === !1 ? !0 : typeof l.value == "string" ? `__qy-radio-unselected__${l.value}` : Number.NaN);
|
|
32
|
+
x(() => {
|
|
33
|
+
var e;
|
|
34
|
+
t = ((e = i.value) == null ? void 0 : e.$el.querySelector("input.el-radio__original")) ?? null, t == null || t.addEventListener("keydown", d);
|
|
35
|
+
}), B(() => {
|
|
36
|
+
t == null || t.removeEventListener("keydown", d);
|
|
37
|
+
});
|
|
38
|
+
function u() {
|
|
39
|
+
return !a.disabled && a.modelValue !== l.value;
|
|
40
|
+
}
|
|
41
|
+
function p() {
|
|
42
|
+
u() && o("update:modelValue", l.value);
|
|
43
|
+
}
|
|
44
|
+
function v() {
|
|
45
|
+
u() && o("change", l.value);
|
|
46
|
+
}
|
|
47
|
+
function d(e) {
|
|
48
|
+
if (e.key !== " " && e.code !== "Space") return;
|
|
49
|
+
const r = e.target;
|
|
50
|
+
!r || r.tagName !== "INPUT" || r.type !== "radio" || r.disabled || r.checked || (e.preventDefault(), r.click());
|
|
51
|
+
}
|
|
52
|
+
function _(e) {
|
|
53
|
+
o("focus", e);
|
|
54
|
+
}
|
|
55
|
+
function h(e) {
|
|
56
|
+
o("blur", e);
|
|
57
|
+
}
|
|
58
|
+
return (e, r) => (C(), N(S(U), R({
|
|
59
|
+
ref_key: "radioRef",
|
|
60
|
+
ref: i
|
|
61
|
+
}, m.value, {
|
|
62
|
+
class: "qy-radio",
|
|
63
|
+
"model-value": b.value,
|
|
64
|
+
value: l.value,
|
|
65
|
+
label: a.label,
|
|
66
|
+
disabled: a.disabled,
|
|
67
|
+
size: a.size,
|
|
68
|
+
name: a.name,
|
|
69
|
+
border: a.border,
|
|
70
|
+
id: a.id,
|
|
71
|
+
tabindex: a.tabindex,
|
|
72
|
+
"aria-label": a.ariaLabel,
|
|
73
|
+
"aria-controls": a.ariaControls,
|
|
74
|
+
"onUpdate:modelValue": p,
|
|
75
|
+
onChange: v,
|
|
76
|
+
onFocusCapture: _,
|
|
77
|
+
onBlurCapture: h
|
|
78
|
+
}), {
|
|
79
|
+
default: w(() => [
|
|
80
|
+
z(e.$slots, "default", {}, () => [
|
|
81
|
+
E(L(a.label), 1)
|
|
82
|
+
], !0)
|
|
83
|
+
]),
|
|
84
|
+
_: 3
|
|
85
|
+
}, 16, ["model-value", "value", "label", "disabled", "size", "name", "border", "id", "tabindex", "aria-label", "aria-controls"]));
|
|
86
|
+
}
|
|
87
|
+
}), j = /* @__PURE__ */ k(q, [["__scopeId", "data-v-b75376cc"]]);
|
|
88
|
+
export {
|
|
89
|
+
j as R
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),r=require("element-plus"),f=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=a.defineComponent({name:"QySwitch",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number],default:!1},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{},activeText:{default:""},inactiveText:{default:""},inlinePrompt:{type:Boolean,default:!1},name:{default:""},id:{},tabindex:{},ariaLabel:{}},emits:["update:modelValue","change","focus","blur"],setup(e,{emit:l}){const i=l,n=a.useAttrs(),u=a.computed(()=>Object.fromEntries(Object.entries(n).filter(([t])=>t==="class"||t==="style"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"))));function d(t){i("focus",t)}function c(t){i("blur",t)}function o(t){e.disabled||e.loading||i("update:modelValue",t)}function s(t){e.disabled||e.loading||i("change",t)}return(t,b)=>(a.openBlock(),a.createBlock(a.unref(r.ElSwitch),a.mergeProps(u.value,{class:"qy-switch","model-value":e.modelValue,"active-value":e.activeValue,"inactive-value":e.inactiveValue,disabled:e.disabled,loading:e.loading,size:e.size,"active-text":e.activeText,"inactive-text":e.inactiveText,"inline-prompt":e.inlinePrompt,name:e.name,id:e.id,tabindex:e.tabindex,"aria-label":e.ariaLabel,"onUpdate:modelValue":o,onChange:s,onFocusin:d,onFocusout:c}),null,16,["model-value","active-value","inactive-value","disabled","loading","size","active-text","inactive-text","inline-prompt","name","id","tabindex","aria-label"]))}}),v=f._export_sfc(m,[["__scopeId","data-v-35d68835"]]);exports.Switch=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),_=require("element-plus"),S=require("element-plus/es/locale/lang/zh-cn"),z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=e.defineComponent({__name:"ElementPaginationRenderer",props:{total:{},currentPage:{},pageSize:{},pageSizes:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["page-change","page-size-change"],setup(r,{emit:b}){const n=r,p=b,c=e.computed(()=>n.disabled||n.loading),d=e.computed(()=>n.pageSizes.length>1?"sizes, prev, pager, next":"prev, pager, next"),l=e.ref(null),v=e.ref(null);let s=0;function g(){var i,u;(u=(i=v.value)==null?void 0:i.querySelector('.el-pagination__sizes [role="combobox"]'))==null||u.setAttribute("aria-label","每页条数")}e.onMounted(g),e.onUpdated(g);function f(i){if(!c.value){if(l.value!==null){l.value=null;return}i!==n.currentPage&&p("page-change",i)}}function m(i){if(c.value)return;l.value=i;const u=++s;Promise.resolve().then(()=>{s===u&&(l.value=null)}),p("page-size-change",i)}return(i,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rendererRef",ref:v,class:"qy-pagination-element-renderer","data-testid":"qy-pagination-element-renderer"},[e.createVNode(e.unref(_.ElConfigProvider),{locale:e.unref(S)},{default:e.withCtx(()=>[e.createVNode(e.unref(_.ElPagination),{layout:d.value,total:r.total,"current-page":r.currentPage,"page-size":r.pageSize,"page-sizes":[...r.pageSizes],"pager-count":7,disabled:c.value,teleported:!1,"onUpdate:currentPage":f,"onUpdate:pageSize":m},null,8,["layout","total","current-page","page-size","page-sizes","disabled"])]),_:1},8,["locale"])],512))}}),q=z._export_sfc(N,[["__scopeId","data-v-a27b6aaa"]]),x=["aria-busy"],C={class:"qy-pagination__info"},B={class:"qy-pagination__total"},I={class:"qy-pagination__summary"},E={class:"qy-pagination__controls"},V=e.defineComponent({__name:"index",props:{total:{},page:{},pageSize:{},pageSizeOptions:{default:()=>[10,20,50]},hideOnSinglePage:{type:Boolean,default:!1},disabled:{type:Boolean},loading:{type:Boolean},binding:{}},emits:["page-change","page-size-change"],setup(r,{emit:b}){const n=r,p=b;function c(a,t){const o=Number(a);return Number.isInteger(o)&&o>0?o:t}const d=e.computed(()=>{var t;const a=Number(n.total??((t=n.binding)==null?void 0:t.total)??0);return Number.isFinite(a)&&a>=0?a:0}),l=e.computed(()=>{var a;return c(n.pageSize??((a=n.binding)==null?void 0:a.pageSize),10)}),v=e.computed(()=>{const t=(Array.isArray(n.pageSizeOptions)?n.pageSizeOptions:[]).map(o=>Number(o)).filter(o=>Number.isInteger(o)&&o>0);return[...new Set([...t,l.value])].sort((o,P)=>o-P)}),s=e.computed(()=>Math.max(1,Math.ceil(d.value/l.value))),g=e.computed(()=>{var a;return Math.min(Math.max(1,c(n.page??((a=n.binding)==null?void 0:a.page),1)),s.value)}),f=e.computed(()=>{var a;return!!(n.disabled??((a=n.binding)==null?void 0:a.disabled))}),m=e.computed(()=>{var a;return!!(n.loading??((a=n.binding)==null?void 0:a.loading))}),i=e.computed(()=>f.value||m.value),u=e.computed(()=>d.value>0&&(!n.hideOnSinglePage||s.value>1));function h(a){var t;i.value||!Number.isInteger(a)||a<1||a>s.value||a===g.value||((t=n.binding)==null||t.setPage(a),p("page-change",a))}function y(a){var t;i.value||!Number.isInteger(a)||a<=0||a===l.value||((t=n.binding)==null||t.setPageSize(a),p("page-size-change",a))}return(a,t)=>u.value?(e.openBlock(),e.createElementBlock("nav",{key:0,class:"qy-pagination","data-testid":"qy-pagination","aria-label":"分页","aria-busy":m.value?"true":void 0},[e.createElementVNode("div",C,[e.createElementVNode("span",B,"共 "+e.toDisplayString(d.value)+" 条",1),e.createElementVNode("span",I," 第 "+e.toDisplayString(g.value)+" / "+e.toDisplayString(s.value)+" 页 ",1)]),e.createElementVNode("div",E,[e.createVNode(q,{total:d.value,"current-page":g.value,"page-size":l.value,"page-sizes":v.value,disabled:f.value,loading:m.value,onPageChange:h,onPageSizeChange:y},null,8,["total","current-page","page-size","page-sizes","disabled","loading"])])],8,x)):e.createCommentVNode("",!0)}}),k=z._export_sfc(V,[["__scopeId","data-v-b58990f5"]]);exports.Pagination=k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const re=require("./index.vue_vue_type_style_index_0_lang-BfQd7yxi.cjs"),de=require("./index-MNEYnZEw.cjs"),Dt=require("./index-DRugp8x0.cjs"),zt=require("./index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs"),e=require("vue"),Q=require("element-plus"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ot=require("./index-D377Dw9z.cjs"),Kt=require("./index-C1gEZRI5.cjs"),Mt=require("./index-HNFq7v-A.cjs"),Lt=require("./index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs"),Ut=require("./index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs"),jt=require("./index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs"),Wt=require("./index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs"),Gt=require("./index-G3BezuiV.cjs"),Ht=require("./index.vue_vue_type_script_setup_true_lang-Cswf_owk.cjs"),Jt=require("./index-Db0-JPH3.cjs"),Zt=require("./index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs"),Xt=require("./index-D0hSquu3.cjs"),Yt=require("./index-elwxiSmc.cjs"),en=require("./index.vue_vue_type_script_setup_true_lang-CcbBUYM3.cjs"),ye=require("./index-MPd3qxAh.cjs"),qt=require("./index-CnVhquq5.cjs"),tn=require("element-plus"),ie=require("./index-Br_34fum.cjs"),nn=require("./index-CCd7dB4w.cjs"),on=require("./index-Dt5TyzGy.cjs"),an=require("./index.vue_vue_type_script_lang-DMrpLmWN.cjs"),ln=require("./index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs"),rn=require("./index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs"),cn=require("./index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs"),sn=require("./index.vue_vue_type_style_index_0_lang-B2thgQml.cjs"),un=require("./index.vue_vue_type_script_setup_true_lang-BWi3g3mb.cjs"),dn=require("./index.vue_vue_type_script_setup_true_lang-4KZSABSM.cjs"),yn=require("./index.vue_vue_type_style_index_0_lang-D9DraThL.cjs"),fn=require("./index.vue_vue_type_script_lang-DLmUPDR5.cjs"),mn=require("./index.vue_vue_type_script_lang-D42aRlO2.cjs"),pn=require("./index.vue_vue_type_script_lang-BO9Ju_i0.cjs"),gn=require("./index-BsDC3meI.cjs"),$t=require("./index-DYLQNCm_.cjs"),hn=require("./index.vue_vue_type_style_index_0_lang-D2CH70ZX.cjs"),vn=require("./index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs"),wn=require("./index.vue_vue_type_script_lang-CCL57H5c.cjs"),Qn=require("./index.vue_vue_type_script_lang-CKZUcaZ5.cjs"),_n=require("./index.vue_vue_type_script_lang-BgapsQjI.cjs"),bn=require("./index.vue_vue_type_script_lang-8AT3-xU-.cjs"),kn=require("./index.vue_vue_type_script_lang-By3jd4gw.cjs"),Sn=require("./index.vue_vue_type_script_lang-CIOi2ahp.cjs"),Cn=require("./index.vue_vue_type_script_lang-DpSaB5eg.cjs"),xn=require("./index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs"),Bn=require("./index.vue_vue_type_script_setup_true_lang-DUEhuwGQ.cjs"),Vn=require("./index.vue_vue_type_script_setup_true_lang-D7BlbHN5.cjs"),In=require("./index-EIFVul2W.cjs"),qn=require("./index.vue_vue_type_script_setup_true_lang-C96ZaggL.cjs"),$n=require("./index.vue_vue_type_script_lang-Bc3tktk9.cjs"),En=require("./index.vue_vue_type_script_lang-Cv4Pf58E.cjs"),Pn=require("./index.vue_vue_type_script_lang-CwrbII5c.cjs"),Tn=require("./index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs"),An=require("./index.vue_vue_type_script_setup_true_lang-Cr9PdvyR.cjs"),Nn=require("./index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs"),Fn=require("./index.vue_vue_type_script_lang-BkoqbceR.cjs"),Rn=require("./index.vue_vue_type_script_lang-CfjfZCT3.cjs"),Dn=require("./index.vue_vue_type_script_lang-WJ63_A7F.cjs"),zn=require("./index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs"),On=require("./index-DuP-b_eY.cjs"),d=require("./install-c8il9DQv.cjs"),ce=require("./index-Dvf1zJ7h.cjs"),Kn=require("./index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs"),Mn=require("./utils-BjEXwY3L.cjs"),Ln=require("@qynpm/hooks"),Un=Object.assign({name:"QyImageUpload",inheritAttrs:!1},{__name:"index",props:{modelValue:{type:[String,Array],default:""},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"files"},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},mode:{type:String,default:"default"},voucher:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},isShowTip:{type:Boolean,default:!1},limit:{type:Number,default:void 0},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"128px"},disableDrag:{type:Boolean,default:!1},showPasteInput:{type:Boolean,default:!0},pastePlaceholder:{type:String,default:"粘贴图片上传"},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})},uploadRequest:{type:Function,default:null}},emits:["update:modelValue","change","success","error","remove","updateImg"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=["jpg","jpeg","png","gif","bmp","webp"],y=e.computed(()=>n.voucher||n.mode==="voucher"),I=e.computed(()=>Array.isArray(n.modelValue)?n.modelValue.filter(Boolean):n.modelValue?String(n.modelValue).split(",").filter(Boolean):[]),w=e.computed(()=>n.supportVideo?1:y.value?n.limit??30:n.limit??(n.multiple?9:1)),T=e.computed(()=>{var o;return(o=n.fileType)!=null&&o.length?n.fileType:y.value&&!n.supportVideo?m:[]});function q(o){return Array.isArray(o)?o.filter(Boolean):[]}function C(o){const u=q(o);return n.multiple?u:u[0]||""}function A(o){c("update:modelValue",C(o))}function N(o){c("change",C(o==null?void 0:o.files))}function k(o){var K,r;if(typeof o=="string")return o;const u=o||{},E=u.url??u.urls??((K=u.data)==null?void 0:K.url)??((r=u.data)==null?void 0:r.urls)??"";return Array.isArray(E)?E[0]||"":E||""}function $(o){const u=k(o);u&&c("updateImg",u),c("success",v(),o)}function M(o){c("error",o)}function G(o,u){c("remove",o,u)}function D(){var o,u;(u=(o=b.value)==null?void 0:o.openFileDialog)==null||u.call(o)}function z(){var o,u;(u=(o=b.value)==null?void 0:o.clearFiles)==null||u.call(o)}function F(){var o,u;return((u=(o=b.value)==null?void 0:o.getPathList)==null?void 0:u.call(o))||[]}const L=e.computed(()=>F()),O=e.computed(()=>F());function g(){return F()}function v(){const o=F();return n.multiple?o:o[0]||""}return V({openFileDialog:D,clearFiles:z,getPathList:F,getFullPathList:g,fullPathList:L,pathList:O,getValue:v}),(o,u)=>(e.openBlock(),e.createBlock(de.Upload,e.mergeProps({ref_key:"uploadRef",ref:b},e.unref(j),{"model-value":I.value,"value-format":"array",api:t.api,name:t.name,multiple:t.multiple,disabled:t.disabled,"file-type":T.value,"file-size":t.fileSize,limit:w.value,"is-show-tip":t.isShowTip,"token-key":t.tokenKey,"support-video":t.supportVideo,size:t.size,"disable-drag":t.disableDrag,"call-back":t.callBack,"extra-data":t.extraData,"upload-request":t.uploadRequest,"show-text":!1,"show-paste-input":t.showPasteInput,"paste-placeholder":t.pastePlaceholder,"onUpdate:modelValue":A,onChange:N,onSuccess:$,onError:M,onRemove:G}),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"]))}});function se(t){const V=t==null?void 0:t.match(/(\[url\:(.*?)\])(.*)/);return V?{imageUrl:V[2],text:V[3]}:{imageUrl:"",text:t||""}}function Et(t){const V=String(t||"").match(/(\[url\:.*?\])([\s\S]*)/);return V?V[2]:t}function ue(t,V){return V?`[url:${V}]${t}`:t}const jn={class:"qy-remark-image__field"},Wn={key:1,class:"qy-remark-image__divider"},Gn={class:"qy-remark-image__upload-anchor"},Hn={key:0,class:"icon-[line-md--loading-twotone-loop]",role:"img","aria-hidden":"true"},Jn={key:1,class:"icon-[ion--cloud-upload-outline]",role:"img","aria-hidden":"true"},Zn={key:2,class:"icon-[ph--images-thin]",role:"img","aria-hidden":"true"},Xn={class:"qy-remark-image__popover"},Yn=["src"],eo={class:"qy-remark-image__popover-footer"},to=e.defineComponent({__name:"index",props:{defaultValue:{default:""},defaultImage:{default:""},rows:{default:6},width:{default:""},autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"粘贴图片上传"},type:{default:"textarea"},layout:{default:"default"},selectValue:{type:[String,Number,Boolean],default:""},selectOptions:{default:()=>[]},selectDisabled:{type:Boolean,default:!1},api:{default:"/permission-api/common/uploads"},tokenKey:{default:"Admin-Token"},uploadName:{default:"files"},uploadRequest:{}},emits:["change","update:selectValue","select-change"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(""),y=e.ref(""),I=e.ref(!1),w=e.computed(()=>n.layout==="select-prefix"),T=e.computed(()=>({"qy-remark-image--select-prefix":w.value})),q=e.computed(()=>w.value||n.type==="text"?"text":"textarea"),C=e.computed(()=>{if(n.width)return{width:typeof n.width=="number"?`${n.width}px`:n.width}});e.watch(()=>n.defaultValue,g=>{const v=se(g||"");m.value=v.text,y.value=v.imageUrl||n.defaultImage||""},{immediate:!0}),e.watch(()=>n.defaultImage,g=>{g!==void 0&&!se(n.defaultValue||"").imageUrl&&(y.value=g||"")},{immediate:!0}),e.onMounted(()=>{e.nextTick(N)}),e.onUnmounted(()=>{const g=A();g&&g.removeEventListener("paste",D)});function A(){var g,v;return((g=b.value)==null?void 0:g.textarea)||((v=b.value)==null?void 0:v.input)||null}function N(){const g=A();g&&(g.removeEventListener("paste",D),g.addEventListener("paste",D))}function k(g){m.value=Et(g||"")}function $(g){c("update:selectValue",g),c("select-change",g)}function M(){y.value="",O()}function G(){m.value="",y.value="",O()}async function D(g){var u;const o=Array.from(((u=g.clipboardData)==null?void 0:u.files)||[]).find(E=>E.type.startsWith("image/"));o&&(g.preventDefault(),await z({file:o,onError:()=>{},onProgress:()=>{},onSuccess:()=>{}}))}async function z(g){var v,o;if(g.file.size>51200*1e3)return Q.ElMessage.error("图片过大"),!1;I.value=!0;try{const u=await F(g);return y.value=L(u),O(),Q.ElMessage.success("上传图片成功"),(v=g.onSuccess)==null||v.call(g,u),!0}catch(u){return(o=g.onError)==null||o.call(g,u),Q.ElMessage.error("上传失败"),!1}finally{I.value=!1}}async function F(g){const v=new FormData;if(v.append(n.uploadName,g.file),n.uploadRequest)return n.uploadRequest({file:g.file,formData:v,options:g,api:n.api,tokenKey:n.tokenKey});const o=de.api.get(n.tokenKey);return(await fetch(n.api,{method:"POST",body:v,credentials:"include",headers:o?{Authorization:`Bearer ${o}`}:void 0})).json()}function L(g){var u,E;if(typeof g=="string")return g;const v=g,o=(v==null?void 0:v.urls)??((u=v==null?void 0:v.data)==null?void 0:u.urls)??((E=v==null?void 0:v.data)==null?void 0:E.url)??(v==null?void 0:v.url)??"";return Array.isArray(o)?o[0]||"":o||""}function O(){c("change",ue(m.value||"",y.value||""),y.value||"")}return V({deleteImage:M,clearContent:G,getValue:()=>({text:m.value||"",imageUrl:y.value||"",value:ue(m.value||"",y.value||"")})}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-remark-image",T.value]),style:e.normalizeStyle(C.value)},[e.createElementVNode("div",jn,[w.value?(e.openBlock(),e.createBlock(e.unref(Q.ElSelect),{key:0,class:"qy-remark-image__prefix-select","model-value":t.selectValue,options:t.selectOptions,disabled:t.disabled||t.selectDisabled,size:"small","onUpdate:modelValue":$},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selectOptions,o=>(e.openBlock(),e.createBlock(e.unref(Q.ElOption),{key:String(o.value),label:o.label,value:o.value,disabled:o.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","options","disabled"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("span",Wn)):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElInput),e.mergeProps({ref_key:"inputRef",ref:b,"model-value":m.value,type:q.value,rows:t.rows,autosize:t.autosize,disabled:t.disabled,placeholder:t.placeholder},e.unref(j),{"onUpdate:modelValue":k,onBlur:O}),null,16,["model-value","type","rows","autosize","disabled","placeholder"]),e.createVNode(e.unref(Q.ElPopover),{placement:"top-start",width:400,trigger:"hover",disabled:!y.value},{reference:e.withCtx(()=>[e.createElementVNode("div",Gn,[e.createVNode(e.unref(Q.ElUpload),{disabled:I.value||t.disabled,class:"qy-remark-image__upload","show-file-list":!1,"http-request":z},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createElementBlock("span",Hn)):y.value?(e.openBlock(),e.createElementBlock("span",Zn)):(e.openBlock(),e.createElementBlock("span",Jn))]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.createElementVNode("img",{src:y.value,class:"qy-remark-image__preview-img"},null,8,Yn),e.createElementVNode("div",eo,[v[1]||(v[1]=e.createElementVNode("span",{class:"qy-remark-image__popover-tip"},"再次点击按钮可更换图片",-1)),e.createVNode(e.unref(Q.ElButton),{link:"",size:"small",type:"danger",disabled:t.disabled,onClick:M},{default:e.withCtx(()=>[...v[0]||(v[0]=[e.createTextVNode(" 删除图片 ",-1)])]),_:1},8,["disabled"])])])]),_:1},8,["disabled"])])],6))}}),no=te._export_sfc(to,[["__scopeId","data-v-3158c066"]]),oo=e.defineComponent({name:"QyRemoteSelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,Array,null],default:void 0},fetchMethod:{},defaultOptions:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},placeholder:{default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},autoSelectSingle:{type:Boolean,default:!1},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},fitInputWidth:{type:Boolean,default:!0},popperClass:{default:""},debounce:{default:300},minLength:{default:1},remoteOnFocus:{type:Boolean,default:!1},remoteShowSuffix:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},reserveSelectedOption:{type:Boolean,default:!0},allowCreate:{type:Boolean,default:!1},commitOnBlur:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","visible-change","focus","blur","options-change","loading-change","error"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref([]),y=e.ref(new Map),I=e.ref(!1),w=e.ref(""),T=e.ref("");let q=0,C=null;const A=e.computed(()=>n.loading||I.value),N=e.ref(!1),k=e.computed(()=>w.value!==""),$=e.computed(()=>{if(k.value)return m.value;const s=new Map,P=a=>{s.set(M(a),a)};return n.defaultOptions.forEach(P),n.reserveSelectedOption&&y.value.forEach(a=>P(a)),m.value.forEach(P),Array.from(s.values())});e.watch(()=>n.defaultOptions,s=>{s.forEach(D)},{immediate:!0}),e.watch(()=>n.modelValue,()=>{$.value.forEach(D)},{immediate:!0});function M(s){return(s==null?void 0:s[n.valueKey])??(s==null?void 0:s.value)??(s==null?void 0:s.label)}function G(s){return Array.isArray(n.modelValue)?n.modelValue.includes(s):n.modelValue===s}function D(s){if(!n.reserveSelectedOption)return;const P=M(s);G(P)&&y.value.set(P,s)}function z(s){return n.disabled?!1:s?s.length>=n.minLength:n.remoteOnFocus}function F(s){I.value!==s&&(I.value=s,c("loading-change",s))}async function L(s){const P=W(s),a=++q;if(Z(P),!z(P)){m.value=[],F(!1),c("options-change",$.value);return}F(!0);try{const p=await n.fetchMethod(P);if(a!==q)return;m.value=Array.isArray(p)?p:[],m.value.forEach(D),c("options-change",$.value)}catch(p){if(a!==q)return;m.value=[],c("error",p),c("options-change",$.value)}finally{a===q&&F(!1)}}function O(){N.value||(N.value=!0,L(""))}function g(s){const P=W(s);T.value=P,q+=1,Z(P),C&&(clearTimeout(C),C=null),C=setTimeout(()=>{L(P)},n.debounce)}function v(){N.value=!0,L("")}function o(){L(w.value)}function u(s){T.value="",c("update:modelValue",s)}function E(s){T.value="",$.value.forEach(D),c("change",s)}function K(){T.value="",c("clear")}function r(s){s&&n.remoteOnFocus&&!w.value&&O(),c("visible-change",s)}function f(s){n.remoteOnFocus&&!w.value&&O(),c("focus",s)}function _(s){x(),c("blur",s)}function x(){if(!n.allowCreate||!n.commitOnBlur||n.disabled)return;const s=T.value;s.trim()&&(T.value="",c("update:modelValue",s),c("change",s))}function W(s){return String(s??"")}function Z(s){w.value=s,m.value=[],c("options-change",$.value)}function X(){var s,P;(P=(s=b.value)==null?void 0:s.focus)==null||P.call(s)}function ee(){var s,P;(P=(s=b.value)==null?void 0:s.blur)==null||P.call(s)}function oe(){c("update:modelValue",n.multiple?[]:""),c("clear")}return e.onBeforeUnmount(()=>{C&&clearTimeout(C)}),V({focus:X,blur:ee,clear:oe,retryFetch:o,fetchDefaultOptions:v}),(s,P)=>(e.openBlock(),e.createBlock(ye.Select,e.mergeProps({ref_key:"selectRef",ref:b},e.unref(j),{"model-value":t.modelValue,options:$.value,"label-key":t.labelKey,"value-key":t.valueKey,"disabled-key":t.disabledKey,placeholder:t.placeholder,disabled:t.disabled,clearable:t.clearable,filterable:!0,multiple:t.multiple,"collapse-tags":t.collapseTags,"collapse-tags-tooltip":t.collapseTagsTooltip,"auto-select-single":t.autoSelectSingle,size:t.size,teleported:t.teleported,"append-to":t.appendTo,"fit-input-width":t.fitInputWidth,"popper-class":t.popperClass,remote:"",debounce:0,"remote-show-suffix":t.remoteShowSuffix,"remote-method":g,loading:A.value,"onUpdate:modelValue":u,onChange:E,onClear:K,onVisibleChange:r,onFocus:f,onBlur:_}),e.createSlots({default:e.withCtx(()=>[s.$slots.default?e.renderSlot(s.$slots,"default",{},void 0,void 0,0):e.createCommentVNode("",!0)]),_:2},[s.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"prefix")]),key:"0"}:void 0,s.$slots.empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"empty")]),key:"1"}:void 0,s.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"loading")]),key:"2"}:void 0,s.$slots.tag?{name:"tag",fn:e.withCtx(a=>[e.renderSlot(s.$slots,"tag",e.normalizeProps(e.guardReactiveProps(a)))]),key:"3"}:void 0]),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"]))}}),ao={class:"qy-search-input__item"},lo=["innerHTML"],ro={key:0,class:"qy-search-input__item-description"},io=e.defineComponent({name:"QySearchInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入搜索内容"},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"},clearable:{type:Boolean,default:!0},showButton:{type:Boolean,default:!0},buttonText:{default:"搜索"},buttonProps:{default:()=>({})},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},triggerOnFocus:{type:Boolean,default:!1},searchOnEnter:{type:Boolean,default:!0},searchOnSelect:{type:Boolean,default:!1},highlightKeyword:{type:Boolean,default:!0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},fitInputWidth:{type:Boolean,default:!0}},emits:["update:modelValue","search","clear","input","change","focus","blur","enter","select","visible-change","suggestions-change","error"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(q(n.modelValue)),y=e.computed(()=>q(n.modelValue)),I=e.computed(()=>["qy-search-input__popper",n.popperClass].filter(Boolean).join(" ")),w=e.computed(()=>q(n.modelValue)),T=e.ref("");e.watch(()=>n.modelValue,a=>{m.value=q(a)});function q(a){return a==null?"":String(a)}function C(a){return n.removeSpace?a.replace(/\s+/g,""):a}function A(a,p){return n.trimMode!==p?a:a.trim()}function N(a){return C(q(a))}function k(a){m.value=a,c("update:modelValue",a)}function $(a,p=""){return{...a,label:a.label||a.value,value:a.value||a.label,description:a.description||p}}function M(a=[]){return a.flatMap(p=>{if(Array.isArray(p.items)){const B=p;return B.items.map(H=>$(H,B.groupLabel))}return $(p)})}function G(a){const p=a.toLowerCase();return B=>[B.label,B.value,B.description].filter(Boolean).some(H=>String(H).toLowerCase().includes(p))}function D(a){return a?a.length>=n.minLength:n.triggerOnFocus}function z(a){c("suggestions-change",a),c("visible-change",a.length>0)}async function F(a){if(!D(a))return z([]),[];if(n.fetchSuggestionsMethod){const H=await new Promise(Y=>{var U;(U=n.fetchSuggestionsMethod)==null||U.call(n,a,le=>{Y(M(le))})});return z(H),H}if(n.fetchSuggestions){const H=await n.fetchSuggestions(a),Y=M(Array.isArray(H)?H:[]);return z(Y),Y}const p=M(n.suggestions),B=a?p.filter(G(a)):p;return z(B),B}async function L(a,p){T.value=a;try{const B=await F(a);p(B)}catch(B){c("error",B),z([]),p([])}}function O(){var a,p;T.value&&((p=(a=b.value)==null?void 0:a.getData)==null||p.call(a,T.value))}function g(a){const p=N(a);k(p)}function v(a){const p=N(a);m.value=p,c("input",p)}function o(a){const p=A(N(a),"change");p!==q(n.modelValue)&&k(p),c("change",p)}function u(a){c("focus",a)}function E(a){const p=A(m.value,"blur");p!==q(n.modelValue)&&k(p),c("blur",a),c("visible-change",!1)}function K(){m.value="",c("update:modelValue",""),c("clear"),z([])}function r(a){c("enter",a),n.searchOnEnter&&f()}function f(){c("search",q(n.modelValue))}function _(a){c("select",a),n.searchOnSelect&&c("search",a.value)}function x(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function W(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(a){const p=x(a||"");if(!n.highlightKeyword||!y.value)return p;const B=W(x(y.value));return B?p.replace(new RegExp(`(${B})`,"ig"),'<mark class="qy-search-input__mark">$1</mark>'):p}function X(){var a,p;(p=(a=b.value)==null?void 0:a.focus)==null||p.call(a)}function ee(){var a,p;(p=(a=b.value)==null?void 0:a.blur)==null||p.call(a)}function oe(){var a,p,B;(B=(p=(a=b.value)==null?void 0:a.inputRef)==null?void 0:p.select)==null||B.call(p)}function s(){var a,p;(p=(a=b.value)==null?void 0:a.clear)==null||p.call(a)}function P(){var a,p;(p=(a=b.value)==null?void 0:a.close)==null||p.call(a)}return V({focus:X,blur:ee,select:oe,clear:s,closePanel:P,retryFetch:O}),(a,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-search-input",{"is-disabled":t.disabled}])},[e.createVNode(e.unref(Q.ElAutocomplete),e.mergeProps({ref_key:"autocompleteRef",ref:b},e.unref(j),{"model-value":w.value,disabled:t.disabled,placeholder:t.placeholder,clearable:t.clearable,debounce:t.debounce,"fetch-suggestions":L,"trigger-on-focus":t.triggerOnFocus,teleported:t.teleported,"fit-input-width":t.fitInputWidth,"popper-class":I.value,"append-to":t.appendTo,"value-key":"value","onUpdate:modelValue":g,onInput:v,onChange:o,onFocus:u,onBlur:E,onClear:K,onSelect:_,onKeydown:e.withKeys(r,["enter"])}),e.createSlots({default:e.withCtx(({item:B})=>[e.renderSlot(a.$slots,"item",{item:B,keyword:y.value},()=>[e.createElementVNode("div",ao,[e.createElementVNode("div",{class:"qy-search-input__item-label",innerHTML:Z(B.label||B.value||"")},null,8,lo),B.description?(e.openBlock(),e.createElementBlock("div",ro,e.toDisplayString(B.description),1)):e.createCommentVNode("",!0)])],!0)]),_:2},[a.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,a.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,a.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"prepend",{},void 0,!0)]),key:"2"}:void 0,a.$slots.append||t.showButton?{name:"append",fn:e.withCtx(()=>[a.$slots.append?e.renderSlot(a.$slots,"append",{},void 0,!0,0):(e.openBlock(),e.createBlock(e.unref(Q.ElButton),e.mergeProps({key:1},t.buttonProps,{loading:t.loading,disabled:t.disabled,onClick:f}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},16,["loading","disabled"]))]),key:"3"}:void 0]),1040,["model-value","disabled","placeholder","clearable","debounce","trigger-on-focus","teleported","fit-input-width","popper-class","append-to"])],2))}}),Pt=te._export_sfc(io,[["__scopeId","data-v-cd7f5dfc"]]),co={class:"qy-record-quote-search"},so={key:0,class:"qy-record-quote-search__header"},uo={key:0,class:"qy-record-quote-search__label"},yo={key:1,class:"qy-record-quote-search__description"},fo=e.defineComponent({name:"QyRecordQuoteSearch",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入报价单号"},buttonText:{default:"查询报价单"},autoNormalize:{type:Boolean,default:!0},showStatus:{type:Boolean,default:!0},status:{default:"default"},statusText:{default:""},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},searchOnSelect:{type:Boolean,default:!0},searchMethod:{type:[Function,null],default:null},extractMethod:{type:[Function,null],default:null},normalizeMethod:{type:[Function,null],default:null},label:{default:"报价单号"},description:{default:""},trimMode:{default:"blur"}},emits:["update:modelValue","search","clear","normalize","enter","select","error","success"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.ref(!1),y=e.computed(()=>n.statusText||""),I=e.computed(()=>n.loading||m.value);function w(o){return o==null?"":String(o)}function T(o){const u=w(o).trim(),E=q(u),K=E.match(/BJ\d{8}[A-Z0-9]{4}/i);return K?K[0]:E}function q(o){return w(o).replace(/\s+/g,"").trim().toUpperCase()}function C(o){return n.extractMethod?n.extractMethod(o):T(o)}function A(o){return n.normalizeMethod?n.normalizeMethod(o):q(o)}function N(o,u){const E=w(o),K=C(E),r=n.autoNormalize?A(K):K;return c("normalize",{rawValue:E,code:r}),{rawValue:E,code:r,item:u}}function k(o){c("update:modelValue",o)}async function $(o){if(c("search",o),!!n.searchMethod){m.value=!0;try{const u=await n.searchMethod(o);c("success",u)}catch(u){c("error",u)}finally{m.value=!1}}}function M(o){const u=N(o);u.code!==w(n.modelValue)&&c("update:modelValue",u.code),$(u)}function G(){c("clear")}function D(o){c("enter",o)}function z(o){if(c("select",o),!n.searchOnSelect)return;const u=N(o.value,o);u.code!==w(n.modelValue)&&c("update:modelValue",u.code),$(u)}function F(o){c("error",o)}function L(){var o,u;(u=(o=b.value)==null?void 0:o.focus)==null||u.call(o)}function O(){var o,u;(u=(o=b.value)==null?void 0:o.blur)==null||u.call(o)}function g(){var o,u;(u=(o=b.value)==null?void 0:o.select)==null||u.call(o)}function v(){var o,u;(u=(o=b.value)==null?void 0:o.clear)==null||u.call(o)}return V({focus:L,blur:O,select:g,clear:v,extractQuoteOrderCode:C,normalizeQuoteOrderCode:A}),(o,u)=>(e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(o.$slots,"label",{},()=>[t.label||t.description?(e.openBlock(),e.createElementBlock("div",so,[t.label?(e.openBlock(),e.createElementBlock("div",uo,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",yo,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0),e.createVNode(Pt,e.mergeProps({ref_key:"searchRef",ref:b},e.unref(j),{"model-value":t.modelValue,loading:I.value,disabled:t.disabled,placeholder:t.placeholder,"remove-space":!0,"trim-mode":t.trimMode,"button-text":t.buttonText,suggestions:t.suggestions,"fetch-suggestions":t.fetchSuggestions,"fetch-suggestions-method":t.fetchSuggestionsMethod,debounce:t.debounce,"min-length":t.minLength,"search-on-select":!1,"onUpdate:modelValue":k,onSearch:M,onClear:G,onEnter:D,onSelect:z,onError:F}),e.createSlots({_:2},[o.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,o.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,o.$slots.item?{name:"item",fn:e.withCtx(E=>[e.renderSlot(o.$slots,"item",e.normalizeProps(e.guardReactiveProps(E)),void 0,!0)]),key:"2"}:void 0,o.$slots.empty?{name:"empty",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"empty",{},void 0,!0)]),key:"3"}:void 0,o.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"loading",{},void 0,!0)]),key:"4"}:void 0]),1040,["model-value","loading","disabled","placeholder","trim-mode","button-text","suggestions","fetch-suggestions","fetch-suggestions-method","debounce","min-length"]),t.showStatus&&y.value?e.renderSlot(o.$slots,"status",{status:t.status,statusText:y.value},()=>[e.createElementVNode("div",{class:e.normalizeClass(["qy-record-quote-search__status",`is-${t.status}`])},e.toDisplayString(y.value),3)],!0,0):e.createCommentVNode("",!0)]))}}),mo=te._export_sfc(fo,[["__scopeId","data-v-3a314f64"]]),po={class:"qy-selection-dialog"},go={class:"qy-selection-dialog__main"},ho={key:0,class:"qy-selection-dialog__selected"},vo={class:"qy-selection-dialog__selected-tags"},wo={key:0,class:"qy-selection-dialog__selected-actions"},Qo={key:1,class:"qy-selection-dialog__search-row"},_o={key:0,class:"qy-selection-dialog__toolbar"},bo={key:2,class:"qy-selection-dialog__pagination"},ko={class:"qy-selection-dialog__paste-actions"},So=e.defineComponent({name:"QySelectionDialog",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},open:{type:Boolean,default:!0},title:{default:"选择数据"},width:{default:"1200px"},fetchMethod:{type:Function,default:void 0},query:{type:Function,default:void 0},responseFormatter:{type:Function,default:void 0},selectionMode:{default:void 0},selection:{default:"single"},selected:{default:()=>[]},rowKey:{default:"id"},mainKey:{default:void 0},labelKey:{default:"name"},tagName:{default:void 0},searchKey:{default:"conditions"},queryParams:{default:()=>({})},category:{type:[Array,Function,Boolean],default:!1},categoryFormatter:{type:[Function,Array],default:void 0},categoryOptions:{default:()=>[]},categoryFetchMethod:{type:[Function,null],default:null},type:{type:[Array,Boolean],default:!1},typeOptions:{default:()=>[]},typeSelectionProps:{default:()=>({})},typeSelectProps:{default:()=>({})},tableProps:{default:()=>({})},showSelected:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},showCopyPaste:{type:Boolean,default:!1},append:{type:Boolean,default:!1},showAppend:{type:Boolean,default:!1},pageSizes:{default:()=>[10,20,50,100]}},emits:["update:modelValue","selection-change","confirm","submit","cancel","close","append","loaded"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.useSlots(),m=e.getCurrentInstance(),y=e.ref(null),I=e.ref([]),w=e.ref([]),T=e.ref([]),q=e.ref(!1),C=e.ref(0),A=e.ref(!1),N=e.ref(""),k=e.reactive({category:[],type:"",page:1,pageSize:10,...n.searchKey?{[n.searchKey]:""}:{},...n.queryParams}),$=e.computed(()=>n.selectionMode?n.selectionMode:n.selection==="multi"?"multiple":n.selection),M=e.computed(()=>n.mainKey||n.rowKey),G=e.computed(()=>n.tagName||n.labelKey),D=e.computed(()=>n.typeOptions.length?n.typeOptions:n.type||[]),z=e.computed(()=>({...n.typeSelectionProps,...n.typeSelectProps})),F=e.computed(()=>n.tableProps||{}),L=e.computed(()=>n.showSearch||!!j["search-visible"]),O=e.computed(()=>n.showAppend||n.append),g=e.computed(()=>O.value||!!b.toolbar||!!b.bar),v=e.computed(()=>n.fetchMethod||n.query),o=e.computed(()=>u()?n.modelValue:n.selected);function u(){const l=(m==null?void 0:m.vnode.props)||{};return Object.prototype.hasOwnProperty.call(l,"modelValue")||Object.prototype.hasOwnProperty.call(l,"model-value")||Object.prototype.hasOwnProperty.call(l,"onUpdate:modelValue")}e.watch([()=>n.modelValue,()=>n.selected,()=>n.open],()=>{n.open&&(w.value=ne(o.value),B())},{immediate:!0,deep:!0}),e.watch([()=>n.categoryOptions,()=>n.category],l=>{if(Array.isArray(n.category)&&n.category.length){T.value=n.category;return}T.value=n.categoryOptions||[]},{immediate:!0}),e.watch(A,l=>{l||(N.value="")});async function E(){w.value=ne(o.value),await K(),await r(),B()}async function K(){const l=n.categoryFetchMethod||(typeof n.category=="function"?n.category:null);if(!l)return;const i=await l();T.value=X(i)}async function r(){if(v.value){q.value=!0;try{const l=await v.value(oe()),i=n.responseFormatter?await n.responseFormatter(l):l,{rows:S,total:h}=Z(i);return I.value=S,C.value=h,c("loaded",S),B(),i}finally{q.value=!1}}}function f(){return k.page=1,r()}function _(){return k.page=1,r()}function x(){return Object.assign(k,{category:[],type:"",page:1,pageSize:k.pageSize,...n.searchKey?{[n.searchKey]:""}:{},...n.queryParams}),r()}function W(){c("append")}function Z(l){if(Array.isArray(l))return{rows:l,total:l.length};const i=l==null?void 0:l.data;if(Array.isArray(i))return{rows:i,total:(l==null?void 0:l.total)??i.length};const S=(l==null?void 0:l.records)||(l==null?void 0:l.rows)||(i==null?void 0:i.records)||[],h=(l==null?void 0:l.total)??(i==null?void 0:i.total)??S.length;return{rows:S,total:h}}function X(l){const i=(l==null?void 0:l.data)??l;if(!Array.isArray(i))return[];if(typeof n.categoryFormatter=="function")return n.categoryFormatter(i);if(Array.isArray(n.categoryFormatter)){const[S,h]=n.categoryFormatter;return i.map(J=>({...J,label:J[S],value:J[h],children:Array.isArray(J.children)?ee(J.children,S,h):J.children}))}return i}function ee(l,i,S){return l.map(h=>({...h,label:h[i],value:h[S],children:Array.isArray(h.children)?ee(h.children,i,S):h.children}))}function oe(){const l={...n.queryParams,...k};return n.searchKey&&(l[n.searchKey]=String(l[n.searchKey]||"").trim()),l.category=s(),l}function s(){if(Object.prototype.hasOwnProperty.call(n.queryParams,"category"))return n.queryParams.category;const l=k.category;return Array.isArray(l)?l:l?[l]:[]}function P(l){var i,S;if($.value!=="none"){if($.value==="single"){w.value=[l],(i=y.value)==null||i.setCurrentRow(l),ae();return}H(l)&&((S=y.value)==null||S.toggleRowSelection(l,!Y(l)))}}function a(l){if($.value!=="multiple")return;const i=new Set(I.value.map(U)),S=new Set(l.map(U));w.value=w.value.filter(h=>!i.has(U(h))||S.has(U(h))),l.forEach(h=>{Y(h)||w.value.push(h)}),ae()}function p(l){var S,h;w.value=w.value.filter(J=>U(J)!==U(l));const i=I.value.find(J=>U(J)===U(l));i&&($.value==="multiple"?(S=y.value)==null||S.toggleRowSelection(i,!1):(h=y.value)==null||h.setCurrentRow()),ae()}function B(){e.nextTick(()=>{var l;if(y.value){if($.value==="single"){const[i]=w.value,S=I.value.find(h=>i&&U(h)===U(i));(l=y.value)==null||l.setCurrentRow(S);return}$.value==="multiple"&&I.value.forEach(i=>{var S;(S=y.value)==null||S.toggleRowSelection(i,Y(i))})}})}function H(l){var S;const i=(S=F.value)==null?void 0:S.selectable;return typeof i=="function"?i(l)!==!1:!0}function Y(l){return w.value.some(i=>U(i)===U(l))}function U(l){return It(l,M.value)}function le(l){return It(l,G.value)??U(l)}function It(l,i){if(!(!l||!i))return i.split(".").reduce((S,h)=>S==null?void 0:S[h],l)}function ae(){const l=ne(w.value);c("selection-change",l)}function At(){const l=ne(w.value);c("update:modelValue",l),c("confirm",l),c("submit",{selection:l,rows:l,query:{...k}})}function Nt(){w.value=ne(o.value),c("cancel"),c("close")}async function Ft(){var i;const l=JSON.stringify(w.value);await((i=navigator.clipboard)==null?void 0:i.writeText(l)),Q.ElMessage.success("复制成功")}function Rt(){try{const l=JSON.parse(N.value);if(!Array.isArray(l)){Q.ElMessage.error("粘贴内容需要是数组");return}l.forEach(i=>{Y(i)||w.value.push(i)}),A.value=!1,ae(),B()}catch(l){Q.ElMessage.error(`粘贴错误: ${(l==null?void 0:l.message)||"内容格式错误"}`)}}function ne(l=[]){return l.map(i=>({...i}))}return V({search:f,handleSearch:r,handleQuerySearch:f,resetSearch:x,getTableRef:()=>y.value,getTableData:()=>I.value,getSelection:()=>ne(w.value)}),(l,i)=>{const S=tn.ElLoadingDirective;return e.openBlock(),e.createBlock(re._sfc_main,{open:t.open,title:t.title,width:t.width,onOpened:E,onConfirm:At,onCancel:Nt},{default:e.withCtx(()=>[e.createElementVNode("div",po,[e.renderSlot(l.$slots,"side",{},void 0,!0),e.createElementVNode("div",go,[t.showSelected?(e.openBlock(),e.createElementBlock("div",ho,[i[12]||(i[12]=e.createElementVNode("span",{class:"qy-selection-dialog__selected-label"},"已选项",-1)),e.createElementVNode("div",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,h=>(e.openBlock(),e.createBlock(ie.Tag,{key:U(h),closable:"",class:"qy-selection-dialog__selected-tag",onClose:J=>p(h)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(le(h)),1)]),_:2},1032,["onClose"]))),128)),w.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.Tag,{key:0,tone:"info"},{default:e.withCtx(()=>[...i[9]||(i[9]=[e.createTextVNode("无",-1)])]),_:1}))]),t.showCopyPaste?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(e.unref(Q.ElButton),{size:"small",onClick:Ft},{default:e.withCtx(()=>[...i[10]||(i[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{size:"small",onClick:i[0]||(i[0]=h=>A.value=!0)},{default:e.withCtx(()=>[...i[11]||(i[11]=[e.createTextVNode("粘贴",-1)])]),_:1})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",Qo,[e.createVNode(e.unref(Q.ElForm),{class:"qy-selection-dialog__search",inline:"",model:k},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"search",{query:k,search:f,reset:x},()=>[T.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:0,label:"分类"},{default:e.withCtx(()=>[e.createVNode(qt.TreeSelect,{modelValue:k.category,"onUpdate:modelValue":i[1]||(i[1]=h=>k.category=h),class:"qy-selection-dialog__category",options:T.value,clearable:"",filterable:"","check-strictly":"","render-after-expand":!1,onChange:f},null,8,["modelValue","options"])]),_:1})):e.createCommentVNode("",!0),D.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:1,label:"类型"},{default:e.withCtx(()=>[e.createVNode(ye.Select,e.mergeProps({modelValue:k.type,"onUpdate:modelValue":i[2]||(i[2]=h=>k.type=h),class:"qy-selection-dialog__type",options:D.value,placeholder:"请选择类型",clearable:""},z.value,{onChange:f}),null,16,["modelValue","options"])]),_:1})):e.createCommentVNode("",!0),t.searchKey?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:2,label:"搜索"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:k[t.searchKey],"onUpdate:modelValue":i[3]||(i[3]=h=>k[t.searchKey]=h),clearable:"",placeholder:"请输入",class:"qy-selection-dialog__search-input",onKeydown:e.withKeys(e.withModifiers(f,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:f},{default:e.withCtx(()=>[...i[13]||(i[13]=[e.createTextVNode("查询",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{onClick:x},{default:e.withCtx(()=>[...i[14]||(i[14]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})],!0)]),_:3},8,["model"]),g.value?(e.openBlock(),e.createElementBlock("div",_o,[O.value?(e.openBlock(),e.createBlock(e.unref(Q.ElButton),{key:0,type:"primary",onClick:W},{default:e.withCtx(()=>[...i[15]||(i[15]=[e.createTextVNode(" 新增 ",-1)])]),_:1})):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"toolbar",{query:k,search:f},void 0,!0),e.renderSlot(l.$slots,"bar",{query:k,search:f},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(Q.ElTable),e.mergeProps({ref_key:"tableRef",ref:y,data:I.value,"row-key":M.value,border:"","highlight-current-row":"","max-height":"550px"},F.value,{onSelectionChange:a,onRowClick:P}),{default:e.withCtx(()=>{var h;return[$.value==="multiple"?(e.openBlock(),e.createBlock(e.unref(Q.ElTableColumn),{key:0,type:"selection","reserve-selection":"",width:"42",selectable:(h=F.value)==null?void 0:h.selectable},null,8,["selectable"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"columns",{},void 0,!0),e.renderSlot(l.$slots,"cols",{},void 0,!0)]}),_:3},16,["data","row-key"])),[[S,q.value]]),t.showPagination&&C.value>0?(e.openBlock(),e.createElementBlock("div",bo,[e.createVNode(e.unref(Q.ElPagination),{"current-page":k.page,"onUpdate:currentPage":i[4]||(i[4]=h=>k.page=h),"page-size":k.pageSize,"onUpdate:pageSize":i[5]||(i[5]=h=>k.pageSize=h),total:C.value,"page-sizes":t.pageSizes,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:_,onCurrentChange:r},null,8,["current-page","page-size","total","page-sizes"])])):e.createCommentVNode("",!0)])]),e.createVNode(re._sfc_main,{open:A.value,title:"粘贴数据","show-footer":!1,width:"560px","onUpdate:open":i[8]||(i[8]=h=>A.value=h)},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:N.value,"onUpdate:modelValue":i[6]||(i[6]=h=>N.value=h),type:"textarea",rows:8},null,8,["modelValue"]),e.createElementVNode("div",ko,[e.createVNode(e.unref(Q.ElButton),{onClick:i[7]||(i[7]=h=>A.value=!1)},{default:e.withCtx(()=>[...i[16]||(i[16]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:Rt},{default:e.withCtx(()=>[...i[17]||(i[17]=[e.createTextVNode("确认",-1)])]),_:1})])]),_:1},8,["open"])]),_:3},8,["open","title","width"])}}}),Tt=te._export_sfc(So,[["__scopeId","data-v-cf39627e"]]),Co=e.defineComponent({name:"QyLegacySelectionDialog",inheritAttrs:!1,__name:"index",props:{open:{type:Boolean,default:!0},title:{default:"选择数据"},width:{default:"1200px"},query:{type:Function,default:void 0},responseFormatter:{type:Function,default:void 0},selection:{default:"single"},selected:{default:()=>[]},mainKey:{default:""},tagName:{default:""},searchKey:{default:"conditions"},queryParams:{default:()=>({})},category:{type:[Array,Function,Boolean],default:!1},categoryFormatter:{type:[Function,Array],default:void 0},type:{type:[Array,Boolean],default:!1},typeSelectionProps:{default:()=>({})},tableProps:{default:()=>({})},append:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},select:{default:null}},emits:["close","submit","openDialog","changeIndexShow"],setup(t,{expose:V,emit:R}){const n=t,c=R,j=e.useAttrs(),b=e.ref(null),m=e.reactive({category:[],code:"",...n.searchKey?{[n.searchKey]:""}:{},page:1,pageSize:10,type:"",...n.queryParams}),y=e.reactive({total:0,tableData:[],open:!1,selection:[],categories:[],types:[],tableRef:null,drag:!1,dialogOpen:!1,pasteData:"",pasteDataDialog:!1}),I=e.computed(()=>n.type||[]),w=e.computed(()=>y.categories),T=async r=>{if(!n.query)return{data:{records:[],total:0}};const f=await n.query(z(r)),_=n.responseFormatter?await n.responseFormatter(f):f;return y.total=E(_),_};e.watch(()=>n.open,r=>{y.open=r},{immediate:!0}),e.watch(I,r=>{y.types=[...r]},{immediate:!0,deep:!0}),e.watch([()=>n.selected,()=>n.open],()=>{n.open&&(y.selection=K(n.selected))},{immediate:!0,deep:!0}),e.watch(()=>n.queryParams,()=>{Object.assign(m,n.queryParams)},{deep:!0}),e.watch(()=>y.pasteDataDialog,r=>{r||(y.pasteData="")}),e.watch(()=>n.select,async()=>{n.select&&await D(n.select)},{deep:!0}),e.watch(()=>n.open,async r=>{r&&(y.dialogOpen=!1,await q())},{immediate:!0});async function q(){if(!n.category){y.categories=[];return}const r=typeof n.category=="function"?await n.category():n.category;y.categories=g(r)}async function C(){var r;return await e.nextTick(),(r=b.value)==null?void 0:r.handleQuerySearch()}function A(r){y.selection=K(r)}function N(r){var f;y.tableData=r,y.tableRef=(f=b.value)==null?void 0:f.getTableRef()}function k(r){y.selection=K(r),c("submit",y)}function $(){c("close")}function M(){y.dialogOpen=!0,c("openDialog")}function G(r){c("changeIndexShow",r)}async function D(r){if(!n.query||!n.searchKey||!n.mainKey)return;const f=await n.query({...m,[n.searchKey]:r[n.mainKey],category:[]}),_=n.responseFormatter?await n.responseFormatter(f):f,[x]=u(_);x&&(n.selection==="multi"?(y.selection=y.selection.filter(W=>W[n.mainKey]!==x[n.mainKey]),y.selection.push(x)):y.selection=[x])}function z(r={}){m.page=r.page??m.page,m.pageSize=r.pageSize??m.pageSize;const f={...m,category:F()};return n.searchKey&&(f[n.searchKey]=String(f[n.searchKey]||"").trim()),f}function F(){if(n.queryParams.category)return n.queryParams.category;const r=m.category;if(Array.isArray(r))return r;if(!r)return[];const f=L(y.categories,r);return f?O(f):[r]}function L(r,f){for(const _ of r||[]){if(_.value===f)return _;const x=L(_.children||[],f);if(x)return x}}function O(r){return[r.value,...(r.children||[]).flatMap(O)]}function g(r){const f=(r==null?void 0:r.data)??r;if(!Array.isArray(f))return[];if(typeof n.categoryFormatter=="function")return n.categoryFormatter(f);if(Array.isArray(n.categoryFormatter)){const[_,x]=n.categoryFormatter;return o(v(f,x),_,x)}return f}function v(r,f){const _=r.map(W=>({...W})),x=[];return _.forEach(W=>{const Z=W.parentCateCode;if(!Z){x.push(W);return}const X=_.find(ee=>ee[f]===Z);X?(X.children||(X.children=[])).push(W):x.push(W)}),x}function o(r,f,_){return r.map(x=>({...x,label:x[f],value:x[_],children:Array.isArray(x.children)?o(x.children,f,_):x.children}))}function u(r){if(Array.isArray(r))return r;const f=r==null?void 0:r.data;return Array.isArray(f)?f:(r==null?void 0:r.records)||(r==null?void 0:r.rows)||(f==null?void 0:f.records)||[]}function E(r){if(Array.isArray(r))return r.length;const f=u(r),_=r==null?void 0:r.data;return(r==null?void 0:r.total)??(Array.isArray(_)?_.length:_==null?void 0:_.total)??f.length}function K(r=[]){return r.map(f=>({...f}))}return V({search:C,handleSearch:C,handleConditionChange:C,getTableRef:()=>y.tableRef,getTableData:()=>y.tableData,getSelection:()=>K(y.selection)}),(r,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Tt,e.mergeProps({ref_key:"selectionDialogRef",ref:b},e.unref(j),{modelValue:y.selection,"onUpdate:modelValue":f[3]||(f[3]=_=>y.selection=_),open:t.open,title:t.title,width:t.width,query:T,"response-formatter":t.responseFormatter,selection:t.selection,"row-key":t.mainKey,"label-key":t.tagName,"search-key":t.searchKey,"query-params":{},"category-options":w.value,"type-options":I.value,"type-select-props":t.typeSelectionProps,"table-props":t.tableProps,"show-copy-paste":!0,"show-append":t.append,onSelectionChange:A,onConfirm:k,onCancel:$,onAppend:M,onLoaded:N}),{side:e.withCtx(()=>[e.renderSlot(r.$slots,"side",{state:y,cate:y.categories,form:m,query:m,getData:C,search:C,changeIndexShow:G},void 0,!0)]),search:e.withCtx(()=>[e.createVNode(e.unref(Q.ElForm),{inline:"",model:m},{default:e.withCtx(()=>[y.categories.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:0,label:"分类"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElTreeSelect),{modelValue:m.category,"onUpdate:modelValue":f[0]||(f[0]=_=>m.category=_),class:"qy-legacy-selection-dialog__category",data:y.categories,clearable:"",filterable:"","check-strictly":"","render-after-expand":!1,onChange:C},null,8,["modelValue","data"])]),_:1})):e.createCommentVNode("",!0),I.value.length?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:1,label:"类型"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElSelect),e.mergeProps({modelValue:m.type,"onUpdate:modelValue":f[1]||(f[1]=_=>m.type=_),clearable:""},t.typeSelectionProps,{onChange:C}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,_=>(e.openBlock(),e.createBlock(e.unref(Q.ElOption),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])]),_:1})):e.createCommentVNode("",!0),t.searchKey?(e.openBlock(),e.createBlock(e.unref(Q.ElFormItem),{key:2,label:"搜索"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElInput),{modelValue:m[t.searchKey],"onUpdate:modelValue":f[2]||(f[2]=_=>m[t.searchKey]=_),clearable:"",class:"qy-legacy-selection-dialog__search-input",onKeydown:e.withKeys(e.withModifiers(C,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElButton),{type:"primary",onClick:C},{default:e.withCtx(()=>[...f[4]||(f[4]=[e.createTextVNode("查询",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),toolbar:e.withCtx(()=>[e.renderSlot(r.$slots,"bar",{query:m,search:C},void 0,!0)]),columns:e.withCtx(()=>[e.renderSlot(r.$slots,"cols",{},void 0,!0),e.renderSlot(r.$slots,"columns",{},void 0,!0)]),_:3},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"]),e.renderSlot(r.$slots,"dialog",{state:y,form:m,getData:C},void 0,!0)],64))}}),xo=te._export_sfc(Co,[["__scopeId","data-v-b54ca11b"]]),Bo={class:"qy-form-section__heading"},Vo={key:0,class:"qy-form-section__title"},Io={key:0,class:"qy-form-section__description"},qo={class:"qy-form-section__actions"},$o=e.defineComponent({name:"QyFormSection",__name:"index",props:{title:{default:""},description:{default:""},tip:{default:""},tipType:{default:"info"},collapsible:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!0},bordered:{type:Boolean,default:!0},background:{default:"white"},bodyClass:{default:""},headerClass:{default:""}},emits:["toggle"],setup(t,{emit:V}){const R=t,n=V,c=e.ref(R.defaultExpanded);e.watch(()=>R.defaultExpanded,m=>{c.value=m});function j(){R.collapsible&&(c.value=!c.value,n("toggle",c.value))}function b(){R.collapsible&&j()}return(m,y)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["qy-form-section",[`is-bg-${t.background}`,{"is-bordered":t.bordered,"is-collapsible":t.collapsible}]])},[e.createElementVNode("header",{class:e.normalizeClass(["qy-form-section__header",t.headerClass]),onClick:b},[e.createElementVNode("div",Bo,[e.renderSlot(m.$slots,"title",{},()=>[t.title?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],!0),e.renderSlot(m.$slots,"description",{},()=>[t.description?(e.openBlock(),e.createElementBlock("div",Io,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",qo,[e.renderSlot(m.$slots,"actions",{},void 0,!0),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qy-form-section__toggle",onClick:e.withModifiers(j,["stop"])},e.toDisplayString(c.value?"收起":"展开"),1)):e.createCommentVNode("",!0)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qy-form-section__body",t.bodyClass])},[e.renderSlot(m.$slots,"tip",{},()=>[t.tip?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qy-form-section__tip",`is-${t.tipType}`])},e.toDisplayString(t.tip),3)):e.createCommentVNode("",!0)],!0),e.renderSlot(m.$slots,"default",{},void 0,!0)],2),[[e.vShow,c.value]])],2))}}),Eo=te._export_sfc($o,[["__scopeId","data-v-8149aa01"]]),Po={key:0,class:"qy-action-bar__left"},To={key:1,class:"qy-action-bar__center"},Ao={key:2,class:"qy-action-bar__right"},No=e.defineComponent({name:"QyActionBar",__name:"index",props:{sticky:{type:Boolean,default:!0},offsetBottom:{default:0},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1},wrap:{type:Boolean,default:!0},justify:{default:"between"},background:{default:"#fff"}},setup(t){const V=t,R=e.computed(()=>({bottom:`${V.offsetBottom}px`,background:V.background}));return(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-action-bar",[`is-justify-${t.justify}`,{"is-sticky":t.sticky,"is-bordered":t.bordered,"is-shadow":t.shadow,"is-wrap":t.wrap}]]),style:e.normalizeStyle(R.value)},[n.$slots.left?(e.openBlock(),e.createElementBlock("div",Po,[e.renderSlot(n.$slots,"left",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",To,[e.renderSlot(n.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.right?(e.openBlock(),e.createElementBlock("div",Ao,[e.renderSlot(n.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),Fo=te._export_sfc(No,[["__scopeId","data-v-ecba8f49"]]),fe=d.withInstall(de.Upload,"QyUpload"),me=d.withInstall(Dt.Image,"QyImage"),pe=d.withInstall(zt._sfc_main,"QyImagePreview"),ge=d.withInstall(Un,"QyImageUpload"),he=d.withInstall(re._sfc_main,"QyDialog"),ve=d.withInstall(no,"QyRemarkImage"),we=d.withInstall(Ot.Button,"QyButton"),Qe=d.withInstall(Kt.Dropdown,"QyDropdown"),_e=d.withInstall(Mt._sfc_main,"QyInput"),be=d.withInstall(Lt._sfc_main,"QyInputTag"),ke=d.withInstall(Ut._sfc_main,"QyInputNumber"),Se=d.withInstall(jt._sfc_main,"QyMoneyInput"),Ce=d.withInstall(Wt._sfc_main,"QyDatePicker"),xe=d.withInstall(Gt.Checkbox,"QyCheckbox"),Be=d.withInstall(Ht._sfc_main,"QyCheckboxGroup"),Ve=d.withInstall(Jt.Radio,"QyRadio"),Ie=d.withInstall(Zt._sfc_main,"QyAutocomplete"),qe=d.withInstall(Xt.MenuActions,"QyMenuActions"),$e=d.withInstall(Yt.TableColumnSettings,"QyTableColumnSettings"),Ee=d.withInstall(en._sfc_main,"QyRadioGroup"),Pe=d.withInstall(oo,"QyRemoteSelect"),Te=d.withInstall(Pt,"QySearchInput"),Ae=d.withInstall(mo,"QyRecordQuoteSearch"),Ne=d.withInstall(ye.Select,"QySelect"),Fe=d.withInstall(qt.TreeSelect,"QyTreeSelect"),Re=d.withInstall(Tt,"QySelectionDialog"),De=d.withInstall(xo,"QyLegacySelectionDialog"),ze=d.withInstall(Eo,"QyFormSection"),Oe=d.withInstall(Fo,"QyActionBar"),Ke=d.withInstall(nn.FilePicker,"QyFilePicker"),Me=d.withInstall(on.Switch,"QySwitch"),Le=d.withInstall(ie.Tag,"QyTag"),Ue=d.withInstall(an._sfc_main,"QyBadge"),je=d.withInstall(ln._sfc_main,"QyCascader"),We=d.withInstall(rn._sfc_main,"QyTooltip"),Ge=d.withInstall(cn._sfc_main,"QyPopover"),He=d.withInstall(sn._sfc_main,"QyPopconfirm"),Je=d.withInstall(un._sfc_main,"QySkeleton"),Ze=d.withInstall(dn._sfc_main,"QySkeletonItem"),Xe=d.withInstall(yn._sfc_main,"QyTabs"),Ye=d.withInstall(fn._sfc_main,"QyTabPane"),et=d.withInstall(mn._sfc_main,"QySteps"),tt=d.withInstall(pn._sfc_main,"QyStep"),nt=d.withInstall(gn.Fullscreen,"QyFullscreen"),ot=d.withInstall(wn._sfc_main,"QyRow"),at=d.withInstall(Qn._sfc_main,"QyCol"),lt=d.withInstall(_n._sfc_main,"QyContainer"),rt=d.withInstall(bn._sfc_main,"QyAside"),it=d.withInstall(kn._sfc_main,"QyMain"),ct=d.withInstall(Sn._sfc_main,"QyDescriptions"),st=d.withInstall(Cn._sfc_main,"QyDescriptionsItem"),ut=d.withInstall(xn._sfc_main,"QyCollapse"),dt=d.withInstall(Bn._sfc_main,"QyCollapseItem"),yt=d.withInstall(Vn._sfc_main,"QyLink"),ft=d.withInstall(In.Iframe,"QyIframe"),mt=d.withInstall(qn._sfc_main,"QyDivider"),pt=d.withInstall($n._sfc_main,"QyEmpty"),gt=d.withInstall(En._sfc_main,"QyAlert"),ht=d.withInstall(Pn._sfc_main,"QyCard"),vt=d.withInstall(Tn._sfc_main,"QyResult"),wt=d.withInstall(An._sfc_main,"QyWatermark"),Qt=d.withInstall(Nn._sfc_main,"QyScrollbar"),_t=d.withInstall(Fn._sfc_main,"QyProgress"),bt=d.withInstall(Rn._sfc_main,"QyStatistic"),kt=d.withInstall(Dn._sfc_main,"QyAvatar"),St=d.withInstall(zn._sfc_main,"QyTree"),Ct=d.withInstall(On.Pagination,"QyPagination"),xt=d.withInstall(hn._sfc_main,"QyIconPicker"),Bt=d.withInstall(vn._sfc_main,"QyColorPicker"),Vt=d.withInstall(Kn._sfc_main,"QyDrawer"),Ro=t=>{ce.QyLoading.install(t),t.component("QyDialog",he),t.component("QyDrawer",Vt),t.component("QyUpload",fe),t.component("QyImage",me),t.component("QyImagePreview",pe),t.component("QyImageUpload",ge),t.component("QyRemarkImage",ve),t.component("QyButton",we),t.component("QyDropdown",Qe),t.component("QyInput",_e),t.component("QyInputTag",be),t.component("QyInputNumber",ke),t.component("QyMoneyInput",Se),t.component("QyDatePicker",Ce),t.component("QyCheckbox",xe),t.component("QyCheckboxGroup",Be),t.component("QyRadio",Ve),t.component("QyAutocomplete",Ie),t.component("QyMenuActions",qe),t.component("QyTableColumnSettings",$e),t.component("QyRadioGroup",Ee),t.component("QyRemoteSelect",Pe),t.component("QySearchInput",Te),t.component("QyRecordQuoteSearch",Ae),t.component("QySelect",Ne),t.component("QyTreeSelect",Fe),t.component("QySelectionDialog",Re),t.component("QyLegacySelectionDialog",De),t.component("QyFormSection",ze),t.component("QyActionBar",Oe),t.component("QyFilePicker",Ke),t.component("QySwitch",Me),t.component("QyTag",Le),t.component("QyBadge",Ue),t.component("QyCascader",je),t.component("QyTooltip",We),t.component("QyPopover",Ge),t.component("QyPopconfirm",He),t.component("QySkeleton",Je),t.component("QySkeletonItem",Ze),t.component("QyTabs",Xe),t.component("QyTabPane",Ye),t.component("QySteps",et),t.component("QyStep",tt),t.component("QyFullscreen",nt),t.component("QyIcon",$t.QyIcon),t.component("QyIconPicker",xt),t.component("QyColorPicker",Bt),t.component("QyRow",ot),t.component("QyCol",at),t.component("QyContainer",lt),t.component("QyAside",rt),t.component("QyMain",it),t.component("QyDescriptions",ct),t.component("QyDescriptionsItem",st),t.component("QyCollapse",ut),t.component("QyCollapseItem",dt),t.component("QyLink",yt),t.component("QyIframe",ft),t.component("QyDivider",mt),t.component("QyEmpty",pt),t.component("QyAlert",gt),t.component("QyCard",ht),t.component("QyResult",vt),t.component("QyWatermark",wt),t.component("QyScrollbar",Qt),t.component("QyProgress",_t),t.component("QyStatistic",bt),t.component("QyAvatar",kt),t.component("QyTree",St),t.component("QyPagination",Ct)},Do={install:Ro,QyUpload:fe,QyImage:me,QyImagePreview:pe,openQyImagePreview:Mn.openQyImagePreview,QyImageUpload:ge,QyDialog:he,QyButton:we,QyDropdown:Qe,QyInput:_e,QyInputTag:be,QyInputNumber:ke,QyMoneyInput:Se,QyDatePicker:Ce,QyCheckbox:xe,QyCheckboxGroup:Be,QyRadio:Ve,QyAutocomplete:Ie,QyMenuActions:qe,QyTableColumnSettings:$e,QyRadioGroup:Ee,QyRemoteSelect:Pe,QySearchInput:Te,QyRecordQuoteSearch:Ae,QySelect:Ne,QyTreeSelect:Fe,QySelectionDialog:Re,QyLegacySelectionDialog:De,QyFormSection:ze,QyActionBar:Oe,QyFilePicker:Ke,QySwitch:Me,QyTag:Le,QyBadge:Ue,QyCascader:je,QyTooltip:We,QyPopover:Ge,QyPopconfirm:He,QySkeleton:Je,QySkeletonItem:Ze,QyTabs:Xe,QyTabPane:Ye,QySteps:et,QyStep:tt,QyFullscreen:nt,QyDrawer:Vt,QyIcon:$t.QyIcon,QyIconPicker:xt,QyColorPicker:Bt,QyRow:ot,QyCol:at,QyContainer:lt,QyAside:rt,QyMain:it,QyDescriptions:ct,QyDescriptionsItem:st,QyCollapse:ut,QyCollapseItem:dt,QyLink:yt,QyIframe:ft,QyDivider:mt,QyEmpty:pt,QyAlert:gt,QyCard:ht,QyResult:vt,QyWatermark:wt,QyScrollbar:Qt,QyProgress:_t,QyStatistic:bt,QyAvatar:kt,QyTree:St,QyPagination:Ct,QyRemarkImage:ve,QyLoading:ce.QyLoading,vQyLoading:ce.vQyLoading,openQyLoading:Ln.openQyLoading};exports.QyActionBar=Oe;exports.QyAlert=gt;exports.QyAside=rt;exports.QyAutocomplete=Ie;exports.QyAvatar=kt;exports.QyBadge=Ue;exports.QyButton=we;exports.QyCard=ht;exports.QyCascader=je;exports.QyCheckbox=xe;exports.QyCheckboxGroup=Be;exports.QyCol=at;exports.QyCollapse=ut;exports.QyCollapseItem=dt;exports.QyColorPicker=Bt;exports.QyContainer=lt;exports.QyDatePicker=Ce;exports.QyDescriptions=ct;exports.QyDescriptionsItem=st;exports.QyDialog=he;exports.QyDivider=mt;exports.QyDrawer=Vt;exports.QyDropdown=Qe;exports.QyEmpty=pt;exports.QyFilePicker=Ke;exports.QyFormSection=ze;exports.QyFullscreen=nt;exports.QyIconPicker=xt;exports.QyIframe=ft;exports.QyImage=me;exports.QyImagePreview=pe;exports.QyImageUpload=ge;exports.QyInput=_e;exports.QyInputNumber=ke;exports.QyInputTag=be;exports.QyLegacySelectionDialog=De;exports.QyLink=yt;exports.QyMain=it;exports.QyMenuActions=qe;exports.QyMoneyInput=Se;exports.QyPagination=Ct;exports.QyPopconfirm=He;exports.QyPopover=Ge;exports.QyProgress=_t;exports.QyRadio=Ve;exports.QyRadioGroup=Ee;exports.QyRecordQuoteSearch=Ae;exports.QyRemarkImage=ve;exports.QyRemoteSelect=Pe;exports.QyResult=vt;exports.QyRow=ot;exports.QyScrollbar=Qt;exports.QySearchInput=Te;exports.QySelect=Ne;exports.QySelectionDialog=Re;exports.QySkeleton=Je;exports.QySkeletonItem=Ze;exports.QyStatistic=bt;exports.QyStep=tt;exports.QySteps=et;exports.QySwitch=Me;exports.QyTabPane=Ye;exports.QyTableColumnSettings=$e;exports.QyTabs=Xe;exports.QyTag=Le;exports.QyTooltip=We;exports.QyTree=St;exports.QyTreeSelect=Fe;exports.QyUpload=fe;exports.QyWatermark=wt;exports.formatRemarkText=Et;exports.index=Do;exports.parseRemarkText=se;exports.parseRemarkWithImage=ue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("vue"),u=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f=["src","title","loading","sandbox","allow","referrerpolicy","allowfullscreen"],m=r.defineComponent({name:"QyIframe",inheritAttrs:!1,__name:"index",props:{src:{type:String,required:!0},title:{type:String,required:!0},reloadKey:{type:[String,Number],default:void 0},loading:{type:String,default:"eager"},sandbox:{type:String,default:void 0},allow:{type:String,default:void 0},referrerPolicy:{type:String,default:void 0},allowFullscreen:Boolean},emits:["load","error"],setup(e,{emit:n}){const l=e,o=n,a=r.useAttrs(),i=r.computed(()=>l.src.trim().length>0&&l.title.trim().length>0),s=r.computed(()=>Object.fromEntries(Object.entries(a).filter(([t])=>t==="class"||t==="style"||t==="id"||t==="role"||t==="tabindex"||t.startsWith("data-")||t.startsWith("aria-"))));function c(){o("load")}function d(){o("error")}return(t,y)=>i.value?(r.openBlock(),r.createElementBlock("iframe",r.mergeProps({key:e.reloadKey},s.value,{class:"qy-iframe",src:e.src,title:e.title,loading:e.loading,sandbox:e.sandbox,allow:e.allow,referrerpolicy:e.referrerPolicy,allowfullscreen:e.allowFullscreen,onLoad:c,onError:d}),null,16,f)):r.createCommentVNode("",!0)}}),g=u._export_sfc(m,[["__scopeId","data-v-4592cf2b"]]);exports.Iframe=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),b=require("element-plus"),p=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=t.defineComponent({name:"QyCheckbox",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[Boolean,String,Number],default:!1},value:{type:[Boolean,String,Number]},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:void 0},trueValue:{type:[Boolean,String,Number],default:!0},falseValue:{type:[Boolean,String,Number],default:!1},name:{},id:{},tabindex:{},ariaLabel:{},ariaControls:{}},emits:["update:modelValue","change","focus","blur"],setup(o,{emit:r}){const a=o,l=r,u=t.useAttrs(),i=t.computed(()=>Object.fromEntries(Object.entries(u).filter(([e])=>e==="class"||e==="style"||e==="role"||e==="title"||e.startsWith("data-")||e.startsWith("aria-")))),s=t.computed(()=>a.modelValue===a.trueValue);function n(e){return e?a.trueValue:a.falseValue}function d(e){a.disabled||l("update:modelValue",n(e===!0))}function c(e){a.disabled||l("change",n(e===!0))}function f(e){l("focus",e)}function m(e){l("blur",e)}return(e,x)=>(t.openBlock(),t.createBlock(t.unref(b.ElCheckbox),t.mergeProps(i.value,{class:"qy-checkbox","model-value":s.value,value:a.value,indeterminate:a.indeterminate,disabled:a.disabled||void 0,size:a.size,name:a.name,id:a.id,tabindex:a.tabindex,"aria-label":a.ariaLabel,"aria-controls":a.ariaControls,"onUpdate:modelValue":d,onChange:c,onFocusin:f,onFocusout:m}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","value","indeterminate","disabled","size","name","id","tabindex","aria-label","aria-controls"]))}}),v=p._export_sfc(h,[["__scopeId","data-v-33fb88db"]]);exports.Checkbox=v;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as u, useAttrs as m, computed as l, openBlock as b, createBlock as g, unref as h, mergeProps as y, withCtx as C, renderSlot as v } from "vue";
|
|
2
|
+
import { ElTag as z } from "element-plus";
|
|
3
|
+
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const T = /* @__PURE__ */ u({
|
|
5
|
+
name: "QyTag",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
tone: { default: "neutral" },
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
effect: { default: "light" },
|
|
12
|
+
closable: { type: Boolean, default: !1 },
|
|
13
|
+
round: { type: Boolean, default: !1 },
|
|
14
|
+
disabled: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["click", "close"],
|
|
17
|
+
setup(e, { emit: n }) {
|
|
18
|
+
const s = n, o = m(), i = l(() => {
|
|
19
|
+
const t = Object.fromEntries(
|
|
20
|
+
Object.entries(o).filter(
|
|
21
|
+
([a]) => a === "class" || a === "style" || a === "title" || a === "role" || a.startsWith("data-") || a.startsWith("aria-")
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
return e.disabled && (t["aria-disabled"] = "true"), t;
|
|
25
|
+
}), c = l(() => e.tone === "neutral" ? "info" : e.tone), d = l(() => ({ sm: "small", md: "default", lg: "large" })[e.size]);
|
|
26
|
+
function f(t) {
|
|
27
|
+
e.disabled || s("click", t);
|
|
28
|
+
}
|
|
29
|
+
function r(t) {
|
|
30
|
+
e.disabled || s("close", t);
|
|
31
|
+
}
|
|
32
|
+
return (t, a) => (b(), g(h(z), y(i.value, {
|
|
33
|
+
class: ["qy-tag", [
|
|
34
|
+
`qy-tag--${e.tone}`,
|
|
35
|
+
{ "qy-tag--disabled": e.disabled }
|
|
36
|
+
]],
|
|
37
|
+
type: c.value,
|
|
38
|
+
size: d.value,
|
|
39
|
+
effect: e.effect,
|
|
40
|
+
closable: e.closable && !e.disabled,
|
|
41
|
+
round: e.round,
|
|
42
|
+
onClick: f,
|
|
43
|
+
onClose: r
|
|
44
|
+
}), {
|
|
45
|
+
default: C(() => [
|
|
46
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 16, ["class", "type", "size", "effect", "closable", "round"]));
|
|
50
|
+
}
|
|
51
|
+
}), j = /* @__PURE__ */ B(T, [["__scopeId", "data-v-0c5d7c85"]]);
|
|
52
|
+
export {
|
|
53
|
+
j as T
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Q=require("./install-c8il9DQv.cjs"),t=require("vue"),T=require("element-plus"),p=t.defineComponent({name:"QyInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"}},emits:["update:modelValue","input","change","focus","blur","clear","enter"],setup(m,{expose:v,emit:h}){const a=m,u=h,V=t.useAttrs(),o=t.ref(null),r=t.ref(i(a.modelValue)),s=t.ref(i(a.modelValue)),l=t.ref("none"),g=t.computed(()=>i(a.modelValue));t.watch(()=>a.modelValue,e=>{const n=i(e);r.value=n,s.value=n,l.value="none"});function i(e){return e==null?"":String(e)}function y(e){return a.removeSpace?e.replace(/\s+/g,""):e}function d(e,n){return a.trimMode!==n?e:e.trim()}function f(e){return y(i(e))}function c(e){r.value=e,s.value=e,u("update:modelValue",e)}function x(e){const n=f(e);c(n),l.value=n===""?"updated":"none"}function S(e){const n=f(e);r.value=n,u("input",n)}function C(e){const n=d(f(e),"change");if(r.value=n,n===""&&l.value==="updated"){l.value="changed",u("change",n);return}n!==s.value&&c(n),l.value=n===""?"changed":"none",u("change",n)}function I(e){u("focus",e)}function w(e){const n=d(r.value,"blur");r.value=n,n!==s.value&&c(n),u("blur",e)}function $(){l.value==="none"?(c(""),u("change","")):l.value==="updated"&&(l.value="changed",u("change","")),l.value="cleared",u("clear")}function k(e){u("enter",e)}function b(){var e,n;(n=(e=o.value)==null?void 0:e.focus)==null||n.call(e)}function q(){var e,n;(n=(e=o.value)==null?void 0:e.blur)==null||n.call(e)}function z(){var e,n;(n=(e=o.value)==null?void 0:e.select)==null||n.call(e)}function B(){var e,n;(n=(e=o.value)==null?void 0:e.clear)==null||n.call(e)}function M(){var e,n;(n=(e=o.value)==null?void 0:e.resizeTextarea)==null||n.call(e)}return v({focus:b,blur:q,select:z,clear:B,resizeTextarea:M}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(T.ElInput),t.mergeProps({ref_key:"inputRef",ref:o,class:"qy-input"},t.unref(V),{"model-value":g.value,"onUpdate:modelValue":x,onInput:S,onChange:C,onFocus:I,onBlur:w,onClear:$,onKeydown:t.withKeys(k,["enter"])}),t.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prepend")]),key:"2"}:void 0,e.$slots.append?{name:"append",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"append")]),key:"3"}:void 0]),1040,["model-value"]))}}),A=Q.withInstall(p,"QyInput");exports.QyInput=A;exports._sfc_main=p;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { defineComponent as D, useAttrs as Q, useSlots as G, ref as J, computed as s, Comment as X, Text as Y, Fragment as A, isVNode as Z, watch as k, onMounted as _, onUpdated as ee, openBlock as h, createBlock as B, unref as K, mergeProps as te, createSlots as le, withCtx as c, renderSlot as p, createElementBlock as ae, renderList as ne, normalizeProps as oe, guardReactiveProps as re } from "vue";
|
|
2
|
+
import { ElSelect as ie, ElOption as ue } from "element-plus";
|
|
3
|
+
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const de = /* @__PURE__ */ D({
|
|
5
|
+
name: "QySelect",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: [String, Number, Boolean, Object, Array, null], default: void 0 },
|
|
10
|
+
options: { default: () => [] },
|
|
11
|
+
labelKey: { default: "label" },
|
|
12
|
+
valueKey: { default: "value" },
|
|
13
|
+
objectIdentityKey: { default: void 0 },
|
|
14
|
+
disabledKey: { default: "disabled" },
|
|
15
|
+
placeholder: { default: "请选择" },
|
|
16
|
+
disabled: { type: Boolean, default: !1 },
|
|
17
|
+
clearable: { type: Boolean, default: !0 },
|
|
18
|
+
filterable: { type: Boolean, default: !1 },
|
|
19
|
+
loading: { type: Boolean, default: !1 },
|
|
20
|
+
multiple: { type: Boolean, default: !1 },
|
|
21
|
+
collapseTags: { type: Boolean, default: !1 },
|
|
22
|
+
collapseTagsTooltip: { type: Boolean, default: !1 },
|
|
23
|
+
autoSelectSingle: { type: Boolean, default: !1 },
|
|
24
|
+
size: { default: void 0 },
|
|
25
|
+
teleported: { type: Boolean, default: !0 },
|
|
26
|
+
appendTo: { default: "body" },
|
|
27
|
+
fitInputWidth: { type: Boolean, default: !0 },
|
|
28
|
+
popperClass: { default: "" }
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
|
|
31
|
+
setup(n, { expose: j, emit: C }) {
|
|
32
|
+
const r = Symbol("invalid-select-value"), l = n, o = C, I = Q(), O = G(), m = J(null), $ = s(
|
|
33
|
+
() => Object.fromEntries(
|
|
34
|
+
Object.entries(I).filter(
|
|
35
|
+
([e]) => e === "class" || e === "style" || e === "id" || e === "name" || e === "role" || e === "title" || e === "tabindex" || e === "remote" || e === "remoteMethod" || e === "remote-method" || e === "debounce" || e === "remoteShowSuffix" || e === "remote-show-suffix" || e.startsWith("data-") || e.startsWith("aria-")
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
), T = s(
|
|
39
|
+
() => ["qy-select__popper", l.popperClass].filter(Boolean).join(" ")
|
|
40
|
+
), S = s(() => {
|
|
41
|
+
const e = g(l.modelValue);
|
|
42
|
+
return e === r ? void 0 : e;
|
|
43
|
+
}), d = s(
|
|
44
|
+
() => l.options.map((e) => ({
|
|
45
|
+
raw: e,
|
|
46
|
+
label: x(e),
|
|
47
|
+
value: z(e),
|
|
48
|
+
disabled: !!e[l.disabledKey]
|
|
49
|
+
}))
|
|
50
|
+
), b = s(() => {
|
|
51
|
+
const e = O.default;
|
|
52
|
+
return e ? e().some(V) : !1;
|
|
53
|
+
}), w = s(() => {
|
|
54
|
+
if (!l.objectIdentityKey) return;
|
|
55
|
+
const e = S.value, t = Array.isArray(e) ? e.some(f) : f(e), a = !b.value && d.value.some((u) => f(u.value));
|
|
56
|
+
return t || a ? l.objectIdentityKey : void 0;
|
|
57
|
+
});
|
|
58
|
+
function V(e) {
|
|
59
|
+
return e.type === X ? !1 : e.type === Y ? typeof e.children == "string" && e.children.trim() !== "" : e.type !== A || !Array.isArray(e.children) ? !0 : e.children.some((t) => Z(t) ? V(t) : typeof t == "string" ? t.trim() !== "" : t != null);
|
|
60
|
+
}
|
|
61
|
+
function f(e) {
|
|
62
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
63
|
+
}
|
|
64
|
+
function y(e) {
|
|
65
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || f(e) ? e : r;
|
|
66
|
+
}
|
|
67
|
+
function g(e) {
|
|
68
|
+
if (e == null) return e;
|
|
69
|
+
if (Array.isArray(e)) {
|
|
70
|
+
const t = e;
|
|
71
|
+
return t.every((a) => y(a) !== r) ? t : r;
|
|
72
|
+
}
|
|
73
|
+
return y(e);
|
|
74
|
+
}
|
|
75
|
+
function x(e) {
|
|
76
|
+
const t = e[l.labelKey] ?? e.label ?? e.value ?? "";
|
|
77
|
+
return typeof t == "string" || typeof t == "number" ? t : typeof t == "boolean" ? String(t) : "";
|
|
78
|
+
}
|
|
79
|
+
function z(e) {
|
|
80
|
+
const t = e[l.valueKey] ?? e.value ?? e.label, a = y(t);
|
|
81
|
+
return a === r ? void 0 : a;
|
|
82
|
+
}
|
|
83
|
+
function E(e) {
|
|
84
|
+
return Array.isArray(e) ? e.length === 0 : e === "" || e === null || e === void 0;
|
|
85
|
+
}
|
|
86
|
+
let i = null;
|
|
87
|
+
k(
|
|
88
|
+
[
|
|
89
|
+
d,
|
|
90
|
+
() => l.modelValue,
|
|
91
|
+
() => l.autoSelectSingle,
|
|
92
|
+
() => l.disabled,
|
|
93
|
+
() => l.multiple
|
|
94
|
+
],
|
|
95
|
+
([e]) => v(e),
|
|
96
|
+
{ flush: "post" }
|
|
97
|
+
), _(() => v(d.value)), ee(() => v(d.value));
|
|
98
|
+
function v(e) {
|
|
99
|
+
if (!E(l.modelValue)) {
|
|
100
|
+
i = null;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (!l.autoSelectSingle || l.disabled || b.value || e.length !== 1) return;
|
|
104
|
+
const [t] = e;
|
|
105
|
+
if (t.disabled || t.value === void 0) return;
|
|
106
|
+
const a = M(t.value);
|
|
107
|
+
if (i && i.identityKey === l.objectIdentityKey && i.multiple === l.multiple && Object.is(i.candidate, a))
|
|
108
|
+
return;
|
|
109
|
+
i = {
|
|
110
|
+
candidate: a,
|
|
111
|
+
identityKey: l.objectIdentityKey,
|
|
112
|
+
multiple: l.multiple
|
|
113
|
+
};
|
|
114
|
+
const u = l.multiple ? [t.value] : t.value;
|
|
115
|
+
o("update:modelValue", u), o("change", u);
|
|
116
|
+
}
|
|
117
|
+
function M(e) {
|
|
118
|
+
return !f(e) || !l.objectIdentityKey ? e : e[l.objectIdentityKey] ?? e;
|
|
119
|
+
}
|
|
120
|
+
function L(e, t) {
|
|
121
|
+
return `${String(e.value ?? e.label ?? "")}-${t}`;
|
|
122
|
+
}
|
|
123
|
+
function P(e) {
|
|
124
|
+
const t = g(e);
|
|
125
|
+
t !== r && o("update:modelValue", t);
|
|
126
|
+
}
|
|
127
|
+
function U(e) {
|
|
128
|
+
const t = g(e);
|
|
129
|
+
t !== r && o("change", t);
|
|
130
|
+
}
|
|
131
|
+
function W() {
|
|
132
|
+
o("clear");
|
|
133
|
+
}
|
|
134
|
+
function F(e) {
|
|
135
|
+
o("visible-change", e);
|
|
136
|
+
}
|
|
137
|
+
function H(e) {
|
|
138
|
+
o("focus", e);
|
|
139
|
+
}
|
|
140
|
+
function N(e) {
|
|
141
|
+
o("blur", e);
|
|
142
|
+
}
|
|
143
|
+
function R() {
|
|
144
|
+
var e, t;
|
|
145
|
+
(t = (e = m.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
146
|
+
}
|
|
147
|
+
function q() {
|
|
148
|
+
var e, t;
|
|
149
|
+
(t = (e = m.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
150
|
+
}
|
|
151
|
+
return j({
|
|
152
|
+
// 仅暴露业务常用焦点方法,复杂下拉行为仍交给 Element Plus 自身处理。
|
|
153
|
+
focus: R,
|
|
154
|
+
blur: q
|
|
155
|
+
}), (e, t) => (h(), B(K(ie), te({
|
|
156
|
+
ref_key: "selectRef",
|
|
157
|
+
ref: m,
|
|
158
|
+
class: "qy-select"
|
|
159
|
+
}, $.value, {
|
|
160
|
+
"model-value": S.value,
|
|
161
|
+
placeholder: n.placeholder,
|
|
162
|
+
disabled: n.disabled,
|
|
163
|
+
clearable: n.clearable,
|
|
164
|
+
filterable: n.filterable,
|
|
165
|
+
loading: n.loading,
|
|
166
|
+
multiple: n.multiple,
|
|
167
|
+
"collapse-tags": n.collapseTags,
|
|
168
|
+
"collapse-tags-tooltip": n.collapseTagsTooltip,
|
|
169
|
+
size: n.size,
|
|
170
|
+
teleported: n.teleported,
|
|
171
|
+
"fit-input-width": n.fitInputWidth,
|
|
172
|
+
"popper-class": T.value,
|
|
173
|
+
"append-to": n.appendTo,
|
|
174
|
+
"value-key": w.value,
|
|
175
|
+
"onUpdate:modelValue": P,
|
|
176
|
+
onChange: U,
|
|
177
|
+
onClear: W,
|
|
178
|
+
onVisibleChange: F,
|
|
179
|
+
onFocus: H,
|
|
180
|
+
onBlur: N
|
|
181
|
+
}), le({
|
|
182
|
+
default: c(() => [
|
|
183
|
+
b.value ? p(e.$slots, "default", {}, void 0, !0, 0) : (h(!0), ae(A, { key: 1 }, ne(d.value, (a, u) => (h(), B(K(ue), {
|
|
184
|
+
key: L(a, u),
|
|
185
|
+
label: a.label,
|
|
186
|
+
value: a.value,
|
|
187
|
+
disabled: a.disabled
|
|
188
|
+
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
189
|
+
]),
|
|
190
|
+
_: 2
|
|
191
|
+
}, [
|
|
192
|
+
e.$slots.prefix ? {
|
|
193
|
+
name: "prefix",
|
|
194
|
+
fn: c(() => [
|
|
195
|
+
p(e.$slots, "prefix", {}, void 0, !0)
|
|
196
|
+
]),
|
|
197
|
+
key: "0"
|
|
198
|
+
} : void 0,
|
|
199
|
+
e.$slots.empty ? {
|
|
200
|
+
name: "empty",
|
|
201
|
+
fn: c(() => [
|
|
202
|
+
p(e.$slots, "empty", {}, void 0, !0)
|
|
203
|
+
]),
|
|
204
|
+
key: "1"
|
|
205
|
+
} : void 0,
|
|
206
|
+
e.$slots.loading ? {
|
|
207
|
+
name: "loading",
|
|
208
|
+
fn: c(() => [
|
|
209
|
+
p(e.$slots, "loading", {}, void 0, !0)
|
|
210
|
+
]),
|
|
211
|
+
key: "2"
|
|
212
|
+
} : void 0,
|
|
213
|
+
e.$slots.tag ? {
|
|
214
|
+
name: "tag",
|
|
215
|
+
fn: c((a) => [
|
|
216
|
+
p(e.$slots, "tag", oe(re(a)), void 0, !0)
|
|
217
|
+
]),
|
|
218
|
+
key: "3"
|
|
219
|
+
} : void 0
|
|
220
|
+
]), 1040, ["model-value", "placeholder", "disabled", "clearable", "filterable", "loading", "multiple", "collapse-tags", "collapse-tags-tooltip", "size", "teleported", "fit-input-width", "popper-class", "append-to", "value-key"]));
|
|
221
|
+
}
|
|
222
|
+
}), me = /* @__PURE__ */ se(de, [["__scopeId", "data-v-722db6dd"]]);
|
|
223
|
+
export {
|
|
224
|
+
me as S
|
|
225
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const C=require("element-plus"),l=require("vue"),de=require("@element-plus/icons-vue"),g=require("element-plus"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");/*! js-cookie v3.0.8 | MIT */function E(r){for(var x=1;x<arguments.length;x++){var k=arguments[x];for(var a in k)a!=="__proto__"&&(r[a]=k[a])}return r}var Ie={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function H(r,x){function k(u,V,f){if(!(typeof document>"u")){f=E({},x,f),typeof f.expires=="number"&&(f.expires=new Date(Date.now()+f.expires*864e5)),f.expires&&(f.expires=f.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var y="";for(var s in f)f[s]&&(y+="; "+s,f[s]!==!0&&(y+="="+f[s].split(";")[0]));return document.cookie=u+"="+r.write(V,u)+y}}function a(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var V=document.cookie?document.cookie.split("; "):[],f={},y=0;y<V.length;y++){var s=V[y].split("="),S=s.slice(1).join("=");try{var b=decodeURIComponent(s[0]);if(b in f||(f[b]=r.read(S,b)),u===b)break}catch{}}return u?f[u]:f}}return Object.create({set:k,get:a,remove:function(u,V){k(u,"",E({},V,{expires:-1}))},withAttributes:function(u){return H(this.converter,E({},this.attributes,u))},withConverter:function(u){return H(E({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(x)},converter:{value:Object.freeze(r)}})}var ce=H(Ie,{path:"/"});const Ae="Admin-Token";function Pe(r=Ae){return ce.get(r)}const _e=["accept","multiple","disabled"],Oe=["disabled"],$e={class:"qy-upload__hint"},Ke=["placeholder","disabled"],We=["src"],He={key:1,class:"qy-upload__tip"},Xe={class:"error"},Je={class:"error"},Qe=Object.assign({name:"QyUpload"},{__name:"index",props:{modelValue:{type:[Object,Array,String],default:void 0},selectedFiles:{type:Array,default:()=>[]},autoUpload:{type:Boolean,default:!0},variant:{type:String,default:"media-card"},defaultValue:{type:Object,default:()=>({files:"",text:""})},valueFormat:{type:String,default:"object"},showText:{type:Boolean,default:!0},showPasteInput:{type:Boolean,default:!1},pastePlaceholder:{type:String,default:"输入文字"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},limit:{type:Number,default:9},isShowTip:{type:Boolean,default:!1},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"file"},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"default"},disableDrag:{type:Boolean,default:!1},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})},uploadRequest:{type:Function,default:null}},emits:["update:modelValue","update:selectedFiles","selectedFilesChange","change","success","error","remove","invalid"],setup(r,{expose:x,emit:k}){const a=r,u=k,V=l.ref(null),f=l.ref(null),y=l.ref(null),s=l.ref([]),S=l.ref(null),b=l.ref(null),U=[],X=new WeakMap;let L=Date.now(),I=!1;const A=l.ref(!1),P=l.ref([]),J=l.ref(0),B=l.ref(!1),Q=l.ref(""),G=l.ref(""),q=new Set,D=l.ref(!1),h=l.ref(""),_=l.ref(!1);l.onMounted(()=>{a.modelValue!==void 0||!a.autoUpload||ee(a.defaultValue)});const pe=l.computed(()=>({large:"160px",default:"140px",small:"80px"})[a.size]??a.size),T=l.computed(()=>a.disabled),fe=l.computed(()=>s.value.some(e=>e.status==="uploading")),me=l.computed(()=>a.variant==="file-list"||a.supportVideo?"text":"picture-card"),ve=l.computed(()=>a.supportVideo?1:!a.autoUpload&&!a.multiple?2:a.limit),ge=l.computed(()=>{var e;return a.isShowTip&&(a.fileSize||((e=w.value)==null?void 0:e.length))}),w=l.computed(()=>{var e;return(e=a.fileType)!=null&&e.length?a.fileType.map(t=>String(t).trim().replace(/^\./,"").toLowerCase()).filter(Boolean):a.variant==="file-list"?[]:a.supportVideo?["mp4","mov","avi"]:["jpg","jpeg","png","gif","webp"]}),j=l.computed(()=>{if(!a.autoUpload&&!a.multiple)return!1;const e=a.supportVideo?1:a.limit;return s.value.length>=e}),Y=l.computed(()=>w.value.map(e=>`.${e}`).join(",")),ye=l.computed(()=>({"qy-upload--reached-limit":j.value,"qy-upload--disabled":a.disabled,"qy-upload--video":a.supportVideo,"qy-upload--without-text":!a.showText&&!a.showPasteInput}));l.watch(h,()=>{I||F()}),l.watch(()=>a.modelValue,e=>{a.autoUpload&&e!==void 0&&ee(e)},{immediate:!0,deep:!0}),l.watch(()=>[a.autoUpload,a.selectedFiles],([e,t])=>{e||(s.value=R(t))},{immediate:!0,deep:!0});function Z(e){return Array.isArray(e)?e.filter(Boolean):e?String(e).split(",").filter(Boolean):[]}function he(e){return Array.isArray(e)?{files:e,text:""}:typeof e=="string"?{files:Z(e),text:""}:e&&typeof e=="object"?{files:Z(e.files),text:e.text??""}:{files:[],text:""}}function we(e=[]){return e.map((t,n)=>({name:String(t).split("/").pop()||`file-${n}`,url:t,status:"success",uid:Date.now()+n}))}function R(e=[]){return e.filter(Boolean).map((t,n)=>{const i=l.toRaw(t);return{name:i.name,raw:i,status:"ready",uid:xe(i,n)}})}function xe(e,t){if(e.uid!=null)return e.uid;const n=X.get(e);return n??(L+=t+1,X.set(e,L),L)}function O(e=s.value){return e.map(t=>{const n=t.raw??(t instanceof File?t:null);return n?l.toRaw(n):null}).filter(Boolean)}function z(e){u("update:selectedFiles",e),u("selectedFilesChange",e)}function Ve(e,t){if(a.autoUpload)return;const n=e==null?void 0:e.raw;if(n&&!$(n)){s.value=R(a.selectedFiles);return}const i=O(t);n&&!i.includes(n)&&i.push(n);const o=a.multiple?i:i.slice(-1);s.value=R(o),z(o)}function ke(e){const t=new Set(e.map(i=>i.url)),n=s.value.filter(i=>i.status==="uploading"&&!t.has(i.url));return[...e,...n]}function ee(e){const t=he(e);I=!0,h.value=t.text,s.value=ke(we(t.files)),l.nextTick(()=>{I=!1})}function te(e){return a.valueFormat==="array"?e.files:a.valueFormat==="string"?e.files.join(","):e}function be(){var e;(e=S.value)==null||e.focus()}function Ue(e){e.target.value=""}function F(e){const i={files:(e??s.value).filter(o=>o.status==="success"&&o.url).map(o=>o.url),text:h.value};u("update:modelValue",te(i)),u("change",i),a.callBack&&a.callBack(i)}function Ce(e,t){if(!a.autoUpload){const n=O(t);s.value=R(n),z(n),u("remove",e,t);return}F(t),u("remove",e,t)}function le(e){var n;const t=(e==null?void 0:e.name)||"";return t.includes(".")&&((n=t.split(".").pop())==null?void 0:n.toLowerCase())||""}function ne(e){var o,d,p;const t=((d=(o=e==null?void 0:e.type)==null?void 0:o.toLowerCase)==null?void 0:d.call(o))||"",n={"image/jpeg":["jpg","jpeg"],"image/png":["png"],"image/gif":["gif"],"image/bmp":["bmp"],"image/webp":["webp"],"video/mp4":["mp4"],"video/quicktime":["mov"],"video/x-msvideo":["avi"],"video/webm":["webm"]};if(n[t])return n[t];const i=(p=t.split("/")[1])==null?void 0:p.split("+")[0];return i?[i]:[]}function Be(e){if(!w.value.length)return!0;const t=le(e),n=ne(e);return[t,...n].some(i=>w.value.includes(i))}function $(e){if(a.fileSize>0&&e.size>a.fileSize*1024*1024){const n={code:"size",file:e,message:`文件大小不能超过${a.fileSize}M`};return g.ElMessage.warning(n.message),u("invalid",n),!1}if(!Be(e)){const n={code:"extension",file:e,message:`格式不支持,仅允许: ${w.value.join("/")}`};return g.ElMessage.warning(n.message),u("invalid",n),!1}return!0}async function Re(e,t,n,i){const o=ae(e);try{const d=await a.uploadRequest({file:e,formData:o,api:a.api,name:a.name,tokenKey:a.tokenKey,extraData:a.extraData}),p=Fe(d);if(!p){const c=new Error("上传失败,未返回文件地址");g.ElMessage.error(c.message),u("error",c),n==null||n(c);return}g.ElMessage.success("上传成功"),t==null||t({...typeof d=="object"&&d?d:{},url:p})}catch(d){g.ElMessage.error("上传失败"),u("error",d),n==null||n(d)}finally{i.close()}}function ae(e){const t=new FormData;return t.append(a.name,e),a.extraData&&Object.entries(a.extraData).forEach(([n,i])=>t.append(n,i)),t}function Fe(e){var i,o;if(typeof e=="string")return e;const t=e||{},n=t.urls??t.url??((i=t.data)==null?void 0:i.urls)??((o=t.data)==null?void 0:o.url)??"";return Array.isArray(n)?n[0]||"":n||""}function ie(e,t,n,i){const o=g.ElLoading.service({target:f.value,text:"上传中",background:"rgba(255,255,255,0.7)"});if(a.uploadRequest){Re(e,n,i,o);return}const d=a.api.startsWith("http")?a.api:window.location.origin+a.api.replace(/^([^/])/,"/$1"),p=ae(e),c=new XMLHttpRequest;U.push(c);const N=()=>{const m=U.indexOf(c);m!==-1&&U.splice(m,1),o.close()};c.open("POST",d);const v=Pe(a.tokenKey);v&&c.setRequestHeader("Authorization",`Bearer ${v}`),c.upload.onprogress=m=>{m.total>0&&(t==null||t({percent:m.loaded/m.total*100}))},c.onload=()=>{if(N(),c.status<200||c.status>=300){const m=`上传失败 (HTTP ${c.status})`;g.ElMessage.error(m),u("error",{msg:m,status:c.status}),i==null||i(new Error(m));return}try{const m=JSON.parse(c.responseText);m.code===200&&m.urls?(g.ElMessage.success("上传成功"),n==null||n({...m,url:m.urls})):(g.ElMessage.error(m.msg||"上传失败"),u("error",m),i==null||i(m))}catch{g.ElMessage.error("上传失败,响应格式错误"),u("error",new Error("Response parse error")),i==null||i(new Error("Response parse error"))}},c.onerror=()=>{N(),g.ElMessage.error("上传失败,网络异常"),u("error",new Error("Network error")),i==null||i(new Error("Network error"))},c.send(p)}function oe(e){return a.disabled?!1:$(e)}function Me(e,t){const n=s.value.find(i=>{var o;return i.uid===(e==null?void 0:e.uid)||((o=i.raw)==null?void 0:o.uid)===(e==null?void 0:e.uid)});n&&(n.url=t,n.status="success")}function Ne(e){ie(e.file,e.onProgress,t=>{Me(e.file,t.url),e.onSuccess(t),F(),u("success",t)},t=>e.onError(t))}function Se(e){var i;if(!e.url)return;const t=((i=e.url.split(".").pop())==null?void 0:i.toLowerCase())||"";if(["mp4","mov","avi","webm"].includes(t)){Q.value=e.url,G.value=e.name||"视频预览",B.value=!0;return}const n=s.value.filter(o=>{var d;return o.status==="success"&&o.url&&!["mp4","mov","avi","webm"].includes((d=o.url.split(".").pop())==null?void 0:d.toLowerCase())});P.value=n.map(o=>o.url),J.value=n.findIndex(o=>o.uid===e.uid)||0,A.value=!0}function qe(){A.value=!1,P.value=[]}function De(e,t){if(e.name&&le(e))return e;const n=ne(e).find(i=>w.value.includes(i));return n?new File([e],`paste-${Date.now()+t}.${n}`,{type:e.type,lastModified:e.lastModified}):e}function K(e){if(!a.autoUpload){const t=O(),n=e.filter(o=>$(o));if(!n.length)return;const i=a.multiple?[...t,...n].slice(0,a.limit):n.slice(-1);s.value=R(i),z(i);return}for(let t=0;t<e.length;t++){const n=De(e[t],t);if(!oe(n))continue;const i=Date.now()+t,o=URL.createObjectURL(n);q.add(o),s.value.push({uid:i,name:n.name||`file-${i}`,status:"uploading",percentage:0,url:o}),ie(n,d=>{const p=s.value.find(c=>c.uid===i);p&&(p.percentage=d.percent)},d=>{const p=s.value.find(c=>c.uid===i);p&&(p.status="success",p.url=d.url,F(),u("success",d))},()=>ze(i))}}function Te(e){const t=e.target,n=Array.from(t.files||[]);if(t.value="",a.disabled||!n.length)return;const i=a.supportVideo||!a.multiple?n.slice(0,1):n;K(i)}function je(e){const t=Array.from((e==null?void 0:e.files)||[]).filter(d=>{var p;return(p=d.type)==null?void 0:p.startsWith("image/")});if(t.length)return t;const n=e==null?void 0:e.items;if(!n)return[];const i=[],o=new Set;for(let d=0;d<n.length;d++){const p=n[d];if(p.kind==="file"&&p.type.startsWith("image/")){const c=p.getAsFile();c&&!o.has(c)&&(o.add(c),i.push(c))}}return i}function M(e){if(a.disabled)return;const t=je(e.clipboardData);t.length&&(e.preventDefault(),K(t))}function re(){a.disabled||a.disableDrag||(D.value=!0)}function se(){D.value=!1}function ue(e){var n;if(D.value=!1,a.disabled||a.disableDrag||j.value)return;const t=Array.from(((n=e.dataTransfer)==null?void 0:n.files)||[]);t.length&&K(t)}function ze(e){var n;const t=s.value.findIndex(i=>i.uid===e);t!==-1&&((n=s.value[t].url)!=null&&n.startsWith("blob:")&&(URL.revokeObjectURL(s.value[t].url),q.delete(s.value[t].url)),s.value.splice(t,1))}l.onBeforeUnmount(()=>{U.forEach(e=>e.abort()),U.length=0,q.forEach(e=>URL.revokeObjectURL(e)),q.clear()});function W(){var e;a.disabled||j.value||(e=y.value)==null||e.click()}function Ee(){s.value=[],h.value="",z([]),a.autoUpload&&F()}return x({openFileDialog:W,getPathList:()=>s.value.filter(e=>e.status==="success").map(e=>e.url),clearFiles:Ee,getValue:()=>({files:s.value.filter(e=>e.status==="success"&&e.url).map(e=>e.url),text:h.value}),getModelValue:()=>te({files:s.value.filter(e=>e.status==="success"&&e.url).map(e=>e.url),text:h.value})}),(e,t)=>{var N;const n=C.ElIcon,i=C.ElInput,o=C.ElPopover,d=C.ElUpload,p=C.ElImageViewer,c=C.ElDialog;return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:f,class:l.normalizeClass(["qy-upload",ye.value]),style:l.normalizeStyle({"--qy-upload-size":pe.value})},[l.createElementVNode("input",{ref_key:"nativeInputRef",ref:y,class:"qy-upload__native-input",type:"file",accept:Y.value,multiple:r.supportVideo?!1:r.multiple,disabled:T.value,onChange:Te},null,40,_e),l.createVNode(d,{ref_key:"uploadRef",ref:V,"file-list":s.value,"onUpdate:fileList":t[7]||(t[7]=v=>s.value=v),action:"#",multiple:r.supportVideo?!1:r.multiple,limit:ve.value,"auto-upload":r.autoUpload,"list-type":me.value,accept:Y.value,disabled:T.value,"http-request":Ne,"before-upload":oe,"on-change":Ve,"on-preview":Se,"on-remove":Ce},l.createSlots({default:l.withCtx(()=>[r.variant!=="file-list"&&!j.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["qy-upload__trigger",{"is-dragover":D.value}]),onPaste:M,onDragover:l.withModifiers(re,["prevent"]),onDragleave:l.withModifiers(se,["prevent"]),onDrop:l.withModifiers(ue,["prevent"])},[l.createVNode(n,{class:"qy-upload__icon"},{default:l.withCtx(()=>[l.createVNode(l.unref(de.Plus))]),_:1}),r.supportVideo?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[t[10]||(t[10]=l.createElementVNode("span",{class:"qy-upload__label"},"点击上传视频",-1)),l.createElementVNode("span",$e,"支持 "+l.toDisplayString(w.value.join(" / "))+",不超过 "+l.toDisplayString(r.fileSize)+"MB",1)],64)):l.createCommentVNode("",!0),r.showText?(l.openBlock(),l.createElementBlock("div",{key:1,class:"qy-upload__text",onClick:t[4]||(t[4]=l.withModifiers(()=>{},["stop"])),onPaste:l.withModifiers(M,["stop"])},[l.createVNode(o,{visible:_.value,"onUpdate:visible":t[3]||(t[3]=v=>_.value=v),placement:"bottom-start",width:220,trigger:"click","popper-class":"qy-upload__text-popover",onAfterEnter:be},{reference:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["qy-upload__text-preview",{"is-placeholder":!h.value}])},l.toDisplayString(h.value||r.pastePlaceholder),3)]),default:l.withCtx(()=>[l.createVNode(i,{ref_key:"inputRef",ref:S,modelValue:h.value,"onUpdate:modelValue":t[1]||(t[1]=v=>h.value=v),type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:r.pastePlaceholder,disabled:r.disabled,onBlur:t[2]||(t[2]=v=>_.value=!1),onPaste:l.withModifiers(M,["stop"])},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["visible"])],32)):r.showPasteInput?(l.openBlock(),l.createElementBlock("div",{key:2,class:"qy-upload__text",onClick:t[6]||(t[6]=l.withModifiers(()=>{},["stop"])),onPaste:l.withModifiers(M,["stop"])},[l.createElementVNode("input",{ref_key:"pasteInputRef",ref:b,class:"qy-upload__paste-input",placeholder:r.pastePlaceholder,disabled:r.disabled,onPaste:l.withModifiers(M,["stop"]),onInput:Ue,onClick:t[5]||(t[5]=l.withModifiers(()=>{},["stop"]))},null,40,Ke)],32)):l.createCommentVNode("",!0)],34)):l.createCommentVNode("",!0)]),_:2},[r.variant==="file-list"?{name:"trigger",fn:l.withCtx(()=>[l.createElementVNode("div",{class:"qy-upload__file-trigger",onClick:t[0]||(t[0]=l.withModifiers(()=>{},["stop"])),onDragover:l.withModifiers(re,["prevent"]),onDragleave:l.withModifiers(se,["prevent"]),onDrop:l.withModifiers(ue,["prevent"])},[l.renderSlot(e.$slots,"trigger",{open:W,disabled:T.value,uploading:fe.value},()=>[l.createElementVNode("button",{class:"qy-upload__file-button",type:"button",disabled:T.value,onClick:W}," 选择文件 ",8,Oe)],!0)],32)]),key:"0"}:void 0]),1032,["file-list","multiple","limit","auto-upload","list-type","accept","disabled"]),A.value?(l.openBlock(),l.createBlock(p,{key:0,"url-list":P.value,"initial-index":J.value,onClose:qe},null,8,["url-list","initial-index"])):l.createCommentVNode("",!0),l.createVNode(c,{modelValue:B.value,"onUpdate:modelValue":t[8]||(t[8]=v=>B.value=v),title:G.value,width:"640px","append-to-body":"","destroy-on-close":"",onClose:t[9]||(t[9]=v=>B.value=!1)},{default:l.withCtx(()=>[B.value?(l.openBlock(),l.createElementBlock("video",{key:0,src:Q.value,controls:"",autoplay:"",style:{width:"100%","max-height":"400px","border-radius":"4px"}},null,8,We)):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),ge.value?(l.openBlock(),l.createElementBlock("div",He,[l.createVNode(n,null,{default:l.withCtx(()=>[l.createVNode(l.unref(de.InfoFilled))]),_:1}),l.createElementVNode("span",null,[t[13]||(t[13]=l.createTextVNode(" 请上传 ",-1)),r.fileSize?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[t[11]||(t[11]=l.createTextVNode("大小不超过 ",-1)),l.createElementVNode("b",Xe,l.toDisplayString(r.fileSize)+"MB",1)],64)):l.createCommentVNode("",!0),(N=w.value)!=null&&N.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[t[12]||(t[12]=l.createTextVNode(",格式为 ",-1)),l.createElementVNode("b",Je,l.toDisplayString(w.value.join("/")),1)],64)):l.createCommentVNode("",!0),t[14]||(t[14]=l.createTextVNode(" 的文件。 ",-1))])])):l.createCommentVNode("",!0)],6)}}}),Ge=Le._export_sfc(Qe,[["__scopeId","data-v-3f7a045b"]]);exports.Upload=Ge;exports.api=ce;
|