feat: migrate ColorSwatch and public color boundary
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<script setup lang="ts">
|
||||
import { ColorSwatch } from "@heroui-vue/components";
|
||||
|
||||
const colors = ["#0485F7", "#EF4444", "#F59E0B", "#10B981", "#D946EF"];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-8">
|
||||
<div class="flex flex-col gap-2">
|
||||
<span class="text-sm text-muted">发光效果</span>
|
||||
<div class="flex items-center gap-4">
|
||||
<ColorSwatch
|
||||
v-for="color in colors"
|
||||
:key="color"
|
||||
:color="color"
|
||||
size="xl"
|
||||
:style-fn="() => ({ boxShadow: `0 0 20px 2px ${color}` })"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<span class="text-sm text-muted">渐变</span>
|
||||
<div class="flex items-center gap-4">
|
||||
<ColorSwatch
|
||||
v-for="color in colors"
|
||||
:key="color"
|
||||
:color="color"
|
||||
size="xl"
|
||||
:style-fn="
|
||||
({ color: current }) => ({
|
||||
background: `linear-gradient(135deg, ${current.toString('css')}, white)`,
|
||||
})
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user