antd vue 气泡卡片popover浮层的大小是由内容区域决定的

  1. 控制方法:a-popover属性:overlayStyle

  2. 代码::overlayStyle="{width:‘50%’}"

<a-popover title="自定义列" trigger="click" placement="leftBottom" :overlayStyle="{width:'50%'}" >
          <template slot="content" class="popoverWidth">
            <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
              <a-row>
                <template v-for="(item,index) in defColumns">
                  <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
                      <a-col :span="8"><a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox></a-col>
                  </template>
                </template>
              </a-row>
            </a-checkbox-group>
          </template>
          <a class="floatRight"><a-icon type="setting" /> 自定义列</a>
        </a-popover>
  1. 属性在官网的地址:https://www.antdv.com/components/tooltip-cn/#API
    他沿用了tooltip的属性
Logo

前往低代码交流专区

更多推荐