6以前版本功能,不支持哪些功能
6以前的版本添加了哪些特性,然後又發展了哪些新腳手架,前後端分離帶來哪些新模塊(vue的權限管理)
uni-app安裝vue-cli3
1、安裝指定版本號/在uin-App安裝其他版本無法使用upx/rpx會直接解析成%,現階段只有3.12.1版本可以用
npm install -g @vue/[email protected]
2、創建uni-app vue項目
vue create -p dcloudio/uni-preset-vue my-project (選擇默認模板)
3、在uni-app中使用sass 因爲使用uni-ui需要sass
npm install node-sass --save //先裝依賴
npm install sass-loader --save
在style 標籤中直接使用 lang="scss" 就可以了
我在HbuiderX工具中安裝scss是不可使用的,最後是通過命令行安裝的
4、配置pages.json
Javascript爲數組專門提供了push和pop()方法,以便實現類似棧的行爲。來看下面的例子:
var colors=new Array(); //創建一個數組
var count=colors.push("red","green"); // 推入兩項,返回修改後數組的長度
alert(count); // 2 返回修改後數組的長度
var item=colors.pop(); //取得最後一項
alert(item); // "green"
alert(colors.length); // 1
隊列方法:
結合使用shift()和push()方法,可以像使用隊列一樣使用數組:
var colors=new Array();
var count=colors.push("red","green"); //推入兩項
alert(count); //2
count= colors.push("black"); // 從數組末端添加項,此時數組的順序是: "red", "green" ,"black"
alert(count); //3
var item=colors.shift(); // 取得第一項
alert(item); // "red"
alert(colors.length); //2
從例子中可以看出:
shift()方法:移除數組中的第一項並返回該項
push()方法:從數組末端添加項
若是想實現相反的操作的話,可以使用
unshift()方法:在數組的前端添加項
pop()方法:從數組末端移除項
var colors=new Array();
var count=colors.unshift("red","green");// 推入兩項
alert(count); // 2
count=colors.unshift("black"); // 從數組的前端添加項,此時數組的順序是: "black", "red", "green"
alert(count); //3
var item=colors.pop();
alert(item); // 移除並返回的是最後一項 "green"
由以上的兩組例子,大家可以清晰的看到這兩組方法的用法了。