From 707c2740486de56925151ff9582e6c5b38d7e4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E7=BA=A2=E4=BF=9D?= Date: Fri, 11 Feb 2022 18:31:56 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E5=BC=95=E7=94=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/tutorial/page-component.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/page-component.md b/docs/tutorial/page-component.md index 5c02f1fa0..86271b4a9 100644 --- a/docs/tutorial/page-component.md +++ b/docs/tutorial/page-component.md @@ -1 +1,24 @@ -#### 页面引用组件 \ No newline at end of file +传统vue项目开发,引用组件需要`导入 - 注册 - 使用`三个步骤,如下: + + +
+ +
+ +Vue 3.x增加了`script setup`特性,将三步优化为两步,无需注册步骤,更为简洁: + + +
+ +
+ +`uni-app`的`easycom`机制,将组件引用进一步优化,开发者只管引用,无需考虑导入和注册,更为高效: + + +
+ +
+ +在 uni-app 项目中,页面引用组件和组件引用组件的方式都是一样的(可以理解为:页面是一种特殊的组件),均支持通过 `easycom` 方式直接引用。 + +easycom 规范详细介绍,参考:[easycom](/collocation/pages.html#easycom) \ No newline at end of file -- GitLab