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

鍍金池/ 問答/ HTML問答
安于心 回答

404 表示資源不存在,這得看你接口后臺(tái)請(qǐng)求的數(shù)據(jù)是否存在,或者看接口是否可用。
看圖片是get請(qǐng)求,直接把URL放在瀏覽器地址欄請(qǐng)求下試試。

安淺陌 回答

在切換模型加載第二個(gè)模型的時(shí)候,需要對(duì)容器進(jìn)行清空。
document.getElementById('domId').innerHTML="";
這樣就可以切換模型。

我以為 回答

版本 65.0.3315.3(正式版本)dev (64 位) , Ubuntu 16.04

沒有你說的問題。

毀了心 回答

xxx.com?a=xx&b=yy
前端可以根據(jù)url內(nèi)的a或者b獲取相應(yīng)的xx或yy

厭遇 回答

那已經(jīng)提示你了:is-extglob 這個(gè)文件沒有寫權(quán)限,猜測(cè)可能是此路徑上某個(gè)文件夾沒有權(quán)限,導(dǎo)致無法創(chuàng)建此文件

乞許 回答

動(dòng)態(tài)import返回的是一個(gè)對(duì)象,根據(jù)你forget組件的export方式,可以從對(duì)象上獲取到你的組件。
比如你的組件時(shí)用export default導(dǎo)出的,那么組件就可以從default屬性上獲取到。

另外動(dòng)態(tài)import是異步的,因此你不能直接這么用。需要使用一個(gè)組件去占住那個(gè)位置,然后在這個(gè)組件真正加載的時(shí)候,通過componentDidMount這個(gè)鉤子去import這個(gè)組件。

關(guān)鍵部分的代碼大概這樣,記得加上loading動(dòng)畫這些加載期間的提示

clipboard.png

寫榮 回答

slice如果不傳入?yún)?shù)會(huì)返回一個(gè)淺拷貝數(shù)組副本。
call的作用是用document.getElementsByTagName("*")作為slice方法中的this調(diào)用一次slice方法;從而把dom列表轉(zhuǎn)換成真正的Array

萢萢糖 回答

我完全復(fù)制粘貼了你的代碼。。并沒有發(fā)生你所截圖的情況。

clipboard.png

另外 你這注釋的方式。。在template里不是應(yīng)該遵循h(huán)tml的注釋方式么。你看我這圖里你的注釋都被當(dāng)成text輸出了。所以你這構(gòu)建環(huán)境具體怎么樣的和vue版本、package乃至開發(fā)工具都最好貼出來給大家參詳 避免玄學(xué)問題。。

糖果果 回答

history
history.pushState , history.replaceState修改歷史記錄
history.popstate監(jiān)聽歷史記錄

傲寒 回答

babel 轉(zhuǎn)為ES5的代碼吧
babel

任她鬧 回答

默認(rèn)情況下,我們只需要將靜態(tài)資源放在一下幾個(gè)目錄中就可以直接通過url在瀏覽器中訪問了。

  • /META-INF/resources/
  • /resources/
  • /static/
  • /public/

比如再static下放login.html,則可以直接通過 http://localhost:8080/login.html 訪問

可以下載代碼示例自己debug:https://gitee.com/skyarthur19...

帥到炸 回答

html讀取是自上而下的,建議先加載css層疊樣式文件再加載js文件,這樣即使網(wǎng)慢的時(shí)候也會(huì)先顯示出大體輪廓,如果先加載js則會(huì)影響頁面樣式。

卟乖 回答

clipboard.png
本質(zhì)是這個(gè)。
既然jquery沒有捕獲的實(shí)現(xiàn),我們自己實(shí)現(xiàn)一個(gè)。代碼如下

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <!--換成你自己jquery的地址-->
    <script src="jquery-1.12.4.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="xx" style="height:200px;background:green;">
        <div id="yy" style="position:relative;top:50px;height:100px;background:red;"></div>
    </div>
    <script>
        (function(debug){
            // 用WeakMap省的dom被移除了還持有引用無法gc
            const listeners = new WeakMap();
            // core
            const capture = (elem,type,callback,once=false) => {
                // 看看有沒有這個(gè)dom,避免重復(fù)注冊(cè)
                if(!listeners.has(elem)){
                    listeners.set(elem,new Map());
                    // https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget/addEventListener
                    elem.addEventListener(type,fnCenter,{
                        capture:true,
                        once,
                    });
                }
                const map = listeners.get(elem);
                // 看看有沒有這個(gè)type的事件被注冊(cè)
                if(map.has(type)){
                    map.get(type).push(callback);
                }else{
                    map.set(type,[callback]);
                }
            };
            
            // 所有注冊(cè)都用同一個(gè)函數(shù)引用,方便解除
            const fnCenter = function(event){
                // currentTarget和target的區(qū)別參見mdn
                const {currentTarget,type} = event;
                // currentTarget,type就是找到回調(diào)的兩把鑰匙
                if(listeners.has(currentTarget) && listeners.get(currentTarget).has(type)){
                    const callbacksArray = listeners.get(currentTarget).get(type);
                    // 循環(huán)執(zhí)行回調(diào)們
                    callbacksArray.forEach(callback=>callback(event));
                }else{
                    //找不到么應(yīng)該有問題,你可以選擇在此拋出錯(cuò)誤或者警告或者移除注冊(cè)
                }
            }
            
            // 卸載
            const remove = (elem,type) => {
                // 看看注沒注冊(cè)過,沒注冊(cè)過就退出
                if(!listeners.has(elem)){
                    return false;
                }
                // 沒寫type全移除,寫了type,只移除這個(gè)類型的
                if(!type){
                    listeners.delete(elem);
                }else{
                    const map = listeners.get(elem);
                    map.delete(type);
                }
                elem.removeEventListener(type,fnCenter);
            }
            
            // 注冊(cè)到j(luò)Query的原型上去
            // 監(jiān)聽捕獲
            $.fn.capture=function(type,callback){
                // this is a jQuery Object
                if(!this.length){
                    throw new Error("沒有有效的selector")
                }
                for(let i=0;i<this.length;i++){
                    const dom = this.get(i);
                    capture(dom,type,callback);
                }
            };
            // 僅監(jiān)聽一次捕獲
            $.fn.captureOnce=function(type,callback){
                // this is a jQuery Object
                if(!this.length){
                    throw new Error("沒有有效的selector")
                }
                for(let i=0;i<this.length;i++){
                    const dom = this.get(i);
                    capture(dom,type,callback,true);
                }
            };
            // 解除監(jiān)聽
            $.fn.removeCapture=function(type){
                // this is a jQuery Object
                if(!this.length){
                    throw new Error("沒有有效的selector")
                }
                for(let i=0;i<this.length;i++){
                    const dom = this.get(i);
                    remove(dom,type);
                }
            };
            
            if(debug){
                window.listeners = listeners;
            }
            
        })(true);
        
        // 實(shí)驗(yàn)
        $("#xx").capture("click",function(e){
            alert("父");
        });
        $("#yy").capture("click",function(e){
            alert("子");
        });
    </script> 
</body>
</html>

效果如下

clipboard.png

孤酒 回答

Component的實(shí)例方法selectComponent,可以通過它找到子組件實(shí)例,然后調(diào)用子組件的方法。例如:

<countdown id="countdown" />
onReady() {
    this.countdown = this.selectComponent('#countdown');
    this.countdown.start();
}
久舊酒 回答

你是想要獲取到所有的 children 下面的 id?

function funEach(data){
    var arr = new Array();                //    準(zhǔn)備空數(shù)組存放
    /*    第一層是索引數(shù)組 */
    for(var i = 0;i < data.length;i++){
        /*   該判斷通過,說明下面具有值     */
       if(data[i]['children'][0] != undefined){
           var l = data[i]['children'][0];            //    準(zhǔn)備個(gè)臨時(shí)變量
           for(var iOne = 0;iOne < l.length;i++){
               arr[] = l['id'];
           }
       }
    }
    return arr;
}

嗯,按我邏輯來想的話應(yīng)該是沒問題的。

念舊 回答

在app.js中還沒有給globalData賦值時(shí)卻提前跳轉(zhuǎn)到了調(diào)用globalData數(shù)據(jù)的頁面,所以導(dǎo)致渲染失敗,試著做個(gè)引導(dǎo)或加載頁面,給數(shù)據(jù)一個(gè)緩沖的過程。

rem布局需要引入一個(gè)自調(diào)用函數(shù)(網(wǎng)易的做法)

(function(doc, win) {

    var docEl = doc.documentElement,

        isIOS = navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),

        dpr = isIOS ? Math.min(win.devicePixelRatio, 3) : 1,

        dpr = window.top === window.self ? dpr : 1, //被iframe引用時(shí),禁止縮放

        dpr = 1,

        scale = 1 / dpr,

        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';

    docEl.dataset.dpr = dpr;

    var metaEl = doc.createElement('meta');

    metaEl.name = 'viewport';

    metaEl.content = 'initial-scale=' + scale + ',maximum-scale=' + scale + ', minimum-scale=' + scale;

    docEl.firstElementChild.appendChild(metaEl);

    var recalc = function() {

        var width = docEl.clientWidth;

        if (width / dpr > 750) {

            width = 750 * dpr;

        }

        // 乘以100,px : rem = 100 : 1

        docEl.style.fontSize = 100 * (width / 750) + 'px';

    };

    recalc()

    if (!doc.addEventListener) return;

    win.addEventListener(resizeEvt, recalc, false);

})(document, window);

處理后100px = 1rem;

吢涼 回答

to: object
An object that can have any of the following properties:
pathname: A string representing the path to link to.
search: A string represenation of query parameters.
hash: A hash to put in the URL, e.g. #a-hash.
state: State to persist to the location.
https://reacttraining.com/rea...

鹿惑 回答

試試在mounted生命周期函數(shù)里面獲取。

悶油瓶 回答

字母數(shù)字是基線對(duì)齊,漢字是底線對(duì)齊,四線=》底線、基線、中間線、頂線,有點(diǎn)類似于四線三格。你可以對(duì)比一下英文'good'和中文’好‘。