From bf8ecd81dc283dae9fff8da552f3528af9653586 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 22 Feb 2023 17:34:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/public/js/components/common/js-page.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 web/public/js/components/common/js-page.js 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:`
+
+ {{i}} +
+
` +}) \ No newline at end of file