mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
commit
e1efddfebb
@ -24,7 +24,7 @@ event
|
||||
| disabled | `boolean` | `false` | Whether to disable. |
|
||||
| focusable | `boolean` | `true` | Whether to focus on selection. |
|
||||
| indeterminate | `boolean` | `false` | Whether partly selected. |
|
||||
| label | `string \| (() => VNodeChild)` | `undefined` | Checkbox label. |
|
||||
| label | `string` | `undefined` | Checkbox label. |
|
||||
| value | `string \| number` | `undefined` | The value of the checkbox to be used in checkbox group. |
|
||||
| on-update:checked | `(checked: boolean) => void` | `undefined` | Callback function triggered on checked status changes. |
|
||||
|
||||
|
@ -24,7 +24,7 @@ event
|
||||
| disabled | `boolean` | `false` | 是否禁用 |
|
||||
| focusable | `boolean` | `true` | 是否可被 focus |
|
||||
| indeterminate | `boolean` | `false` | 是否部分选中 |
|
||||
| label | `string \| (() => VNodeChild)` | `undefined` | Checkbox 的标签 |
|
||||
| label | `string` | `undefined` | Checkbox 的标签 |
|
||||
| value | `string \| number` | `undefined` | Checkbox 在 checkbox group 中使用的值 |
|
||||
| on-update:checked | `(checked: boolean) => void` | `undefined` | 当 checked 改变时触发的回调函数 |
|
||||
|
||||
|
@ -60,7 +60,7 @@ tree
|
||||
| row-key | `(rowData: object) => (number \| string)` | `undefined` | Generate the key of the row by row data (if you don't want to set the key). |
|
||||
| row-props | `(rowData: object, rowIndex : number) => object` | `undefined` | Customize row attributes. |
|
||||
| scroll-x | `number \| string` | `undefined` | If columns are horizontal fixed, scroll-x need to be set. |
|
||||
| single-column | `boolean` | `false` | Whether to display as a column (when true, each column has border-bottom). |
|
||||
| single-column | `boolean` | `false` | Whether to display as a column (when true, each column has border-right). |
|
||||
| single-line | `boolean` | `true` | Whether to display as a line (when true, each row has border-bottom). |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Table size. |
|
||||
| summary | `CreateSummary` | `undefined` | Data of table summary row. For types, see <n-a href="#CreateSummary-Type">CreateSummary Type</n-a>. |
|
||||
|
@ -60,7 +60,7 @@ tree
|
||||
| row-key | `(rowData: object) => (number \| string)` | `undefined` | 通过行数据创建行的 key(如果你不想给每一行加上 key) |
|
||||
| row-props | `(rowData: object, rowIndex : number) => object` | `undefined` | 自定义行属性 |
|
||||
| scroll-x | `number \| string` | `undefined` | 表格内容的横向宽度,如果列被水平固定了,则需要设定它 |
|
||||
| single-column | `boolean` | `false` | 是否展示为一列(true 时每一列都有 border-bottom) |
|
||||
| single-column | `boolean` | `false` | 是否展示为一列(true 时每一列都有 border-right) |
|
||||
| single-line | `boolean` | `true` | 是否展示为一行(true 时每一行都有 border-bottom) |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | 表格的尺寸 |
|
||||
| summary | `CreateSummary` | `undefined` | 表格总结栏的数据,类型见 <n-a href="#CreateSummary-Type">CreateSummary Type</n-a> |
|
||||
|
@ -20,6 +20,6 @@ depth
|
||||
|
||||
## Slots
|
||||
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ---------- | ----------- |
|
||||
| default | `()` | |
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ---------- | ------------------------ |
|
||||
| default | `()` | The content of the icon. |
|
||||
|
@ -20,8 +20,8 @@ depth
|
||||
|
||||
## Slots
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ---- | ---- |
|
||||
| default | `()` | |
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ---- | ---------- |
|
||||
| default | `()` | 图标的内容 |
|
||||
|
||||
<!-- icons -->
|
||||
|
@ -53,21 +53,21 @@ loading
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| font-size | `number` | `14` | |
|
||||
| hljs | `Object` | `undefined` | |
|
||||
| language | `string` | `undefined` | |
|
||||
| line-height | `number` | `1.25` | |
|
||||
| lines | `Array<string>` | `undefined` | |
|
||||
| loading | `boolean` | `false` | |
|
||||
| log | `string` | `undefined` | |
|
||||
| rows | `number` | `15` | |
|
||||
| trim | `boolean` | `false` | |
|
||||
| on-require-more | `(from: 'top' \| 'bottom') => void` | `undefined` | |
|
||||
| on-reach-top | `() => void` | `undefined` | |
|
||||
| on-reach-bottom | `() => void` | `undefined` | |
|
||||
| font-size | `number` | `14` | Font size. |
|
||||
| hljs | `Object` | `undefined` | If you want to set `hljs` locally, pass it using this prop. |
|
||||
| language | `string` | `undefined` | The language of the log in `highlightjs`. |
|
||||
| line-height | `number` | `1.25` | Line height. |
|
||||
| lines | `Array<string>` | `undefined` | Display the log content by line. When the `log` parameter exists at the same time, the parameter is invalid. |
|
||||
| loading | `boolean` | `false` | Whether to show loading. |
|
||||
| log | `string` | `undefined` | The content of the log. |
|
||||
| rows | `number` | `15` | Log size. |
|
||||
| trim | `boolean` | `false` | Whether to display the log after `trim`. |
|
||||
| on-require-more | `(from: 'top' \| 'bottom') => void` | `undefined` | Callback function for scroll loading log. |
|
||||
| on-reach-top | `() => void` | `undefined` | Scroll to the top callback function. |
|
||||
| on-reach-bottom | `() => void` | `undefined` | Scroll to the bottom callback function. |
|
||||
|
||||
## Methods
|
||||
|
||||
| Name | Parameters | Description |
|
||||
| --- | --- | --- |
|
||||
| scrollTo | `(options: { top?: number, position?: 'top' \| 'bottom', slient?: boolean })` | |
|
||||
| scrollTo | `(options: { top?: number, position?: 'top' \| 'bottom', slient?: boolean })` | Callback function for scroll event. |
|
||||
|
@ -51,23 +51,23 @@ loading
|
||||
|
||||
## Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| --------------- | ----------------------------------- | ----------- | ---- |
|
||||
| font-size | `number` | `14` | |
|
||||
| hljs | `Object` | `undefined` | |
|
||||
| language | `string` | `undefined` | |
|
||||
| line-height | `number` | `1.25` | |
|
||||
| lines | `Array<string>` | `undefined` | |
|
||||
| loading | `boolean` | `false` | |
|
||||
| log | `string` | `undefined` | |
|
||||
| rows | `number` | `15` | |
|
||||
| trim | `boolean` | `false` | |
|
||||
| on-require-more | `(from: 'top' \| 'bottom') => void` | `undefined` | |
|
||||
| on-reach-top | `() => void` | `undefined` | |
|
||||
| on-reach-bottom | `() => void` | `undefined` | |
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| font-size | `number` | `14` | 文字大小 |
|
||||
| hljs | `Object` | `undefined` | 如果你想局部设定 `hljs` ,可以通过这个属性传给组件 |
|
||||
| language | `string` | `undefined` | 日志在 `highlightjs` 中的语言 |
|
||||
| line-height | `number` | `1.25` | 行高 |
|
||||
| lines | `Array<string>` | `undefined` | 按行显示日志内容,在同时存在 `log` 参数时,该参数无效 |
|
||||
| loading | `boolean` | `false` | 是否显示加载中 |
|
||||
| log | `string` | `undefined` | 日志的内容 |
|
||||
| rows | `number` | `15` | 日志的尺寸 |
|
||||
| trim | `boolean` | `false` | 是否显示 `trim` 后的日志 |
|
||||
| on-require-more | `(from: 'top' \| 'bottom') => void` | `undefined` | 滚动加载日志的回调函数 |
|
||||
| on-reach-top | `() => void` | `undefined` | 滚动到顶部的回调函数 |
|
||||
| on-reach-bottom | `() => void` | `undefined` | 滚动到底部的回调函数 |
|
||||
|
||||
## Methods
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| scrollTo | `(options: { top?: number, position?: 'top' \| 'bottom', slient?: boolean })` | |
|
||||
| scrollTo | `(options: { top?: number, position?: 'top' \| 'bottom', slient?: boolean })` | 滚动事件的回调函数 |
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Select & Routing
|
||||
|
||||
Use `@update:value` to listen to the select action of the menu. The firt argument of the callback is the `key` of the selected menu item. The second is the orginal data of the menu item.
|
||||
Use `@update:value` to listen to the select action of the menu. The first argument of the callback is the `key` of the selected menu item. The second is the orginal data of the menu item.
|
||||
|
||||
Usually you can use vue-router here to accomplish routing. Also, you can render `label` as `<router-link />` or `<a />` to set route.
|
||||
|
||||
|
@ -10,10 +10,10 @@ basic
|
||||
|
||||
## Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | -------- | ----------- | ----------- |
|
||||
| label | `string` | `undefined` | |
|
||||
| value | `string` | `undefined` | |
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | -------- | ----------- | ------------------------ |
|
||||
| label | `string` | `undefined` | Label of the statistics. |
|
||||
| value | `string` | `undefined` | Statistics value. |
|
||||
|
||||
## Slots
|
||||
|
||||
@ -22,4 +22,4 @@ basic
|
||||
| default | `()` | Value slot. |
|
||||
| label | `()` | Label slot. |
|
||||
| prefix | `()` | Value prefix. |
|
||||
| suffix | `()` | Valut suffix. |
|
||||
| suffix | `()` | Value suffix. |
|
||||
|
@ -10,10 +10,10 @@ basic
|
||||
|
||||
## Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| ----- | -------- | ----------- | ---- |
|
||||
| label | `string` | `undefined` | |
|
||||
| value | `string` | `undefined` | |
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| ----- | -------- | ----------- | ------------------- |
|
||||
| label | `string` | `undefined` | 展示的 `label` 信息 |
|
||||
| value | `string` | `undefined` | 统计数据的值 |
|
||||
|
||||
## Slots
|
||||
|
||||
|
@ -24,8 +24,8 @@ You can use `n-table`, `n-thead`, `n-tbody`, `n-tr`, `n-th` and `n-td`. At most
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| buttom-bordered | `boolean` | `true` | |
|
||||
| bordered | `boolean` | `true` | |
|
||||
| single-column | `boolean` | `false` | |
|
||||
| single-line | `boolean` | `true` | |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
|
||||
| bottom-bordered | `boolean` | `true` | The bottom border of the table, this prop is invalid when `bordered` is `true`. |
|
||||
| bordered | `boolean` | `true` | Whether to show table border. |
|
||||
| single-column | `boolean` | `false` | Whether to display as a column (when `true`, each column has `border-right`). |
|
||||
| single-line | `boolean` | `true` | Whether to display as a line (when `true`, each row has `border-bottom`). |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Table size. |
|
||||
|
@ -22,10 +22,10 @@ single-line
|
||||
|
||||
### Table Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| --------------- | -------------------------------- | ---------- | ---- |
|
||||
| buttom-bordered | `boolean` | `true` | |
|
||||
| bordered | `boolean` | `true` | |
|
||||
| single-column | `boolean` | `false` | |
|
||||
| single-line | `boolean` | `true` | |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| bottom-bordered | `boolean` | `true` | 表格底部是否有边框,在 `bordered` 为 `true` 时该参数无效 |
|
||||
| bordered | `boolean` | `true` | 是否显示边框 |
|
||||
| single-column | `boolean` | `false` | 是否展示为一列(`true` 时每一列都有 `border-right`) |
|
||||
| single-line | `boolean` | `true` | 是否展示为一行(`true` 时每一行都有 `border-bottom`) |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | 表格尺寸大小 |
|
||||
|
Loading…
Reference in New Issue
Block a user