...">
美文网首页
Ant Design of Vue中slot插槽的使用

Ant Design of Vue中slot插槽的使用

作者: 喜欢走弯路的人 | 来源:发表于2023-01-30 13:32 被阅读0次

自定义对话框标题举例:

 <a-modal

    :width="500"   

   :visible="visible"   

  :confirmLoading="confirmLoading"   

  :maskClosable="false"   

   @ok="handleSubmit"             

    @cancel="handleCancel"

    >

  <!-- 通过插槽设置标题 -->

    <template slot="title">     

       <!--  addEditTitle在data中自定义 -->

        <span style="margin-right:10px;">{{addEditTitle}}</span>     

        <a-popconfirm placement="topRight" title="确认删除?" @confirm="remove">       

            <a-icon type="question-circle" style="color:#faad14;cursor: pointer;"/>     

           </a-popconfirm>   

      </template>

    </a-modal>

相关文章

  • vue插槽

    vue插槽slot的理解与使用 vue slot插槽的使用介绍及总结

  • 18、Vue3 作用域插槽

    作用域插槽:让插槽内容能够访问子组件中,vue2中作用域插槽使用slot-scope,vue3中使用v-slot ...

  • vue 插槽的使用

    vue 插槽手册 深入理解vue中的slot与slot-scope 插槽的使用其实是很简单首先要明白插槽是使用在子...

  • Vue之深入理解插槽—slot, slot-scope, v-s

    Vue 2.6.0 以前Vue 2.6.0 以后具名插槽 slot具名插槽 v-slot作用域插槽 slot-sc...

  • vue中的slot(插槽)

    vue中的插槽————slot 什么是插槽? 插槽(Slot)是Vue提出来的一个概念,正如名字一样,插槽用于决定...

  • 2020-07-23 一次性讲明白vue插槽slot

    vue插槽slot 一、前言 vue官方文档中在"组件基础"内容中提到组件可以通过插槽分发内容,那插槽是怎么使用的...

  • vue插槽slot

    vue插槽slot 一、前言 vue官方文档中在"组件基础"内容中提到组件可以通过插槽分发内容,那插槽是怎么使用的...

  • Vue3.0 组件的核心概念_插槽

    Vue 在 2.6 版本中,对插槽使用 v-slot 新语法,取代了旧语法的 slot 和 slot-scope,...

  • slot是什么?有什么作用?原理是什么?

    slot又名插槽,是Vue的内容分发机制,组件内部的模板引擎使用slot元素作为承载分发内容的出口。插槽slot是...

  • slot(插槽)

    slot又称插槽,是Vue的内容分发机制,组件内部的模板引擎使用slot元素作为承载分发内容的出口。插槽slot是...

网友评论

      本文标题:Ant Design of Vue中slot插槽的使用

      本文链接:https://www.haomeiwen.com/subject/gcmmhdtx.html