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

鍍金池/ 問答/ HTML問答
我不懂 回答

1.
it('test some async function', done => {...})
你可以傳入done函數(shù),當(dāng)異步結(jié)束完最后調(diào)用done,這樣就可以定義運(yùn)行順序了。
async函數(shù)就不用傳入done了,自己用await控制好就行

如果要定義不同文件之間的運(yùn)行順序,比如A要在B之前,只需在B的第一行加上require('./A')即可

2.
這個可以自己定義變量來控制順序的吧。?;蛘呖梢钥纯磎ocha的官方文檔

3.
before(() => {...})
在before函數(shù)里定義單測之前要執(zhí)行的函數(shù),一個比較好的實(shí)踐方式就是,先刪庫,再跑單測。
如果要準(zhǔn)備數(shù)據(jù),可以專門寫一個prepare.js,然后在單測文件的第一行require('./prepare')即可。

臭榴蓮 回答

其實(shí)你可以直接將其display:none隱藏的,用label for id 來綁定input,點(diǎn)擊label來控制 radio

input[type="radio"]{
   opacity: 0;
}
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="normalize.css"/>
        <style type="text/css">
           input[type="checkbox"]:checked+label:after{
                  content: '\2714';
                  background-color: #ff5757;
                  color: #FFF;
                  border-color: #ff5757; 
           } 
           input[type="checkbox"]{
               display: none;
           }
           label:after{
               content: '';
               position: absolute;
               left: 0;
               top: 0;
               width: 18px;
               height: 18px;
               border: 1px solid #CCC; 
               box-sizing: border-box;
               line-height: 18px;
               text-align: center;
               border-radius: 3px;
            font-size: 14px;                
               
           }
           label{
               position: relative;
               padding-left: 25px;
               box-sizing: border-box;
               line-height: 20px;
               font-size: 14px;
               height: 20px;
           }
           #top{
               margin: 100px;
           }
           input[type="checkbox"]:checked ~ img{
               transform: translateX(500px);
           }
           #img{
               transition: all 1s; 
           }
        </style>
    </head>
    <body>
    <div id="top">
            <input type="checkbox" id="mycheck"/>
            <label for="mycheck">噓噓噓噓噓</label>
            <img src="2.jpg" id="img" alt="" />
    </div>    
    </body>
</html>
失心人 回答

data中的name是用來表示系列名的,label是餅圖圖形上的文本標(biāo)簽,可用于說明圖形的一些數(shù)據(jù)信息,結(jié)合formatter就可以實(shí)現(xiàn)你要的效果,其中的模板變量{c}表示的是數(shù)據(jù)值

option = {
    color:['#fecb5e','#ef7a82','#36d1bb','#fa8c35','#27aaf3'],
    series: [
        {
            type:'pie',
            radius: ['30%', '70%'],
            avoidLabelOverlap: false,
            itemStyle: {
                normal: {
                    borderColor: '#fff',
                    borderWidth: '2'
                },
                emphasis: {
                    borderColor: '#fff',
                    borderWidth: '2'
                }
            },
            label: {
                normal: {
                    show: true,
                    formatter: '{c}%',
                    position: 'inner',
                    textStyle: {
                        fontSize: '9'
                    }
                },
                emphasis: {
                    show: true,
                    textStyle: {
                        fontSize: '9'
                    }
                }
            },
            data:[
                {value:5},
                {value:20},
                {value:30},
                {value:30},
                {value:15}
            ]
        }
    ]
};

圖片描述

空痕 回答

正確的寫法應(yīng)該為:

this.showDeleteConfirm(function () { console.log('aaaa') })

showDeleteConfirm() 接受參數(shù)的是函數(shù)。你這樣寫,console.log('aaaa') 作為一個表達(dá)式,當(dāng)然會直接執(zhí)行。

菊外人 回答

不糾結(jié)了,直接在publicPath這個參數(shù)那,手寫完整的絕對路徑,用“/”的絕對路徑替換坑爹的“\"。。先就這樣吧

乞許 回答

/index最后的這個是啥?你只需要加載.html文件,所有的路由交給vue來解決,加載地址不要帶路由信息。

枕頭人 回答

光這個看不出問題啊.....

不討囍 回答

你可以改成

var add = (function() {
    var counter = 0;

    return function() {
        counter += 1;
        console.log(counter)
    }

});

add()();
add()(); //輸出結(jié)果為1

首先add是一個立即執(zhí)行函數(shù)表達(dá)式,在f1函數(shù)作用域里創(chuàng)建了變量counter,然后在f2的函數(shù)作用域上訪問了f1詞法作用域下的counter(就是所謂的閉包),一直訪問的都是那一個。

var add=(function f1(){
        var counter=0;
        
        return function f2(){
        counter+=1;
        }
        
        })();
        
add();
add();//輸出結(jié)果為2
鐧簞噯 回答

按照道理是在事件內(nèi)部調(diào)用你的查詢方法,一般此方法是異步的,你可以傳入回調(diào)函數(shù),來通知事件繼續(xù)廣播

socket.on('xx', function() {
    getDb(function(db) {
       socket.brocast('xxx', db) //抱歉,廣播單詞不會拼 
    })
})

//getDb

function getDb(fn) {
    // 查詢操作
    fn(err, db)
}
胭脂淚 回答

Android系統(tǒng)基于Linux,這樣的話其具備Linux的大多數(shù)特性,Android Native 內(nèi)存可以用查看adb shell 然后通過ps 命令查看。
看下這里有沒有你需要的答案?https://blog.csdn.net/typenam...

默念 回答

柱形圖 series里面的數(shù)據(jù) 屬性必須是data 坑 絕對的坑 之前踩過 好沮喪

厭遇 回答
new webpack.ProvidePlugin({
  Component: ['react', 'Component'],
  connect: ['react-redux', 'connect'],
})

可以認(rèn)真看一下官方文檔

墨沫 回答

自己回答一下,自己采納一下,也可以采納我這個回答

不歸路 回答
const getNewArray = (data) => {
    let newArray = [[],[]];
    data.forEach((val) => {
        if (val.fieldName === "會議介紹") {
            newArray[1].push(val)
        } else {
            newArray[0].push(val)
        }
    })

    return newArray
}
getNewArray(data)
執(zhí)念 回答

hmmm,可以計(jì)算當(dāng)前頁面需要的頁數(shù)n,搞n個iframe,每個iframe加載同樣的頁面,但是自動定位到不同的位置來模擬這個需求。。。
下面代碼可以在當(dāng)前頁的控制臺中執(zhí)行

(()=>{
    try{document.getElementById("print-view").remove();}catch(e){}
    
    var pageHeight = 400;
    var pageWidth = 1024;
    
    var content = document.body.innerHTML;
    var bgColor = document.body.style.backgroundColor;
    var printViewContainer = document.createElement("div");
    printViewContainer.id="print-view";
    printViewContainer.style=`width:${pageWidth}`;
    document.body.appendChild(printViewContainer);
    printViewContainer.innerHTML = content;
    
    var totalHeight = printViewContainer.clientHeight;
    var totalPages = Math.ceil(printViewContainer.clientHeight * 1.0 / pageHeight);
    printViewContainer.innerHTML = "";

    printViewContainer.style=`background-color:#4e4e4e;position:absolute;width:${pageWidth+80}px;padding:40px;box-shadow:0 0 4px black;left:50%;margin-left:-${pageWidth/2}px;margin-top:20px;margin-bottom:20px;top:40px;z-index:100;`;
    for(let i=0;i<totalPages;i++){
        let div = document.createElement("div");
        let innerContainer = document.createElement("iframe");
        div.style = `margin:20px 10px;border:1px solid #9e9e9e;box-shadow:0 2px 3px gray;position:relative;overflow:hidden;height:${pageHeight}px;background-color:${bgColor};width:${pageWidth}px;`;
        let offsetTop = i * pageHeight;
        innerContainer.width = pageWidth;
        innerContainer.height = pageHeight;
        innerContainer.src = window.location.href;
        innerContainer.style="border:none;";
        innerContainer.scrolling = "no";
        if(pageHeight * i + pageHeight > totalHeight){
            innerContainer.height = totalHeight - pageHeight * i;
        }
        innerContainer.onload = function(){
            innerContainer.contentWindow.scrollTo(0,pageHeight * i);
        };
        div.appendChild(innerContainer);
        printViewContainer.appendChild(div);
    }
})();
放開她 回答

你用的是什么庫?仔細(xì)看下文檔,看什么偵聽轉(zhuǎn)換結(jié)束的事件,或者應(yīng)該寫哪些內(nèi)容。從你的代碼里看不出。

拽很帥 回答

看路由設(shè)置情況,是否攔截狀態(tài);
還有 接受返回值狀態(tài)是否有攔截,做了加載處理