mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-11 13:10:26 +08:00
docs: optimize docs about SFC (#4897)
This commit is contained in:
parent
f00d90cdef
commit
5cb5881fce
@ -25,3 +25,7 @@ That is because `v-model:value="xxx"` will be transformed to `:onUpdate:value="x
|
||||
However if you are using `on-update:value="yyy"`, Vue would generate code like `:onUpdate:value="xxx" :on-update-value="yyy"` and the second one would override the first one in Vue runtime. The `v-model:value` would be broken.
|
||||
|
||||
If you have any problems, feel free to create a PR or issue on GitHub.
|
||||
|
||||
## 2. How to use in Single File Component(SFC)?
|
||||
|
||||
please see [Usage in SFC](usage-sfc)
|
||||
|
@ -25,3 +25,7 @@
|
||||
然而如果你使用了 `on-update:value="yyy"`,Vue 会生成类似于 `:onUpdate:value="xxx" :on-update-value="yyy"` 的代码,然后第二个属性会在运行时覆盖掉第一个,`v-model:value` 会崩掉。
|
||||
|
||||
如果你发现任何问题,欢迎在 GitHub 上提交 issue 和 PR。
|
||||
|
||||
## 2. 如何在单文件组件(SFC - Single File Component)中使用?
|
||||
|
||||
详见 [在 SFC 中使用](usage-sfc)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Usage in SFC
|
||||
|
||||
You can directly import components from Naive UI or install it globally to a Vue app.
|
||||
If you want to use the Single File Component(SFC) style, you can directly import components from Naive UI or install it globally to a Vue app.
|
||||
|
||||
## Import Directly (Recommended)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# 在 SFC 中使用
|
||||
|
||||
你可以选择直接引入或全局安装在 Vue App 中。
|
||||
如果你想使用单文件组件风格(SFC - Single File Component),可以选择直接引入或全局安装在 Vue App 中。
|
||||
|
||||
## 直接引入(推荐)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user