-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:arco-design/arco-design-mobile into…
… feat-picker-change-hg
- Loading branch information
Showing
22 changed files
with
555 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,8 @@ | |
"lint-staged": "lint-staged", | ||
"site:home": "cross-env NODE_ENV=production webpack --progress --config scripts/sites/webpack.prod.home.js", | ||
"site:mobile": "cross-env NODE_ENV=production webpack --progress --config scripts/sites/webpack.prod.mobile.js", | ||
"site:pc": "cross-env NODE_ENV=production webpack --progress --config scripts/sites/webpack.prod.pc.js" | ||
"site:pc": "cross-env NODE_ENV=production webpack --progress --config scripts/sites/webpack.prod.pc.js", | ||
"dev:demo": "node scripts/dev/dev-demo.js $@" | ||
}, | ||
"author": "[email protected]", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,18 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [2.30.9](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/[email protected]...@arco-design/[email protected]) (2024-02-27) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* export type from `Skeleton` ([#233](https://github.com/arco-design/arco-design-mobile/issues/233)) ([7514ed9](https://github.com/arco-design/arco-design-mobile/commit/7514ed9baceccaf8f46c90b046bfe06594a66a59)) | ||
* warning for repeatedly calling createRoot in react18 of masking related components ([#231](https://github.com/arco-design/arco-design-mobile/issues/231)) ([6879ad7](https://github.com/arco-design/arco-design-mobile/commit/6879ad7f6225128b87bbf82aad34ba5836d4ac18)) | ||
|
||
|
||
|
||
|
||
|
||
## [2.30.8](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/[email protected]...@arco-design/[email protected]) (2024-01-31) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b | |
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>** | ||
|
||
``` | ||
<link ref="stylesheet" href="https://unpkg.com/@arco-design/[email protected].8/dist/style.min.css"> | ||
<script src="https://unpkg.com/@arco-design/[email protected].8/dist/index.min.js"></script> | ||
<link ref="stylesheet" href="https://unpkg.com/@arco-design/[email protected].9/dist/style.min.css"> | ||
<script src="https://unpkg.com/@arco-design/[email protected].9/dist/index.min.js"></script> | ||
``` | ||
|
||
## Full import | ||
|
@@ -134,6 +134,74 @@ import { Button as ArcoButton } from '@arco-design/mobile-react'; | |
import { IconAsk, IconBack } from '@arco-design/mobile-react/esm/icon'; | ||
``` | ||
|
||
|
||
## Partial import(Vite) | ||
|
||
It is recommended to use `vite-plugin-importer` to import(**<a href="https://www.npmjs.com/package/vite-plugin-importer" target="_blank">Click here</a>** to know more from this plugin): | ||
|
||
``` | ||
npm install vite-plugin-importer -D | ||
``` | ||
|
||
### Import components on demand | ||
|
||
**vite.config.ts** : | ||
|
||
```js | ||
import usePluginImport from 'vite-plugin-importer' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react", | ||
libraryDirectory: "esm", | ||
style: (path) => `${path}/style`, | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
### Import icons on demand | ||
|
||
**vite.config.ts** : | ||
|
||
```js | ||
import usePluginImport from 'vite-plugin-importer' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react/esm/icon", | ||
libraryDirectory: "", | ||
camel2DashComponentName: false, | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
If both component and Icon need to be imported on demand, you just declare all and do not need any change. | ||
|
||
**vite.config.ts** : | ||
|
||
```js | ||
import usePluginImport from 'vite-plugin-importer' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react", | ||
libraryDirectory: "esm", | ||
style: (path) => `${path}/style`, | ||
}), | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react/esm/icon", | ||
libraryDirectory: "", | ||
camel2DashComponentName: false, | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
## Partial import (manual) | ||
|
||
If you don't use babel-plugin-import, you need to import js and css files manually. The following example has the same effect as the import statement above: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target=" | |
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>** | ||
|
||
``` | ||
<link ref="stylesheet" href="https://unpkg.com/@arco-design/[email protected].8/dist/style.min.css"> | ||
<script src="https://unpkg.com/@arco-design/[email protected].8/dist/index.min.js"></script> | ||
<link ref="stylesheet" href="https://unpkg.com/@arco-design/[email protected].9/dist/style.min.css"> | ||
<script src="https://unpkg.com/@arco-design/[email protected].9/dist/index.min.js"></script> | ||
``` | ||
|
||
## 引入全部 | ||
|
@@ -134,6 +134,73 @@ import { Button as ArcoButton } from '@arco-design/mobile-react'; | |
import { IconAsk, IconBack } from '@arco-design/mobile-react/esm/icon'; | ||
``` | ||
|
||
## 部分引入(Vite) | ||
|
||
如果是 Vite 构建工具的话,则推荐使用 `vite-plugin-importer` 引入(该插件具体使用 **<a href="https://www.npmjs.com/package/vite-plugin-importer" target="_blank">戳这里</a>** ): | ||
|
||
``` | ||
npm install vite-plugin-importer -D | ||
``` | ||
|
||
### 组件按需引入 | ||
|
||
**vite.config.ts** 中配置: | ||
|
||
```js | ||
import usePluginImport from 'vite-plugin-importer' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react", | ||
libraryDirectory: "esm", | ||
style: (path) => `${path}/style`, | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
### Icon 按需引入 | ||
|
||
**vite.config.ts** 中配置: | ||
|
||
```js | ||
import usePluginImport from 'vite-plugin-importer' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react/esm/icon", | ||
libraryDirectory: "", | ||
camel2DashComponentName: false, | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
如果同时存在 组件 和 Icon 的按需引入方式,不需要做改动,可以同时声明 | ||
|
||
**vite.config.ts** 中配置: | ||
|
||
```js | ||
import usePluginImport from 'vite-plugin-importer' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react", | ||
libraryDirectory: "esm", | ||
style: (path) => `${path}/style`, | ||
}), | ||
usePluginImport({ | ||
libraryName: "@arco-design/mobile-react/esm/icon", | ||
libraryDirectory: "", | ||
camel2DashComponentName: false, | ||
}) | ||
] | ||
}) | ||
``` | ||
|
||
## 部分引入(手动) | ||
|
||
如果不使用babel-plugin-import,则需要手动引入js和css文件。下方例子效果等同于上方引入语句: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.