diff --git a/config/alipay/app.json b/config/alipay/app.json index ec9a99245..dfec19a7b 100644 --- a/config/alipay/app.json +++ b/config/alipay/app.json @@ -91,7 +91,8 @@ "pages/Countdown/index", "pages/SelectContact/index", "pages/Table/index", - "pages/SafeArea/index" + "pages/SafeArea/index", + "pages/Footer/index" ], "window": { "enableWK": "YES", diff --git a/config/wechat.json b/config/wechat.json index d689066c0..fb454e7e4 100644 --- a/config/wechat.json +++ b/config/wechat.json @@ -85,7 +85,8 @@ "pages/AutoResize", "pages/Countdown", "pages/Typography", - "pages/PageContainer" + "pages/PageContainer", + "pages/Footer" ], "src": [ "_locale", @@ -147,6 +148,7 @@ "AutoResize", "Countdown", "Typography", - "PageContainer" + "PageContainer", + "Footer" ] -} +} \ No newline at end of file diff --git a/config/wechat/app.json b/config/wechat/app.json index 8b60b30db..84a98b4ab 100644 --- a/config/wechat/app.json +++ b/config/wechat/app.json @@ -82,6 +82,7 @@ "demo/pages/AutoResize/index", "demo/pages/Countdown/index", "demo/pages/Typography/index", - "demo/pages/PageContainer/index" + "demo/pages/PageContainer/index", + "demo/pages/Footer/index" ] } diff --git a/config/wechat/app.wxss b/config/wechat/app.wxss index c34299e5c..70f4fa953 100644 --- a/config/wechat/app.wxss +++ b/config/wechat/app.wxss @@ -3,8 +3,3 @@ page { background-color: var(--color-background); } - -.navigation-bar { - height: 88px; - background-color: var(--color-card); -} diff --git a/demo/pages/Footer/index.axml b/demo/pages/Footer/index.axml new file mode 100644 index 000000000..5d58598d5 --- /dev/null +++ b/demo/pages/Footer/index.axml @@ -0,0 +1,94 @@ + + + + + + + + + + + 蚂蚁财富 + + + + + + + + + + + © 蚂蚁科技集团股份有限公司 + + + + + + + + + + + + + + + + + + + + + 蚂蚁财富 + + + + + + + + + + + + + + + + + + + diff --git a/demo/pages/Footer/index.json5 b/demo/pages/Footer/index.json5 new file mode 100644 index 000000000..413d14de2 --- /dev/null +++ b/demo/pages/Footer/index.json5 @@ -0,0 +1,17 @@ +{ + /// #if WECHAT + "navigationBarTitleText": "Footer", + /// #endif + + /// #if ALIPAY + "defaultTitle": "Footer", + "transparentTitle": "auto", + "titlePenetrate": "YES", + /// #endif + + "usingComponents": { + "ant-icon": "../../../src/Icon/index", + "ant-footer": "../../../src/Footer/index", + "ant-container": "../../../src/Container/index" + } +} diff --git a/demo/pages/Footer/index.less b/demo/pages/Footer/index.less new file mode 100644 index 000000000..d7dc0056c --- /dev/null +++ b/demo/pages/Footer/index.less @@ -0,0 +1,3 @@ +.page { + padding: 24rpx; +} diff --git a/demo/pages/Footer/index.ts b/demo/pages/Footer/index.ts new file mode 100644 index 000000000..21ac4af82 --- /dev/null +++ b/demo/pages/Footer/index.ts @@ -0,0 +1,63 @@ +Page({ + data: { + links1: [ + { + key: 'alipay', + text: '支付宝', + }, + ], + links2: [ + { + key: 'alicloud', + text: '阿里云', + }, + { + key: 'alipay', + text: '支付宝', + }, + ], + chips: [ + { + key: 'jiebei', + text: '蚂蚁借呗', + }, + { + key: 'beiyongjin', + text: '备用金', + }, + { + key: 'huabei', + text: '花呗收钱', + disabled: true, + }, + ], + }, + + handleLinkTap(item) { + if (item.disabled) return; + /// #if ALIPAY + if (item.disabled) return; + my.showToast({ content: item.key }); + /// #endif + /// #if WECHAT + if (item.detail.disabled) return; + // @ts-ignore + wx.showToast({ + title: item.detail.key, + }); + /// #endif + }, + handleChipTap(item) { + /// #if ALIPAY + if (item.disabled) return; + my.showToast({ content: item.key }); + /// #endif + /// #if WECHAT + if (item.detail.disabled) return; + // @ts-ignore + wx.showToast({ + title: item.detail.key, + }); + /// #endif + }, +}); diff --git a/demo/utils/constants.ts b/demo/utils/constants.ts index 25b9d4e59..796c6f6d5 100644 --- a/demo/utils/constants.ts +++ b/demo/utils/constants.ts @@ -2,36 +2,25 @@ export const componentList = [ { type: '通用', list: [ - { - name: 'Button', - nameZN: '按钮', - path: '/pages/Button/index', - }, - { - name: 'Icon', - nameZN: '图标', - path: '/pages/Icon/index', - }, - { - name: 'Sticky', - nameZN: '黏性吸附', - path: '/pages/Sticky/index', - }, + { name: 'Button', nameZN: '按钮', path: '/pages/Button/index' }, + { name: 'Icon', nameZN: '图标', path: '/pages/Icon/index' }, + { name: 'Sticky', nameZN: '黏性吸附', path: '/pages/Sticky/index' }, ], }, { type: '导航', list: [ + { + name: 'Footer页脚', + nameZN: 'Footer页脚', + path: '/pages/Footer/index', + }, { name: 'TabBar', nameZN: 'TabBar底部标签栏', path: '/pages/TabBar/index', }, - { - name: 'Tabs', - nameZN: '标签页', - path: '/pages/Tabs/index', - }, + { name: 'Tabs', nameZN: '标签页', path: '/pages/Tabs/index' }, { name: 'TabsElevator', nameZN: '标签页-电梯模式', @@ -47,100 +36,40 @@ export const componentList = [ { type: '信息展示', list: [ - { - name: 'Card', - nameZN: '基础卡片', - path: '/pages/Card/index', - }, - { - name: 'Avatar', - nameZN: '头像', - path: '/pages/Avatar/index', - }, - /// #if ALIPAY + { name: 'Card', nameZN: '基础卡片', path: '/pages/Card/index' }, + { name: 'Avatar', nameZN: '头像', path: '/pages/Avatar/index' }, { name: 'IndexBarControl', nameZN: '索引-控制', path: '/pages/IndexBarControl/index', }, - /// #endif - { - name: 'Collapse', - nameZN: '折叠面板', - path: '/pages/Collapse/index', - }, - { - name: 'Grid', - nameZN: '宫格', - path: '/pages/Grid/index', - }, - { - name: 'List', - nameZN: '列表', - path: '/pages/List/index', - }, + { name: 'Collapse', nameZN: '折叠面板', path: '/pages/Collapse/index' }, + { name: 'Grid', nameZN: '宫格', path: '/pages/Grid/index' }, + { name: 'List', nameZN: '列表', path: '/pages/List/index' }, { name: 'SwipeAction', nameZN: '滑动操作', path: '/pages/SwipeAction/index', }, - { - name: 'Steps', - nameZN: '步骤条', - path: '/pages/Steps/index', - }, - { - name: 'GuideTour', - nameZN: '新手引导', - path: '/pages/GuideTour/index', - }, - { - name: 'Tag', - nameZN: ' 标签', - path: '/pages/Tag/index', - }, - { - name: 'Progress', - nameZN: '进度条', - path: '/pages/Progress/index', - }, - { - name: 'Divider', - nameZN: '分割线', - path: '/pages/Divider/index', - }, - /// #if ALIPAY - { - name: 'Table', - nameZN: '表格', - path: '/pages/Table/index', - }, - /// #endif + { name: 'Steps', nameZN: '步骤条', path: '/pages/Steps/index' }, + { name: 'GuideTour', nameZN: '新手引导', path: '/pages/GuideTour/index' }, + { name: 'Tag', nameZN: ' 标签', path: '/pages/Tag/index' }, + { name: 'Progress', nameZN: '进度条', path: '/pages/Progress/index' }, + { name: 'Divider', nameZN: '分割线', path: '/pages/Divider/index' }, + { name: 'Table', nameZN: '表格', path: '/pages/Table/index' }, ], }, { type: '信息录入', list: [ - { - name: 'Checkbox', - nameZN: '复选框', - path: '/pages/Checkbox/index', - }, + { name: 'Checkbox', nameZN: '复选框', path: '/pages/Checkbox/index' }, { name: 'Checklist', nameZN: '可勾选列表', path: '/pages/Checklist/index', }, - { - name: 'Form', - nameZN: '表单', - path: '/pages/Form/index', - }, - { - name: 'Input', - nameZN: '输入框', - path: '/pages/Input/index', - }, + { name: 'Form', nameZN: '表单', path: '/pages/Form/index' }, + { name: 'Input', nameZN: '输入框', path: '/pages/Input/index' }, { name: 'InputCustom', nameZN: '输入框-自定义', @@ -156,61 +85,29 @@ export const componentList = [ nameZN: '输入框-搜索框', path: '/pages/InputSearchBar/index', }, - { - name: 'Picker', - nameZN: '选择器', - path: '/pages/Picker/index', - }, + { name: 'Picker', nameZN: '选择器', path: '/pages/Picker/index' }, { name: 'DatePicker', nameZN: '时间选择器', path: '/pages/DatePicker/index', }, - { - name: 'Radio', - nameZN: '单选框', - path: '/pages/Radio/index', - }, - { - name: 'Selector', - nameZN: '选择组', - path: '/pages/Selector/index', - }, - { - name: 'Slider', - nameZN: '滑动输入条', - path: '/pages/Slider/index', - }, - { - name: 'Stepper', - nameZN: '步进器', - path: '/pages/Stepper/index', - }, - { - name: 'Switch', - nameZN: '开关', - path: '/pages/Switch/index', - }, + { name: 'Radio', nameZN: '单选框', path: '/pages/Radio/index' }, + { name: 'Selector', nameZN: '选择组', path: '/pages/Selector/index' }, + { name: 'Slider', nameZN: '滑动输入条', path: '/pages/Slider/index' }, + { name: 'Stepper', nameZN: '步进器', path: '/pages/Stepper/index' }, + { name: 'Switch', nameZN: '开关', path: '/pages/Switch/index' }, { name: 'ImageUpload', nameZN: '图片上传', path: '/pages/ImageUpload/index', }, - { - name: 'Rate', - nameZN: '星级', - path: '/pages/Rate/index', - }, + { name: 'Rate', nameZN: '星级', path: '/pages/Rate/index' }, { name: 'RareWordsKeyboard', nameZN: '生僻字输入键盘', path: '/pages/RareWordsKeyboard/index', }, - { - name: 'Calendar', - nameZN: '日历', - path: '/pages/Calendar/index', - }, + { name: 'Calendar', nameZN: '日历', path: '/pages/Calendar/index' }, { name: 'NumberKeyboard', nameZN: '数字键盘-基本使用', @@ -251,93 +148,39 @@ export const componentList = [ nameZN: '动作面板', path: '/pages/ActionSheet/index', }, - { - name: 'Loading', - nameZN: '加载中', - path: '/pages/Loading/index', - }, - { - name: 'Skeleton', - nameZN: '骨架屏', - path: '/pages/Skeleton/index', - }, - { - name: 'Dialog', - nameZN: '弹窗', - path: '/pages/Dialog/index', - }, - { - name: 'Popover', - nameZN: '气泡卡片', - path: '/pages/Popover/index', - }, + { name: 'Loading', nameZN: '加载中', path: '/pages/Loading/index' }, + { name: 'Skeleton', nameZN: '骨架屏', path: '/pages/Skeleton/index' }, + { name: 'Dialog', nameZN: '弹窗', path: '/pages/Dialog/index' }, + { name: 'Popover', nameZN: '气泡卡片', path: '/pages/Popover/index' }, { name: 'PopoverList', nameZN: '气泡菜单', path: '/pages/PopoverList/index', }, - { - name: 'Popup', - nameZN: '弹出层', - path: '/pages/Popup/index', - }, - { - name: 'Result', - nameZN: '操作结果', - path: '/pages/Result/index', - }, - { - name: 'Empty', - nameZN: '空状态', - path: '/pages/Empty/index', - }, - { - name: 'Toast', - nameZN: '轻提示', - path: '/pages/Toast/index', - }, - { - name: 'Feedback', - nameZN: '信息反馈', - path: '/pages/Feedback/index', - }, + { name: 'Popup', nameZN: '弹出层', path: '/pages/Popup/index' }, + { name: 'Result', nameZN: '操作结果', path: '/pages/Result/index' }, + { name: 'Empty', nameZN: '空状态', path: '/pages/Empty/index' }, + { name: 'Toast', nameZN: '轻提示', path: '/pages/Toast/index' }, + { name: 'Feedback', nameZN: '信息反馈', path: '/pages/Feedback/index' }, ], }, { type: '引导提示', list: [ - { - name: 'Badge', - nameZN: '徽标', - path: '/pages/Badge/index', - }, - { - name: 'NoticeBar', - nameZN: '通告栏', - path: '/pages/NoticeBar/index', - }, + { name: 'Badge', nameZN: '徽标', path: '/pages/Badge/index' }, + { name: 'NoticeBar', nameZN: '通告栏', path: '/pages/NoticeBar/index' }, ], }, { type: '业务组件', list: [ - { - name: 'Countdown', - nameZN: '倒计时', - path: '/pages/Countdown/index', - }, - /// #if ALIPAY - { - name: 'Voucher', - nameZN: '优惠券', - path: '/pages/Voucher/index', - }, + { name: 'Countdown', nameZN: '倒计时', path: '/pages/Countdown/index' }, + { name: 'Voucher', nameZN: '优惠券', path: '/pages/Voucher/index' }, { name: 'SelectContact', nameZN: '选人组件', path: '/pages/SelectContact/index', }, - /// #endif ], }, { @@ -358,31 +201,15 @@ export const componentList = [ nameZN: '页面容器', path: '/pages/PageContainer/index', }, - { - name: 'Typography', - nameZN: '排版', - path: '/pages/Typography/index', - }, - { - name: 'SafeArea', - nameZN: '安全区', - path: '/pages/SafeArea/index', - }, + { name: 'Typography', nameZN: '排版', path: '/pages/Typography/index' }, + { name: 'SafeArea', nameZN: '安全区', path: '/pages/SafeArea/index' }, ], }, { type: '待废弃', list: [ - { - name: 'Container', - nameZN: '容器', - path: '/pages/Container/index', - }, - { - name: 'Modal', - nameZN: '对话框', - path: '/pages/Modal/index', - }, + { name: 'Container', nameZN: '容器', path: '/pages/Container/index' }, + { name: 'Modal', nameZN: '对话框', path: '/pages/Modal/index' }, ], }, ]; diff --git a/docs/guide/contribute.en.md b/docs/guide/contribute.en.md index 65ec4325a..846420590 100644 --- a/docs/guide/contribute.en.md +++ b/docs/guide/contribute.en.md @@ -42,7 +42,11 @@ $ npm i After installing the dependency, click the menu bar in WeChat Developer Tool: "Tools --> Build npm". After the build is complete, the project is ready to run normally. -#### Run in the Alipay applet developer tool +> If it is found that it cannot run normally, it may be that WeChat development tools build npm and package the dependency into a file, resulting in an error due to the failure to find the reference dependency in WeChat. + +> Such:`import duration from 'dayjs/plugin/duration'`After building npm,`dayjs/plugin`directory in `miniprogram_npm` lost in. need to be `dayjs/plugin` Manually copy directories `miniprogram_npm` In, can be solved. + +#### Run in the Alipay applet developer tool. Directly use the Alipay applet developer tool to open the root directory of the project to run. @@ -73,10 +77,10 @@ Source code: ```xml - + a a & b - + a !a diff --git a/docs/guide/cooperation.en.md b/docs/guide/cooperation.en.md index 7a203f7ef..2d0464778 100644 --- a/docs/guide/cooperation.en.md +++ b/docs/guide/cooperation.en.md @@ -24,7 +24,7 @@ When submitting bug feedback, please provide relevant information as complete as Here are some considerations when submitting: - Provide device information, client version, component library version and specific components; -- Explain what you expect the component to behave and what actually happens; +- Explain the behavior of the components you expect and the behavior that actually occurs; - Describe in detail the steps to reproduce the problem; - If feasible, provide examples or demos that can reproduce the problem to speed up problem positioning. diff --git a/docs/guide/customize-theme.en.md b/docs/guide/customize-theme.en.md index c57d10463..a30c93339 100644 --- a/docs/guide/customize-theme.en.md +++ b/docs/guide/customize-theme.en.md @@ -3,58 +3,129 @@ order: 4 toc: true --- -# Custom Theme +# Custom Theme & Dark Mode -antd-mini supports using less to customize themes. Two sets of themes are built into the antd-mini: the basic theme and the dark theme. You can use different themes or modify theme colors by customizing less variables. +antd-mini support using CSS variables to customize themes. Two sets of themes are built into the antd-mini: the basic theme and the dark theme. You can use different themes or modify theme colors by customizing CSS variables. Dark mode is supported by default. You can automatically switch between dark and light modes by prefers the value of-color-scheme as the operating system changes. ## Mode of use -> The IDE version of the applet developer tool must be no less than 3.0.0, and the CLI version of the command line tool must be no less than 1.4.0. +> Setting the theme globally,[CSS Variables](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties) To organize styles, by overwriting these CSS variables, you can customize the theme, dynamically switch the theme and other effects; -1. Use `antd-mini/less/component`: +### Override via CSS -```json -{ - "usingComponents": { - "button": "antd-mini/less/Button/index" - } +#### Customize the theme of individual components + +```xml + Custom Theme +``` + +```css +custom-btn { + --button-color: #1677ff; + --button-background-color: #ffffff; + --button-border-color: #1677ff; + --button-primary-border-color: #1677ff; + --button-primary-background-color: #1677ff; + --button-primary-color: #ffffff; + --button-primary-aide-border-color: #e7f1ff; } ``` -2. In `mini.project.json` documents can be passed `modifyVars` Modifying the less variable, such as modifying `theme`: +#### Customize themes for multiple components + +Similar to the customization of a single component, you only need to wrap the component to be customized with a configProvider or an arbitrary container node (such as ant-container) and set CSS variables on the container node. -```json -{ - "format": 2, - "compileOptions": { - "less": { - "modifyVars": { - "theme": "dark" - } - } - } +```xml + + Custom Theme + +``` + +```css +container { + --button-color: #1677ff; + --button-background-color: #ffffff; + --button-border-color: #1677ff; + --button-primary-border-color: #1677ff; + --button-primary-background-color: #1677ff; + --button-primary-color: #ffffff; + --button-primary-aide-border-color: #e7f1ff; } ``` -## less variable - -| Name | Description | Default Value | -| ------------------ | ------------------------------------------- | -------------------- | -| theme | Theme, selectable `default`、`dark` | `default` | -| rpx | Rpx unit corresponding value | `0.5px` | -| colorPrimary | Main brand color, corresponding `default` and `dark` The default value | `#1677ff`、`#3086FF` | -| colorWathet | Light blue | `#E7F1FF`、`#0D2543` | -| colorRed | Red | `#FF3141`、`#FF4A58` | -| colorYellow | Yellow | `#FF9F18`、`#FFA930` | -| colorGreen | Green | `#22B35E`、`#34B368` | -| colorTextPrimary | Primary Text Information Color | `#333333`、`#E6E6E6` | -| colorWhite | White | `#FFFFFF`、`#FFFFFF` | -| colorOrange | Orange | `#FF6430`、`#E65A2B` | -| colorBlack | Black | `#000000`、`#000000` | -| colorTextAssist | Auxiliary Text Information Color | `#999999`、`#808080` | -| colorBorder | Border Color | `#EEEEEE`、`#2B2B2B` | -| colorBackground | Global Background Color | `#F5F5F5`、`#0A0A0A` | -| colorTextWeak | Weak information | `#CCCCCC`、`#4D4D4D` | -| colorCard | Card Color | `#FFFFFF`、`#1A1A1A` | -| colorTextSecondary | Secondary text information color | `#666666`、`#B3B3B3` | -| colorGreyCard | Gray Card | `#F5F5F5`、`#2B2B2B` | +#### Customize the global theme + +In app.less, write CSS variables to take effect globally. + +```css +page { + --actionsheet-danger-color: #ff3141; + --actionsheet-title-color: #999999; + --actionsheet-item-color: #333333; + --actionsheet-item-active-bg: #eeeeee; + --activesheet-item-cancel-bg: #f5f5f5; +} +``` + +### Covered by ConfigProvider + +In addition to directly customizing themes through CSS variables (currently supporting light and dark themes by default), you can also customize themes or specify built-in themes through ConfigProvider themeVars. + +#### Set Theme + +```xml + + I am a dark theme + + +``` + +#### Set themeVars custom theme + +```xml + + + Main button + + + +``` + +```js +Page({ + data: { + themeVars: { + 'button-primary-color': 'yellow', + 'button-primary-background-color': 'green', + }, + }, +}); +``` + +## CSS Variables + +> The CSS variable names used for customization can be viewed in the documentation for each component, or in[Profile](https://github.com/ant-design/ant-design-mini/blob/master/src/style/variables.less)Check the full version of the variable names, the following is an example of button to list some variable names; + +| Variable name | Default Value | Dark Mode Default | Remarks | +| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------- | +| --button-disabled-opacity | 0.4 | 0.4 | Button Disable Transparency | +| --button-color |
#1677FF
|
#3086FF
| Button Color | +| --button-background-color |
#FFFFFF
|
#000000
| Button background color | +| --button-border-color |
#1677FF
|
#0A0A0A
| Button border color | +| --button-primary-border-color |
#1677FF
|
#3086FF
| Main button border color | +| --button-primary-background-color |
#1677FF
|
#3086FF
| Main button background color | +| --button-primary-color |
#FFFFFF
|
#FFFFFF
| Main button color | +| --button-primary-aide-border-color |
#E7F1FF
|
#0D2543
| Primary Secondary Button Border Color | +| --button-primary-aide-color |
#1677FF
|
#3086FF
| Primary Auxiliary Button Color | +| --button-default-aide-border-color |
#F5F5F5
|
#121212
| Default Auxiliary Button Border Color | +| --button-default-aide-background-color |
#FFFFFF
|
#000000
| Default Auxiliary Button Background Color | +| --button-default-aide-color |
#333333
|
#C5CAD1
| Default Auxiliary Button Color | +| --button-primary-danger-background-color |
#FF3141
|
#FF4A58
| Primary Danger Button Background Color | +| --button-primary-danger-border-color |
#FF3141
|
#FF4A58
| Primary Hazard Button Border Color | +| --button-primary-danger-color |
#FFFFFF
|
#FFFFFF
| Primary Hazard Button Color | +| --button-default-danger-background-color |
#FFFFFF
|
#FFFFFF
| Default Hazard Button Background Color | +| --button-default-danger-border-color |
#FF3141
|
#FF4A58
| Default Hazard Button Border Color | +| --button-default-danger-color |
#FF3141
|
#FF4A58
| Default Hazard Button Color | +| --button-text-danger-color |
#FF3141
|
#FF4A58
| Hazard button text color | +| --button-danger-default-color |
#FF3141
|
#FF4A58
| Danger Button Default Color | +| --button-active-bg |
rgba(255, 255, 255, 0.08)
|
rgba(255, 255, 255, 0.08)
| Button to activate background color | diff --git a/docs/guide/faq.en.md b/docs/guide/faq.en.md index 2e1b4fd9c..e26f1126e 100644 --- a/docs/guide/faq.en.md +++ b/docs/guide/faq.en.md @@ -5,17 +5,18 @@ toc: true # FAQ -### 2. Can x be used with 1.x, 0.x +### 3. Can x be used with 2.x, 1.x, 0.x -因为 1.x 升级到 2.x 没有迁移成本,所以你可以直接从 1.x 升级到 2.x -对于 0.x, 你可以使用 npm 别名来安装。 +Because there is no migration cost to upgrade from 2.x, 1.x to 3.x, you can do it directly from 2.x, 1.x. upgrade to 3.x, under reference[Upgrade Guide](http://localhost:8000/guide/migration)。 + +For 0.x, you can use the npm alias to install. In `package.json` This is defined in the file: ```json { "dependencies": { - "antd-mini": "^2.25.0", + "antd-mini": "^3.0.0", "antd-mini-v0": "npm:antd-mini@^0.0.26" } } @@ -37,7 +38,7 @@ Use: ``` ```html - + 这是0.x antd-mini ``` diff --git a/docs/guide/i18n.en.md b/docs/guide/i18n.en.md index 09266032b..39d488b7a 100644 --- a/docs/guide/i18n.en.md +++ b/docs/guide/i18n.en.md @@ -19,7 +19,7 @@ antd-mini v3 supports internationalization of global settings, and multi-languag } ``` -2. introduce the corresponding language source file into js +2. introduce the corresponding language source file in js ```js import enUS from '@antd-mini/locales/en-US'; @@ -30,8 +30,8 @@ Page({ }); ``` -2. Used in AXML, it is important to note that the entire project is only passed for the first time.`ConfigProvider`Setting Locale will take effect globally. Different languages are set on different pages of the same project and will only take effect once; - +2. Used in AXML, it is important to note that the entire project is only passed for the first time.`ConfigProvider`设置 Locale 会全局生效, + 同一个项目的不同页面设置了不同的Language,只会生效一次; ```xml @@ -43,7 +43,7 @@ Page({ ## Currently Supported Languages -| Language | File Name | Supported Versions | +| Language | File Name | Supported version | | ----------------------- | ------ | -------- | | Simplified Chinese | zh-CN | 3.0 | | Traditional Chinese (Taiwan) | zh-TW | 3.0 | @@ -64,9 +64,8 @@ Page({ | Turkish (Turkey) | tr-TR | 3.0 | | Vietnamese | vi-VN | 3.0 | -TODO: This file has not been replaced. -View here[Language Pack Source Files](https://opendocs.alipay.com/mini/framework/custom-component-overview) +View here[Language Pack Source Files](https://github.com/ant-design/ant-design-mini/blob/master/src/_locale/zh-CN.ts) ## FAQ diff --git a/docs/guide/migration.en.md b/docs/guide/migration.en.md index ca12f01c4..cb3681789 100644 --- a/docs/guide/migration.en.md +++ b/docs/guide/migration.en.md @@ -20,26 +20,28 @@ For visual upgrade of components, we modified the styles of some components in v ## Upgrade Description -| Component Name | Upgrade Description | -| -------------- | ------------------------------------------------------------------------------------------------------------------- | -| Button | 🛠New `aide` Properties; | -| Calendar | 🛠Remove `localeText` attributes; original `title` property is defined `format` attribute substitution; | -| Empty | 🛠New `buttonInfo` property,`onClickButton` the incident; | -| Popover | 🛠New `showCloseIcon` property,`imageUrl` property,`actionText` property,`onTapAction` the incident; | -| Popup | 🛠New `backgroundImage` property,`showClose` property,`showBack` property,`onClickBackIcon` events,`onClickCloseIcon` the incident; | -| Toast | 🛠New `textType` attributes; original `type` Property Added `alipay` type; | -| Card | 🆕New Components | -| Dialog | 🆕New Components | -| SafeArea | 🆕New Components | -| AutoResize | 🆕New Components | -| ConfigProvider | 🆕New Components | -| Countdown | 🆕New Components | -| Table | 🆕New Components | -| Feedback | 🆕New Components | -| PopoverList | 🆕New Components | -| SelectContact | 🆕New Components | -| Sticky | 🆕New Components | -| Voucher | 🆕New Components | +| Component Name | Upgrade Description | +| -------------- | ------------------------------------------------------------------------------------------------------- | +| Button | 🛠New `aide` Properties; | +| Calendar | 🛠Remove `localeText` attributes; original `title` property is defined `format` attribute substitution; | +| Empty | 🛠New `buttonInfo` 、`imageMode` Properties;`onClickButton` the incident; | +| Popover | 🛠New `showCloseIcon` 、`imageUrl` 、`actionText` Properties;`onTapAction` the incident; | +| Popup | 🛠New `backgroundImage` 、`showClose` 、`showBack` Properties;`onClickBackIcon` 、`onClickCloseIcon` the incident; | +| Toast | 🛠New `textType` attributes; original `type` Property Added `alipay` type; | +| Card | 🆕New Components | +| Dialog | 🆕New Components | +| SafeArea | 🆕New Components | +| AutoResize | 🆕New Components | +| ConfigProvider | 🆕New Components | +| Countdown | 🆕New Components | +| Table | 🆕New Components | +| Feedback | 🆕New Components | +| PopoverList | 🆕New Components | +| SelectContact | 🆕New Components | +| Sticky | 🆕New Components | +| Voucher | 🆕New Components | +| NumberInput | 🆕New Components | +| Postscript | 🆕New Components |