postcss:[require('postcss-px2rem')({'remUnit':37.5,'baseDpr':2})];1.用js添加延時處理
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
#div1{
height: 100px;
width: 100px;
background: #000000;
position: relative;
}
#div2{
height: 200px;
width: 100px;
background: #00A1D6;
display: none;
position: absolute;
left: 0;
top: 130px;
}
</style>
<script>
window.onload=function(){
var a=document.getElementById('div1')
var b=document.getElementById('div2')
var x=null
b.onmouseover=a.onmouseover=function(){
b.style.display='block';
clearTimeout(x);
}
b.onmouseout=a.onmouseout=function(){
x=setTimeout(function(){b.style.display='none';
},1000)
}
}
</script>
</head>
<body>
<div id="div1">
<div id="div2"></div>
</div>
</body>
</html>
2.css,與目標(biāo)沒間隙的話把隱藏框放在你hover的目標(biāo)中,用absolute定位,hover目標(biāo)display:block;
3.css,有間隙的話用偽元素
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
#div1{
height: 100px;
width: 100px;
background: #000000;
position: relative;
}
#div2{
height: 0px;
width: 100px;
background: #00A1D6;
position: absolute;
left: 0;
top: 130px;
transition: all 0.4s ease;
overflow: hidden;
}
#div2:before{
background: transparent;
position: absolute;
top: -30px;
left: 0;
display: block;
height: 30px;
width: 100%;
}
#div1:hover #div2{
height: 300px;
overflow: visible;
}
#div1:hover #div2:before{
content: '';
}
</style>
</head>
<body>
<div id="div1">
<div id="div2">111</div>
</div>
</body>
</html>
console這個對象是由宿主環(huán)境來實(shí)現(xiàn)的~ 如果你在多個瀏覽器使用console.log(this.uiValue)的話,你還會發(fā)現(xiàn)有不一樣的顯示結(jié)果~
是不是服務(wù)器返回的header里設(shè)置了不允許緩存呢
我的大概思路是,讓SimpleCalendar插件內(nèi)部的點(diǎn)擊事件去觸發(fā)回調(diào)函數(shù),把內(nèi)部的數(shù)據(jù)通過回調(diào)函數(shù)傳出去。
// .vue部分
export default {
name:'content',
data() {
return {
selectDate:'',
date:''
}
},
mounted:function(){
this.$nextTick(()=>{
new SimpleCalendar('#container', {}, this.callback.bind(this));
})
},
methods:{
callback:function(val){
this.selectDate = val;
}
}
}
// SimpleCalendar部分
// 構(gòu)造函數(shù)添加cb
function SimpleCalendar(query, options, cb) {
...
this.cb = cb;
}
// 插件內(nèi)部點(diǎn)擊事件回調(diào)cb傳遞數(shù)據(jù)
daysElement.forEach(function (v, i) {
//鼠標(biāo)點(diǎn)擊
v.onclick = function () {
calendar.selectDay = v;
...
this.cb(calendar.getSelectedDay()+1);
}.bind(this)
}vuejs的官方插件有個叫eslint-plugin-vue,搭配eslint使用
所以eslint配置文件(.eslintrc.js)如下:
module.exports = {
//...
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/recommended', // vue-template默認(rèn)是essential 需要改成recommend
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
plugins: ['vue'],
rules: {
'vue/max-attributes-per-line': [
2,
{
singleline: 3,
multiline: {
max: 3,
allowFirstLine: false
}
}
]
}
}
你是用cnpm安裝node_modules的,沒事的,淘寶鏡像搞的,就當(dāng)npm安裝一樣的使用。
誰教你把 script 寫到 body 外面的?
你說一個網(wǎng)站為什么要有不同的頁面呢?全在一個頁面里用 click 加載數(shù)據(jù)不就好了
設(shè)想你有兩個按鈕,一個獲取“用戶列表”,一個獲取“商品列表”。
現(xiàn)在我要求:
你打算怎么做?
用路由的話,訪問者直接分別訪問 /users 和 /products 頁面就行了,并且他還能繼續(xù)把這個鏈接發(fā)給別人讓別人來看他正在看的內(nèi)容,這點(diǎn)用 click 加載數(shù)據(jù)可做不到。
如果你想要這種你說的那種 一個配置文件的
vue init webpack-simple name
這個就是一種的 簡單版本。
另外為什么會有那個build和config那種呢,那個是屬于完整版本,大而全可以這么理解
你把兩組數(shù)據(jù)都復(fù)制出來吧。我感覺是你的數(shù)據(jù)不對。還有一個疑問就是你為什么要改變他的數(shù)據(jù)格式。他本來的格式挺好的呀。這樣只用循環(huán)一次呀
obj= {陜西省: "801"}
var listArr = [
{name: '陜西', value: 0},
]
listArr.map((item) => {
return {
value: obj[item.name+'省'],
name: item.name
}
})
好像沒啥問題
$temp = unpack('C*', '這是為什么');
print_r($temp);
$temp1 = pack('C*', ...$temp);
print_r($temp1);很顯然,你取不到正確的 getUserInfo 地址。檢查一下 this 指向。如果在回調(diào)里面用最好用箭頭函數(shù)。
1、是;
2、是。但你也可以在最外層去掛載。這樣不就不需要掛載多次了嗎?
原來是我并不認(rèn)識 Unicode……
mb_convert_encoding('&#' . intval(182) . ';', 'UTF-8', 'HTML-ENTITIES')
上述可以解決這個問題,解決鏈接:chr - Notes
暫時關(guān)閉吧。
其實(shí)主要問題就是保證渲染組件,添加錨點(diǎn),連接線條按照順序更新dom保證幾個步驟更新完畢dom再進(jìn)行下一步
有了好的解決方法我會更新的
mounted 和 watch 都要執(zhí)行
ajax異步,可能是數(shù)據(jù)未獲取到,可以使用promise
北大青鳥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)師。