保證數(shù)據(jù)是json數(shù)組,vue循環(huán)嵌套
<ul>
<li v-for='val in treeObj'>
<p v-for='item in val.child' >
{{val.value}}-{{item.value}}
</p>
</li>
</ul>
data() {
return {
treeObj: [{
value: '1',
child:[
{
value: '1.1',
child:[]
},
{
value: '1.2',
child:[]
}
]
}]
}
},最后想說angular2+學(xué)習(xí)曲線很高,更適合企業(yè)級開發(fā)應(yīng)用。
當(dāng)然也適合移動端, 但我覺得你在做技術(shù)選型的時候還是要考慮,angular2+究竟適不適合你們的業(yè)務(wù)需求。
應(yīng)該是都可以的,還有這么一種方法:
dataList = new Vue({
el: '#corps',
data() {
return {
items: list
}
}
});
我像你那樣寫沒問題呀,你看看這個,你是怎么玩兒的,是這樣嘛?:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<span id="corps" class="corps box">
<font>請選擇總隊</font>
<ul v-for="item in items">
<li v-html="item.fcName"></li>
</ul>
</span>
<script>
var list = [{
fcName: "0"
}, {
fcName: "1"
}];
var dataList = new Vue({
el: '#corps',
data: {
items: list
}
});
</script>
</body>
</html>有這么幾種可能
對了,還有種可能是這些沒被統(tǒng)計的注冊用戶都是機(jī)器人
這個什么鬼?問題估計處在這里,需要關(guān)閉這個資源??蓡栴}是你從哪里冒出這個ImageIO的?
這個很明顯呀,曲線橫軸是時間t,縱軸是狀態(tài)p。
如果這個曲線有一部分位于第四象限,那么就會有一段t值,會使得p<0,并且不斷減小。
假如狀態(tài)p就是元素向右偏移的距離,那么p<0不就是向左偏了嗎
之所以有一秒延遲是因為你使用的時候外部方法,如果你使用 $timeout就不會出現(xiàn)這個問題,或者你使用外部方法之后進(jìn)行一下臟值檢測。也就是在方法最后寫一個 $scope.$apply()
問題:
1.本地環(huán)境打包的 js正常
2.預(yù)發(fā)環(huán)境,測試環(huán)境打包的js報錯
問題假設(shè)(彎路):
1.node npm 版本問題導(dǎo)致打包出來js不同
2.liunx 環(huán)境差異
學(xué)藝不精:
1.export 說明 ES6 沒有成功轉(zhuǎn)為瀏覽器所支持的 ES5
2.那就應(yīng)該是babel的問題
3.
4.查看package.json 發(fā)現(xiàn)要求babel版本>=X.X.X的,猜測版本問題
5.刪了所有babel依賴重新下載,終于復(fù)現(xiàn)了預(yù)發(fā)環(huán)境的問題
6.最終解決方案固定關(guān)鍵依賴版本號
url有誤
mysql:后加//a 是 void*,不能解引用。此外 a = (int *)a; 這句毫無意義,你把 a 轉(zhuǎn)成 int*,再賦值給 a,又變成 void * 啦
閑來無事、瞎答一通、僅供參考、概不負(fù)責(zé)................
<span :class="infoStatus.class">{{infoStatus.message}}</span>
data() {
return {
infoStatus: {
class: [],
message: '待支付'
}
}
}
methods: {
statusJudge(item, message){
if (item.payment_amount === 1 ){
return
}
// 如果你的后端給你message的話 就可使用message替換文字描述
if (status ===1) {
this.infoStatus.message = '待支付'
this.infoStatus.class = ['error','show']
} else if ( status ===3 || status === 6 ) {
this.infoStatus.message = '已支付'
this.infoStatus.class = ['danger','hide']
} else if ( status ===3 || status === 6 ) {
this.infoStatus.message = '已超時'
this.infoStatus.class = ['xxx','sss']
}
}
}
mounted() {
axios('url').then((res) =>{
let item = res.data;
this.statusJudge(item, item.message)
})
},
不寫了。。。
先看看你控制臺有沒有報什么錯
- 所以使用module中的必須要用module.exports和require?
首先你是nodejs,8以上支持import-export,但要加運行參數(shù),并且改為.mjs,詳情看官網(wǎng)。
2.如果是按上面的方法的話不是還是將整個模塊導(dǎo)入然后再從模塊中讀取特定屬性,可是我看阮一峰的教程中是說只加載import的方法?
據(jù)我所知,無論require還是import都是整個模塊導(dǎo)入,這是nodejs的require實現(xiàn)以及ES6的import規(guī)范,let {foo,bar} = ...只是解構(gòu)語法。
參考鏈接MDN import
Given an object or value named myExport which has been exported from the module my-module either implicitly (because the entire module is exported) or explicitly (using the export statement), this inserts myExport into the current scope.
import {myExport} from '/modules/my-module.js';可以換一個思路,withShareTicket定義到全局的data里,然后wx.showShareMenu的時候給withShareTicket賦值為true,這樣就可以用this了
如果當(dāng)前只有這一個選擇,你跳轉(zhuǎn)的頁面 不就是你的選擇,不需要記下來啊
// /cpi /cloth
如果是當(dāng)前 數(shù)據(jù) 關(guān)閉當(dāng)前標(biāo)簽頁 消失可以存在 session Storage 里面 否則存在 local Storage里面
sessionStorage.setItem("data1", "value");
// undefined
sessionStorage.getItem("data1");
// "value"
這樣就可以再下個頁面得到 數(shù)據(jù)了
webpack都搞定了
在scripts/config/
zconf.hash.c
zconf.hash.c_shipped
兩個文件中kconf_id_lookup前加入:
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
public static void main(String[] args) throws Exception {
Thread.currentThread().join();
System.out.println("main thread exit.");
}
為了了解問題本質(zhì),我們跟進(jìn)去代碼看看,線程的join方法如下:
public final void join() throws InterruptedException {
join(0);
}
再繼續(xù)跟:
public final synchronized void join(long millis)
throws InterruptedException {
long base = System.currentTimeMillis();
long now = 0;
if (millis < 0) {
throw new IllegalArgumentException("timeout value is negative");
}
if (millis == 0) {
while (isAlive()) {
wait(0);
}
} else {
while (isAlive()) {
long delay = millis - now;
if (delay <= 0) {
break;
}
wait(delay);
now = System.currentTimeMillis() - base;
}
}
}
根據(jù)代碼,其實join方法最終是待用了wait(0);這行代碼,而wait方法是本地方法.
根據(jù)wait的方法定義,有以下幾點逐一說明:
<ul>
<li>Some other thread invokes the {@code notify} method for this
object and thread <var>T</var> happens to be arbitrarily chosen as
the thread to be awakened.
<li>Some other thread invokes the {@code notifyAll} method for this
object.
<li>Some other thread {@linkplain Thread#interrupt() interrupts}
thread <var>T</var>.
<li>The specified amount of real time has elapsed, more or less. If
{@code timeout} is zero, however, then real time is not taken into
consideration and the thread simply waits until notified.
</ul>
因此,回答你的問題就是,join方法實質(zhì)是調(diào)用了wait方法.wait方法調(diào)用后阻塞(我不認(rèn)為這是阻塞)在當(dāng)前線程(main線程上),根據(jù)wait的定義,不調(diào)用notify,notifyAll,interrupt以及超時機(jī)制(本例調(diào)用的是wait(0),故不存在這種情況),那么線程將一直處于等待狀態(tài),故一直不會退出。
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國制造2025”,實現(xiàn)中華民族偉大復(fù)興的升級產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐ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é)及管理工作。
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通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)師。