鍍金池/ 問答/ HTML問答
尤禮 回答

如果你在調(diào)試時開啟了在任何錯誤時暫停,那在這里程序就會跳轉到這里暫停,方便調(diào)試用的。

奧特蛋 回答
  1. 用 watch 獲取值
  2. 用 computer 頁面中展示
敢試 回答

最簡單的,去掉scoped屬性。
還有一些方法可以參考,每種方法都可以:

  • 去掉scoped,上面說了
  • 建立一個公用樣式文件,覆蓋ElementUI的樣式,并全局引入
  • 如果使用了css預處理器,可以了解下深度作用選擇器
  • 通過父選擇器選擇到當前class,然后進行覆蓋
使勁操 回答

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了

憶當年 回答

自己搞環(huán)境坑會比較多,分享一個別人搭好的項目直接拿來用吧,地址

心沉 回答

友盟設置的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);
    }
  }
});

},

解夏 回答

只能輸入兩位小數(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));})()

你好胸 回答

mongoosefind有回調(diào)啊,或者promise寫法。 查到結果了,在回調(diào)里實現(xiàn)業(yè)務邏輯就可以了啊。
參考文檔