iview的poptip插件,自动换行与自定义content的内容

1、自定义content内容,需要用到vue的slot,可以定义多个content

复制代码
<Poptip trigger="hover" placement="top-start">
    <div slot="content" class="poptipExplain">
       这是我的自定义内容,我想要换行啊换行鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋
       这是我的自定义内容,我想要换行啊换行鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋
       这是我的自定义内容,我想要换行啊换行鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋鸡蛋
    </div>
    <img slot="content" :src="storelk" placement="top" alt="管廊方向说明图" style="height: 300px;">
    <Button type="parimary" size="samll">我是提示框啊</Button>
</Poptip>
复制代码

效果图(不带自动换行)

 

 加上自动换行

复制代码
<style scoped>
    .poptipExplain{
        width: 200px;
        white-space: normal;
        word-break: break-all;
        line-height: 25px;
        font-size: 14px;
    }
</style>
复制代码

 

 

本文作者:Mahmud(مەھمۇد)

本文链接:https://www.cnblogs.com/mahmud/p/11840757.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   Mahmud(مەھمۇد)  阅读(1443)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.

Not available