2019-09-07 04:58:32 +08:00
|
|
|
import { createRenderer } from '@vue/runtime-core'
|
2019-10-15 03:36:30 +08:00
|
|
|
import { isHTMLTag, isSVGTag } from '@vue/shared'
|
2019-06-20 21:28:37 +08:00
|
|
|
import { nodeOps } from './nodeOps'
|
|
|
|
import { patchProp } from './patchProp'
|
2018-09-19 23:35:38 +08:00
|
|
|
|
2019-09-07 04:58:32 +08:00
|
|
|
const { render, createApp } = createRenderer<Node, Element>({
|
2019-06-20 21:28:37 +08:00
|
|
|
patchProp,
|
|
|
|
...nodeOps
|
2019-09-07 04:58:32 +08:00
|
|
|
})
|
2019-09-03 04:09:34 +08:00
|
|
|
|
2019-10-15 03:36:30 +08:00
|
|
|
const wrappedCreateApp = () => {
|
|
|
|
const app = createApp()
|
|
|
|
// inject `isNativeTag` dev only
|
|
|
|
Object.defineProperty(app.config, 'isNativeTag', {
|
|
|
|
value: (tag: string) => isHTMLTag(tag) || isSVGTag(tag),
|
|
|
|
writable: false
|
|
|
|
})
|
|
|
|
return app
|
|
|
|
}
|
|
|
|
|
|
|
|
const exportedCreateApp = __DEV__ ? wrappedCreateApp : createApp
|
|
|
|
|
|
|
|
export { render, exportedCreateApp as createApp }
|
2018-09-19 23:35:38 +08:00
|
|
|
|
2019-10-11 06:02:51 +08:00
|
|
|
// DOM-only runtime helpers
|
|
|
|
export {
|
|
|
|
vModelText,
|
|
|
|
vModelCheckbox,
|
|
|
|
vModelRadio,
|
|
|
|
vModelSelect,
|
|
|
|
vModelDynamic
|
|
|
|
} from './directives/vModel'
|
|
|
|
|
2019-10-19 04:20:45 +08:00
|
|
|
export { withModifiers, withKeys } from './directives/vOn'
|
2019-10-14 12:33:23 +08:00
|
|
|
|
2018-09-20 09:51:21 +08:00
|
|
|
// re-export everything from core
|
2019-08-20 21:58:10 +08:00
|
|
|
// h, Component, reactivity API, nextTick, flags & types
|
2018-10-27 03:44:50 +08:00
|
|
|
export * from '@vue/runtime-core'
|
2019-09-07 04:58:32 +08:00
|
|
|
|
2019-10-11 06:02:51 +08:00
|
|
|
// Type augmentations
|
2019-09-07 04:58:32 +08:00
|
|
|
export interface ComponentPublicInstance {
|
|
|
|
$el: Element
|
|
|
|
}
|