在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答
單眼皮 回答

可以用padding代替啊

別逞強 回答

想了一個辦法,但是感覺不是最好的辦法,處理方式如下:
通過遞歸遍歷所有的子節(jié)點,然后根據(jù)后臺傳過來的所選節(jié)點id匹配,判斷該遍歷的節(jié)點id和后臺所選id比較,比較為true就會進行setChecked操作
1、在頁面生命周期的created事件中,執(zhí)行菜單樹的根節(jié)點遍歷方法

created() {
    this.foreachMenuRoot()
},

2、遍歷有兩個坑
2.1、頁面初始化的時候this.$refs.tree還是undefined未定義
2.2、當created將頁面元素加載完成后this.$refs.tree.children菜單樹還沒加載完,所以也是undefined未定義(ps:請求后臺那數(shù)據(jù)會有一定的延遲,樹的數(shù)據(jù)加載過程也會有一定的延遲)

foreachMenuRoot() {
      // 遞歸勾選菜單樹
      const _this = this
      // 由于目前頁面created加載的時候this.$refs.tree樹還未加載完成,所以非空判斷
      if (this.$refs.tree !== undefined && this.$refs.tree.children !== undefined && this.$refs.tree.children !== null) {
        this.$refs.tree.children.forEach(function(node) {
          if (_this.form.menuIds.indexOf(node.id) !== -1) {
            _this.$refs.tree.setChecked(node.id, true, false)
          }
          if (node.children !== undefined && node.children !== null && node.children.length > 0) {
            _this.whileMenuIdsCheckedElTree(node)
          }
        })
        this.formLoading = false
      } else {
        // 由于數(shù)據(jù)未能及時加載完成,做一個定時循環(huán)去執(zhí)行
        setTimeout(() => {
          _this.foreachMenuRoot()
        }, 3000)
      }
    },

3、遞歸遍歷根節(jié)點的葉子節(jié)點

whileMenuIdsCheckedElTree(node) {
      const _this = this
      node.children.forEach(function(cnode) {
        if (_this.form.menuIds.indexOf(cnode.id) !== -1) {
          _this.$refs.tree.setChecked(cnode.id, true, false)
        }
        if (cnode.children !== undefined && cnode.children !== null && cnode.children.length > 0) {
          _this.whileMenuIdsCheckedElTree(cnode)
        }
      })
    }

自己不是專業(yè)的前端工程師,一直都是后端開發(fā),如果有更好的思路和想法歡迎一起探討

神曲 回答

為什么這種問題還沒有被封掉?這里不是給你抱怨的地方,想抱怨麻煩去發(fā)朋友圈。

玩控 回答

回調(diào)函數(shù) https://github.com/ElemeFE/el...

loadFn(this.root, (data) => {
  this.root.doCreateChildren(data);
  this._initDefaultCheckedNodes();
});
默念 回答
arr2 = arr.reduce((cur, next) => {
  return cur.concat(next.children)
}, [])
嫑吢丕 回答

ref="upload" 改為:ref="'upload'+index"試試

小眼睛 回答
監(jiān)聽是你監(jiān)聽的值改變后執(zhí)行
一般監(jiān)聽為 return{}里面的值或是傳進來的值
如果是對象的話想要監(jiān)聽其中的值 var obj = {a:1}
watch: {
    'obj.a' (val) {
      }
}
蟲児飛 回答
In the current implementation apply calls func twice on the first column/row to decide whether it can take a fast or slow code path. This can lead to unexpected behavior if func has side-effects, as they will take effect twice for the first column/row.

refer: http://pandas.pydata.org/pand...

離人歸 回答

安卓調(diào)試需要先自行開啟安卓模擬器

互擼娃 回答

Arraymap,必須return了才返回。
你可以將{}去掉,直接sections.map(v => <Tag>{v.name}</Tag>);

款爺 回答

var reg = new RegExp("[\\u4e00-\\u9fa5]","g");
改成

var reg = new RegExp("[\\u4e00-\\u9fa5]");
苦妄 回答

keydown 換成 keyup 就可以了,

原因:keydown->value 改變->keyup(超過一定間隔沒有 keyup ,會繼續(xù) keydown ),setTimeout 有個最小間隔,導致捕獲到了改變后的 value ,沒有setTimeout 的時候,直接捕獲的是改變前的value,測試戳 demo

冷溫柔 回答

主要是版本沖突,因為是跟著教程做,django版本1.10.6+ python3

任她鬧 回答

換個思路通過忽略文件間接實現(xiàn):單獨弄個文件,把想忽略的內(nèi)容放到里面,使用時代碼中引入文件內(nèi)容,gitignore 這個文件。

陌上花 回答
  1. 動態(tài)創(chuàng)建DOM element,然后替換內(nèi)容。如第一個回答。
  2. 直接修改innerHtml
    var lables = document.querySelectorAll('lable')
    labels.forEach(function (lable) {
      lable.innerHtml = '<div>' + lable.innerHtml + '</div>'
    })
嫑吢丕 回答

不記得有什么屬性可以調(diào)試了
cursor:url(...)可以自定義圖片 試試

舊言 回答

nodejs的Promise沒有pipe方法,所以建議你看看rp的源代碼