鍍金池/ 問答/ HTML問答
青黛色 回答

route 對象里,不是 router

離魂曲 回答
var index = 0;//數(shù)據(jù)的第幾個顯示
//高亮圖形
myChart.dispatchAction({
  type: 'highlight',
  seriesIndex: 0,
  dataIndex: index 
});
// 顯示 tooltip
myChart.dispatchAction({
  type: 'showTip',
  seriesIndex: 0,
  dataIndex: index 
});        
練命 回答

你的這種寫法把代表值的變量car_no變成了字符串‘car_no’。
可以試試"{{url_for('card_detail')}}?card_no=" + car_no

乖乖瀦 回答

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <input type="checkbox">唱歌<br />
    <input type="checkbox">跳舞<br />
    <input type="checkbox">吃飯<br />
    <input type="checkbox">睡覺<br />
    <input type="checkbox">打豆豆<br />
    <button id="all">全選</button>
    <button id="no">全不選</button>
    <button id="fx">反選</button>
</body>
<script src='jquery-2.1.1.min.js'></script>
<script>
    $(function(){
        
         $('#all').on('click',function(){
              $(':checkbox').prop('checked',true)
         })
         
         $('#no').on('click',function(){
              $(':checkbox').prop('checked',false)
         })
         
         $('#fx').on('click',function(){
              $(':checkbox').each(function(){
                   $(this).prop('checked',!$(this).prop('checked'))
              })
         })
    })
</script>

</html>

挽歌 回答

直接播放網(wǎng)絡(luò)的的不好嗎?

你就覺得不好那你,選擇下面兩種呀
下載到本地播放。
代理到對應(yīng)網(wǎng)絡(luò)地址。

久礙你 回答

刪除package.json文件中"mpvue-loader": "^1.0.13",里面的‘^’,再重新npm install、npm run dev即可正常。原因:如果不鎖定版本安裝,默認(rèn)會安裝最新的版本,造成新版本不兼容而編譯不成功。

陌如玉 回答

co返回的也是promise 按照你這種返回數(shù)組可以用promise.all

var fn = co.wrap(function*(newfile, upfile) {
  client.useBucket("p-adm-test");
  let result = yield client.put(newfile, upfile);
  return result.url;
});

1 . promise.all

var arr = []
for(let f of files.file){
    arr.push(fn(newfile,upfile))
}
//Promise.all(arr,function(res){
Promise.all(arr).then(function(res){
    ctx.response.body = {
        errno: 0,
        data: res
    }
})

2 . co嵌套


form.parse(ctx.req, co.warp(function* (err, fields, files) {
    let data = []
    for(let f of files.file){
        let res = yield fn(newfile,upfile)
        data.push(res)
    }
    ctx.response.body = {
        errno: 0,
        data: data
    }
}))

1.不判斷l(xiāng)ist是否存在就取list的話,如果list不存在,就會報異常,導(dǎo)致后面的代碼無法執(zhí)行
2.map一樣

失心人 回答

data里面設(shè)置的時候只能設(shè)置初始值,所以如果想要在gallaryindex改變的時候跟著改變,可以watch一下,然后在watch里面做更新操作。

子組件

data () {
    return {
        swiperOption: {
            ...,
            initialSlide: this.gallaryindex,
            ...
        }
    }
},

watch: {
    gallaryindex (val) {
        this.swiperOption.initialSlide = val
    }
}
浪婳 回答
  1. 發(fā)布到npm之后的話,別人npm install --save 你的包就會把這個包的所有源碼(除了你配置過忽略掉的)都下載到node_modules里去,然后項目中成功定位到這個目錄中給出的index.js即可。
  2. 模塊化引入的規(guī)則是會找一個目錄下的index.js文件,里面export的任何東西都可以import 任何東西 from '包名'的形式引入,所以發(fā)布上去的包提供一個index.js并能讓別人引入這個index.js即可。
  3. 涉及到依賴的要注意package.json中的位置和版本。涉及到ts的注意tsconfig.json中的編譯規(guī)則配置。
綰青絲 回答

如果是在相冊里打開的話,雙擊一下屏幕就好了,是蘋果手機把圖片等比放大了,雙擊縮放回原圖就OK了

久舊酒 回答

整形調(diào)用.toString()方法可以把數(shù)字轉(zhuǎn)換為字符串;
字符串調(diào)用Number()方法可以字符串轉(zhuǎn)換為數(shù)字。
建議取到數(shù)據(jù)的后,對數(shù)據(jù)進(jìn)行遍歷處理(比如:map()),上傳的時候,在處理一遍。
這是一個很蠢很基礎(chǔ)的方法,歡迎樓下大神補充。

命多硬 回答

官網(wǎng)文檔中el-form中綁定了一個formInline對象,它就是最后要傳遞的結(jié)果。

旖襯 回答

問題是由于刷新頁面之后addRoutes的路由失效了,所以判斷下,然后重新生成路由

青檸 回答

更簡單的方法就使用別人造好的輪子
推薦用lodash

傲嬌范 回答

使用view標(biāo)簽 ,可以查看官方文檔。樓主初學(xué)可以看看我這個練手項目,也是剛開始學(xué)小程序的時候?qū)懙模?a rel="nofollow noreferrer">https://github.com/Ghostdar/w...

忘了我 回答

RTFM
https://developer.mozilla.org...

拖到最下面看支持率:

clipboard.png
可以用,是因為瀏覽器良心