加個readonly?
汗,換電腦用vscode時git目錄多了一層文件夾
用個全局變量,默認為false,捕獲一次之后設置為false,在事件處理函數(shù)里判斷為true的情況下繼續(xù)冒泡,否則不冒泡
iview是基于vue框架的,要先引入vue.js再引入iview.js
你也看到了requests的結(jié)果是response success
而不是http success
,只要有響應這個請求都是成功的,只有請求一個不存在的網(wǎng)址或者網(wǎng)絡錯誤才會響應失敗。舉個例子是一個是賣雞蛋沒買回來,一個是賣了壞的雞蛋回來
同跟樓上的想法類似,先進行數(shù)據(jù)的預處理會比較方便,當然 如果后臺會給你做這個事情更好,但是,自己處理一下也不是難事。
let articleList = [
{ id: 1, name: '小紅', user: 456312, Occupation: '教練' },
{ id: 2, name: '小張', user: 456321, Occupation: '歌手' },
{ id: 5, name: '小強', user: 456312, Occupation: '老師' },
{ id: 2, name: '小分', user: 456312, Occupation: '同事' },
{ id: 5, name: '小撒', user: 456132, Occupation: '總經(jīng)理' },
{ id: 2, name: '小看', user: 456132, Occupation: '程序猿' },
{ id: 5, name: '小貧', user: 451632, Occupation: '演員' },
];
let hashMap = articleList.reduce((hashMap, next) => {
hashMap[next.id] = hashMap[next.id] ? [...hashMap[next.id], next] : [next];
return hashMap;
}, {});
console.log(hashMap);
你可以嘗試一下遞歸
{
prop: "",
label: "操作",
render: (h, param) => {
const dropDownData = {
label: "操作",
items: [
{ label: "修改", func: { func: "update", uuid: param.row.uuid } },
{ label: "刪除", func: { func: "del", uuid: param.row.uuid } }
]
};
// 觸發(fā)MyDropDown的update和del事件
return h(MyDropDown, {
props: { dropDownData: dropDownData },
on: { update: this.update, del: this.del }
});
}
}
其中,MyDropDown是我自己封裝的下拉菜單組件,通過props傳給組件值,on來監(jiān)聽觸發(fā)的事件
<template>
<el-dropdown trigger="click" @command="handleCommand">
<el-button type="primary">
<span v-text="dropDownData.label"></span><i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown" >
<el-dropdown-item :command="item.func" v-text="item.label" v-for="(item,index) in dropDownData.items" :key="index"></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<script>
export default {
props: ["dropDownData"],
methods: {
handleCommand(command) {
this.$emit(command.func, command.uuid);
}
}
};
</script>
這是一個簡單的封裝element-ui 的 dropDown組件,通過handleCommand方法觸發(fā)事件
------2018年01月13日23:10:32 補充
render渲染函數(shù)代碼也一起貼上來
<script>
export default {
functional: true,
props: {
row: Object,
render: Function
},
render: (h, ctx) => {
return ctx.props.render(h, ctx.props.row);
}
};
</script>
template標簽里寫兩個<div v-on:click="arrowChange"><img src="up.png" v-show="isup"><img src="down.png" v-show="!isup"></div>,data里定義isup的值為true,methods里添加arrowChange:function(){this.arrowChange=!this.arrowChange},就可以了
極限可能是5萬個字符的字符串
自己先算一下多大吧。
算你一個字符占 4 個字節(jié),一共 20萬字節(jié),不到 200K 的數(shù)據(jù),你覺得很大?
*{
padding: 0;
left: 0;
}
body{
padding-top: 50px;
}
.header{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 50px;
line-height: 50px;
text-align: center;
background-color: red;
z-index: 10001;
}
.layout{
display: flex;
position: relative;
}
.layout .layout-left{
flex: 0 0 200px;
flex-direction:column;
width: 200px;
color: #fff;
background-color: blue;
}
.layout .layout-right {
background-color: yellow;
overflow-y: auto;
overflow-x: hidden;
position: absolute;
left:215px;
top: 0;
bottom: 0;
right: 0;
margin: auto;
}
各位大哥,小弟錯了。redux-observable 這么著名的 redux 中間件怎么會有這種問題呢。
function (action$: Observable<Action>, store: Store): Observable<Action>;
這是 redux-observable 的處理 action 的回調(diào)函數(shù),第二個參數(shù)就是 store。也就是說 redux-observable 可以同時獲取 action 和 store,像 reducer 一樣的處理數(shù)據(jù)流。
看一些例子遠遠不夠,還是要老老實實啃文檔 233
請問你解決了嗎,我也遇到這個問題了
假設你的域名是www.abc.com
首先你在后臺按照現(xiàn)有的form,用Gravity Forms新建一個一模一樣的form,注意字段的name要完全匹配,取得這個form的ID號,假設是1
然后把你現(xiàn)有的form的提交地址寫成:
http://www.abc.net/gravityfor...×××××&signature=×××××&expires=1497603994
api_key和signature在 Gravity Forms的設置 - Web API里獲取。上面這個URL也可以在Web API的開發(fā)者工具里面直接獲取
就這么簡單
什么版本的安卓機器,是所有的安卓機器都會這樣嗎?還是部分
你是通過js控制的,賦值的時候給第2個一起賦值就行了
js想取mac碼只能在IE瀏覽器下通過ActiveX取得,如果是想要一個唯一標識的話可以取guid
下面這個函數(shù)可以生成一個隨機guid,碰撞幾率可以忽略不計,可以認為是唯一的。
這個函數(shù)也是網(wǎng)上找的,在我的項目中使用過
function generateUUID() {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16);
});
return uuid;
};
偽類不是真正的DOM,不能被js的選擇器選擇,所以不能綁定事件
1.小括號的用法之一是執(zhí)行單個或多個表達式,并返回最后一個表達式的值,多個表達式之間需要用逗號“,”分隔開
例:(1,2+3,4+5,6)//代碼會被一次執(zhí)行,最后將6作為返回值
2.自執(zhí)行匿名函數(shù)(function(){})()
所以你這個可以看做等于(eval)('1+1')
再次等于 eval('1+1')
當然可以,就是第一次timeEnd不會生效而已。
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構,發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構,是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術, 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構師,美國AngelEngineers Inc. 系統(tǒng)架構師。