@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,215 @@
|
|
|
1
|
+
import { defineComponent as ce, useAttrs as ue, ref as l, computed as d, watch as k, onMounted as fe, onBeforeUnmount as de, openBlock as x, createElementBlock as j, mergeProps as me, createVNode as A, unref as N, withCtx as q, createElementVNode as y, normalizeClass as pe, renderSlot as R, createBlock as ve, resolveDynamicComponent as ge, createCommentVNode as ye, createTextVNode as F, toDisplayString as I } from "vue";
|
|
2
|
+
import { CircleCloseFilled as he, InfoFilled as be, WarningFilled as we } from "@element-plus/icons-vue";
|
|
3
|
+
import { ElPopover as Le, ElButton as G } from "element-plus";
|
|
4
|
+
const m = [], Ce = { class: "qy-popconfirm__message" }, Ee = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "qy-popconfirm__icon",
|
|
7
|
+
"aria-hidden": "true"
|
|
8
|
+
}, ke = {
|
|
9
|
+
"data-testid": "qy-popconfirm-title",
|
|
10
|
+
class: "qy-popconfirm__title"
|
|
11
|
+
}, qe = { class: "qy-popconfirm__actions" }, Se = /* @__PURE__ */ ce({
|
|
12
|
+
name: "QyPopconfirm",
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: {
|
|
16
|
+
title: { type: String, required: !0 },
|
|
17
|
+
open: { type: Boolean, default: void 0 },
|
|
18
|
+
disabled: { type: Boolean, default: !1 },
|
|
19
|
+
placement: { type: String, default: "bottom" },
|
|
20
|
+
width: { type: [Number, String], default: 220 },
|
|
21
|
+
confirmText: { type: String, default: "确认" },
|
|
22
|
+
cancelText: { type: String, default: "取消" },
|
|
23
|
+
variant: { type: String, default: "warning" },
|
|
24
|
+
confirmType: { type: String, default: "primary" },
|
|
25
|
+
showIcon: { type: Boolean, default: !0 },
|
|
26
|
+
confirmLoading: { type: Boolean, default: !1 },
|
|
27
|
+
closeOnConfirm: { type: Boolean, default: !0 }
|
|
28
|
+
},
|
|
29
|
+
emits: ["update:open", "open-change", "confirm", "cancel", "close"],
|
|
30
|
+
setup(i, { emit: J }) {
|
|
31
|
+
const t = i, s = J, X = ue(), h = l(null), T = l(null), P = d(() => t.open !== void 0), B = t.open === !0 && !t.disabled, D = l(B), c = l(B), a = l(B), o = l(null), p = l(!1), b = l(null), w = {};
|
|
32
|
+
let u = !1, v, L, C = !1, E = null;
|
|
33
|
+
const W = d(() => t.disabled ? !1 : P.value ? t.open === !0 : D.value), Y = d(() => {
|
|
34
|
+
const e = {};
|
|
35
|
+
for (const [n, g] of Object.entries(X))
|
|
36
|
+
(n === "class" || n === "style" || n === "id" || n === "title" || n === "tabindex" || n === "role" || n.startsWith("data-") || n.startsWith("aria-") || /^onKey(?:down|up|press)/i.test(n)) && (e[n] = g);
|
|
37
|
+
return e;
|
|
38
|
+
}), Z = d(
|
|
39
|
+
() => typeof t.width == "number" ? `${t.width}px` : t.width
|
|
40
|
+
), _ = d(() => ({
|
|
41
|
+
"--qy-popconfirm-width": Z.value,
|
|
42
|
+
"--qy-popconfirm-mobile-gutter": "24px"
|
|
43
|
+
})), ee = d(() => t.variant === "danger" ? he : t.variant === "info" ? be : we);
|
|
44
|
+
function S() {
|
|
45
|
+
return m[m.length - 1] === w;
|
|
46
|
+
}
|
|
47
|
+
function $() {
|
|
48
|
+
m.includes(w) || m.push(w);
|
|
49
|
+
}
|
|
50
|
+
function z() {
|
|
51
|
+
const e = m.indexOf(w);
|
|
52
|
+
e >= 0 && m.splice(e, 1);
|
|
53
|
+
}
|
|
54
|
+
function M(e) {
|
|
55
|
+
var Q, U;
|
|
56
|
+
const n = document.activeElement;
|
|
57
|
+
if (n instanceof HTMLElement && ((Q = h.value) != null && Q.contains(n))) {
|
|
58
|
+
b.value = n;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const g = e == null ? void 0 : e.target;
|
|
62
|
+
g instanceof HTMLElement && ((U = T.value) != null && U.contains(g)) && (b.value = g);
|
|
63
|
+
}
|
|
64
|
+
function ne() {
|
|
65
|
+
const e = b.value;
|
|
66
|
+
b.value = null, e != null && e.isConnected && e.focus();
|
|
67
|
+
}
|
|
68
|
+
function f() {
|
|
69
|
+
if (u) return;
|
|
70
|
+
const e = W.value;
|
|
71
|
+
c.value !== e && (u = !0, v = e, L = e ? void 0 : o.value ?? (t.disabled ? "disabled" : "external"), c.value = e);
|
|
72
|
+
}
|
|
73
|
+
function r(e, n) {
|
|
74
|
+
e && t.disabled || (!e && n && o.value === null && (o.value = n), P.value ? t.open !== e && s("update:open", e) : D.value !== e && (D.value = e, s("update:open", e)), f());
|
|
75
|
+
}
|
|
76
|
+
function te() {
|
|
77
|
+
var e;
|
|
78
|
+
return o.value ? o.value : E instanceof Node && ((e = h.value) != null && e.contains(E)) ? "trigger" : "outside";
|
|
79
|
+
}
|
|
80
|
+
function ie(e) {
|
|
81
|
+
if (e) {
|
|
82
|
+
M(), r(!0);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (t.confirmLoading) return;
|
|
86
|
+
const n = te();
|
|
87
|
+
!S() && n !== "external" && n !== "disabled" || r(!1, n);
|
|
88
|
+
}
|
|
89
|
+
function oe(e) {
|
|
90
|
+
var n;
|
|
91
|
+
!(e.target instanceof Node) || !((n = T.value) != null && n.contains(e.target)) || t.confirmLoading || (a.value || c.value ? (o.value = "trigger", r(!1, "trigger")) : (M(e), r(!0)));
|
|
92
|
+
}
|
|
93
|
+
function ae() {
|
|
94
|
+
t.disabled || t.confirmLoading || p.value || (p.value = !0, s("confirm"), t.closeOnConfirm && r(!1, "confirm"));
|
|
95
|
+
}
|
|
96
|
+
function re() {
|
|
97
|
+
t.disabled || t.confirmLoading || (s("cancel"), r(!1, "cancel"));
|
|
98
|
+
}
|
|
99
|
+
function V(e) {
|
|
100
|
+
e.key !== "Escape" && e.code !== "Escape" || t.confirmLoading || !a.value || !S() || (e.preventDefault(), r(!1, "escape"));
|
|
101
|
+
}
|
|
102
|
+
function O(e) {
|
|
103
|
+
E = e.target;
|
|
104
|
+
}
|
|
105
|
+
function H(e) {
|
|
106
|
+
E = e.target;
|
|
107
|
+
}
|
|
108
|
+
function K(e) {
|
|
109
|
+
var n;
|
|
110
|
+
t.confirmLoading || !a.value || !S() || e.target instanceof Node && ((n = h.value) != null && n.contains(e.target) || e.target instanceof Element && e.target.closest(".qy-popconfirm-popper") || r(!1, "outside"));
|
|
111
|
+
}
|
|
112
|
+
function le() {
|
|
113
|
+
!u || v !== !0 || (u = !1, v = void 0, a.value = !0, $(), o.value = null, L = void 0, s("open-change", !0), f());
|
|
114
|
+
}
|
|
115
|
+
function se() {
|
|
116
|
+
!u || v !== !1 || (u = !1, v = void 0, a.value = !1, z(), s("open-change", !1), s("close", L ?? o.value ?? "external"), o.value = null, L = void 0, p.value = !1, C = !1, ne(), f());
|
|
117
|
+
}
|
|
118
|
+
return k(W, () => f()), k(
|
|
119
|
+
() => t.open,
|
|
120
|
+
(e, n) => {
|
|
121
|
+
e !== n && (e === !1 && (a.value || c.value) && o.value === null && (o.value = "external"), f());
|
|
122
|
+
}
|
|
123
|
+
), k(
|
|
124
|
+
() => t.disabled,
|
|
125
|
+
(e) => {
|
|
126
|
+
e && (a.value || c.value) && (o.value = "disabled"), f();
|
|
127
|
+
}
|
|
128
|
+
), k(
|
|
129
|
+
() => t.confirmLoading,
|
|
130
|
+
(e) => {
|
|
131
|
+
e ? C = !0 : C && (C = !1, a.value && (p.value = !1));
|
|
132
|
+
}
|
|
133
|
+
), fe(() => {
|
|
134
|
+
a.value && $(), window.addEventListener("keydown", V), document.addEventListener("pointerdown", O, !0), document.addEventListener("mousedown", H, !0), document.addEventListener("click", K);
|
|
135
|
+
}), de(() => {
|
|
136
|
+
z(), window.removeEventListener("keydown", V), document.removeEventListener("pointerdown", O, !0), document.removeEventListener("mousedown", H, !0), document.removeEventListener("click", K);
|
|
137
|
+
}), (e, n) => (x(), j("span", me({
|
|
138
|
+
ref_key: "rootRef",
|
|
139
|
+
ref: h,
|
|
140
|
+
class: "qy-popconfirm"
|
|
141
|
+
}, Y.value, { onClickCapture: oe }), [
|
|
142
|
+
A(N(Le), {
|
|
143
|
+
visible: c.value,
|
|
144
|
+
trigger: "click",
|
|
145
|
+
placement: i.placement,
|
|
146
|
+
width: i.width,
|
|
147
|
+
disabled: i.disabled,
|
|
148
|
+
"popper-style": _.value,
|
|
149
|
+
"popper-class": "qy-popconfirm-popper",
|
|
150
|
+
"onUpdate:visible": ie,
|
|
151
|
+
onAfterEnter: le,
|
|
152
|
+
onAfterLeave: se
|
|
153
|
+
}, {
|
|
154
|
+
reference: q(() => [
|
|
155
|
+
y("span", {
|
|
156
|
+
ref_key: "referenceRef",
|
|
157
|
+
ref: T,
|
|
158
|
+
"data-qy-popconfirm-reference": ""
|
|
159
|
+
}, [
|
|
160
|
+
R(e.$slots, "reference")
|
|
161
|
+
], 512)
|
|
162
|
+
]),
|
|
163
|
+
default: q(() => [
|
|
164
|
+
y("div", {
|
|
165
|
+
class: pe(["qy-popconfirm__content", `is-${i.variant}`]),
|
|
166
|
+
"data-qy-popconfirm-content": ""
|
|
167
|
+
}, [
|
|
168
|
+
y("div", Ce, [
|
|
169
|
+
i.showIcon ? (x(), j("span", Ee, [
|
|
170
|
+
R(e.$slots, "icon", {}, () => [
|
|
171
|
+
(x(), ve(ge(ee.value)))
|
|
172
|
+
])
|
|
173
|
+
])) : ye("", !0),
|
|
174
|
+
y("span", ke, [
|
|
175
|
+
R(e.$slots, "title", {}, () => [
|
|
176
|
+
F(I(i.title), 1)
|
|
177
|
+
])
|
|
178
|
+
])
|
|
179
|
+
]),
|
|
180
|
+
y("div", qe, [
|
|
181
|
+
A(N(G), {
|
|
182
|
+
"data-testid": "qy-popconfirm-cancel",
|
|
183
|
+
size: "small",
|
|
184
|
+
disabled: i.disabled || i.confirmLoading,
|
|
185
|
+
onClick: re
|
|
186
|
+
}, {
|
|
187
|
+
default: q(() => [
|
|
188
|
+
F(I(i.cancelText), 1)
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["disabled"]),
|
|
192
|
+
A(N(G), {
|
|
193
|
+
"data-testid": "qy-popconfirm-confirm",
|
|
194
|
+
size: "small",
|
|
195
|
+
type: i.confirmType,
|
|
196
|
+
loading: i.confirmLoading,
|
|
197
|
+
disabled: i.disabled || i.confirmLoading || p.value,
|
|
198
|
+
onClick: ae
|
|
199
|
+
}, {
|
|
200
|
+
default: q(() => [
|
|
201
|
+
F(I(i.confirmText), 1)
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["type", "loading", "disabled"])
|
|
205
|
+
])
|
|
206
|
+
], 2)
|
|
207
|
+
]),
|
|
208
|
+
_: 3
|
|
209
|
+
}, 8, ["visible", "placement", "width", "disabled", "popper-style"])
|
|
210
|
+
], 16));
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
export {
|
|
214
|
+
Se as _
|
|
215
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),V=require("element-plus"),x=t.defineComponent({name:"QyCollapse",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},accordion:{type:Boolean,default:!1},expandIconPosition:{default:"right"},beforeCollapse:{}},emits:["update:modelValue","change"],setup(l,{expose:i,emit:d}){const a=l,s=d,u=t.useAttrs(),c=t.ref(),n=t.ref(a.modelValue),m=t.computed(()=>Object.fromEntries(Object.entries(u).filter(([e])=>e==="class"||e==="style"||e==="id"||e==="role"||e==="title"||e.startsWith("data-")||e.startsWith("aria-"))));function r(e){const o=Array.isArray(e)?e:[e];return a.accordion?o.slice(0,1):o}t.watch(()=>a.modelValue,e=>{n.value=e},{deep:!0});const f=t.computed(()=>r(a.modelValue));function p(e){n.value=e,s("update:modelValue",e),t.nextTick(()=>{n.value=a.modelValue})}function h(e){s("change",e)}function v(e){var o;(o=c.value)==null||o.setActiveNames(r(e))}return i({activeNames:f,setActiveNames:v}),(e,o)=>(t.openBlock(),t.createBlock(t.unref(V.ElCollapse),t.mergeProps({ref_key:"collapseRef",ref:c},m.value,{class:"qy-collapse","model-value":n.value,accordion:l.accordion,"expand-icon-position":l.expandIconPosition,"before-collapse":l.beforeCollapse,"onUpdate:modelValue":p,onChange:h}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["model-value","accordion","expand-icon-position","before-collapse"]))}});exports._sfc_main=x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const R=require("element-plus"),e=require("vue"),le=require("clsx"),U=require("element-plus"),ne=require("@element-plus/icons-vue"),W=require("@vueuse/core"),ae={class:"text-lg flex items-center pt-2 pl-[var(--content-padding)]"},re={key:0},ie={key:1},se={key:0,class:"icon-[material-symbols--square-outline-rounded]",role:"img","aria-hidden":"true"},de={key:1,class:"icon-[tdesign--fullscreen-exit-1]",role:"img","aria-hidden":"true"},ce={key:0,class:"fixed -right-12 top-2 h-9 w-9 hover:bg-gray-600/80 transition-all"},ue={class:"flex justify-between h-[var(--footer-height)] px-[var(--content-padding)] items-center"},fe={class:"flex items-center justify-between w-full pl-1 pr-4 h-full ml-2"},me={class:"flex items-center gap-2"},pe={class:"text-sm text-gray-700 truncate max-w-[200px]"},ye={class:"flex items-center gap-2"},X=5,M=2e3,ge=e.defineComponent({inheritAttrs:!1,__name:"index",props:{open:{type:Boolean,default:!1},title:{default:""},width:{default:"50%"},showFooter:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},confirmText:{default:"确 认"},cancelText:{default:"取 消"},confirmLoading:{type:Boolean,default:!1},confirmDisabled:{type:Boolean,default:!1},closeOnConfirm:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!0},destroyOnClose:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},top:{default:"15vh"},fullscreen:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!1},size:{default:"default"},zIndex:{default:2e3}},emits:["update:open","open-change","confirm","cancel","close","opened","closed"],setup(K,{expose:P,emit:Y}){let d=0;const l=K,E=e.useSlots(),S=e.ref(!0),C=e.ref(!1),q=e.ref(M),N=e.ref(null),G=W.useBreakpoints({mobile:0,tablet:640,laptop:1024,desktop:1280}).isSmaller("tablet"),B=e.computed(()=>{const t=[];return l.showCancel&&t.push("cancel"),l.showConfirm&&t.push("confirm"),t}),V=e.computed(()=>({CancelButton:e.createVNode(Z),ConfirmButton:e.createVNode(T)})),I=e.computed(()=>!!(E.footer||l.showFooter)),m=e.ref(!1),g=e.ref(!1);let b=!1,p=document.activeElement instanceof HTMLElement?document.activeElement:null;const v=e.ref(l.showFullscreen&&G?!0:l.fullscreen),r=Y,D=e.computed(()=>l.open);e.watchEffect(()=>{D.value&&(m.value=!1)}),e.watch(()=>l.open,(t,o)=>{if(t){m.value=!1,g.value=!1,p=document.activeElement instanceof HTMLElement?document.activeElement:p,o===!1&&r("open-change",!0);return}o&&!m.value&&(m.value=!0,r("open-change",!1),r("close","external"))}),e.watch(()=>l.confirmLoading,t=>{t?b=!0:b&&(b=!1,g.value=!1)}),P({handleMinimize:z});const c=`qy-dialog-${Math.random().toString(36).slice(2,11)}`,y=e.ref(!1);let h=!1;const w=e.ref(null),{x:L,y:_}=W.useDraggable(w,{initialValue:{x:5,y:window.innerHeight-100-d*60},onMove(t){var o;(o=w.value)==null||o.classList.add("dragging"),document.body.classList.add("qy-dialog--dragging"),L.value=Math.max(0,Math.min(window.innerWidth-300,t.x)),_.value=Math.max(0,Math.min(window.innerHeight-50,t.y))},onEnd(){var t;(t=w.value)==null||t.classList.remove("dragging"),document.body.classList.remove("qy-dialog--dragging")}}),J=e.computed(()=>({transform:`translate(${L.value}px, ${_.value}px)`,willChange:"transform"}));function O(t){const o=t.target,{scrollTop:n,scrollHeight:i,clientHeight:s}=o;S.value=n<=X,C.value=i-(n+s)<=X}function Q(){const t=document.querySelector(`.${c}.el-dialog`);t&&(N.value=t,t.addEventListener("scroll",O)),x(),r("opened")}function $(){v.value=!v.value,x()}function u(t){l.confirmLoading&&t!=="external"||m.value||(m.value=!0,j(),r("update:open",!1),r("open-change",!1),(t==="cancel"||t==="header")&&r("cancel"),r("close",t))}function ee(){r("closed"),e.nextTick(()=>{p!=null&&p.isConnected&&p.focus()})}function te(t){l.showFullscreen&&t.detail>=2&&$()}function T(){return e.h(U.ElButton,{type:"primary",class:"dialog__footerBtn",loading:l.confirmLoading,disabled:l.confirmDisabled||l.confirmLoading||g.value,onClick:oe},()=>l.confirmText)}function oe(){g.value||l.confirmLoading||l.confirmDisabled||(g.value=!0,r("confirm"),l.closeOnConfirm&&u("confirm"))}function Z(){return e.h(U.ElButton,{class:"dialog__footerBtn",onClick:()=>u("cancel")},()=>l.cancelText)}e.onMounted(()=>{typeof window.qyDialogMaxZIndex>"u"&&(window.qyDialogMaxZIndex=M),x(),document.addEventListener("keydown",A),document.addEventListener("mousedown",F)});function H(){var i,s;const t=(i=document.querySelector(`.${c}`))==null?void 0:i.closest(".el-overlay");if(!t)return!1;const n=Array.from(document.querySelectorAll(".el-overlay")).filter(a=>window.getComputedStyle(a).display!=="none").map((a,f)=>({overlay:a,order:f,zIndex:Number.parseInt(window.getComputedStyle(a).zIndex||"0",10)}));return n.sort((a,f)=>a.zIndex-f.zIndex||a.order-f.order),((s=n.at(-1))==null?void 0:s.overlay)===t}function A(t){t.key!=="Escape"||!l.open||!l.closeOnEscape||l.confirmLoading||!H()||(t.preventDefault(),u("escape"))}function F(t){if(!l.open||!l.closeOnOverlay||l.confirmLoading||!H()||!(t.target instanceof Node))return;const o=document.querySelector(`.${c}.el-dialog`),n=o==null?void 0:o.closest(".el-overlay");!o||!n||!n.contains(t.target)||o.contains(t.target)||u("overlay")}function x(){var f;const t=Array.from(document.querySelectorAll(".el-overlay")).filter(k=>window.getComputedStyle(k).display!=="none"&&!k.classList.contains("is-message")),o=(f=document.querySelector(`.${c}`))==null?void 0:f.closest(".el-overlay"),n=document.querySelector(`.${c}.el-dialog`);if(!o||!n)return;const i=M;window.qyDialogMaxZIndex=window.qyDialogMaxZIndex||i;const a=Math.max(window.qyDialogMaxZIndex,...t.map(k=>parseInt(window.getComputedStyle(k).zIndex||i.toString())))+2;window.qyDialogMaxZIndex=a,e.nextTick(()=>{o.style.zIndex=a.toString(),n.style.zIndex=(a+1).toString(),q.value=a+1})}e.onUnmounted(()=>{var t;document.removeEventListener("keydown",A),document.removeEventListener("mousedown",F),(t=N.value)==null||t.removeEventListener("scroll",O),j()});function j(){if(!h){y.value=!1;return}h=!1,d=Math.max(0,d-1),y.value=!1}function z(){var o;const t=(o=document.querySelector(`.${c}`))==null?void 0:o.closest(".el-overlay");!t||!l.open||(y.value?(y.value=!1,t.style.display="block",h&&(h=!1,d=Math.max(0,d-1)),x()):(y.value=!0,t.style.display="none",h=!0,d+=1,_.value=window.innerHeight-50-d*60))}return(t,o)=>{const n=R.ElIcon,i=R.ElDialog;return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(i,{ref:"dialogRef",class:e.normalizeClass(["qy-dialog",[l.size==="small"&&"[&_.el-dialog__header]:!hidden",c]]),"model-value":D.value,title:l.title,width:l.width,top:l.top,"align-center":"","append-to-body":"","destroy-on-close":l.destroyOnClose,"lock-scroll":l.lockScroll,style:{"--el-dialog-padding-primary":0},"show-close":!1,"close-on-press-escape":!1,fullscreen:v.value,"z-index":q.value,onClosed:ee,onOpened:Q,draggable:l.draggable},e.createSlots({header:e.withCtx(()=>[l.size==="default"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({borderBottom:"1px solid",borderColor:S.value?"transparent":"var(--block-outline-color)",transition:"border-color .2s linear"}),class:"flex justify-between h-[var(--header-height)]",onDblclick:te},[e.createElementVNode("div",ae,[e.unref(E).header?e.unref(E).header?(e.openBlock(),e.createElementBlock("div",ie,[e.renderSlot(t.$slots,"header")])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(l.title),1))]),e.createElementVNode("div",{class:"flex",onMousedown:o[4]||(o[4]=e.withModifiers(()=>{},["stop"]))},[l.size==="default"&&l.minimizable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qy-dialog__btn qy-dialog__btn--default",onClick:e.withModifiers(z,["stop"]),onMousedown:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},[...o[7]||(o[7]=[e.createElementVNode("span",{class:"icon-[material-symbols--minimize] text-xl mb-3",role:"img","aria-hidden":"true"},null,-1)])],32)):e.createCommentVNode("",!0),l.showFullscreen?(e.openBlock(),e.createElementBlock("div",{key:1,class:"qy-dialog__btn qy-dialog__btn--default",onClick:e.withModifiers($,["stop"]),onMousedown:o[1]||(o[1]=e.withModifiers(()=>{},["stop"]))},[v.value?(e.openBlock(),e.createElementBlock("span",de)):(e.openBlock(),e.createElementBlock("span",se))],32)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"qy-dialog__btn qy-dialog__btn--danger",onClick:o[2]||(o[2]=e.withModifiers(s=>u("header"),["stop"])),onMousedown:o[3]||(o[3]=e.withModifiers(()=>{},["stop"]))},[...o[8]||(o[8]=[e.createElementVNode("span",{class:"icon-[ri--close-line] text-xl",role:"img","aria-hidden":"true"},null,-1)])],32)],32)],36)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["qy-dialog__wrapper",e.unref(le)(v.value&&"qy-dialog__wrapper--fullscreen")]),style:e.normalizeStyle({maxHeight:I.value?"calc(100vh - var(--header-height) - var(--footer-height) - var(--sides-gap))":"calc(100vh - var(--header-height) - var(--sides-gap))",padding:l.size==="small"?"var(--small-content-padding)":"var(--content-padding)"})},[l.size==="small"?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(n,{size:36,class:"cursor-pointer text-gray-100 active:scale-75 rounded-sm transition-all",onClick:o[5]||(o[5]=s=>u("header"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.Close))]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default")],6)]),_:2},[l.showFooter&&!t.$slots.footer&&Array.isArray(B.value)?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",ue,[e.createElementVNode("div",null,[e.renderSlot(t.$slots,"footer-left")]),e.createElementVNode("div",{class:e.normalizeClass([{"qy-dialog__footer--outline":C.value},"qy-dialog__footer flex items-center justify-end"])},[B.value.includes("cancel")?(e.openBlock(),e.createBlock(Z,{key:0})):e.createCommentVNode("",!0),B.value.includes("confirm")?(e.openBlock(),e.createBlock(T,{key:1})):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"footer-append")],2)])]),key:"0"}:I.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([{"qy-dialog__footer--outline":C.value},"qy-dialog__footer px-[var(--content-padding)] min-h-[var(--footer-height)] flex items-center justify-end"])},[e.renderSlot(t.$slots,"footer",{layouts:V.value,layoutsNode:Object.values(V.value)})],2)]),key:"1"}:void 0]),1032,["class","model-value","title","width","top","destroy-on-close","lock-scroll","fullscreen","z-index","draggable"]),e.withDirectives(e.createElementVNode("div",{ref_key:"minimizedRef",ref:w,class:"fixed left-0 top-0 bg-white rounded shadow-lg cursor-pointer z-[9999] hover:bg-gray-50",style:e.normalizeStyle([J.value,{width:"300px",height:"50px","will-change":"transform"}])},[e.createElementVNode("div",fe,[e.createElementVNode("div",me,[o[9]||(o[9]=e.createElementVNode("div",{class:"icon-[mdi--window-restore] text-gray-600"},null,-1)),e.createElementVNode("span",pe,e.toDisplayString(l.title),1)]),e.createElementVNode("div",ye,[e.createElementVNode("div",{class:"p-1 hover:bg-gray-200 rounded",onClick:e.withModifiers(z,["stop"])},[...o[10]||(o[10]=[e.createElementVNode("div",{class:"icon-[mdi--window-maximize] text-gray-600"},null,-1)])]),e.createElementVNode("div",{class:"p-1 hover:bg-red-100 rounded",onClick:o[6]||(o[6]=e.withModifiers(s=>u("header"),["stop"]))},[...o[11]||(o[11]=[e.createElementVNode("div",{class:"icon-[mdi--close] text-red-600"},null,-1)])])])])],4),[[e.vShow,y.value]])])}}});exports._sfc_main=ge;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("vue"),f=require("element-plus"),n=["success","warning","info","error"],a=["401","403","404","500"],m=t=>t==="class"||t==="style"||t==="id"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-"),o={status:{type:String,default:"info",validator:t=>[...n,...a].includes(t)},title:{type:String,default:""},description:{type:String,default:""},image:{type:String,default:""},imageAlt:{type:String,default:""}},v=i.defineComponent({name:"QyResult",inheritAttrs:!1,props:o,setup(t,{attrs:r,slots:e}){const u=i.computed(()=>Object.fromEntries(Object.entries(r).filter(([s])=>m(s)))),l=i.computed(()=>["qy-result",`qy-result--${t.status}`,u.value.class]),c=i.computed(()=>["qy-result__renderer",`qy-result--${t.status}`]),d=()=>{if(e.visual)return e.visual();if(t.image)return i.h("img",{class:"qy-result__image",src:t.image,alt:t.imageAlt});if(a.includes(t.status))return i.h("div",{class:"qy-result__http-visual","aria-hidden":"true"},t.status)};return()=>{const s={};return(e.visual||t.image||a.includes(t.status))&&(s.icon=d),e.title&&(s.title=e.title),e.description&&(s["sub-title"]=e.description),e.actions&&(s.extra=e.actions),i.h("div",{...u.value,class:l.value,title:t.title},[i.h(f.ElResult,{class:c.value,icon:n.includes(t.status)?t.status:void 0,title:e.title?"":t.title,subTitle:e.description?"":t.description},s)])}}});exports._sfc_main=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),F=require("element-plus"),W=["id","role","aria-disabled","tabindex","disabled","onKeydown"],j={class:"qy-color-picker__value","aria-hidden":"true"};let G=0;const H=()=>`qy-color-picker-${++G}`,J=a.defineComponent({name:"QyColorPicker",inheritAttrs:!1,__name:"index",props:{modelValue:{default:null},format:{default:void 0},showAlpha:{type:Boolean,default:!1},predefine:{default:void 0},size:{default:"default"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","active-change","change","visible-change"],setup(R,{emit:D}){const n=R,i=D,c=a.useAttrs(),g=a.ref(null),k=a.ref(null),p=a.ref(null),r=a.ref(u(n.modelValue)),h=a.ref(r.value),t=a.ref(!1),o=a.ref(null),s=a.ref(!1),f=a.ref(!1),w=H(),L=a.computed(()=>typeof c.id=="string"&&c.id||w),_=`qy-color-picker__popper--${w}`,z=a.computed(()=>n.format||(n.showAlpha?"rgb":"hex")),m=a.computed(()=>u(n.modelValue)),B=a.computed(()=>String(c.role||"button")),I=a.computed(()=>c["aria-disabled"]??(n.disabled?"true":"false")),K=a.computed(()=>n.disabled?void 0:c.tabindex??0),N=a.computed(()=>{const e={};for(const[l,d]of Object.entries(c)){const b=l.toLowerCase();(l==="class"||l==="style"||l==="id"||l==="title"||l==="tabindex"||l==="role"||b.startsWith("data-")||b.startsWith("aria-")||["onkeydown","onkeyup","onkeypress"].includes(b))&&(e[l]=d)}return e});a.watch(()=>n.modelValue,e=>{r.value=u(e),t.value&&(h.value=r.value)});function u(e){return e==null||e===""?null:String(e)}function S(){if(!n.disabled){if(t.value){v();return}V()}}function C(){n.disabled||t.value||V()}function T(){t.value&&v()}function V(){t.value||n.disabled||(h.value=u(n.modelValue),r.value=h.value,o.value=null,s.value=!1,f.value=!1,t.value=!0,$(),i("visible-change",!0),a.nextTick(()=>{var e,l;return(l=(e=p.value)==null?void 0:e.show)==null?void 0:l.call(e)}))}function M(e){!t.value||o.value||(r.value=u(e),i("active-change",r.value))}function O(e){!t.value||o.value==="cancel"||(r.value=u(e),s.value||(s.value=!0,o.value="commit",i("update:modelValue",r.value)))}function Q(e){!t.value||o.value==="cancel"||(r.value=u(e),s.value||(s.value=!0,o.value="commit",i("update:modelValue",r.value)),f.value||(f.value=!0,i("change",r.value)),y())}function U(){!t.value||o.value==="cancel"||(s.value||(s.value=!0,o.value="commit",r.value=null,i("update:modelValue",null)),f.value||(f.value=!0,i("change",null)),y())}function v(){var e,l;!t.value||o.value||(o.value="cancel",r.value=u(n.modelValue),(l=(e=p.value)==null?void 0:e.hide)==null||l.call(e),y())}function y(){var e,l;t.value&&(t.value=!1,P(),(l=(e=p.value)==null?void 0:e.hide)==null||l.call(e),i("visible-change",!1),a.nextTick(()=>{var d;return(d=k.value)==null?void 0:d.focus()}))}function E(e){var l,d;return e instanceof Node?(l=g.value)!=null&&l.contains(e)?!0:!!((d=e.closest)!=null&&d.call(e,`.${_}`)):!1}function x(e){t.value&&!E(e.target)&&v()}function q(e){t.value&&!E(e.target)&&v()}function A(e){t.value&&e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),v())}function $(){document.addEventListener("pointerdown",x,!0),document.addEventListener("focusin",q,!0),document.addEventListener("keydown",A,!0)}function P(){document.removeEventListener("pointerdown",x,!0),document.removeEventListener("focusin",q,!0),document.removeEventListener("keydown",A,!0)}return a.onBeforeUnmount(()=>{P()}),(e,l)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"rootRef",ref:g,class:"qy-color-picker","data-qy-color-picker":""},[a.createElementVNode("button",a.mergeProps({ref_key:"triggerRef",ref:k,type:"button",class:"qy-color-picker__trigger"},N.value,{id:L.value,role:B.value,"aria-disabled":I.value,tabindex:K.value,disabled:n.disabled,class:{"is-disabled":n.disabled,"is-open":t.value},onClick:S,onKeydown:[a.withKeys(a.withModifiers(C,["prevent"]),["enter"]),a.withKeys(a.withModifiers(C,["prevent"]),["space"]),a.withKeys(a.withModifiers(T,["prevent"]),["esc"])]}),[a.createElementVNode("span",{class:a.normalizeClass(["qy-color-picker__swatch",{"is-empty":!m.value}]),style:a.normalizeStyle(m.value?{backgroundColor:m.value}:void 0),"aria-hidden":"true"},null,6),a.createElementVNode("span",j,a.toDisplayString(m.value||"选择颜色"),1),l[0]||(l[0]=a.createElementVNode("span",{class:"qy-color-picker__arrow","aria-hidden":"true"},"⌄",-1))],16,W),a.createVNode(a.unref(F.ElColorPicker),{ref_key:"rendererRef",ref:p,class:"qy-color-picker__renderer","model-value":r.value,"show-alpha":n.showAlpha,"color-format":z.value,predefine:n.predefine,size:n.size,disabled:!1,clearable:n.clearable,teleported:!0,tabindex:-1,"popper-class":_,"aria-hidden":"true",onActiveChange:M,"onUpdate:modelValue":O,onChange:Q,onClear:U},null,8,["model-value","show-alpha","color-format","predefine","size","clearable"])],512))}});exports._sfc_main=J;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as x, useAttrs as A, ref as r, computed as i, watch as C, openBlock as b, createBlock as g, unref as N, mergeProps as B, withCtx as P, renderSlot as j, nextTick as w } from "vue";
|
|
2
|
+
import { ElCollapse as E } from "element-plus";
|
|
3
|
+
const O = /* @__PURE__ */ x({
|
|
4
|
+
name: "QyCollapse",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: () => [] },
|
|
9
|
+
accordion: { type: Boolean, default: !1 },
|
|
10
|
+
expandIconPosition: { default: "right" },
|
|
11
|
+
beforeCollapse: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue", "change"],
|
|
14
|
+
setup(a, { expose: d, emit: u }) {
|
|
15
|
+
const t = a, n = u, m = A(), s = r(), l = r(t.modelValue), f = i(
|
|
16
|
+
() => Object.fromEntries(
|
|
17
|
+
Object.entries(m).filter(
|
|
18
|
+
([e]) => e === "class" || e === "style" || e === "id" || e === "role" || e === "title" || e.startsWith("data-") || e.startsWith("aria-")
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
function c(e) {
|
|
23
|
+
const o = Array.isArray(e) ? e : [e];
|
|
24
|
+
return t.accordion ? o.slice(0, 1) : o;
|
|
25
|
+
}
|
|
26
|
+
C(
|
|
27
|
+
() => t.modelValue,
|
|
28
|
+
(e) => {
|
|
29
|
+
l.value = e;
|
|
30
|
+
},
|
|
31
|
+
{ deep: !0 }
|
|
32
|
+
);
|
|
33
|
+
const p = i(() => c(t.modelValue));
|
|
34
|
+
function h(e) {
|
|
35
|
+
l.value = e, n("update:modelValue", e), w(() => {
|
|
36
|
+
l.value = t.modelValue;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function V(e) {
|
|
40
|
+
n("change", e);
|
|
41
|
+
}
|
|
42
|
+
function v(e) {
|
|
43
|
+
var o;
|
|
44
|
+
(o = s.value) == null || o.setActiveNames(c(e));
|
|
45
|
+
}
|
|
46
|
+
return d({ activeNames: p, setActiveNames: v }), (e, o) => (b(), g(N(E), B({
|
|
47
|
+
ref_key: "collapseRef",
|
|
48
|
+
ref: s
|
|
49
|
+
}, f.value, {
|
|
50
|
+
class: "qy-collapse",
|
|
51
|
+
"model-value": l.value,
|
|
52
|
+
accordion: a.accordion,
|
|
53
|
+
"expand-icon-position": a.expandIconPosition,
|
|
54
|
+
"before-collapse": a.beforeCollapse,
|
|
55
|
+
"onUpdate:modelValue": h,
|
|
56
|
+
onChange: V
|
|
57
|
+
}), {
|
|
58
|
+
default: P(() => [
|
|
59
|
+
j(e.$slots, "default")
|
|
60
|
+
]),
|
|
61
|
+
_: 3
|
|
62
|
+
}, 16, ["model-value", "accordion", "expand-icon-position", "before-collapse"]));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
O as _
|
|
67
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { defineComponent as J, useAttrs as X, ref as o, computed as c, watch as Y, onBeforeUnmount as Z, openBlock as ee, createElementBlock as ae, createElementVNode as b, mergeProps as le, withKeys as _, withModifiers as w, normalizeStyle as ne, normalizeClass as te, toDisplayString as re, createVNode as oe, unref as ie, nextTick as B } from "vue";
|
|
2
|
+
import { ElColorPicker as ue } from "element-plus";
|
|
3
|
+
const se = ["id", "role", "aria-disabled", "tabindex", "disabled", "onKeydown"], de = {
|
|
4
|
+
class: "qy-color-picker__value",
|
|
5
|
+
"aria-hidden": "true"
|
|
6
|
+
};
|
|
7
|
+
let ce = 0;
|
|
8
|
+
const fe = () => `qy-color-picker-${++ce}`, me = /* @__PURE__ */ J({
|
|
9
|
+
name: "QyColorPicker",
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: { default: null },
|
|
14
|
+
format: { default: void 0 },
|
|
15
|
+
showAlpha: { type: Boolean, default: !1 },
|
|
16
|
+
predefine: { default: void 0 },
|
|
17
|
+
size: { default: "default" },
|
|
18
|
+
disabled: { type: Boolean, default: !1 },
|
|
19
|
+
clearable: { type: Boolean, default: !1 }
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue", "active-change", "change", "visible-change"],
|
|
22
|
+
setup(I, { emit: K }) {
|
|
23
|
+
const l = I, i = K, f = X(), C = o(null), V = o(null), m = o(null), t = o(u(l.modelValue)), g = o(t.value), n = o(!1), r = o(null), s = o(!1), v = o(!1), E = fe(), N = c(() => typeof f.id == "string" && f.id || E), x = `qy-color-picker__popper--${E}`, S = c(
|
|
24
|
+
() => l.format || (l.showAlpha ? "rgb" : "hex")
|
|
25
|
+
), h = c(() => u(l.modelValue)), O = c(() => String(f.role || "button")), Q = c(
|
|
26
|
+
() => f["aria-disabled"] ?? (l.disabled ? "true" : "false")
|
|
27
|
+
), T = c(
|
|
28
|
+
() => l.disabled ? void 0 : f.tabindex ?? 0
|
|
29
|
+
), U = c(() => {
|
|
30
|
+
const e = {};
|
|
31
|
+
for (const [a, d] of Object.entries(f)) {
|
|
32
|
+
const k = a.toLowerCase();
|
|
33
|
+
(a === "class" || a === "style" || a === "id" || a === "title" || a === "tabindex" || a === "role" || k.startsWith("data-") || k.startsWith("aria-") || ["onkeydown", "onkeyup", "onkeypress"].includes(k)) && (e[a] = d);
|
|
34
|
+
}
|
|
35
|
+
return e;
|
|
36
|
+
});
|
|
37
|
+
Y(
|
|
38
|
+
() => l.modelValue,
|
|
39
|
+
(e) => {
|
|
40
|
+
t.value = u(e), n.value && (g.value = t.value);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
function u(e) {
|
|
44
|
+
return e == null || e === "" ? null : String(e);
|
|
45
|
+
}
|
|
46
|
+
function $() {
|
|
47
|
+
if (!l.disabled) {
|
|
48
|
+
if (n.value) {
|
|
49
|
+
p();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
R();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function A() {
|
|
56
|
+
l.disabled || n.value || R();
|
|
57
|
+
}
|
|
58
|
+
function F() {
|
|
59
|
+
n.value && p();
|
|
60
|
+
}
|
|
61
|
+
function R() {
|
|
62
|
+
n.value || l.disabled || (g.value = u(l.modelValue), t.value = g.value, r.value = null, s.value = !1, v.value = !1, n.value = !0, H(), i("visible-change", !0), B(() => {
|
|
63
|
+
var e, a;
|
|
64
|
+
return (a = (e = m.value) == null ? void 0 : e.show) == null ? void 0 : a.call(e);
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function W(e) {
|
|
68
|
+
!n.value || r.value || (t.value = u(e), i("active-change", t.value));
|
|
69
|
+
}
|
|
70
|
+
function j(e) {
|
|
71
|
+
!n.value || r.value === "cancel" || (t.value = u(e), s.value || (s.value = !0, r.value = "commit", i("update:modelValue", t.value)));
|
|
72
|
+
}
|
|
73
|
+
function M(e) {
|
|
74
|
+
!n.value || r.value === "cancel" || (t.value = u(e), s.value || (s.value = !0, r.value = "commit", i("update:modelValue", t.value)), v.value || (v.value = !0, i("change", t.value)), y());
|
|
75
|
+
}
|
|
76
|
+
function G() {
|
|
77
|
+
!n.value || r.value === "cancel" || (s.value || (s.value = !0, r.value = "commit", t.value = null, i("update:modelValue", null)), v.value || (v.value = !0, i("change", null)), y());
|
|
78
|
+
}
|
|
79
|
+
function p() {
|
|
80
|
+
var e, a;
|
|
81
|
+
!n.value || r.value || (r.value = "cancel", t.value = u(l.modelValue), (a = (e = m.value) == null ? void 0 : e.hide) == null || a.call(e), y());
|
|
82
|
+
}
|
|
83
|
+
function y() {
|
|
84
|
+
var e, a;
|
|
85
|
+
n.value && (n.value = !1, z(), (a = (e = m.value) == null ? void 0 : e.hide) == null || a.call(e), i("visible-change", !1), B(() => {
|
|
86
|
+
var d;
|
|
87
|
+
return (d = V.value) == null ? void 0 : d.focus();
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
function P(e) {
|
|
91
|
+
var a, d;
|
|
92
|
+
return e instanceof Node ? (a = C.value) != null && a.contains(e) ? !0 : !!((d = e.closest) != null && d.call(e, `.${x}`)) : !1;
|
|
93
|
+
}
|
|
94
|
+
function q(e) {
|
|
95
|
+
n.value && !P(e.target) && p();
|
|
96
|
+
}
|
|
97
|
+
function D(e) {
|
|
98
|
+
n.value && !P(e.target) && p();
|
|
99
|
+
}
|
|
100
|
+
function L(e) {
|
|
101
|
+
n.value && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), p());
|
|
102
|
+
}
|
|
103
|
+
function H() {
|
|
104
|
+
document.addEventListener("pointerdown", q, !0), document.addEventListener("focusin", D, !0), document.addEventListener("keydown", L, !0);
|
|
105
|
+
}
|
|
106
|
+
function z() {
|
|
107
|
+
document.removeEventListener("pointerdown", q, !0), document.removeEventListener("focusin", D, !0), document.removeEventListener("keydown", L, !0);
|
|
108
|
+
}
|
|
109
|
+
return Z(() => {
|
|
110
|
+
z();
|
|
111
|
+
}), (e, a) => (ee(), ae("div", {
|
|
112
|
+
ref_key: "rootRef",
|
|
113
|
+
ref: C,
|
|
114
|
+
class: "qy-color-picker",
|
|
115
|
+
"data-qy-color-picker": ""
|
|
116
|
+
}, [
|
|
117
|
+
b("button", le({
|
|
118
|
+
ref_key: "triggerRef",
|
|
119
|
+
ref: V,
|
|
120
|
+
type: "button",
|
|
121
|
+
class: "qy-color-picker__trigger"
|
|
122
|
+
}, U.value, {
|
|
123
|
+
id: N.value,
|
|
124
|
+
role: O.value,
|
|
125
|
+
"aria-disabled": Q.value,
|
|
126
|
+
tabindex: T.value,
|
|
127
|
+
disabled: l.disabled,
|
|
128
|
+
class: { "is-disabled": l.disabled, "is-open": n.value },
|
|
129
|
+
onClick: $,
|
|
130
|
+
onKeydown: [
|
|
131
|
+
_(w(A, ["prevent"]), ["enter"]),
|
|
132
|
+
_(w(A, ["prevent"]), ["space"]),
|
|
133
|
+
_(w(F, ["prevent"]), ["esc"])
|
|
134
|
+
]
|
|
135
|
+
}), [
|
|
136
|
+
b("span", {
|
|
137
|
+
class: te(["qy-color-picker__swatch", { "is-empty": !h.value }]),
|
|
138
|
+
style: ne(h.value ? { backgroundColor: h.value } : void 0),
|
|
139
|
+
"aria-hidden": "true"
|
|
140
|
+
}, null, 6),
|
|
141
|
+
b("span", de, re(h.value || "选择颜色"), 1),
|
|
142
|
+
a[0] || (a[0] = b("span", {
|
|
143
|
+
class: "qy-color-picker__arrow",
|
|
144
|
+
"aria-hidden": "true"
|
|
145
|
+
}, "⌄", -1))
|
|
146
|
+
], 16, se),
|
|
147
|
+
oe(ie(ue), {
|
|
148
|
+
ref_key: "rendererRef",
|
|
149
|
+
ref: m,
|
|
150
|
+
class: "qy-color-picker__renderer",
|
|
151
|
+
"model-value": t.value,
|
|
152
|
+
"show-alpha": l.showAlpha,
|
|
153
|
+
"color-format": S.value,
|
|
154
|
+
predefine: l.predefine,
|
|
155
|
+
size: l.size,
|
|
156
|
+
disabled: !1,
|
|
157
|
+
clearable: l.clearable,
|
|
158
|
+
teleported: !0,
|
|
159
|
+
tabindex: -1,
|
|
160
|
+
"popper-class": x,
|
|
161
|
+
"aria-hidden": "true",
|
|
162
|
+
onActiveChange: W,
|
|
163
|
+
"onUpdate:modelValue": j,
|
|
164
|
+
onChange: M,
|
|
165
|
+
onClear: G
|
|
166
|
+
}, null, 8, ["model-value", "show-alpha", "color-format", "predefine", "size", "clearable"])
|
|
167
|
+
], 512));
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
export {
|
|
171
|
+
me as _
|
|
172
|
+
};
|