新項目啟動躲庄,順便記錄下一些坑沐悦,很多都是沒有仔細(xì)查閱文檔或者文檔說明不清造成的(對新手而言)
使用leancloud javascript sdk需要用catch取error信息
...then(...).catch(function (error) {
console.log(error.code, error.message)
})
element-ui el-input 增加鍵盤響應(yīng)需要加native
@keyup.enter.native='action'
vue-router 子組件默認(rèn)path為空铐达,路徑不能有/
children: [
{
path: '',
componet: xxx
}
]
element el-input 數(shù)字驗證的時候需要去掉 trigger
rule: {
{ required: true, message: '請輸入' },
{ type: 'number', message: '必須是數(shù)字' }
}
leancloud 最坑的number類型查詢
默認(rèn)值只對設(shè)置后新插入的對象才有效,對于老對象只是查詢后加入默認(rèn)值的假象抄瑟。
因此如果根據(jù)默認(rèn)值查詢臭墨,請使用 nurseType = 0 or nurseType is not exists 兩個條件組合查詢。