await query.exec(function (err, users) {
if (!err) {
res = users
// console.log(res) // 這里可以打印出數(shù)據(jù)
}
})
你這里要寫成 同步方式 而不是 異步語法
1.currentTarget
是指當(dāng)前事件處理函數(shù)綁定的對象,這個(gè)值不可能是null的
2.你之所以在log里看到的是null,是因?yàn)檫@個(gè)event是一個(gè)引用,在log的時(shí)候里面的一些屬性可能被重置了
Run npm install --save intl.
Run npm install --save classlist.js.
然后找到src里面的polyfills.ts文件,將注釋打開
然后找到src里面的polyfills.ts文件,將注釋打開
/**
* 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';
jQuery的事件委托相比于原生的只是做了兼容性處理,也就是使用了適配器模式。jQuery的事件處理就是這個(gè)特點(diǎn)。
可以這樣寫
setMapValue(index, jndex, value) {
this.$set(this.map[index], jndex, value)
}
console.log(this.sg)
.pic1原地不動(dòng),移入.pic1變化,只讓a變化就行了
.pic1:hover a{
animation:flip 1s 0s ease both;
transition:all 0s .2s;
}
需要在文件一開始或者塊級作用域中設(shè)置"use strict", 例如:
function test(){
"use strict";
//some other code
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
};
}
應(yīng)該是大小寫的問題:CharField才對。
react不用setState是不會(huì)觸發(fā)改變的
class Content extends React.Component {
constructor(props) {
super(props);
this.state={
majors:[{"name":"****","state":0},{"name":"****","state":0},{"name":"****","state":0}]
}
}
navchange(ind,event){
this.state.majors[ind].state = 1;
this.setState({
majors:this.state.majors
});
}
render(){
return (
<div>
<div className="top">
<div className="search">
<input type="text" placeHolder="請輸入搜索內(nèi)容" />
<span><img src="img/search.png" alt="" /></span>
</div>
<div className="majors">{
this.state.majors.map(function(item,index){
return<span className="major" key={index} onClick={this.navchange.bind(this,index)}><span className={item.state == "0" ? 'in':''} >{item.name}</span></span>
}.bind(this))
}
</div>
</div>
</div>
)
}
}
你試試v-if,v-model這些指令,或者直接用雙大括號把它顯示在頁面上,又或者你另外定義一個(gè)變量,總之可以有很多種方式來排除;因?yàn)榈谝谎劭瓷先ゴa每什么問題,你要么多貼一點(diǎn)代碼,要么只能自己慢慢排除了。
已經(jīng)嘗試過在開發(fā)者工具重新掃碼了嗎?
var result = "";聲明了是一個(gè)字符串類型,var result; 只聲明沒有定義類型。+=一般用在number或string類型上
別怪我啰嗦,深深的刺痛你。
data = b'你所拿到的全部數(shù)據(jù)'
也就是說,把你的全部數(shù)據(jù)都納入 b'' 中。如果涉及到換行問題,請自行用 Python 來處理即可。
我用Chrome模擬ios和安卓設(shè)備沒問題啊,Android設(shè)備能打印出 isAndroid
和2222
,ios打印isIOS
,我是直接用<div style="width: auto; height: 7000px;" class="panel-label"></div>
這個(gè)測試的
600-800條不分頁嗎=。=
可以在頁面onShow()
函數(shù)中設(shè)置刷新的操作
你在多個(gè)瀏覽器中測試一下呢?
你是不是 把 圖片信息, 寫到全局 類似 redux 里了 ?
北大青鳥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ù)機(jī)構(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)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(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ū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。