mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
doc(log)
This commit is contained in:
parent
040127220c
commit
668c6b49fd
@ -14,7 +14,7 @@ Log has `require-more`, `reach-top` and `reach-bottom` event. Note that even if
|
||||
```js
|
||||
function log () {
|
||||
const l = []
|
||||
for (let i = 0; i < 40; ++i) {
|
||||
for (let i = 0; i < 10; ++i) {
|
||||
l.push((Math.random()).toString(16))
|
||||
}
|
||||
return l.join('\n') + '\n'
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Log
|
||||
<!--single-column-->
|
||||
If you have some logs to show, use log.
|
||||
|
||||
<n-alert title="Note" type="warning">
|
||||
Due to package size, Naive UI doesn't include highlight.js. If you want highlight logs, make sure you have set highlightjs before using it.
|
||||
</n-alert>
|
||||
@ -29,4 +31,24 @@ event
|
||||
scroll
|
||||
highlight
|
||||
loading
|
||||
```
|
||||
```
|
||||
|
||||
## Props
|
||||
|Name|Type|Default|Description|
|
||||
|-|-|-|-|
|
||||
|loading|`boolean`|`false`||
|
||||
|trim|`boolean`|`false`||
|
||||
|log|`string`|`null`||
|
||||
|lines|`Array<string>`|`null`||
|
||||
|font-size|`number`|`14`||
|
||||
|line-height|`number`|`1.25`||
|
||||
|language|`string`|`null`||
|
||||
|rows|`number`|`15`||
|
||||
|hljs|`object`|`null`||
|
||||
|
||||
## Events
|
||||
|Name|Parameters|Description|
|
||||
|-|-|-|
|
||||
|require-more|`(from: 'top' \| 'bottom')`||
|
||||
|reach-top|`()`|
|
||||
|reach-bottom|`()`|
|
Loading…
Reference in New Issue
Block a user