(plainNode: PlainElementNode)
| 52 | } |
| 53 | |
| 54 | function processOption(plainNode: PlainElementNode) { |
| 55 | if (plainNode.tag === 'option') { |
| 56 | if (plainNode.props.findIndex(p => p.name === 'selected') === -1) { |
| 57 | const value = findValueBinding(plainNode) |
| 58 | plainNode.ssrCodegenNode!.elements.push( |
| 59 | createConditionalExpression( |
| 60 | createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ |
| 61 | createConditionalExpression( |
| 62 | createCallExpression(`Array.isArray`, [model]), |
| 63 | createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ |
| 64 | model, |
| 65 | value, |
| 66 | ]), |
| 67 | createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ |
| 68 | model, |
| 69 | value, |
| 70 | ]), |
| 71 | ), |
| 72 | ]), |
| 73 | createSimpleExpression(' selected', true), |
| 74 | createSimpleExpression('', true), |
| 75 | false /* no newline */, |
| 76 | ), |
| 77 | ) |
| 78 | } |
| 79 | } else if (plainNode.tag === 'optgroup') { |
| 80 | processSelectChildren(plainNode.children) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | if (node.tagType === ElementTypes.ELEMENT) { |
| 85 | const res: DirectiveTransformResult = { props: [] } |
no test coverage detected