找到了 是在我的vscode中配置項的用戶設(shè)置路徑寫錯了。。。下圖是寫對的。
eslint.options: { "configFile": "/Users/yangfan/wechat/WeChat_App/.eslintrc.js"}
value:"2018年01月01日 至 2018年01月23日"
我的理解是作為瀏覽器應(yīng)該在這個地方做了優(yōu)化,或者說本來就應(yīng)該做到刪除元素時,自動刪除綁定在這個元素上的事件監(jiān)聽器。既然元素都要被刪除了,事件監(jiān)聽器肯定也沒有意義了。
另外事件監(jiān)聽器其實可以理解為元素的一個屬性
只需要導入 iview.css 就行了
樓上說的是對的,出現(xiàn)這種原因有很多種,可能是有的瀏覽器屏蔽了靜態(tài) css 文件里面的外部鏈接或者是緩存導致。
清除一下瀏覽器緩存即可
你用的什么命令?我用checkout和branch都是可以的:
有這么幾個問題需要注意和解決,希望能幫助到你:
1、本地測試是無法使用的,請上傳到服務(wù)器測試
2、請確保安裝了Adobe Flash Player
3、如果是復制的內(nèi)容來自輸入框input、textarea等,copy對象使用:
copy: function(){
return $(xxx).val();
}
4、如果是復制的內(nèi)容來自頁面元素div、p之類的,copy對象使用:
copy: $(xxx).text();仔細看看文檔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>通過我的簡單的介紹, 不知道你的問題解決沒, 思路回顧:
經(jīng)過我的反復大量的測試, 初步推斷, 插件與autoprefixer有沖突, 調(diào)整了autoprefixer的順序后, 即可編譯, 當然cssnano也會導致問題存在. 具體優(yōu)化方案有待調(diào)整, 我發(fā)布了分支postcss-neat你可以參考下.
我又測了一會, 當然也有可能和其他插件有沖突, 比如你使用的px2rem, 我這里就不再測試了, 給你的建議就是:
- 搞清楚PostCSS的插件的執(zhí)行方式和流程, 知道自己用的插件究竟是什么目的, 參閱PostCSS自學筆記(二)【番外篇二】
- 實在不知道的情況下, 還是搞一個簡單的demo比如我剛提到的我那個分支, 有時候感覺很麻煩, 但是他更容易解決問題, 并帶來意想不到的收獲?
然后根據(jù)你這個真實環(huán)境, 我測了一下. 也發(fā)布了有一個分支=- =postcss-salad.
的確還是插件執(zhí)行順序問題. 我這里編譯正常, 我的postcss.config.js如下:
module.exports = {
parser: 'postcss-scss',
plugins: [
require('postcss-plugin-px2rem'),
require('postcss-salad'),
require('postcss-neat')
]
};
另外你在學習使用過程中, 多看看插件文檔, 比如這個餓了么的這個salad, 包含以下這些插件https://github.com/ElemeFE/po..., 有時候也許這里面的插件也會和其他插件發(fā)生沖突, 所以需要注意.
希望有所幫助~
在data中加一個currentIndex,代表選中的索引,點擊的時候改變一下
data() {
return currentIndex:0
},
methods: {
typeName(index) {
this.currentIndex = index
}
}
<ul>
<li v-for="(i,index) in type_name" :class="index===currentIndex?'active_ia':''" @click="typeName(index)">{{i.type_name}}</li>
</ul>Return Values ?
Returns FALSE if var exists and has a non-empty, non-zero value. Otherwise returns TRUE.
The following things are considered to be empty:
"" (an empty string)
0 (0 as an integer)
0.0 (0 as a float)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
$var; (a variable declared, but without a value)
不同語言沒法比, 比如:
foo($foo)不存在, PHP的empty($foo)不會報錯, 返回FALSE, 而JS中!foo則會報ReferenceError`undefined類型而PHP中沒有NaNPHP中沒有float和int的概念, 都是number, 統(tǒng)一用IEEE-754表示, 所以會有NaN, -0, Infinity等幾個特殊值.如果可以對比的話:
"", NULL/null, FALSE/false, 0(0.0)/0都會假[]在PHP中為假, JS中為真不會,瀏覽器關(guān)閉(標簽頁關(guān)閉)需要監(jiān)聽onbeforeunload之類的事件,你的這個需求應(yīng)該是要求你在 處理退出登錄 邏輯的時候保存數(shù)據(jù)
關(guān)系應(yīng)該是:<button hover-class="button-hover"></button>
不可以這么寫哦,可以這樣:
v-if="[2,1,-1].includes(item.casestatus)"Settings - Languages & Frameworks - JavaScript內(nèi)
把JS版本改成ECMAScript6就行了
不要把jsx存到state里,而是應(yīng)該把數(shù)據(jù)存到state里,類似:
state= {
userTels:[]
}
addTels = () => {
this.setState({
telsInput: [...this.state.userTels, ''],
removeable: true,
})
}
在render函數(shù)里:
<span>
{
this.state.userTels.map((item, number) => {
return (
<Input
placeholder={"電話" + number}
size="large"
key={number}
ref={(node) => this['userTels' + number] = node}
prefix={<Icon type="phone" />}
onChange={(e) => { this.onChange(e, 'tel', number - 1) }}
value={item}
style={{ marginTop: '10px' }}
/>
)
})
}
</span>this.props在定義的時候有賦類型HelloProps嗎?
antd/mobile 這兩個都屬于組件形式的框架,其中包括常用的 button、table、tree等React控件,你通過antd cli init的project,也緊緊是在package.json中引用了antd的包而已。所以,就好比你用bootstrap一樣,提供給你的只是基礎(chǔ)元素,頁面最終長什么樣子還得你用組件堆,至于各組件怎么用,去api文檔中看,很全。
至于目錄,目前React都是跟Redux結(jié)合使用,所以請看這兩篇:
A Better File Structure For React/Redux Applications
Redux + React 應(yīng)用程序架構(gòu)的 3 條規(guī)范
兩年編碼經(jīng)驗中,不是form-data的話,其余一律傳object過去就行了,json格式的沒遇到過~
特地改了下項目的接口參數(shù)為json對象,如下:
let defaultParams = {
"one": 1,
"two": 2,
"three": 3
}
和傳普通object,顯示是一樣的,后端解析應(yīng)該也是一樣的
let defaultParams = {
one: 1,
two: 2,
three: 3
}https://github.com/ant-design...
持續(xù)關(guān)注官方github issue
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進“中國制造2025”,實現(xiàn)中華民族偉大復興的升級產(chǎn)業(yè)鏈。利用北京大學優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓領(lǐng)域的先行者
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務(wù)負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通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)師。