cleek 1.7.5 → 1.7.9
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 +19 -14
- package/dist/cleek.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -6
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 },
|
|
@@ -12335,13 +12336,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12335
12336
|
};
|
|
12336
12337
|
}
|
|
12337
12338
|
}));
|
|
12338
|
-
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
12339
|
+
var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6cf00b9c"]]);
|
|
12339
12340
|
var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12340
12341
|
const _hoisted_1$3 = { class: "ck-table__pagination" };
|
|
12341
12342
|
const _hoisted_2$1 = ["onClick"];
|
|
12342
12343
|
const _hoisted_3$1 = ["onClick"];
|
|
12343
12344
|
const itemsShowed = 5;
|
|
12344
12345
|
const __default__$1 = {
|
|
12346
|
+
name: "CkTablePagination",
|
|
12345
12347
|
props: {
|
|
12346
12348
|
currentPage: { type: Number, required: true },
|
|
12347
12349
|
align: { type: String, required: true },
|
|
@@ -12350,7 +12352,7 @@ const __default__$1 = {
|
|
|
12350
12352
|
},
|
|
12351
12353
|
emits: ["refreshList", "update:currentPage"],
|
|
12352
12354
|
computed: {
|
|
12353
|
-
|
|
12355
|
+
currentPageLocal2: {
|
|
12354
12356
|
get() {
|
|
12355
12357
|
return this.currentPage;
|
|
12356
12358
|
},
|
|
@@ -12369,12 +12371,11 @@ const __default__$1 = {
|
|
|
12369
12371
|
hasArrowRight() {
|
|
12370
12372
|
if (!this.listRight.length)
|
|
12371
12373
|
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
12374
|
return this.listRight[this.listRight.length - 1] !== this.totalPages;
|
|
12376
12375
|
},
|
|
12377
12376
|
listLeft() {
|
|
12377
|
+
if (!this.listLength)
|
|
12378
|
+
return [];
|
|
12378
12379
|
const list = [];
|
|
12379
12380
|
const listLength = (itemsShowed - 1) / 2;
|
|
12380
12381
|
for (const num of Array(listLength).keys()) {
|
|
@@ -12385,6 +12386,8 @@ const __default__$1 = {
|
|
|
12385
12386
|
return list;
|
|
12386
12387
|
},
|
|
12387
12388
|
listRight() {
|
|
12389
|
+
if (!this.listLength)
|
|
12390
|
+
return [];
|
|
12388
12391
|
const list = [];
|
|
12389
12392
|
const listLength = (itemsShowed - 1) / 2;
|
|
12390
12393
|
for (const num of Array(listLength).keys()) {
|
|
@@ -12415,7 +12418,7 @@ const __default__$1 = {
|
|
|
12415
12418
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$1), {
|
|
12416
12419
|
setup(__props) {
|
|
12417
12420
|
return (_ctx, _cache) => {
|
|
12418
|
-
return __props.currentPage
|
|
12421
|
+
return __props.currentPage ? (openBlock(), createElementBlock("div", {
|
|
12419
12422
|
key: 0,
|
|
12420
12423
|
class: normalizeClass(["ck-table__pagination-container", `pagination-align--${__props.align}`])
|
|
12421
12424
|
}, [
|
|
@@ -12423,7 +12426,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12423
12426
|
_ctx.hasArrowLeft ? (openBlock(), createElementBlock("div", {
|
|
12424
12427
|
key: 0,
|
|
12425
12428
|
class: "ck-table__pagination--arrow-left",
|
|
12426
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(
|
|
12429
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateCurrentPage(__props.currentPage - 1))
|
|
12427
12430
|
}, [
|
|
12428
12431
|
createVNode(ckIcon, { icon: "arrow-left" })
|
|
12429
12432
|
])) : createCommentVNode("", true),
|
|
@@ -12438,8 +12441,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12438
12441
|
autoSelect: "",
|
|
12439
12442
|
width: "50px",
|
|
12440
12443
|
align: "center",
|
|
12441
|
-
modelValue: _ctx.
|
|
12442
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(
|
|
12444
|
+
modelValue: _ctx.currentPageLocal2,
|
|
12445
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(currentPageLocal2) ? currentPageLocal2.value = $event : null),
|
|
12443
12446
|
onChange: _cache[2] || (_cache[2] = ($event) => _ctx.validateInputNumber($event.target.value))
|
|
12444
12447
|
}, null, 8, ["modelValue"]),
|
|
12445
12448
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listRight, (num) => {
|
|
@@ -12451,7 +12454,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12451
12454
|
_ctx.hasArrowRight ? (openBlock(), createElementBlock("div", {
|
|
12452
12455
|
key: 1,
|
|
12453
12456
|
class: "ck-table__pagination--arrow-right",
|
|
12454
|
-
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(
|
|
12457
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.updateCurrentPage(__props.currentPage + 1))
|
|
12455
12458
|
}, [
|
|
12456
12459
|
createVNode(ckIcon, { icon: "arrow-right" })
|
|
12457
12460
|
])) : createCommentVNode("", true)
|
|
@@ -12460,7 +12463,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12460
12463
|
};
|
|
12461
12464
|
}
|
|
12462
12465
|
}));
|
|
12463
|
-
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
12466
|
+
var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-383a2c93"]]);
|
|
12464
12467
|
var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12465
12468
|
const _hoisted_1$2 = { class: "ck-table" };
|
|
12466
12469
|
const _hoisted_2 = {
|
|
@@ -12473,6 +12476,7 @@ const _hoisted_5 = { key: 1 };
|
|
|
12473
12476
|
const defaultPaginationAlign = "center";
|
|
12474
12477
|
const defaultItemsPerPage = 40;
|
|
12475
12478
|
const __default__ = {
|
|
12479
|
+
name: "CkTable",
|
|
12476
12480
|
props: {
|
|
12477
12481
|
columns: { type: Array, required: true, default: () => [] },
|
|
12478
12482
|
currentPage: { type: Number, default: 0 },
|
|
@@ -12499,6 +12503,7 @@ const __default__ = {
|
|
|
12499
12503
|
return this.currentPage;
|
|
12500
12504
|
},
|
|
12501
12505
|
set(val) {
|
|
12506
|
+
console.log("val", val);
|
|
12502
12507
|
this.$emit("update:currentPage", val);
|
|
12503
12508
|
}
|
|
12504
12509
|
}
|
|
@@ -12519,7 +12524,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12519
12524
|
key: 0,
|
|
12520
12525
|
search: _ctx.searchLocal,
|
|
12521
12526
|
"onUpdate:search": _cache[0] || (_cache[0] = ($event) => isRef(searchLocal) ? searchLocal.value = $event : null),
|
|
12522
|
-
currentPage:
|
|
12527
|
+
currentPage: __props.currentPage,
|
|
12523
12528
|
itemsPerPage: __props.itemsPerPage,
|
|
12524
12529
|
listLength: __props.listLength,
|
|
12525
12530
|
hideRefreshBtn: __props.hideRefreshBtn,
|
|
@@ -12545,7 +12550,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12545
12550
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12546
12551
|
]),
|
|
12547
12552
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_5, [
|
|
12548
|
-
renderSlot(_ctx.$slots, "
|
|
12553
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
12549
12554
|
])) : createCommentVNode("", true)
|
|
12550
12555
|
]),
|
|
12551
12556
|
createVNode(TablePagination, {
|
|
@@ -12560,7 +12565,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
12560
12565
|
};
|
|
12561
12566
|
}
|
|
12562
12567
|
}));
|
|
12563
|
-
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
12568
|
+
var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0027f3f2"]]);
|
|
12564
12569
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12565
12570
|
return openBlock(), createElementBlock("td", {
|
|
12566
12571
|
class: normalizeClass(["ck-td", $options.computedTdClass])
|