mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 新增导航模式配置
This commit is contained in:
28
src/components/common/ColorBlock/index.vue
Normal file
28
src/components/common/ColorBlock/index.vue
Normal file
@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="flex-center w-20px h-20px mx-6px mb-8px cursor-pointer rounded-2px" :style="{ backgroundColor: color }">
|
||||
<icon-ic-outline-check
|
||||
v-if="checked"
|
||||
class="text-14px text-white"
|
||||
:class="[isWhite ? 'text-gray-700' : 'text-white']"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
color: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
checked: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
const whiteColors = ['#ffffff', '#fff', 'rgb(255,255,255)'];
|
||||
const isWhite = computed(() => whiteColors.includes(props.color));
|
||||
</script>
|
||||
<style scoped></style>
|
@ -1,3 +1,4 @@
|
||||
import AppProviderContent from './AppProviderContent/index.vue';
|
||||
import ColorBlock from './ColorBlock/index.vue';
|
||||
|
||||
export { AppProviderContent };
|
||||
export { AppProviderContent, ColorBlock };
|
||||
|
@ -1 +1 @@
|
||||
export { AppProviderContent } from './common';
|
||||
export { AppProviderContent, ColorBlock } from './common';
|
||||
|
Reference in New Issue
Block a user