docs: optimize docs about SFC (#4897)

This commit is contained in:
XieZongChen 2023-06-05 11:24:23 +08:00 committed by GitHub
parent f00d90cdef
commit 5cb5881fce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -2,7 +2,7 @@
# 在 SFC 中使用
你可以选择直接引入或全局安装在 Vue App 中。
如果想使用单文件组件风格SFC - Single File Component可以选择直接引入或全局安装在 Vue App 中。
## 直接引入(推荐)