提交 a55425e6 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

docs(vue3): component uni-app x compatibility

上级 0d0cb259
......@@ -248,7 +248,7 @@
<view>{{age}}</view>
</view>
</template>
<script>
<script lang="uts">
export default {
props: {
// 检测类型 + 其他验证
......@@ -265,6 +265,8 @@
</script>
```
:::
```html
<template>
<view>
......@@ -274,9 +276,6 @@
</template>
```
### 传递静态或动态的 Prop
......@@ -422,7 +421,7 @@
<view>{{myTitle}}</view>
</view>
</template>
<script>
<script lang="uts">
export default {
props: {
title: {
......@@ -438,6 +437,8 @@
</script>
```
:::
```html
<template>
<view>
......@@ -492,7 +493,7 @@
<view>{{normalizedSize}}</view>
</view>
</template>
<script>
<script lang="uts">
export default {
props: {
size: {
......@@ -508,6 +509,8 @@
</script>
```
:::
```html
<template>
<view>
......@@ -628,6 +631,8 @@
}
```
:::
`prop` 验证失败的时候,(开发环境构建版本的) `Vue` 将会产生一个控制台的警告。
**tips**
......@@ -704,7 +709,7 @@
</view>
</template>
<script>
<script lang="uts">
export default {
props: {
postTitle: {
......@@ -715,6 +720,8 @@
</script>
```
:::
```html
<template>
<view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册