@ astral/ ui (英语)
@astral/ui {\fn黑体\fs20\shad2\2aH82\3aH20\4aH33\fscx95\3cH592001\be1} - 额...
目录
故事书
故事书 {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢 @astral/ui。 。 。 .
导言
@astral/ui -=YTET -伊甸园字幕组=- 翻译:.
@astral/ui экспортирует:
- 反应 - , , , , ,
- 反应-hook-form,
- {\fn黑体\fs20\shad2\2ah82\3ah20\4ah33\fscx95\3ch592001\be1}你觉得怎么样.
游戏场
Доступен 密码框 для.
从 Next.js 开始
示例
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢 @astral/ui находится здесь。 。 。 .
安装
npm --save @astral/ui
环球.d.ts
/// <reference types="@astral/ui/declarations" />
下一个。配置
const nextConfig = {
...
transpilePackages: [
'@astral/ui'
],
webpack(config) {
config.module.rules.push({
test: /\.(woff|woff2)$/i,
issuer: { and: [/\.(js|ts)x?$/] },
type: 'asset/resource',
});
return config;
},
...
};
module.exports = nextConfig;
应用程序tsx
import { AppProps } from 'next/app';
import Head from 'next/head';
import * as monitoringErrorService from '@sentry/nextjs';
import {
type BrandPalette,
ConfigProvider,
NotificationContainer,
StylesCacheProvider,
ThemeProvider,
createTheme,
} from '@astral/ui';
import { createStylesCache as createStylesServerCache } from '@astral/ui/server';
import { MainLayout } from '@example/modules/LayoutModule';
const brandPalette: BrandPalette = {
primary: {
900: '#5D3FD4',
800: '#6746EB',
700: '#8566FF',
600: '#9075FF',
500: '#9D85FF',
400: '#B29EFF',
300: '#C2B2FF',
200: '#E0D9FF',
100: '#EFEBFF',
},
secondary: {
800: '#5653FF',
},
brand: {
800: '#6746EB',
background: '#FAFBFC',
},
};
export const theme = createTheme({ palette: brandPalette });
const stylesCache = createStylesServerCache({ key: 'next' });
export const App = ({ Component, pageProps }: AppProps) => {
return (
<>
<Head>
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>Astral.Example</title>
</Head>
<StylesCacheProvider value={stylesCache}>
<ConfigProvider
captureException={monitoringErrorService.captureException}
>
<ThemeProvider theme={theme}>
<NotificationContainer />
<MainLayout>
<Component {...pageProps} />
</MainLayout>
</ThemeProvider>
</ConfigProvider>
</StylesCacheProvider>
</>
);
};
export default App;
移徙指南
3.0.0 - > 4.0.0 (中文(简体) )
字体
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢 theme больше.
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢 {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢 内容安全政策。 。 。 .
2.0.0 - > 3.0.0 (中文(简体) )
配置
配置 prof imagesMap数字 :
type ImagesMap = {
/**
* изображение при отсутствии данных (используется в DataGrid)
*/
noDataImgSrc: string;
/**
* изображение при ошибке (используется в ContentState)
*/
defaultErrorImgSrc: string;
/**
* изображение при ошибке при обновлении продукта (используется в ContentState/ErrorBoundary)
*/
outdatedReleaseErrorImgSrc: string;
};
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}我还不知道你是谁 {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}.
中断更改 :
- (原始内容存档于2018-09-26). DataGrid. {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}=======================================================================================================================================================================================================================================
imagesMap.noDataImgSrc - * 内容状态 * * * * * * 需要道具
errorState.imgSrc。 。 。 - {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}=======================================================================================================================================================================================================================================
images.outdatedReleaseErrorImgSrc
import noDataImgSrc from '@astral/ui/illustrations/no-data.svg';
import outdatedReleaseErrorImgSrc from '@astral/ui/illustrations/outdated-release.svg';
/* cspell:disable-next-line */
import errorImgSrc from 'static/erorr-inmg.png';
const App = () => {
return (
<ConfigProvider
imagesMap={{
defaultErrorImgSrc: errorImgSrc,
noDataImgSrc,
outdatedReleaseErrorImgSrc,
}}
>
<ThemeProvider>
<Layout />
</ThemeProvider>
</ConfigProvider>
);
};
类型
中断更改 :
- (边疆,边疆,先生. )
- Prop
colorпринимаетstring颜色
Актуальные道具находятся здесь。 。 。 .
网格
@astral/ui v2 ######### 遗产Grid #########################################################################################################################################################################################################################################.
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}我.. 故事书。 。 。 .
表单
中断更改 :
- 说吧
FormDatePicker, (中文(简体) ),FormMobilePhoneField - {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢
rules{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你还不知道吗 @ astral/验证
1.0.0 - > 2.0.0 (中文(简体) )
选项
Теперь @astral/ui {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢
@astral/fonts@astral/illustrations@astral/icons@astral/form@astral/components
说吧
{
...
"@astral/icons": "^1.19.4",
"@astral/form": "^1.19.4",
"@astral/fonts": "^1.19.4",
"@astral/ui": "^1.19.4",
...
}
На:
{
...
"@astral/ui": "^1.19.4",
...
}
环球.d.ts
Заменить global.d.ts数字 :
global.d.ts
/// <reference types="@astral/ui/declaration/emotion" />
/// <reference types="@astral/ui/declaration/mui-material" />
/// <reference types="@emotion/react/types/css-prop" />
На:
global.d.ts
/// <reference types="@astral/ui/declarations" />
字体
Пакет @astral/fonts {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢 @astral/ui。 。 。 .
说吧
import UbuntuBoldWoff from '@astral/fonts/UbuntuBold.woff';
import UbuntuBoldWoff2 from '@astral/fonts/UbuntuBold.woff2';
На:
import UbuntuBoldWoff from '@astral/ui/fonts/UbuntuBold.woff';
import UbuntuBoldWoff2 from '@astral/ui/fonts/UbuntuBold.woff2';
@astral/ui/fonts # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ########### # # # # #######################################################################################.
插图
Пакет @astral/illustrations {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢 @astral/ui。 。 。 .
说吧
import certImgSrc from '@astral/illustrations/cert.svg';
На:
import certImgSrc from '@astral/ui/illustrations/cert.svg';
@astral/ui/fonts # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ########### # # # # #######################################################################################.
@ astral/ 窗体
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢 @astral/form {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢.
Весь @astral/form {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢 @astral/ui。 。 。 .
import { useForm, useFormWatch, useFormController } from '@astral/ui';
@ astral/缩写
Весь @astral/icons {\fn黑体\fs22\bord1\shad0\3ahbe\4ah00\fscx67\fscy66\2chffffff\3ch808080}你觉得呢 @astral/ui。 。 。 .
import { QuitOutlineMd } from '@astral/ui';
日期选择器提供器
======================================================================================================================================================================================== (=================== (============================= (====================.
解决问题
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}我对你的爱很感兴趣 {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}我对你的爱很感兴趣 conditions 用户 vitest.config.ts数字 :
/// <reference types="vitest" />
import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [react(), tsconfigPaths()],
resolve: {
conditions: ['vitest'],
},
test: {
environment: 'happy-dom',
},
});
? В exports.vitest说得没错.
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}=========================================================================================== ===========================================================================================================================================.
倾斜
目录
重定向到链接
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢
import { redirectToLink } from '@astral/ui';
// Открытие ссылки в текущей вкладке или фрейме
redirectToLink('/');
// Открытие ссылки в новой вкладке
redirectToLink('/', '_blank')