随笔分类 -  Element

摘要:不废话上思路 外部el-table-column是基础table模板,里面template slot-scope 的主要作用就是获取table一行的数据信息; 其次要加一个对话框,在对话框里输入数值然后提交就可以传入后台就行数据交互。 <el-table-column label="操作"> <te 阅读全文
posted @ 2022-11-18 23:30 しゅおく 阅读(356) 评论(0) 推荐(0) 编辑
摘要:首先要创建el-from表单,在表单中创建两个输入框并双向绑定 首选行内表单: 代码如下: <el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form-item label="审批人"> <el-inp 阅读全文
posted @ 2022-11-18 15:49 しゅおく 阅读(1007) 评论(0) 推荐(0) 编辑
摘要:先上代码: 首先在整体el-table表格中添加 @selection-change="SelectTableList" 点击事件,这个主要的作用就是当表格被点击时,会调用这个函数; 然后再表格el-table-colum最上方,添加selection选择框,添加之后最左侧就会出现"选择框" <el 阅读全文
posted @ 2022-11-17 23:16 しゅおく 阅读(615) 评论(0) 推荐(0) 编辑
摘要:问题1: 更改渲染数据值的名称(不会更改数据库上的值,只是更改渲染的值) 查询数据中如何把数据中的值利用vue语句更改其他名称?例如:如果把等级中:首席讲师更改成高级讲师呢? 先看代码: 首席外围<el-table-colun>是表格渲染的数据,内部则是更改以上问题的代码 首先要解释下<el-tab 阅读全文
posted @ 2022-11-16 17:16 しゅおく 阅读(105) 评论(0) 推荐(0) 编辑
摘要:where 和 if 搭配: where 其实就是表示sql语句中 where的用法; where包围后,就不用在sql语句中加where了; if语句的语法结构:<if test="" ></if> 其中的test就是判断语句。""写语法; <mapper namespace="com.examp 阅读全文
posted @ 2022-11-16 13:53 しゅおく 阅读(24) 评论(0) 推荐(0) 编辑
摘要:先上代码: <el-table-column width="300" label="操作"> <template slot-scope="scope"> <el-button class="btn" size="mini" @click="handleEdit(scope.$index, scope 阅读全文
posted @ 2022-11-14 01:46 しゅおく 阅读(726) 评论(0) 推荐(0) 编辑
摘要:直接上代码: dropdown 下拉列表,通常是 <el-dropdown-menu> 组件 <template> <div> <el-dropdown @command="handleCommand"> <span class="el-dropdown-link"> 下拉菜单<i class="e 阅读全文
posted @ 2022-11-13 18:01 しゅおく 阅读(613) 评论(0) 推荐(0) 编辑
摘要:监视部分代码: $route(to, From) { console.log(to, From); if (to.path == "/Home") { this.path = ""; this.name = ""; } else { this.path = to.path; this.name = 阅读全文
posted @ 2022-11-12 22:56 しゅおく 阅读(37) 评论(0) 推荐(0) 编辑
摘要:Element按钮组件: <el-row> <el-button>默认按钮</el-button> <el-button type="primary">主要按钮</el-button> <el-button type="success">成功按钮</el-button> <el-button typ 阅读全文
posted @ 2022-10-31 22:53 しゅおく 阅读(151) 评论(0) 推荐(0) 编辑
摘要:npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用。 npm i element-ui -S 引入 Element 你可以引入整个 Element,或是根据需要仅引入部分组件。我们先介绍如何引入完整的 Element。 完整引入 在 main.js 中写入以下 阅读全文
posted @ 2022-10-31 22:41 しゅおく 阅读(137) 评论(0) 推荐(0) 编辑