Skip to content

Commit ef9ed78

Browse files
author
deardai
committed
feat: optimize and fix component library
- Replace mouse events with pointer events in ColorPicker, Scrollbar, Image, Slider - Optimize Table header sticky scroll effect - Add touch-action: none to ColorPicker sliders to prevent page scroll on touch devices - Update dependencies and minor code/docs improvements
1 parent cd5b200 commit ef9ed78

35 files changed

Lines changed: 9915 additions & 9376 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Features
1818

19-
- The component library is implemented with `Vue@3.5.24`+ `TypeScript@5.9.3` + `Vite@7.2.2` + `Less@4.4.2`.
19+
- The component library is implemented with `Vue@3.5.29`+ `TypeScript@5.9.3` + `Vite@7.3.1` + `Less@4.5.1`.
2020
- Currently, it includes `67` basic UI components and `18` utility functions, with continuous exploration and updates ongoing...
2121
- Theme Customizable, all you need is to provide a theme color, then all the stuffs will be done by me.
2222
- By the way, they are all treeshakable.

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## 特性
1818

19-
- 组件库采用 `Vue@3.5.24`+ `TypeScript@5.9.3` + `Vite@7.2.2` + `Less@4.4.2` 实现
19+
- 组件库采用 `Vue@3.5.29`+ `TypeScript@5.9.3` + `Vite@7.3.1` + `Less@4.5.1` 实现
2020
- 目前共包含 `67` 个基础 `UI` 组件以及 `18` 个工具函数,并且持续探索更新中...
2121
- 主题可调,你只需提供一个主题色,剩下的都交给我
2222
- 顺便一提,它们全都可以 `treeshaking`

components/datepicker/DatePicker.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface Props {
77
width?: string | number // 日期选择器宽度,单位 px
88
size?: 'small' | 'middle' | 'large' // 日期选择器大小
99
mode?: 'time' | 'date' | 'week' | 'month' | 'year' // 选择器模式,可选:时间 time,日期 date,周 week,月 month,年 year
10-
// format?: string | ((date: Date) => string) | ((dates: Date[]) => string) // 日期展示格式,(yy: 年, M: 月, d: 天, H: 时, m: 分, s: 秒, w: 周)
10+
format?: string | ((date: Date) => string) | ((dates: Date[]) => string) // 日期展示格式,(yy: 年, M: 月, d: 天, H: 时, m: 分, s: 秒, w: 周)
1111
showTime?: boolean // 是否增加时间选择
1212
showToday?: boolean // 是否展示”今天“按钮
1313
range?: boolean // 是否使用范围选择器
@@ -22,13 +22,14 @@ const props = withDefaults(defineProps<Props>(), {
2222
size: 'middle',
2323
mode: 'date',
2424
/* format default
25-
Single picker: 'MM/dd/yyyy HH:mm'
25+
Date picker: 'MM/dd/yyyy HH:mm'
2626
Range picker: 'MM/dd/yyyy HH:mm - MM/dd/yyyy HH:mm'
2727
Month picker: 'MM/yyyy'
2828
Time picker: 'HH:mm'
2929
Time picker range: 'HH:mm - HH:mm'
30-
Week picker: 'ww-yyyy'
30+
Week picker: 'RR-yyyy' | 'ww-yyyy' (depends on week numbering)
3131
*/
32+
format: undefined,
3233
showTime: false,
3334
showToday: false,
3435
range: false,
@@ -112,6 +113,7 @@ function maxRangeDisabledDates(date: Date): boolean {
112113
auto-apply
113114
text-input
114115
:model-type="modelType"
116+
:formats="{ input: format }"
115117
:day-names="['', '', '', '', '', '', '']"
116118
:disabled-dates="range && maxRange ? maxRangeDisabledDates : []"
117119
@range-start="rangeStart"

components/modal/Modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const modalContentStyle = computed(() => {
126126
return getComputedValue('contentStyle') as CSSProperties
127127
})
128128
const modalBodyClass = computed(() => {
129-
return getComputedValue('bodyClass')
129+
return getComputedValue('bodyClass') as string
130130
})
131131
const modalBodyStyle = computed(() => {
132132
return getComputedValue('bodyStyle') as CSSProperties

components/utils/resolver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ function getSideEffects(componentName: string, options?: VueAmazingUIResolverOpt
119119
if (componentName === 'DatePicker') {
120120
// 特殊处理 DatePicker 组件样式依赖文件
121121
sideEffects.push(
122-
`vue-amazing-ui/${type}/node_modules/.pnpm/@vuepic_vue-datepicker@12.0.4_vue@3.5.24_typescript@5.9.3_/node_modules/@vuepic/vue-datepicker/dist/main.css`
122+
`vue-amazing-ui/${type}/node_modules/.pnpm/@vuepic_vue-datepicker@12.1.0_vue@3.5.29_typescript@5.9.3_/node_modules/@vuepic/vue-datepicker/dist/main.css`
123123
)
124124
}
125125
if (componentName === 'Swiper') {
126126
// 特殊处理 Swiper 组件样式依赖文件
127-
sideEffects.push(`vue-amazing-ui/${type}/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper.css`)
127+
sideEffects.push(`vue-amazing-ui/${type}/node_modules/.pnpm/swiper@12.1.2/node_modules/swiper/swiper.css`)
128128
const swiperModulesStyle = [
129129
'effect-cards',
130130
'effect-creative',
@@ -136,7 +136,7 @@ function getSideEffects(componentName: string, options?: VueAmazingUIResolverOpt
136136
]
137137
swiperModulesStyle.forEach((moduleName) => {
138138
sideEffects.push(
139-
`vue-amazing-ui/${type}/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/${moduleName}.css`
139+
`vue-amazing-ui/${type}/node_modules/.pnpm/swiper@12.1.2/node_modules/swiper/modules/${moduleName}.css`
140140
)
141141
})
142142
}

docs/.vitepress/cache/deps/@ant-design_colors.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.vitepress/cache/deps/@ant-design_colors.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)