Skip to content

Commit a4aa133

Browse files
authored
Merge branch 'main' into tdesign
2 parents 83ea27a + 6bbe523 commit a4aa133

File tree

6 files changed

+31
-14
lines changed

6 files changed

+31
-14
lines changed

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"prefixs",
3737
"publint",
3838
"qrcode",
39+
"reka",
3940
"shadcn",
4041
"sonner",
4142
"sortablejs",

internal/tailwind-config/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,18 @@ export default {
175175
keyframes: {
176176
'accordion-down': {
177177
from: { height: '0' },
178-
to: { height: 'var(--radix-accordion-content-height)' },
178+
to: { height: 'var(--reka-accordion-content-height)' },
179179
},
180180
'accordion-up': {
181-
from: { height: 'var(--radix-accordion-content-height)' },
181+
from: { height: 'var(--reka-accordion-content-height)' },
182182
to: { height: '0' },
183183
},
184184
'collapsible-down': {
185185
from: { height: '0' },
186-
to: { height: 'var(--radix-collapsible-content-height)' },
186+
to: { height: 'var(--reka-collapsible-content-height)' },
187187
},
188188
'collapsible-up': {
189-
from: { height: 'var(--radix-collapsible-content-height)' },
189+
from: { height: 'var(--reka-collapsible-content-height)' },
190190
to: { height: '0' },
191191
},
192192
float: {

packages/@core/base/shared/src/utils/date.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ dayjs.extend(timezone);
77

88
type FormatDate = Date | dayjs.Dayjs | number | string;
99

10-
export function formatDate(time: FormatDate, format = 'YYYY-MM-DD') {
10+
type Format =
11+
| 'HH'
12+
| 'HH:mm'
13+
| 'HH:mm:ss'
14+
| 'YYYY'
15+
| 'YYYY-MM'
16+
| 'YYYY-MM-DD'
17+
| 'YYYY-MM-DD HH'
18+
| 'YYYY-MM-DD HH:mm'
19+
| 'YYYY-MM-DD HH:mm:ss'
20+
| (string & {});
21+
22+
export function formatDate(time?: FormatDate, format: Format = 'YYYY-MM-DD') {
1123
try {
1224
const date = dayjs.isDayjs(time) ? time : dayjs(time);
1325
if (!date.isValid()) {
@@ -16,11 +28,11 @@ export function formatDate(time: FormatDate, format = 'YYYY-MM-DD') {
1628
return date.tz().format(format);
1729
} catch (error) {
1830
console.error(`Error formatting date: ${error}`);
19-
return String(time);
31+
return String(time ?? '');
2032
}
2133
}
2234

23-
export function formatDateTime(time: FormatDate) {
35+
export function formatDateTime(time?: FormatDate) {
2436
return formatDate(time, 'YYYY-MM-DD HH:mm:ss');
2537
}
2638

packages/@core/ui-kit/shadcn-ui/src/components/button/button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface VbenButtonProps {
1313
/**
1414
* Change the default rendered element for the one passed as a child, merging their props and behavior.
1515
*
16-
* Read our [Composition](https://www.radix-vue.com/guides/composition.html) guide for more details.
16+
* Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.
1717
*/
1818
asChild?: boolean;
1919
class?: any;

packages/@core/ui-kit/tabs-ui/src/use-tabs-view-scroll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function useTabsViewScroll(props: TabsProps) {
5959
}
6060

6161
const viewportEl = scrollbarEl?.querySelector(
62-
'div[data-radix-scroll-area-viewport]',
62+
'div[data-reka-scroll-area-viewport]',
6363
);
6464

6565
scrollViewportEl.value = viewportEl;

playground/src/api/request.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
2929
baseURL,
3030
transformResponse: (data: any, header: AxiosResponseHeaders) => {
3131
// storeAsString指示将BigInt存储为字符串,设为false则会存储为内置的BigInt类型
32-
return header.getContentType()?.toString().includes('application/json')
33-
? cloneDeep(
34-
JSONBigInt({ storeAsString: true, strict: true }).parse(data),
35-
)
36-
: data;
32+
if (
33+
header.getContentType()?.toString().includes('application/json') &&
34+
typeof data === 'string'
35+
) {
36+
return cloneDeep(
37+
JSONBigInt({ storeAsString: true, strict: true }).parse(data),
38+
);
39+
}
40+
return data;
3741
},
3842
});
3943

0 commit comments

Comments
 (0)