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

鍍金池/ 問答/ HTML5問答
練命 回答

謝邀。

<div [ngClass]="containerClasses" [ngStyle]="containerStyles">
    <ng-container *ngFor="let opt of options?.children">
         <ng-container *ngIf="opt  && opt.selector && opt.options">
              <component1 *ngIf="opt.selector === 'component1'" [options]="opt.options">            
              </compnent1>
              <component2 *ngIf="opt.selector === 'component2'" [options]="opt.options">            
              </compnent2>
              ...
              <ng-container *ngFor="let subopt of opt.children">
                  <ng-container *ngIf="subopt && subopt.selector && subopt.options">
                      <component3 *ngIf="subopt.selector === 'component3'"[options]="subopt.options">            
                      </compnent3>
                      <component4 *ngIf="subopt.selector === 'component4'" [options]="subopt.options">            
                      </compnent4>
                      ....
                  </ng-container>
              </ng-container>
         </ng-container>
    </ng-container>
</div>
                

以上代碼實現(xiàn)了一個多層動態(tài)組件的container,你需要什么組件,只要把它放到container下面就可以了。
歸根到底,就是維護(hù)一個options的對象。

懶豬 回答

先利用getSetting查看用戶是否授權(quán),沒有的話吊起授權(quán)窗口,現(xiàn)在一般都有button

wx.getSetting({
      success(res) {
        if (!res.authSetting['scope.userLocation']) {
            wx.authorize({
              scope: 'scope.userLocation',
              success(res) {
              }
            })
          }
      }
    })
未命名 回答

寫了一篇 3 的 CLI 的多頁:https://segmentfault.com/a/11...

2 的話,github 搜一下,挺多的,原理類似,要動態(tài)找入口文件、找模板文件

念初 回答
var fd = new FormData(obj);
var blob = dataURItoBlob (base64,'mimeString');
fd.append("file", blob, file.name);

當(dāng)?shù)诙€參數(shù)是blob對象時,第三個參數(shù)如果不傳,默認(rèn)是'blob'
參考MDN - FormData

傻叼 回答

把出錯的設(shè)備,adb連接到電腦,開啟chrome遠(yuǎn)程調(diào)試,審查元素看下樣式。我猜測可能是html標(biāo)簽閉合有問題~

初念 回答

為什么不直接用他的tab組件呢

夕顏 回答

使用ended事件

    var audio = document.getElementById("audio"); 
    audio.loop = false;
    audio.addEventListener('ended', function () {  
        //換地址
    }, false);
茍活 回答

函數(shù) add 接受一個參數(shù),其結(jié)構(gòu)為 {a: number, b:number},返回結(jié)果為 a + b,調(diào)用 add({a: 1, b: 2}),輸出 3。以下是另一種寫,也許更容易明白

interface A {
    a: number;
    b: number;
}
function add(p: A): number {
    return p.a + p.b;
}
苦妄 回答

你添加的時候怎么添加的,你用了數(shù)組的index來做了元素的key,可能導(dǎo)致你添加的10的index和原來的娛樂的index一樣,key換成其他方式試試

過客 回答

沒辦法的,React Native的js引擎和runtime就有這么大。。。這些庫文件同時有x86版本和arm版本,如果你的app不需要在x86處理器(比如華碩的某款手機)上運行,可以裁剪掉x86的庫文件,大概可以縮小個3、4M的樣子,再想減小就不可能了。

尕筱澄 回答

shoppingcartList未定義,你沒有賦值

吃藕丑 回答

是微信還是微信小程序?另外,原生video標(biāo)簽每個瀏覽器都是自己開發(fā)的,所以不一樣,但是一般沒什么人會介意這件事,如果你真的介意,可以自己寫css來保持一致,或者用網(wǎng)上封裝完成的js,比如video.js。
另外,如果你開發(fā)微信小程序的audio標(biāo)簽,你才會知道可怕。

病癮 回答

你兩個option的value綁定了同一個值了啊,大哥

赱丅呿 回答

因為你使用的是./public/****./app/****,它是根據(jù)你的url中的http://localhost/index.php/index/index/index拼接上/public/****或者/app/****`,可以改成/public/****/app/****

遺莣 回答

不要直接放在頁面里面,可以用<iframe src="#">引入,這個我剛剛測試過是可以的,也可以用背景插入,你可以試試

瘋子范 回答

總體思路就是 構(gòu)造一個任務(wù)隊列

class Lazing {
  constructor(item = '') {
    this.queue = [{
        key: 'init',
        val() {
          console.log('hello ' + item)
        }
      }]
  }

  eat(item) {
    this.queue.push({
      key: 'eat',
      val() {
        console.log('eating ' + item)
      }
    })
    return this
  }

  sleep(time) {
    this.queue.push({
      key: 'sleep',
      val: time * 1000
    })
    return this
  }

  sleepFirst(time) {
    this.queue.unshift({
      key: 'sleep',
      val: time * 1000
    })
    return this
  }

  exec() {
    for (let i = 0; i < this.queue.length; i++) {
      let key = this.queue[i]['key']
      let val = this.queue[i]['val']
      if (key === 'sleep') {
        this.queue.shift()
        setTimeout(this.exec.bind(this), val)
        break
      } else {
        val()
        this.queue.shift()
        i--
      }
    }
  }
}

不過調(diào)用方式稍微不一樣些,但能達(dá)到效果

new Lazing('Garry').exec()

new Lazing('Garry').sleep(3).eat('rice').exec()

new Lazing('Garry').eat('rice').eat('bread').exec()

new Lazing('Garry').sleepFirst(3).eat('rice').exec()

new Lazing('Garry').eat('rice').sleepFirst(3).exec()