非同步處理 Axios 發表於 2021-03-05 更新於 2022-04-26 分類於 Vue3 Disqus: 使用 Axios 取得 API1234567891011121314const { onMounted } = Vue;const app = { setup() { onMounted(() => { // 在DOM元素渲染完成後執行 axios .get("https://vue-lessons-api.herokuapp.com/photo/list") .then((res) => { console.log(res.data); }); }); return {}; },}; 閱讀全文 »
VUE的生命週期 發表於 2021-03-05 更新於 2021-03-14 分類於 Vue3 Disqus: VUE 的生命週期(Lifecycle Hooks)setup => vue 掛載到 app 上面後執行onBeforeMount => DOM 渲染前執行onMounted => DOM 渲染完成後執行onBeforeUpdate => 資料更新 DOM 更改前執行onUpdated => 資料更新 DOM 更改後執行 閱讀全文 »
Vue3基本操作-2 發表於 2021-03-04 更新於 2021-03-16 分類於 Vue3 Disqus: computed範例 1: 自動長出 menu 高度計算屬性 1234<a @click="HandListShow" class="title">菜單</a><ul class="box" :style="{height: toggleH}"> <li v-for="(list, idx) in listArr" :key="list">{{list.name}}</li></ul> 閱讀全文 »
Vue3基本操作-1 發表於 2021-03-02 更新於 2022-04-26 分類於 Vue3 Disqus: vue.js 的起手式1<script src="https://unpkg.com/vue@next"></script> 1234<div id="app"> <h1>{{msg}}</h1> <button @click="handAddInt">Add</button></div> 閱讀全文 »
Node.js 與 npm 更新的方式 發表於 2021-02-08 更新於 2023-09-20 分類於 nodeJs Disqus: Node.js 更新mac123456npm cache clean -fnpm install -g n// 若要更新到最後一個版本n latest// 若要更新到穩定版本n stable 閱讀全文 »