Skip to content

form表单在微信开发中工具中编译不出来 #1834

Open
@wojiaoshupian

Description

@wojiaoshupian

问题描述

小程序模版编译报错
复现步骤

const Index = () => {
  const {handleLogin,isLogin} = useUserStore()
  const [value, setValue] = useState(''); // 使用 useState 来管理状态

  const handleChange = (value) => {
    setValue(value); // 更新状态
  };

  const onSubmit = (event) => {
    console.log(value); // 提交时打印当前值
  };

  const onReset = (event) => {
    setValue(''); // 重置状态
  };

  useDidShow(()=>{
    if(!isLogin){
      handleLogin()
    }

  })
  return (
    <View className="wrapper text-green-800">
       <AtForm
      onSubmit={onSubmit}
      onReset={onReset}
    >
      <AtInput 
        name='1234' 
        title='文本' 
        type='text' 
        placeholder='单行文本' 
        value="123"
        
      />
   
    </AtForm>
  
      <view style={{ height: '100px' }}>
        <TabBar></TabBar>
      </view>
    </View>
  );
};

export default Index;

期望行为

能正常编译
报错信息

Image

系统信息

补充信息

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions