doc(element): zh-cn

This commit is contained in:
07akioni 2020-02-03 19:44:42 +08:00
parent 23ac7c5465
commit 21e811b88f
4 changed files with 22 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# Style Scheme
It can also access style scheme.
```html
<n-element as="div" class="myel">
<n-element as="div" class="myel" style="overflow: auto;">
<template v-slot="{ styleScheme }">
<pre
:style="{

View File

@ -1,5 +1,5 @@
# 基础
当配置提供者提供深色主题时,它应用 `n-dark-theme` class。当配置提供者提供浅色主题时它应用 `n-light-theme` class。若非二者之一它不会应用额外的class正如其他特定主题的Naive UI组件。
当配置提供者提供深色主题时,它应用 `n-dark-theme` class。当配置提供者提供浅色主题时它应用 `n-light-theme` class。若非二者之一它不会应用额外的 class正如其他特定主题的 Naive UI 组件。
创建特定主题的组件十分管用。

View File

@ -1,7 +1,7 @@
# 样式方案
它也可以获得 Style Scheme。
```html
<n-element as="div" class="myel">
<n-element as="div" class="myel" style="overflow: auto;">
<template v-slot="{ styleScheme }">
<pre
:style="{

View File

@ -1,7 +1,23 @@
# 元素
元素和配置消费者类似但当主题改变时会应用不同的class。
# 元素 Element
Element 可以被渲染成各种标签同事还可以获得某些 Config Provider 提供的配置。
## 演示
```demo
basic
color
```
## Props
|名称|类型|默认值|介绍|
|-|-|-|-|
|as|`string`|`'div'`||
## Slots
|名称|参数|介绍|
|-|-|-|
|default|`(theme: string, namespace: string, themeEnvironment: any, styleScheme: object)`||
## Events
|名称|参数|
|-|-|
|theme-change|`(theme: string)`|