avue组件自定义按钮/标题/内容/搜索栏
话不多说 笔记直接分享!!
一、自定义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>工商注册材料 </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>工商注册材料 </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组件自定义按钮/标题/内容/搜索栏的更多相关文章
- Web jquery表格组件 JQGrid 的使用 - 5.Pager翻页、搜索、格式化、自定义按钮
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容
IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容 UIAlertController *alertVC = [UIAlertController alertControl ...
- Flutter 中的常见的按钮组件 以及自定义按钮组件
Flutter 里有很多的 Button 组件很多,常见的按钮组件有:RaisedButton.FlatButton. IconButton.OutlineButton.ButtonBar.Float ...
- 22Flutter中的常见的按钮组件 以及自定义按钮组件
/* Flutter中的常见的按钮组件 以及自定义按钮组件 一.Flutter中的按钮组件介绍 Flutter里有很多的Button组件,常见的按钮组件有:RaisedButton/FlatButto ...
- php框架tp3.2.3和js写的微信分享功能心得,分享的标题内容图片自定义
https://blog.csdn.net/weixin_42231483/article/details/81585322 最近用PHP的tp3.2.3框架和js写的微信分享功能心得,分享的标题内容 ...
- 如何让antd的Modal组件的确认和取消不显示(或自定义按钮)(转载)
使用Modal中的footer属性,如下: <Modal title="更改成员" visible={visible} confirmLoading={confirmLoad ...
- 基于element-ui的后台系统表格、dialog、筛选、自定义按钮、分页的一次性封装
方便基础业务开发封装的一套组件,基于vue2.5.x和element-ui,可以通过配置自动生成表格展示,表格新增.编辑功能.分页.筛选项.自定义显示表格数据等功能. 先上演示图片 --------- ...
- wordpress优化之结合prism.js为编辑器自定义按钮转化代码
原文链接 http://ymblog.net/2016/07/24/wordpress-prism/ 继昨天花了一天一夜的时间匆匆写了主题Jiameil3.0之后,心中一直在想着优化加速,体验更好,插 ...
- Vue组件-使用插槽分发内容
在使用组件时,我们常常要像这样组合它们: <app> <app-header></app-header> <app-footer></app-fo ...
- JOptionPane如何自定义按钮绑定事件
JOptionPane如何自定义按钮绑定事件 2018年01月29日 19:27:10 阅读数:475 摘自:https://blog.csdn.net/m0_37355951/article/det ...
随机推荐
- #Dijkstra,二进制拆位#洛谷 5304 [GXOI/GZOI2019]旅行者
题目 分析(\(logk\)次Dijkstra) 首先为什么\(O(nklogn)\)的多次\(dijkstra\)为什么会TLE, 因为中间有许多的冗余状态,即使两点求出的路径是最短的,它也不一定是 ...
- centos环境minio安装踩坑指南2023年7月30日
MinIO的安装踩坑指南 环境centos7 1. 安装MinIO官方文档 Binary下载 , 按照官网的路径配置比较快 下载minio wget https://dl.min.io/server/ ...
- HuffmanTree,哈夫曼树的原理和c++实现
目录 一.什么是哈夫曼树 二.构造哈夫曼树 三.路径.编码.解码 四.代码 一.什么是哈夫曼树 哈夫曼树又称为最优树. 通过权值来构造树,权值越大,离根节点越近 经常用于无损压缩算法 用于需要优化存储 ...
- Native Drawing开发指导,实现HarmonyOS基本图形和字体的绘制
场景介绍 Native Drawing模块提供了一系列的接口用于基本图形和字体的绘制.常见的应用场景举例: ● 2D图形绘制. ● 文本绘制. 接口说明 接口名 描述 OH_Drawing_Bit ...
- HarmonyOS开发案例分享:万能卡片也能用来玩游戏
一.前言 作为一名开发爱好者,从大了讲,我学习并进行HarmonyOS相关开发是为了能为鸿蒙生态建设尽一份绵薄之力,从小了讲,就是为了自己的兴趣.而万能卡片是一个让我非常感兴趣的东西. 很多时候我跟别 ...
- 【中秋国庆不断更】XML在HarmonyOS中的生成,解析与转换(下)
一.XML解析 对于以XML作为载体传递的数据,实际使用中需要对相关的节点进行解析,一般包括解析XML标签和标签值.解析XML属性和属性值.解析XML事件类型和元素深度三类场景. XML模块提供Xml ...
- CentOS-6.5快速搭建HTTP服务器和仅供授权用户登陆的FTP服务器
CentOS-6.5快速搭建HTTP服务器和仅供授权用户登陆的FTP服务器 (2014-01-09 21:29:31) 转载▼ 标签: linux centos 服务器 http vsftp 分类:& ...
- 【笔记】Oracle Offset 以及力扣
[笔记]Oracle Offset offset 代表跳过前 n 行,如果表少于 n+1 条记录,结果集将是空的:比如 n = 100,表示从 101 开始往后查. fetch next 代表往后查 ...
- 牛客网-SQL专项训练22
①在SQL中如何删除触发器:DROP TRIGGER 解析: 辨别:DROP TRIGGER 和 DELETE TRIGGER 删除触发器操作必须使用DROP语句进行,DELETE是删除行记录. ②请 ...
- 国庆集训 Day1 复盘笔记
9.25 \({\color{Green} \mathrm{A\ -\ Powered\ Addition}}\) 只要把序列扫一遍,然后求出目前最大值与当前值的差的最大值 \(x\),再 \(log ...