当前位置:网站首页>三十.什么是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
边栏推荐
- NC basic usage 2
- How to protect ECs from hacker attacks?
- SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
- Click an EL checkbox to select all questions
- NC basic usage
- LeetCode动态规划训练营(1~5天)
- DTMF双音多频信号仿真演示系统
- 中金财富公司怎么样,开户安全吗
- Notes of Tang Shu's grammar class in postgraduate entrance examination English
- [text classification cases] (4) RNN and LSTM film evaluation Tendency Classification, with tensorflow complete code attached
猜你喜欢
Customize timeline component styles
STM32基础知识
Error reported by Azkaban: Azkaban jobExecutor. utils. process. ProcessFailureException: Process exited with code 127
LeetCode动态规划训练营(1~5天)
Modeling based on catiav6
Identification of bolt points in aerial photography based on perception
selenium. common. exceptions. WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
Plato Farm元宇宙IEO上线四大,链上交易颇高
16MySQL之DCL 中 COMMIT和ROllBACK
AQS learning
随机推荐
Use the rolling division method to find the maximum common divisor of two numbers
还在用 ListView?使用 AnimatedList 让列表元素动起来
Commit and ROLLBACK in DCL of 16mysql
Installation and use of NVM
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
JDBC database addition, deletion, query and modification tool class
Redis cache penetration, cache breakdown, cache avalanche
Record: call mapper to report null pointer Foreach > the usage of not removing repetition;
【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
Openharmony open source developer growth plan, looking for new open source forces that change the world!
SQL Server connectors by thread pool 𞓜 instructions for dtsqlservertp plug-in
R语言ggplot2可视化分面图(facet_wrap)、使用lineheight参数自定义设置分面图标签栏(灰色标签栏)的高度
Es keyword sorting error reason = fielddata is disabled on text fields by default Set fielddata = true on keyword in order
Linux64Bit下安装MySQL5.6-不能修改root密码
Azkaban recompile, solve: could not connect to SMTP host: SMTP 163.com, port: 465 [January 10, 2022]
SQL Server Connectors By Thread Pool | DTSQLServerTP 插件使用说明
R language survival package coxph function to build Cox regression model, ggrisk package ggrisk function and two_ Scatter function visualizes the risk score map of Cox regression, interprets the risk
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线、自定义计算交叉点、自定义配置indifference函数的参数丰富可视化效果
Click an EL checkbox to select all questions
Latest investigation and progress of building intelligence based on sati