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

鍍金池/ 問答/ HTML問答
骨殘心 回答
<span ng-if='!(checkTypeData && checkTypeData[0].checkEName)'>{{item.checkName}}</span>
<span ng-if='(checkTypeData && checkTypeData[0].checkEName'>{{item.checkEName}}</span>
朽鹿 回答

...肯定不行啊,

getExpandData = (param) => {
    **getModelVersion(param)**.then((result) => {//異步的
      if (result) {
        this.setState({
          subData: result, // 過濾之后的數(shù)據(jù)
        });
      }
    });
  };
const subList = this.state.**subData**.map((v) => {//其實還是上一次的數(shù)據(jù),因為還沒異步完
    return {
      ...v,
      todo: v.status,
    };
  });

解決辦法1,改造,回調(diào)進去

getExpandData = (param,cb) => {
    getModelVersion(param).then((result) => {
        if (result) {
            this.setState({
                subData: result, // 過濾之后的數(shù)據(jù)
            },cb);
        }
    });
  };
 expandFunction = (expanded, record) => {
    const { showListDom } = this.state;
    if (record) { // 未展開
      const param = {
        modelId: record.id,
      };
      this.getExpandData(param,()=>{
          const subList = this.state.subData.map((v) => {
            return {
              ...v,
              todo: v.status,
            };
          });
          const dom = (
            <Table
              columns={this.detailsColumns}
              onChange={this.handleSubTableChange}
              dataSource={subList}
              rowKey={subList.id}
              pagination={false}
            />);
          const Id = record.id;
          const item = {};
          item[Id] = dom;
          this.setState({
            showListDom: {
              ...showListDom,
              ...item,
            },
          });
      });
    }
  };

解決辦法2,用async await改造,我就不寫了

入她眼 回答

nginx怎么配置的,需要看一下。懷疑是配置問題

拽很帥 回答

在以往windows ie為主的時代,可以通過檢查控件等方式判斷,但現(xiàn)在H5,都不建議用控件了,所以需要別的方法了。
一般是用特殊協(xié)議檢測法,不過囿于瀏覽器安全控制方面的原因,效果不會完美。

初心 回答

不可以的,.vue文件需要被 webpack等js打包器處理過以后,轉(zhuǎn)換為js才能被瀏覽器正確識別

擱淺 回答

https://caniuse.com/usage-table
如果可以的話可以換種思路,用上面的數(shù)據(jù)說服經(jīng)理不用兼容ie8

尐潴豬 回答

不需要使用:filtered-value

 <el-table-column v-for="game in gameList" :label="game.gameNameCn" :filtered-value="[game]">
    <template v-if="scope.row.gameList.some(item=>item.gameId ===scope.column.filteredValue[0].gameId)">

可以直接改為

 <el-table-column v-for="game in gameList" :label="game.gameNameCn">
    <template v-if="scope.row.gameList.some(item=>item.gameId === game.gameId)">

使用:filtered-value屬性解決了我的問題

<el-table-column v-for="game in gameList" :label="game.gameNameCn" :filtered-value="[game]">
    <template v-if="scope.row.gameList.some(item=>item.gameId === scope.column.filteredValue[0].gameId)">
孤毒 回答

403 Forbidden 錯誤,大多是被服務(wù)器屏蔽了,拒絕提供返回內(nèi)容

一般可以通過更換服務(wù)器ip、設(shè)置代理服務(wù)器,去爬取

最好的辦法,是通過模擬瀏覽器人工采集爬取

selenium + xvfb + firefox + proxy ip

下面是我的解決方案,僅供參考,相互學(xué)習(xí)

from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.proxy import *
from pyvirtualdisplay import Display
# from xvfbwrapper import Xvfb

import bs4, os
from base64 import b64encode

import sys
reload(sys)
sys.setdefaultencoding('utf8')


## webdriver + firefox (不使用代理,爬取網(wǎng)頁)
def spider_url_firefox(url):
    browser = None
    display = None
    try:
        display = Display(visible=0, size=(800, 600))
        display.start()
        browser = webdriver.Firefox()       # 打開 FireFox 瀏覽器
        browser.get(url)     
        content = browser.page_source
        print("content: " + str(content))
    finally:
        if browser: browser.quit()
        if display: display.stop()


## webdriver + firefox + proxy + whiteip (無密碼,或白名單ip授權(quán))
## 米撲代理:https://proxy.mimvp.com
def spider_url_firefox_by_whiteip(url):
    browser = None
    display = None
    
    ## 白名單ip,請見米撲代理會員中心: https://proxy.mimvp.com/usercenter/userinfo.php?p=whiteip
    mimvp_proxy = { 
                    'ip'            : '140.143.62.84',      # ip
                    'port_https'    : 19480,                # http, https
                    'port_socks'    : 19481,                # socks5
                    'username'      : 'mimvp-user',
                    'password'      : 'mimvp-pass'
                  }
    
    try:
        display = Display(visible=0, size=(800, 600))
        display.start()
        
        profile = webdriver.FirefoxProfile()
        
        # add proxy
        profile.set_preference('network.proxy.type', 1)     # ProxyType.MANUAL = 1
        if url.startswith("http://"):
            profile.set_preference('network.proxy.http', mimvp_proxy['ip'])
            profile.set_preference('network.proxy.http_port', mimvp_proxy['port_https'])    # 訪問http網(wǎng)站
        elif url.startswith("https://"):
            profile.set_preference('network.proxy.ssl', mimvp_proxy['ip'])
            profile.set_preference('network.proxy.ssl_port', mimvp_proxy['port_https'])     # 訪問https網(wǎng)站
        else:
            profile.set_preference('network.proxy.socks', mimvp_proxy['ip'])
            profile.set_preference('network.proxy.socks_port', mimvp_proxy['port_socks'])
            profile.set_preference('network.proxy.ftp', mimvp_proxy['ip'])
            profile.set_preference('network.proxy.ftp_port', mimvp_proxy['port_https'])
            profile.set_preference('network.proxy.no_proxies_on', 'localhost,127.0.0.1')
        
        ## 不存在此用法,不能這么設(shè)置用戶名密碼 (舍棄)
#         profile.set_preference("network.proxy.username", 'mimvp-user')
#         profile.set_preference("network.proxy.password", 'mimvp-pass')
    
        profile.update_preferences()
        
        browser = webdriver.Firefox(profile)       # 打開 FireFox 瀏覽器
        browser.get(url)     
        content = browser.page_source
        print("content: " + str(content))
    finally:
        if browser: browser.quit()
        if display: display.stop()
深記你 回答

clipboard.png
這些是代碼規(guī)范的警告,可以看他們給的這些鏈接,一般這些鏈接里都會告訴你是因為什么才會出現(xiàn)這種警告。

懶豬 回答

解決


不考慮繼承屬性的方式
const result = [];
for (let key in arr) {
  if (['a', 'b'].includes(key)) {
    result.push(arr[key]);
  }
}

參考


悶騷型 回答

背景知識1. 涉及到let和var的作用域范圍

  1. let的作用域為塊級,直觀的看就是 {}內(nèi),出了大括號這個變量就失效了。
  2. var的作用域為定義這個變量的函數(shù)內(nèi),如果不在函數(shù)內(nèi),他就是全局的了。

背景知識2. setTimeout為異步執(zhí)行,當(dāng)同步代碼全部完成后,才會去執(zhí)行它,本例中for循環(huán)跑完后才會依次執(zhí)行各個setTimeout里的function。

過程推演:

  1. 兩個for循環(huán)各創(chuàng)建了4個 setTimeout,他們中都被傳入了變量i,等待for循環(huán)結(jié)束后開始執(zhí)行。
  2. 基于背景知識1:var-for 傳入的4個i在for循環(huán)結(jié)束后,所有的i都在后續(xù)循環(huán)時被重新賦值,直至最后一次,賦值為4.
    let-for 傳入的4個i在{}內(nèi)互不影響,后序循環(huán)不會給前面一次的循環(huán)體內(nèi)的i重新賦值(因為每次循環(huán)都是獨立的{}作用域),故能正常輸出期望值
檸檬藍 回答

1是公有屬性
2是靜態(tài)屬性
3是原型共享屬性
不清楚的話請看《javascript設(shè)計模式》

嫑吢丕 回答

Sublime Text3 配置 NodeJs 環(huán)境

給個鏈接自己試著配置一下(Sublime Text3 配置 NodeJs 環(huán)境): http://www.cnblogs.com/qiaoji...

cmd命令方式

寫一個bat腳本如下: 自行修改判斷語句

set "cmd=%1%"
REM 檢測變量%cmd%是否等于run,如果相等,顯示Run,否則顯示No
if "%cmd%"=="run" (echo Run) else (echo No)
pause

再來完善一下:

set "cmd=%1%"
set projectDir=Y:\VueEgtch
cd /d "%projectDir%"
REM 檢測變量%cmd%是否等于run,如果相等,顯示Run,否則顯示No
if "%cmd%"=="run" (npm run dev) else if "%cmd%"=="build" (npm run build)
pause

運行如下:

C:\Users\Administrator\Desktop>test.bat run

C:\Users\Administrator\Desktop>set "cmd=run"

C:\Users\Administrator\Desktop>if "run" == "run" (echo Run )  else (echo No )
Run

C:\Users\Administrator\Desktop>pause
請按任意鍵繼續(xù). . .

C:\Users\Administrator\Desktop>test.bat dd

C:\Users\Administrator\Desktop>set "cmd=dd"

C:\Users\Administrator\Desktop>if "dd" == "run" (echo Run )  else (echo No )
No

C:\Users\Administrator\Desktop>pause
請按任意鍵繼續(xù). . .
我甘愿 回答

BFC的特點之一就是計算高度的時候會計算內(nèi)部的float元素

傲嬌范 回答

看了項目中,是用的webpack,里邊也配置了source-map,應(yīng)該在build后會產(chǎn)生source-map文件的,直接在chrome調(diào)試即可。

荒城 回答
  1. 建議使用計算屬性;
  2. data 不是動態(tài)變化的,需要監(jiān)聽。
任她鬧 回答

我相信官方文檔上面是沒有那個括號的

孤客 回答

websocket協(xié)議是支持ping/pong消息的,理論上可以周期地發(fā)ping消息就可以了。

然而瀏覽器沒開放ping接口,所以你只能在websocket之上定時發(fā)點文本或二進制消息來檢測了。