cleek 1.7.4 → 1.7.8

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/dist/cleek.es.js CHANGED
@@ -12350,7 +12350,7 @@ const __default__$1 = {
12350
12350
  },
12351
12351
  emits: ["refreshList", "update:currentPage"],
12352
12352
  computed: {
12353
- currentPageLocal: {
12353
+ currentPageLocal2: {
12354
12354
  get() {
12355
12355
  return this.currentPage;
12356
12356
  },
@@ -12369,12 +12369,11 @@ const __default__$1 = {
12369
12369
  hasArrowRight() {
12370
12370
  if (!this.listRight.length)
12371
12371
  return false;
12372
- console.log(this.listRight.length - 1);
12373
- console.log(this.listRight[this.listRight.length - 1]);
12374
- console.log("this.totalPages", this.totalPages);
12375
12372
  return this.listRight[this.listRight.length - 1] !== this.totalPages;
12376
12373
  },
12377
12374
  listLeft() {
12375
+ if (!this.listLength)
12376
+ return [];
12378
12377
  const list = [];
12379
12378
  const listLength = (itemsShowed - 1) / 2;
12380
12379
  for (const num of Array(listLength).keys()) {
@@ -12385,6 +12384,8 @@ const __default__$1 = {
12385
12384
  return list;
12386
12385
  },
12387
12386
  listRight() {
12387
+ if (!this.listLength)
12388
+ return [];
12388
12389
  const list = [];
12389
12390
  const listLength = (itemsShowed - 1) / 2;
12390
12391
  for (const num of Array(listLength).keys()) {
@@ -12415,7 +12416,7 @@ const __default__$1 = {
12415
12416
  const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
12416
12417
  setup(__props) {
12417
12418
  return (_ctx, _cache) => {
12418
- return __props.currentPage && __props.itemsPerPage ? (openBlock(), createElementBlock("div", {
12419
+ return __props.currentPage ? (openBlock(), createElementBlock("div", {
12419
12420
  key: 0,
12420
12421
  class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
12421
12422
  }, [
@@ -12423,7 +12424,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12423
12424
  _ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
12424
12425
  key: 0,
12425
12426
  class: "ck-table__pagination--arrow-left",
12426
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(_ctx.currentPageLocal - 1))
12427
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(__props.currentPage - 1))
12427
12428
  }, [
12428
12429
  createVNode(ckIcon, { icon: "arrow-left" })
12429
12430
  ])) : createCommentVNode("", true),
@@ -12438,8 +12439,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12438
12439
  autoSelect: "",
12439
12440
  width: "50px",
12440
12441
  align: "center",
12441
- modelValue: _ctx.currentPageLocal,
12442
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(currentPageLocal) ? currentPageLocal.value = $event : null),
12442
+ modelValue: _ctx.currentPageLocal2,
12443
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(currentPageLocal2) ? currentPageLocal2.value = $event : null),
12443
12444
  onChange: _cache[2] || (_cache[2] = ($event) => _ctx.validateInputNumber($event.target.value))
12444
12445
  }, null, 8, ["modelValue"]),
12445
12446
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listRight, (num) => {
@@ -12451,7 +12452,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12451
12452
  _ctx.hasArrowRight ? (openBlock(), createElementBlock("div", {
12452
12453
  key: 1,
12453
12454
  class: "ck-table__pagination--arrow-right",
12454
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(_ctx.currentPageLocal + 1))
12455
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(__props.currentPage + 1))
12455
12456
  }, [
12456
12457
  createVNode(ckIcon, { icon: "arrow-right" })
12457
12458
  ])) : createCommentVNode("", true)
@@ -12460,7 +12461,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12460
12461
  };
12461
12462
  }
12462
12463
  }));
12463
- var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-72c2c886"]]);
12464
+ var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-166433c2"]]);
12464
12465
  var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
12465
12466
  const _hoisted_1$2 = { class: "ck-table" };
12466
12467
  const _hoisted_2 = {
@@ -12484,7 +12485,7 @@ const __default__ = {
12484
12485
  hideRefreshBtn: { type: Boolean, default: false },
12485
12486
  hideItemsPerPage: { type: Boolean, default: false }
12486
12487
  },
12487
- emits: ["refreshList", "update:search"],
12488
+ emits: ["refreshList", "update:search", "update:currentPage"],
12488
12489
  computed: {
12489
12490
  searchLocal: {
12490
12491
  get() {
@@ -12493,6 +12494,15 @@ const __default__ = {
12493
12494
  set(val) {
12494
12495
  this.$emit("update:search", val);
12495
12496
  }
12497
+ },
12498
+ currentPageLocal: {
12499
+ get() {
12500
+ return this.currentPage;
12501
+ },
12502
+ set(val) {
12503
+ console.log("val", val);
12504
+ this.$emit("update:currentPage", val);
12505
+ }
12496
12506
  }
12497
12507
  },
12498
12508
  methods: {
@@ -12541,8 +12551,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12541
12551
  ])) : createCommentVNode("", true)
12542
12552
  ]),
12543
12553
  createVNode(TablePagination, {
12544
- currentPage: __props.currentPage,
12545
- "onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) => isRef(currentPage) ? currentPage.value = $event : null),
12554
+ currentPage: _ctx.currentPageLocal,
12555
+ "onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) => isRef(currentPageLocal) ? currentPageLocal.value = $event : null),
12546
12556
  itemsPerPage: __props.itemsPerPage,
12547
12557
  listLength: __props.listLength,
12548
12558
  align: __props.paginationAlign,
@@ -12552,7 +12562,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
12552
12562
  };
12553
12563
  }
12554
12564
  }));
12555
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-781395c0"]]);
12565
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-09180d41"]]);
12556
12566
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
12557
12567
  return openBlock(), createElementBlock("td", {
12558
12568
  class: normalizeClass(["ck-td", $options.computedTdClass])