Commit 2290017a authored by 周远喜's avatar 周远喜

datagrid 修改

parent 4f6ed471
@import '~view-design/src/styles/index.less';
@primary-color: #249e91;
// @primary-color: #249e91;
.ivu-btn {
padding: 4px 15px 4px;
......@@ -63,7 +63,7 @@
}
.ivu-btn-group:not(.ivu-btn-group-vertical) .ivu-btn-primary:first-child:not(:last-child) {
border-right-color: #2b85e4;
border-right-color: @primary-color;
}
.ivu-btn-group:not(.ivu-btn-group-vertical)>.ivu-btn:first-child {
......@@ -126,30 +126,6 @@
z-index: 2;
}
.ivu-input-search:hover {
cursor: pointer;
padding: 0 16px !important;
background: #2ab5a6 !important;
color: #fff !important;
border-color: #2ab5a6 !important;
transition: all .2s ease-in-out;
position: relative;
z-index: 2;
}
.ivu-btn-success {
font-size: 14px;
color: #fff;
background-color: @primary-color;
border-color: @primary-color;
}
.ivu-btn-success:hover {
font-size: 14px;
color: #fff;
background-color: #2ab5a6;
border-color: #2ab5a6;
}
.ivu-btn-default {
font-size: 14px;
......@@ -196,7 +172,7 @@
.ivu-select-dropdown-list{
.ivu-select-item:hover {
color: white;
background-color: #2d8cf0;
background-color: @primary-color;
}
}
.ivu-form-item {
......
......@@ -26,7 +26,7 @@
</div>
</div>
<div class="table-main" ref="main">
<Row v-if="type=='card'">
<Row v-if="type=='card'" :gutter="40">
<Col :span="span" v-for="(row,i) in list" :key="i">
<slot name="card" :row="row">
<span>{{row.id}}</span>
......@@ -125,7 +125,7 @@ export default {
pageSizeOpts: [20, 50, 100],
tableHeight: 0,
firstY: 0,
config: false,
config: false,
list: [],
columnsCur: [],
configLoad: false,
......@@ -222,9 +222,13 @@ export default {
return ["table", "card", "list"].indexOf(value) !== -1;
}
},
span: {
span: {//栅格数
type: Number,
default: 24
},
gutter:{//间距
type:Number,
default:40
}
},
created() {
......@@ -251,13 +255,15 @@ export default {
this.easySearch();
}
if (this.height === 0) {
this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.tableHeight = this.$refs.main.offsetHeight;
})();
};
this.$nextTick(()=>{
this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.tableHeight = this.$refs.main.offsetHeight;
})();
};
})
} else {
this.tableHeight = this.height;
}
......@@ -535,6 +541,7 @@ export default {
tr td .ivu-table-cell {
padding: 0 5px;
}
overflow-x: hidden;
}
.table-tools {
display: flex;
......
......@@ -13,7 +13,7 @@
:conditions="easySearch"
:action="action"
:set="set"
:gutter="80"
:gutter="40"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
......@@ -192,10 +192,10 @@ export default {
};
},
created() {
let oldStr=localStorage.getItem('admin');
let userlist = this.$store.getters.getUser(2);
console.info(userlist)
console.warn(localStorage)
// let oldStr=localStorage.getItem('admin');
// let userlist = this.$store.getters.getUser(2);
// console.info(userlist)
// console.warn(localStorage)
// console.warn("02",sessionStorage)
// console.log("user",oldStr)
},
......
......@@ -31,7 +31,7 @@
</a>
</div>
<Content class="con" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" class="card_box">
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment