Skip to content

Commit 732301b

Browse files
author
User
committed
added Instance Methods/Events APIs
1 parent 1f96468 commit 732301b

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

API.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const O_C = require('./apis/optionscomposition')
88
const O_M = require('./apis/optionsmisc')
99
const I_P = require('./apis/instanceproperties')
1010
const I_D = require('./apis/instancedata')
11+
const I_E = require('./apis/instanceevents')
1112

1213

1314
const GlobalConfig = [
@@ -111,6 +112,13 @@ const InstanceData = [
111112
I_D.VM_$DELETE
112113
]
113114

115+
const InstanceEvents = [
116+
I_E.VM_$ON,
117+
I_E.VM_$ONCE,
118+
I_E.VM_$OFF,
119+
I_E.VM_$EMIT
120+
]
121+
114122

115123
module.exports = {
116124
GlobalConfig,
@@ -122,5 +130,6 @@ module.exports = {
122130
OptionsComposition,
123131
OptionsMisc,
124132
InstanceProperties,
125-
InstanceData
133+
InstanceData,
134+
InstanceEvents
126135
}

apis/instanceevents.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const chalk = require('chalk')
2+
const custom = require('../customcolors')
3+
const colorComment = custom.colorComment
4+
const colorPrimitive = custom.colorPrimitive
5+
const colorError = custom.colorError
6+
const colorArgs = custom.colorArgs
7+
8+
const VM_$ON = {}
9+
const VM_$ONCE = {}
10+
const VM_$OFF = {}
11+
const VM_$EMIT = {}
12+
13+
module.exports = {
14+
VM_$ON,
15+
VM_$ONCE,
16+
VM_$OFF,
17+
VM_$EMIT
18+
}

vue-help.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const oc = api.OptionsComposition
1414
const om = api.OptionsMisc
1515
const ip = api.InstanceProperties
1616
const id = api.InstanceData
17+
const im = api.InstanceEvents
1718

1819

1920
V.delimiter('vue-help$').show()

0 commit comments

Comments
 (0)