設(shè)置 :host 樣式之后,報(bào)錯(cuò):
Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(::2:1)This wxss file is ignored.
網(wǎng)友回復(fù):
我試驗(yàn)了一下,也是報(bào)同樣的錯(cuò)誤
另外如果我想寫這樣的代碼
.weui-cells:before{ top : 0 ; border-top : 1 rpx solid #d9d9d9 } .weui-cells:after, .weui-cells:before{ content : " " ; position : absolute ; left : 0 ; right : 0 ; height : 1px ; color : #d9d9d9 } .weui-cells:after{ bottom : 0 ; border-bottom : 1 rpx solid #d9d9d9 } |
改成:host 如何來寫呢,官方還支持
抱歉,這個(gè)是文檔提前發(fā)布了的問題。稍后我們會發(fā)布新版開發(fā)者工具支持。
你好,我們已經(jīng)發(fā)布了1.7.3,且文檔已更新,請參考新的文檔。
1.7.3 沒有找到啊,新的文檔還是以前的那些說明
最新的工具是
手機(jī)上的是1.7.3
現(xiàn)在可以實(shí)現(xiàn)這樣的樣式嗎
:host::before{top:0;border-top:1rpx solid #d9d9d9}
:host::after,
:host::before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}
:host::after{bottom:0;border-bottom:1rpx solid #d9d9d9}
不可以的,我們現(xiàn)在只開放了最基本的 :host 單獨(dú)使用的情況。
愛盈利-運(yùn)營小咖秀(www.jza6.com) 始終堅(jiān)持研究分享移動互聯(lián)網(wǎng)App運(yùn)營推廣經(jīng)驗(yàn)、策略、全案、渠道等純干貨知識內(nèi)容;是廣大App運(yùn)營從業(yè)者的知識啟蒙、成長指導(dǎo)、進(jìn)階學(xué)習(xí)的集聚平臺;
想了解更多移動互聯(lián)網(wǎng)干貨知識,請關(guān)注微信公眾號運(yùn)營小咖秀(ID: yunyingshow)