如果你正在訪問的路徑和域名不符合cookie中path和domain設(shè)置,cookie是不會提交到后端的。如果符合cookie會提交到后端,koa獲取cookie可以通過如下的方式
//koa 使用 cookies 模塊
ctx.cookies.get(name, [options])https://segmentfault.com/q/10...
站內(nèi)的解決方法
已解決
return parent::render($e);
上面沒有把參數(shù)傳遞進(jìn)去
const Article = resolve => require(['../components/page/Article'], resolve) //懶加載
本質(zhì)上沒區(qū)別的,是不是類似有key的數(shù)組不清楚,只是vue里的數(shù)組如果按照原生的操作方式去修改的話vue檢測不到數(shù)組的變化,從而實(shí)時更新界面
已查到原因,是被別人的樣式覆蓋,以為是雙向綁定導(dǎo)致radio顯示有問題
console里面不是寫的很清楚,你跨域了么
你沒注意看文檔,你那個redirect使用不當(dāng),一般有這么兩種方式:
pathconst routes = [
{
path:"/HelloWorld",
component: HelloWorld
},
{
path: "/second",
component: second
},
//默認(rèn)
{
path: '/',
redirect: '/HelloWorld'
}
]
nameconst routes = [
{
path:"/HelloWorld",
name: 'helloworld',
component: HelloWorld
},
{
path: "/second",
component: second
},
//默認(rèn)
{
path: '/',
redirect: { name: 'helloworld' }
}
]
參考文檔:https://router.vuejs.org/zh-c...
希望我的回答對你有所幫助!
關(guān)閉窗口的時候沒有改變state 使頁面重新渲染嗎?
你是相對與。parent定位的啊。parent的高度沒有absolute的大,所以就會撐起滾動條啊
keep-alive緩存當(dāng)前頁面
https://www.zhihu.com/questio...
Quite simple:
>>> print '"Hello,\\nworld!"'.decode('string_escape')
"Hello,
world!"
>>> data = json.loads('{\"count\":8,\"sub_images\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470700000c7084773fb2\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470700000c7084773fb2\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/470700000c7084773fb2\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/470700000c7084773fb2\"}],\"uri\":\"origin\\/470700000c7084773fb2\",\"height\":1590},{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/47050001b69355a0bf1b\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/47050001b69355a0bf1b\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/47050001b69355a0bf1b\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/47050001b69355a0bf1b\"}],\"uri\":\"origin\\/47050001b69355a0bf1b\",\"height\":1557},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470300020761150d671a\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470300020761150d671a\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/470300020761150d671a\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/470300020761150d671a\"}],\"uri\":\"origin\\/470300020761150d671a\",\"height\":1552},{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/47000002200f2a0a9020\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/47000002200f2a0a9020\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/47000002200f2a0a9020\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/47000002200f2a0a9020\"}],\"uri\":\"origin\\/47000002200f2a0a9020\",\"height\":1575},{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/470000022011d5569ccb\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/470000022011d5569ccb\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/470000022011d5569ccb\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/470000022011d5569ccb\"}],\"uri\":\"origin\\/470000022011d5569ccb\",\"height\":1588},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/4700000220127db96444\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/4700000220127db96444\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/4700000220127db96444\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/4700000220127db96444\"}],\"uri\":\"origin\\/4700000220127db96444\",\"height\":1561},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/46ff000532e33a9fa35a\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/46ff000532e33a9fa35a\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/46ff000532e33a9fa35a\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/46ff000532e33a9fa35a\"}],\"uri\":\"origin\\/46ff000532e33a9fa35a\",\"height\":1563},{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/470700000c7b871a5fae\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/470700000c7b871a5fae\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/470700000c7b871a5fae\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/470700000c7b871a5fae\"}],\"uri\":\"origin\\/470700000c7b871a5fae\",\"height\":1575}],\"max_img_width\":1178,\"labels\":[],\"sub_abstracts\":[\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \"],\"sub_titles\":[\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\"]}'.decode('string_escape'))
>>>
>>> data["count"]
8
>>> function say(){
console.log('hi')
}
class Dog{
constructor(name){
this.name = name
}
say(){
return say()
}
}
new Dog('tom').say()二樓正解,在最外層div,加上v-cloak,然后在css樣式里面寫上[v-cloak]{display:none}。
說明一下你的源碼問題:
1.未安裝正確版本的vue-material。學(xué)習(xí)一下npm相關(guān)知識(如,安裝指定版本,卸載安裝版本,更新安裝版本)
2.既然使用了vue-cli腳手架,在main.js中import了樣式,為何還要在index.html中引入cdn樣式?那是在未使用腳手架時才那樣引入。
3.配置主題之類的,建議看看官方文檔,別照搬別人的,可能因?yàn)榘姹締栴}不符。
最后,其實(shí)所有的答案都在官方文檔里面,建議細(xì)讀。
附上修改后的源碼,下載后npm install->npm run dev看效果
報錯是<md-ripple>組件未注冊,查看一下Vue Material有無該組件,或者試一下其他組件,看有沒報錯。
------更新分割線------
看了源碼,是vue-material版本過低,應(yīng)安裝最新版"vue-material": "^1.0.0-beta-7",
重新安裝版本后,再引入default-dark主題(可自己選)import 'vue-material/dist/theme/default-dark.css'
剛剛用vue-cli新建了一個項(xiàng)目引入Vue Material測試了一下,沒有問題。
說一下引入步驟
1.打開cmd 安裝vue-material npm install vue-material@beta --save
2.在main.js中引入
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.min.css'
import 'vue-material/dist/theme/default-dark.css'
Vue.use(VueMaterial)
3.App.vue中使用組件
4.查看頁面,使用成功
請仔細(xì)核對你的引入步驟,確定是否是這樣引入的
關(guān)于這個問題,request的github中有對這個問題的討論:
request
除了你說的那些方案之外,里面也有別人說的解決方案:
request hander
你在main.js中引用了另一個項(xiàng)目的文件唄
執(zhí)行npm run build不就打包了嗎?
北大青鳥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)師。