mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-15 03:33:19 +08:00
fix readme
This commit is contained in:
15
README.md
15
README.md
@ -7,7 +7,7 @@ Built upon ECharts 3.x & Vue.js 1.x.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
###
|
### Manual
|
||||||
|
|
||||||
Just download `dist/vue-echarts.js` and include it in your HTML file:
|
Just download `dist/vue-echarts.js` and include it in your HTML file:
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ var ECharts = require('path/to/vue-echarts/dist/vue-echarts')
|
|||||||
var ECharts = require('path/to/vue-echarts/src/components/ECharts.vue')
|
var ECharts = require('path/to/vue-echarts/src/components/ECharts.vue')
|
||||||
|
|
||||||
// register component to use
|
// register component to use
|
||||||
Vue.component('chart', ECharts);
|
Vue.component('chart', ECharts)
|
||||||
```
|
```
|
||||||
|
|
||||||
### AMD
|
### AMD
|
||||||
@ -49,12 +49,14 @@ Vue.component('chart', ECharts);
|
|||||||
```js
|
```js
|
||||||
require.config({
|
require.config({
|
||||||
paths: {
|
paths: {
|
||||||
|
'vue': 'path/to/vue',
|
||||||
'vue-echarts': 'path/to/vue-conticon/dist/vue-echarts'
|
'vue-echarts': 'path/to/vue-conticon/dist/vue-echarts'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
require(['vue-echarts'], function (ECharts) {
|
require(['vue', 'vue-echarts'], function (Vue, ECharts) {
|
||||||
// register component to use...
|
// register component to use
|
||||||
|
Vue.component('chart', ECharts)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -62,6 +64,11 @@ require(['vue-echarts'], function (ECharts) {
|
|||||||
|
|
||||||
The component class is exposed as `window.VueECharts`.
|
The component class is exposed as `window.VueECharts`.
|
||||||
|
|
||||||
|
```js
|
||||||
|
// register component to use
|
||||||
|
Vue.component('chart', VueECharts)
|
||||||
|
```
|
||||||
|
|
||||||
## Using the component
|
## Using the component
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
|
Reference in New Issue
Block a user