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

鍍金池/ 問答/ HTML問答
尕筱澄 回答

呃,xx的 npm 報(bào)錯(cuò)都有這一句。 應(yīng)為錯(cuò)誤就是哪里刨出來的

荒城 回答
Support for wildcards in the Access-Control-Allow-Headers header was added to the living standard only in May 2016, so it may not be supported by all browsers.

Access-Control-Allow-Headers不接受通配符。

cors-access-control-allow-headers-wildcard-being-ignored

補(bǔ)充

注意拼寫錯(cuò)誤,響應(yīng)允許的是appSecert,請(qǐng)求發(fā)送的是appSecret。

祉小皓 回答
<script>
  export default {
    data () {
      return {
        show: [],
        items: [
          {id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}
        ]
      }
    },
    mounted () {
      for (let i = 0; i < this.items.length; i++) {
        this.$set(this.show, i, false) // 使用this.$set
      }
    },
    methods: {
      btn (id) {
        this.$set(this.show, id, !this.show[id]) // 使用this.$set
        console.log(this.show)
      }
    }
  }
</script>
紓惘 回答

指定target時(shí) 每次返回的都是單獨(dú)的實(shí)例 需要自己建列表手動(dòng)維護(hù)

不討喜 回答

1.兩個(gè)father變量都是引用類型,但是父組件的resetData直接改變了father的地址,子組件引用的仍然是舊的father

2.你只在構(gòu)造函數(shù)內(nèi)把props.father的值賦給了state.father,后面隨著props.father的改變,state.father并不會(huì)主動(dòng)響應(yīng),原因見上一點(diǎn)

3.解決方法有兩種:
1)全都用props.father
2)添加componentWillReceiveProps函數(shù):

componentWillReceiveProps = (nextProps) => {
  this.setState({
    father: nextProps.father
  })
}
有你在 回答
<!DOCTYPE html>
<html lang="en">
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <style>
            .grey{
                background: gray;
            }
        </style>
    </head>
    <body>
        <div id="app">
            <ul v-for="(item,index) in arr">
                <li @click="f($event)">{{item.name}}</li>
            </ul>
        </div>
        <script src="https://cdn.bootcss.com/vue/2.5.9/vue.min.js"></script>
        <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
        <script>
            var temp;
            var app =  new Vue({
                el: '#app',
                data: {
                    arr: [
                        {name:"apple",price:10, grey:false},
                        {name:"banana",price:9, grey:false},
                        {name:"pare",price:9, grey:false}]
                },
                methods: {
                    f(e) {
                        var current = $(e.target).parent().prevAll();
                        console.log(current);
                    }
                }
            });
        </script>
    </body>
</html>

通過click事件傳入對(duì)象$(e.target)能得到li的jquery對(duì)象,你循環(huán)是加在ul上所以渲染出來是三個(gè)<ul><li></li><ul>

大濕胸 回答

無論去掉還是隱藏,如果有涉及到輪詢調(diào)用記得要清理掉,不然會(huì)浪費(fèi)內(nèi)存
無論去掉還是隱藏,都不會(huì)占用GUI渲染線程

下墜 回答

并不建議把請(qǐng)求封裝在分頁組件里面,各大主流UI框架都有現(xiàn)成的分頁組件了,向后端請(qǐng)求無非就是用到分頁組件的當(dāng)前請(qǐng)求頁current-page及每頁請(qǐng)求條目個(gè)數(shù) page-size ,頁面監(jiān)聽到組件這2個(gè)屬性變更就重新提交請(qǐng)求,邏輯很清晰。
你要是把請(qǐng)求封裝在分頁組件里面,要把請(qǐng)求方法當(dāng)參數(shù)傳進(jìn)去吧,組件還得能接受請(qǐng)求額外參數(shù)吧,要提供手動(dòng)請(qǐng)求接口吧,請(qǐng)求回調(diào)后又要從分頁組件里面拿回調(diào)吧?這個(gè)可以實(shí)現(xiàn),但總感覺邏輯不對(duì)


element-ui為例 截取一段我的實(shí)現(xiàn)方法

<el-pagination
    @size-change="tableSizeChange"
    @current-change="tablePageChange"
    :current-page="table.page"
    :page-sizes="table.pageSizes"
    :page-size="table.pageSize"
    :total="table.total"
    layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
data() {
  return {
    search:{                                //檢索關(guān)聯(lián)
      status: 'ALL',
      create_time: [start, end],
      seller_flag: -1,
      buyer_remark: 0,
      seller_remark: 0,
      address_code: '',
      keyword_trade: '',
      keyword_sku: '',
      keyword_address: ''
    },
    table: {
      pageSize: 20,                         //默認(rèn)每頁數(shù)據(jù)量
      pageSizes: [20, 30, 50, 100],         //可選的分頁數(shù)據(jù)量
      page: 1,                              //當(dāng)前頁碼
      total: 0,                             //分頁總數(shù)據(jù)量 后端提供
      sort: {},                             //排序數(shù)據(jù)
    },
  }
},
methods: {
  tableSizeChange(size) {
    this.table.pageSize = size;
    this.onSearchSubmit()
  },
  tablePageChange(page) {
    this.table.page = page;
    this.onSearchSubmit()
  },
  onSearchSubmit() {
    this.loading = true;
    this.$store.dispatch('tradeSearch', {
      ...this.search,
      page: this.table.page,
      page_size: this.table.pageSize,
      callback: res => {
        this.loading = false;
        if (!res.code) {
          if (res.data.page === 1) {
             this.table.total = res.data.total
          }
          this.list = res.data.list.map(({id}) => id);
        } else {
          this.list = [];
        }
      }
    });
  },
毀憶 回答

使用await的時(shí)候then和catch是無效的

'use strict';
const organizationDb = '../../../models/organization';
const userOrganizationDb = '../../../models/user_organization';

module.exports = async function (ctx) {
    // 引入數(shù)據(jù)庫依賴
    const db = ctx.app.db;
    const organizationModel = db.import(organizationDb);
    const userOrganizationModel = db.import(userOrganizationDb);
try{
    const data = await Promise1xxx;
    const data2 = await Promise2xxx(data);
    ctx.body = data2; 
    }
    catch(e) {
    ctx.body = {
        errmsg:e.message
    };
   }
};

你代碼問題太多了

  1. async/await promise混用
  2. forEach中使用了return,其實(shí)外面拿不到
  3. 沒有使用標(biāo)準(zhǔn)的try/catch去寫koa
念舊 回答

受瀏覽器同源策略的影響產(chǎn)生的跨域問題。把紅色的錯(cuò)誤提示敲進(jìn)瀏覽器,就能得到答案。

吢丕 回答

原生:

pwMemberList.filter(function(result) {
  return result.projectCode
})

lodash:

_.filter(pwMemberList, function(result) {
  return result.projectCode
})
久礙你 回答

前段靜態(tài)引入是沒問題的

<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
    var sock = new SockJS('https://mydomain.com/my_prefix');
     sock.onopen = function() {
         console.log('open');
         sock.send('test');
     };

耍太極 回答

css的屬性,在js的style對(duì)象里是可以通過camelCase來訪問的,這樣做的好處是可以用.marginLeft,也可以用["marginLeft"],其實(shí)通過短號(hào)的形式也可以訪問,但就不能用.margin-left了(js語法不允許),但是可以用["margin-left"]來訪問。dom對(duì)象里兩種訪問是等價(jià)的,所以兩個(gè)屬性也是同步修改的。

挽歌 回答

官方例子都是直接返回schema沒有包裹key,忽略了可以用object包裹了。問題已解決,代碼如下

"get": {
  "tags": [
    "option_types"
    ],
  "responses": {
    "200": {
    "description": "optionType: {}; OptionValues: []",
    "schema": {
      "type": "object",
      "properties": {
        "option_type": {
          "$ref": "#/definitions/OptionType"
          },
        "option_values": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OptionValue"
            }
          }
        }
      }
    }
  }
}
糖果果 回答

clipboard.png
用CameraRoll 配置方法上網(wǎng)一搜一大把

冷溫柔 回答

我覺得你可以從再次進(jìn)入聯(lián)系人頁添加時(shí),『如何不產(chǎn)生重復(fù)數(shù)據(jù)』,這一步來入手

艷骨 回答

已經(jīng)解決了,原來需要手動(dòng)開啟端口