mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
27 lines
343 B
Markdown
27 lines
343 B
Markdown
# Loading
|
|
```html
|
|
<n-switch v-model="loading" />
|
|
<n-log
|
|
:loading="loading"
|
|
:log="log"
|
|
/>
|
|
```
|
|
|
|
```js
|
|
function log () {
|
|
const l = []
|
|
for (let i = 0; i < 40; ++i) {
|
|
l.push((Math.random()).toString(16))
|
|
}
|
|
return l.join('\n') + '\n'
|
|
}
|
|
|
|
export default {
|
|
data () {
|
|
return {
|
|
loading: false,
|
|
log: log()
|
|
}
|
|
}
|
|
}
|
|
``` |