vue项目常用
clearfix cupo nowrap text_overflowd fll flr
this.$emit("fatherFn", 1);
this.$set(this.data,”key”,value’)
this
.$set(
this
.sdata,
'sex'
,
'male'
)
this.$set(this.children,1,666)
this.$set(Object, key, value)
this.$set(Array, index, newValue)
this.$set(this.iptDatas[index], `showAlert`, true) 修改数组中对象中的值
import { sys_startLoading, resSure } from "@/utils/util";
let resSureback = resSure(res);
if (!resSureback) {
return;
} else {
this.$message.success("添加成功");
this.getData();
}
导出
window.location.href = url;
const loading = sys_startLoading(this, 1); loading.close();
let datVal = {}; this.loading = true; console.log(datVal); const res = await listGroup(datVal);
console.log(res.data);
this.tableData = res.data.items;
this.page.total = res.data.totalRecords;
this.page.size = res.data.pageSize;
this.page.index = res.data.pageIndex;
this.loading = false;
https://docs.qq.com/doc/DZHJzVk1BdXVIdFlO
this.$message.error('错了哦,这是一条错误消息');
this.$message('这是一条消息提示');
this.$message({
message: msg,
type: 'success',
duration:1000,
});
success warning error 或者不写
删除
// 删除 deleteItem(row){ this.$confirm('确定要删除吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { }).catch(() => { }); }, }
window.localStorage.setItem('key',a); var b = window.localStorage.getItem('key');
function storageObj(obj) { var checkedIdStr = JSON.stringify(obj); sessionStorage.setItem("key", checkedIdStr); }; var arrBefor = [1,2,3]; storageObj(arrBefor); var arrAfter = JSON.parse(sessionStorage.getItem("key"));
table标题样式
<el-table-column label="审批内容" align="center" :render-header="renderHeaderBig"
renderHeaderBig(h, { column, $index }) { return h("div", { style: "font-size:20px;", domProps: { innerHTML: "审批内容", }, }); },