把path轉(zhuǎn)換成版本號(hào)進(jìn)行對(duì)比排序
$a = [
'1' => '0',
'2' => '0',
'3' => '0',
'4' => '1',
'5' => '1',
'6' => '2',
'7' => '1',
'8' => '1',
'9' => '2',
'10' => '3',
'11' => '3',
'12' => '2',
'13' => '1',
'14' => '1,8',
'15' => '1,8,14',
'16' => '2,9',
'17' => '1,8',
'18' => '3,10',
'19' => '3,11',
'20' => '3,10,18',
'21' => '1,8,14,15',
'22' => '1,8,14',
];
$result = treeSort($a);
print_r($result);
function treeSort($arr)
{
$list = [];
foreach ($arr as $key => $item) {
$version = $item == 0 ? $item : ('0.' . $item);
$list[] = [$key, str_replace(',', '.', $version) . '.' . $key];
}
$mySort = function ($a, $b) {
return version_compare($a[1], $b[1], 'ge');
};
usort($list, $mySort);
$tree = [];
foreach ($list as $item) {
$tree[$item[0]] = $arr[$item[0]];
}
return $tree;
}
1、復(fù)制鏈接???
2、是否是同一url 相同url微信內(nèi)不刷新
你問區(qū)別的話,沒有太大的區(qū)別, 都是云服務(wù)器, 而且都是比較成熟的。
那些深層的、細(xì)微的區(qū)別, 中小企業(yè)以及普通用戶是接觸不到的
關(guān)于web的一切標(biāo)準(zhǔn)都可以MDN web docs上查找
https://developer.mozilla.org...
如果要看最新的東西一定要看英文頁(yè)面的(比如你問的兼容性現(xiàn)狀)
直接用<hr/>標(biāo)簽即可。
然后設(shè)置一下css
hr {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #EEEEEE -moz-use-text-color #FFFFFF;
border-style: solid none;
border-width: 1px 0;
margin: 18px 0;
}
既然用Vue,就不要用jQuery了,你這個(gè)需求需要使用動(dòng)態(tài)模板(dynamic template),步驟這樣:
1 需要用vue的full版本(包括compiler),而不僅是runtime版本,在webpack配置中需要增加一個(gè)alias,類似
vue: 'vue/dist/vue.js'
2.然后在模板文件中,使用下面的方式來嵌入動(dòng)態(tài)模板
<component :is="dynamicTemplate()" />
dynamicTemplate函數(shù)需要返回處理好的模板內(nèi)容,類似:
return Vue.compile('<div>' + dynamicContent +'</div>')
之所以再套一個(gè)div,是因?yàn)閂ue的模塊需要單根。如果在動(dòng)態(tài)模板內(nèi)容中依賴一些組件,這些組件需要提前注冊(cè)好,可以使用vue的全局模塊注冊(cè)。
bind
是不可能bind
的
setInterval(() => {
update.call(null, Math.random())
}, 1000)
filter: blur(0px);
改為
filter: none;
可以解決問題。
將拿到的數(shù)據(jù)保存在data里面,再將data里面的數(shù)據(jù)拿出來渲染就ok了
<template>
<div>
{{myData.name}} // 在此進(jìn)行渲染
</div>
</template>
<script>
export default {
data () {
return {
myData: {
name: ""
}
}
},
methods: {
getData () {
const getFromDb = {name: 1} // 假設(shè)查詢到的是一格對(duì)象
this.myData = getFromDb // 將查詢到的數(shù)據(jù)保存在data里
}
}
}
</script>
加上這個(gè)css呢:-webkit-print-color-adjust: exact;試試
element 里沒有提供這樣的組件,type 可以為year/month/date/week/ datetime/datetimerange/daterange
這些,你想要的效果應(yīng)該是type=daterange 這種效果的。
你可以用兩個(gè)周組件進(jìn)行組合可以達(dá)到你想要的效果
function spider() {
return new Promise((resolve,reject)=>{
request(xxx,(e,r)=>{
e?reject(e):resolve(r);
});
});
}
使用
try{
await spider();
}catch(e){
console.log(e);
}
//解決第三方軟鍵盤喚起時(shí)底部input輸入框被遮擋問題
var bfscrolltop = document.body.scrollTop;//獲取軟鍵盤喚起前瀏覽器滾動(dòng)部分的高度
$("input.inputframe").focus(function(){//在這里‘input.inputframe’是我的底部輸入欄的輸入框,當(dāng)它獲取焦點(diǎn)時(shí)觸發(fā)事件
interval = setInterval(function(){//設(shè)置一個(gè)計(jì)時(shí)器,時(shí)間設(shè)置與軟鍵盤彈出所需時(shí)間相近
document.body.scrollTop = document.body.scrollHeight;//獲取焦點(diǎn)后將瀏覽器內(nèi)所有內(nèi)容高度賦給瀏覽器滾動(dòng)部分高度
},100)
}).blur(function(){//設(shè)定輸入框失去焦點(diǎn)時(shí)的事件
clearInterval(interval);//清除計(jì)時(shí)器
document.body.scrollTop = bfscrolltop;將軟鍵盤喚起前的瀏覽器滾動(dòng)部分高度重新賦給改變后的高度
});
[看看這個(gè)] https://blog.csdn.net/github_...
你可以不實(shí)時(shí)監(jiān)控計(jì)算啊。你在input失去焦點(diǎn)事件的時(shí)候,對(duì)輸入的數(shù)據(jù)進(jìn)行一個(gè)過濾就行了。
另一個(gè)問題里已經(jīng)有解釋和解決辦法https://segmentfault.com/q/10...
官方不推薦使用事件委托。
Is event delegation necessary?
Well, delegation has two main advantages: one is practical - it saves you from having to add (and remove!!) those listeners individually. But Vue already does that for you.The other one is performance / memory. But since every click listener in a v-vor loop would use the same callback, this is minimal unless you have hundreds or thousands of rows.
And finally, you can use delegation pretty easily by adding an @click listener to the <ul> element instead of the children. But then you have to resort to checks on the click target to evaluate which item in your data it might represent. So I would only use that if you truly find any performance problems without delegation.
router.get('/hello/:name', async (ctx, next) => {
....
ctx.response.body = result //數(shù)據(jù)結(jié)果;
});
提取公共方法
$(".menu_her").click(function(){
click("menu_her");
});
$(".menu_service").click(function(){
click("menu_service");
});
function click(evt){
$("."+evt).slideToggle();
if($("."+evt).text().indexOf("right")==-1){
$("."+evt+" .material-icons").text('chevron_right');
}else{
$("."+evt+" .material-icons").text('expand_more');
}
};
先把node_modules文件夾刪除掉,然后重試
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
北大青鳥中博軟件學(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),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資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庫(kù),具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問,美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。