径向渐变
backgroundStyle: {
opacity: 0,
color: {
type: 'radial', // 径向渐变
x: 0.5, // 圆心坐标(中心)
y: 0.5,
r: 1,
colorStops: [
{
offset: 1,
color: 'rgba(255, 255, 255,1)',
},
{
offset: 0,
color: 'rgba(255, 255, 255,0.1)',
},
],
globalCoord: false,
},
}
线性渐变
color: [
{
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 1,
color: '#0d47e1', //下
},
{
offset: 0,
color: '#6ecefb',
},
],
globalCoord: false,
},
{
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 1,
color: '#0d47e1', //下
},
{
offset: 0,
color: '#6ecefb',
},
],
globalCoord: false,
},
],