话不多说 笔记直接分享!!

一、自定义crud搜索栏组件

<template slot-scope="scope" slot="provinceCodeSearch">
  <avue-select
    v-model="objFrom.provinceCode" //这是存放省份的code
    placeholder="请选择省市"
    :dic="ProvinceList" //存放省份的下拉选择项
  ></avue-select>
</template>
column: [
  {
    showColumn: false,
    label: "省份",
    prop: "provinceCode",
    type: "select",
    search: true, //显示到search栏
    searchslot: true, //使用插槽
  },
]

二、自定义crud列表头部按钮

  旧版本写法:
    <template slot="menuLeft">
      <el-button size="small" type="primary" icon="el-icon-edit">添加</el-button>
    </template>

  新版本写法:
    <template #menu-left="{}">
      <el-button size="small" type="primary" icon="el-icon-edit">添加</el-button>
    </template>

三、自定义crud操作栏按钮

  旧版本写法:
    <template slot-scope="scope" slot="menu">
      <el-button type="text" icon="el-icon-view" size="small" @click.stop="handleView(scope.row,scope.index)">查看</el-button>
      <el-button type="text" icon="el-icon-edit" size="small" @click.stop="handleEdit(scope.row,scope.index)">编辑</el-button>
      <el-button type="text" icon="el-icon-delete" size="small" @click.stop="handleDel(scope.row,scope.index)">删除</el-button>
    </template>

  新版本写法:
    <template #menu="{row,index,size}">
      <el-button type="text" icon="el-icon-view" size="small" @click.stop="handleView(row,index)">查看</el-button>
      <el-button type="text" icon="el-icon-edit" size="small" @click.stop="handleEdit(row,index)">编辑</el-button>
      <el-button type="text" icon="el-icon-delete" size="small" @click.stop="handleDel(row,index)">删除</el-button>
    </template>


    // 调出查看方法
    handleView (row, index) {
      this.$refs.crud.rowView(row, index);
    },
    // 调出编辑方法
    handleEdit (row, index) {
      this.$refs.crud.rowEdit(row, index);
    },
    // 调出删除方法
    handleDel (row, index) {
      this.$refs.crud.rowDel(row, index);
    },

四、自定义crud列表显示字段值和样式

  旧版本写法:
    <template slot-scope="{row}" slot="pointId">
      <el-tag>{{row.pointIdName}}</el-tag>
    </template>

  新版本写法:
    <template #pointId="scope">
        <el-tag>{{row.pointIdName}}</el-tag>
    </template>

    column: [
      {
        label: "所属区域",
        prop: "pointId",
        slot: true, //插槽开启
      },
    ]

五、自定义form表单标题

  旧版本写法:
    <template slot-scope="{}" slot="businessRegisterMaterialLabel">
      <span>工商注册材料&nbsp;&nbsp;</span>
      <el-tooltip class="item" effect="dark" placement="bottom">
        <div slot="content" style="max-width:500px;">第一行文字提示<br/>第二行文字提示</div>
        <i class="el-icon-warning"></i>
      </el-tooltip>
    </template>

  新版本写法:
    <template #name-label="{}">
      <span>工商注册材料&nbsp;&nbsp;</span>
      <el-tooltip class="item" effect="dark" placement="bottom">
        <div slot="content" style="max-width:500px;">第一行文字提示<br/>第二行文字提示</div>
        <i class="el-icon-warning"></i>
      </el-tooltip>
    </template>

    column: [
      {
        label: "工商注册材料",
        prop: "businessRegisterMaterial",
        type: "select",
        labelslot:true, //使用插槽
      },
    ]

六、自定义form表单内容

  旧版本写法:
    <template slot="postIdsForm" slot-scope="scope">
      <el-cascader
        v-model="form.postIds"
        :options="postIdsOptions"
        :props="props"
        collapse-tags
        collapse-tags-tooltip
        clearable
        style="width: 100%;"
      />
    </template>

  新版本写法:
    <template #postIds-form="{row}">
      <el-cascader
        v-model="form.postIds"
        :options="postIdsOptions"
        :props="props"
        collapse-tags
        collapse-tags-tooltip
        clearable
        style="width: 100%;"
      />
    </template>

    column: [
      {
        label: "身份证",
        prop: "postIds",
        type: "select",
        formslot:true, //使用插槽
      },
    ]

七、自定义form表单弹窗内底部按钮

  旧版本写法:
    <template slot="menuForm">
      <el-button size="small" icon="el-icon-plus">签约缴费</el-button>
    </template>

  新版本写法:
    <template #menu-form="{}">
      <el-button size="small" icon="el-icon-plus">签约缴费</el-button>
    </template>

avue组件自定义按钮/标题/内容/搜索栏的更多相关文章

  1. Web jquery表格组件 JQGrid 的使用 - 5.Pager翻页、搜索、格式化、自定义按钮

    系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...

  2. IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容

    IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容 UIAlertController *alertVC = [UIAlertController alertControl ...

  3. Flutter 中的常见的按钮组件 以及自定义按钮组件

    Flutter 里有很多的 Button 组件很多,常见的按钮组件有:RaisedButton.FlatButton. IconButton.OutlineButton.ButtonBar.Float ...

  4. 22Flutter中的常见的按钮组件 以及自定义按钮组件

    /* Flutter中的常见的按钮组件 以及自定义按钮组件 一.Flutter中的按钮组件介绍 Flutter里有很多的Button组件,常见的按钮组件有:RaisedButton/FlatButto ...

  5. php框架tp3.2.3和js写的微信分享功能心得,分享的标题内容图片自定义

    https://blog.csdn.net/weixin_42231483/article/details/81585322 最近用PHP的tp3.2.3框架和js写的微信分享功能心得,分享的标题内容 ...

  6. 如何让antd的Modal组件的确认和取消不显示(或自定义按钮)(转载)

    使用Modal中的footer属性,如下: <Modal title="更改成员" visible={visible} confirmLoading={confirmLoad ...

  7. 基于element-ui的后台系统表格、dialog、筛选、自定义按钮、分页的一次性封装

    方便基础业务开发封装的一套组件,基于vue2.5.x和element-ui,可以通过配置自动生成表格展示,表格新增.编辑功能.分页.筛选项.自定义显示表格数据等功能. 先上演示图片 --------- ...

  8. wordpress优化之结合prism.js为编辑器自定义按钮转化代码

    原文链接 http://ymblog.net/2016/07/24/wordpress-prism/ 继昨天花了一天一夜的时间匆匆写了主题Jiameil3.0之后,心中一直在想着优化加速,体验更好,插 ...

  9. Vue组件-使用插槽分发内容

    在使用组件时,我们常常要像这样组合它们: <app> <app-header></app-header> <app-footer></app-fo ...

  10. JOptionPane如何自定义按钮绑定事件

    JOptionPane如何自定义按钮绑定事件 2018年01月29日 19:27:10 阅读数:475 摘自:https://blog.csdn.net/m0_37355951/article/det ...

随机推荐

  1. C# 循环与条件语句详解

    C# Switch 语句 使用 switch 语句选择要执行的多个代码块中的一个. 示例: switch(expression) { case x: // 代码块 break; case y: // ...

  2. Go 语言数组基础教程 - 数组的声明、初始化和使用方法

    数组用于在单个变量中存储相同类型的多个值,而不是为每个值声明单独的变量. 声明数组 在Go中,有两种声明数组的方式: 使用var关键字: 语法 var array_name = [length]dat ...

  3. Go 语言注释教程

    注释是在执行时被忽略的文本.注释可用于解释代码,使其更易读.注释还可用于在测试替代代码时防止代码执行.Go支持单行或多行注释. Go单行注释 单行注释以两个正斜杠(//)开头. 在//和行尾之间的任何 ...

  4. RabbitMQ 06 工作队列模式

    工作队列模式结构图: 这种模式非常适合多个工人等待任务到来的场景.任务有多个,一个一个丢进消息队列,工人也有很多个,就可以将这些任务分配个各个工人,让他们各自负责一些任务,并且做的快的工人还可以多完成 ...

  5. Spring Boot 项目五维度九层次分层架构实现实践研究——持续更新中

    var code = "12433d02-b242-4fd2-937d-750761a365ea" 说明:本博文有参考一些技术博主的思路,据实践内容及代码持续总结更新中. 五个分层 ...

  6. This version of Android Studio cannot open this project, please retry with Android Studio 4.0 or newer.

    前言 遇到的问题,This version of Android Studio cannot open this project, please retry with Android Studio 4 ...

  7. 鸿蒙HarmonyOS实战-ArkUI组件(Canvas)

    一.Canvas Canvas组件是一种图形渲染组件,它提供了一个画布(canvas),开发者可以在上面绘制各种图形.文本等.Canvas组件通常用于创建游戏.数据可视化等需要动态绘制图形的应用程序. ...

  8. 【SQL】IN和EXISTS谁的效率更高

    [SQL]IN和EXISTS谁的效率更高 总结: 索引设置好的情况下 子查询数据量大的,用exists 子查询数据量小的,用in 原文连接:https://zhuanlan.zhihu.com/p/4 ...

  9. 1.css的初认识

    1.什么是CSS? Cascading Style Sheet 层叠级联样式表 CSS:表现层(美化网页) 字体.颜色.边距.高度.宽度.背景图片.网页定位.网页浮动.... 2.CSS发展史 CSS ...

  10. 浅谈DDD中的聚合

    简介: 在我看来并不是MVC的基础上增加领域层,使用充血模型,解耦基础服务,我的代码就符合DDD了. 作者 | 李宇飞(菜尊)来源 | 阿里开发者公众号 在我看来并不是MVC的基础上增加领域层,使用充 ...