如果你在調(diào)試時開啟了在任何錯誤時暫停,那在這里程序就會跳轉到這里暫停,方便調(diào)試用的。
最簡單的,去掉scoped
屬性。
還有一些方法可以參考,每種方法都可以:
1、只要“||”前面為false,無論“||”后面是true還是false,結果都返回“||”后面的值。
2、只要“||”前面為true,無論“||”后面是true還是false,結果都返回“||”前面的值。
3、只要“&&”前面是false,無論“&&”后面是true還是false,結果都將返“&&”前面的值;
4、只要“&&”前面是true,無論“&&”后面是true還是false,結果都將返“&&”后面的值;
beforeEach vue路由中的全局守衛(wèi)鉤子函數(shù) 傳三個參數(shù),我就不一一解釋了
to: Route: 即將要進入的目標 路由對象
next() 一定要調(diào)用該方法來 resolve 這個鉤子,才能往下執(zhí)行.
nextRoute.indexOf(to.name) 的意思就顯而易見了啊
即將進入的路由對象name是否包含于nextRouter數(shù)組中,包含 next()就ok了
友盟設置的COOKIE
CNZZDATA是CNZZ統(tǒng)計的cookie么人,而CNZZ數(shù)據(jù)統(tǒng)計被友盟收購,所以UM_xxx是友盟的cookie。
請描述清楚,哪里運行save()
取不到值了,現(xiàn)在看不出問題。
元素上bindtap方法:(選擇圖片)
chooseImgHandler: function (e) {
var that = this;
that.count_img = count_img; //允許上傳的圖片數(shù)目
if (that.isGoing) return;
that.isGoing = true;
if (count_img) {
wx.chooseImage({
count: count_img,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: function (res) {
var tempFilePaths = res.tempFilePaths;
wx.showLoading();
that.uploadimg(tempFilePaths);
},
fail: function () {
// App.serverErrorTip("圖片選擇失敗...");
that.isGoing = false;
}
})
} else {
App.serverErrorTip('已達到上傳圖片上限啦~');
that.isClicking = false;
}
},
//拿到用戶選擇的圖片的臨時文件路徑數(shù)組以后,循環(huán)上傳到自己的服務器
//上傳多圖
uploadimg: function (data) {
var that = this,
zero = 0,
i = data.i ? data.i : zero,
success = data.success ? data.success : zero,
fail = data.fail ? data.fail : zero,
count_img = that.count_img;
wx.uploadFile({
url: '自己服務器的地址',
filePath: data[i],
name: 'file',
formData: {服務器需要接受的參數(shù)},
success: function (resp) {
if (resp.statusCode == 200) {
if (!resp.data || resp.data.indexOf("errcode") != -1) {
var msg = "";
try {
var json = eval("(" + resp.data + ")");
msg = '上傳圖片失敗:' + json.errmsg;
} catch (e) {
msg = '上傳圖片失敗'
}
that.wetoast.toast({
title: msg,
duration: 3000
})
fail++;
wx.hideLoading();
} else {
//成功后的回調(diào)
//自己的事件方法
that.count_img = count_img;
if (i == (data.length - 1)) {
wx.hideLoading();
}
}
} else {
if (i == (data.length - 1)) {
wx.hideLoading();
}
App.serverErrorTip('上傳圖片失敗');
}
},
fail: function (res) {
fail++;
if (i == (data.length - 1)) {
wx.hideLoading();
}
},
complete: function () {
i++;
if (i == data.length) { //當圖片傳完時,停止調(diào)用
console.log('執(zhí)行完畢');
console.log('成功:' + success + " 失?。? + fail);
that.isClicking = false;
} else {//若圖片還沒有傳完,則繼續(xù)調(diào)用函數(shù)
data.i = i;
data.success = success;
data.fail = fail;
that.uploadimg(data);
}
}
});
},
this.name可以直接拿到。
頁面上直接寫{{name}}
只能輸入兩位小數(shù),又可以匹配到0.1 這明細就矛盾。你還不如把全部需求寫出來
一:不要寫行內(nèi)樣式,權重太高,CSS就影響不到了。
二:用css 就能解決
<style>
#parent{
height: 50px;
background: red;
}
#son{
height: 30px;
background: blue;
}
#parent:hover{
height: 200px;
}
#son:hover #parent{
height: 200px;
}
</style>
function say(){
console.log('hi')
}
class Dog{
constructor(name){
this.name = name
}
say(){
return say()
}
}
new Dog('tom').say()
btn.onclick=st() 就相當于
document.getElementById('btn').onclick = function(){
alert("sd")
}
vue文件中css是寫在組件內(nèi)好,寫在組件內(nèi)的style標簽里加上scope可以作為組件樣式,不會影響其他組件,單獨寫在.css文件中再import進組件就是全局樣式。
拆分的話看你實際情況,看看2000多行時候會不會影響后續(xù)維護(如果需要維護的話),如果影響的話,就以提高可讀性可維護性為目的來進行拆分
這里的路由不是這樣寫吧
goIndex:function (){
this.$router.push({
path: '/'
})
}
vue-router
是針對單頁應用的
你這都是html
直接 a
標簽跳轉 或者 window.location.href
跳轉就行了
(async ()=>{console.log(await getInto(id));})()
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構,發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構,是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術, 熟練的跨平臺面向對象開發(fā)經(jīng)驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構師,美國AngelEngineers Inc. 系統(tǒng)架構師。