diff --git a/src/circle/index.js b/src/circle/index.js index 2f1764fa6..e2b9f64d6 100644 --- a/src/circle/index.js +++ b/src/circle/index.js @@ -84,7 +84,7 @@ export default createComponent({ const offset = (PERIMETER * this.value) / 100; return { - stroke: `${this.color}`, + stroke: `${this.gradient ? `url(#${this.uid})` : this.color}`, strokeWidth: `${+this.strokeWidth + 1}px`, strokeLinecap: this.strokeLinecap, strokeDasharray: `${offset}px ${PERIMETER}px`, @@ -158,12 +158,7 @@ export default createComponent({ {this.LinearGradient} - + {this.slots() || (this.text &&
{this.text}
)} diff --git a/src/circle/test/__snapshots__/demo.spec.js.snap b/src/circle/test/__snapshots__/demo.spec.js.snap index 58fc6e132..1aea0cd47 100644 --- a/src/circle/test/__snapshots__/demo.spec.js.snap +++ b/src/circle/test/__snapshots__/demo.spec.js.snap @@ -19,7 +19,7 @@ exports[`renders demo correctly 1`] = `
- +
颜色定制
@@ -31,19 +31,19 @@ exports[`renders demo correctly 1`] = ` - +
渐变色
- +
逆时针
- +
大小定制