提交 14d50ff3 编写于 作者: W wanganxp

微调

上级 126a1cec
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
var target = evt.target; var target = evt.target;
if (target.tagName === 'BUTTON') { if (target.tagName === 'BUTTON') {
var action = target.getAttribute('data-action'); var action = target.getAttribute('data-action');
console.log(action);
switch (action) { switch (action) {
case 'switchTab': case 'switchTab':
uni.switchTab({ uni.switchTab({
......
{ {
"name" : "hello-uniapp x", "name" : "hello-uniapp x",
"appid" : "__UNI__4517034", "appid" : "__UNI__3584C99",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.5",
"versionCode" : "100", "versionCode" : 105,
"uni-app-x" : { "uni-app-x" : {},
},
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
......
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
}, },
{ {
src: logo, src: logo,
description: '非static目录' description: '非static目录(需import才能访问)'
}, },
{ {
// #ifdef APP-ANDROID // #ifdef APP-ANDROID
src: 'file:///storage/emulated/0/Android/data/io.dcloud.uniappx/apps/__UNI__4517034/www/static/test-image/logo.png', src: 'file:///storage/emulated/0/Android/data/io.dcloud.uniappx/apps/__UNI__3584C99/www/static/test-image/logo.png',
// #endif // #endif
// TODO iOS还需再补路径 // TODO iOS发版时还需再补路径
description: '本地绝对路径file:///方式。需注意打包后包名appid匹配' description: '本地绝对路径file:///方式。需注意打包后包名appid匹配'
}, },
{ {
...@@ -100,4 +100,4 @@ ...@@ -100,4 +100,4 @@
margin: 40rpx auto; margin: 40rpx auto;
width: 200rpx; width: 200rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
updateSliderValue(value : Number) { updateSliderValue(value : Number) {
// this.sliderValue = value // this.sliderValue = value
// TODO 跳过vue框架,直接修改原生组件 // 跳过vue框架,直接修改原生组件
(this.$refs["slider1"]! as ComponentPublicInstance[]).forEach((item) => { (this.$refs["slider1"]! as ComponentPublicInstance[]).forEach((item) => {
item.$data["$sliderValue"] = value item.$data["$sliderValue"] = value
item.$callMethod("_onRender") item.$callMethod("_onRender")
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
methods: { methods: {
message(event : WebViewMessageEvent) { message(event : WebViewMessageEvent) {
console.log(JSON.stringify(event.detail)); console.log(JSON.stringify(event.detail));
uni.showModal({
content: JSON.stringify(event.detail),
showCancel: false
});
}, },
error(event : WebViewErrorEvent) { error(event : WebViewErrorEvent) {
console.log(JSON.stringify(event.detail)); console.log(JSON.stringify(event.detail));
...@@ -31,4 +35,4 @@ ...@@ -31,4 +35,4 @@
<style> <style>
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册