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

鍍金池/ 問答
遺莣 回答

ajax加載回來之后,再去渲染echarts?不然接口特別慢的話,豈不特別尷尬?看了半天你告訴我那時假的?

嫑吢丕 回答

作用域鏈!

你的代碼可以拆解為:

var a = 1;

var fn = function(){
    var a=3;
    return function(){
       a++;
       alert(a);
    }
}
// 自執(zhí)行過程
var func = fn();

func(); // => 4
func(); // => 5

鏈1:global -> a
鏈2:global -> func -> a

所以 return function 執(zhí)行時,會按這個規(guī)則去找變量a,找到的即是鏈2的!

默念 回答

發(fā)現(xiàn)問題好像是echart的原因,當換了一個示例時可以正常顯示顏色了

脾氣硬 回答

clearInterval() 方法的參數(shù)必須是由 setInterval() 返回的 ID 值。
你這個代碼片段給它傳的是一個function肯定不能清除啊

我甘愿 回答

你還需要修改文字的行高以及行間距;
參考:
https://gist.github.com/glauc...

好難瘦 回答

The main idea is read the file line by line.
Print the line except white space if it has other characters.
You can get the characters using regex, then print it.
An example do it with perl:
cat a.txt | perl -ne 's/^\s*(\S+)\n$/\1 /g;print'
The regex will failed when the line only have white space.

扯機薄 回答

樓主解決了嗎,遇到了同樣的問題

念初 回答

protected-mode yes 改成 no 試試尼

久礙你 回答

開發(fā)環(huán)境下用webpack-dev-server可以跨域是配了proxy Table吧。構建之后node環(huán)境沒了,它也就不能用了。
那就還是cors跨域唄,需要服務端做設置。
另外,代碼能不能運行跟接口能不能跨域是兩回事。

淺淺 回答

(-2) ** 3,語法錯誤不是不友好

入她眼 回答
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
            var list = [{
                "authorityId": 1,
                "authorityName": "數(shù)據(jù)分析",
                "grade": "1001",
                "fatherId": "0"
            },
            {
                "authorityId": 2,
                "authorityName": "商務政策",
                "grade": "1002",
                "fatherId": "0"
            },
            {
                "authorityId": 3,
                "authorityName": "市場動態(tài)",
                "grade": "1003",
                "fatherId": "0"
            },
            {
                "authorityId": 4,
                "authorityName": "消息中心",
                "grade": "1004",
                "fatherId": "0"
            },
            {
                "authorityId": 5,
                "authorityName": "個人中心",
                "grade": "1005",
                "fatherId": "0"
            },
            {
                "authorityId": 6,
                "authorityName": "價格查詢分析",
                "grade": "2101",
                "fatherId": "1001"
            },
            {
                "authorityId": 7,
                "authorityName": "銷量查詢分析",
                "grade": "2102",
                "fatherId": "1001"
            },
            {
                "authorityId": 8,
                "authorityName": "裝備查詢分析",
                "grade": "2103",
                "fatherId": "1001",
            },
            {
                "authorityId": 9,
                "authorityName": "政策數(shù)據(jù)分析",
                "grade": "2201",
                "fatherId": "1002"
            },
            {
                "authorityId": 10,
                "authorityName": "政策原件下載",
                "grade": "2202",
                "fatherId": "1002"
            },
            {
                "authorityId": 11,
                "authorityName": "新車上市",
                "grade": "2301",
                "fatherId": "1003"
            },
            {
                "authorityId": 12,
                "authorityName": "營銷活動",
                "grade": "2302",
                "fatherId": "1003"
            }
        ]

        var data = []


        function loop(list, data, fatherId) {
            list.forEach(item => {
                if (item.fatherId === fatherId) {
                    var child = {
                        label: item.authorityName,
                        grade: item.grade,
                        children: []
                    }

                    loop(list, child.children, item.grade)

                    data.push(child)
                }
            })
        }
        
        loop(list, data, '0')

        console.log(data)

    </script>
</body>
</html>
青黛色 回答

webpack.base.conf.js 中將 path.join(__dirname, '../dist/seo1'), 改為 path.join(__dirname, '../dist'),就行了

女流氓 回答

el-form組件上還有個model屬性……注意看文檔

厭惡我 回答

Vue.use會自動使用對象的install方法,你的install方法在你的 {install, version, xxxx}整個組件庫的對象上,需要整體導入型。單個組件WZtables沒有此方法。
像這種按需加載的引入方式需要單獨使用components: xxVue.component()注冊。

薄荷糖 回答
如果服務器延遲比較大時,請求的數(shù)據(jù)不能及時返回,那么就會出現(xiàn)點擊抽獎按鈕后不能旋轉

為什么不能轉。ajax不是異步的么?

...//轉
$.ajax(...,success:()=>{
    ...
    ...//停
})
清夢 回答

這個使用fly.js無疑是最好的選擇,基本使用與axios相同,fly.js可以在請求攔截器中執(zhí)行異步任務檢查token,具體見官網 fly.js

var csrfToken="";
var tokenFly=new Fly();
var fly=new Fly();
fly.interceptors.request.use(function (request) {
  log(`發(fā)起請求:path:${request.url},baseURL:${request.baseURL}`)
  if (!csrfToken) {
    log("沒有token,先請求token...");
    //鎖定當天實例,后續(xù)請求會在攔截器外排隊,詳情見后面文檔
    fly.lock();
    return newFly.get("/token").then((d) => {
      request.headers["csrfToken"] = csrfToken = d.data.data.token;
      log("token請求成功,值為: " + d.data.data.token);
      log(`繼續(xù)完成請求:path:${request.url},baseURL:${request.baseURL}`)
      return request; //只有最終返回request對象時,原來的請求才會繼續(xù)
    }).finally(()=>{
      fly.unlock();//解鎖后,會繼續(xù)發(fā)起請求隊列中的任務,詳情見后面文檔
    })
  } else {
    request.headers["csrfToken"] = csrfToken;
  }
})
哎呦喂 回答

clipboard.png

因為JSON.stringify 會將對象中值為undefined 和 function的內容丟掉。

如果你想讓JSON.stringify處理后的對象,保留value為function的部分,需要你顯式的增加一個replacer來處理,值為function的對象,即

JSON.stringify({a:function(){return 1}},function(k,v){
if(typeof v == 'function'){
return v.toString()
}
return v
})

這是JSON.stringify的文檔
https://developer.mozilla.org...

萌吟 回答

swiper4的寫法已經換成:

on:{
    slideChangeTransitionEnd: function(){
      alert(this.activeIndex);//切換結束時,告訴我現(xiàn)在是第幾個slide
    },
    touchMove: function(event){
      //你的事件
    }
}

詳情看:Swiper4的API變化

夢囈 回答

有時間修改運行腳本正常,但有時間不正常?

 command: "php /usr/src/myapp/src/push_server.php start"