vue 在methods中調用mounted中的方法?


首先可以在data中先聲明一個變量

比如 sureDelBox : ' '

mounted 中 ---> 

methods 中 --->  this.sureDelBox(item) 直接this調用 

這時候要傳的參數別忘記帶上

如果你要問在mounted中調用methods中的方法 

那么如果是我  我會直接把這個方法直接寫在mounted中

over

轉載請注明出處  阿里嘎多~~~

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM