規範 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. 參考網址: https://cn.vuejs.org/v2/style-guide/#%E8%A7%84%E5%88%99%E5%BD%92%E7%B1%BB
  2. 參考網址:https://vue-loader.vuejs.org/guide/scoped-css.html
  3. 參考網址:https://bootstrap-vue.org/
  4. 參考網址:https://dotblogs.com.tw/deer_nots/2019/09/20/150045
  5. 『大駝峰』:DocumentManagement
  6. 『小駝峰』:documentManagement
  7. array[]、object{}
  8. <命名規則>
  9. 1. 公共元件、指令、過濾器(多於三個檔案以上的引用)分別放在src目錄下的components、directives、filters
  10. 2. Vue資料夾名稱統一以『大駝峰』命名法命名,僅各模組的入口檔案index.vue採用小寫
  11. 3. ModalContent裡的檔案名稱命名為小駝峰
  12. 4. 以使用場景命名Vue的頁面檔案『小駝峰』
  13. 5. methods、Funtion命名為『小駝峰』
  14. 6.『變數名稱』命名為『小駝峰』
  15. <CSS>
  16. 1. 當<style>標籤具有該scoped屬性時,其 CSS 將僅應用於當前組件的元素。!!*通常我們都會加scoped*!!
  17. 舉例:
  18. <style>
  19. /* global styles */
  20. </style>
  21. <style scoped>
  22. /* local styles */
  23. </style>
  24. 2.請善用BootstrapVue,本系統大多都是用BootstrapVue,除非特殊狀況,才使用傳統式(但記得還是要使用Vue語法)
  25. 3. 使用版面排版時,建議使用BootstrapVue-"row","col"方法做
  26. <資料架構>
  27. 1. assets:圖片、照片、靜態文件目錄
  28. 2. components: BootstrapVue組件
  29. 3. content: 畫面Vue檔案
  30. 4. router: 路由
  31. 5. Test: 個人Vue檔案
  32. 6. views: 畫面組件Components、ModalContent
  33. 7. App.vue: 項目入口文件
  34. 8. main.js: 項目的核心文件,入口