fix(link): change default value of type to 'default' instead of ''

This commit is contained in:
Ryan 2020-09-05 17:59:19 +08:00 committed by jeremywu
parent 21382d2ee0
commit 2dbc7a4307
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ export const BasicLinks = () => `
<el-link ${commonProps} type="success">success link</el-link>
<el-link ${commonProps} type="info">info link</el-link>
<el-link ${commonProps} type="warning">warning link</el-link>
<el-link ${commonProps} type="error">error link</el-link>
<el-link ${commonProps} type="danger">error link</el-link>
`
export const DisabledLinks = () => `

View File

@ -22,16 +22,16 @@
<script lang='ts'>
import { defineComponent, PropType } from 'vue'
type ILinkType = PropType<'primary' | 'success' | 'warning' | 'info' | 'danger' | ''>
type ILinkType = PropType<'primary' | 'success' | 'warning' | 'info' | 'danger' | 'default'>
export default defineComponent({
name: 'ElLink',
props: {
type: {
type: String as ILinkType,
default: '',
default: 'default',
validator: (val: string) => {
return ['', 'primary', 'success', 'warning', 'info', 'danger'].includes(val)
return ['default', 'primary', 'success', 'warning', 'info', 'danger'].includes(val)
},
},
underline: {