Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taro Input组件的placeholderClass对H5页面不生效 #9647

Open
Tammy-zting opened this issue Jul 1, 2021 · 4 comments
Open

Taro Input组件的placeholderClass对H5页面不生效 #9647

Tammy-zting opened this issue Jul 1, 2021 · 4 comments
Labels
A-components Area - H5 组件库相关 E-medium Helper Wanted - Medium enhancement New feature or request F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@Tammy-zting
Copy link

相关平台

H5

浏览器版本: Chrome最新版
使用框架: React

复现步骤

//index.jsx

  <View className={className} style={style}>
            <Iconfont name="search"/>
            <Input
                placeholder={placeholder}
                className={`${className}__input`}
                placeholderClass={`${className}__input__placeholder`}
                onChange={handleChange}
                onBlur={handleFocus}
            />
        </View>

//index.scss

.cus-search {
    background-color: #f3f3f3;
    border-radius: 20Px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 10Px;
    height: 30Px;

    &__input {
        margin-left: 16px;
        flex: 1;

        &__placeholder {
            font-size: 30px;
            color: red;
        }
    }
}

期望结果

H5和小程序端显示一致

实际结果

小程序Input的样式修改生效,H5不生效

环境信息

👽 Taro v3.2.12


  Taro CLI 3.2.12 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.17.0 - D:\Program Files (x86)\node.EXE
      Yarn: 1.16.0 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.14.13 - D:\Program Files (x86)\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Jul 1, 2021
@Tammy-zting
Copy link
Author

Tammy-zting commented Jul 1, 2021

上面代码效果如图

@ZakaryCode
Copy link
Contributor

H5 暂时不支持 placeholderClass 属性

@ZakaryCode ZakaryCode added the enhancement New feature or request label Nov 10, 2021
@ZakaryCode ZakaryCode added the A-components Area - H5 组件库相关 label Dec 20, 2021
@ZakaryCode ZakaryCode moved this to 组件 in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
@ZakaryCode ZakaryCode added the E-medium Helper Wanted - Medium label Feb 19, 2024
@Fujitomy
Copy link

Fujitomy commented Dec 7, 2024

有解决方案嘛,Textarea的placeholderClass h5也不支持,2年过去了

@Tammy-zting
Copy link
Author

Tammy-zting commented Dec 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-components Area - H5 组件库相关 E-medium Helper Wanted - Medium enhancement New feature or request F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Status: 组件
Development

No branches or pull requests

3 participants