vue-bulma / pagination

13 stars 3 forks source link

Double slash #5

Closed moonlik closed 7 years ago

moonlik commented 7 years ago

There is a bug when the unnecessary slash is added to the URL: https://github.com/vue-bulma/pagination/blob/master/src/Pagination.vue#L3 https://github.com/vue-bulma/pagination/blob/master/src/Pagination.vue#L4 https://github.com/vue-bulma/pagination/blob/master/src/Pagination.vue#L7

:to="urlPrefix+'/'+item"

urlPrefix is / by default, so there is no need to add one more slash in those 3 lines of code.

It should look like:

:to="urlPrefix+item"

Please, fix it. Thank you!

netpi commented 7 years ago

thx @moonlik fixed https://github.com/vue-bulma/pagination/commit/05addc393901ee6fa8ad50e1f7bacec4601a0325

moonlik commented 7 years ago

Actually, I wanted to remove '/' from the code, because it's not very flexible. For example, I customize urlPrefix:

v-bind:urlPrefix="'?page='"

In the address, it looks like:

?page=%2F1

So I dont' need that '/', and I can't remove it because you hardcoded it.