@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-restricted-globals */
|
||||
|
||||
let decoder: HTMLDivElement
|
||||
|
||||
export function decodeHtmlBrowser(raw: string): string {
|
||||
|
||||
@@ -18,6 +18,7 @@ import { transformOn } from './transforms/vOn'
|
||||
import { transformShow } from './transforms/vShow'
|
||||
import { warnTransitionChildren } from './transforms/warnTransitionChildren'
|
||||
import { stringifyStatic } from './transforms/stringifyStatic'
|
||||
import { extend } from '@vue/shared'
|
||||
|
||||
export { parserOptions }
|
||||
|
||||
@@ -39,23 +40,22 @@ export function compile(
|
||||
template: string,
|
||||
options: CompilerOptions = {}
|
||||
): CodegenResult {
|
||||
return baseCompile(template, {
|
||||
...parserOptions,
|
||||
...options,
|
||||
nodeTransforms: [...DOMNodeTransforms, ...(options.nodeTransforms || [])],
|
||||
directiveTransforms: {
|
||||
...DOMDirectiveTransforms,
|
||||
...(options.directiveTransforms || {})
|
||||
},
|
||||
transformHoist: __BROWSER__ ? null : stringifyStatic
|
||||
})
|
||||
return baseCompile(
|
||||
template,
|
||||
extend({}, parserOptions, options, {
|
||||
nodeTransforms: [...DOMNodeTransforms, ...(options.nodeTransforms || [])],
|
||||
directiveTransforms: extend(
|
||||
{},
|
||||
DOMDirectiveTransforms,
|
||||
options.directiveTransforms || {}
|
||||
),
|
||||
transformHoist: __BROWSER__ ? null : stringifyStatic
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
export function parse(template: string, options: ParserOptions = {}): RootNode {
|
||||
return baseParse(template, {
|
||||
...parserOptions,
|
||||
...options
|
||||
})
|
||||
return baseParse(template, extend({}, parserOptions, options))
|
||||
}
|
||||
|
||||
export * from './runtimeHelpers'
|
||||
|
||||
Reference in New Issue
Block a user