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

鍍金池/ 問(wèn)答
挽歌 回答

封裝一個(gè)工具函數(shù),比如bmap.js,大致代碼如下:

export function MP() {  
  return new Promise(function (resolve, reject) {  
    window.onload = function () {  
      resolve(BMap)  
    }  
    let script = document.createElement('script');  
    script.type = 'text/javascript';  
    script.src = 'http://api.map.baidu.com/api?v=2.0&ak=ak&callback=init';  
    script.onerror = reject;  
    document.head.appendChild(script);  
  })  
}  

組件中使用:

import { MP } from './bmap.js'
export default {
    mounted() {  
       this.$nextTick(function() {  
          const _this = this;  
          MP().then(BMap => {  
              // 其他操作          
          })
        })
    }
} 
枕邊人 回答

app.set('views', [path.join(__dirname, 'views'),path.join(__dirname, 'views/back')]);

嘟尛嘴 回答

用 await async 語(yǔ)法

舊城人 回答

參考周志明《深入理解 Java 虛擬機(jī) 第二版》3.5.6 節(jié) “CMS 收集器”,“CMS 收集器無(wú)法處理浮動(dòng)垃圾” 小節(jié):JDK1.5 時(shí),CMSInitiatingOccupancyFraction 的默認(rèn)值是 68;JDK1.6 時(shí),默認(rèn)值調(diào)高為 92


命令的話,可以在 JVM 啟動(dòng)的時(shí)候使用 -XX:+PrintFlagsFinal 來(lái)顯示所有可配置參數(shù)的信息,然后找到 CMSTriggerRatioMinHeapFreeRatio,然后計(jì)算 CMSInitiatingOccupancyFraction 的公式為:

CMSInitiatingOccupancyFraction = (100 - MinHeapFreeRatio) + (CMSTriggerRatio * MinHeapFreeRatio / 100)
囍槑 回答

輸出and id in (?),看看這個(gè)id是不是只傳進(jìn)去一個(gè)值?

你應(yīng)該把請(qǐng)求的Accept設(shè)置成application/octet-stream.
這其實(shí)有的奇怪, 因?yàn)橐话闱闆r下 Excel 文件的 Accept 是application/vnd.ms-excel.
但是由于 flasgger 是使用 swagger-ui 作為前端, 而 Swagger 發(fā)送文件類請(qǐng)求是使用 superagent, 使用的是 blob 技術(shù), 需要設(shè)置 xhr 的 ResponseTypeblob.
我們看flasgger_static/lib/http.js:

if(this.binaryRequest(accept)) {
    r.on('request', function () {
      if(this.xhr) {
        this.xhr.responseType = 'blob';
      }
    });
  }
SuperagentHttpClient.prototype. binaryRequest = function (accept) {
  if(!accept) {
    return false;
  }
  return (/^image/i).test(accept)
    || (/^application\/pdf/).test(accept)
    || (/^application\/octet-stream/).test(accept);
};

只在 Accept 匹配為image/i,/^application\/pdf/,/^application\/octet-stream/, 才將 responseType 設(shè)置成 blob
所以要么將/^application\/vnd.ms-excel/這個(gè)匹配加入http.js, 要么將發(fā)送的請(qǐng)求全部設(shè)置成application/octet-stream.
也就是這樣設(shè)置produces:
app.py:

@app.route('/excel')
def excel():
    """
    ---
    produces:
      application/octet-stream
    responses:
      200:
        description: description_text
        schema:
          type: file
    """
    save_path = 'demo.xls'
    response = make_response(send_file(save_path))
    response.headers['Content-Disposition'] = 'attachment; filename=demo.xls'
    return response

比如現(xiàn)在的目錄結(jié)構(gòu):

clipboard.png
demo.py:

clipboard.png
apidocs頁(yè)面:

clipboard.png

菊外人 回答

已經(jīng)解決了,謝謝

囍槑 回答

你這個(gè)問(wèn)題感覺(jué)都搞一星期了...

為什么要遍歷,輸入框里的默認(rèn)值應(yīng)該是從tabledata里取的,你修改輸入框的值,會(huì)作用到tabledata的,然后你handleSelectionChange 函數(shù)的時(shí)候不是把行數(shù)據(jù)傳進(jìn)去了嗎,直接用就可以了

你表格里的值都是根據(jù)tabledata來(lái)的,如果修改值tabledata沒(méi)更新,那就是你vue沒(méi)檢測(cè)到狀態(tài)改變

情殺 回答

你可以在根組件里面添加一個(gè)監(jiān)聽(tīng)enter的事件,然后把這個(gè)事件廣播出去,然后在你的業(yè)務(wù)組件內(nèi)再去監(jiān)聽(tīng)根組件廣播的這個(gè)事件,這樣就可以了獲取到這個(gè)enter了。

情已空 回答

var mySwiper = new Swiper('.swiper-container', {

        loop: true,
        autoplay: {
            disableOnInteraction: false,
        },
    });
命于你 回答

startsWith的mdn,這個(gè)你的看看,ie根本就沒(méi)事實(shí)現(xiàn)這個(gè)方法,你既然使用了babel-polyfill,那么你應(yīng)該是看不到startsWith這個(gè)方法的,所以應(yīng)該是沒(méi)有被轉(zhuǎn)譯,想想引得babel-polyfill是否正確,考慮使用mdn提供的轉(zhuǎn)譯再寫(xiě)一遍。

/*! http://mths.be/startswith v0.2.0 by @mathias */
if (!String.prototype.startsWith) {
  (function() {
    'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
    var defineProperty = (function() {
      // IE 8 only supports `Object.defineProperty` on DOM elements
      try {
        var object = {};
        var $defineProperty = Object.defineProperty;
        var result = $defineProperty(object, object, object) && $defineProperty;
      } catch(error) {}
      return result;
    }());
    var toString = {}.toString;
    var startsWith = function(search) {
      if (this == null) {
        throw TypeError();
      }
      var string = String(this);
      if (search && toString.call(search) == '[object RegExp]') {
        throw TypeError();
      }
      var stringLength = string.length;
      var searchString = String(search);
      var searchLength = searchString.length;
      var position = arguments.length > 1 ? arguments[1] : undefined;
      // `ToInteger`
      var pos = position ? Number(position) : 0;
      if (pos != pos) { // better `isNaN`
        pos = 0;
      }
      var start = Math.min(Math.max(pos, 0), stringLength);
      // Avoid the `indexOf` call if no match is possible
      if (searchLength + start > stringLength) {
        return false;
      }
      var index = -1;
      while (++index < searchLength) {
        if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
          return false;
        }
      }
      return true;
    };
    if (defineProperty) {
      defineProperty(String.prototype, 'startsWith', {
        'value': startsWith,
        'configurable': true,
        'writable': true
      });
    } else {
      String.prototype.startsWith = startsWith;
    }
  }());
}
陪妳哭 回答

你可以寫(xiě)個(gè)閉包返回一個(gè)函數(shù)a,把id固定下來(lái),然后等點(diǎn)擊確定的時(shí)候去運(yùn)行a不就行了

過(guò)客 回答

1.vue的組件分為幾種方式: DOM模板、字符串模板、單文件組件等,上面例子,已經(jīng)通過(guò)new Vue(...)實(shí)例化vue,vue的原理解析compile<el-button></el-button>,抽象為AST(抽象語(yǔ)法樹(shù)),最終需要得到 render function來(lái)渲染出來(lái)。
原理這塊,你可以參考下別人詳細(xì)的源碼解析。Vue源碼學(xué)習(xí)

2.element中的index.js是打包編譯好的文件,其實(shí)內(nèi)部是通過(guò)Vue.use全局注冊(cè)了ElementUI

萌面人 回答

是不是可以再加個(gè)屬性值通過(guò)id去排序呢

                      {id:1,TITLE: "look", SHZT: "通過(guò)"}
                      {id:2,TITLE: "see", SHZT: "未通過(guò)"}
                      {id:3,TITLE: "watch", SHZT: "未審核"}
空痕 回答
<div id="app">
{{a}}   //這里能顯示1
<my-aaa />
</div>
<template id="aaa">
<h3 @click="show()">{{msg}}</h3> //這部分無(wú)法顯示
</template>

你定義了組件,但是并沒(méi)有在 vm 的節(jié)點(diǎn)上引用。所以就沒(méi)顯示出來(lái)

故林 回答

自定義的skip函數(shù)。這個(gè)不是api里面該寫(xiě)的

爛人 回答

@凌云識(shí)木 slice的零值是nil,轉(zhuǎn)化后就是json的null,文檔是ok的.

@xialeistudio 你的data["a"]是有值的, 且不是零值, 這種情況下轉(zhuǎn)成null才是有問(wèn)題.

離魂曲 回答

解決

<mt-navbar v-model='currentTab' @click.active='test'>
  <mt-tab-item id="recharge">充值紀(jì)錄</mt-tab-item>
  <mt-tab-item id="reward">獎(jiǎng)勵(lì)紀(jì)錄</mt-tab-item>
  <mt-tab-item id="payout">消費(fèi)紀(jì)錄</mt-tab-item>
  <mt-tab-item id="payback">獎(jiǎng)勵(lì)紀(jì)錄</mt-tab-item>
</mt-navbar>

new Vue({
data:{
  currentTab: recharge
},
methods: {
  test(){
    console.log(this.currentTab); // 這個(gè)currentTab就是實(shí)時(shí)更新的當(dāng)前tab
  }
}
)}
初念 回答

答:

lis = [1, 3, 4, 533, 2333, 8]

def whateveryoucallit(lis):

    copylis = lis[:]
    copylis.sort(reverse=True)
    dic = { v:i+1 for i,v in enumerate(copylis) }
    return [ {v:dic[v]} for i,v in enumerate(lis) ]

result = whateveryoucallit(lis)

print(result)

結(jié)果:

[{1: 6}, {3: 5}, {4: 4}, {533: 2}, {2333: 1}, {8: 3}]

由于題主沒(méi)有描述清楚以下回答作廢

用例子補(bǔ)充一下樓上的答案

lis = [1, 3, 4, 533, 2333, 8]
for i, val in enumerate(lis):
    print '{}-{}'.format(i, val)

結(jié)果:

0-1
1-3
2-4
3-533
4-2333
5-8