---
# System prepended metadata

title: "\U0001F3C5 Day 32 - 用 watch 監聽一個數值"
tags: [Vue 直播班 - 2022 冬季班]

---

---
tags: Vue 直播班 - 2022 冬季班
---
# 🏅 Day 32 - 用 watch 監聽一個數值

觀看完課程影音「Watch 監聽」後，練習下方題目。

題目
---
操作 [這個模板](https://codepen.io/hexschool/pen/MWBzLEX)，執行以下要求（只能操作 JS 的部分）:

> 練習運用 watch 監聽一個數值
> - 在 watch 中新增方法，讓畫面顯示「今年要繳的稅金為 xx 元」為實際輸入 input 數值的 20%，並且需為整數，實際狀況如圖：
> ![](https://i.imgur.com/vu0rfIf.png)
> 
> - 提示一：會使用到 `this.Taxes`
> - 提示二：整數化方法為 `Number.parseInt()`


## 回報流程

將答案寫在 CodePen 並複製 CodePen 連結貼至底下回報就算完成了喔! 
解答位置請參考下圖（需打開程式碼的部分觀看）

![](https://i.imgur.com/vftL5i0.png)

<!-- 解答：  
watch: {
  cash() {
    this.Taxes = Number.parseInt(this.cash * 0.2); 
  }
}
-->




回報區
---


|   Discord    |                    CodePen / 答案                      |
|:----------:|:-------------------------------------------------------:|
| 冬天#5215 |[CodePen](https://codepen.io/winter_/pen/vYaMmJV)|
|威0#6919|[codepen](https://codepen.io/n0918679182/pen/abjxWyL?editors=1010)|
| Wendy3#5616 |[CodePen](https://codepen.io/wendy03/pen/MWBRmvj)||
| albee#9121|[Codepen](https://codepen.io/albee-chang/pen/YzjMVaR?editors=1111)|
| yuyu#6310 |[Codepen](https://codepen.io/yuyu0905/pen/oNMOWPP)|
|azami#5986|[Codepen](https://codepen.io/azami/pen/zYLXwaP)|
|AuroraC#6539|[codepen](https://codepen.io/AuroraC/pen/oNMOWrJ?editors=1010)|
|Jill Lee#0809|[CodePen](https://codepen.io/chi-ling-lee/pen/LYBvLpq)|
|薯餅#3581|[CodePen](https://codepen.io/ColdingPoTaTo/pen/RwBOgrb)|
|Benson#6763|[Codepen](https://codepen.io/kumashow/pen/mdjgwMe)|
|mandylai#4055|[Codepen](https://codepen.io/mandy-lai-2/pen/MWBRooV?editors=1011)|
|Chi#7605|[Codepen](https://codepen.io/YoChi84/pen/OJwGgdm)|
|masterYan#2480|[Codepen](https://codepen.io/htzwgoqt-the-looper/pen/NWBmgJX)|
|無名#6427|[Codepen](https://codepen.io/Nomoney/pen/JjBzZjO)|
|ㄚ翔#8126|[codepen](https://codepen.io/engineerjohnson/pen/PoBgjvm)|
|Potatolee#7749|[codepen](https://codepen.io/potatoleee/pen/VwBNWNe?editors=1111)|
|int#7518|[Codepen](https://codepen.io/intHuang/pen/rNrbzME?editors=1010)|
|Hilda#7085|[Codepen](https://codepen.io/vwquikad-the-vuer/pen/WNKWEpg)|
|威爾#1694|[CodePen](https://codepen.io/WILL_Wu/pen/bGjJrVv)|
|Alex#9978|[CodePen](https://codepen.io/datsxzqg-the-selector/pen/zYLXzEM)|
|泊岸#3466|[CodePen](https://codepen.io/qoq77416416/pen/XWBQaVJ)|
|DIO大人#4776|[CodePen](https://codepen.io/azami/pen/zYLXwaP)|
|法希娜#3206|[CodePen](https://codepen.io/yiiserpf-the-encoder/pen/zYLXPqa)|
|JackC#0411|[CodePen](https://codepen.io/key0329/pen/poZBddp)|
|Hazel.#6020|[CodePen](https://codepen.io/Hazelhsieh/pen/qBywVYz)|
|suihsilan#9485|[CodePen](https://codepen.io/suihsilan/pen/KKBYZoE?editors=1010)|
|Rena#6249|[Codepen](https://codepen.io/aureate0116/pen/abjxYPr)|
|jacky010080#0880|[CodePen](https://codepen.io/Yen-Jung-Chen/pen/PoBgrBG?editors=1010)|
|LinaChen#1796|[CodePen](https://codepen.io/LinaChen/pen/BaPeKbB)|
|helena#8461|[CodePen](https://codepen.io/helena27/pen/BaPepXR)|
|阿鑫#4346|[CodePen](https://codepen.io/Neil1024/pen/vYawZzY?editors=1011)|
|Bassjim#0118|[CodePen](https://codepen.io/unrtxbaq/pen/rNrgpvE)|
|Cheryl#4007|[Codepen](https://codepen.io/Cheryl-Hsu/pen/wvxbjGq?editors=1011)|
| christina#6185 | [Codepen](https://codepen.io/chrisc0210/pen/QWBRPVV)|
| 出事了阿伯#9923 | [Codepen](https://codepen.io/BradpittLai/pen/dyjBvOy?editors=1111)|
|Amberhh#2465|[Codepen](https://codepen.io/Amberhh/pen/dyjLRLY) |
| YC#2522 | [CodePen](https://codepen.io/YCLu/pen/ExpBexd) |
| 小夜#3809 | [CodePen](https://codepen.io/Naito_K/pen/MWBMRdL?editors=1010) |
| Shuo#1596 | [CodePen](https://codepen.io/chiangchungshuo/pen/ZEjZZLP) |
|PayRoom#8328|[CodePen](https://codepen.io/water38198/pen/xxaKxQY)
|柚子 #3958|[CodePen](https://codepen.io/as6625998/pen/PodYmMa?editors=1010)
|Kevin #8349|[CodePen](|柚子 #3958|[CodePen](https://codepen.io/as6625998/pen/PodYmMa?editors=1010))|
|Yiru#0236|[Codepen](https://codepen.io/yiru94/pen/BaOavGo?editors=1011)|
|Kimi#9564|[Codepen](https://codepen.io/kimihu91/pen/OJwqBqy)| 
|Yuna Huang#2692|[Codepen](https://codepen.io/Yuna1002/pen/RwYPZVJ?editors=1011)| 
|yaru#6308|[CodePen](https://codepen.io/lszaietc/pen/zYJGEoW?editors=1011)|
|GOD_QWERTYUIOPLKJLKLLOINJ_MASTER#4922|[CodePen](https://codepen.io/sho666/pen/dyqoVRr?editors=1010)|
|阿蘇#8521|[CodePen](https://codepen.io/susu3131/pen/bGxVVZK?editors=1011)|
|YI#0863|[CodePen](https://codepen.io/YI0305/pen/xxaZyGd?editors=1011)|
|Mylène#2481|[CodePen](https://codepen.io/hamajibashi/pen/vYzKpYY)|
| ABOOS#6276 | [CodePen](https://codepen.io/guhungyin/pen/NWLRvqb) |
| yoyo#1003 | [CodePen](https://codepen.io/pen/MWqJKMV) |
|小白#2406| [CodePen](https://codepen.io/gracewhite/pen/oNPWPPq?editors=1010)|
|黑白兔#0684| [CodePen](https://codepen.io/johnny329/pen/rNZZmBM)|
|KC_8685#9343|[Codepen](https://codepen.io/cathy7411/pen/vYzQmwz)|
| Jenny真#7532 | [CodePen](https://codepen.io/wei-chen-wu/pen/XWPQqag) |
| Eason#7884 | [CodePen](https://codepen.io/ASLEO/pen/YzJNdMN) |