Преглед изворни кода

Merge pull request #491 from clddup/master

fix: 修复在表格中给按钮添加link属性后,字体颜色变成白色 #490
Archer пре 10 месеци
родитељ
комит
0c9f91bfb2
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      src/components/Button/src/Button.vue

+ 4 - 4
src/components/Button/src/Button.vue

@@ -90,16 +90,16 @@ const props = defineProps({
 const emits = defineEmits(['click'])
 
 const color = computed(() => {
-  const { type } = props
-  if (type === 'primary') {
+  const { type, link } = props
+  if (type === 'primary' && !link) {
     return unref(getTheme).elColorPrimary
   }
   return ''
 })
 
 const style = computed(() => {
-  const { type } = props
-  if (type === 'primary') {
+  const { type, link } = props
+  if (type === 'primary' && !link) {
     return '--el-button-text-color: #fff; --el-button-hover-text-color: #fff'
   }
   return ''