mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复登录页刷新跳404
This commit is contained in:
@ -29,7 +29,7 @@
|
||||
import { computed } from 'vue';
|
||||
import { useBoolean } from '@/hooks';
|
||||
import { IconClose } from '@/components';
|
||||
import { shallowColor } from '@/utils';
|
||||
import { addColorAlpha } from '@/utils';
|
||||
|
||||
const props = defineProps({
|
||||
isActive: {
|
||||
@ -62,10 +62,10 @@ const buttonStyle = computed(() => {
|
||||
const style: { [key: string]: string } = {};
|
||||
if (props.isActive || isHover.value) {
|
||||
style.color = props.primaryColor;
|
||||
style.borderColor = shallowColor(props.primaryColor, 0.3);
|
||||
style.borderColor = addColorAlpha(props.primaryColor, 0.3);
|
||||
if (props.isActive) {
|
||||
const alpha = props.darkMode ? 0.15 : 0.1;
|
||||
style.backgroundColor = shallowColor(props.primaryColor, alpha);
|
||||
style.backgroundColor = addColorAlpha(props.primaryColor, alpha);
|
||||
}
|
||||
}
|
||||
return style;
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { shallowColor } from '@/utils';
|
||||
import { addColorAlpha } from '@/utils';
|
||||
|
||||
/** 填充的背景颜色: [默认颜色, 暗黑主题颜色] */
|
||||
type FillColor = [string, string];
|
||||
@ -66,7 +66,7 @@ const fill = computed(() => {
|
||||
}
|
||||
if (props.isActive) {
|
||||
const alpha = props.darkMode ? 0.15 : 0.1;
|
||||
color = shallowColor(props.primaryColor, alpha);
|
||||
color = addColorAlpha(props.primaryColor, alpha);
|
||||
}
|
||||
return color;
|
||||
});
|
||||
|
Reference in New Issue
Block a user