diff --git a/client/src/components/input-box.wpy b/client/src/components/input-box.wpy
index 5cf24ae..50d4abc 100644
--- a/client/src/components/input-box.wpy
+++ b/client/src/components/input-box.wpy
@@ -151,8 +151,8 @@
{{ title }}
-
-
+
+
{{ cancelText }}
@@ -205,12 +205,8 @@ export default class InputBox extends wepy.component {
this.$apply();
},
- // // 监听用户输入
- // onInput(e) {
- // this.text = e.detail.value;
- // },
-
- onBlur(e) {
+ // 监听用户输入
+ onInput(e) {
this.text = e.detail.value;
},
diff --git a/client/src/pages/room-detail.wpy b/client/src/pages/room-detail.wpy
index 6707e40..d29a97a 100644
--- a/client/src/pages/room-detail.wpy
+++ b/client/src/pages/room-detail.wpy
@@ -172,7 +172,7 @@ input {
-
+
@@ -205,11 +205,7 @@ export default class RoomDetail extends wepy.page {
});
},
onBackTap() {
- if (getCurrentPages().length > 1) { // eslint-disable-line
- wepy.navigateBack({ delta: 1 });
- } else {
- this.$redirect('index');
- }
+ this.back();
},
async onDeleteTap() {
const { confirm } = await wepy.showModal({
@@ -227,7 +223,7 @@ export default class RoomDetail extends wepy.page {
});
if (result) {
- this.onBackTap();
+ this.back();
}
}
};
@@ -245,5 +241,13 @@ export default class RoomDetail extends wepy.page {
});
this.$apply();
}
+
+ back() {
+ if (getCurrentPages().length > 1) { // eslint-disable-line
+ wepy.navigateBack({ delta: 1 });
+ } else {
+ this.$redirect('index');
+ }
+ }
}