vue1.0和vue2.0生命周期----整理一

## 1. 作用域區別
  1.x 隨意的定義作用域
  2.x 不允許body 或者html 元素

## 2. 生命周期
  1.x:
    created 實例已經創建
    beforeCompile 在編譯之前
    compiled 編譯之后
    ready 實例已經插入到文檔之中
    beforeDetroy 在銷毀之前
    destroyed 銷毀之后
  2.x:
    beforeCreate 剛剛創建這個實例 屬性還沒有綁定 this.msg 獲取不到
    created 創建完畢 屬性已經綁定好了 this.msg可以獲取到了
    beforeMount 模版在渲染之前 {{ msg }}
    mounted //ready 渲染之后 hello world
    beforeUpdate //數據更新之前
    updated //數據更新之后
    beforeDestroy 實例化銷毀之前
    destroyed 實例化銷毀之后

## 3. json
    1.x json 如果想顯示 那么就得使用過濾器 json
    2.x 不用過濾器了 直接可以看

## 4. 過濾器
    2.x取消了所有的默認的過濾器
    封裝的方式沒有區別
    1.x
    傳參 uppercase "1" "2"
    2.x
    uppercase('1','2')

## 5. 循環
    1.x 沒有$index $key
    1.x (index,value) in arr
    2.x (value,index) in arr

轉載于:https://www.cnblogs.com/chuanzhou/p/9520153.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/279535.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/279535.shtml
英文地址,請注明出處:http://en.pswp.cn/news/279535.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

21-while里的break簡單用法

break是結束循環,break之后、循環體內代碼不再執行。 while True:yn input(Continue(y/n): )if yn in [n,N]:breakprint(running......) 結果輸出: 轉載于:https://www.cnblogs.com/hejianping/p/10861816.html

視頻造假_如何發現“深造假”面部切換視頻

視頻造假Recently, Reddit has been making news again with a subreddit in w hich people use a machine learning tool called “Deep Fake” to automatically replace one person’s face with another in a video. Obviously, since this is the internet, people are us…

C#實現MD5加密

C#實現MD5加密。 1、創建MD5Str.cs加密處理類 [csharp] view plaincopy public class MD5Str { /// <summary> /// 字符串MD5加密 /// </summary> /// <param name"Text">要加密的字符串</param> /// <returns…

【agc004f】Namori Grundy

那個問一下有人可以解釋以下這個做法嘛&#xff0c;看不太懂QwQ~ Description 有一個n個點n條邊的有向圖&#xff0c;點的編號為從1到n。 給出一個數組p&#xff0c;表明有&#xff08;p1&#xff0c;1&#xff09;&#xff0c;&#xff08;p2&#xff0c;2&#xff09;&#x…

找到特定ip地址 修改ip_您如何找到網站的IP地址?

找到特定ip地址 修改ipWhether you are in it just for a bit of geeky fun, or are seriously wanting to know the answer, how do you find out the IP address for a website? Today’s SuperUser Q&A post looks at the answer, and how to know if more than one we…

Rational Rose 2003 下載、破解及安裝方法(圖文)

方法一&#xff1a; 1、安裝Rational Rose2003時&#xff0c;在需選擇安裝項的時候&#xff0c;只選擇Rational Rose EnterPrise Edition即可&#xff0c;不需選擇其他項&#xff0c;之后選擇“DeskTop Installation from CD Image“&#xff0c;一路下一步。出現Mem_pointer_B…

數據結構:莫隊

莫隊算法是用來處理一類無修改的離線區間詢問問題 莫隊的精髓就在于&#xff0c;離線得到了一堆需要處理的區間后&#xff0c;合理的安排這些區間計算的次序以得到一個較優的復雜度 代表題目是BZOJ2038這道題 進行區間詢問[l,r]&#xff0c;輸出該區間內隨機抽兩次抽到相同顏色…

【學習筆記】第三章 python3核心技術與實踐--Jupyter Notebook

可能你已經知道&#xff0c;Python 在 14 年后的“崛起”&#xff0c;得益于機器學習和數學統計應用的興起。那為什么 Python 如此適合數學統計和機器學習呢&#xff1f;作為“老司機”的我可以肯定地告訴你&#xff0c;Jupyter Notebook &#xff08;https://jupyter.org/&…

二進制安位處理_處理器與安??全性之間的聯系是什么?

二進制安位處理Newer processors are able to contribute to the security of your system, but what exactly do they do to help? Today’s Super User Q&A post looks at the link between processors and system security. 較新的處理器能夠為您的系統安全做出貢獻&am…

李開復現身說法成功的十個啟發

http://blog.sina.com.cn/kaifulee自信不失謙虛&#xff0c;謙虛不失自信天賦就是興趣 興趣就是天賦思考比傳道重要 觀點比解惑重要我不同意你 但我支持你挫折不是懲罰 而是學習的機會創新不重要 有用的創新才重要完美的工作 成長興趣 影響力用勇氣改變可以改變的事情做最好的領…

關于width: 100%的一些看法

一.position對width 設置為百分比的影響<html><head><style type"text/css">img {width: 50%}body {margin: 8px;}</style> </head><body><div style" min-height: 10px; background: red; "><div><im…

Haproxy+多臺MySQL從服務器(Slave) 實現負載均衡

本系統采用MySQL一主多從模式設計&#xff0c;即1臺 MySQL“主”服務器(Master)多臺“從”服務器(Slave)&#xff0c;“從”服務器之間通過Haproxy進行負載均衡&#xff0c;對外只提供一個訪問IP&#xff0c;當程序需要訪問多臺"從"服務器時&#xff0c;只需要訪問Ha…

愛普生第三方相機_值得購買第三方相機鏡頭嗎?

愛普生第三方相機When people buy a Canon or Nikon camera, they often assume that they can only buy Canon or Nikon lenses. But that isn’t true. While Nikon lenses won’t work on your Canon camera, there are third-party lens manufacturers—such as Sigma, Tam…

[BZOJ4182]Shopping

description 權限題。 樹上\(n\)個節點每個節點都有一種物品&#xff0c;每種物品有其價值&#xff0c;價格&#xff0c;數量&#xff0c;只能買一個連通塊中的物品&#xff0c;求\(m\)元能買到物品價值的最大值。 data range \[ n\le 500,m\le 4000,T\le 5,c_i\le m\] solutio…

如何用 Flutter 實現混合開發?閑魚公開源代碼實例

2019獨角獸企業重金招聘Python工程師標準>>> 具有一定規模的 App 通常有一套成熟通用的基礎庫&#xff0c;尤其是阿里系 App&#xff0c;一般需要依賴很多體系內的基礎庫。那么使用 Flutter 重新從頭開發 App 的成本和風險都較高。所以在 Native App 進行漸進式遷移…

Silverlight之工具箱使用1

我們在開發Silverlight項目時必定需要使用VS自帶的一些控件&#xff0c;但是這些有限的控件有時候難以滿足開發時的需求&#xff0c;因此MS給我們大家提供另外一套工具&#xff0c;來緩解Silverlight開發包的不足。此工具箱免費下載地址是&#xff1a;http://silverlight.codep…

apple tv設置_如何設置Apple HomePod

apple tv設置Apple’s HomePod smart speaker is finally here. If you bought one and are eager to get going, here’s how to set it up. 蘋果的HomePod智能揚聲器終于來了。 如果您購買了一個并且渴望上手&#xff0c;請按照以下步驟進行設置。 First off, before you eve…

leetcode 128最長連續序列

方法一&#xff1a;使用快排&#xff1a; //排序法&#xff0c;時間O(nlogn)&#xff0c;使用STL&#xff0c;只是驗證一下思想&#xff0c;非正解&#xff1b; class Solution { public:int longestConsecutive(vector<int>& nums) {sort(nums.begin(),nums.end());…

8月19學習練習[兩三個TableView并排顯示]

要求&#xff1a;在一個view中顯示兩個tableView&#xff0c;要求左右顯示的內容以及行數不一樣&#xff0c;且左邊每行顯示兩張圖片&#xff08;分別3個一輪回&#xff0c;2個一輪回&#xff09;并且顯示中國的城市名&#xff0c;右邊顯示水果名。點擊時分別顯示城市名或水果名…

word多級列表創建目錄_如何在Microsoft Word中創建和使用多級列表

word多級列表創建目錄Microsoft Word lets you easily create and format multilevel lists in your documents. You can choose from a variety of formatting options, including bulleted, numbered, or alphabetized lists. Let’s take a look. Microsoft Word使您可以輕松…