Ant Design Vue Drawer組件 樣式覆蓋的問題


覆蓋Ant Design Vue Drawer組件的默認樣式

 1,在組件的html中設置wrapClassName="drawer-style"

<a-drawer
      :mask-style="{'background':'rgba(51, 51, 51, 0)'}"
      width="512px"
      placement="right"
      :closable="false"
      :visible="showRightBox"
      :get-container="false"
      :wrap-style="{ position: 'absolute' }"
      :destroyOnClose="true"
      wrapClassName="drawer-style"
      @close="
        showRightBox = false;
        chooseType = '';
        chooseComId = '';
        setComps = '';
      "
    >
...

</a-drawer>

2,輸入less覆蓋樣式(:global是關鍵)

:global(.drawer-style .ant-drawer-content) {
  background-color: rgba(255, 255, 255, 0);
}


免責聲明!

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



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