From b4049466b7b0705ea23e300a1d2314050ddf2f01 Mon Sep 17 00:00:00 2001 From: songjianet <1778651752@qq.com> Date: Fri, 23 Jul 2021 01:02:38 +0800 Subject: [PATCH] docs(log): api table (#588) --- src/log/demos/enUS/index.demo-entry.md | 26 +++++++++++----------- src/log/demos/zhCN/index.demo-entry.md | 30 +++++++++++++------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/log/demos/enUS/index.demo-entry.md b/src/log/demos/enUS/index.demo-entry.md index ba8ef98ec..847bac8a8 100644 --- a/src/log/demos/enUS/index.demo-entry.md +++ b/src/log/demos/enUS/index.demo-entry.md @@ -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` | `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` | `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. | diff --git a/src/log/demos/zhCN/index.demo-entry.md b/src/log/demos/zhCN/index.demo-entry.md index c23b4a408..b00a0da78 100644 --- a/src/log/demos/zhCN/index.demo-entry.md +++ b/src/log/demos/zhCN/index.demo-entry.md @@ -51,23 +51,23 @@ loading ## Props -| 名称 | 类型 | 默认值 | 说明 | -| --------------- | ----------------------------------- | ----------- | ---- | -| font-size | `number` | `14` | | -| hljs | `Object` | `undefined` | | -| language | `string` | `undefined` | | -| line-height | `number` | `1.25` | | -| lines | `Array` | `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` | `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 })` | 滚动事件的回调函数 |