Skip to content

Commit

Permalink
docs: 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Franslee committed Apr 12, 2019
1 parent f56e844 commit 30f6ac6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ if (process.env["NODE_ENV"] === "test") {
presets[0][1].modules = "commonjs";
}

if (process.env["NODE_ENV"] === "production" && process.env["PROD_TYPE"] === "disp") {
presets[0][1].useBuiltIns = false;
}
// if (process.env["NODE_ENV"] === "production" && process.env["PROD_TYPE"] === "disp") {
// presets[0][1].useBuiltIns = false;
// }

module.exports = { presets, plugins };
1 change: 1 addition & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ https://nutui.jd.com
## 链接
* [意见反馈](https://github.com/jdf2e/nutui/issues)
* [更新日志](https://github.com/jdf2e/nutui/releases)
* [案例征集](https://github.com/jdf2e/nutui/issues/16)
* [按需加载插件](https://www.npmjs.com/package/@nutui/babel-plugin-separate-import)
* [模板工程命令行工具(Gaea-cli)](https://github.com/jdf2e/Gaea4)
* 联系我们:[email protected]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Documents:[2.X](https://nutui.jd.com/default.html#/start) | [1.X](https://nutu
## Links
* [Feedback](https://github.com/jdf2e/nutui/issues)
* [Change Logs](https://github.com/jdf2e/nutui/releases)
* [Case collection](https://github.com/jdf2e/nutui/issues/16)
* [On-demand plugins](https://www.npmjs.com/package/@nutui/babel-plugin-separate-import)
* [Template project command line tool(Gaea-cli)](https://github.com/jdf2e/Gaea4)
* Contact us:[email protected]
Expand Down
3 changes: 1 addition & 2 deletions docs/international.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ import enUS from '@nutui/nutui/dist/locales/lang/en-US';
locale('en-US', enUS);
```

> 请注意:通过该插件进行按需引用组件时默认引用的是构建后的文件,此时并不支持国际化的功能。如需使用组件库的国际化功能,需要在 **.babelrc** 文件中将 **@nutui/babel-plugin-seperate-import** 插件的 **sourceCode** 参数值设为 **true** 。这样插件将引用未经构建的源文件,同时引用的组件也不再具有 `install` 方法,请使用 `Vue.component` 对组件进行注册。
> 请注意:通过该插件进行按需引用组件时默认引用的是构建后的文件,此时并不支持国际化的功能。如需使用组件库的国际化功能,需要在 babel 的配置文件(如.babelrc)中将 **@nutui/babel-plugin-seperate-import** 插件的 **sourceCode** 参数值设为 **true** 。这样插件将引用未经构建的源文件,同时引用的组件也不再具有 `install` 方法,请使用 `Vue.component` 对组件进行注册。
```bash
//.babelrc
{
"plugins": [
["@nutui/babel-plugin-separate-import", {
Expand Down
1 change: 1 addition & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ NutUI是一套京东风格的移动端Vue组件库,开发和服务于移动Web
* [Webpack](http://webpack.github.io/)
* [意见反馈](https://github.com/jdf2e/nutui/issues)
* [更新日志](https://github.com/jdf2e/nutui/releases)
* [案例征集](https://github.com/jdf2e/nutui/issues/16)
* [模板工程命令行工具(Gaea CLI)](https://www.npmjs.com/package/gaea-cli)
* 联系我们:[email protected]

Expand Down
2 changes: 1 addition & 1 deletion docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ NutUI.install(Vue);
npm i @nutui/babel-plugin-separate-import -D
```

然后配置一下 **.babelrc** 文件
然后配置一下babel的配置文件

```bash
{
Expand Down
2 changes: 1 addition & 1 deletion docs/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import Button from '@nutui/nutui/dist/packages/button/button.js';
import '@nutui/nutui/dist/packages/button/button.scss';
```

3.使用了插件 **[@nutui/babel-plugin-seperate-import](https://www.npmjs.com/package/@nutui/babel-plugin-separate-import)** 进行按需引用时,需修改 **.babelrc** 文件,将 **style** 的设置为 **scss**。该插件将会自动引入指定组件对应的 SCSS 文件。
3.使用了插件 **[@nutui/babel-plugin-seperate-import](https://www.npmjs.com/package/@nutui/babel-plugin-separate-import)** 进行按需引用时,需修改babel的配置文件(如.babelrc,将 **style** 的设置为 **scss**。该插件将会自动引入指定组件对应的 SCSS 文件。

```bash
{
Expand Down
Binary file removed src/assets/img/jd_loading.gif
Binary file not shown.

0 comments on commit 30f6ac6

Please sign in to comment.