Style fix

pull/12/head
Merve Özçifçi 2019-05-07 16:22:09 +03:00
parent d1fb198e5b
commit 1158948a1a
3 changed files with 12 additions and 8 deletions

View File

@ -5,6 +5,7 @@
@import '../../components/card/Card.css'; @import '../../components/card/Card.css';
@import '../../components/checkbox/Checkbox.css'; @import '../../components/checkbox/Checkbox.css';
@import '../../components/chips/Chips.css'; @import '../../components/chips/Chips.css';
@import '../../components/dataview/DataView.css';
@import '../../components/dialog/Dialog.css'; @import '../../components/dialog/Dialog.css';
@import '../../components/dropdown/Dropdown.css'; @import '../../components/dropdown/Dropdown.css';
@import '../../components/fieldset/Fieldset.css'; @import '../../components/fieldset/Fieldset.css';

View File

@ -3,7 +3,7 @@
<div class="p-dataview-header" v-if="$scopedSlots.header"> <div class="p-dataview-header" v-if="$scopedSlots.header">
<slot name="header"></slot> <slot name="header"></slot>
</div> </div>
<Paginator v-if="paginatorTop" :rows.sync="rows" :first.sync="firstPage" :totalRecords="getTotalRecords" :pageLinkSize="pageLinkSize" :template="paginatorTemplate" :rowsPerPageOptions="rowsPerPageOptions" <Paginator v-if="paginatorTop" :rows.sync="rows" :first.sync="firstRecord" :totalRecords="getTotalRecords" :pageLinkSize="pageLinkSize" :template="paginatorTemplate" :rowsPerPageOptions="rowsPerPageOptions"
:currentPageReportTemplate="currentPageReportTemplate" :class="{'p-paginator-top': paginatorTop}"></Paginator> :currentPageReportTemplate="currentPageReportTemplate" :class="{'p-paginator-top': paginatorTop}"></Paginator>
<div class="p-dataview-content"> <div class="p-dataview-content">
<div class="p-grid"> <div class="p-grid">
@ -14,7 +14,7 @@
<div v-if="isEmpty" class="p-col-12">{{emptyMessage}}</div> <div v-if="isEmpty" class="p-col-12">{{emptyMessage}}</div>
</div> </div>
</div> </div>
<Paginator v-if="paginatorBottom" :rows.sync="rows" :first.sync="firstPage" :totalRecords="getTotalRecords" :pageLinkSize="pageLinkSize" :template="paginatorTemplate" :rowsPerPageOptions="rowsPerPageOptions" <Paginator v-if="paginatorBottom" :rows.sync="rows" :first.sync="firstRecord" :totalRecords="getTotalRecords" :pageLinkSize="pageLinkSize" :template="paginatorTemplate" :rowsPerPageOptions="rowsPerPageOptions"
:currentPageReportTemplate="currentPageReportTemplate" :class="{'p-paginator-bottom': paginatorBottom}"></Paginator> :currentPageReportTemplate="currentPageReportTemplate" :class="{'p-paginator-bottom': paginatorBottom}"></Paginator>
<div class="p-dataview-footer" v-if="$scopedSlots.footer"> <div class="p-dataview-footer" v-if="$scopedSlots.footer">
<slot name="footer"></slot> <slot name="footer"></slot>
@ -92,7 +92,7 @@
}, },
data() { data() {
return { return {
firstPage: this.first ? this.first : 0 firstRecord: this.first ? this.first : 0
} }
}, },
methods: { methods: {
@ -174,7 +174,7 @@
if (value && value.length) { if (value && value.length) {
if (this.paginator) { if (this.paginator) {
const rows = this.rows; const rows = this.rows;
const first = this.lazy ? 0 : this.firstPage; const first = this.lazy ? 0 : this.firstRecord;
const last = rows + first; const last = rows + first;
let items = []; let items = [];

View File

@ -88,16 +88,17 @@
}, },
onSortChange(event){ onSortChange(event){
const value = event.value.value; const value = event.value.value;
const sortValue = event.value;
if (value.indexOf('!') === 0) { if (value.indexOf('!') === 0) {
this.sortOrder = -1; this.sortOrder = -1;
this.sortField = value.substring(1, value.length); this.sortField = value.substring(1, value.length);
this.sortKey = value; this.sortKey = sortValue;
} }
else { else {
this.sortOrder = 1; this.sortOrder = 1;
this.sortField = value; this.sortField = value;
this.sortKey = value; this.sortKey = sortValue;
} }
} }
}, },
@ -107,6 +108,8 @@
} }
</script> </script>
<style scoped> <style lang="scss">
.p-dropdown {
width: 12em;
}
</style> </style>