feat: edit widgets color

This commit is contained in:
sim1222 2022-02-07 18:24:02 +09:00
parent a3354213d0
commit 45f8fdc52d
No known key found for this signature in database
GPG Key ID: 21460619C5FC4DD1

View File

@ -14,7 +14,7 @@
:stroke-dashoffset="strokeDashoffset"
fill="none"
stroke-width="0.1"
:stroke="`hsl(248%, 80%, 70%)`"
:stroke="color"
/>
<text x="50%" y="50%" dy="0.05" text-anchor="middle">{{ (value * 100).toFixed(0) }}%</text>
</svg>
@ -29,6 +29,7 @@ const props = defineProps<{
const r = 0.45;
const color = `hsl(248%, 80%, 70%)`;
const strokeDashoffset = $computed(() => (1 - props.value) * (Math.PI * (r * 2)));
</script>