- 全局動態加載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文件夾中 - 表格里顯示按鈕
View Code<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去分割
View Code<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>
