Chris
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
###### tags: `鐵人30` # 鐵人 30 Vue.js 進階心法 [發文連結](https://ithelp.ithome.com.tw/users/20107637) ## Vue.js 進階心法 認識 Vue 官網上寫的重點 1. [帶你從需求到功能](/AZH_izxZTsynI7fJS4nW4g) - 歸納功能的觀念: 需求 -> 讀寫 -> Vue 語法 2. [丟掉假的雙向綁定: 拆開 v-model](/mND4LsPPRKC27nXw7kCYzg) - v-bind + v-on - `:value` + `@input` - input text - textarea - `:checked` + `@change` - input checkbox - input radio - `:value` + `@change` - select 3. [pure function](/UW9s2J7JQ5-zsvucZDQ1Eg) 1. [pure Component](/wQSneX1gSsyIHX2oICzjyA) - 決定資料的是 views,不是 component - 所有的 `emit` 只和 `props` 相關 4. [Component 的 Component](https://hackmd.io/Tf-elSTcR22wPKbDbSW8eA) - `$attrs` 沒有在 props 和 listeners 的 attrs - `$props` 直送給 `props` - `$listeners` 直送給 `emit` 5. [深入淺出 Computed](https://hackmd.io/wQRRNVl_RS6EaeX0k3OHsA?both) - v-bind/v-on 同名可寫 v-model 之 computed 的 get/set - 拆掉 - 一行拆掉 6. [用 watch 必用 immutable](https://hackmd.io/T6lMfkH_SsWEWXOSTprUbw) - deep watch - immutable Vue-router 7. [`<component :is="">` 是看字串的鬼牌](https://hackmd.io/tWgje84PREmSXT8m00cVSw) - 可以 `v-bind` ? - 可以 `v-on` ? 8. [`<router-view>` 是看網址的鬼牌](https://hackmd.io/757yZTzuR6OE7YTxirIvZA) - 可以 `v-bind` ? - 可以 `v-on` ? Vuex 9. [單一資料流](https://hackmd.io/OCowIwByT5a0WoTC1tdjHQ) - flux - vuex 6. [state: 存放資料的地方](https://hackmd.io/1Hev0oXASiG_ns4XJknirQ) - 直接存取 state 7. [Vuex 的使用注意事項](https://hackmd.io/DtegJb9lRfmiCn33UNbPvg) - mutation: setter - getters: getter - 命名規則 對 API 的實戰步驟 https://hackmd.io/0wYLXAHNR9e6cdKwKJ_Elg?view 13. - [x] [處理 API 層次感之基礎篇](https://hackmd.io/5_KTg5mRTiS0rfvX-UqNlg) 9. - [x] [讓 API Doc 成為你的程式碼](https://hackmd.io/tqKJ3-TFTKGDOIdXFAazGg) 11. - [x] 不要在 mutation 加工 API 回來的資料 12. - [x] 用 getters 抽象 state 8. - [x] actions 就是共用的 method 8. - [x] 用兩支 API 實作新增資料與上傳檔案 12. 決定資料的是 views 但是不儲存在 views 13. [在哪發 API 才是好的呢?](https://hackmd.io/-OxMuAMnSL2ZnTglBfAGOw) - mounted -> created -> beforeEach -> beforeEnter 21. [其它的 lifecycle 或 vue router 的 hook](https://hackmd.io/hH_aVrk6S96UwhDO84P4Pg) form 表單攻略 22. [Form 表單攻略前準備](https://hackmd.io/-Nq2tcw-SsqQQriDpdpqYA) 20. [用 event 來準備傳給後端的 data](https://hackmd.io/-fLA_W2nTkKGqPnFcnKpPw) 10. 可以拆掉的 computed get/set - 緊湊的 vue/vuex 寫法 9. [form: 新增/編輯模式切換](https://hackmd.io/p4w2iou2SHWEfZ-MwHiyRA) - `$listener` 或其它的做法 ☆☆☆☆☆ 校正一下 25. [form: 處理 Object](https://hackmd.io/OF5NFmvdQKCMjvHVnBYJVQ) 25. [form: Object 的 object](https://hackmd.io/u_byug_zTLOoe9fwgf-XjQ) 4. [form: Object 的 array](https://hackmd.io/cvXepuK6SkuCUJ239hkbzw) 11. [怎麼只傳給後端有改變的欄位 `vuex` (下)](https://hackmd.io/5wgIGSLBRR667SPmQAtt_Q) - 豪華架構的初值 - 圖解 29. [$scopedSlots 的魔法](https://hackmd.io/4UgIwaPKS_eI0N4BDiZWiA) 30. [關於 Vue.js 進階心法](https://hackmd.io/z_oQ8og_SiGf6VruGCYfFQ) 沒寫的部份 10. form 表單的初值怎麼給 `vuex` (上) - 一般的初值 表格顯示攻略 (以 Bootstrap Vue 為例) 28. table 的搜尋/分頁 - 工具列 component - 表尾的工具列 component 27. table component 的再封裝 - component 再包一次 - 內部使用超集處理 26. slot 的 slot (巢狀式 slot) 1. $scopedSlots 的魔法 > 厲害的原因,不是因為我做了什麼,而是我為什麼這麼做 ```xml <TagList :list=metaTagList @update:list="$store.commit('metaTagList', $event)" ></TagList> <div class="meta_tag_content" v-for="(item, index) in list" :key="index" > <input :item="item" @updata:abc="updateList" @update:content="updateList" > </input> </div> updateList(item) { this.$emit('update:list', [ ...list.slice(0, index), item, ...list.slice(index + 1) ]) } <input :value="item.name" @update:value="$emit('update:abc', { ...item, name: $event, })" /> item = { "id": 16, "name": "descriptionkkkk", "content": "hi", "link_id": 1 } ```

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully