---
# System prepended metadata

title: vue 疑難排解

---

# vue 疑難排解
: v-bind的縮寫

### 1. Uncaught TypeError: this.sendDrag is not a function
if you used the arrow-lambda notation ()=>{} instead of function() it would capture this for you automatically. 
[stackoverflow](https://stackoverflow.com/questions/55927940/vuejs-error-uncaught-typeerror-this-senddrag-is-not-a-function-in-mounted)

### 2. 監聽鍵盤事件，且不需要focus
e.g. 無論焦點在哪 按下Enter都傳送某textbox的值
[stackoverflow](https://stackoverflow.com/questions/46955147/enter-with-keyup-event-not-working-in-vue)