encodeURI(url)
<el-table-column fixed label="國內(nèi)階段" width="200">
<template slot-scope="scope">
<span v-html="scope.row.course"></span>
</template>
</el-table-column>
<el-table-column label="科目Module" width="546">
<template slot-scope="scope">
<span v-html="scope.row.obj"></span>
</template>
</el-table-column>
JS代碼:
//鼠標事件:1.播放音樂 2.更改背景色
function mouseEvent_changeColor() {
var tabs = document.getElementsByTagName("th");
var tabsLen = tabs.length;
for(var i=0;i<tabsLen;++i) {
var curColor;
tabs[i].onmouseover = function() {
//更改背景色
curColor = this.style.backgroundColor;
this.style.backgroundColor = "#fff";
//播放音樂
playMusic(this.id);
}
tabs[i].onmouseout = function() {
//改回原本的背景色
this.style.backgroundColor = curColor;
}
}
}
function playMusic(thisId){
var audio = document.getElementById("music");
audio.src = "songs" + "/" + thisId + ".mp3";
console.log(thisId + " " + audio.src);
audio.play();
}
HTML代碼:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Color and Music</title>
<link rel="stylesheet" href="colorAndMusic.css">
</head>
<body>
<table id="colorTable">
<tr>
<th class="_ffffcc" id="d5"> </th>
<th class="_ffcccc" id="d3"> </th>
<th class="_8696a7" id="d3"> </th>
<th class="_fffaf4" id="d4"> </th>
<th class="_cc9999" id="d2"> </th>
<th class="_e3b4b8" id="d2"> </th>
<th class="_eea2a4" id="d1"> </th>
<th class="_8fb2b9" id="d3"> </th>
</tr>
</table>
<audio src="" id="music"></audio>
<script src="colorAndMusic.js"></script>
</body>
</html>
除了修改代碼之外,發(fā)現(xiàn)ogg格式播放有問題。雖然chrome支持ogg,但只要更換成MP3格式就能正常播放。
npm run build之后用自己寫的server.js打不開
這是什么意思,從代碼上看server.js
是運行在服務(wù)端的一個靜態(tài)資源服務(wù),那么為什么要打包到dist,又不能在瀏覽器端運行,是我理解錯問題了嗎。
setState
dispatch
, 然后子組件中通過mapStateToProps
得到請求值從 vue-loader 9.x 開始,父組件的 scoped 樣式會作用在 slot 里的內(nèi)容上。詳情見 https://github.com/vuejs/vue-...。翻了下文檔好像的確沒有提起這件事,你可以在那個 issue 下面評論建議他們把這條加到文檔里去
你定時器里面的函數(shù)執(zhí)行已經(jīng)超出了promise塊的控制,你只有調(diào)用resolve或reject才能讓它重新控制
fun方法返回了一個對象 對象的fun屬性又是這個fun方法 所以不論調(diào)誰的fun方法 都返回一個對象 可以對輸入的參數(shù)做記憶
我只對javascript熟悉,其他做不出解答。
但是在JS中,數(shù)字類型只有number類型,不分 int float double等,統(tǒng)統(tǒng)都是number。
報錯信息不是提示你了嗎,server/views路徑下找不到error這個文件,express需要在app.js里設(shè)置view的路徑和模板引擎:
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
對應(yīng)的views文件夾下應(yīng)該有個error.jade。
:key
指定錯了應(yīng)該會導(dǎo)致此異常 ?
<div v-for="(value,index) in starUnits" :key="index">
<p class="personne">{{value}}</p>
<div v-if="value.boolean"></div>
</div>
不應(yīng)該 :key="index"
應(yīng)該寫 :key="value"
因為下文有<p class="personne">{{value.title}}</p>
的一些引用。
你用的是1.0嗎?2.0應(yīng)該報錯信息更加豐富
<router-view/>?什么東西,,去掉試一下。
自己去看簡書一篇文章,思路是自己維護一個狀態(tài),再用setInterval()函數(shù)根據(jù)時間間隔觸發(fā)按鍵,變相達到同時按下的效果。
我只是搬運工~
http://www.jianshu.com/p/9b6d...
使用ssh 進入系統(tǒng)
按裝readme.md編寫server.js
使用用npm install 安裝相關(guān)包
然后使用pm2 來啟動
具體還是見文檔
你動畫設(shè)置order為4,因為你在元素上已經(jīng)設(shè)置了粉div為4了,而且DOM元素的結(jié)構(gòu)粉div在最后,當order相同時,寫在前面的div會更靠前,因而綠色div不會運動到粉色div后面
使用 console.log()
main.js
里怎么寫的,有accept嗎
了解了解vconsole?看看報錯?
listener 里的 function 的 this 不對吧, 指向的應(yīng)該不是 vue 的 this, 換成() => 應(yīng)該就好了.
<script>
export default {
data: () => ({
isShowCover: false
}),
mounted() {
let self = this; // 這里
window.addEventListener(
"onorientationchange" in window ? "orientationchange" : "resize",
function() {
if (window.orientation === 90 || window.orientation === -90) {
//想把下面的alert換成能夠控制v-show的代碼
alert(
self.$options.methods.showCover() +
"橫屏可能導(dǎo)致頁面異常,建議豎屏操作!"
); // 這里用 this 作用域就不對了.
//alert("123");僅alert純文本可以正常運行
}
//window.location.reload();
},
false
);
},
methods:{
showCover() {
return "123";
},
}
</script>
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團,成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負責(zé)iOS教學(xué)及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通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)師。