Browse Source

input: commontent增加类型 (#1893)

ailululu 3 years ago
parent
commit
c9b0ff7000
2 changed files with 4 additions and 2 deletions
  1. 2 1
      src/packages/__VUE/input/index.taro.vue
  2. 2 1
      src/packages/__VUE/input/index.vue

+ 2 - 1
src/packages/__VUE/input/index.taro.vue

@@ -264,7 +264,8 @@ export default create({
 
     const renderInput = (type: InputType) => {
       return h(type == 'textarea' ? 'textarea' : 'input', {
-        style: type == 'textarea' ? stylesTextarea : styles
+        style: type == 'textarea' ? stylesTextarea : styles,
+        type: type != 'textarea' && inputType(type)
       });
     };
 

+ 2 - 1
src/packages/__VUE/input/index.vue

@@ -254,7 +254,8 @@ export default create({
 
     const renderInput = (type: InputType) => {
       return h(type == 'textarea' ? 'textarea' : 'input', {
-        style: type == 'textarea' ? stylesTextarea : styles
+        style: type == 'textarea' ? stylesTextarea : styles,
+        type: type != 'textarea' && inputType(type)
       });
     };