forked from ElemeFE/v-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhook.vue
59 lines (58 loc) · 1.28 KB
/
hook.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<template>
<!-- 测试属性
beforeConfig: Function,
afterConfig: Function,
afterSetOption: Function,
afterSetOptionOnce: Function,
@ready
@ready-once
-->
<div>
<ve-line
:before-config="beforeConfig"
:after-config="afterConfig"
:after-set-option="afterSetOption"
:after-set-option-once="afterSetOptionOnce"
@ready="ready"
@ready-once="readyOnve"
:data="chartData"
:settings="chartSettings">
</ve-line>
<button @click="chartSettings = {}">trigger change</button>
</div>
</template>
<script>
import { VeLine } from '../../src/index.es'
import { LINE_DATA } from './data'
export default {
data () {
return {
chartData: LINE_DATA,
chartSettings: {}
}
},
methods: {
beforeConfig () {
console.log('beforeConfig', arguments)
return arguments[0]
},
afterConfig () {
console.log('afterConfig', arguments)
return arguments[0]
},
afterSetOption () {
console.log('afterSetOption', arguments)
},
afterSetOptionOnce () {
console.log('afterSetOptionOnce', arguments)
},
ready () {
console.log('ready', arguments)
},
readyOnve () {
console.log('readyOnve', arguments)
}
},
components: { VeLine }
}
</script>