智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LightingSystemApp-serial/.svn/pristine/b9/b9795cc1cd278041b77615b85df...

35 lines
767 B

3 years ago
module.exports = {
directive: 's-',
createScopedSlots (slotName, props, state) {
const node = {
type: 'slot',
attr: {
name: slotName
},
children: []
}
Object.keys(props).forEach(name => {
node.attr['var-' + name] = props[name].replace('{{', '').replace('}}', '')
})
return node
},
resolveScopedSlots (slotName, {
paramExprNode,
returnExprNodes,
traverseExpr,
normalizeChildren
}, state) {
const node = {
type: 'view',
attr: {
slot: slotName
},
children: normalizeChildren(traverseExpr(returnExprNodes, state))
}
if (paramExprNode && paramExprNode.type === 'Identifier') {
node.scoped = paramExprNode.name
}
return node
}
}