jeawin-astro 3.0.98 → 3.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jeawin-astro",
3
- "version": "3.0.98",
3
+ "version": "3.0.99",
4
4
  "author": "chaegumi <chaegumi@qq.com>",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import JeawinApi from "../scripts/cms.js";
12
12
  import Pagination from "./pagination.astro";
13
- const { field_id, rel_id, uri, page, limit, no_fields } = Astro.props;
13
+ const { field_id, rel_id, uri, page, limit, no_fields, limit_type } = Astro.props;
14
14
  const { jeawin_apikey, jeawin_api_domain, jeawin_api_path, sticky_top_height, is_preview } = Astro.locals;
15
15
  const jeawinapi = new JeawinApi({
16
16
  apikey: jeawin_apikey,
@@ -27,6 +27,7 @@ let per_page = 15;
27
27
  if (limit) {
28
28
  per_page = limit;
29
29
  }
30
+
30
31
  // console.log(count);
31
32
  let current_page = 1;
32
33
  let total_pages = 0;
@@ -51,9 +52,8 @@ const html = await Astro.slots.render("default", [nodes]);
51
52
  ---
52
53
 
53
54
  <Fragment set:html={html} />
54
-
55
55
  {
56
- limit ? null : (
56
+ limit_type && limit_type !== "page" ? null : (
57
57
  <Pagination
58
58
  uri={uri}
59
59
  total={total}