提交 94b8eb3e 编写于 作者: 杜庆泉's avatar 杜庆泉

新增nvue 调用 ext api 测试页面

上级 dd3e0167
......@@ -156,6 +156,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/SyntaxCase/nvueTest",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/SyntaxCase/instanceTest",
......
<template>
<div>
<text>宽:{{width}},高:{{height}}</text>
<button @tap="getSystemInfoClick">getSystemInfo测试</button>
</div>
</template>
<script>
export default {
data:{
width:"",
height:""
},
onLoad() {
console.log("onload")
},
methods:{
getSystemInfoClick:function(){
console.log("getSystemInfoClick")
try {
let systemInfo = uni.getSystemInfoSync()
this.height = systemInfo.screenHeight
this.width = systemInfo.screenWidth
console.log("globalScreenHeight",this.height,"globalScreenWidth",this.width)
} catch (e) {
// 兼容本地测试
console.error(e)
}
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -130,6 +130,10 @@
{
name: "混编测试示例",
url: "SyntaxCase/MixNativeCode"
},
{
name: "nvue语法示例",
url: "SyntaxCase/nvueTest"
}
]
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册