refactor: use @ant-design/fast-color instead (#4070)
* refactor: Use @ant-design/fast-color instead * fix: test failed * chore: remove isValidColor All FastColor objects are valid. So isValid is always true. FastColor("not-a-color") -> `#000000` * refactor: rename directory `colorful` to `color` * fix: ci fail
This commit is contained in:
@@ -3,7 +3,7 @@ import type { MenuRecordBadgeRaw } from '@vben-core/typings';
|
||||
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { isValidColor } from '@vben-core/shared';
|
||||
import { convertToRgb } from '@vben-core/shared';
|
||||
|
||||
import BadgeDot from './menu-badge-dot.vue';
|
||||
|
||||
@@ -34,9 +34,9 @@ const badgeClass = computed(() => {
|
||||
});
|
||||
|
||||
const badgeStyle = computed(() => {
|
||||
if (badgeClass.value && isValidColor(badgeClass.value)) {
|
||||
if (badgeClass.value) {
|
||||
return {
|
||||
backgroundColor: badgeClass.value,
|
||||
backgroundColor: convertToRgb(badgeClass.value),
|
||||
};
|
||||
}
|
||||
return {};
|
||||
|
Reference in New Issue
Block a user