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

一、自定义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. #特征方程,dp,快速幂#洛谷 4451 [国家集训队]整数的lqp拆分

    题目 分析 设\(dp[n]\)表示答案,因为\(dp[n]=\sum\prod_{i=1}^mF_{a_i}\) \(dp[n]=\sum_{i=1}^{n-1}dp[i]*F_{n-i-1}\) ...

  2. 如何实现OpenHarmony的OTA升级

    OTA简介 随着设备系统日新月异,用户如何及时获取系统的更新,体验新版本带来的新的体验,以及提升系统的稳定性和安全性成为了每个厂商都面临的严峻问题.OTA(Over the Air)提供对设备远程升级 ...

  3. 来自上个世纪的传奇 q_math.c 源码展示

    经典的快速平方根倒数算法就在其中 此算法首先接收一个32位带符浮点数,然后将之作为一个32位整数看待,将其右移一次(取半),并用十六进制"魔术数字"0x5f3759df减之,如此即 ...

  4. CMake vs Makefile 如何选择适合你的项目构建工具

    CMake vs Makefile: 如何选择适合你的项目构建工具 在软件开发中,构建(build)是一个非常重要的过程.我们需要将源代码转换为可执行文件或库文件.为了完成此过程,我们通常使用构建工具 ...

  5. Seaborn线性关系数据可视化

    regplot() 绘制两个变量的线性拟合图. sns.regplot( x, y, data=None, x_estimator=None, x_bins=None, x_ci='ci', scat ...

  6. 将Map中对应的key和value赋值到对象中

    BeanUtils位于import org.apache.commons.beanutils.BeanUtils包下 其使用方法: Map<String, Object> objectMa ...

  7. HarmonyOS SDK开放能力,服务鸿蒙生态建设,打造优质应用体验

    华为开发者大会2023(HDC.Together)于8月4日至6日在东莞松山湖举行,在HarmonyOS端云开放能力技术分论坛上,华为为广大开发者们介绍了HarmonyOS SDK开放能力在基础开发架 ...

  8. Noah-MP陆面过程模型建模

    [原文链接]:Noah-MP陆面过程模型建模方法与站点.区域模拟实践技术 [方式]:直播+永久回放+长期答疑群辅助+全套资料 [目标]:了解陆表过程的主要研究内容以及陆面模型在生态水文研究中的地位和作 ...

  9. DevEco Studio强大的预览功能让开发效率大大提升!

    原文:https://mp.weixin.qq.com/s/C5DL0wBubDX3exvPpeXBPQ,点击链接查看更多技术内容.   应用的开发过程中,往往需要多次调试和修改,如果支持实时预览,边 ...

  10. Windows XP Vmware 无法自适应窗口

    之前在吾爱破解上找到一个 WindowsXP SP3 的精简系统(目前找不到在哪了),自带 VMtools 和 52 破解工具包,很适合 XP 系统下的逆向和病毒分析.目前准备学习一下<恶意代码 ...