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

内联样式中使用 backdropFilter 会丢失 #17464

Open
liuqinghua09 opened this issue Mar 19, 2025 · 1 comment
Open

内联样式中使用 backdropFilter 会丢失 #17464

liuqinghua09 opened this issue Mar 19, 2025 · 1 comment

Comments

@liuqinghua09
Copy link

相关平台

微信小程序

小程序基础库: 3.7.9
使用框架: React

复现步骤

<View
style={{
padding: "2px",
backdropFilter: "blur(5px)",
filter: "blur(50px)",
}}
/>

上面代码style中的【backdropFilter: "blur(5px)"】,编译后从IDE查看发现会丢失,会变成下面这样:

style="padding: 2px; filter: blur(50px);"

期望结果

backdropFilter属性丢失

实际结果

backdropFilter属性不丢失

环境信息

👽 Taro v4.0.9


  Taro CLI 4.0.9 environment info:
    System:
      OS: macOS 14.5
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
      Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.4/bin/yarn
      npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.9 => 4.0.9 
      @tarojs/components: 4.0.9 => 4.0.9 
      @tarojs/helper: 4.0.9 => 4.0.9 
      @tarojs/plugin-framework-react: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-alipay: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-h5: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-jd: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-qq: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-swan: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-tt: 4.0.9 => 4.0.9 
      @tarojs/plugin-platform-weapp: 4.0.9 => 4.0.9 
      @tarojs/react: 4.0.9 => 4.0.9 
      @tarojs/runtime: 4.0.9 => 4.0.9 
      @tarojs/shared: 4.0.9 => 4.0.9 
      @tarojs/taro: 4.0.9 => 4.0.9 
      @tarojs/taro-loader: 4.0.9 => 4.0.9 
      @tarojs/webpack5-runner: 4.0.9 => 4.0.9 
      babel-preset-taro: 4.0.9 => 4.0.9 
      eslint-config-taro: 4.0.9 => 4.0.9 
      react: ^18.0.0 => 18.3.1 
@liuqinghua09
Copy link
Author

预期结果和实际结果写反了。

预期是:backdropFilter属性不丢失,style="padding: 2px; backdrop-filter: blur(5px); filter: blur(50px);"

实际是:backdropFilter属性丢失,style="padding: 2px; filter: blur(50px);"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant