antvis/G6

背景图插件:背景色和背景图切换问题-影响使用 #5947

zhangsai521314 posted onGitHub

Describe the bug / 问题描述

background属性(虽然此属性可以填颜色,也可以填背景图),但是当填背景图的时候,插件的backgrounfRepeat和backgroundSize失效。 如果background设置为''或者null,使用backgroundImage设置图片,插件的backgrounfRepeat和backgroundSize也会失效。 只有把background删除,使用backgroundImage设置图片,插件的backgrounfRepeat和backgroundSize才会有效。 但是把background删除又没办法设置颜色了,把background加回来backgroundImage图片又没办法平铺了。 让background位null或者''的时候backgrounfRepeat和backgroundSize生效吧

https://stackblitz.com/edit/react-9pyjnr-8hornz?file=index.js

Steps to Reproduce the Bug or Issue / 重现步骤

  //解注释这行
  background: null,

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Firefox

Additional context / 补充说明

No response


background: null 不是合法的用法。建议是先直接在 div 上配置好背景样式再拷贝过来。目测是你使用的方式有问题

posted by Aarebecca 10 months ago

Fund this Issue

$0.00
Funded

Pull requests