forked from opentiny/tiny-vue
docs(date-picker): [date-picker] fix format docs (#1522)
This commit is contained in:
parent
68c189bd65
commit
016bdb2795
|
@ -62,8 +62,8 @@
|
|||
</tr>
|
||||
<tr v-else>
|
||||
<th width="15%">{{ i18nByKey('name') }}</th>
|
||||
<th width="20%">{{ i18nByKey('propType') }}</th>
|
||||
<th width="20%">{{ i18nByKey('defValue') }}</th>
|
||||
<th width="20%" v-if="hasKey(oneApiArr, 'type')">{{ i18nByKey('propType') }}</th>
|
||||
<th width="20%" v-if="hasKey(oneApiArr, 'defaultValue')">{{ i18nByKey('defValue') }}</th>
|
||||
<th width="45%">{{ i18nByKey('desc') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -81,7 +81,7 @@
|
|||
>
|
||||
</version-tip>
|
||||
</td>
|
||||
<td v-if="!key.includes('slots')" @click="handleTypeClick">
|
||||
<td v-if="!key.includes('slots') && hasKey(oneApiArr, 'type')" @click="handleTypeClick">
|
||||
<a
|
||||
v-if="row.typeAnchorName"
|
||||
:href="`${row.typeAnchorName.indexOf('#') === -1 ? '#' : ''}${row.typeAnchorName}`"
|
||||
|
@ -89,7 +89,14 @@
|
|||
></a>
|
||||
<span v-else v-html="row.type"></span>
|
||||
</td>
|
||||
<td v-if="!key.includes('slots') && !key.includes('events') && !key.includes('methods')">
|
||||
<td
|
||||
v-if="
|
||||
!key.includes('slots') &&
|
||||
!key.includes('events') &&
|
||||
!key.includes('methods') &&
|
||||
hasKey(oneApiArr, 'defaultValue')
|
||||
"
|
||||
>
|
||||
<span
|
||||
v-html="typeof row.defaultValue === 'string' ? row.defaultValue || '--' : row.defaultValue"
|
||||
></span>
|
||||
|
@ -412,6 +419,8 @@ export default defineComponent({
|
|||
common.renderFooter()
|
||||
})
|
||||
|
||||
const hasKey = (apiArr, key) => !apiArr.every((item) => item[key] === undefined)
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
...fn,
|
||||
|
@ -419,7 +428,8 @@ export default defineComponent({
|
|||
anchorRefreshKey,
|
||||
apiModeState,
|
||||
templateModeState,
|
||||
optionsList
|
||||
optionsList,
|
||||
hasKey
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue