Commit b1f3421c authored by 罗超's avatar 罗超

1

parent 13922b0b
<template> <template>
<div class="orderCourse"> <q-table :pagination="msg" selection="single" :selected.sync="selection" no-data-label="暂无相关数据" flat
<q-table class="sticky-tow-column-table sticky-two-header-table" separator="none" :data="dataList" :columns="columns"
:pagination="msg" row-key="ClassId" @update:selected="emitSel" table-class="table" hide-bottom>
selection="single" </q-table>
:selected.sync="selection"
no-data-label="暂无相关数据"
flat
class="sticky-tow-column-table "
separator="none"
:data="dataList"
:columns="columns"
row-key="ClassId"
title="日语培训产品列表"
@update:selected ="emitSel"
>
<!-- <template v-slot:body-cell-ClassName="props">
<q-td :props="props">
{{ props.row.ClassName }}
</q-td>
</template> -->
<template v-slot:bottom> </template>
</q-table>
</div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
dataList: { dataList: {
type: Array, type: Array,
default: () => [] default: () => []
},
select:{
type: Array,
default: () => []
}
},
data() {
return {
selection: [],
msg: {
pageIndex: 1,
rowsPerPage: 0
}, },
columns: [ select: {
{ type: Array,
name: "ClassName", default: () => []
label: "班级", }
align: "left", },
field: "ClassName" data() {
}, return {
{ selection: [],
name: "CourseName", msg: {
label: "课程", pageIndex: 1,
field: "CourseName", rowsPerPage: 0
align: "left"
},
{
name: "TeacherName",
label: "老师",
field: "TeacherName",
align: "left"
}, },
{ columns: [{
name: "OpenTime", name: "ClassName",
label: "上课时间", label: "班级",
field: "OpenTime", align: "left",
align: "left" field: "ClassName"
} },
] {
}; name: "CourseName",
}, label: "课程",
mounted() { field: "CourseName",
this.selection=this.select align: "left"
}, },
methods: { {
emitSel(val){ name: "TeacherName",
this.$emit("select",val) label: "老师",
field: "TeacherName",
align: "left"
},
{
name: "OpenTime",
label: "上课时间",
field: "OpenTime",
align: "left"
}
]
};
},
mounted() {
this.selection = this.select
},
methods: {
emitSel(val) {
this.$emit("select", val)
}, },
} }
}; };
</script> </script>
<style > <style>
.orderCourse .q-table__bottom { .table {
min-height: 0; max-height: 400px;
} }
.table::-webkit-scrollbar {
width: 5px;
height: 5px;
}
.table::-webkit-scrollbar-track {
background: #fff;
border-radius: 2px;
}
.table::-webkit-scrollbar-thumb {
background: #444;
border-radius: 10px;
}
.table::-webkit-scrollbar-thumb:hover {
background: #999;
}
.table::-webkit-scrollbar-corner {
background: #204754;
}
</style> </style>
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