提交 e5e55a34 编写于 作者: fxy060608's avatar fxy060608

fix(mp-weixin): dynamic input type (iOS) (question/147787)

上级 6407f026
......@@ -26,6 +26,29 @@ describe('mp-weixin: transform component', () => {
code,
`(_ctx, _cache) => {
return {}
}`
)
})
test('lazy element: input', () => {
assert(
`<input/>`,
`<input/>`,
`(_ctx, _cache) => {
return {}
}`
)
assert(
`<input type="number"/>`,
`<input type="number"/>`,
`(_ctx, _cache) => {
return {}
}`
)
assert(
`<input :type="type"/>`,
`<block wx:if="{{r0}}"><input type="{{a}}"/></block>`,
`(_ctx, _cache) => {
return { a: _ctx.type }
}`
)
})
......
......@@ -53,6 +53,7 @@ export const miniProgram: MiniProgramCompilerOptions = {
},
],
// iOS 平台需要延迟
input: [{ name: 'bind', arg: ['type'] }],
textarea: [{ name: 'on', arg: ['input'] }],
},
component: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册