LeeReamond
V2EX  ›  问与答

前端开发, vue3 的组件库 element+和 tailwindcss 是不是冲突?

  •  
  •   LeeReamond · Jul 30, 2022 · 2105 views
    This topic created in 1393 days ago, the information mentioned may be changed or developed.

    做个个人项目,想要用网上组件库的组件,有少部分不合适的想自己用 tailwind 做。

    现在环境是 npm+vite 装的 vue3-ts ,按官网的说明试了半天,怎么感觉装上 element+以后 tailwind 就不好使了,后装 tailwind 的话 element+又不好使了,这俩是不能一块用吗

    3 replies    2022-07-30 11:32:22 +08:00
    binhb
        1
    binhb  
       Jul 30, 2022
    样式冲突了,tailwind 的 base 别引入
    jawilx
        2
    jawilx  
       Jul 30, 2022   ❤️ 1
    naive-ui 里有提供解决方案,https://www.naiveui.com/zh-CN/os-theme/docs/style-conflict ,不知道 element-plus 有没有类似的方案,base 不引用的话很多样式会有问题
    dengshen
        3
    dengshen  
       Jul 30, 2022 via iPhone
    引入顺序有问题。先引入 tailwin 在引入 element
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3023 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:18 · PVG 15:18 · LAX 00:18 · JFK 03:18
    ♥ Do have faith in what you're doing.