当前位置:网站首页>三十.什么是vm和vc?
三十.什么是vm和vc?
2022-04-23 20:21:00 【这不比博人传燃?】
(1)什么是vm?什么是vc?
- VueComponent的实例对象,以后简称vc(也可称之为:组件实例对象)。
- Vue的实例对象,以后简称vm。
(2)VueComponent组件的本质是什么?
- school组件本质是一个名为VueComponent的构造函数,且不是程序员定义的,是Vue.extend生成的。
- 我们只需要写或,Vue解析时会帮我们创建school组件的实例对象,即Vue帮我们执行的:new VueComponent(options)。
- 特别注意:每次调用Vue.extend,返回的都是一个全新的VueComponent!!!!
(3)关于this指向:
- vc组件配置中:data函数、methods中的函数、watch中的函数、computed中的函数 它们的this均是【VueComponent实例对象】。
- new Vue(options)即vm配置中:data函数、methods中的函数、watch中的函数、computed中的函数 它们的this均是【Vue实例对象】。
来源:尚硅谷张天禹老师视频,在讲vm和vc的一个重要内置关系时提及到的内容。
版权声明
本文为[这不比博人传燃?]所创,转载请带上原文链接,感谢
https://blog.csdn.net/HSH541/article/details/124342333
边栏推荐
- DNS cloud school | quickly locate DNS resolution exceptions and keep these four DNS status codes in mind
- 网络通信基础(局域网、广域网、IP地址、端口号、协议、封装、分用)
- Mysql database backup scheme
- . Ren -- the intimate artifact in the field of vertical Recruitment!
- Mathematical modeling column | Part 5: MATLAB optimization model solving method (Part I): Standard Model
- Commit and rollback in DCL of 16 MySQL
- R语言ggplot2可视化:ggplot2可视化散点图并使用geom_mark_ellipse函数在数据簇或数据分组的数据点周围添加椭圆进行注释
- 【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
- nc基础用法3
- Cadence Orcad Capture CIS更换元器件之Link Database 功能介绍图文教程及视频演示
猜你喜欢

【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics

PIP installation package reports an error. Could not find a version that satisfies the requirement pymysql (from versions: none)

Numpy mathematical function & logical function

SIGIR'22「微软」CTR估计:利用上下文信息促进特征表征学习

堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
![[talkative cloud native] load balancing - the passenger flow of small restaurants has increased](/img/ba/4ccf0c2181572fed16bbc9c797d557.png)
[talkative cloud native] load balancing - the passenger flow of small restaurants has increased

【PTA】整除光棍

Mysql database backup scheme

Click an EL checkbox to select all questions
随机推荐
How about CICC fortune? Is it safe to open an account
Identification of bolt points in aerial photography based on perception
NC basic usage
Introduction to electron tutorial 3 - process communication
Remote code execution in Win 11 using wpad / PAC and JScript 3
使用 WPAD/PAC 和 JScript在win11中进行远程代码执行3
redis 分布式锁
R language uses the preprocess function of caret package for data preprocessing: BoxCox transform all data columns (convert non normal distribution data columns to normal distribution data and can not
Error reported by Azkaban: Azkaban jobExecutor. utils. process. ProcessFailureException: Process exited with code 127
Redis distributed lock
腾讯邱东洋:深度模型推理加速的术与道
Confusion about thread blocking after calling the read () method of wrapper flow
Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
论文写作 19: 会议论文与期刊论文的区别
DNS cloud school | quickly locate DNS resolution exceptions and keep these four DNS status codes in mind
Some basic configurations in interlij idea
The R language uses the timeroc package to calculate the multi time AUC value of survival data without competitive risk, and uses the confint function to calculate the confidence interval value of mul
Zdns was invited to attend the annual conference of Tencent cloud basic resources and share the 2020 domain name industry development report
What is the difference between a host and a server?
Sqoop imports data from Mysql to HDFS using lzop compression format and reports NullPointerException