子組件(components)的使用


子組件(.vue文件)的使用:

  1.在common(公共組件文件夾)下新建selectCode.vue(組件)

    selectCode.vue :是 下拉框公共組件(是對a-select的二次封裝)

  2.在需要用到組件的頁面導入

    import selectCode from "../../common/selectCode";
  3. 在 components 里面注冊
    components: {
        selectCode
      },
  4. 在<tmplate></template> 中使用即可, 藍色字體為組件具體封裝的內容,無需理會
    <select-code
               :value.sync="infoForm.MASSG_DD"
              @call="text => (infoForm.MASSG_DD_T = text)"
              :code="$sc.MASSN_DD"
              :disabled="isDisabled"
              @mouseenter="open"
            />
    
 
 
 
 
TO:哈爾濱冬天的雪!!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM