Pagination-BbDX_CCh.mjs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { useSSRContext, mergeProps, unref } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/vue/index.mjs';
  2. import { ssrRenderAttrs, ssrRenderComponent } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/vue/server-renderer/index.mjs';
  3. import { ElPagination } from 'file://D:/MyProject/gogs/sannongzixunwang_web_ssr/sannongzixunwang_web/node_modules/element-plus/es/index.mjs';
  4. import { u as useState } from './nuxt-link-CNYVy7_w.mjs';
  5. import { _ as _export_sfc } from './server.mjs';
  6. const _sfc_main = {
  7. __name: "Pagination",
  8. __ssrInlineRender: true,
  9. props: {
  10. total: Number
  11. },
  12. emits: ["sendData"],
  13. setup(__props, { emit: __emit }) {
  14. const emit = __emit;
  15. let page = useState("page", () => 1);
  16. const props = __props;
  17. let change = (value) => {
  18. console.log("\u5F53\u524D\u9875\u7801", value);
  19. page.value = value;
  20. console.log(page.value);
  21. const data = { value: page.value };
  22. emit("sendData", data);
  23. };
  24. return (_ctx, _push, _parent, _attrs) => {
  25. _push(`<div${ssrRenderAttrs(mergeProps({ class: "pagination" }, _attrs))} data-v-64a0ee1a>`);
  26. _push(ssrRenderComponent(unref(ElPagination), {
  27. size: "small",
  28. background: "",
  29. layout: "prev, pager, next",
  30. total: props.total,
  31. class: "mt-4",
  32. "prev-text": "\u4E0A\u4E00\u9875",
  33. "next-text": "\u4E0B\u4E00\u9875",
  34. onChange: unref(change)
  35. }, null, _parent));
  36. _push(`</div>`);
  37. };
  38. }
  39. };
  40. const _sfc_setup = _sfc_main.setup;
  41. _sfc_main.setup = (props, ctx) => {
  42. const ssrContext = useSSRContext();
  43. (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/home/Pagination.vue");
  44. return _sfc_setup ? _sfc_setup(props, ctx) : undefined;
  45. };
  46. const __nuxt_component_3 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-64a0ee1a"]]);
  47. export { __nuxt_component_3 as _ };
  48. //# sourceMappingURL=Pagination-BbDX_CCh.mjs.map