2020-02-04 00:46:14 +08:00
|
|
|
import { registerRuntimeHelpers } from '@vue/compiler-dom'
|
2020-02-03 11:28:54 +08:00
|
|
|
|
2020-02-04 06:47:06 +08:00
|
|
|
export const SSR_INTERPOLATE = Symbol(`interpolate`)
|
|
|
|
export const SSR_RENDER_COMPONENT = Symbol(`renderComponent`)
|
|
|
|
export const SSR_RENDER_SLOT = Symbol(`renderSlot`)
|
|
|
|
export const SSR_RENDER_CLASS = Symbol(`renderClass`)
|
|
|
|
export const SSR_RENDER_STYLE = Symbol(`renderStyle`)
|
2020-02-04 07:16:09 +08:00
|
|
|
export const SSR_RENDER_ATTRS = Symbol(`renderAttrs`)
|
|
|
|
export const SSR_RENDER_ATTR = Symbol(`renderAttr`)
|
2020-02-05 05:47:12 +08:00
|
|
|
export const SSR_RENDER_DYNAMIC_ATTR = Symbol(`renderDynamicAttr`)
|
2020-02-04 06:47:06 +08:00
|
|
|
export const SSR_RENDER_LIST = Symbol(`renderList`)
|
2020-02-06 03:23:03 +08:00
|
|
|
export const SSR_LOOSE_EQUAL = Symbol(`looseEqual`)
|
|
|
|
export const SSR_LOOSE_CONTAIN = Symbol(`looseContain`)
|
2020-02-06 06:01:00 +08:00
|
|
|
export const SSR_RENDER_DYNAMIC_MODEL = Symbol(`renderDynamicModel`)
|
|
|
|
export const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol(`getDynamicModelProps`)
|
2020-02-03 11:28:54 +08:00
|
|
|
|
2020-02-06 00:20:50 +08:00
|
|
|
export const ssrHelpers = {
|
2020-02-04 06:47:06 +08:00
|
|
|
[SSR_INTERPOLATE]: `_interpolate`,
|
|
|
|
[SSR_RENDER_COMPONENT]: `_renderComponent`,
|
|
|
|
[SSR_RENDER_SLOT]: `_renderSlot`,
|
|
|
|
[SSR_RENDER_CLASS]: `_renderClass`,
|
|
|
|
[SSR_RENDER_STYLE]: `_renderStyle`,
|
2020-02-04 22:24:49 +08:00
|
|
|
[SSR_RENDER_ATTRS]: `_renderAttrs`,
|
|
|
|
[SSR_RENDER_ATTR]: `_renderAttr`,
|
2020-02-05 05:47:12 +08:00
|
|
|
[SSR_RENDER_DYNAMIC_ATTR]: `_renderDynamicAttr`,
|
2020-02-06 03:23:03 +08:00
|
|
|
[SSR_RENDER_LIST]: `_renderList`,
|
|
|
|
[SSR_LOOSE_EQUAL]: `_looseEqual`,
|
2020-02-06 06:01:00 +08:00
|
|
|
[SSR_LOOSE_CONTAIN]: `_looseContain`,
|
|
|
|
[SSR_RENDER_DYNAMIC_MODEL]: `_renderDynamicModel`,
|
|
|
|
[SSR_GET_DYNAMIC_MODEL_PROPS]: `_getDynamicModelProps`
|
2020-02-06 00:20:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Note: these are helpers imported from @vue/server-renderer
|
|
|
|
// make sure the names match!
|
|
|
|
registerRuntimeHelpers(ssrHelpers)
|