@mrchar/cumquat 0.1.0 → 0.1.1

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.
@@ -4492,39 +4492,40 @@ const _hoisted_3$31 = {
4492
4492
  };
4493
4493
  const _hoisted_4$28 = ["checked", "indeterminate"];
4494
4494
  const _hoisted_5$22 = { class: "cumquat-table__th-title" };
4495
- const _hoisted_6$20 = ["onClick"];
4496
- const _hoisted_7$17 = {
4495
+ const _hoisted_6$20 = ["title"];
4496
+ const _hoisted_7$17 = ["onClick"];
4497
+ const _hoisted_8$12 = {
4497
4498
  key: 1,
4498
4499
  class: "cumquat-table__filter"
4499
4500
  };
4500
- const _hoisted_8$12 = ["onClick"];
4501
- const _hoisted_9$11 = ["checked", "onChange"];
4502
- const _hoisted_10$9 = {
4501
+ const _hoisted_9$11 = ["onClick"];
4502
+ const _hoisted_10$9 = ["checked", "onChange"];
4503
+ const _hoisted_11$5 = {
4503
4504
  key: 0,
4504
4505
  class: "cumquat-table__td cumquat-table__td--center"
4505
4506
  };
4506
- const _hoisted_11$5 = ["checked", "onChange"];
4507
- const _hoisted_12$1 = {
4507
+ const _hoisted_12$1 = ["checked", "onChange"];
4508
+ const _hoisted_13$1 = {
4508
4509
  key: 1,
4509
4510
  class: "cumquat-table__td cumquat-table__expand-cell"
4510
4511
  };
4511
- const _hoisted_13$1 = ["onClick"];
4512
- const _hoisted_14$1 = {
4512
+ const _hoisted_14$1 = ["onClick"];
4513
+ const _hoisted_15$1 = {
4513
4514
  key: 0,
4514
4515
  class: "cumquat-table__expanded-row"
4515
4516
  };
4516
- const _hoisted_15$1 = ["colspan"];
4517
- const _hoisted_16$1 = { key: 0 };
4518
- const _hoisted_17$1 = ["colspan"];
4519
- const _hoisted_18$1 = {
4517
+ const _hoisted_16$1 = ["colspan"];
4518
+ const _hoisted_17$1 = { key: 0 };
4519
+ const _hoisted_18$1 = ["colspan"];
4520
+ const _hoisted_19$1 = {
4520
4521
  key: 0,
4521
4522
  class: "cumquat-table__loading cq-state--pending"
4522
4523
  };
4523
- const _hoisted_19$1 = {
4524
+ const _hoisted_20$1 = {
4524
4525
  key: 0,
4525
4526
  class: "cumquat-table__errorbar cq-state--error"
4526
4527
  };
4527
- const _hoisted_20$1 = {
4528
+ const _hoisted_21$1 = {
4528
4529
  key: 1,
4529
4530
  class: "cumquat-table__footer"
4530
4531
  };
@@ -4771,7 +4772,10 @@ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
4771
4772
  class: normalizeClass(["cumquat-table__th", `cumquat-table__th--${col.align ?? "left"}`]),
4772
4773
  style: normalizeStyle(col.width ? { width: col.width } : void 0)
4773
4774
  }, [createElementVNode("span", _hoisted_5$22, [
4774
- createTextVNode(toDisplayString(col.title) + " ", 1),
4775
+ createElementVNode("span", {
4776
+ class: "cumquat-table__th-text",
4777
+ title: col.title
4778
+ }, toDisplayString(col.title), 9, _hoisted_6$20),
4775
4779
  col.sortable ? (openBlock(), createElementBlock("button", {
4776
4780
  key: 0,
4777
4781
  type: "button",
@@ -4783,8 +4787,8 @@ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
4783
4787
  fill: "none",
4784
4788
  stroke: "currentColor",
4785
4789
  "stroke-width": "2"
4786
- }, [createElementVNode("path", { d: "m8 9 4-4 4 4M8 15l4 4 4-4" })], -1)])], 10, _hoisted_6$20)) : createCommentVNode("v-if", true),
4787
- col.filters ? (openBlock(), createElementBlock("span", _hoisted_7$17, [createElementVNode("button", {
4790
+ }, [createElementVNode("path", { d: "m8 9 4-4 4 4M8 15l4 4 4-4" })], -1)])], 10, _hoisted_7$17)) : createCommentVNode("v-if", true),
4791
+ col.filters ? (openBlock(), createElementBlock("span", _hoisted_8$12, [createElementVNode("button", {
4788
4792
  type: "button",
4789
4793
  "aria-label": "筛选",
4790
4794
  class: normalizeClass(["cumquat-table__filter-trigger", (filterValues.value[col.key]?.length ?? 0) > 0 ? "cumquat-table__filter-trigger--active" : ""]),
@@ -4794,7 +4798,7 @@ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
4794
4798
  fill: "none",
4795
4799
  stroke: "currentColor",
4796
4800
  "stroke-width": "2"
4797
- }, [createElementVNode("path", { d: "M4 5h16l-6 7v6l-4 2v-8L4 5z" })], -1)])], 10, _hoisted_8$12), openFilterKey.value === col.key ? (openBlock(), createElementBlock("ul", {
4801
+ }, [createElementVNode("path", { d: "M4 5h16l-6 7v6l-4 2v-8L4 5z" })], -1)])], 10, _hoisted_9$11), openFilterKey.value === col.key ? (openBlock(), createElementBlock("ul", {
4798
4802
  key: 0,
4799
4803
  class: "cumquat-table__filter-panel",
4800
4804
  onClick: stopFilterPanel
@@ -4803,17 +4807,17 @@ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
4803
4807
  type: "checkbox",
4804
4808
  checked: (filterValues.value[col.key] ?? []).includes(option.value),
4805
4809
  onChange: ($event) => toggleFilter(col, option.value)
4806
- }, null, 40, _hoisted_9$11), createTextVNode(" " + toDisplayString(option.label), 1)])]);
4810
+ }, null, 40, _hoisted_10$9), createTextVNode(" " + toDisplayString(option.label), 1)])]);
4807
4811
  }), 128))])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)
4808
4812
  ])], 6);
4809
4813
  }), 128))])]), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(pageRows.value, (row, index) => {
4810
4814
  return openBlock(), createElementBlock(Fragment, { key: props.rowKey(row, index) }, [createElementVNode("tr", { class: normalizeClass(["cumquat-table__row", [__props.striped && index % 2 === 1 ? "cumquat-table__row--striped" : "", isRowChecked(row, index) ? "cumquat-table__row--selected" : ""]]) }, [
4811
- __props.selectable ? (openBlock(), createElementBlock("td", _hoisted_10$9, [createElementVNode("input", {
4815
+ __props.selectable ? (openBlock(), createElementBlock("td", _hoisted_11$5, [createElementVNode("input", {
4812
4816
  type: "checkbox",
4813
4817
  class: "cumquat-table__checkbox",
4814
4818
  checked: isRowChecked(row, index),
4815
4819
  onChange: ($event) => toggleRow(row, index)
4816
- }, null, 40, _hoisted_11$5)])) : createCommentVNode("v-if", true),
4820
+ }, null, 40, _hoisted_12$1)])) : createCommentVNode("v-if", true),
4817
4821
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
4818
4822
  return openBlock(), createElementBlock("td", {
4819
4823
  key: col.key,
@@ -4831,7 +4835,7 @@ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
4831
4835
  "column"
4832
4836
  ])])], 2);
4833
4837
  }), 128)),
4834
- __props.expandable ? (openBlock(), createElementBlock("td", _hoisted_12$1, [createElementVNode("button", {
4838
+ __props.expandable ? (openBlock(), createElementBlock("td", _hoisted_13$1, [createElementVNode("button", {
4835
4839
  type: "button",
4836
4840
  "aria-label": "展开行",
4837
4841
  class: normalizeClass(["cumquat-table__expander", isRowExpanded(row, index) ? "cumquat-table__expander--open" : ""]),
@@ -4841,26 +4845,26 @@ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
4841
4845
  fill: "none",
4842
4846
  stroke: "currentColor",
4843
4847
  "stroke-width": "2"
4844
- }, [createElementVNode("path", { d: "m9 18 6-6-6-6" })], -1)])], 10, _hoisted_13$1)])) : createCommentVNode("v-if", true)
4845
- ], 2), __props.expandable && isRowExpanded(row, index) ? (openBlock(), createElementBlock("tr", _hoisted_14$1, [createElementVNode("td", { colspan: __props.columns.length + 2 }, [renderSlot(_ctx.$slots, "expanded", {
4848
+ }, [createElementVNode("path", { d: "m9 18 6-6-6-6" })], -1)])], 10, _hoisted_14$1)])) : createCommentVNode("v-if", true)
4849
+ ], 2), __props.expandable && isRowExpanded(row, index) ? (openBlock(), createElementBlock("tr", _hoisted_15$1, [createElementVNode("td", { colspan: __props.columns.length + 2 }, [renderSlot(_ctx.$slots, "expanded", {
4846
4850
  row,
4847
4851
  index
4848
- })], 8, _hoisted_15$1)])) : createCommentVNode("v-if", true)], 64);
4849
- }), 128)), pageRows.value.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_16$1, [createElementVNode("td", {
4852
+ })], 8, _hoisted_16$1)])) : createCommentVNode("v-if", true)], 64);
4853
+ }), 128)), pageRows.value.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_17$1, [createElementVNode("td", {
4850
4854
  colspan: __props.columns.length + (__props.selectable ? 1 : 0) + (__props.expandable ? 1 : 0),
4851
4855
  class: "cumquat-table__empty"
4852
- }, [remoteLoading.value ? (openBlock(), createElementBlock("span", _hoisted_18$1)) : remoteError.value ? (openBlock(), createElementBlock("button", {
4856
+ }, [remoteLoading.value ? (openBlock(), createElementBlock("span", _hoisted_19$1)) : remoteError.value ? (openBlock(), createElementBlock("button", {
4853
4857
  key: 1,
4854
4858
  type: "button",
4855
4859
  class: "cq-state--error cumquat-table__retry",
4856
4860
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => remoteState.value?.retry?.(), ["stop"]))
4857
- }, " 加载失败,点击重试 ")) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(__props.emptyText), 1)], 64))], 8, _hoisted_17$1)])) : createCommentVNode("v-if", true)])]),
4858
- remoteError.value && pageRows.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_19$1, [_cache[6] || (_cache[6] = createTextVNode(" 加载失败 ", -1)), createElementVNode("button", {
4861
+ }, " 加载失败,点击重试 ")) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(__props.emptyText), 1)], 64))], 8, _hoisted_18$1)])) : createCommentVNode("v-if", true)])]),
4862
+ remoteError.value && pageRows.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_20$1, [_cache[6] || (_cache[6] = createTextVNode(" 加载失败 ", -1)), createElementVNode("button", {
4859
4863
  type: "button",
4860
4864
  class: "cumquat-table__retry",
4861
4865
  onClick: _cache[2] || (_cache[2] = withModifiers(($event) => remoteState.value?.retry?.(), ["stop"]))
4862
4866
  }, " 点击重试 ")])) : createCommentVNode("v-if", true),
4863
- showPager.value ? (openBlock(), createElementBlock("div", _hoisted_20$1, [createVNode(_sfc_main$41, {
4867
+ showPager.value ? (openBlock(), createElementBlock("div", _hoisted_21$1, [createVNode(_sfc_main$41, {
4864
4868
  "model-value": unref(currentPage),
4865
4869
  "page-size": unref(pageSize),
4866
4870
  total: unref(pTotal),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrchar/cumquat",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Vue 3 组件库:Headless 组合函数 + 默认渲染组件 + 语义化主题,逻辑与渲染解耦",
5
5
  "keywords": [
6
6
  "components",