Skip to content

Commit 7db1fc9

Browse files
committed
fix: small fixes
1 parent fa0ab41 commit 7db1fc9

File tree

4 files changed

+66
-66
lines changed

4 files changed

+66
-66
lines changed

src/components/Alert/CAlert.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
<script>
2424
import CButtonClose from '../Button/CButtonClose'
25+
2526
export default {
2627
name: 'CAlert',
2728
components: { CButtonClose },
@@ -116,10 +117,5 @@ export default {
116117
</style>
117118

118119
<style lang="scss">
119-
div:not(.coreui-custom-styles) {
120-
// .c-alert {
121-
// background-color: grey !important;
122-
// }
123-
@import "~@coreui/coreui/scss/partials/alert.scss";
124-
}
120+
@import "~@coreui/coreui/scss/partials/alert.scss";
125121
</style>

src/components/Pagination/CPagination.vue

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<CLink
1010
class="c-page-link"
1111
@click="setPage(1)"
12-
:disabled="page === 1"
12+
:disabled="activePage === 1"
1313
aria-label="Go to first page"
1414
>
1515
<span v-html="firstButtonHtml"></span>
@@ -18,8 +18,8 @@
1818
<li v-if="!hideArrows" :class="firstClasses">
1919
<CLink
2020
class="c-page-link"
21-
@click="setPage(page - 1)"
22-
:disabled="page === 1"
21+
@click="setPage(activePage - 1)"
22+
:disabled="activePage === 1"
2323
aria-label="Go to previous page"
2424
>
2525
<span v-html="previousButtonHtml"></span>
@@ -60,8 +60,8 @@
6060
>
6161
<CLink
6262
class="c-page-link"
63-
@click="setPage(page + 1)"
64-
:disabled="page === pages"
63+
@click="setPage(activePage + 1)"
64+
:disabled="activePage === pages"
6565
aria-label="Go to next page"
6666
>
6767
<span v-html="nextButtonHtml"></span>
@@ -71,7 +71,7 @@
7171
<CLink
7272
class="c-page-link"
7373
@click="setPage(pages)"
74-
:disabled="page === pages"
74+
:disabled="activePage === pages"
7575
aria-label="Go to last page"
7676
>
7777
<span v-html="lastButtonHtml"></span>
@@ -85,9 +85,52 @@
8585
8686
export default {
8787
name: 'CPagination',
88+
props: {
89+
activePage: {
90+
type: Number,
91+
default: 1
92+
},
93+
pages: {
94+
type: Number,
95+
default: 10
96+
},
97+
size: {
98+
type: String,
99+
default: 'md',
100+
validator: val => ['sm', 'md', 'lg'].includes(val)
101+
},
102+
align: {
103+
type: String,
104+
default: 'start',
105+
validator: val => ['start', 'center', 'end'].includes(val)
106+
},
107+
limit: {
108+
type: Number,
109+
default: 5
110+
},
111+
hideDots: Boolean,
112+
hideArrows: Boolean,
113+
hideDoubleArrows: Boolean,
114+
firstButtonHtml: {
115+
type: String,
116+
default: '&laquo;'
117+
},
118+
previousButtonHtml: {
119+
type: String,
120+
default: '&lsaquo;'
121+
},
122+
nextButtonHtml: {
123+
type: String,
124+
default: '&rsaquo;'
125+
},
126+
lastButtonHtml: {
127+
type: String,
128+
default: '&raquo;'
129+
},
130+
notResponsive: Boolean
131+
},
88132
data () {
89133
return {
90-
page: this.activePage,
91134
showFirstDots: false,
92135
showLastDots: false,
93136
rwd: this.size,
@@ -99,13 +142,15 @@
99142
// this.page = val
100143
// },
101144
pages (val) {
102-
if(val < this.activePage)
145+
if (val < this.activePage) {
103146
this.$emit('update:activePage', val)
147+
}
104148
}
105149
},
106150
mounted () {
107-
if (this.size !== 'sm' && !this.notResponsive)
151+
if (this.size !== 'sm' && !this.notResponsive) {
108152
this.erd.listenTo(this.$el, this.onWrapperResize)
153+
}
109154
},
110155
computed: {
111156
firstClasses () {
@@ -188,55 +233,11 @@
188233
}
189234
return 'c-page-item'
190235
}
191-
},
192-
props: {
193-
activePage: {
194-
type: Number,
195-
default: 1
196-
},
197-
pages: {
198-
type: Number,
199-
default: 10
200-
},
201-
size: {
202-
type: String,
203-
default: 'md',
204-
validator: val => ['sm', 'md', 'lg'].includes(val)
205-
},
206-
align: {
207-
type: String,
208-
default: 'start',
209-
validator: val => ['start', 'center', 'end'].includes(val)
210-
},
211-
limit: {
212-
type: Number,
213-
default: 5
214-
},
215-
hideDots: Boolean,
216-
hideArrows: Boolean,
217-
hideDoubleArrows: Boolean,
218-
firstButtonHtml: {
219-
type: String,
220-
default: '&laquo;'
221-
},
222-
previousButtonHtml: {
223-
type: String,
224-
default: '&lsaquo;'
225-
},
226-
nextButtonHtml: {
227-
type: String,
228-
default: '&rsaquo;'
229-
},
230-
lastButtonHtml: {
231-
type: String,
232-
default: '&raquo;'
233-
},
234-
notResponsive: Boolean
235236
}
236237
}
237238
</script>
238239

239-
<style scoped lang="scss">
240+
<style lang="scss">
240241
@import "~@coreui/coreui/scss/partials/pagination.scss";
241242
@import "~@coreui/coreui/scss/utilities/_flex.scss";
242243
.c-page-link:focus {

src/components/Table/CTable.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,17 @@
216216
<script>
217217
import CSpinner from '../Spinner/CSpinner'
218218
import CPagination from '../Pagination/CPagination'
219-
220-
import { CIcon } from '@coreui/icons/vue'
219+
import { CIcon as CIconRaw} from '@coreui/icons/vue'
221220
import { arrowTop, arrowBottom } from '@coreui/icons'
222-
CIcon.icons = { arrowTop, arrowBottom }
221+
const CIcon = Object.assign({}, CIconRaw, { icons : { arrowTop, arrowBottom }})
223222
224223
export default {
225224
name: 'CTable',
226-
components: { CPagination, CSpinner, CIcon },
225+
components: {
226+
CPagination,
227+
CSpinner,
228+
CIcon
229+
},
227230
props: {
228231
items: Array,
229232
fields: Array,

src/components/Widgets/CWidgetIcon.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939

4040
<script>
4141
import CLink from '../Link/CLink'
42-
import { CIcon } from '@coreui/icons/vue'
42+
import { CIcon as CIconRaw } from '@coreui/icons/vue'
4343
import { arrowRight } from '@coreui/icons'
44-
CIcon.icons = { arrowRight }
44+
const CIcon = Object.assign({}, CIconRaw, { icons : { arrowRight }})
4545
4646
export default {
4747
name: 'CWidgetIcon',

0 commit comments

Comments
 (0)