slice是JavaScript方法沒錯,但是你寫的地方不是在script標(biāo)簽內(nèi)呀,怎么能使用呢?如果要對數(shù)據(jù)進(jìn)行處理,可以在返回數(shù)據(jù)的時候就把數(shù)據(jù)處理后再賦值到list中去。
參照樓上的修改了一下,嘻嘻
var deep = 0;
function getMaxDepthByKey(str, data) {
for (var i = 0; i < data.length; ++i) {
if (str === data[i].key) {
deep = getDeep(data[i]);
break;
} else {
if (data[i].hasOwnProperty('children')) {
getMaxDepthByKey(str, data[i].children);
}
}
}
return deep;
}
var maxLen = [];
function getDeep(data) {
if (data.hasOwnProperty('children')) {
maxLen[data.key] = 0;
for (let item of data.children)
maxLen[data.key] = Math.max(maxLen[data.key], getDeep(item) + 1);
return maxLen[data.key];
} else {
return 0;
}
}
console.log(getMaxDepthByKey('tree1', treeData));//3
console.log(getMaxDepthByKey('tree2', treeData));//2
console.log(getMaxDepthByKey('tree3', treeData));//1
console.log(getMaxDepthByKey('tree4', treeData));//0
console.log(getMaxDepthByKey('tree5', treeData));//0
console.log(getMaxDepthByKey('tree6', treeData));//0
console.log(getMaxDepthByKey('tree7', treeData));//0<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="layui/css/modules/layer/default/layer.css"/>
<link rel="stylesheet" type="text/css" href="layui/css/layui.css"/>
<script src="https://cdn.bootcss.com/jquery/2.1.0/jquery.js"></script>
<script src="layui/lay/modules/layer.js">
</script>
</head>
<style type="text/css">
#our{
width: 200px;
height: 50px;
background: red;
}
#you{
width: 200px;
height: 50px;
background: blue;
}
</style>
<body>
<div id="our">
我們
</div>
<div id="you">
你們
</div>
</body>
</html>
<script type="text/javascript">
$("#our").on("click",function(){
layer.open({
type: 1,
skin: 'layui-layer-rim', //加上邊框
area: ['1000px', '700px'], //寬高
title: '帖子詳情',
content: "加油"
});
})
$("#you").on("click",function(){
layer.open({
type: 1,
skin: 'layui-layer-rim', //加上邊框
area: ['1000px', '700px'], //寬高
title: '帖子詳情',
content: "必勝"
});
})
</script>
i-remember 要吊炸天的去three.js官網(wǎng)看看案例
已經(jīng)知道為什么了 是我自己類名寫錯了。。。。。
可能是IE的bug。試試IE64位?
5g = 5*1024*1024*1024 = (2^2+2^0)*2^10*2^10*2^10 已經(jīng)超過了 2^32-1 表示的值;請問,以上用了哪些技術(shù)
這里即沒有限定是瀏覽器環(huán)境,也沒有限定是 HTTP 協(xié)議。
所以,最簡單的處理方式,就是客戶端直接創(chuàng)建 2 個連接,以 RPC 方式,一個連接主動,一個連接被動。
沒有任何“技術(shù)”,最普通,最基本的網(wǎng)絡(luò)編程知識。
打開控制臺看form表單,那才有詳細(xì)的
或者去看你這個頁面的名字,去控制器找這個方法,上面那么寫意思就是提交到本方法
其實(shí)就是把你的本地代理的規(guī)則放到nginx服務(wù)器上就好了。 你去找下你的本地代理的規(guī)則。 讓運(yùn)維給你配上。
或者自己寫上去就可以了
其實(shí)解決這個問題簡單的:使用異步請求的datasFilter,和添加dom的addDiyDom方法就能搞定了。在此,非常感謝ztree的作者能開發(fā)出這么完美的插件。
同一域名下的移動端項(xiàng)目卻毫無問題,我甚至把移動端的facebook登錄完全copy過來還是同樣的錯誤,有大佬知道問題嗎
可以用v-show+vue過渡動畫,這樣就可以實(shí)現(xiàn)
自己解決了。
我發(fā)現(xiàn)人家已經(jīng)寫好了插件了。具體可以看人家的源碼實(shí)現(xiàn):
https://github.com/metachris/...
可以設(shè)置不同的z-index值 啊
H5路由這樣就行 try_files $uri $uri/ /index.html =404;
server {
listen 80;
server_name xxx.cn;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
root /home/u/depolyfile/deploy;
index index.html index.php index.htm;
try_files $uri $uri/ /index.html =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ /\.ht {
deny all;
}
}swiper2 兼容性是IE7~10。
仔細(xì)看看文檔collapse的部分呢。
<div id="accordion">
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</button>
</h5>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</button>
</h5>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</button>
</h5>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
<div class="card-body">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
</div>
</div>你吧項(xiàng)目打包一下.看下路徑嘛,你的圖片是使用copy-webpack-plugin 插件處理的嗎?
git ignore文件改一下
ES6中對象新增方法,屬性名表達(dá)式。
let obj = {
['h' + 'ello']() {
return 'hi';
}
};
obj.hello()
常量的寫法只是一種風(fēng)格,官方文檔也說了,不是必須使用的。
北大青鳥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”,實(shí)現(xiàn)中華民族偉大復(fù)興的升級產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jī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ù), 熟練的跨平臺面向?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)師。