@veltra/desktop 1.8.4 → 1.9.0
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/dist/components/alert/alert.js +69 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/style.d.ts +1 -0
- package/dist/components/alert/style.js +1 -0
- package/dist/components/alert/style2.css +76 -0
- package/dist/components/anchor/anchor-item.js +35 -0
- package/dist/components/anchor/anchor-item.js.map +1 -0
- package/dist/components/anchor/anchor.js +61 -0
- package/dist/components/anchor/anchor.js.map +1 -0
- package/dist/components/anchor/di.js +6 -0
- package/dist/components/anchor/di.js.map +1 -0
- package/dist/components/anchor/style.d.ts +1 -0
- package/dist/components/anchor/style.js +1 -0
- package/dist/components/anchor/style2.css +45 -0
- package/dist/components/anchor/use-anchor.js +81 -0
- package/dist/components/anchor/use-anchor.js.map +1 -0
- package/dist/components/avatar/avatar-group.js +28 -0
- package/dist/components/avatar/avatar-group.js.map +1 -0
- package/dist/components/avatar/avatar.js +51 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/style.d.ts +1 -0
- package/dist/components/avatar/style.js +1 -0
- package/dist/components/avatar/style2.css +87 -0
- package/dist/components/back-top/back-top.js +82 -0
- package/dist/components/back-top/back-top.js.map +1 -0
- package/dist/components/back-top/style.d.ts +1 -0
- package/dist/components/back-top/style.js +2 -0
- package/dist/components/back-top/style2.css +32 -0
- package/dist/components/carousel/carousel-item.js +27 -0
- package/dist/components/carousel/carousel-item.js.map +1 -0
- package/dist/components/carousel/carousel.js +118 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/di.js +7 -0
- package/dist/components/carousel/di.js.map +1 -0
- package/dist/components/carousel/style.d.ts +1 -0
- package/dist/components/carousel/style.js +1 -0
- package/dist/components/carousel/style2.css +97 -0
- package/dist/components/carousel/use-carousel.js +68 -0
- package/dist/components/carousel/use-carousel.js.map +1 -0
- package/dist/components/descriptions/descriptions-item.js +16 -0
- package/dist/components/descriptions/descriptions-item.js.map +1 -0
- package/dist/components/descriptions/descriptions.js +67 -0
- package/dist/components/descriptions/descriptions.js.map +1 -0
- package/dist/components/descriptions/style.d.ts +1 -0
- package/dist/components/descriptions/style.js +1 -0
- package/dist/components/descriptions/style2.css +81 -0
- package/dist/components/divider/divider.js +41 -0
- package/dist/components/divider/divider.js.map +1 -0
- package/dist/components/divider/style.d.ts +1 -0
- package/dist/components/divider/style.js +1 -0
- package/dist/components/divider/style2.css +68 -0
- package/dist/components/expression-editor/components/variable-picker.js +1 -1
- package/dist/components/expression-editor/components/variable-picker.js.map +1 -1
- package/dist/components/file-viewer/previewers/pdf-previewer.js +3 -1
- package/dist/components/file-viewer/previewers/pdf-previewer.js.map +1 -1
- package/dist/components/image-cropper/image-cropper.js +1 -1
- package/dist/components/image-cropper/image-cropper.js.map +1 -1
- package/dist/components/index.d.ts +48 -30
- package/dist/components/index.js +95 -59
- package/dist/components/index.js.map +1 -1
- package/dist/components/rate/rate.js +130 -0
- package/dist/components/rate/rate.js.map +1 -0
- package/dist/components/rate/style.d.ts +1 -0
- package/dist/components/rate/style.js +1 -0
- package/dist/components/rate/style2.css +58 -0
- package/dist/components/skeleton/skeleton.js +74 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/skeleton/style.d.ts +1 -0
- package/dist/components/skeleton/style.js +1 -0
- package/dist/components/skeleton/style2.css +86 -0
- package/dist/components/space/space.js +47 -0
- package/dist/components/space/space.js.map +1 -0
- package/dist/components/space/style.d.ts +1 -0
- package/dist/components/space/style.js +1 -0
- package/dist/components/space/style2.css +43 -0
- package/dist/components/time-picker/style.d.ts +2 -0
- package/dist/components/time-picker/style.js +3 -0
- package/dist/components/time-picker/style2.css +110 -0
- package/dist/components/time-picker/time-picker.js +196 -0
- package/dist/components/time-picker/time-picker.js.map +1 -0
- package/dist/components/timeline/style.d.ts +1 -0
- package/dist/components/timeline/style.js +1 -0
- package/dist/components/timeline/style2.css +95 -0
- package/dist/components/timeline/timeline-item.js +32 -0
- package/dist/components/timeline/timeline-item.js.map +1 -0
- package/dist/components/timeline/timeline.js +17 -0
- package/dist/components/timeline/timeline.js.map +1 -0
- package/dist/components/transfer/style.d.ts +2 -0
- package/dist/components/transfer/style.js +4 -0
- package/dist/components/transfer/style2.css +172 -0
- package/dist/components/transfer/transfer-list.js +101 -0
- package/dist/components/transfer/transfer-list.js.map +1 -0
- package/dist/components/transfer/transfer.js +138 -0
- package/dist/components/transfer/transfer.js.map +1 -0
- package/dist/index.d.ts +119 -88
- package/dist/index.js +106 -88
- package/dist/types/alert.d.ts +27 -0
- package/dist/types/anchor.d.ts +48 -0
- package/dist/types/avatar.d.ts +28 -0
- package/dist/types/back-top.d.ts +19 -0
- package/dist/types/carousel.d.ts +25 -0
- package/dist/types/descriptions.d.ts +22 -0
- package/dist/types/divider.d.ts +14 -0
- package/dist/types/index.d.ts +14 -1
- package/dist/types/layout.d.ts +2 -1
- package/dist/types/rate.d.ts +26 -0
- package/dist/types/skeleton.d.ts +24 -0
- package/dist/types/space.d.ts +20 -0
- package/dist/types/time-picker.d.ts +38 -0
- package/dist/types/timeline.d.ts +16 -0
- package/dist/types/transfer.d.ts +37 -0
- package/package.json +3 -1
- package/src/components/alert/alert.vue +62 -0
- package/src/components/alert/index.ts +1 -0
- package/src/components/alert/style.scss +67 -0
- package/src/components/alert/style.ts +1 -0
- package/src/components/anchor/anchor-item.vue +35 -0
- package/src/components/anchor/anchor.vue +63 -0
- package/src/components/anchor/di.ts +15 -0
- package/src/components/anchor/index.ts +2 -0
- package/src/components/anchor/style.scss +44 -0
- package/src/components/anchor/style.ts +1 -0
- package/src/components/anchor/use-anchor.ts +120 -0
- package/src/components/avatar/avatar-group.vue +26 -0
- package/src/components/avatar/avatar.vue +52 -0
- package/src/components/avatar/index.ts +2 -0
- package/src/components/avatar/style.scss +79 -0
- package/src/components/avatar/style.ts +1 -0
- package/src/components/back-top/back-top.vue +89 -0
- package/src/components/back-top/index.ts +1 -0
- package/src/components/back-top/style.scss +31 -0
- package/src/components/back-top/style.ts +2 -0
- package/src/components/carousel/carousel-item.vue +27 -0
- package/src/components/carousel/carousel.vue +93 -0
- package/src/components/carousel/di.ts +15 -0
- package/src/components/carousel/index.ts +2 -0
- package/src/components/carousel/style.scss +109 -0
- package/src/components/carousel/style.ts +1 -0
- package/src/components/carousel/use-carousel.ts +77 -0
- package/src/components/descriptions/descriptions-item.vue +12 -0
- package/src/components/descriptions/descriptions.vue +81 -0
- package/src/components/descriptions/index.ts +2 -0
- package/src/components/descriptions/style.scss +73 -0
- package/src/components/descriptions/style.ts +1 -0
- package/src/components/divider/divider.vue +29 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/divider/style.scss +90 -0
- package/src/components/divider/style.ts +1 -0
- package/src/components/expression-editor/components/variable-picker.vue +1 -1
- package/src/components/file-viewer/previewers/pdf-previewer.vue +6 -1
- package/src/components/image-cropper/image-cropper.vue +1 -1
- package/src/components/index.ts +26 -0
- package/src/components/rate/index.ts +1 -0
- package/src/components/rate/rate.vue +127 -0
- package/src/components/rate/style.scss +51 -0
- package/src/components/rate/style.ts +1 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.vue +37 -0
- package/src/components/skeleton/style.scss +94 -0
- package/src/components/skeleton/style.ts +1 -0
- package/src/components/space/index.ts +1 -0
- package/src/components/space/space.vue +45 -0
- package/src/components/space/style.scss +41 -0
- package/src/components/space/style.ts +1 -0
- package/src/components/time-picker/index.ts +1 -0
- package/src/components/time-picker/style.scss +82 -0
- package/src/components/time-picker/style.ts +3 -0
- package/src/components/time-picker/time-picker.vue +183 -0
- package/src/components/timeline/index.ts +2 -0
- package/src/components/timeline/style.scss +107 -0
- package/src/components/timeline/style.ts +1 -0
- package/src/components/timeline/timeline-item.vue +43 -0
- package/src/components/timeline/timeline.vue +17 -0
- package/src/components/transfer/index.ts +1 -0
- package/src/components/transfer/style.scss +135 -0
- package/src/components/transfer/style.ts +4 -0
- package/src/components/transfer/transfer-list.vue +120 -0
- package/src/components/transfer/transfer.vue +134 -0
- package/src/env.d.ts +5 -0
- package/src/types/alert.ts +29 -0
- package/src/types/anchor.ts +50 -0
- package/src/types/avatar.ts +31 -0
- package/src/types/back-top.ts +20 -0
- package/src/types/carousel.ts +29 -0
- package/src/types/descriptions.ts +22 -0
- package/src/types/divider.ts +14 -0
- package/src/types/index.ts +16 -0
- package/src/types/layout.ts +2 -1
- package/src/types/rate.ts +27 -0
- package/src/types/skeleton.ts +29 -0
- package/src/types/space.ts +22 -0
- package/src/types/time-picker.ts +40 -0
- package/src/types/timeline.ts +15 -0
- package/src/types/transfer.ts +45 -0
package/dist/components/index.js
CHANGED
|
@@ -72,45 +72,69 @@ import _sfc_main$57 from "./action/action.js";
|
|
|
72
72
|
import action_group_default from "./action/action-group.js";
|
|
73
73
|
import _sfc_main$58 from "./batch-edit/batch-edit.js";
|
|
74
74
|
import { defineBatchEditColumns } from "./batch-edit/helper.js";
|
|
75
|
-
import _sfc_main$59 from "./
|
|
76
|
-
import _sfc_main$60 from "./
|
|
77
|
-
import _sfc_main$61 from "./
|
|
78
|
-
import _sfc_main$62 from "./
|
|
79
|
-
import _sfc_main$63 from "./
|
|
80
|
-
import _sfc_main$64 from "./
|
|
81
|
-
import _sfc_main$65 from "./
|
|
82
|
-
import _sfc_main$66 from "./
|
|
83
|
-
import _sfc_main$67 from "./
|
|
84
|
-
import _sfc_main$68 from "./list/list
|
|
85
|
-
import _sfc_main$69 from "./
|
|
86
|
-
import _sfc_main$70 from "./
|
|
87
|
-
import _sfc_main$71 from "./nav/nav-
|
|
88
|
-
import _sfc_main$72 from "./nav/nav.js";
|
|
89
|
-
import _sfc_main$73 from "./
|
|
90
|
-
import _sfc_main$74 from "./
|
|
91
|
-
import _sfc_main$75 from "./
|
|
92
|
-
import _sfc_main$76 from "./
|
|
93
|
-
import _sfc_main$77 from "./
|
|
94
|
-
import _sfc_main$78 from "./
|
|
95
|
-
import _sfc_main$79 from "./
|
|
96
|
-
import _sfc_main$80 from "./
|
|
97
|
-
import _sfc_main$81 from "./
|
|
98
|
-
import _sfc_main$82 from "./
|
|
99
|
-
import _sfc_main$83 from "./
|
|
100
|
-
import _sfc_main$84 from "./
|
|
101
|
-
import _sfc_main$85 from "./
|
|
102
|
-
import _sfc_main$86 from "./
|
|
103
|
-
import _sfc_main$87 from "./
|
|
75
|
+
import _sfc_main$59 from "./transfer/transfer.js";
|
|
76
|
+
import _sfc_main$60 from "./textarea/textarea.js";
|
|
77
|
+
import _sfc_main$61 from "./cascade/cascade.js";
|
|
78
|
+
import _sfc_main$62 from "./steps/steps.js";
|
|
79
|
+
import _sfc_main$63 from "./date-picker/date-picker.js";
|
|
80
|
+
import _sfc_main$64 from "./palette/palette.js";
|
|
81
|
+
import _sfc_main$65 from "./theme/theme.js";
|
|
82
|
+
import _sfc_main$66 from "./multi-tree-select/multi-tree-select.js";
|
|
83
|
+
import _sfc_main$67 from "./group-input/group-input.js";
|
|
84
|
+
import _sfc_main$68 from "./list/list.js";
|
|
85
|
+
import _sfc_main$69 from "./list/list-item.js";
|
|
86
|
+
import _sfc_main$70 from "./rich-text-editor/rich-text-editor.js";
|
|
87
|
+
import _sfc_main$71 from "./nav/nav-item.js";
|
|
88
|
+
import _sfc_main$72 from "./nav/nav-sub.js";
|
|
89
|
+
import _sfc_main$73 from "./nav/nav.js";
|
|
90
|
+
import _sfc_main$74 from "./dual-nav/dual-nav.js";
|
|
91
|
+
import _sfc_main$75 from "./group-nav/group-nav.js";
|
|
92
|
+
import _sfc_main$76 from "./grid-input/grid-input.js";
|
|
93
|
+
import _sfc_main$77 from "./switch/switch.js";
|
|
94
|
+
import _sfc_main$78 from "./radio-group/radio-group.js";
|
|
95
|
+
import _sfc_main$79 from "./checkbox-group/checkbox-group.js";
|
|
96
|
+
import _sfc_main$80 from "./file-viewer/file-viewer.js";
|
|
97
|
+
import _sfc_main$81 from "./text/text.js";
|
|
98
|
+
import _sfc_main$82 from "./breadcrumb/breadcrumb.js";
|
|
99
|
+
import _sfc_main$83 from "./paginator/paginator.js";
|
|
100
|
+
import _sfc_main$84 from "./float-button/float-button.js";
|
|
101
|
+
import _sfc_main$85 from "./badge/badge.js";
|
|
102
|
+
import _sfc_main$86 from "./segment/segment.js";
|
|
103
|
+
import _sfc_main$87 from "./image-cropper/image-cropper.js";
|
|
104
|
+
import _sfc_main$88 from "./kanban/kanban.js";
|
|
105
|
+
import _sfc_main$89 from "./anchor/anchor.js";
|
|
106
|
+
import _sfc_main$90 from "./anchor/anchor-item.js";
|
|
107
|
+
import _sfc_main$91 from "./avatar/avatar.js";
|
|
108
|
+
import _sfc_main$92 from "./avatar/avatar-group.js";
|
|
109
|
+
import _sfc_main$93 from "./back-top/back-top.js";
|
|
110
|
+
import _sfc_main$94 from "./alert/alert.js";
|
|
111
|
+
import _sfc_main$95 from "./rate/rate.js";
|
|
112
|
+
import _sfc_main$96 from "./divider/divider.js";
|
|
113
|
+
import _sfc_main$97 from "./space/space.js";
|
|
114
|
+
import _sfc_main$98 from "./skeleton/skeleton.js";
|
|
115
|
+
import _sfc_main$99 from "./time-picker/time-picker.js";
|
|
116
|
+
import _sfc_main$100 from "./descriptions/descriptions-item.js";
|
|
117
|
+
import _sfc_main$101 from "./descriptions/descriptions.js";
|
|
118
|
+
import _sfc_main$102 from "./timeline/timeline.js";
|
|
119
|
+
import _sfc_main$103 from "./timeline/timeline-item.js";
|
|
120
|
+
import _sfc_main$104 from "./carousel/carousel.js";
|
|
121
|
+
import _sfc_main$105 from "./carousel/carousel-item.js";
|
|
104
122
|
//#region src/components/index.ts
|
|
105
123
|
var components_exports = /* @__PURE__ */ __exportAll({
|
|
106
124
|
ContextmenuPanelDIKey: () => ContextmenuPanelDIKey,
|
|
107
125
|
ContextmenuRootDIKey: () => ContextmenuRootDIKey,
|
|
108
126
|
UAction: () => _sfc_main$57,
|
|
109
127
|
UActionGroup: () => action_group_default,
|
|
128
|
+
UAlert: () => _sfc_main$94,
|
|
129
|
+
UAnchor: () => _sfc_main$89,
|
|
130
|
+
UAnchorItem: () => _sfc_main$90,
|
|
110
131
|
UAutoComplete: () => _sfc_main$31,
|
|
111
|
-
|
|
132
|
+
UAvatar: () => _sfc_main$91,
|
|
133
|
+
UAvatarGroup: () => _sfc_main$92,
|
|
134
|
+
UBackTop: () => _sfc_main$93,
|
|
135
|
+
UBadge: () => _sfc_main$85,
|
|
112
136
|
UBatchEdit: () => _sfc_main$58,
|
|
113
|
-
UBreadcrumb: () => _sfc_main$
|
|
137
|
+
UBreadcrumb: () => _sfc_main$82,
|
|
114
138
|
UButton: () => _sfc_main$18,
|
|
115
139
|
UButtonGroup: () => _sfc_main$19,
|
|
116
140
|
UCalendar: () => _sfc_main$21,
|
|
@@ -119,82 +143,94 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
119
143
|
UCardContent: () => _sfc_main$26,
|
|
120
144
|
UCardCover: () => _sfc_main$25,
|
|
121
145
|
UCardHeader: () => _sfc_main$24,
|
|
122
|
-
|
|
146
|
+
UCarousel: () => _sfc_main$104,
|
|
147
|
+
UCarouselItem: () => _sfc_main$105,
|
|
148
|
+
UCascade: () => _sfc_main$61,
|
|
123
149
|
UCheckTag: () => _sfc_main$48,
|
|
124
150
|
UCheckbox: () => _sfc_main$11,
|
|
125
151
|
UCheckboxButton: () => _sfc_main$36,
|
|
126
|
-
UCheckboxGroup: () => _sfc_main$
|
|
152
|
+
UCheckboxGroup: () => _sfc_main$79,
|
|
127
153
|
UCodeEditor: () => _sfc_main$14,
|
|
128
154
|
UCollapse: () => _sfc_main$44,
|
|
129
155
|
UCollapseItem: () => _sfc_main$45,
|
|
130
156
|
UConditionEditor: () => _sfc_main$7,
|
|
131
157
|
UContextmenu: () => _sfc_main$49,
|
|
132
158
|
UDatePanel: () => _sfc_main$28,
|
|
133
|
-
UDatePicker: () => _sfc_main$
|
|
159
|
+
UDatePicker: () => _sfc_main$63,
|
|
134
160
|
UDateRangePicker: () => _sfc_main$29,
|
|
161
|
+
UDescriptions: () => _sfc_main$101,
|
|
162
|
+
UDescriptionsItem: () => _sfc_main$100,
|
|
135
163
|
UDialog: () => _sfc_main$52,
|
|
164
|
+
UDivider: () => _sfc_main$96,
|
|
136
165
|
UDrawer: () => _sfc_main$15,
|
|
137
166
|
UDropdown: () => _sfc_main$4,
|
|
138
|
-
UDualNav: () => _sfc_main$
|
|
167
|
+
UDualNav: () => _sfc_main$74,
|
|
139
168
|
UEmpty: () => _sfc_main$1,
|
|
140
169
|
UExpressionEditor: () => _sfc_main$53,
|
|
141
170
|
UFilePicker: () => _sfc_main$41,
|
|
142
|
-
UFileViewer: () => _sfc_main$
|
|
143
|
-
UFloatButton: () => _sfc_main$
|
|
171
|
+
UFileViewer: () => _sfc_main$80,
|
|
172
|
+
UFloatButton: () => _sfc_main$84,
|
|
144
173
|
UForm: () => form_default,
|
|
145
174
|
UFormItem: () => form_item_default,
|
|
146
175
|
UGanttChart: () => _sfc_main$39,
|
|
147
176
|
UGrid: () => _sfc_main$16,
|
|
148
|
-
UGridInput: () => _sfc_main$
|
|
177
|
+
UGridInput: () => _sfc_main$76,
|
|
149
178
|
UGridItem: () => _sfc_main$17,
|
|
150
|
-
UGroupInput: () => _sfc_main$
|
|
151
|
-
UGroupNav: () => _sfc_main$
|
|
179
|
+
UGroupInput: () => _sfc_main$67,
|
|
180
|
+
UGroupNav: () => _sfc_main$75,
|
|
152
181
|
UIcon: () => _sfc_main,
|
|
153
|
-
UImageCropper: () => _sfc_main$
|
|
182
|
+
UImageCropper: () => _sfc_main$87,
|
|
154
183
|
UInput: () => input_default,
|
|
155
|
-
UKanban: () => _sfc_main$
|
|
184
|
+
UKanban: () => _sfc_main$88,
|
|
156
185
|
UKbd: () => _sfc_main$55,
|
|
157
186
|
ULayout: () => _sfc_main$34,
|
|
158
|
-
UList: () => _sfc_main$
|
|
159
|
-
UListItem: () => _sfc_main$
|
|
187
|
+
UList: () => _sfc_main$68,
|
|
188
|
+
UListItem: () => _sfc_main$69,
|
|
160
189
|
ULoading: () => _sfc_main$5,
|
|
161
190
|
UMessage: () => _sfc_main$40,
|
|
162
191
|
UMessageConfirm: () => _sfc_main$20,
|
|
163
192
|
UMultiSelect: () => _sfc_main$37,
|
|
164
|
-
UMultiTreeSelect: () => _sfc_main$
|
|
165
|
-
UNav: () => _sfc_main$
|
|
166
|
-
UNavItem: () => _sfc_main$
|
|
167
|
-
UNavSub: () => _sfc_main$
|
|
193
|
+
UMultiTreeSelect: () => _sfc_main$66,
|
|
194
|
+
UNav: () => _sfc_main$73,
|
|
195
|
+
UNavItem: () => _sfc_main$71,
|
|
196
|
+
UNavSub: () => _sfc_main$72,
|
|
168
197
|
UNodeRender: () => NodeRender,
|
|
169
198
|
UNotification: () => _sfc_main$33,
|
|
170
199
|
UNumber: () => _sfc_main$51,
|
|
171
200
|
UNumberInput: () => _sfc_main$42,
|
|
172
201
|
UNumberRangeInput: () => _sfc_main$43,
|
|
173
|
-
UPaginator: () => _sfc_main$
|
|
174
|
-
UPalette: () => _sfc_main$
|
|
202
|
+
UPaginator: () => _sfc_main$83,
|
|
203
|
+
UPalette: () => _sfc_main$64,
|
|
175
204
|
UPasswordInput: () => _sfc_main$50,
|
|
176
205
|
UPopConfirm: () => _sfc_main$56,
|
|
177
206
|
UProgress: () => _sfc_main$32,
|
|
178
207
|
UProgressNodes: () => _sfc_main$30,
|
|
179
208
|
URadio: () => _sfc_main$22,
|
|
180
|
-
URadioGroup: () => _sfc_main$
|
|
181
|
-
|
|
209
|
+
URadioGroup: () => _sfc_main$78,
|
|
210
|
+
URate: () => _sfc_main$95,
|
|
211
|
+
URichTextEditor: () => _sfc_main$70,
|
|
182
212
|
UScroll: () => _sfc_main$2,
|
|
183
|
-
USegment: () => _sfc_main$
|
|
213
|
+
USegment: () => _sfc_main$86,
|
|
184
214
|
USelect: () => _sfc_main$6,
|
|
215
|
+
USkeleton: () => _sfc_main$98,
|
|
185
216
|
USlider: () => _sfc_main$38,
|
|
186
|
-
|
|
187
|
-
|
|
217
|
+
USpace: () => _sfc_main$97,
|
|
218
|
+
USteps: () => _sfc_main$62,
|
|
219
|
+
USwitch: () => _sfc_main$77,
|
|
188
220
|
UTable: () => _sfc_main$46,
|
|
189
221
|
UTableEditor: () => _sfc_main$47,
|
|
190
222
|
UTabs: () => _sfc_main$10,
|
|
191
223
|
UTabsHorizontal: () => _sfc_main$8,
|
|
192
224
|
UTabsVertical: () => _sfc_main$9,
|
|
193
225
|
UTag: () => _sfc_main$35,
|
|
194
|
-
UText: () => _sfc_main$
|
|
195
|
-
UTextarea: () => _sfc_main$
|
|
196
|
-
UTheme: () => _sfc_main$
|
|
226
|
+
UText: () => _sfc_main$81,
|
|
227
|
+
UTextarea: () => _sfc_main$60,
|
|
228
|
+
UTheme: () => _sfc_main$65,
|
|
229
|
+
UTimePicker: () => _sfc_main$99,
|
|
230
|
+
UTimeline: () => _sfc_main$102,
|
|
231
|
+
UTimelineItem: () => _sfc_main$103,
|
|
197
232
|
UTip: () => _sfc_main$3,
|
|
233
|
+
UTransfer: () => _sfc_main$59,
|
|
198
234
|
UTree: () => _sfc_main$12,
|
|
199
235
|
UTreeSelect: () => _sfc_main$13,
|
|
200
236
|
UWatermark: () => _sfc_main$54,
|
|
@@ -210,6 +246,6 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
210
246
|
vLoading: () => vLoading
|
|
211
247
|
});
|
|
212
248
|
//#endregion
|
|
213
|
-
export { ContextmenuPanelDIKey, ContextmenuRootDIKey, _sfc_main$57 as UAction, action_group_default as UActionGroup, _sfc_main$31 as UAutoComplete, _sfc_main$
|
|
249
|
+
export { ContextmenuPanelDIKey, ContextmenuRootDIKey, _sfc_main$57 as UAction, action_group_default as UActionGroup, _sfc_main$94 as UAlert, _sfc_main$89 as UAnchor, _sfc_main$90 as UAnchorItem, _sfc_main$31 as UAutoComplete, _sfc_main$91 as UAvatar, _sfc_main$92 as UAvatarGroup, _sfc_main$93 as UBackTop, _sfc_main$85 as UBadge, _sfc_main$58 as UBatchEdit, _sfc_main$82 as UBreadcrumb, _sfc_main$18 as UButton, _sfc_main$19 as UButtonGroup, _sfc_main$21 as UCalendar, _sfc_main$23 as UCard, _sfc_main$27 as UCardAction, _sfc_main$26 as UCardContent, _sfc_main$25 as UCardCover, _sfc_main$24 as UCardHeader, _sfc_main$104 as UCarousel, _sfc_main$105 as UCarouselItem, _sfc_main$61 as UCascade, _sfc_main$48 as UCheckTag, _sfc_main$11 as UCheckbox, _sfc_main$36 as UCheckboxButton, _sfc_main$79 as UCheckboxGroup, _sfc_main$14 as UCodeEditor, _sfc_main$44 as UCollapse, _sfc_main$45 as UCollapseItem, _sfc_main$7 as UConditionEditor, _sfc_main$49 as UContextmenu, _sfc_main$28 as UDatePanel, _sfc_main$63 as UDatePicker, _sfc_main$29 as UDateRangePicker, _sfc_main$101 as UDescriptions, _sfc_main$100 as UDescriptionsItem, _sfc_main$52 as UDialog, _sfc_main$96 as UDivider, _sfc_main$15 as UDrawer, _sfc_main$4 as UDropdown, _sfc_main$74 as UDualNav, _sfc_main$1 as UEmpty, _sfc_main$53 as UExpressionEditor, _sfc_main$41 as UFilePicker, _sfc_main$80 as UFileViewer, _sfc_main$84 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$39 as UGanttChart, _sfc_main$16 as UGrid, _sfc_main$76 as UGridInput, _sfc_main$17 as UGridItem, _sfc_main$67 as UGroupInput, _sfc_main$75 as UGroupNav, _sfc_main as UIcon, _sfc_main$87 as UImageCropper, input_default as UInput, _sfc_main$88 as UKanban, _sfc_main$55 as UKbd, _sfc_main$34 as ULayout, _sfc_main$68 as UList, _sfc_main$69 as UListItem, _sfc_main$5 as ULoading, _sfc_main$40 as UMessage, _sfc_main$20 as UMessageConfirm, _sfc_main$37 as UMultiSelect, _sfc_main$66 as UMultiTreeSelect, _sfc_main$73 as UNav, _sfc_main$71 as UNavItem, _sfc_main$72 as UNavSub, NodeRender as UNodeRender, _sfc_main$33 as UNotification, _sfc_main$51 as UNumber, _sfc_main$42 as UNumberInput, _sfc_main$43 as UNumberRangeInput, _sfc_main$83 as UPaginator, _sfc_main$64 as UPalette, _sfc_main$50 as UPasswordInput, _sfc_main$56 as UPopConfirm, _sfc_main$32 as UProgress, _sfc_main$30 as UProgressNodes, _sfc_main$22 as URadio, _sfc_main$78 as URadioGroup, _sfc_main$95 as URate, _sfc_main$70 as URichTextEditor, _sfc_main$2 as UScroll, _sfc_main$86 as USegment, _sfc_main$6 as USelect, _sfc_main$98 as USkeleton, _sfc_main$38 as USlider, _sfc_main$97 as USpace, _sfc_main$62 as USteps, _sfc_main$77 as USwitch, _sfc_main$46 as UTable, _sfc_main$47 as UTableEditor, _sfc_main$10 as UTabs, _sfc_main$8 as UTabsHorizontal, _sfc_main$9 as UTabsVertical, _sfc_main$35 as UTag, _sfc_main$81 as UText, _sfc_main$60 as UTextarea, _sfc_main$65 as UTheme, _sfc_main$99 as UTimePicker, _sfc_main$102 as UTimeline, _sfc_main$103 as UTimelineItem, _sfc_main$3 as UTip, _sfc_main$59 as UTransfer, _sfc_main$12 as UTree, _sfc_main$13 as UTreeSelect, _sfc_main$54 as UWatermark, components_exports, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
214
250
|
|
|
215
251
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './condition-editor'\n\nexport * from './tabs'\n\nexport * from './tree'\n\nexport * from './tree-select'\n\nexport * from './code-editor'\n\nexport * from './dropdown'\n\nexport * from './drawer'\n\nexport * from './form'\n\nexport * from './message-confirm'\n\nexport * from './calendar'\n\nexport * from './radio'\n\nexport * from './card'\n\nexport * from './date-range-picker'\n\nexport * from './loading'\n\nexport * from './scroll'\n\nexport * from './progress-nodes'\n\nexport * from './empty'\n\nexport * from './auto-complete'\n\nexport * from './progress'\n\nexport * from './input'\n\nexport * from './notification'\n\nexport * from './layout'\n\nexport * from './multi-select'\n\nexport * from './checkbox'\n\nexport * from './slider'\n\nexport * from './gantt-chart'\n\nexport * from './message'\n\nexport * from './file-picker'\n\nexport * from './number-range-input'\n\nexport * from './number-input'\n\nexport * from './collapse'\n\nexport * from './date-panel'\n\nexport * from './table-editor'\n\nexport * from './check-tag'\n\nexport * from './contextmenu'\n\nexport * from './password-input'\n\nexport * from './number'\n\nexport * from './dialog'\n\nexport * from './node-render'\n\nexport * from './expression-editor'\n\nexport * from './watermark'\n\nexport * from './batch-edit'\n\nexport * from './action'\n\nexport * from './tip'\n\nexport * from './textarea'\n\nexport * from './button'\n\nexport * from './cascade'\n\nexport * from './steps'\n\nexport * from './date-picker'\n\nexport * from './theme'\n\nexport * from './table'\n\nexport * from './multi-tree-select'\n\nexport * from './group-input'\n\nexport * from './list'\n\nexport * from './rich-text-editor'\n\nexport * from './nav'\n\nexport * from './dual-nav'\n\nexport * from './group-nav'\n\nexport * from './grid-input'\n\nexport * from './switch'\n\nexport * from './form-item'\n\nexport * from './radio-group'\n\nexport * from './checkbox-group'\n\nexport * from './file-viewer'\n\nexport * from './text'\n\nexport * from './select'\n\nexport * from './breadcrumb'\n\nexport * from './icon'\n\nexport * from './kbd'\n\nexport * from './pop-confirm'\n\nexport * from './paginator'\n\nexport * from './tag'\n\nexport * from './float-button'\n\nexport * from './palette'\n\nexport * from './grid'\n\nexport * from './badge'\n\nexport * from './segment'\n\nexport * from './image-cropper'\n\nexport * from './kanban'\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './condition-editor'\n\nexport * from './tabs'\n\nexport * from './tree'\n\nexport * from './tree-select'\n\nexport * from './code-editor'\n\nexport * from './dropdown'\n\nexport * from './drawer'\n\nexport * from './form'\n\nexport * from './message-confirm'\n\nexport * from './calendar'\n\nexport * from './radio'\n\nexport * from './card'\n\nexport * from './date-range-picker'\n\nexport * from './loading'\n\nexport * from './scroll'\n\nexport * from './progress-nodes'\n\nexport * from './empty'\n\nexport * from './auto-complete'\n\nexport * from './progress'\n\nexport * from './input'\n\nexport * from './notification'\n\nexport * from './layout'\n\nexport * from './multi-select'\n\nexport * from './checkbox'\n\nexport * from './slider'\n\nexport * from './gantt-chart'\n\nexport * from './message'\n\nexport * from './file-picker'\n\nexport * from './number-range-input'\n\nexport * from './number-input'\n\nexport * from './collapse'\n\nexport * from './date-panel'\n\nexport * from './table-editor'\n\nexport * from './check-tag'\n\nexport * from './contextmenu'\n\nexport * from './password-input'\n\nexport * from './number'\n\nexport * from './dialog'\n\nexport * from './node-render'\n\nexport * from './expression-editor'\n\nexport * from './watermark'\n\nexport * from './batch-edit'\n\nexport * from './action'\n\nexport * from './tip'\n\nexport * from './transfer'\n\nexport * from './textarea'\n\nexport * from './button'\n\nexport * from './cascade'\n\nexport * from './steps'\n\nexport * from './date-picker'\n\nexport * from './theme'\n\nexport * from './table'\n\nexport * from './multi-tree-select'\n\nexport * from './group-input'\n\nexport * from './list'\n\nexport * from './rich-text-editor'\n\nexport * from './nav'\n\nexport * from './dual-nav'\n\nexport * from './group-nav'\n\nexport * from './grid-input'\n\nexport * from './switch'\n\nexport * from './form-item'\n\nexport * from './radio-group'\n\nexport * from './checkbox-group'\n\nexport * from './file-viewer'\n\nexport * from './text'\n\nexport * from './select'\n\nexport * from './breadcrumb'\n\nexport * from './icon'\n\nexport * from './kbd'\n\nexport * from './pop-confirm'\n\nexport * from './paginator'\n\nexport * from './tag'\n\nexport * from './float-button'\n\nexport * from './palette'\n\nexport * from './grid'\n\nexport * from './badge'\n\nexport * from './segment'\n\nexport * from './image-cropper'\n\nexport * from './kanban'\n\nexport * from './anchor'\n\nexport * from './avatar'\n\nexport * from './back-top'\n\nexport * from './alert'\n\nexport * from './rate'\n\nexport * from './divider'\n\nexport * from './space'\n\nexport * from './skeleton'\n\nexport * from './time-picker'\n\nexport * from './descriptions'\n\nexport * from './timeline'\n\nexport * from './carousel'\n"],"mappings":""}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon/icon.js";
|
|
2
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, openBlock, ref, renderList, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
3
|
+
import { useFormFallbackProps } from "@veltra/compositions";
|
|
4
|
+
import { bem, injectFormContext } from "@veltra/utils";
|
|
5
|
+
import { StarFilled } from "@veltra/icons/normal";
|
|
6
|
+
//#region src/components/rate/rate.vue
|
|
7
|
+
const _hoisted_1 = [
|
|
8
|
+
"tabindex",
|
|
9
|
+
"aria-valuemax",
|
|
10
|
+
"aria-valuenow"
|
|
11
|
+
];
|
|
12
|
+
const _hoisted_2 = ["onMousemove", "onClick"];
|
|
13
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
14
|
+
name: "URate",
|
|
15
|
+
__name: "rate",
|
|
16
|
+
props: /*@__PURE__*/ mergeModels({
|
|
17
|
+
modelValue: {},
|
|
18
|
+
count: {},
|
|
19
|
+
allowHalf: { type: Boolean },
|
|
20
|
+
character: {},
|
|
21
|
+
color: {},
|
|
22
|
+
tips: {},
|
|
23
|
+
span: {},
|
|
24
|
+
label: {},
|
|
25
|
+
field: {},
|
|
26
|
+
disabled: { type: Boolean },
|
|
27
|
+
readonly: { type: Boolean },
|
|
28
|
+
rules: {},
|
|
29
|
+
size: {}
|
|
30
|
+
}, {
|
|
31
|
+
"modelValue": { default: 0 },
|
|
32
|
+
"modelModifiers": {}
|
|
33
|
+
}),
|
|
34
|
+
emits: /*@__PURE__*/ mergeModels(["update:modelValue", "change"], ["update:modelValue"]),
|
|
35
|
+
setup(__props, { emit: __emit }) {
|
|
36
|
+
const props = __props;
|
|
37
|
+
const emit = __emit;
|
|
38
|
+
const cls = bem("rate");
|
|
39
|
+
const model = useModel(__props, "modelValue");
|
|
40
|
+
const { formProps } = injectFormContext();
|
|
41
|
+
const { disabled, readonly } = useFormFallbackProps([formProps ?? {}, props]);
|
|
42
|
+
const count = computed(() => props.count ?? 5);
|
|
43
|
+
/** 步长:允许半星时 0.5,否则 1 */
|
|
44
|
+
const step = computed(() => props.allowHalf ? .5 : 1);
|
|
45
|
+
/** 悬浮预览的分值,未悬浮时为 undefined */
|
|
46
|
+
const hoverValue = ref();
|
|
47
|
+
const interactive = computed(() => !disabled.value && !readonly.value);
|
|
48
|
+
const className = computed(() => [
|
|
49
|
+
cls.b,
|
|
50
|
+
bem.is("disabled", disabled.value),
|
|
51
|
+
bem.is("readonly", readonly.value)
|
|
52
|
+
]);
|
|
53
|
+
/** color 属性经 CSS 变量注入,未传时走 token 默认值 */
|
|
54
|
+
const rateStyle = computed(() => ({ "--u-rate-active-color": props.color }));
|
|
55
|
+
/** 当前展示分值:悬浮预览优先 */
|
|
56
|
+
const displayValue = computed(() => hoverValue.value ?? model.value);
|
|
57
|
+
/** 第 star 颗星彩色层的裁剪宽度 */
|
|
58
|
+
const overlayWidth = (star) => {
|
|
59
|
+
const value = displayValue.value;
|
|
60
|
+
if (value >= star) return "100%";
|
|
61
|
+
if (props.allowHalf && value >= star - .5) return "50%";
|
|
62
|
+
return "0%";
|
|
63
|
+
};
|
|
64
|
+
/** 按事件位置算分值:左半颗 0.5(allowHalf 时),右半颗整颗 */
|
|
65
|
+
const eventToValue = (star, e) => {
|
|
66
|
+
if (!props.allowHalf) return star;
|
|
67
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
68
|
+
return e.clientX - rect.left < rect.width / 2 ? star - .5 : star;
|
|
69
|
+
};
|
|
70
|
+
const handleItemMove = (star, e) => {
|
|
71
|
+
if (!interactive.value) return;
|
|
72
|
+
hoverValue.value = eventToValue(star, e);
|
|
73
|
+
};
|
|
74
|
+
const handleItemClick = (star, e) => {
|
|
75
|
+
if (!interactive.value) return;
|
|
76
|
+
setValue(eventToValue(star, e));
|
|
77
|
+
};
|
|
78
|
+
const handleKeydown = (e) => {
|
|
79
|
+
if (!interactive.value) return;
|
|
80
|
+
const delta = {
|
|
81
|
+
ArrowRight: step.value,
|
|
82
|
+
ArrowUp: step.value,
|
|
83
|
+
ArrowLeft: -step.value,
|
|
84
|
+
ArrowDown: -step.value
|
|
85
|
+
}[e.key];
|
|
86
|
+
if (delta === void 0) return;
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
setValue(clamp(model.value + delta));
|
|
89
|
+
};
|
|
90
|
+
const clamp = (value) => Math.min(Math.max(value, 0), count.value);
|
|
91
|
+
const setValue = (value) => {
|
|
92
|
+
if (value === model.value) return;
|
|
93
|
+
model.value = value;
|
|
94
|
+
emit("change", value);
|
|
95
|
+
};
|
|
96
|
+
return (_ctx, _cache) => {
|
|
97
|
+
return openBlock(), createElementBlock("div", {
|
|
98
|
+
class: normalizeClass(className.value),
|
|
99
|
+
style: normalizeStyle(rateStyle.value),
|
|
100
|
+
tabindex: interactive.value ? 0 : -1,
|
|
101
|
+
role: "slider",
|
|
102
|
+
"aria-valuemin": 0,
|
|
103
|
+
"aria-valuemax": count.value,
|
|
104
|
+
"aria-valuenow": model.value,
|
|
105
|
+
onMouseleave: _cache[0] || (_cache[0] = ($event) => hoverValue.value = void 0),
|
|
106
|
+
onKeydown: handleKeydown
|
|
107
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(count.value, (star) => {
|
|
108
|
+
return openBlock(), createElementBlock("div", {
|
|
109
|
+
key: star,
|
|
110
|
+
class: normalizeClass(unref(cls).e("item")),
|
|
111
|
+
onMousemove: ($event) => handleItemMove(star, $event),
|
|
112
|
+
onClick: ($event) => handleItemClick(star, $event)
|
|
113
|
+
}, [createElementVNode("span", { class: normalizeClass(unref(cls).e("base")) }, [!__props.character ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 }, {
|
|
114
|
+
default: withCtx(() => [createVNode(unref(StarFilled))]),
|
|
115
|
+
_: 1
|
|
116
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.character), 1)], 64))], 2), createElementVNode("span", {
|
|
117
|
+
class: normalizeClass(unref(cls).e("overlay")),
|
|
118
|
+
style: normalizeStyle({ width: overlayWidth(star) })
|
|
119
|
+
}, [!__props.character ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 }, {
|
|
120
|
+
default: withCtx(() => [createVNode(unref(StarFilled))]),
|
|
121
|
+
_: 1
|
|
122
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.character), 1)], 64))], 6)], 42, _hoisted_2);
|
|
123
|
+
}), 128))], 46, _hoisted_1);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
//#endregion
|
|
128
|
+
export { _sfc_main as default };
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=rate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate.js","names":["_useModel","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_Fragment","_renderList","_unref","_createElementVNode","_createBlock","UIcon","_withCtx","_createVNode","_createTextVNode","_toDisplayString"],"sources":["../../../src/components/rate/rate.vue"],"sourcesContent":["<template>\n <div\n :class=\"className\"\n :style=\"rateStyle\"\n :tabindex=\"interactive ? 0 : -1\"\n role=\"slider\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"count\"\n :aria-valuenow=\"model\"\n @mouseleave=\"hoverValue = undefined\"\n @keydown=\"handleKeydown\"\n >\n <div\n v-for=\"star in count\"\n :key=\"star\"\n :class=\"cls.e('item')\"\n @mousemove=\"handleItemMove(star, $event)\"\n @click=\"handleItemClick(star, $event)\"\n >\n <span :class=\"cls.e('base')\">\n <u-icon v-if=\"!character\"><StarFilled /></u-icon>\n <template v-else>{{ character }}</template>\n </span>\n\n <span :class=\"cls.e('overlay')\" :style=\"{ width: overlayWidth(star) }\">\n <u-icon v-if=\"!character\"><StarFilled /></u-icon>\n <template v-else>{{ character }}</template>\n </span>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFormFallbackProps } from '@veltra/compositions'\nimport { StarFilled } from '@veltra/icons/normal'\nimport { bem, injectFormContext } from '@veltra/utils'\nimport { computed, ref, type CSSProperties } from 'vue'\n\nimport type { RateEmits, RateProps } from '../../types'\nimport { UIcon } from '../icon'\n\ndefineOptions({ name: 'URate' })\n\nconst props = defineProps<RateProps>()\n\nconst emit = defineEmits<RateEmits>()\n\nconst cls = bem('rate')\n\nconst model = defineModel<number>({ default: 0 })\n\nconst { formProps } = injectFormContext()\n\nconst { disabled, readonly } = useFormFallbackProps([formProps ?? {}, props])\n\nconst count = computed(() => props.count ?? 5)\n\n/** 步长:允许半星时 0.5,否则 1 */\nconst step = computed(() => (props.allowHalf ? 0.5 : 1))\n\n/** 悬浮预览的分值,未悬浮时为 undefined */\nconst hoverValue = ref<number | undefined>()\n\nconst interactive = computed(() => !disabled.value && !readonly.value)\n\nconst className = computed(() => [\n cls.b,\n bem.is('disabled', disabled.value),\n bem.is('readonly', readonly.value)\n])\n\n/** color 属性经 CSS 变量注入,未传时走 token 默认值 */\nconst rateStyle = computed<CSSProperties>(() => ({ '--u-rate-active-color': props.color }))\n\n/** 当前展示分值:悬浮预览优先 */\nconst displayValue = computed(() => hoverValue.value ?? model.value)\n\n/** 第 star 颗星彩色层的裁剪宽度 */\nconst overlayWidth = (star: number) => {\n const value = displayValue.value\n if (value >= star) return '100%'\n if (props.allowHalf && value >= star - 0.5) return '50%'\n return '0%'\n}\n\n/** 按事件位置算分值:左半颗 0.5(allowHalf 时),右半颗整颗 */\nconst eventToValue = (star: number, e: MouseEvent) => {\n if (!props.allowHalf) return star\n\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect()\n return e.clientX - rect.left < rect.width / 2 ? star - 0.5 : star\n}\n\nconst handleItemMove = (star: number, e: MouseEvent) => {\n if (!interactive.value) return\n hoverValue.value = eventToValue(star, e)\n}\n\nconst handleItemClick = (star: number, e: MouseEvent) => {\n if (!interactive.value) return\n setValue(eventToValue(star, e))\n}\n\nconst handleKeydown = (e: KeyboardEvent) => {\n if (!interactive.value) return\n\n const keyMap: Record<string, number> = {\n ArrowRight: step.value,\n ArrowUp: step.value,\n ArrowLeft: -step.value,\n ArrowDown: -step.value\n }\n const delta = keyMap[e.key]\n if (delta === undefined) return\n\n e.preventDefault()\n setValue(clamp(model.value + delta))\n}\n\nconst clamp = (value: number) => Math.min(Math.max(value, 0), count.value)\n\nconst setValue = (value: number) => {\n if (value === model.value) return\n model.value = value\n emit('change', value)\n}\n</script>\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./style2.css";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/** flex布局 */
|
|
3
|
+
/**
|
|
4
|
+
* 设置css变量
|
|
5
|
+
* 参数1:变量前缀
|
|
6
|
+
* 参数2: 一个由值组成的列表或者由key, value组成的map
|
|
7
|
+
* css-var(height, (
|
|
8
|
+
* large: 40px
|
|
9
|
+
* default: 32px
|
|
10
|
+
* small: 24px
|
|
11
|
+
* ))
|
|
12
|
+
* 生成的css变量:
|
|
13
|
+
* --u-height-large: 40px;
|
|
14
|
+
* --u-height-default: 32px;
|
|
15
|
+
* --u-height-small: 24px;
|
|
16
|
+
*/
|
|
17
|
+
/** 暗色:`UITheme.render()` 按主题系列写入 html[data-theme] */
|
|
18
|
+
.u-rate {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
align-items: center;
|
|
22
|
+
flex-wrap: nowrap;
|
|
23
|
+
gap: var(--u-gap-small);
|
|
24
|
+
font-size: var(--u-font-size-main-large);
|
|
25
|
+
outline: none;
|
|
26
|
+
border-radius: var(--u-radius-small);
|
|
27
|
+
}
|
|
28
|
+
.u-rate.is-disabled {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
opacity: 0.55;
|
|
31
|
+
}
|
|
32
|
+
.u-rate.is-readonly {
|
|
33
|
+
cursor: default;
|
|
34
|
+
}
|
|
35
|
+
.u-rate:not(.is-readonly):not(.is-disabled) {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
38
|
+
.u-rate:not(.is-readonly):not(.is-disabled):focus-visible {
|
|
39
|
+
box-shadow: var(--u-focus-ring);
|
|
40
|
+
}
|
|
41
|
+
.u-rate__item {
|
|
42
|
+
position: relative;
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
}
|
|
45
|
+
.u-rate__base {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
color: var(--u-text-color-placeholder);
|
|
48
|
+
}
|
|
49
|
+
.u-rate__overlay {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
height: 100%;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
color: var(--u-rate-active-color, var(--u-color-warning));
|
|
58
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderList, renderSlot, unref } from "vue";
|
|
2
|
+
import { bem } from "@veltra/utils";
|
|
3
|
+
//#region src/components/skeleton/skeleton.vue
|
|
4
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
5
|
+
name: "USkeleton",
|
|
6
|
+
__name: "skeleton",
|
|
7
|
+
props: {
|
|
8
|
+
loading: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: true
|
|
11
|
+
},
|
|
12
|
+
avatar: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
title: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: true
|
|
19
|
+
},
|
|
20
|
+
paragraph: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
24
|
+
rows: { default: 3 },
|
|
25
|
+
button: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
round: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
animated: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
setup(__props) {
|
|
39
|
+
const cls = bem("skeleton");
|
|
40
|
+
const className = computed(() => [
|
|
41
|
+
cls.b,
|
|
42
|
+
bem.is("animated", __props.animated),
|
|
43
|
+
bem.is("round", __props.round)
|
|
44
|
+
]);
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return __props.loading ? (openBlock(), createElementBlock("div", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: normalizeClass(className.value)
|
|
49
|
+
}, [__props.avatar ? (openBlock(), createElementBlock("span", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: normalizeClass(unref(cls).e("avatar"))
|
|
52
|
+
}, null, 2)) : createCommentVNode("v-if", true), createElementVNode("div", { class: normalizeClass(unref(cls).e("content")) }, [
|
|
53
|
+
__props.title ? (openBlock(), createElementBlock("span", {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: normalizeClass(unref(cls).e("title"))
|
|
56
|
+
}, null, 2)) : createCommentVNode("v-if", true),
|
|
57
|
+
__props.paragraph ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.rows, (i) => {
|
|
58
|
+
return openBlock(), createElementBlock("span", {
|
|
59
|
+
key: i,
|
|
60
|
+
class: normalizeClass(unref(cls).e("paragraph"))
|
|
61
|
+
}, null, 2);
|
|
62
|
+
}), 128)) : createCommentVNode("v-if", true),
|
|
63
|
+
__props.button ? (openBlock(), createElementBlock("span", {
|
|
64
|
+
key: 2,
|
|
65
|
+
class: normalizeClass(unref(cls).e("button"))
|
|
66
|
+
}, null, 2)) : createCommentVNode("v-if", true)
|
|
67
|
+
], 2)], 2)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
//#endregion
|
|
72
|
+
export { _sfc_main as default };
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_createCommentVNode","_createElementVNode","_Fragment","_renderList","_renderSlot"],"sources":["../../../src/components/skeleton/skeleton.vue"],"sourcesContent":["<template>\n <div v-if=\"loading\" :class=\"className\">\n <span v-if=\"avatar\" :class=\"cls.e('avatar')\" />\n <div :class=\"cls.e('content')\">\n <span v-if=\"title\" :class=\"cls.e('title')\" />\n <template v-if=\"paragraph\">\n <span v-for=\"i in rows\" :key=\"i\" :class=\"cls.e('paragraph')\" />\n </template>\n <span v-if=\"button\" :class=\"cls.e('button')\" />\n </div>\n </div>\n <slot v-else />\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem } from '@veltra/utils'\nimport { computed } from 'vue'\n\nimport type { SkeletonProps } from '../../types'\n\ndefineOptions({ name: 'USkeleton' })\n\nconst {\n loading = true,\n avatar = false,\n title = true,\n paragraph = true,\n rows = 3,\n button = false,\n round = false,\n animated = false\n} = defineProps<SkeletonProps>()\n\nconst cls = bem('skeleton')\n\nconst className = computed(() => [cls.b, bem.is('animated', animated), bem.is('round', round)])\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCA,MAAM,MAAM,IAAI,UAAU;EAE1B,MAAM,YAAY,eAAe;GAAC,IAAI;GAAG,IAAI,GAAG,YAAY,QAAA,QAAQ;GAAG,IAAI,GAAG,SAAS,QAAA,KAAK;EAAC,CAAC;;GAlCjF,OAAA,QAAA,WAAXA,UAAA,GAAAC,mBASM,OAAA;;IATe,OAAKC,eAAE,UAAA,KAAS;GACvB,GAAA,CAAA,QAAA,UAAZF,UAAA,GAAAC,mBAA+C,QAAA;;IAA1B,OAAKC,eAAEC,MAAA,GAAA,CAAG,CAAC,EAAC,QAAA,CAAA;GACjC,GAAA,MAAA,CAAA,KAAAC,mBAAA,QAAA,IAAA,GAAAC,mBAMM,OAAA,EANA,OAAKH,eAAEC,MAAA,GAAA,CAAG,CAAC,EAAC,SAAA,CAAA,EAAA,GAAA;IACJ,QAAA,SAAZH,UAAA,GAAAC,mBAA6C,QAAA;;KAAzB,OAAKC,eAAEC,MAAA,GAAA,CAAG,CAAC,EAAC,OAAA,CAAA;;IAChB,QAAA,aACdH,UAAA,IAAA,GAAAC,mBAA+DK,UAAA,EAAA,KAAA,EAAA,GAAAC,WAA7C,QAAA,OAAL,MAAC;KAAd,OAAAP,UAAA,GAAAC,mBAA+D,QAAA;MAAtC,KAAK;MAAI,OAAKC,eAAEC,MAAA,GAAA,CAAG,CAAC,EAAC,WAAA,CAAA;;;IAEpC,QAAA,UAAZH,UAAA,GAAAC,mBAA+C,QAAA;;KAA1B,OAAKC,eAAEC,MAAA,GAAA,CAAG,CAAC,EAAC,QAAA,CAAA;;GAGrC,GAAA,CAAA,CAAA,GAAA,CAAA,KAAAK,WAAe,KAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./style2.css";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/** flex布局 */
|
|
3
|
+
/**
|
|
4
|
+
* 设置css变量
|
|
5
|
+
* 参数1:变量前缀
|
|
6
|
+
* 参数2: 一个由值组成的列表或者由key, value组成的map
|
|
7
|
+
* css-var(height, (
|
|
8
|
+
* large: 40px
|
|
9
|
+
* default: 32px
|
|
10
|
+
* small: 24px
|
|
11
|
+
* ))
|
|
12
|
+
* 生成的css变量:
|
|
13
|
+
* --u-height-large: 40px;
|
|
14
|
+
* --u-height-default: 32px;
|
|
15
|
+
* --u-height-small: 24px;
|
|
16
|
+
*/
|
|
17
|
+
/** 暗色:`UITheme.render()` 按主题系列写入 html[data-theme] */
|
|
18
|
+
.u-skeleton {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: flex-start;
|
|
21
|
+
gap: var(--u-gap-default);
|
|
22
|
+
}
|
|
23
|
+
.u-skeleton__avatar {
|
|
24
|
+
flex: none;
|
|
25
|
+
width: 40px;
|
|
26
|
+
height: 40px;
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
background-color: var(--u-bg-color-hover);
|
|
29
|
+
}
|
|
30
|
+
.u-skeleton__content {
|
|
31
|
+
flex: 1;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: var(--u-gap-default);
|
|
35
|
+
min-width: 0;
|
|
36
|
+
}
|
|
37
|
+
.u-skeleton__title {
|
|
38
|
+
height: 16px;
|
|
39
|
+
width: 33%;
|
|
40
|
+
border-radius: var(--u-radius-small);
|
|
41
|
+
background-color: var(--u-bg-color-hover);
|
|
42
|
+
}
|
|
43
|
+
.u-skeleton__paragraph {
|
|
44
|
+
height: 14px;
|
|
45
|
+
border-radius: var(--u-radius-small);
|
|
46
|
+
background-color: var(--u-bg-color-hover);
|
|
47
|
+
}
|
|
48
|
+
.u-skeleton__paragraph:last-child {
|
|
49
|
+
width: 60%;
|
|
50
|
+
}
|
|
51
|
+
.u-skeleton__button {
|
|
52
|
+
width: 80px;
|
|
53
|
+
height: var(--u-form-component-height-default);
|
|
54
|
+
border-radius: var(--u-radius-default);
|
|
55
|
+
background-color: var(--u-bg-color-hover);
|
|
56
|
+
}
|
|
57
|
+
.u-skeleton.is-round .u-skeleton__title {
|
|
58
|
+
border-radius: var(--u-radius-large);
|
|
59
|
+
}
|
|
60
|
+
.u-skeleton.is-round .u-skeleton__paragraph {
|
|
61
|
+
border-radius: var(--u-radius-large);
|
|
62
|
+
}
|
|
63
|
+
.u-skeleton.is-round .u-skeleton__button {
|
|
64
|
+
border-radius: var(--u-radius-large);
|
|
65
|
+
}
|
|
66
|
+
.u-skeleton.is-animated .u-skeleton__avatar {
|
|
67
|
+
animation: skeleton-pulse 1.4s ease-in-out infinite;
|
|
68
|
+
}
|
|
69
|
+
.u-skeleton.is-animated .u-skeleton__title {
|
|
70
|
+
animation: skeleton-pulse 1.4s ease-in-out infinite;
|
|
71
|
+
}
|
|
72
|
+
.u-skeleton.is-animated .u-skeleton__paragraph {
|
|
73
|
+
animation: skeleton-pulse 1.4s ease-in-out infinite;
|
|
74
|
+
}
|
|
75
|
+
.u-skeleton.is-animated .u-skeleton__button {
|
|
76
|
+
animation: skeleton-pulse 1.4s ease-in-out infinite;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes skeleton-pulse {
|
|
80
|
+
0%, 100% {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
50% {
|
|
84
|
+
opacity: 0.4;
|
|
85
|
+
}
|
|
86
|
+
}
|