在 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
}
}
npm install --save 你的包
就會把這個包的所有源碼(除了你配置過忽略掉的)都下載到node_modules
里去,然后項目中成功定位到這個目錄中給出的index.js
即可。index.js
文件,里面export
的任何東西都可以import 任何東西 from '包名'
的形式引入,所以發(fā)布上去的包提供一個index.js
并能讓別人引入這個index.js
即可。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...
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。