如果想使用typescript開發 需要注意盡量使用原生的元件與api
少使用vue的語法 因為在編譯的時候會進行判斷會報語法之類的錯誤
plus.os.name 判斷系統
plus.android
plus.ios
呼叫原生api
native.js for android
var njshello = plus.android.
importclass
("io.dcloud.njshello");
// 建立njshello的例項物件
var hello =
newnjshello()
;njshello.
ctype
; njshello.
testcount()
; njshello.
plusgetattribute
("count");
njshello.
plussetattribute
("count",2
);var hevent = plus.android.
implements
("io.dcloud.njshelloevent",}
);
importclass匯入自定義包或者內建包
plus.android.代表通過native.js使用安卓系統方法
div css(Firefox hr 相容問題)
firefox hr 相容問題,在ie中正常顯示的hr屬性設定,在firefox裡面不管怎麼弄都是不出來,最後看到一篇文章說ff中必須設定背景顏色才有效果的,這種問題自己閉門造車的話整上個三天三夜都找不到解決辦法啊!把 貼出來分享下 hr imghrcontent 通常我們都會定義 hr 的顯示外觀...
object c c 相容問題
今天在把在另乙個工程的object c 的類移植過來,原來沒問題的類,竟然在類宣告的地方出現編譯異常 remoteplayer.h 55 error expected asm or attribute before remoteplayer 以為是編譯器的設定有問題,折騰了半天才發現,原來是乙個小問...
頁面相容問題
1.重置標籤 2.ie6雙倍邊距 1 要為塊狀元素 2 要左側浮動 3 要有左外邊距 margin left 滿足這三個條件會出現雙倍邊距 解決方案 在相應的塊狀元素的css屬性中加入 display inline 就可以了。3 content ie7 ie8 ie9 firefox可以識別上面附加...