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

鍍金池/ 問答/ HTML問答
熊出沒 回答

你把HTML代碼貼出來和把業(yè)務(wù)邏輯說明白,比看你寫的代碼好理解得多。

單眼皮 回答
https://github.com/anran758/F...

試試這個..


經(jīng)評論區(qū)小伙伴提醒..對小數(shù)點進(jìn)行了容錯,正則只取整數(shù)部分..

function numberWithCommas(n) {
  // 正則解釋: 匹配到 \B(非單詞邊界)后, 后面要匹配到 (\d{3})+(?!\d)
  // (\d{3})+ 至少匹配到一次或多次三個數(shù)字
  // (?!\d) 同時后面不是數(shù)字的話, 就匹配.

  // 注意, 后面的(?=)那一段代碼只是判斷的規(guī)則, 匹配到后只替換掉\B
  // 而\B 元字符匹配的是非單詞邊界

  let num = n.toString().split('.');
  num[0] = num[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  return num.join('.');
}

console.log(numberWithCommas(12345678912.1234))    // "12,345,678,912.1234"
吢涼 回答

你試下這個例子:
html:

<div>
    <video ref="video" width="320" height="320" autoplay></video>
    <input type="button" style="width:100px;height:35px;" value="拍 照" @click="takePhoto"/>
</di>
    <canvas style="" ref="canvas" width="320" height="320"></canvas>
</div>

主要的js:

getVideo(){
   this.$nextTick(() => {           
                    
        var video = this.$refs.video;  //這個對應(yīng)的是ref屬性
        var videoObj = { "video": true };

        navigator.mediaDevices.getUserMedia(videoObj)
        .then(function(mediaStream) { 
            video.srcObject = mediaStream;
            video.play();
            })
        .catch(function(error) {
            console.log(error);
        })

   })
},
takePhoto(){
    this.$nextTick(() => { 
        this.context = this.$refs.canvas.getContext("2d")
        this.context.drawImage(this.$refs.video, 0, 0, 330, 250);
    })
}

如果需要click事件還是用@click形式吧。。

話寡 回答

換個思路,可以把數(shù)組的第一個全部截取出來,從數(shù)據(jù)這邊改變

悶油瓶 回答
  1. token主要解決csrf問題。token一般為非對稱加密。如果一次登錄中token是不變的,當(dāng)截獲到token就一定是存在安全問題的
  2. token作用(主要)不是解決安全性,數(shù)據(jù)安全性解決方案一般用sign
糖豆豆 回答

.css 文件loader也要配置啊。

css: 'vue-style-loader!css-loader'
瘋浪 回答

是不是css選擇器優(yōu)先級的問題,嘗試加一個!important,同時css不要放在帶有scope 屬性的style標(biāo)簽內(nèi)

久舊酒 回答

:active吧, 手指點擊時的效果 話說移動端要個毛的hover啊...

你這個問題和fastjson沒太大關(guān)系
1.你需要現(xiàn)保證后臺的數(shù)據(jù)能傳到前臺,比如console.info(xxx)能打印出來
2.第一步搞定后,再把你的對象搞成你的業(yè)務(wù)數(shù)據(jù),就是那個json形式的字符串,剩下的就是前段的json數(shù)據(jù)處理了

加油,你行滴!

薔薇花 回答

下載到本地直接import引入這個js不行嗎

卟乖 回答

包裝類型了解下

蝶戀花 回答

這種情況要從業(yè)務(wù)邏輯入手。一方面,是不是真的所有的內(nèi)容都要加載完才能進(jìn)入下一步,把那些加載慢的放下一批可否?另一方面,隊列是不是更合適,因為可以不斷給出反饋?

或者你需要的是 Promise.race()

單眼皮 回答

http://jsrun.net/ISgKp/edit 之前寫過一個,找不到了。就先用這個看吧。等找到了再放出來

真難過 回答

你的思路很清奇啊小伙子。。你在mounted里調(diào)用肯定沒用啊,光循環(huán)這個函數(shù),跟 UI 上綁定的數(shù)據(jù)一點關(guān)系都沒有好吧大兄弟,幫你捋一下,你是想過一秒就刷一下 comment 里的時間轉(zhuǎn)成字符串,里邊東西變了,ui 自然會變的,這樣寫:

{
    data() {
        return {
            _comments: []
        }
    },
    methods:{
        ...mapState({
          comments:state=>state.comments
        }),
        _updateTimeString() {
            this._comments = [];
            this.comments.forEach(item => {
              let duration = (+new Date() - item.dataTime) / 1000;
              let timeStr = duration > 60?`${Math.round(duration/60)}分鐘前            `:`${Math.round(duration)}秒前`;
              this._comments.push({
                  ...item,
                  timeStr
              });
           })
       }
    },
    mounted(){
       this.timer = setInterval(this._updateTimeString,1000)
   }
}

然后界面渲染用 _comments,時間幫你用另外一個 key 存儲了,timeStr

維他命 回答

你試下myChart.setOption(option,true)
是不是你想要的效果

淚染裳 回答

ES6 的class可以看作只是一個語法糖

//定義類
class Point {
  constructor(x, y) {
    this.x = x;
    this.y = y;
  }

  toString() {
    return '(' + this.x + ', ' + this.y + ')';
  }
}

與下列方式等價

function Point(x, y) {
  this.x = x;
  this.y = y;
}

Point.prototype.toString = function () {
  return '(' + this.x + ', ' + this.y + ')';
};