1 |
|
2 |
|
3 | import Vue from 'core/index'
|
4 | import { patch } from 'weex/runtime/patch'
|
5 | import { mountComponent } from 'core/instance/lifecycle'
|
6 | import platformDirectives from 'weex/runtime/directives/index'
|
7 | import platformComponents from 'weex/runtime/components/index'
|
8 |
|
9 | import {
|
10 | query,
|
11 | mustUseProp,
|
12 | isReservedTag,
|
13 | isRuntimeComponent,
|
14 | isUnknownElement
|
15 | } from 'weex/util/element'
|
16 |
|
17 |
|
18 | Vue.config.mustUseProp = mustUseProp
|
19 | Vue.config.isReservedTag = isReservedTag
|
20 | Vue.config.isRuntimeComponent = isRuntimeComponent
|
21 | Vue.config.isUnknownElement = isUnknownElement
|
22 |
|
23 |
|
24 | Vue.options.directives = platformDirectives
|
25 | Vue.options.components = platformComponents
|
26 |
|
27 |
|
28 | Vue.prototype.__patch__ = patch
|
29 |
|
30 |
|
31 | Vue.prototype.$mount = function (
|
32 | el?: any,
|
33 | hydrating?: boolean
|
34 | ): Component {
|
35 | return mountComponent(
|
36 | this,
|
37 | el && query(el, this.$document),
|
38 | hydrating
|
39 | )
|
40 | }
|
41 |
|
42 | export default Vue
|