mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-14 11:00:16 +08:00
fix readme
This commit is contained in:
@ -8,7 +8,7 @@ Built upon [ECharts](http://echarts.baidu.com/index.html) `v3.8.5`+ and depends
|
||||
|
||||
## Installation
|
||||
|
||||
### npm
|
||||
### npm (Recommended)
|
||||
|
||||
```bash
|
||||
$ npm install vue-echarts
|
||||
@ -38,9 +38,9 @@ import 'echarts/lib/component/tooltip'
|
||||
Vue.component('chart', ECharts)
|
||||
```
|
||||
|
||||
## ⚠️ Heads up
|
||||
#### ⚠️ Heads up
|
||||
|
||||
### Importing the souce version
|
||||
##### Importing the souce version
|
||||
|
||||
If you are using vue-cli to create your project and you want to use the untranspiled component (import `vue-echarts/components/ECharts` rather than import vue-echarts directly, to optimize bundle size, which is recommended), Vue's webpack template may exclude `node_modules` from files to be transpiled by Babel. To fix this problem, try change `build/webpack.base.conf.js` like this:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## 安装
|
||||
|
||||
### npm
|
||||
### npm(推荐方式)
|
||||
|
||||
```bash
|
||||
$ npm install vue-echarts
|
||||
@ -42,9 +42,9 @@ import 'echarts/lib/component/tooltip'
|
||||
Vue.component('chart', ECharts)
|
||||
```
|
||||
|
||||
## ⚠️ 注意事项
|
||||
#### ⚠️ 注意事项
|
||||
|
||||
### 引入源码版本
|
||||
##### 引入源码版本
|
||||
|
||||
如果你正在使用 vue-cli 来创建项目并且希望使用未经转译的组件(引入 `vue-echarts/components/ECharts` 而非直接引入 `vue-echarts`)来减小打包尺寸(是推荐用法),那么 Vue 的 `webpack` 模板可能会把 `node_modules` 中的文件排除在 Babel 转译范围以外。要解决此问题,需要按下述的方式修改 `build/webpack.base.conf.js`:
|
||||
|
||||
|
Reference in New Issue
Block a user