diff --git a/web/public/js/components/common/js-page.js b/web/public/js/components/common/js-page.js new file mode 100644 index 00000000..ee993f45 --- /dev/null +++ b/web/public/js/components/common/js-page.js @@ -0,0 +1,27 @@ +Vue.component("js-page", { + props: ["v-max"], + data: function () { + let max = this.vMax + if (max == null) { + max = 0 + } + return { + max: max, + page: 1 + } + }, + methods: { + updateMax: function (max) { + this.max = max + }, + selectPage: function(page) { + this.page = page + this.$emit("change", page) + } + }, + template:`