naive-ui/demo/documentation/components/button/zhCN/debug.md

477 lines
7.1 KiB
Markdown
Raw Normal View History

# debug
2020-02-03 20:45:06 +08:00
Debug 用的。
2019-09-20 00:27:06 +08:00
```html
<div class="debug-zone"
n-light-theme-background-color-hint="#ececec"
2019-09-25 14:24:53 +08:00
n-dark-theme-background-color-hint="transparent"
2019-09-20 00:27:06 +08:00
>
<n-button
type="default"
round
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
disabled
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
<n-button
type="success"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Success
</n-button>
<n-button
type="error"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="default"
ghost
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
ghost
round
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
ghost
disabled
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
ghost
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
<n-button
type="success"
ghost
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Success
</n-button>
<n-button
type="error"
ghost
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="default"
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
loading
round
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
loading
disabled
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
<n-button
type="success"
loading
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Success
</n-button>
<n-button
type="error"
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="default"
ghost
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
ghost
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
ghost
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
ghost
loading
round
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
<n-button
type="success"
ghost
loading
disabled
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Success
</n-button>
<n-button
type="error"
ghost
loading
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="default"
round
block
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
disabled
block
size="small"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
block
size="large"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
block
ghost
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
<n-button
type="success"
block
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Success
</n-button>
<n-button
type="error"
block
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="primary"
disabled
circle
size="small"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
circle
size="large"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
circle
ghost
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
<n-button
type="success"
circle
loading
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Success
</n-button>
<n-button
type="error"
circle
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="error"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Error
</n-button>
<n-button
type="error"
size="large"
2019-12-04 18:17:25 +08:00
>
<template v-slot:icon>
<md-save />
</template>
</n-button>
2019-09-20 00:27:06 +08:00
<n-button
type="error"
round
size="large"
2019-12-04 18:17:25 +08:00
>
<template v-slot:icon>
<md-save />
</template>
</n-button>
2019-09-20 00:27:06 +08:00
<n-button-group>
<n-button
type="default"
round
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
disabled
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
</n-button-group>
<n-button-group vertical>
<n-button
type="default"
round
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Default
</n-button>
<n-button
type="primary"
disabled
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Primary
</n-button>
<n-button
type="info"
2020-01-27 19:43:56 +08:00
icon-placement="right"
2019-09-20 00:27:06 +08:00
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Info
</n-button>
<n-button
type="warning"
>
2019-12-04 18:17:25 +08:00
<template v-slot:icon>
<md-save />
</template>
2019-09-20 00:27:06 +08:00
Warning
</n-button>
</n-button-group>
</div>
```
```js
2019-12-04 18:17:25 +08:00
import mdSave from 'naive-ui/lib/icons/md-save'
2019-09-20 00:27:06 +08:00
2019-12-04 18:17:25 +08:00
export default {
components: {
mdSave
},
mounted () {
console.log(this)
}
2019-09-20 00:27:06 +08:00
}
```
```css
.n-button {
margin-right: 12px;
margin-bottom: 8px;
}
.debug-zone {
border-radius: 4px;
background-color: transparent;
transition: background-color .3s ease-in-out;
}
.n-light-theme {
.debug-zone {
border-radius: 4px;
background-color: #ececec;
}
}
```