Commit 96c0b428 authored by 姬鋆屾's avatar 姬鋆屾

推表格适配

parent 663e32af
......@@ -13,6 +13,7 @@
:row-class-name="tableRowClassName"
:empty-text="emptytxt ? emptytxt : emptyText"
border
:height="height"
style="width: 100%"
>
<el-table-column
......@@ -50,9 +51,9 @@
<script>
export default {
props: {
toggleRowSelection:{
type:Array,
default:()=>[]
toggleRowSelection: {
type: Array,
default: () => [],
},
handleRowKeyMethod: {
type: Function,
......@@ -116,15 +117,17 @@ export default {
required: false,
default: () => [],
},
height: {
type: String,
required: false,
},
},
computed: {
emptyText() {
return !this.loading && !this.tableData.length ? "暂无数据" : "加载中...";
},
},
created(){
},
created() {},
watch: {
tableData(val) {
val.length == 0 || val.length > 0
......@@ -140,15 +143,15 @@ export default {
// console.log(val);
// }
},
toggleRowSelection:{
handler:function(v){
v.forEach(element => {
this.$refs.eltable.toggleRowSelection(element,true)
toggleRowSelection: {
handler: function(v) {
v.forEach((element) => {
this.$refs.eltable.toggleRowSelection(element, true);
});
},
deep:true,
immediate:true
}
deep: true,
immediate: true,
},
},
methods: {},
data() {
......
......@@ -178,6 +178,7 @@
:tableData="data.data"
:columns="config.columns"
:loading="data.loading"
:height="config.height"
:tableRowClassName="config.methods.tableRowClassName"
:handleSpanMethod="config.methods.handleSpanMethod"
:handleSortChange="config.methods.handleSortChange"
......@@ -256,7 +257,7 @@ import DataTreeTable from "@/components/DataTreeTable.vue";
import TabPane from "@/components/tabPane.vue";
export default {
props: {
toggleRowSelection:{
toggleRowSelection: {
type: Array,
default: () => [],
},
......
......@@ -351,6 +351,7 @@ export default {
saveUrl: "/perform/dept/conf/save",
},
config: {
height: "580",
isshowTabPane: false,
search: [],
columns: [
......@@ -381,7 +382,6 @@ export default {
};
},
methods: {
handleRowClick(val) {
val.check = !val.check;
val.check
......@@ -567,7 +567,7 @@ export default {
}
.content {
width: 100%;
height:auto;
height: auto;
border: 1px solid #e4e7ed;
border-top: 0;
padding: 20px;
......
......@@ -23,7 +23,7 @@
<Field
label="联系电话:"
prop="phone"
maxLength="11"
:maxLength="11"
v-model="form.phone"
placeholder="请输入联系电话"
/>
......@@ -148,6 +148,7 @@ export default {
this.deptArr = [];
}
});
console.log(this.tableConfig);
// this.getData();
},
data() {
......@@ -173,6 +174,7 @@ export default {
config: {
isshowTabPane: false,
search: [],
height: "550",
columns: [
{ type: "index", label: "序号", width: 50 },
......
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