PEax

vue3 deep 写法问题

  •  
  •   PEax · Mar 29, 2022 · 2283 views
    This topic created in 1680 days ago, the information mentioned may be changed or developed.

    vue2 deep 可以只写一个,比如 ::v-deep { .a{} .b{} }

    vue3 这样写报了警告 [@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep() instead.

    意思就是需要写成 ::deep(.a) {} ::deep(.b) {}

    但是现在我重新的样式比较多,有没有办法只写一个?

    4 replies  •  2022-03-29 21:59:57 +08:00
    gadfly3173
    gadfly3173
    Mar 29, 2022
    1
    给他们的父级加:deep()就行了
    mxT52CRuqR6o5
    mxT52CRuqR6o5
    Mar 29, 2022 via Android
    2
    把::v-deep { }改成:deep { }试试
    codeisjobs
    codeisjobs
    Mar 29, 2022 via Android
    3
    /deep/.classname {} 这样就行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1760 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 17:26 · PVG 01:26 · LAX 09:26 · JFK 12:26
    ♥ Do have faith in what you're doing.