|
|
@@ -23,11 +23,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onConfirm(text) {
|
|
|
+ alert(JSON.stringify(text))
|
|
|
console.log('拿到的text', text);
|
|
|
// 此处写我们自己的逻辑
|
|
|
this.text = text;
|
|
|
},
|
|
|
keypress(e) {
|
|
|
+ alert(JSON.stringify(e))
|
|
|
if (e.keyCode === 66 || e.key === 'Enter') {
|
|
|
this.inputString = this.inputCache;
|
|
|
this.onConfirm(this.inputString);
|