📜  vue 挂载 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:06.741000             🧑  作者: Mango

代码示例2
created() : since the processing of the options is finished you have access to reactive data properties and change them if you want. At this stage DOM has not been mounted or added yet. So you cannot do any DOM manipulation here

mounted(): called after the DOM has been mounted or rendered. Here you have access to the DOM elements and DOM manipulation can be performed for example get the innerHTML: