feat: edit widgets color

This commit is contained in:
sim1222 2022-02-07 18:18:26 +09:00
parent 5d9b9eeaad
commit a3354213d0
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="color"
:stroke="`hsl(248%, 80%, 70%)`"
/>
<text x="50%" y="50%" dy="0.05" text-anchor="middle">{{ (value * 100).toFixed(0) }}%</text>
</svg>
@ -29,7 +29,6 @@ const props = defineProps<{
const r = 0.45;
const color = $computed(() => `hsl(${180 - (props.value * 180)}, 80%, 70%)`);
const strokeDashoffset = $computed(() => (1 - props.value) * (Math.PI * (r * 2)));
</script>