- 全局动态加载loading:
参考文档:https://blog.csdn.net/qq_34825875/article/details/79570301
在main.js或者index.js引用 import {Loading} from 'element-ui'
按照 文档所示修改
vue 设置浏览器图标
更改根目录下的index.html,在head中加如下代码:
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
注意:图标要存放在static文件夹中,将项目中的静态文件都要放在static文件夹中
- 表格里显示按钮
<el-table-column prop="option" label="操作" align="center" >
<template slot-scope="scope">
<el-button size="mini" plain @click="del(scope.$index,scope.row)">删除</el-button>
<el-button size="mini" plain @click="[edit(scope.$index,scope.row),editVisible =true]">修改</el-button>
</template>
</el-table-column>单击删除按钮时获取本行的id: del(index, row) { alert(row.id) }
element 的表单一行显示多个标签
1). :inline="true"
<el-form :inline="true" :model="seach" :label-width="labelwidth">
2). 使用el-row el-col去分割
<el-form :model="ruleForm" >
<el-row type="flex" class="row-bg">
<el-col :span="12">
<el-form-item label="签约企业名称" prop="ep_name">
<el-input style="width:16em" v-model="ruleForm.ep_name"></el-input>
</el-form-item>
</el-col>
<el-form-item label="签约企业简称" prop="ep_abbreviation">
<el-input style="width:16em" v-model="ruleForm.ep_abbreviation"></el-input>
</el-form-item>
</el-row>
</el-form>