---
# System prepended metadata

title: "\U0001F3C5 6/21 (一) 每日任務 Day 41"
tags: [Vue 直播班 - 2021 夏季班]

---

# 🏅 6/21 (一) 每日任務 Day 41
###### tags: `Vue 直播班 - 2021 夏季班`

題目 (請將答案貼上 CodePen)
---
操作 [這個模板](https://codepen.io/rider159159/pen/gOmBaWj)，執行以下要求 (只能操作 JS 的部分):

> $refs 生命週期陷阱
> - 請試著將模板中的 created 生命週期替換為 mounted，讓 alert 警告能夠跳出。
> - 本次練習主要是讓同學理解 created() 、 mounted() 的使用時機

回報流程
---
請同學依照下圖教學觀看解答、回報答案:

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

回報格式如下圖，請在「回報區」使用註解回報答案 (為了統計人數，請同學依序加上「報數」)

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

<!-- 解答

  const app = Vue.createApp({
    mounted(){
      this.$refs.alert.callAlert();
    },
  })

-->

回報區
---
<!--Alpha
Codepen: https://codepen.io/alphatero/pen/xxqeaWG
-->

<!-- 2: Vic
Codepen: https://codepen.io/hsuan333/pen/XWMQPPW
-->

<!-- 3: Alysa Chan
codepen: https://codepen.io/alysachan/pen/abJxaQv
-->
<!-- 4: 陳sam
codepen:https://codepen.io/euldpliv/pen/PopgdVR
-->

<!-- 5: yijun
codepen:https://codepen.io/sandy3068/pen/OJpGoqZ
-->

<!-- 6: Lina Chen 
codepen:https://codepen.io/LinaChen/pen/ExWJeMV
-->

<!-- 7: Tori
codepen: https://codepen.io/hayen/pen/xxqmVNo?editors=1010
-->

<!-- 8: Yi Chieh
Codepen: https://codepen.io/Yi-Chieh/pen/KKWYGRp?editors=1010
-->

<!-- 9: Jack
https://codepen.io/yxzzktmb/pen/ZEeZqZe?editors=1010
-->

<!-- 10: leolee
codepen: https://codepen.io/nekorice/pen/XWMQyzq
-->

<!-- 11: Joe Kuo
codepen: https://codepen.io/alertislow/pen/zYZXyOe?editors=1010
-->

<!-- 12: peter.chen1024
codepen: https://codepen.io/JIAN-RONG/pen/yLMrGVR?editors=1011
-->

<!-- 13: Sec
codepen: https://codepen.io/Sentiments/pen/bGqJOYv?editors=1010
-->

<!-- 14: Harold 
codepen: https://codepen.io/YuWin0805/pen/poeBBPO
-->

<!-- 15: Echo Hui
codepen: https://codepen.io/echohuiecho/pen/VwpNOQX -->

<!-- 16: Oober
codepen: https://codepen.io/xtsjrjdv/pen/qBrGEmE
-->

<!--17: Wendy Li
codepen: https://codepen.io/rockayumitw/pen/poemvVQ?editors=1011
-->

<!--18: Jordan Tseng
codepen: https://codepen.io/jordan-ttc-design/pen/XWMwJxr
-->


<!--19: RitaHunag
https://codepen.io/Rita-Rossweisse/pen/ExWzmyK?editors=1010
-->

<!-- 20: Jay
codepen: https://codepen.io/jayredk/pen/QWpRxBe
 -->

<!-- 21: Erica
https://codepen.io/ericadu/pen/QWpeqqV
-->

<!-- 22: YOYO
https://codepen.io/lumedkle/pen/abWozJK?editors=1010
-->


<!--23: jimmyFang
https://codepen.io/pohxiqqo/pen/OJmPLNM?editors=1010
-->

<!--24: Chiang
https://codepen.io/ChiangJ/pen/gOWbNYw?editors=1010
-->

<!--25: twoz
https://codepen.io/twoz/pen/PomZXKJ?editors=1011
-->

<!--26: Stacey Huang
https://codepen.io/staceyhuang/pen/JjNWYaR
-->