straw-ui-vue 0.1.12 → 0.1.14
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 +184 -21
- package/dist/{types/src/components → components}/st-button/index.d.ts +10 -10
- package/dist/components/st-button/st-button.d.ts +20 -0
- package/dist/{types/src/components → components}/st-button/types.d.ts +7 -7
- package/dist/components/st-cascade/index.d.ts +236 -0
- package/dist/components/st-cascade/st-cascade-panel.d.ts +29 -0
- package/dist/components/st-cascade/st-cascade.d.ts +60 -0
- package/dist/{types/src/components → components}/st-cascade/types.d.ts +10 -10
- package/dist/{types/src/components → components}/st-checkbox/index.d.ts +33 -33
- package/dist/components/st-checkbox/st-checkbox-group.d.ts +28 -0
- package/dist/components/st-checkbox/st-checkbox.d.ts +26 -0
- package/dist/{types/src/components → components}/st-checkbox/types.d.ts +11 -11
- package/dist/components/st-color-picker/index.d.ts +130 -0
- package/dist/{types/src/components → components}/st-color-picker/st-color-picker-panel.d.ts +8 -7
- package/dist/components/st-color-picker/st-color-picker.d.ts +35 -0
- package/dist/{types/src/components → components}/st-color-picker/types.d.ts +20 -20
- package/dist/components/st-color-picker/utils.d.ts +49 -0
- package/dist/components/st-date-picker/index.d.ts +131 -0
- package/dist/components/st-date-picker/st-date-picker-panel.d.ts +19 -0
- package/dist/components/st-date-picker/st-date-picker.d.ts +45 -0
- package/dist/{types/src/components → components}/st-date-picker/types.d.ts +13 -13
- package/dist/components/st-datetime-picker/index.d.ts +136 -0
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.d.ts +20 -0
- package/dist/components/st-datetime-picker/st-datetime-picker.d.ts +46 -0
- package/dist/{types/src/components → components}/st-datetime-picker/types.d.ts +14 -14
- package/dist/{types/src/components → components}/st-dialog/index.d.ts +81 -90
- package/dist/components/st-dialog/st-dialog-body.d.ts +17 -0
- package/dist/components/st-dialog/st-dialog-close.d.ts +6 -0
- package/dist/components/st-dialog/st-dialog-container.d.ts +35 -0
- package/dist/components/st-dialog/st-dialog-content.d.ts +20 -0
- package/dist/components/st-dialog/st-dialog-footer.d.ts +17 -0
- package/dist/components/st-dialog/st-dialog-fullscreen.d.ts +6 -0
- package/dist/components/st-dialog/st-dialog-header.d.ts +17 -0
- package/dist/components/st-dialog/st-dialog-overlay.d.ts +7 -0
- package/dist/components/st-dialog/st-dialog-title.d.ts +18 -0
- package/dist/{types/src/components → components}/st-dialog/st-dialog.d.ts +16 -16
- package/dist/{types/src/components → components}/st-dialog/types.d.ts +13 -13
- package/dist/components/st-divider/index.d.ts +29 -0
- package/dist/components/st-divider/st-divider.d.ts +15 -0
- package/dist/{types/src/components → components}/st-divider/types.d.ts +8 -8
- package/dist/{types/src/components → components}/st-drawer/index.d.ts +14 -12
- package/dist/components/st-drawer/st-drawer-group.d.ts +13 -0
- package/dist/{types/src/components → components}/st-drawer/st-drawer.d.ts +16 -17
- package/dist/{types/src/components → components}/st-drawer/types.d.ts +14 -14
- package/dist/{types/src/components → components}/st-empty/index.d.ts +4 -4
- package/dist/components/st-empty/st-empty.d.ts +13 -0
- package/dist/{types/src/components → components}/st-empty/types.d.ts +2 -2
- package/dist/components/st-form-control/index.d.ts +17 -0
- package/dist/components/st-form-control/st-form-control.d.ts +11 -0
- package/dist/{types/src/components → components}/st-form-control/types.d.ts +2 -2
- package/dist/components/st-form-description/index.d.ts +19 -0
- package/dist/components/st-form-description/st-form-description.d.ts +14 -0
- package/dist/{types/src/components → components}/st-form-description/types.d.ts +2 -2
- package/dist/{types/src/components → components}/st-form-field/index.d.ts +9 -9
- package/dist/components/st-form-field/st-form-field.d.ts +35 -0
- package/dist/{types/src/components → components}/st-form-field/types.d.ts +6 -6
- package/dist/components/st-form-item/index.d.ts +19 -0
- package/dist/components/st-form-item/st-form-item.d.ts +14 -0
- package/dist/{types/src/components → components}/st-form-item/types.d.ts +2 -2
- package/dist/{types/src/components → components}/st-form-label/index.d.ts +4 -4
- package/dist/components/st-form-label/st-form-label.d.ts +16 -0
- package/dist/{types/src/components → components}/st-form-label/types.d.ts +3 -3
- package/dist/components/st-form-message/index.d.ts +19 -0
- package/dist/components/st-form-message/st-form-message.d.ts +14 -0
- package/dist/{types/src/components → components}/st-form-message/types.d.ts +2 -2
- package/dist/{types/src/components → components}/st-image/index.d.ts +13 -12
- package/dist/{types/src/components → components}/st-image/st-image-preview.d.ts +4 -3
- package/dist/{types/src/components → components}/st-image/st-image.d.ts +12 -15
- package/dist/{types/src/components → components}/st-image/types.d.ts +7 -7
- package/dist/{types/src/components → components}/st-input/index.d.ts +243 -764
- package/dist/components/st-input/st-input-group-addon.d.ts +17 -0
- package/dist/components/st-input/st-input-group-button.d.ts +15 -0
- package/dist/{types/src/components → components}/st-input/st-input-group-input.d.ts +9 -14
- package/dist/components/st-input/st-input-group-text.d.ts +17 -0
- package/dist/{types/src/components → components}/st-input/st-input-group-textarea.d.ts +8 -13
- package/dist/components/st-input/st-input-group.d.ts +13 -0
- package/dist/components/st-input/st-input-number.d.ts +29 -0
- package/dist/components/st-input/st-input.d.ts +133 -0
- package/dist/components/st-input/st-textarea.d.ts +132 -0
- package/dist/{types/src/components → components}/st-input/types.d.ts +33 -33
- package/dist/components/st-label/index.d.ts +19 -0
- package/dist/components/st-label/st-label.d.ts +14 -0
- package/dist/{types/src/components → components}/st-label/types.d.ts +2 -2
- package/dist/components/st-menu/index.d.ts +437 -0
- package/dist/components/st-menu/st-menu-container.d.ts +27 -0
- package/dist/components/st-menu/st-menu-content.d.ts +19 -0
- package/dist/components/st-menu/st-menu-divider.d.ts +7 -0
- package/dist/components/st-menu/st-menu-group.d.ts +21 -0
- package/dist/{types/src/components → components}/st-menu/st-menu-item.d.ts +10 -13
- package/dist/components/st-menu/st-menu-node.d.ts +10 -0
- package/dist/components/st-menu/st-menu-trigger.d.ts +19 -0
- package/dist/components/st-menu/st-menu.d.ts +21 -0
- package/dist/{types/src/components → components}/st-menu/types.d.ts +31 -31
- package/dist/{types/src/components → components}/st-pagination/index.d.ts +17 -33
- package/dist/components/st-pagination/st-pagination.d.ts +44 -0
- package/dist/{types/src/components → components}/st-pagination/types.d.ts +6 -6
- package/dist/{types/src/components → components}/st-popover/index.d.ts +69 -184
- package/dist/components/st-popover/st-popover-arrow.d.ts +12 -0
- package/dist/{types/src/components → components}/st-popover/st-popover-container.d.ts +14 -18
- package/dist/components/st-popover/st-popover-content.d.ts +33 -0
- package/dist/components/st-popover/st-popover-trigger.d.ts +29 -0
- package/dist/components/st-popover/st-popover.d.ts +42 -0
- package/dist/{types/src/components → components}/st-popover/types.d.ts +13 -13
- package/dist/{types/src/components → components}/st-progress/index.d.ts +10 -9
- package/dist/components/st-progress/st-progress.d.ts +21 -0
- package/dist/{types/src/components → components}/st-progress/types.d.ts +6 -6
- package/dist/{types/src/components → components}/st-radio/index.d.ts +33 -33
- package/dist/components/st-radio/st-radio-group.d.ts +29 -0
- package/dist/components/st-radio/st-radio.d.ts +27 -0
- package/dist/{types/src/components → components}/st-radio/types.d.ts +11 -11
- package/dist/components/st-scrollbar/index.d.ts +41 -0
- package/dist/components/st-scrollbar/st-scrollbar.d.ts +22 -0
- package/dist/{types/src/components → components}/st-scrollbar/types.d.ts +6 -6
- package/dist/{types/src/components → components}/st-segmented/index.d.ts +6 -8
- package/dist/{types/src/components → components}/st-segmented/st-segmented.d.ts +9 -9
- package/dist/{types/src/components → components}/st-segmented/types.d.ts +5 -5
- package/dist/components/st-select/index.d.ts +1161 -0
- package/dist/{types/src/components → components}/st-select/st-select-container.d.ts +9 -13
- package/dist/components/st-select/st-select-content.d.ts +22 -0
- package/dist/components/st-select/st-select-empty.d.ts +22 -0
- package/dist/components/st-select/st-select-group.d.ts +24 -0
- package/dist/{types/src/components → components}/st-select/st-select-item.d.ts +4 -3
- package/dist/components/st-select/st-select-trigger.d.ts +139 -0
- package/dist/components/st-select/st-select.d.ts +59 -0
- package/dist/{types/src/components → components}/st-select/types.d.ts +13 -13
- package/dist/components/st-sidebar/index.d.ts +17 -0
- package/dist/components/st-sidebar/st-sidebar.d.ts +11 -0
- package/dist/{types/src/components → components}/st-sidebar-item/index.d.ts +2 -6
- package/dist/components/st-sidebar-item/st-sidebar-item.d.ts +11 -0
- package/dist/{types/src/components → components}/st-skeleton/index.d.ts +22 -21
- package/dist/components/st-skeleton/st-skeleton-item.d.ts +17 -0
- package/dist/components/st-skeleton/st-skeleton.d.ts +20 -0
- package/dist/{types/src/components → components}/st-skeleton/types.d.ts +6 -6
- package/dist/{types/src/components → components}/st-slider/index.d.ts +22 -23
- package/dist/components/st-slider/st-slider.d.ts +52 -0
- package/dist/{types/src/components → components}/st-slider/types.d.ts +6 -6
- package/dist/components/st-splitter/index.d.ts +25 -0
- package/dist/components/st-splitter/st-splitter.d.ts +16 -0
- package/dist/{types/src/components → components}/st-splitter/types.d.ts +16 -16
- package/dist/{types/src/components → components}/st-splitter/useSplitter.d.ts +3 -3
- package/dist/{types/src/components → components}/st-splitter-panel/index.d.ts +8 -10
- package/dist/components/st-splitter-panel/st-splitter-panel.d.ts +33 -0
- package/dist/{types/src/components → components}/st-splitter-panel/types.d.ts +7 -7
- package/dist/{types/src/components → components}/st-switch/index.d.ts +7 -7
- package/dist/components/st-switch/st-switch.d.ts +27 -0
- package/dist/{types/src/components → components}/st-switch/types.d.ts +3 -3
- package/dist/{types/src/components → components}/st-tabs/index.d.ts +25 -39
- package/dist/components/st-tabs/st-tabs-pane.d.ts +17 -0
- package/dist/components/st-tabs/st-tabs.d.ts +35 -0
- package/dist/{types/src/components → components}/st-tabs/types.d.ts +17 -17
- package/dist/{types/src/components → components}/st-tag/index.d.ts +12 -11
- package/dist/components/st-tag/st-tag.d.ts +28 -0
- package/dist/{types/src/components → components}/st-tag/types.d.ts +7 -7
- package/dist/components/st-time-picker/index.d.ts +142 -0
- package/dist/components/st-time-picker/st-time-picker-panel.d.ts +23 -0
- package/dist/components/st-time-picker/st-time-picker.d.ts +38 -0
- package/dist/{types/src/components → components}/st-time-picker/types.d.ts +20 -20
- package/dist/{types/src/components → components}/st-toggle/index.d.ts +9 -8
- package/dist/components/st-toggle/st-toggle.d.ts +36 -0
- package/dist/{types/src/components → components}/st-toggle/types.d.ts +5 -5
- package/dist/{types/src/components → components}/st-tooltip/index.d.ts +35 -155
- package/dist/{types/src/components → components}/st-tooltip/st-tooltip-container.d.ts +10 -14
- package/dist/{types/src/components → components}/st-tooltip/st-tooltip-content.d.ts +8 -16
- package/dist/components/st-tooltip/st-tooltip-trigger.d.ts +23 -0
- package/dist/components/st-tooltip/st-tooltip.d.ts +33 -0
- package/dist/{types/src/components → components}/st-tooltip/types.d.ts +15 -15
- package/dist/{types/src/components → components}/st-tree/index.d.ts +12 -12
- package/dist/components/st-tree/st-tree-node.d.ts +4 -0
- package/dist/{types/src/components → components}/st-tree/st-tree.d.ts +13 -5
- package/dist/{types/src/components → components}/st-tree/types.d.ts +6 -6
- package/dist/{types/src/generated-safelist.d.ts → generated-safelist.d.ts} +1 -1
- package/dist/{types/src/index.d.ts → index.d.ts} +2 -2
- package/dist/straw-ui.js +340 -291
- package/dist/{types/src/unocss-preset.d.ts → unocss-preset.d.ts} +1 -1
- package/package.json +7 -9
- package/dist/straw-ui.css +0 -2
- package/dist/types/src/components/st-button/st-button.d.ts +0 -25
- package/dist/types/src/components/st-cascade/index.d.ts +0 -898
- package/dist/types/src/components/st-cascade/st-cascade-panel.d.ts +0 -33
- package/dist/types/src/components/st-cascade/st-cascade.d.ts +0 -1362
- package/dist/types/src/components/st-checkbox/st-checkbox-group.d.ts +0 -32
- package/dist/types/src/components/st-checkbox/st-checkbox.d.ts +0 -30
- package/dist/types/src/components/st-color-picker/index.d.ts +0 -753
- package/dist/types/src/components/st-color-picker/st-color-picker.d.ts +0 -646
- package/dist/types/src/components/st-color-picker/utils.d.ts +0 -49
- package/dist/types/src/components/st-date-picker/index.d.ts +0 -713
- package/dist/types/src/components/st-date-picker/st-date-picker-panel.d.ts +0 -18
- package/dist/types/src/components/st-date-picker/st-date-picker.d.ts +0 -1192
- package/dist/types/src/components/st-datetime-picker/index.d.ts +0 -3475
- package/dist/types/src/components/st-datetime-picker/st-datetime-picker-panel.d.ts +0 -928
- package/dist/types/src/components/st-datetime-picker/st-datetime-picker.d.ts +0 -3079
- package/dist/types/src/components/st-dialog/st-dialog-body.d.ts +0 -21
- package/dist/types/src/components/st-dialog/st-dialog-close.d.ts +0 -5
- package/dist/types/src/components/st-dialog/st-dialog-container.d.ts +0 -42
- package/dist/types/src/components/st-dialog/st-dialog-content.d.ts +0 -28
- package/dist/types/src/components/st-dialog/st-dialog-footer.d.ts +0 -21
- package/dist/types/src/components/st-dialog/st-dialog-fullscreen.d.ts +0 -5
- package/dist/types/src/components/st-dialog/st-dialog-header.d.ts +0 -25
- package/dist/types/src/components/st-dialog/st-dialog-overlay.d.ts +0 -6
- package/dist/types/src/components/st-dialog/st-dialog-title.d.ts +0 -22
- package/dist/types/src/components/st-divider/index.d.ts +0 -29
- package/dist/types/src/components/st-divider/st-divider.d.ts +0 -20
- package/dist/types/src/components/st-empty/st-empty.d.ts +0 -18
- package/dist/types/src/components/st-form-control/index.d.ts +0 -17
- package/dist/types/src/components/st-form-control/st-form-control.d.ts +0 -16
- package/dist/types/src/components/st-form-description/index.d.ts +0 -19
- package/dist/types/src/components/st-form-description/st-form-description.d.ts +0 -18
- package/dist/types/src/components/st-form-field/st-form-field.d.ts +0 -38
- package/dist/types/src/components/st-form-item/index.d.ts +0 -19
- package/dist/types/src/components/st-form-item/st-form-item.d.ts +0 -18
- package/dist/types/src/components/st-form-label/st-form-label.d.ts +0 -20
- package/dist/types/src/components/st-form-message/index.d.ts +0 -19
- package/dist/types/src/components/st-form-message/st-form-message.d.ts +0 -18
- package/dist/types/src/components/st-input/st-input-group-addon.d.ts +0 -22
- package/dist/types/src/components/st-input/st-input-group-button.d.ts +0 -19
- package/dist/types/src/components/st-input/st-input-group-text.d.ts +0 -21
- package/dist/types/src/components/st-input/st-input-group.d.ts +0 -18
- package/dist/types/src/components/st-input/st-input-number.d.ts +0 -86
- package/dist/types/src/components/st-input/st-input.d.ts +0 -267
- package/dist/types/src/components/st-input/st-textarea.d.ts +0 -266
- package/dist/types/src/components/st-label/index.d.ts +0 -19
- package/dist/types/src/components/st-label/st-label.d.ts +0 -18
- package/dist/types/src/components/st-menu/index.d.ts +0 -699
- package/dist/types/src/components/st-menu/st-menu-container.d.ts +0 -34
- package/dist/types/src/components/st-menu/st-menu-content.d.ts +0 -23
- package/dist/types/src/components/st-menu/st-menu-divider.d.ts +0 -6
- package/dist/types/src/components/st-menu/st-menu-group.d.ts +0 -25
- package/dist/types/src/components/st-menu/st-menu-node.d.ts +0 -9
- package/dist/types/src/components/st-menu/st-menu-trigger.d.ts +0 -23
- package/dist/types/src/components/st-menu/st-menu.d.ts +0 -503
- package/dist/types/src/components/st-pagination/st-pagination.d.ts +0 -51
- package/dist/types/src/components/st-popover/st-popover-arrow.d.ts +0 -11
- package/dist/types/src/components/st-popover/st-popover-content.d.ts +0 -40
- package/dist/types/src/components/st-popover/st-popover-trigger.d.ts +0 -36
- package/dist/types/src/components/st-popover/st-popover.d.ts +0 -250
- package/dist/types/src/components/st-progress/st-progress.d.ts +0 -24
- package/dist/types/src/components/st-radio/st-radio-group.d.ts +0 -33
- package/dist/types/src/components/st-radio/st-radio.d.ts +0 -31
- package/dist/types/src/components/st-scrollbar/index.d.ts +0 -64
- package/dist/types/src/components/st-scrollbar/st-scrollbar.d.ts +0 -37
- package/dist/types/src/components/st-select/index.d.ts +0 -1938
- package/dist/types/src/components/st-select/st-select-content.d.ts +0 -26
- package/dist/types/src/components/st-select/st-select-empty.d.ts +0 -26
- package/dist/types/src/components/st-select/st-select-group.d.ts +0 -28
- package/dist/types/src/components/st-select/st-select-trigger.d.ts +0 -239
- package/dist/types/src/components/st-select/st-select.d.ts +0 -1405
- package/dist/types/src/components/st-sidebar/index.d.ts +0 -29
- package/dist/types/src/components/st-sidebar/st-sidebar.d.ts +0 -25
- package/dist/types/src/components/st-sidebar-item/st-sidebar-item.d.ts +0 -24
- package/dist/types/src/components/st-skeleton/st-skeleton-item.d.ts +0 -21
- package/dist/types/src/components/st-skeleton/st-skeleton.d.ts +0 -23
- package/dist/types/src/components/st-slider/st-slider.d.ts +0 -60
- package/dist/types/src/components/st-splitter/index.d.ts +0 -27
- package/dist/types/src/components/st-splitter/st-splitter.d.ts +0 -24
- package/dist/types/src/components/st-splitter-panel/st-splitter-panel.d.ts +0 -37
- package/dist/types/src/components/st-switch/st-switch.d.ts +0 -31
- package/dist/types/src/components/st-tabs/st-tabs-pane.d.ts +0 -22
- package/dist/types/src/components/st-tabs/st-tabs.d.ts +0 -48
- package/dist/types/src/components/st-tag/st-tag.d.ts +0 -31
- package/dist/types/src/components/st-time-picker/index.d.ts +0 -1546
- package/dist/types/src/components/st-time-picker/st-time-picker-panel.d.ts +0 -280
- package/dist/types/src/components/st-time-picker/st-time-picker.d.ts +0 -914
- package/dist/types/src/components/st-toggle/st-toggle.d.ts +0 -39
- package/dist/types/src/components/st-tooltip/st-tooltip-trigger.d.ts +0 -31
- package/dist/types/src/components/st-tooltip/st-tooltip.d.ts +0 -242
- package/dist/types/src/components/st-tree/st-tree-node.d.ts +0 -3
- /package/dist/{types/src/components → components}/st-sidebar/types.d.ts +0 -0
- /package/dist/{types/src/components → components}/st-sidebar-item/types.d.ts +0 -0
- /package/dist/{types/src/components → components}/types.d.ts +0 -0
- /package/dist/{types/src/global.d.ts → global.d.ts} +0 -0
- /package/dist/{types/src/utils → utils}/cn.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/cva/index.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/cva/types.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/directive/index.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/directive/types.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/directive/v-intersection.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/directive/v-resize.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/mergeStyles.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/utils/id.d.ts +0 -0
- /package/dist/{types/src/utils → utils}/with-install.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,42 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Straw UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
一个基于 Vue 3 + TypeScript + UnoCSS 的现代组件库。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 特性
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- 🚀 **Vue 3 + TypeScript** - 完整的类型支持
|
|
8
|
+
- 🎨 **UnoCSS** - 原子化 CSS,按需生成
|
|
9
|
+
- 📦 **零运行时依赖** - 仅对等依赖 Vue 3
|
|
10
|
+
- 🔧 **按需导入** - 支持 tree-shaking
|
|
11
|
+
- 🌙 **暗色主题** - 内置暗色模式支持
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## 安装
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
```bash
|
|
16
|
+
npm install straw-ui-vue
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 快速开始
|
|
20
|
+
|
|
21
|
+
### 完整引入
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { createApp } from 'vue';
|
|
25
|
+
import StrawUI from 'straw-ui-vue';
|
|
26
|
+
import 'straw-ui-vue/style.css';
|
|
27
|
+
|
|
28
|
+
const app = createApp(App);
|
|
29
|
+
app.use(StrawUI);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 按需导入
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import { StButton, StInput } from 'straw-ui-vue';
|
|
37
|
+
import 'straw-ui-vue/style.css';
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<StButton>Click me</StButton>
|
|
42
|
+
<StInput v-model="value" placeholder="Type something" />
|
|
43
|
+
</template>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## UnoCSS 集成
|
|
47
|
+
|
|
48
|
+
Straw UI 基于 UnoCSS 构建,提供三种集成方案:
|
|
49
|
+
|
|
50
|
+
### 方案一:使用预设(推荐)
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
// uno.config.ts
|
|
54
|
+
import { defineConfig, presetWind4, presetIcons } from 'unocss';
|
|
55
|
+
import { presetStrawUI } from 'straw-ui-vue/unocss';
|
|
56
|
+
|
|
57
|
+
export default defineConfig({
|
|
58
|
+
presets: [
|
|
59
|
+
presetWind4(),
|
|
60
|
+
presetIcons(),
|
|
61
|
+
presetStrawUI(), // Straw UI 预设
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 方案二:使用 safelist
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// uno.config.ts
|
|
70
|
+
import { defineConfig } from 'unocss';
|
|
71
|
+
import { getStrawUISafelist } from 'straw-ui-vue/unocss';
|
|
72
|
+
|
|
73
|
+
export default defineConfig({
|
|
74
|
+
safelist: [...getStrawUISafelist()],
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 方案三:仅引入样式
|
|
79
|
+
|
|
80
|
+
不使用 UnoCSS 时,直接引入预编译的样式:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import 'straw-ui-vue/style.css';
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
详细配置请参阅 [UnoCSS 集成文档](./docs/unocss.md)。
|
|
87
|
+
|
|
88
|
+
## TypeScript 支持
|
|
89
|
+
|
|
90
|
+
Straw UI 提供完整的 TypeScript 类型支持。
|
|
17
91
|
|
|
18
|
-
|
|
92
|
+
### 全局组件类型
|
|
19
93
|
|
|
20
|
-
|
|
94
|
+
```json
|
|
95
|
+
// tsconfig.json
|
|
96
|
+
{
|
|
97
|
+
"compilerOptions": {
|
|
98
|
+
"types": ["straw-ui-vue/global-components"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
详细配置请参阅 [TypeScript 配置指南](./docs/typescript.md)。
|
|
104
|
+
|
|
105
|
+
## 组件列表
|
|
106
|
+
|
|
107
|
+
| 组件 | 说明 |
|
|
108
|
+
|------|------|
|
|
109
|
+
| `StButton` | 按钮组件 |
|
|
110
|
+
| `StInput` | 输入框组件 |
|
|
111
|
+
| `StCheckbox` | 复选框组件 |
|
|
112
|
+
| `StCheckboxGroup` | 复选框组组件 |
|
|
113
|
+
| `StRadio` | 单选框组件 |
|
|
114
|
+
| `StRadioGroup` | 单选框组组件 |
|
|
115
|
+
| `StSelect` | 选择器组件 |
|
|
116
|
+
| `StDialog` | 对话框组件 |
|
|
117
|
+
| `StPopover` | 弹出框组件 |
|
|
118
|
+
| `StTooltip` | 提示框组件 |
|
|
119
|
+
| `StMenu` | 菜单组件 |
|
|
120
|
+
| `StSidebar` | 侧边栏组件 |
|
|
121
|
+
| `StSidebarItem` | 侧边栏项组件 |
|
|
122
|
+
| `StSplitter` | 分割器组件 |
|
|
123
|
+
| `StSplitterPanel` | 分割面板组件 |
|
|
124
|
+
| `StTree` | 树形组件 |
|
|
125
|
+
| `StToggle` | 开关组件 |
|
|
126
|
+
|
|
127
|
+
## 自定义指令
|
|
128
|
+
|
|
129
|
+
| 指令 | 说明 |
|
|
130
|
+
|------|------|
|
|
131
|
+
| `v-intersection` | 元素可视区域监听 |
|
|
132
|
+
| `v-interval` | 定时器指令 |
|
|
133
|
+
| `v-move` | 元素拖拽移动 |
|
|
134
|
+
| `v-resize` | 元素尺寸变化监听 |
|
|
135
|
+
|
|
136
|
+
## 主题定制
|
|
21
137
|
|
|
22
|
-
|
|
138
|
+
Straw UI 使用 CSS 变量定义主题,你可以通过覆盖变量来自定义主题:
|
|
23
139
|
|
|
24
|
-
|
|
140
|
+
```css
|
|
141
|
+
:root {
|
|
142
|
+
--primary: #3b82f6;
|
|
143
|
+
--primary-foreground: #ffffff;
|
|
144
|
+
--radius: 0.5rem;
|
|
145
|
+
/* 更多变量... */
|
|
146
|
+
}
|
|
25
147
|
|
|
26
|
-
|
|
148
|
+
[data-theme='dark'] {
|
|
149
|
+
--primary: #3b82f6;
|
|
150
|
+
/* 暗色主题变量... */
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
完整变量列表请参阅 [UnoCSS 集成文档](./docs/unocss.md#主题变量)。
|
|
155
|
+
|
|
156
|
+
## 开发
|
|
157
|
+
|
|
158
|
+
### 环境要求
|
|
159
|
+
|
|
160
|
+
- Node.js: `^20.19.0 || >=22.12.0`
|
|
161
|
+
|
|
162
|
+
### 安装依赖
|
|
27
163
|
|
|
28
164
|
```sh
|
|
29
|
-
|
|
165
|
+
npm install
|
|
30
166
|
```
|
|
31
167
|
|
|
32
|
-
###
|
|
168
|
+
### 开发模式
|
|
33
169
|
|
|
34
170
|
```sh
|
|
35
|
-
|
|
171
|
+
npm run dev
|
|
36
172
|
```
|
|
37
173
|
|
|
38
|
-
###
|
|
174
|
+
### 构建库
|
|
39
175
|
|
|
40
176
|
```sh
|
|
41
|
-
|
|
177
|
+
npm run build:lib
|
|
42
178
|
```
|
|
179
|
+
|
|
180
|
+
### 类型检查
|
|
181
|
+
|
|
182
|
+
```sh
|
|
183
|
+
npm run type-check
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 文档开发
|
|
187
|
+
|
|
188
|
+
```sh
|
|
189
|
+
npm run docs:dev
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## 文档
|
|
193
|
+
|
|
194
|
+
- [UnoCSS 集成](./docs/unocss.md)
|
|
195
|
+
- [TypeScript 配置](./docs/typescript.md)
|
|
196
|
+
|
|
197
|
+
## 推荐 IDE 设置
|
|
198
|
+
|
|
199
|
+
- [VS Code](https://code.visualstudio.com/)
|
|
200
|
+
- [Vue - Official (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar)(禁用 Vetur)
|
|
201
|
+
- [UnoCSS](https://marketplace.visualstudio.com/items?itemName=antfu.unocss)
|
|
202
|
+
|
|
203
|
+
## License
|
|
204
|
+
|
|
205
|
+
MIT
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const StButton: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StButtonProps> & Readonly<{
|
|
3
3
|
onClick?: (event: MouseEvent) => any;
|
|
4
4
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
5
|
click: (event: MouseEvent) => any;
|
|
6
6
|
}, import('vue').PublicProps, {
|
|
7
|
-
type: import('./types.d.ts').
|
|
8
|
-
variant: import('./types.d.ts').
|
|
7
|
+
type: import('./types.d.ts').StButtonType;
|
|
8
|
+
variant: import('./types.d.ts').StButtonVariant;
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
loading: boolean;
|
|
11
11
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
@@ -15,28 +15,28 @@ export declare const StButton: {
|
|
|
15
15
|
C: {};
|
|
16
16
|
M: {};
|
|
17
17
|
Defaults: {};
|
|
18
|
-
}, Readonly<import('./types.d.ts').
|
|
18
|
+
}, Readonly<import('./types.d.ts').StButtonProps> & Readonly<{
|
|
19
19
|
onClick?: (event: MouseEvent) => any;
|
|
20
20
|
}>, {}, {}, {}, {}, {
|
|
21
|
-
type: import('./types.d.ts').
|
|
22
|
-
variant: import('./types.d.ts').
|
|
21
|
+
type: import('./types.d.ts').StButtonType;
|
|
22
|
+
variant: import('./types.d.ts').StButtonVariant;
|
|
23
23
|
disabled: boolean;
|
|
24
24
|
loading: boolean;
|
|
25
25
|
}>;
|
|
26
26
|
__isFragment?: never;
|
|
27
27
|
__isTeleport?: never;
|
|
28
28
|
__isSuspense?: never;
|
|
29
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').
|
|
29
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StButtonProps> & Readonly<{
|
|
30
30
|
onClick?: (event: MouseEvent) => any;
|
|
31
31
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
32
|
click: (event: MouseEvent) => any;
|
|
33
33
|
}, string, {
|
|
34
|
-
type: import('./types.d.ts').
|
|
35
|
-
variant: import('./types.d.ts').
|
|
34
|
+
type: import('./types.d.ts').StButtonType;
|
|
35
|
+
variant: import('./types.d.ts').StButtonVariant;
|
|
36
36
|
disabled: boolean;
|
|
37
37
|
loading: boolean;
|
|
38
38
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
39
|
-
$slots:
|
|
39
|
+
$slots: import('./types.d.ts').StButtonSlots;
|
|
40
40
|
});
|
|
41
41
|
export default StButton;
|
|
42
42
|
export type * from './types.d.ts';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StButtonProps, StButtonSlots, StButtonType, StButtonVariant } from './types.d.ts';
|
|
2
|
+
type __VLS_Slots = StButtonSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<StButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
click: (event: MouseEvent) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<StButtonProps> & Readonly<{
|
|
6
|
+
onClick?: (event: MouseEvent) => any;
|
|
7
|
+
}>, {
|
|
8
|
+
type: StButtonType;
|
|
9
|
+
variant: StButtonVariant;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 按钮变体类型
|
|
3
3
|
* */
|
|
4
|
-
export type
|
|
4
|
+
export type StButtonVariant = 'primary' | 'default' | 'ghost';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* 按钮类型
|
|
8
8
|
* */
|
|
9
|
-
export type
|
|
9
|
+
export type StButtonType = 'default' | 'icon';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* 按钮组件属性
|
|
13
13
|
* */
|
|
14
|
-
export interface
|
|
14
|
+
export interface StButtonProps {
|
|
15
15
|
/** 按钮变体类型 */
|
|
16
|
-
variant?:
|
|
16
|
+
variant?: StButtonVariant;
|
|
17
17
|
/** 按钮类型 */
|
|
18
|
-
type?:
|
|
18
|
+
type?: StButtonType;
|
|
19
19
|
/** 是否禁用 */
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
/** 是否显示加载状态 */
|
|
@@ -41,7 +41,7 @@ export interface ButtonProps {
|
|
|
41
41
|
/**
|
|
42
42
|
* 按钮组件插槽类型
|
|
43
43
|
* */
|
|
44
|
-
export interface
|
|
44
|
+
export interface StButtonSlots {
|
|
45
45
|
/** 默认插槽 */
|
|
46
46
|
default?: () => unknown;
|
|
47
47
|
/** 前缀图标插槽 */
|
|
@@ -53,7 +53,7 @@ export interface ButtonSlots {
|
|
|
53
53
|
/**
|
|
54
54
|
* 按钮组件事件类型
|
|
55
55
|
* */
|
|
56
|
-
export interface
|
|
56
|
+
export interface StButtonEmits {
|
|
57
57
|
/** 点击事件 */
|
|
58
58
|
click: [event: MouseEvent];
|
|
59
59
|
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
export declare const StCascade: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StCascadeProps & {
|
|
3
|
+
modelValue?: (string | number)[];
|
|
4
|
+
multipleValue?: (string | number)[][];
|
|
5
|
+
}> & Readonly<{
|
|
6
|
+
onClear?: () => any;
|
|
7
|
+
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
8
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
9
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
10
|
+
onRemoveTag?: (value: (string | number)[]) => any;
|
|
11
|
+
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
12
|
+
}>, import('./types.d.ts').StCascadeExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
clear: () => any;
|
|
14
|
+
change: (value: (string | number)[] | (string | number)[][]) => any;
|
|
15
|
+
visibleChange: (visible: boolean) => any;
|
|
16
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
17
|
+
removeTag: (value: (string | number)[]) => any;
|
|
18
|
+
"update:multipleValue": (value: (string | number)[][]) => any;
|
|
19
|
+
}, import('vue').PublicProps, {
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
triggerClass: ClassValue;
|
|
22
|
+
triggerStyle: StyleValue;
|
|
23
|
+
placeholder: string;
|
|
24
|
+
clearable: boolean;
|
|
25
|
+
labelKey: string;
|
|
26
|
+
valueKey: string;
|
|
27
|
+
childrenKey: string;
|
|
28
|
+
separator: string;
|
|
29
|
+
multiple: boolean;
|
|
30
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
31
|
+
panelClass: ClassValue;
|
|
32
|
+
panelStyle: StyleValue;
|
|
33
|
+
menuItemClass: ClassValue;
|
|
34
|
+
menuItemStyle: StyleValue;
|
|
35
|
+
popoverClass: ClassValue;
|
|
36
|
+
popoverStyle: StyleValue;
|
|
37
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
38
|
+
P: {};
|
|
39
|
+
B: {};
|
|
40
|
+
D: {};
|
|
41
|
+
C: {};
|
|
42
|
+
M: {};
|
|
43
|
+
Defaults: {};
|
|
44
|
+
}, Readonly<import('./types.d.ts').StCascadeProps & {
|
|
45
|
+
modelValue?: (string | number)[];
|
|
46
|
+
multipleValue?: (string | number)[][];
|
|
47
|
+
}> & Readonly<{
|
|
48
|
+
onClear?: () => any;
|
|
49
|
+
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
50
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
51
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
52
|
+
onRemoveTag?: (value: (string | number)[]) => any;
|
|
53
|
+
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
54
|
+
}>, import('./types.d.ts').StCascadeExpose, {}, {}, {}, {
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
triggerClass: ClassValue;
|
|
57
|
+
triggerStyle: StyleValue;
|
|
58
|
+
placeholder: string;
|
|
59
|
+
clearable: boolean;
|
|
60
|
+
labelKey: string;
|
|
61
|
+
valueKey: string;
|
|
62
|
+
childrenKey: string;
|
|
63
|
+
separator: string;
|
|
64
|
+
multiple: boolean;
|
|
65
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
66
|
+
panelClass: ClassValue;
|
|
67
|
+
panelStyle: StyleValue;
|
|
68
|
+
menuItemClass: ClassValue;
|
|
69
|
+
menuItemStyle: StyleValue;
|
|
70
|
+
popoverClass: ClassValue;
|
|
71
|
+
popoverStyle: StyleValue;
|
|
72
|
+
}>;
|
|
73
|
+
__isFragment?: never;
|
|
74
|
+
__isTeleport?: never;
|
|
75
|
+
__isSuspense?: never;
|
|
76
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StCascadeProps & {
|
|
77
|
+
modelValue?: (string | number)[];
|
|
78
|
+
multipleValue?: (string | number)[][];
|
|
79
|
+
}> & Readonly<{
|
|
80
|
+
onClear?: () => any;
|
|
81
|
+
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
82
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
83
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
84
|
+
onRemoveTag?: (value: (string | number)[]) => any;
|
|
85
|
+
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
86
|
+
}>, import('./types.d.ts').StCascadeExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
87
|
+
clear: () => any;
|
|
88
|
+
change: (value: (string | number)[] | (string | number)[][]) => any;
|
|
89
|
+
visibleChange: (visible: boolean) => any;
|
|
90
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
91
|
+
removeTag: (value: (string | number)[]) => any;
|
|
92
|
+
"update:multipleValue": (value: (string | number)[][]) => any;
|
|
93
|
+
}, string, {
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
triggerClass: ClassValue;
|
|
96
|
+
triggerStyle: StyleValue;
|
|
97
|
+
placeholder: string;
|
|
98
|
+
clearable: boolean;
|
|
99
|
+
labelKey: string;
|
|
100
|
+
valueKey: string;
|
|
101
|
+
childrenKey: string;
|
|
102
|
+
separator: string;
|
|
103
|
+
multiple: boolean;
|
|
104
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
105
|
+
panelClass: ClassValue;
|
|
106
|
+
panelStyle: StyleValue;
|
|
107
|
+
menuItemClass: ClassValue;
|
|
108
|
+
menuItemStyle: StyleValue;
|
|
109
|
+
popoverClass: ClassValue;
|
|
110
|
+
popoverStyle: StyleValue;
|
|
111
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
112
|
+
$slots: {
|
|
113
|
+
prefix?: (props: {}) => any;
|
|
114
|
+
} & {
|
|
115
|
+
empty?: (props: {}) => any;
|
|
116
|
+
};
|
|
117
|
+
}) & {
|
|
118
|
+
StCascadePanel: {
|
|
119
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
|
|
120
|
+
onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
121
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
122
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
123
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
124
|
+
select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
125
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
126
|
+
expand: (level: number, value: string | number) => any;
|
|
127
|
+
}, import('vue').PublicProps, {
|
|
128
|
+
disabled: boolean;
|
|
129
|
+
modelValue: (string | number)[];
|
|
130
|
+
labelKey: string;
|
|
131
|
+
valueKey: string;
|
|
132
|
+
childrenKey: string;
|
|
133
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
134
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
135
|
+
P: {};
|
|
136
|
+
B: {};
|
|
137
|
+
D: {};
|
|
138
|
+
C: {};
|
|
139
|
+
M: {};
|
|
140
|
+
Defaults: {};
|
|
141
|
+
}, Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
|
|
142
|
+
onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
143
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
144
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
145
|
+
}>, {}, {}, {}, {}, {
|
|
146
|
+
disabled: boolean;
|
|
147
|
+
modelValue: (string | number)[];
|
|
148
|
+
labelKey: string;
|
|
149
|
+
valueKey: string;
|
|
150
|
+
childrenKey: string;
|
|
151
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
152
|
+
}>;
|
|
153
|
+
__isFragment?: never;
|
|
154
|
+
__isTeleport?: never;
|
|
155
|
+
__isSuspense?: never;
|
|
156
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
|
|
157
|
+
onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
158
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
159
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
160
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
161
|
+
select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
162
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
163
|
+
expand: (level: number, value: string | number) => any;
|
|
164
|
+
}, string, {
|
|
165
|
+
disabled: boolean;
|
|
166
|
+
modelValue: (string | number)[];
|
|
167
|
+
labelKey: string;
|
|
168
|
+
valueKey: string;
|
|
169
|
+
childrenKey: string;
|
|
170
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
171
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
172
|
+
$slots: {
|
|
173
|
+
empty?: (props: {}) => any;
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
export declare const StCascadePanel: {
|
|
178
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
|
|
179
|
+
onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
180
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
181
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
182
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
183
|
+
select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
184
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
185
|
+
expand: (level: number, value: string | number) => any;
|
|
186
|
+
}, import('vue').PublicProps, {
|
|
187
|
+
disabled: boolean;
|
|
188
|
+
modelValue: (string | number)[];
|
|
189
|
+
labelKey: string;
|
|
190
|
+
valueKey: string;
|
|
191
|
+
childrenKey: string;
|
|
192
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
193
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
194
|
+
P: {};
|
|
195
|
+
B: {};
|
|
196
|
+
D: {};
|
|
197
|
+
C: {};
|
|
198
|
+
M: {};
|
|
199
|
+
Defaults: {};
|
|
200
|
+
}, Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
|
|
201
|
+
onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
202
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
203
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
204
|
+
}>, {}, {}, {}, {}, {
|
|
205
|
+
disabled: boolean;
|
|
206
|
+
modelValue: (string | number)[];
|
|
207
|
+
labelKey: string;
|
|
208
|
+
valueKey: string;
|
|
209
|
+
childrenKey: string;
|
|
210
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
211
|
+
}>;
|
|
212
|
+
__isFragment?: never;
|
|
213
|
+
__isTeleport?: never;
|
|
214
|
+
__isSuspense?: never;
|
|
215
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
|
|
216
|
+
onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
217
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
218
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
219
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
220
|
+
select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
|
|
221
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
222
|
+
expand: (level: number, value: string | number) => any;
|
|
223
|
+
}, string, {
|
|
224
|
+
disabled: boolean;
|
|
225
|
+
modelValue: (string | number)[];
|
|
226
|
+
labelKey: string;
|
|
227
|
+
valueKey: string;
|
|
228
|
+
childrenKey: string;
|
|
229
|
+
options: import('./types.d.ts').StCascadeOption[];
|
|
230
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
231
|
+
$slots: {
|
|
232
|
+
empty?: (props: {}) => any;
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
export default StCascade;
|
|
236
|
+
export type * from './types.d.ts';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StCascadeOption, StCascadePanelProps } from './types.d.ts';
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
empty?: (props: typeof __VLS_8) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<StCascadePanelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
select: (value: (string | number)[], option: StCascadeOption) => any;
|
|
8
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
9
|
+
expand: (level: number, value: string | number) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<StCascadePanelProps> & Readonly<{
|
|
11
|
+
onSelect?: (value: (string | number)[], option: StCascadeOption) => any;
|
|
12
|
+
"onUpdate:modelValue"?: (value: (string | number)[]) => any;
|
|
13
|
+
onExpand?: (level: number, value: string | number) => any;
|
|
14
|
+
}>, {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
modelValue: (string | number)[];
|
|
17
|
+
labelKey: string;
|
|
18
|
+
valueKey: string;
|
|
19
|
+
childrenKey: string;
|
|
20
|
+
options: StCascadeOption[];
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { StCascadeOption, StCascadeExpose, StCascadeProps } from './types.d.ts';
|
|
2
|
+
type __VLS_Props = StCascadeProps;
|
|
3
|
+
type __VLS_ModelProps = {
|
|
4
|
+
/**
|
|
5
|
+
* 单选模式下的选中路径
|
|
6
|
+
* */
|
|
7
|
+
modelValue?: (string | number)[];
|
|
8
|
+
/**
|
|
9
|
+
* 多选模式下的选中路径列表
|
|
10
|
+
* */
|
|
11
|
+
'multipleValue'?: (string | number)[][];
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare var __VLS_25: {}, __VLS_41: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
prefix?: (props: typeof __VLS_25) => any;
|
|
17
|
+
} & {
|
|
18
|
+
empty?: (props: typeof __VLS_41) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, StCascadeExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
clear: () => any;
|
|
22
|
+
change: (value: (string | number)[] | (string | number)[][]) => any;
|
|
23
|
+
visibleChange: (visible: boolean) => any;
|
|
24
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
25
|
+
removeTag: (value: (string | number)[]) => any;
|
|
26
|
+
"update:multipleValue": (value: (string | number)[][]) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
onClear?: () => any;
|
|
29
|
+
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
30
|
+
onVisibleChange?: (visible: boolean) => any;
|
|
31
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
32
|
+
onRemoveTag?: (value: (string | number)[]) => any;
|
|
33
|
+
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
34
|
+
}>, {
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
triggerClass: ClassValue;
|
|
37
|
+
triggerStyle: StyleValue;
|
|
38
|
+
placeholder: string;
|
|
39
|
+
clearable: boolean;
|
|
40
|
+
labelKey: string;
|
|
41
|
+
valueKey: string;
|
|
42
|
+
childrenKey: string;
|
|
43
|
+
separator: string;
|
|
44
|
+
multiple: boolean;
|
|
45
|
+
options: StCascadeOption[];
|
|
46
|
+
panelClass: ClassValue;
|
|
47
|
+
panelStyle: StyleValue;
|
|
48
|
+
menuItemClass: ClassValue;
|
|
49
|
+
menuItemStyle: StyleValue;
|
|
50
|
+
popoverClass: ClassValue;
|
|
51
|
+
popoverStyle: StyleValue;
|
|
52
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
53
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
|
+
declare const _default: typeof __VLS_export;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|