mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-01 13:36:55 +08:00
doc(element): zh-cn
This commit is contained in:
parent
23ac7c5465
commit
21e811b88f
@ -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="{
|
||||
|
@ -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 组件。
|
||||
|
||||
创建特定主题的组件十分管用。
|
||||
|
||||
|
@ -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="{
|
||||
|
@ -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)`|
|
Loading…
Reference in New Issue
Block a user