diff --git a/packages/uni-mp-weixin/__tests__/component.spec.ts b/packages/uni-mp-weixin/__tests__/component.spec.ts
index 95c641b33480536aa19b54bdc301644cf0aecfb7..50c613f3f0dd8b4d110ceae197941d7a24651e7f 100644
--- a/packages/uni-mp-weixin/__tests__/component.spec.ts
+++ b/packages/uni-mp-weixin/__tests__/component.spec.ts
@@ -26,6 +26,29 @@ describe('mp-weixin: transform component', () => {
code,
`(_ctx, _cache) => {
return {}
+}`
+ )
+ })
+ test('lazy element: input', () => {
+ assert(
+ ``,
+ ``,
+ `(_ctx, _cache) => {
+ return {}
+}`
+ )
+ assert(
+ ``,
+ ``,
+ `(_ctx, _cache) => {
+ return {}
+}`
+ )
+ assert(
+ ``,
+ ``,
+ `(_ctx, _cache) => {
+ return { a: _ctx.type }
}`
)
})
diff --git a/packages/uni-mp-weixin/src/compiler/options.ts b/packages/uni-mp-weixin/src/compiler/options.ts
index bba1b58046d1ebee35561b9bc2bdca6ccb2435fe..06e45436becc4562299aa3a2df8f3e5a7c40b5db 100644
--- a/packages/uni-mp-weixin/src/compiler/options.ts
+++ b/packages/uni-mp-weixin/src/compiler/options.ts
@@ -53,6 +53,7 @@ export const miniProgram: MiniProgramCompilerOptions = {
},
],
// iOS 平台需要延迟
+ input: [{ name: 'bind', arg: ['type'] }],
textarea: [{ name: 'on', arg: ['input'] }],
},
component: {