剛好寫了一部分看到 幫你補了一級 沒測過 可以試試看
<Menu @on-select='getName'>
<template v-for="firstMenu in menuList">
<Submenu v-if="firstMenu.children" :key="firstMenu.text" :name="firstMenu.text">
<template slot="title">
<Icon type="ios-navigate"></Icon>
<span v-text="firstMenu.text"></span>
</template>
<template v-for="secondMenu in menuList">
<Submenu v-if="secondMenu.children" :key="secondMenu.text" :name="secondMenu.text">
<template slot="title">
<Icon type="ios-navigate"></Icon>
<span v-text="secondMenu.text"></span>
</template>
<Menu-Item v-for="thirdMenu in secondMenu.children"
:name="thirdMenu.name"
:key="thirdMenu.name"
v-html="thirdMenu.title">
</Menu-Item>
</Submenu>
<Menu-Item v-else :name="secondMenu.text"
:key="secondMenu.text"
v-html="secondMenu.text">
</Menu-Item>
</template>
<Menu-Item v-for="secondMenu in firstMenu.children"
:name="secondMenu.name"
:key="secondMenu.name"
v-html="secondMenu.title">
</Menu-Item>
</Submenu>
<Menu-Item v-else :name="firstMenu.text"
:key="firstMenu.text"
v-html="firstMenu.text">
</Menu-Item>
</template>
</Menu>
簡單寫了個方法:
resetTree (oldTree) {
let newTree = oldTree.map(item => {
if (item.children) {
return {
...item,
title: item.name,
children: this.resetTree(item.children)
}
} else {
return {
...item,
title: item.name
}
}
})
return newTree
}
仔細(xì)找一下路徑吧 寫一個絕對路徑
axios
默認(rèn)是不帶cookie
的,需要把withCredentials
設(shè)置為true
。
在git的issue上找到了原因,表單組件的change事件和Pagination的current-change事件現(xiàn)在僅響應(yīng)用戶交互。1.x的版本是可以觸發(fā)的,因為升級了2.x所以有這個問題了
你把那個if的大括號去了,它控制的流程其實只有下面一行,就是那個$this->uid,就是:
if(true)
//code1 受到if控制
//code2 沒有收到if控制
.row
p 財經(jīng)新聞:
.buttonsRight
.item(v-for="(item,index) in taxData.caijing"
:class="taxDataForm.caijing.includes(item)?'active':''"
@click="handclick('caijing',item)") {{item}}
.row
p 熱點聚焦:
.buttonsRight
.item(v-for="(item,index) in taxData.redian"
:class="taxDataForm.redian.includes(item)?'active':''"
@click="handclick('redian',item)") {{item}}
.row
p 行業(yè)資訊:
.buttonsRight
.item(v-for="(item,index) in taxData.hangye"
:class="taxDataForm.redian.includes(item)?'active':''"
@click="handclick('hangye',item)") {{item}}
methods:{
handclick(str,item){
let arr;
if(this.taxDataForm[str]){
arr = this.taxDataForm[str]
}else{return}
arr.includes(item)?this.taxDataForm[str]=arr.filter(a=>a!==item):arr.push(item)
}
}
不是很清楚你說的記住密碼是指什么適配什么樣的場景,方案太多了。
1.可以客戶端保存cookie
,服務(wù)端維持session
;
2.可以使用jwt(json web token)
;
3.可以將賬號密碼保存在localStorage
里面;
……
click換成change事件試試呢
123asdfasdfa
Foo() 中
window.getName 被重新賦值
cnode的源碼,可以去看看
這是 firing 設(shè)置為 true 的時間段,其中會執(zhí)行 list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ]
,這里是執(zhí)行 callback 的地方
for ( ; queue.length; firingIndex = -1 ) {
memory = queue.shift();
while ( ++firingIndex < list.length ) {
// Run callback and check for early termination
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
options.stopOnFalse ) {
// Jump to end and forget the data so .add doesn't re-fire
firingIndex = list.length;
memory = false;
}
}
}
// Forget the data if we're done with it
if ( !options.memory ) {
memory = false;
}
而執(zhí)行 callback 的過程中將 firing 設(shè)置為 true ,memory 模式下每次 add 一個新函數(shù)都會執(zhí)行前面結(jié)過記憶的參數(shù),這里這樣做加一個 flag 防止一些不可控的 bug (例如死循環(huán))
舉個例子:
var callbacks = $.Callbacks( "memory" );
callbacks.add(function(value) { return callbacks.add(function(value) { console.log(value) }) });
callbacks.fire( "foo" );
callbacks.add(function(value) { return callbacks.add(function(value) { console.log(value) }) });
如果某一個 callback 里面重新加入了一個 callback,那么 memory 模式下就必須多次執(zhí)行之前的參數(shù),這里的結(jié)果就不是 foo foo 了。
用了koa-body中間件,應(yīng)該可以直接ctx.body獲取參數(shù)好像
input和下拉框作為兄弟節(jié)點定位到同一個父元素。
select ip,devname,F.faultCode等
from (原來的查詢語句)
where ip like '%模糊條件%'
and devname like '%模糊條件%';
this指向的問題
img.onload=function(){
this.render(imgInfo,num); // this指向img,而不是Barrel。img沒有render方法,所以報錯
num++;
}
解決方案:使用箭頭函數(shù)
img.onload= () => {
this.render(imgInfo,num);
num++;
}
我這么寫,沒有你說得問題
結(jié)構(gòu)中
<el-pagination v-if="isPaging" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage3" :current-page="pageIndex" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :page-count="totalPage" :total="totalNumber"></el-pagination>
data中:
isPaging:true, //是否顯示分頁
pageIndex:1, //當(dāng)前頁(必傳)
pageSize :10, //每頁多少條
currentPage:1, //當(dāng)前顯示3頁
currentPage3:3,
totalNumber: 1, //總條數(shù)
totalPage:1 , //總頁數(shù)
methods中:
北大青鳥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)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(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)師。