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

鍍金池/ 問答/ HTML問答
離魂曲 回答

in遍歷的是對象的key數(shù)組是一種特殊的對象。

在遍歷中,實際上keyString類型,in遍歷會隱式調(diào)用toString()方法來轉(zhuǎn)換key,所以"0"是"0"1會轉(zhuǎn)換成"1"。

測試代碼如下:

var data=[7,8,9];
var key;
for(key in data) {
  console.log('key:', key, '-type: ', typeof key);
}

輸出結(jié)果如下:

key: 0 -type:  string
key: 1 -type:  string
key: 2 -type:  string
單眼皮 回答

分別跟 http://localhost:8866/bbs/websocket/login/3,http://localhost:8866/bbs/websocket/send/3 建立連接;再訪問這個唄 http://localhost:8000/dashboard

未命名 回答

在子組件中代理父組件的修改函數(shù)
https://doc.react-china.org/d...

生性 回答
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style type="text/css">
  #img {
    width: 300px;
    height: 300px;
    margin: 100px auto;
    background: red;
  }
#img2 {
    width: 188px;
    height: 188px;
    backface-visibility: hidden;
    transition: all 1s ease;
    background: orange;
}
  #img:hover #img2 {
    transform: scale(2) translate(100px, 100px);
  }
  </style>
</head>

<body>
  <div id="img">
    <div id="img2"></div>
  </div>
</body>

</html>

copy 到 文件執(zhí)行下就可以了

心悲涼 回答

你看看的updateMany 方法
圖片描述

集合名稱寫死了,不是你傳入的集合名稱,改為你傳入的集合名稱變量

獨白 回答
help.stdout.pipe(chunk) 自己pipe給自己?
若相惜 回答

<Route path='/' component={<Home meta={/*...*/}/>} />

別傷我 回答

let fundList = [

  {
    name: 'a',
    id: 0,
  },
  {
    name: 'b',
    id: 1,
  }
];

let beforeData =[

  {
    'approved_amount_sum': 44200,
    'date': '2018-08-07',
    'a': 44200,
    'a_rate': 1,
  },
  {
    'approved_amount_sum': null,
    date: '2018-08-08',
  },
];

for(let eachData of beforeData){
  for(let f of fundList){
    if(!eachData.hasOwnProperty(f.name)){
       eachData[f.name] = null;
    }
    if(!eachData.hasOwnProperty(f.name+"_rate")){
      eachData[f.name+"_rate"] = null;
    }
  }
}
console.log(beforeData)

output:

[{
  a: 44200,
  a_rate: 1,
  approved_amount_sum: 44200,
  b: null,
  b_rate: null,
  date: "2018-08-07"
},  {
  a: null,
  a_rate: null,
  approved_amount_sum: null,
  b: null,
  b_rate: null,
  date: "2018-08-08"
}]
心癌 回答

http://jsbin.com/qubucufuya/4...

簡單寫了一下,為了方便,開始的塊,我定在了 90度的位置上,還有漸變色的處理也比較簡單,只是簡單的加色
寫這個只是為了表明 CSS是可以做到的,主要是確定位置有點麻煩,但是也是可以能過js算的

更新一下,在90度開始也是可以的,在js里判斷一下,把不要顯示的塊隱藏掉就可以了

http://jsbin.com/qubucufuya/6...

======================================更新
晚上閑來無事,又改了改,加上了 百分比顯示,只要更改render(60)函數(shù)中的數(shù)字,可以自定義百分比
http://jsbin.com/vigoxovofu/2...

赱丅呿 回答

是不是錨點呢?考慮下使用錨點定位試試呢

涼心人 回答
this.tempParamsPackge.sex-value = to.query.sex-value;//這行報錯左邊表達式無效

試下改成

this.tempParamsPackge['sex-value'] = to.query['sex-value'];
祉小皓 回答

2018-06-20 16:40 轉(zhuǎn)換
Date.prototype.Format = function(fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小時
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
};
//使用
var testTimeB = '2018-06-20 16:40';
testTimeB = testTimeB.replace(/-/g, "/"); // ios 兼容時間 將-替換為/
var timeB = new Date(testTimeB).Format('yyyy/MM/dd hh:mm');

浪蕩不羈 回答

onLoad和onReady雖然有先后順序,但是那個時間幾乎可以忽略不計了。

圖片來自官方文檔-生命周期
clipboard.png

心悲涼 回答

兄弟,解決了嗎?

櫻花霓 回答

如果層數(shù)確定的話,可以這樣做:

<script>
    var ad = [
        {
            "id": 1,
            "display_name": "儀表盤",
            "children": []
        },
        {
            "id": 2,
            "display_name": "用戶權(quán)限管理",
            "children": [
                {
                    "id": 3,
                    "display_name": "用戶列表",
                    "children": [
                        {
                            "id": 5,
                            "display_name": "創(chuàng)建管理員"
                        },
                        {
                            "id": 6,
                            "display_name": "刪除用戶"
                        },
                        {
                            "id": 7,
                            "display_name": "用戶禁用/取消禁用"
                        },
                        {
                            "id": 8,
                            "display_name": "更新用戶所在角色組"
                        }
                    ]
                }
            ]
        }];

    var the_id = 5;
    var the_select_id = [];

    for(var i in ad){
        if (ad[i].id !== the_id) {
            for(var j in ad[i].children) {

                if (ad[i].children[j].id !== the_id) {
                    for(var k in ad[i].children[j].children) {

                        if (ad[i].children[j].children[k].id == the_id) {
                            the_select_id.push(ad[i].children[j].children[k].id);
                            the_select_id.push(ad[i].children[j].id);
                            the_select_id.push(ad[i].id);
                        }
                    }
                } else {
                    the_select_id.push(ad[i].children[j].id);
                    the_select_id.push(ad[i].id);
                }
            }
        } else {
            the_select_id.push(ad[i].id);
        }
    }

    console.log(the_select_id);
</script>

效果如圖:

clipboard.png

當(dāng)然,代碼還可以精簡優(yōu)化,這里只是提供個參考

六扇門 回答
mounted: function () {
  this.$nextTick(function () {
   //echarts相關(guān)代碼
  })
}
亮瞎她 回答

我也一直找組件,但是后來,自己網(wǎng)上找了一個上傳方法,組件的話哪個交互好就選哪個,自己寫一個也行。代碼貼上:

 /*選擇上傳圖片切換 這個是methods里的,注意uploadImg*/
    onFileChange(e){
        var self=this;
        var fileInput=e.target;
        if(fileInput.files.length==0){
            return;
        }
        this.editor.focus();
        uploadImg(fileInput.files[0], "uploadimage" ,this.action, (result)=>{
            if(result.status == 'error') this.$message.error(result.msg);
            else {
                console.log(result);
                self.editor.insertEmbed(self.editor.getSelection().index, 'image', result.url);
            }
        });
    },

下面的是uploadImg方法,方便引入

```
/*@params :文件 input的名字 后端的上傳地址 上傳完畢后回調(diào)函數(shù)*/
export function uploadImg(file,inputName,action,cb) {
const isAllow = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isAllow) {
    cb({ "status" : 'error' , 'msg' : '上傳的圖片須是 JPG、PNG 或 GIF 格式' });
    return ;
}
if (!isLt2M) {
    cb({ "status" : 'error' , 'msg' : '上傳的圖片大小不能超過 2MB' });
    return ;
}
var data = new FormData;
let formData = new FormData();
formData.append(inputName, file);
let config = {
    headers: {'Content-Type': 'multipart/form-data'},
    params: {
        "action": "uploadimage",
        'filename': inputName
    }
};
axios.post( action , formData, config).then(function (res) {
    cb(res);
    return ;
});

}

1.如果你的node進程本身沒有守護進程方面的實現(xiàn),可以用pm2部署。
2.要安裝生產(chǎn)環(huán)境的依賴,如果還有外部的系統(tǒng)依賴,都要裝上。