1.定義一個(gè)數(shù)組arr
2.下拉組件的下拉event
3.event觸發(fā)的時(shí)候,向獲取商品列表的api發(fā)請(qǐng)求(一般這種需求的api都做好分頁(yè))
page是0的時(shí)候,把獲取的數(shù)據(jù)push進(jìn)arr
page不是0的時(shí)候,把獲取的數(shù)據(jù)concat到arr上
就醬
ionic, HTML5+ 和 Framework7 這三個(gè)是開(kāi)發(fā)APP的吧? 我們公司現(xiàn)在開(kāi)始用 Vue.js, Framework7 用過(guò)一下, 發(fā)現(xiàn)文檔翻譯得不夠完整, 現(xiàn)在又轉(zhuǎn)向基于它的 SUI Mobile 了.
至于主流的話, 現(xiàn)在全球最火的是 React.js, 國(guó)內(nèi)就是 Vue.js 了, 因?yàn)樗形奈臋n完整, 本身又容易上手.
console.log(this.sg)
debug設(shè)置為true,看下哪個(gè)地方報(bào)錯(cuò),根據(jù)報(bào)錯(cuò)來(lái)這里看為什么錯(cuò)
單獨(dú)寫一個(gè)頁(yè)面,只要隱藏按鈕這個(gè)功能,看看是否成功。
我jssdk出錯(cuò)都是這么調(diào)試出來(lái)的,加油(?)
你怎么阻止視頻自動(dòng)播放的?
官網(wǎng)的寫法不是完整的例子,這樣寫以后就ok了
這個(gè)目前無(wú)法監(jiān)聽(tīng),之前項(xiàng)目也是遇到這個(gè)問(wèn)題,你要調(diào)用微信的api獲取經(jīng)緯度,然后用高德或者百度地圖去定位
Run npm install --save intl.
Run npm install --save classlist.js.
然后找到src里面的polyfills.ts文件,將注釋打開(kāi)
然后找到src里面的polyfills.ts文件,將注釋打開(kāi)
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run `npm install --save classlist.js`.
/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
/**
* Required to support Web Animations `@angular/animation`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/**
* Date, currency, decimal and percent pipes.
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
*/
import 'intl'; // Run `npm install --save intl`.
/**
* Need to import at least one locale-data with intl.
*/
import 'intl/locale-data/jsonp/en';用一個(gè)包裹層設(shè)置 overflow: hidden 把內(nèi)層的滾動(dòng)條遮住.
在線demo: https://codepen.io/liximomo/p...
<div class="scrollerContainer">
<div class="scroller">
<div class="content">填充內(nèi)容, 請(qǐng)左右滾動(dòng)</div>
</div>
</div>
.scrollerContainer {
height: 40px;
overflow: hidden;
}
.scroller {
height: 40px;
width: 300px;
overflow-y: hidden;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: 20px;
}
.content {
width: 600px;
}js沒(méi)有被babel轉(zhuǎn)換掉,因?yàn)閕mport語(yǔ)法還在,檢查一下webpack的js-loader配置
為了用戶數(shù)據(jù)的安全,要進(jìn)行加密算法
因?yàn)辄c(diǎn)擊上一步只是局部刷新,所以有JS執(zhí)行,沒(méi)有影響到整個(gè)頁(yè)面刷新
http://emptypipes.org/2017/04...
官方不有很多“力導(dǎo)向圖”的例子么。如果是數(shù)據(jù)分類是確定的,自動(dòng)的力圖布局算法都省了,自己寫個(gè)簡(jiǎn)單的算法算出點(diǎn)的坐標(biāo)就好了。
1樓回答正確
jquery.
san.
anujs.
getCurrentPosition是異步的,調(diào)用后并不會(huì)立即返回結(jié)果。
你的截圖里面已經(jīng)打印錯(cuò)誤信息了,就是ERROR(3): Timeout expired,說(shuō)明請(qǐng)求超時(shí)了。
1.在觸發(fā)onmouseup事件存儲(chǔ)數(shù)據(jù)
try{
//存取畫板的筆畫
this.imgCach_arr.push($('#canvas')[0].toDataURL());
console.log('base64流長(zhǎng)度',($('#canvas')[0].toDataURL().length)/1024,'KB')
//將存取的數(shù)據(jù)發(fā)送給當(dāng)事人
let socket2SerData = $('#canvas')[0].toDataURL();
socket.emit('shareImag2ser',socket2SerData)
this.redo_index = this.imgCach_arr.length - 1;
this.max_index = this.imgCach_arr.length;
}catch(e){
console.log(e)
}
2.回退方法
reBack_fun(e){
console.log('1111',e)
let _this = this;
if(this.redo_index > 0){
let socketMessage = this.redo_index; //向當(dāng)事人傳輸數(shù)組的下標(biāo)
let _index = --this.redo_index;
this.redo_index = _index;
this.socket.emit('upSerRedoArr',socketMessage);
let _img = new Image();
_img.src = '';
_img.src = this.imgCach_arr[_index];
_img.onload = function(){
_this.ctx.drawImage(_img,0,0);
}
}
},參考:
大漠的三篇關(guān)于移動(dòng)端適配的文章:
https://www.w3cplus.com/mobil...
https://www.w3cplus.com/css/f...
https://www.w3cplus.com/css/v...
另外一篇頁(yè)介紹到了網(wǎng)易的做法:
http://www.cnblogs.com/lyzg/p...
rem 布局方案:
http://yanhaijing.com/css/201...
https://segmentfault.com/a/11...
1px 的討論:
https://www.cnblogs.com/river...
先弄明白為什么移動(dòng)端要進(jìn)行適配?移動(dòng)端適配想要達(dá)到的效果是怎樣?(這個(gè)看需求,需求不一樣,適配的方法也不一樣)
try:
except...
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
北大課工場(chǎng)是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國(guó)家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國(guó)制造2025”,實(shí)現(xiàn)中華民族偉大復(fù)興的升級(jí)產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國(guó)職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。