mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 14:20:21 +08:00
docs(projects): 添加书写规范文档
This commit is contained in:
28
src/views/dashboard/workbench/components/GradientBg.vue
Normal file
28
src/views/dashboard/workbench/components/GradientBg.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="bg-gradient w-full h-full p-16px text-white">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
interface Props {
|
||||
/** 渐变开始的颜色 */
|
||||
startColor: string;
|
||||
/** 渐变结束的颜色 */
|
||||
endColor: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
startColor: '#56cdf3',
|
||||
endColor: '#719de3'
|
||||
});
|
||||
|
||||
const gradientStyle = computed(() => `linear-gradient(to bottom right, ${props.startColor}, ${props.endColor})`);
|
||||
</script>
|
||||
<style scoped>
|
||||
.bg-gradient {
|
||||
background-image: v-bind(gradientStyle);
|
||||
}
|
||||
</style>
|
||||
3
src/views/dashboard/workbench/components/index.ts
Normal file
3
src/views/dashboard/workbench/components/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import GradientBg from './GradientBg.vue';
|
||||
|
||||
export { GradientBg };
|
||||
Reference in New Issue
Block a user