feat: add link for individual props/events/slots/configs/icons

This commit is contained in:
Justineo
2021-10-20 01:11:27 +08:00
parent df2b6892d2
commit b0dcdbb873
162 changed files with 2176 additions and 2073 deletions

View File

@@ -10,14 +10,14 @@
| 名称 | 类型 | 默认值 | 描述 |
| -- | -- | -- | -- |
| `selected` | `Object` | - | [^selected] |
| `hour-class` | `string | Array | Object | function` | `{}` | 特定小时的自定义 HTML `class`。传非函数时,数据格式为所有 [Vue 支持的 `class` 表达式](https://cn.vuejs.org/v2/guide/class-and-style.html#%E7%BB%91%E5%AE%9A-HTML-Class);传函数时,签名为 `function(day: number, hour: number): string | Array<string>|Object<string, boolean>`,返回值格式亦为所有 Vue 支持的 `class` 表达式。 |
| `disabled-date` | `function(number, number): boolean` | `() => false` | 特定小时是否禁用。参数类型为 `(day: number, hour: number)`,分别表示一周的第几天(`0` 表示周日)及对应的小时数。 |
| `shortcuts` | `Array` | `schedule.shortcuts` | [^shortcuts] |
| `shortcuts-display` | `string` | `'inline'` | 快捷选择项的显示方式,支持 `inline`/`popup`,分别对应内联按钮组与下拉选择。 |
| `statuses` | `Array<{label: string, value: string}>` | `schedule.statuses` | 图例数据源。会为图例项目添加 `class`<code>&#0096;veui-schedule-legend-${value}&#0096;</code>`label` 则会显示为图例文本。 |
| `disabled` | `boolean=` | `false` | 是否为禁用状态。 |
| `readonly` | `boolean=` | `false` | 是否为只读状态。 |
| ``selected`` | `Object` | - | [^selected] |
| ``hour-class`` | `string | Array | Object | function` | `{}` | 特定小时的自定义 HTML `class`。传非函数时,数据格式为所有 [Vue 支持的 `class` 表达式](https://cn.vuejs.org/v2/guide/class-and-style.html#%E7%BB%91%E5%AE%9A-HTML-Class);传函数时,签名为 `function(day: number, hour: number): string | Array<string>|Object<string, boolean>`,返回值格式亦为所有 Vue 支持的 `class` 表达式。 |
| ``disabled-date`` | `function(number, number): boolean` | `() => false` | 特定小时是否禁用。参数类型为 `(day: number, hour: number)`,分别表示一周的第几天(`0` 表示周日)及对应的小时数。 |
| ``shortcuts`` | `Array` | `schedule.shortcuts` | [^shortcuts] |
| ``shortcuts-display`` | `string` | `'inline'` | 快捷选择项的显示方式,支持 `inline` / `popup`,分别对应内联按钮组与下拉选择。 |
| ``statuses`` | `Array<{label: string, value: string}>` | `schedule.statuses` | 图例数据源。会为图例项目添加 `class` 值 <code>&#0096;veui-schedule-legend-${value}&#0096;</code>`label` 则会显示为图例文本。 |
| ``disabled`` | `boolean=` | `false` | 是否为禁用状态。 |
| ``readonly`` | `boolean=` | `false` | 是否为只读状态。 |
^^^selected
:::badges
@@ -48,21 +48,21 @@
^^^shortcuts
快捷选择选项列表。类型为 `{label: string, selected: boolean | Array}`。
`label` 为显示的提示文字。`selected` 表示预选择的时段,类型为数组时,格式与 `selected` 属性相同;值为 `true` 时等同于 `[[0, 23]]`
`label` 为显示的提示文字。`selected` 表示预选择的时段,类型为数组时,格式与 [`selected`](#props-selected) 属性相同;值为 `true` 时等同于 `[[0, 23]]`。
^^^
### 插槽
| 名称 | 描述 |
| -- | -- |
| `header` | 顶部区域。 |
| `header-content` | 顶部区域的内容,不包括外层容器。 |
| `shortcuts` | 顶部快捷选项区域。 |
| `legend` | 顶部图例区域。 |
| `legend-label` | [^slot-legend-label] |
| `hour` | [^slot-hour] |
| `label` | [^slot-label] |
| `tooltip` | [^slot-tooltip] |
| ``header`` | 顶部区域。 |
| ``header-content`` | 顶部区域的内容,不包括外层容器。 |
| ``shortcuts`` | 顶部快捷选项区域。 |
| ``legend`` | 顶部图例区域。 |
| ``legend-label`` | [^slot-legend-label] |
| ``hour`` | [^slot-hour] |
| ``label`` | [^slot-label] |
| ``tooltip`` | [^slot-tooltip] |
^^^slot-legend-label
每个图例的文本区域。
@@ -122,21 +122,21 @@
| 名称 | 描述 |
| -- | -- |
| `select` | [^event-select] |
| ``select`` | [^event-select] |
^^^event-select
:::badges
`v-model`
:::
选中状态变化后触发,回调参数为 `(value: Object)``value` 类型与 `selected` 属性相同。
选中状态变化后触发,回调参数为 `(value: Object)`。`value` 类型与 [`selected`](#props-selected) 属性相同。
^^^
### 全局配置
| 配置项 | 类型 | 默认值 | 描述 |
| -- | -- | -- | -- |
| `schedule.statuses` | Array<{name, label}> | 见描述。 | [^config-statuses] |
| ``schedule.statuses`` | Array<{name, label}> | 见描述。 | [^config-statuses] |
^^^config-statuses
默认图例状态数组。数组项类型为 `{name: string, label: string}`,默认值为: