在默认标签上加入class="xxx"

<a-collapse-panel key="1" class="custom">
  <template slot="header">
    <a-icon type="folder-open" style="color: #f5222d;font-size: 18px" theme="filled"/>
    <span style="font-size: 18px;margin-left: 10px">title</span>
    <a-badge count="25" style="padding-bottom: 5px;margin-left: 10px"/>
  </template>
  <a-row>
    <a-col :span="24" v-for="i in 4">
      <div
        style="width: 100%;background-color: #d73e3d;height: 50px;line-height: 50px;padding-left: 50px;color: #f1cdb7">
        <a-icon type="file" style="font-size: 14px" theme="filled"/>
        <span style="margin-left: 10px">主题背景</span> <span style="margin-left: 10px">[10]</span>
      </div>
    </a-col>
    <a-col :span="24">
      <div
        style="width: 100%;background-color: #c92928;height: 50px;line-height: 50px;padding-left: 50px;color: #f1cdb7">
        <a-icon type="file" style="font-size: 14px" theme="filled"/>
        <span style="margin-left: 10px">主题背景</span> <span style="margin-left: 10px">[10]</span>
      </div>
    </a-col>
  </a-row>
</a-collapse-panel>

style标签的语言改成less或者scss,注意加入!important强制修改生效

<style scoped lang="less">
  .custom {
    & /deep/ .ant-collapse-content-box {
      padding: 0 !important;
    }
  }
</style>

# To Be Continued!😎

Last Updated: 11/17/2020, 10:57:07 AM