浏览代码

fix: 登录增加密码状态

xyh 2 年之前
父节点
当前提交
5ed8612fe1
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      src/pages/index/login/field/index.jsx
  2. 1 1
      src/pages/index/login/index.jsx

+ 2 - 1
src/pages/index/login/field/index.jsx

@@ -1,12 +1,13 @@
 import {Input, Text, View} from '@tarojs/components';
 
-export default function Field({label}) {
+export default function Field({label, password}) {
   return (
     <View className='mt-3 first:mt-0'>
       <Text className='block text-lg font-semibold'>{label}</Text>
       <Input
         placeholder={`请输入${label}`}
         className='mt-1 border-0 border-b border-solid border-gray-200 py-2'
+        password={password}
       />
     </View>
   );

+ 1 - 1
src/pages/index/login/index.jsx

@@ -15,7 +15,7 @@ export default function Login({visible, onClose}) {
     >
       <View className='pt-9 pb-5 flex flex-col h-full'>
         <Field label='用户名' />
-        <Field label='密码' />
+        <Field label='密码' password />
 
         <View className='mt-auto'>
           <Button