cleek 1.7.6 → 1.7.10
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/LICENSE +1 -1
- package/dist/cleek.es.js +24 -19
- package/dist/cleek.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -5
package/LICENSE
CHANGED
package/dist/cleek.es.js
CHANGED
|
@@ -12273,6 +12273,7 @@ var ckTableTitle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", render$4
|
|
|
12273
12273
|
var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12274
12274
|
const _hoisted_1$4 = { class: "ck-table__header-items" };
|
|
12275
12275
|
const __default__$2 = {
|
|
12276
|
+
name: "CkTableHeaderItems",
|
|
12276
12277
|
props: {
|
|
12277
12278
|
search: { type: String, default: void 0 },
|
|
12278
12279
|
hideRefreshBtn: { type: Boolean, required: true },
|
|
@@ -12298,13 +12299,12 @@ const __default__$2 = {
|
|
|
12298
12299
|
return (this.currentPage - 1) * this.itemsPerPage + 1;
|
|
12299
12300
|
},
|
|
12300
12301
|
itemsPerPageEnd() {
|
|
12302
|
+
console.log("this.currentPage", this.currentPage);
|
|
12303
|
+
console.log("this.itemsPerPage", this.itemsPerPage);
|
|
12301
12304
|
const value2 = this.currentPage * this.itemsPerPage;
|
|
12302
12305
|
if (value2 > this.listLength)
|
|
12303
12306
|
return this.listLength;
|
|
12304
12307
|
return value2;
|
|
12305
|
-
},
|
|
12306
|
-
itemsPerPageStart() {
|
|
12307
|
-
return (this.currentPage - 1) * this.itemsPerPage + 1;
|
|
12308
12308
|
}
|
|
12309
12309
|
}
|
|
12310
12310
|
};
|
|
@@ -12335,13 +12335,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12335
12335
|
};
|
|
12336
12336
|
}
|
|
12337
12337
|
}));
|
|
12338
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
12338
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-5bc62f88"]]);
|
|
12339
12339
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12340
12340
|
const _hoisted_1$3 = { class: "ck-table__pagination" };
|
|
12341
12341
|
const _hoisted_2$1 = ["onClick"];
|
|
12342
12342
|
const _hoisted_3$1 = ["onClick"];
|
|
12343
12343
|
const itemsShowed = 5;
|
|
12344
12344
|
const __default__$1 = {
|
|
12345
|
+
name: "CkTablePagination",
|
|
12345
12346
|
props: {
|
|
12346
12347
|
currentPage: { type: Number, required: true },
|
|
12347
12348
|
align: { type: String, required: true },
|
|
@@ -12350,7 +12351,7 @@ const __default__$1 = {
|
|
|
12350
12351
|
},
|
|
12351
12352
|
emits: ["refreshList", "update:currentPage"],
|
|
12352
12353
|
computed: {
|
|
12353
|
-
|
|
12354
|
+
currentPageLocal2: {
|
|
12354
12355
|
get() {
|
|
12355
12356
|
return this.currentPage;
|
|
12356
12357
|
},
|
|
@@ -12369,12 +12370,11 @@ const __default__$1 = {
|
|
|
12369
12370
|
hasArrowRight() {
|
|
12370
12371
|
if (!this.listRight.length)
|
|
12371
12372
|
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
12373
|
return this.listRight[this.listRight.length - 1] !== this.totalPages;
|
|
12376
12374
|
},
|
|
12377
12375
|
listLeft() {
|
|
12376
|
+
if (!this.listLength)
|
|
12377
|
+
return [];
|
|
12378
12378
|
const list = [];
|
|
12379
12379
|
const listLength = (itemsShowed - 1) / 2;
|
|
12380
12380
|
for (const num of Array(listLength).keys()) {
|
|
@@ -12385,6 +12385,8 @@ const __default__$1 = {
|
|
|
12385
12385
|
return list;
|
|
12386
12386
|
},
|
|
12387
12387
|
listRight() {
|
|
12388
|
+
if (!this.listLength)
|
|
12389
|
+
return [];
|
|
12388
12390
|
const list = [];
|
|
12389
12391
|
const listLength = (itemsShowed - 1) / 2;
|
|
12390
12392
|
for (const num of Array(listLength).keys()) {
|
|
@@ -12397,7 +12399,6 @@ const __default__$1 = {
|
|
|
12397
12399
|
},
|
|
12398
12400
|
methods: {
|
|
12399
12401
|
updateCurrentPage(val) {
|
|
12400
|
-
console.log("val", val);
|
|
12401
12402
|
this.$emit("update:currentPage", val);
|
|
12402
12403
|
this.$emit("refreshList", val);
|
|
12403
12404
|
},
|
|
@@ -12410,14 +12411,13 @@ const __default__$1 = {
|
|
|
12410
12411
|
if (val === this.currentPage)
|
|
12411
12412
|
return;
|
|
12412
12413
|
this.updateCurrentPage(val);
|
|
12413
|
-
console.log("val", val);
|
|
12414
12414
|
}
|
|
12415
12415
|
}
|
|
12416
12416
|
};
|
|
12417
12417
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
|
|
12418
12418
|
setup(__props) {
|
|
12419
12419
|
return (_ctx, _cache) => {
|
|
12420
|
-
return __props.currentPage
|
|
12420
|
+
return __props.currentPage ? (openBlock(), createElementBlock("div", {
|
|
12421
12421
|
key: 0,
|
|
12422
12422
|
class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
|
|
12423
12423
|
}, [
|
|
@@ -12440,8 +12440,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12440
12440
|
autoSelect: "",
|
|
12441
12441
|
width: "50px",
|
|
12442
12442
|
align: "center",
|
|
12443
|
-
modelValue: _ctx.
|
|
12444
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(
|
|
12443
|
+
modelValue: _ctx.currentPageLocal2,
|
|
12444
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(currentPageLocal2) ? currentPageLocal2.value = $event : null),
|
|
12445
12445
|
onChange: _cache[2] || (_cache[2] = ($event) => _ctx.validateInputNumber($event.target.value))
|
|
12446
12446
|
}, null, 8, ["modelValue"]),
|
|
12447
12447
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listRight, (num) => {
|
|
@@ -12462,7 +12462,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12462
12462
|
};
|
|
12463
12463
|
}
|
|
12464
12464
|
}));
|
|
12465
|
-
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
12465
|
+
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-383a2c93"]]);
|
|
12466
12466
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12467
12467
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
12468
12468
|
const _hoisted_2 = {
|
|
@@ -12475,6 +12475,7 @@ const _hoisted_5 = { key: 1 };
|
|
|
12475
12475
|
const defaultPaginationAlign = "center";
|
|
12476
12476
|
const defaultItemsPerPage = 40;
|
|
12477
12477
|
const __default__ = {
|
|
12478
|
+
name: "CkTable",
|
|
12478
12479
|
props: {
|
|
12479
12480
|
columns: { type: Array, required: true, default: () => [] },
|
|
12480
12481
|
currentPage: { type: Number, default: 0 },
|
|
@@ -12501,6 +12502,7 @@ const __default__ = {
|
|
|
12501
12502
|
return this.currentPage;
|
|
12502
12503
|
},
|
|
12503
12504
|
set(val) {
|
|
12505
|
+
console.log("val", val);
|
|
12504
12506
|
this.$emit("update:currentPage", val);
|
|
12505
12507
|
}
|
|
12506
12508
|
}
|
|
@@ -12508,6 +12510,9 @@ const __default__ = {
|
|
|
12508
12510
|
methods: {
|
|
12509
12511
|
refreshList(pageChange = false) {
|
|
12510
12512
|
this.$emit("refreshList", pageChange);
|
|
12513
|
+
},
|
|
12514
|
+
testCurrentPage(cosito) {
|
|
12515
|
+
console.log("cosito", cosito);
|
|
12511
12516
|
}
|
|
12512
12517
|
}
|
|
12513
12518
|
};
|
|
@@ -12521,7 +12526,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12521
12526
|
key: 0,
|
|
12522
12527
|
search: _ctx.searchLocal,
|
|
12523
12528
|
"onUpdate:search": _cache[0] || (_cache[0] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
12524
|
-
currentPage:
|
|
12529
|
+
currentPage: __props.currentPage,
|
|
12525
12530
|
itemsPerPage: __props.itemsPerPage,
|
|
12526
12531
|
listLength: __props.listLength,
|
|
12527
12532
|
hideRefreshBtn: __props.hideRefreshBtn,
|
|
@@ -12547,12 +12552,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12547
12552
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12548
12553
|
]),
|
|
12549
12554
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_5, [
|
|
12550
|
-
renderSlot(_ctx.$slots, "
|
|
12555
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
12551
12556
|
])) : createCommentVNode("", true)
|
|
12552
12557
|
]),
|
|
12553
12558
|
createVNode(TablePagination, {
|
|
12554
|
-
currentPage:
|
|
12555
|
-
"onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) =>
|
|
12559
|
+
currentPage: __props.currentPage,
|
|
12560
|
+
"onUpdate:currentPage": _cache[2] || (_cache[2] = ($event) => _ctx.testCurrentPage($event)),
|
|
12556
12561
|
itemsPerPage: __props.itemsPerPage,
|
|
12557
12562
|
listLength: __props.listLength,
|
|
12558
12563
|
align: __props.paginationAlign,
|
|
@@ -12562,7 +12567,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12562
12567
|
};
|
|
12563
12568
|
}
|
|
12564
12569
|
}));
|
|
12565
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
12570
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-3635c68e"]]);
|
|
12566
12571
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12567
12572
|
return openBlock(), createElementBlock("td", {
|
|
12568
12573
|
class: normalizeClass(["ck-td", $options.computedTdClass])
|