refactor(compiler): extract isStaticExp util
This commit is contained in:
@@ -24,7 +24,8 @@ import {
|
||||
MERGE_PROPS,
|
||||
isBindKey,
|
||||
createSequenceExpression,
|
||||
InterpolationNode
|
||||
InterpolationNode,
|
||||
isStaticExp
|
||||
} from '@vue/compiler-dom'
|
||||
import {
|
||||
escapeHtml,
|
||||
@@ -194,7 +195,7 @@ export const ssrTransformElement: NodeTransform = (node, context) => {
|
||||
}
|
||||
for (let j = 0; j < props.length; j++) {
|
||||
const { key, value } = props[j]
|
||||
if (key.type === NodeTypes.SIMPLE_EXPRESSION && key.isStatic) {
|
||||
if (isStaticExp(key)) {
|
||||
let attrName = key.content
|
||||
// static key attr
|
||||
if (attrName === 'class') {
|
||||
|
||||
Reference in New Issue
Block a user