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

[Bug] 行内样式 url(${img}) 设置背景无效 #13934

Open
wenfangdu opened this issue May 31, 2023 · 0 comments
Open

[Bug] 行内样式 url(${img}) 设置背景无效 #13934

wenfangdu opened this issue May 31, 2023 · 0 comments
Labels
F-vue3 Framework - Vue 3 T-tt Target - 编译到字节跳动小程序 V-3 Version - 3.x

Comments

@wenfangdu
Copy link
Contributor

wenfangdu commented May 31, 2023

相关平台

字节跳动小程序

复现仓库

https://github.com/wenfangdu/taro-nutui/tree/import-img
小程序基础库: 2.68.0.9
使用框架: Vue 3

复现步骤

pnpm run dev:tt

<view :style="{ width: '300px', height: '300px', background: `url(${img})` }"></view>

期望结果

背景生效
P.S. 同样的写法在 vite 里是生效的

实际结果

背景不生效
image

环境信息

Taro CLI 3.6.6 environment info:
    System:
      OS: macOS 13.3.1
      Shell: 5.2.15 - /opt/homebrew/bin/bash
    Binaries:
      Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
      Yarn: 1.22.19 - ~/Library/pnpm/yarn
      npm: 9.6.7 - ~/Library/pnpm/npm
    npmPackages:
      @tarojs/cli: 3.6.7 => 3.6.7 
      @tarojs/components: 3.6.7 => 3.6.7 
      @tarojs/helper: 3.6.7 => 3.6.7 
      @tarojs/plugin-framework-vue3: 3.6.7 => 3.6.7 
      @tarojs/plugin-html: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-alipay: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-h5: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-jd: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-qq: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-swan: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-tt: 3.6.7 => 3.6.7 
      @tarojs/plugin-platform-weapp: 3.6.7 => 3.6.7 
      @tarojs/runtime: 3.6.7 => 3.6.7 
      @tarojs/shared: 3.6.7 => 3.6.7 
      @tarojs/taro: 3.6.7 => 3.6.7 
      @tarojs/webpack5-runner: 3.6.7 => 3.6.7 
      babel-preset-taro: 3.6.7 => 3.6.7 
      eslint-config-taro: 3.6.7 => 3.6.7 
@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-tt Target - 编译到字节跳动小程序 V-3 Version - 3.x labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-tt Target - 编译到字节跳动小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant