jky-component-lib 0.0.104 → 0.0.106

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.
@@ -1,7 +1,14 @@
1
+ /* AMap 高德地图组件样式 */
2
+ .jky-amap-container {
3
+ /* 地图容器样式 */
4
+ position: relative;
5
+ overflow: hidden;
1
6
 
2
- /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
- .amap-icon img,
4
- .amap-marker-content img {
5
- width: 25px;
6
- height: 34px;
7
+ /* 隐藏高德地图的 logo 和版权信息(注意:商业使用请遵守高德地图条款) */
8
+ .amap-logo {
9
+ display: none !important;
10
+ }
11
+ .amap-copyright {
12
+ display: none !important;
13
+ }
7
14
  }
@@ -1,14 +1,3 @@
1
- /* AMap 高德地图组件样式 */
2
- .jky-amap-container {
3
- /* 地图容器样式 */
4
- position: relative;
5
- overflow: hidden;
6
1
 
7
- /* 隐藏高德地图的 logo 和版权信息(注意:商业使用请遵守高德地图条款) */
8
- .amap-logo {
9
- display: none !important;
10
- }
11
- .amap-copyright {
12
- display: none !important;
13
- }
14
- }
2
+ /* 轨迹回放组件不需要额外样式 */
3
+ /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
@@ -1,3 +1,7 @@
1
1
 
2
- /* 轨迹回放组件不需要额外样式 */
3
- /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
2
+ /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
+ .amap-icon img,
4
+ .amap-marker-content img {
5
+ width: 25px;
6
+ height: 34px;
7
+ }
@@ -1,4 +1,4 @@
1
- const version = "0.0.104";
1
+ const version = "0.0.106";
2
2
  export {
3
3
  version
4
4
  };
@@ -68,12 +68,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
68
68
  sideMenuWithParent: { type: Boolean, default: true }
69
69
  },
70
70
  setup(__props) {
71
+ var _a, _b;
71
72
  const props = __props;
72
73
  const router = useRouter();
73
74
  const route = useRoute();
74
75
  const attrs = useAttrs();
75
76
  const { useTabsStore } = createTabsStore({
76
- enableCache: props.cachable
77
+ enableCache: (_b = (_a = props.cachable) != null ? _a : attrs.cachable) != null ? _b : true
77
78
  });
78
79
  const tabsStore = useTabsStore();
79
80
  const activeTopMenu = ref("");
@@ -84,11 +85,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
84
85
  });
85
86
  function buildMenuFromRoutes(routes2) {
86
87
  const menuRoutes = routes2.filter((r) => {
87
- var _a;
88
- return (_a = r.meta) == null ? void 0 : _a.title;
88
+ var _a2;
89
+ return (_a2 = r.meta) == null ? void 0 : _a2.title;
89
90
  });
90
91
  const buildMenuItem = (route2, parentPath = "") => {
91
- var _a, _b, _c, _d;
92
+ var _a2, _b2, _c, _d;
92
93
  let fullPath = "";
93
94
  if (route2.path.startsWith(parentPath)) {
94
95
  fullPath = route2.path;
@@ -98,8 +99,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
98
99
  const normalizedPath = fullPath.startsWith("/") ? fullPath : `/${fullPath}`;
99
100
  const item = {
100
101
  index: normalizedPath,
101
- title: ((_a = route2.meta) == null ? void 0 : _a.title) || "",
102
- icon: ((_b = route2.meta) == null ? void 0 : _b.icon) || "",
102
+ title: ((_a2 = route2.meta) == null ? void 0 : _a2.title) || "",
103
+ icon: ((_b2 = route2.meta) == null ? void 0 : _b2.icon) || "",
103
104
  hideMenu: (_d = (_c = route2.meta) == null ? void 0 : _c.hideMenu) != null ? _d : false,
104
105
  route: normalizedPath,
105
106
  path: normalizedPath,
@@ -107,8 +108,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
107
108
  };
108
109
  if (route2.children && route2.children.length > 0) {
109
110
  item.children = route2.children.filter((child) => {
110
- var _a2;
111
- return (_a2 = child.meta) == null ? void 0 : _a2.title;
111
+ var _a3;
112
+ return (_a3 = child.meta) == null ? void 0 : _a3.title;
112
113
  }).map((child) => buildMenuItem(child, normalizedPath));
113
114
  }
114
115
  return item;
@@ -124,19 +125,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
124
125
  const topMenuData = computed(() => {
125
126
  if (props.topMenuSingleLevel) {
126
127
  return cloneDeep(menuData.value).map((item) => {
127
- const _a = item, { children } = _a, rest = __objRest(_a, ["children"]);
128
+ const _a2 = item, { children } = _a2, rest = __objRest(_a2, ["children"]);
128
129
  return rest;
129
130
  });
130
131
  }
131
132
  return menuData.value;
132
133
  });
133
134
  const showSideMenu = computed(() => {
134
- var _a, _b;
135
- return (_b = (_a = props.showSideMenu) != null ? _a : attrs.showSideMenu) != null ? _b : attrs["show-side-menu"];
135
+ var _a2, _b2;
136
+ return (_b2 = (_a2 = props.showSideMenu) != null ? _a2 : attrs.showSideMenu) != null ? _b2 : attrs["show-side-menu"];
136
137
  });
137
138
  const showTopMenu = computed(() => {
138
- var _a, _b;
139
- return (_b = (_a = props.showTopMenu) != null ? _a : attrs.showTopMenu) != null ? _b : attrs["show-top-menu"];
139
+ var _a2, _b2;
140
+ return (_b2 = (_a2 = props.showTopMenu) != null ? _a2 : attrs.showTopMenu) != null ? _b2 : attrs["show-top-menu"];
140
141
  });
141
142
  const displayedSideMenu = computed(() => {
142
143
  if (!showSideMenu.value) {
@@ -177,8 +178,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
177
178
  () => {
178
179
  const routePath = route.path;
179
180
  const matchedMenus = route.matched.filter((r) => {
180
- var _a;
181
- return (_a = r.meta) == null ? void 0 : _a.title;
181
+ var _a2;
182
+ return (_a2 = r.meta) == null ? void 0 : _a2.title;
182
183
  });
183
184
  if (matchedMenus.length === 0) {
184
185
  return;
@@ -198,7 +199,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
198
199
  router.push(index);
199
200
  }
200
201
  return (_ctx, _cache) => {
201
- var _a;
202
+ var _a2;
202
203
  const _component_ElAutoResizer = resolveComponent("ElAutoResizer");
203
204
  return openBlock(), createElementBlock("div", {
204
205
  class: normalizeClass(["jky-page-layout flex h-full w-full flex-col overflow-hidden gap-3", props.className])
@@ -270,11 +271,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
270
271
  style: normalizeStyle({ "--el-card-padding": props.cardPadding })
271
272
  }, {
272
273
  default: withCtx(() => {
273
- var _a2;
274
+ var _a3;
274
275
  return [
275
276
  createVNode(_sfc_main$2, {
276
277
  store: unref(tabsStore),
277
- round: (_a2 = props.roundTabs) != null ? _a2 : _ctx.$attrs["round-tabs"],
278
+ round: (_a3 = props.roundTabs) != null ? _a3 : _ctx.$attrs["round-tabs"],
278
279
  mode: "route",
279
280
  cachable: props.cachable,
280
281
  closable: true
@@ -288,7 +289,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
288
289
  store: unref(tabsStore),
289
290
  mode: "route",
290
291
  cachable: props.cachable,
291
- round: (_a = props.roundTabs) != null ? _a : _ctx.$attrs["round-tabs"],
292
+ round: (_a2 = props.roundTabs) != null ? _a2 : _ctx.$attrs["round-tabs"],
292
293
  closable: true
293
294
  }, null, 8, ["store", "cachable", "round"])),
294
295
  (openBlock(), createBlock(resolveDynamicComponent(props.mainWithCard ? unref(ElCard) : "div"), {
@@ -29,5 +29,5 @@ declare const _default: import('vue').DefineComponent<ToolbarProps, {
29
29
  };
30
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
31
31
  toolbarRightRef: HTMLDivElement;
32
- }, HTMLDivElement>;
32
+ }, any>;
33
33
  export default _default;
@@ -17,16 +17,16 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, withModifiers, h } from "vue";
20
+ import { defineComponent, ref, computed, openBlock, createElementBlock, mergeProps, createElementVNode, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, withModifiers, h } from "vue";
21
21
  import { ArrowDown } from "@element-plus/icons-vue";
22
22
  import { ElDropdown, ElButton, ElIcon, ElDropdownMenu, ElDropdownItem } from "element-plus";
23
23
  import { useResponsiveToolbar } from "../utils/responsive-toolbar.js";
24
- const _hoisted_1 = { class: "flex items-center justify-between mb-2 py-2 jky-page-table__toolbar" };
25
- const _hoisted_2 = { class: "flex items-center" };
26
- const _hoisted_3 = { class: "flex items-center ml-2 text-gray-500" };
27
- const _hoisted_4 = ["title", "onClick"];
24
+ const _hoisted_1 = { class: "flex items-center" };
25
+ const _hoisted_2 = { class: "flex items-center ml-2 text-gray-500" };
26
+ const _hoisted_3 = ["title", "onClick"];
28
27
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
29
- name: "JkyPageTableToolbar"
28
+ name: "JkyPageTableToolbar",
29
+ inheritAttrs: false
30
30
  }), {
31
31
  __name: "Toolbar",
32
32
  props: {
@@ -100,6 +100,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
100
100
  const buttons = [];
101
101
  if (props.leftButtons) {
102
102
  props.leftButtons.forEach((button, index) => {
103
+ if (typeof button.hidden === "function") {
104
+ if (button.hidden(button, index)) {
105
+ return;
106
+ }
107
+ }
108
+ if (button.hidden) {
109
+ return;
110
+ }
103
111
  const iconSpan = button.icon ? h("span", {
104
112
  class: `${button.icon} text-[1em] inline-block`
105
113
  }) : null;
@@ -129,6 +137,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
129
137
  const items = [];
130
138
  if (props.batchButtons) {
131
139
  props.batchButtons.forEach((button, index) => {
140
+ if (typeof button.hidden === "function") {
141
+ if (button.hidden(button, index)) {
142
+ return;
143
+ }
144
+ }
145
+ if (button.hidden) {
146
+ return;
147
+ }
132
148
  items.push(
133
149
  h(
134
150
  ElDropdownItem,
@@ -150,6 +166,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
150
166
  const buttons = [];
151
167
  if (props.rightButtons) {
152
168
  props.rightButtons.forEach((button, index) => {
169
+ if (typeof button.hidden === "function") {
170
+ if (button.hidden(button, index)) {
171
+ return;
172
+ }
173
+ }
174
+ if (button.hidden) {
175
+ return;
176
+ }
153
177
  const isVisible = index < visibleRightCount.value || !needCollapseRight.value;
154
178
  if (isVisible) {
155
179
  const iconSpan = button.icon ? h("span", {
@@ -203,8 +227,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
203
227
  handleRightCommand
204
228
  });
205
229
  return (_ctx, _cache) => {
206
- return openBlock(), createElementBlock("div", _hoisted_1, [
207
- createElementVNode("div", _hoisted_2, [
230
+ return openBlock(), createElementBlock("div", mergeProps({ class: "flex items-center justify-between mb-2 py-2 jky-page-table__toolbar" }, _ctx.$attrs), [
231
+ createElementVNode("div", _hoisted_1, [
208
232
  (openBlock(), createBlock(resolveDynamicComponent(renderLeftButtons))),
209
233
  showBatchActions.value ? (openBlock(), createBlock(unref(ElDropdown), {
210
234
  key: 0,
@@ -274,7 +298,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
274
298
  ]),
275
299
  _: 1
276
300
  })) : createCommentVNode("", true),
277
- createElementVNode("div", _hoisted_3, [
301
+ createElementVNode("div", _hoisted_2, [
278
302
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.defaultButtons, (button) => {
279
303
  return openBlock(), createElementBlock(Fragment, {
280
304
  key: button.label + button.icon
@@ -284,12 +308,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
284
308
  title: button.label,
285
309
  class: normalizeClass(["text-2xl inline-flex items-center justify-center cursor-pointer hover:opacity-70 ml-1", [button.icon]]),
286
310
  onClick: withModifiers(($event) => handleToolbarButtonClick(button), ["stop"])
287
- }, null, 10, _hoisted_4)) : createCommentVNode("", true)
311
+ }, null, 10, _hoisted_3)) : createCommentVNode("", true)
288
312
  ], 64);
289
313
  }), 128))
290
314
  ])
291
315
  ], 512)
292
- ]);
316
+ ], 16);
293
317
  };
294
318
  }
295
319
  }));
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./PageTableV2.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const PageTableV2 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6a04e384"]]);
4
+ const PageTableV2 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-26060aeb"]]);
5
5
  export {
6
6
  PageTableV2 as default
7
7
  };
@@ -291,7 +291,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
291
291
  tableData: internalData.value,
292
292
  selectedRows: [],
293
293
  filterData: __spreadValues({}, form.value)
294
- }
294
+ },
295
+ class: "sticky left-0"
295
296
  }, null, 8, ["left-buttons", "batch-buttons", "right-buttons", "default-buttons", "selected-count", "toolbar-button-limit", "payload"]),
296
297
  withDirectives(createVNode(unref(ElTableV2), mergeProps({
297
298
  ref_key: "tableRef",
@@ -1,13 +1,13 @@
1
1
  /* PageTableV2 组件样式 */
2
- .jky-page-table-v2[data-v-6a04e384] {
2
+ .jky-page-table-v2[data-v-26060aeb] {
3
3
  /* 基础样式 */
4
4
  }
5
- .jky-page-table-v2__filter-card[data-v-6a04e384] {
5
+ .jky-page-table-v2__filter-card[data-v-26060aeb] {
6
6
  /* 筛选项卡片样式 */
7
7
  }
8
- .jky-page-table-v2__table-card[data-v-6a04e384] {
8
+ .jky-page-table-v2__table-card[data-v-26060aeb] {
9
9
  /* 表格卡片样式 */
10
10
  }
11
- .jky-page-table-v2-toolbar[data-v-6a04e384] {
11
+ .jky-page-table-v2-toolbar[data-v-26060aeb] {
12
12
  /* 工具栏样式 */
13
13
  }
@@ -1,7 +1,14 @@
1
+ /* AMap 高德地图组件样式 */
2
+ .jky-amap-container {
3
+ /* 地图容器样式 */
4
+ position: relative;
5
+ overflow: hidden;
1
6
 
2
- /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
- .amap-icon img,
4
- .amap-marker-content img {
5
- width: 25px;
6
- height: 34px;
7
+ /* 隐藏高德地图的 logo 和版权信息(注意:商业使用请遵守高德地图条款) */
8
+ .amap-logo {
9
+ display: none !important;
10
+ }
11
+ .amap-copyright {
12
+ display: none !important;
13
+ }
7
14
  }
@@ -1,14 +1,3 @@
1
- /* AMap 高德地图组件样式 */
2
- .jky-amap-container {
3
- /* 地图容器样式 */
4
- position: relative;
5
- overflow: hidden;
6
1
 
7
- /* 隐藏高德地图的 logo 和版权信息(注意:商业使用请遵守高德地图条款) */
8
- .amap-logo {
9
- display: none !important;
10
- }
11
- .amap-copyright {
12
- display: none !important;
13
- }
14
- }
2
+ /* 轨迹回放组件不需要额外样式 */
3
+ /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
@@ -1,3 +1,7 @@
1
1
 
2
- /* 轨迹回放组件不需要额外样式 */
3
- /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
2
+ /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
+ .amap-icon img,
4
+ .amap-marker-content img {
5
+ width: 25px;
6
+ height: 34px;
7
+ }
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "0.0.104";
3
+ const version = "0.0.106";
4
4
  exports.version = version;
@@ -70,12 +70,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
70
70
  sideMenuWithParent: { type: Boolean, default: true }
71
71
  },
72
72
  setup(__props) {
73
+ var _a, _b;
73
74
  const props = __props;
74
75
  const router = vueRouter.useRouter();
75
76
  const route = vueRouter.useRoute();
76
77
  const attrs = vue.useAttrs();
77
78
  const { useTabsStore: useTabsStore$1 } = useTabsStore.createTabsStore({
78
- enableCache: props.cachable
79
+ enableCache: (_b = (_a = props.cachable) != null ? _a : attrs.cachable) != null ? _b : true
79
80
  });
80
81
  const tabsStore = useTabsStore$1();
81
82
  const activeTopMenu = vue.ref("");
@@ -86,11 +87,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
86
87
  });
87
88
  function buildMenuFromRoutes(routes2) {
88
89
  const menuRoutes = routes2.filter((r) => {
89
- var _a;
90
- return (_a = r.meta) == null ? void 0 : _a.title;
90
+ var _a2;
91
+ return (_a2 = r.meta) == null ? void 0 : _a2.title;
91
92
  });
92
93
  const buildMenuItem = (route2, parentPath = "") => {
93
- var _a, _b, _c, _d;
94
+ var _a2, _b2, _c, _d;
94
95
  let fullPath = "";
95
96
  if (route2.path.startsWith(parentPath)) {
96
97
  fullPath = route2.path;
@@ -100,8 +101,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
100
101
  const normalizedPath = fullPath.startsWith("/") ? fullPath : `/${fullPath}`;
101
102
  const item = {
102
103
  index: normalizedPath,
103
- title: ((_a = route2.meta) == null ? void 0 : _a.title) || "",
104
- icon: ((_b = route2.meta) == null ? void 0 : _b.icon) || "",
104
+ title: ((_a2 = route2.meta) == null ? void 0 : _a2.title) || "",
105
+ icon: ((_b2 = route2.meta) == null ? void 0 : _b2.icon) || "",
105
106
  hideMenu: (_d = (_c = route2.meta) == null ? void 0 : _c.hideMenu) != null ? _d : false,
106
107
  route: normalizedPath,
107
108
  path: normalizedPath,
@@ -109,8 +110,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
109
110
  };
110
111
  if (route2.children && route2.children.length > 0) {
111
112
  item.children = route2.children.filter((child) => {
112
- var _a2;
113
- return (_a2 = child.meta) == null ? void 0 : _a2.title;
113
+ var _a3;
114
+ return (_a3 = child.meta) == null ? void 0 : _a3.title;
114
115
  }).map((child) => buildMenuItem(child, normalizedPath));
115
116
  }
116
117
  return item;
@@ -126,19 +127,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
126
127
  const topMenuData = vue.computed(() => {
127
128
  if (props.topMenuSingleLevel) {
128
129
  return lodashEs.cloneDeep(menuData.value).map((item) => {
129
- const _a = item, { children } = _a, rest = __objRest(_a, ["children"]);
130
+ const _a2 = item, { children } = _a2, rest = __objRest(_a2, ["children"]);
130
131
  return rest;
131
132
  });
132
133
  }
133
134
  return menuData.value;
134
135
  });
135
136
  const showSideMenu = vue.computed(() => {
136
- var _a, _b;
137
- return (_b = (_a = props.showSideMenu) != null ? _a : attrs.showSideMenu) != null ? _b : attrs["show-side-menu"];
137
+ var _a2, _b2;
138
+ return (_b2 = (_a2 = props.showSideMenu) != null ? _a2 : attrs.showSideMenu) != null ? _b2 : attrs["show-side-menu"];
138
139
  });
139
140
  const showTopMenu = vue.computed(() => {
140
- var _a, _b;
141
- return (_b = (_a = props.showTopMenu) != null ? _a : attrs.showTopMenu) != null ? _b : attrs["show-top-menu"];
141
+ var _a2, _b2;
142
+ return (_b2 = (_a2 = props.showTopMenu) != null ? _a2 : attrs.showTopMenu) != null ? _b2 : attrs["show-top-menu"];
142
143
  });
143
144
  const displayedSideMenu = vue.computed(() => {
144
145
  if (!showSideMenu.value) {
@@ -179,8 +180,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
179
180
  () => {
180
181
  const routePath = route.path;
181
182
  const matchedMenus = route.matched.filter((r) => {
182
- var _a;
183
- return (_a = r.meta) == null ? void 0 : _a.title;
183
+ var _a2;
184
+ return (_a2 = r.meta) == null ? void 0 : _a2.title;
184
185
  });
185
186
  if (matchedMenus.length === 0) {
186
187
  return;
@@ -200,7 +201,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
200
201
  router.push(index);
201
202
  }
202
203
  return (_ctx, _cache) => {
203
- var _a;
204
+ var _a2;
204
205
  const _component_ElAutoResizer = vue.resolveComponent("ElAutoResizer");
205
206
  return vue.openBlock(), vue.createElementBlock("div", {
206
207
  class: vue.normalizeClass(["jky-page-layout flex h-full w-full flex-col overflow-hidden gap-3", props.className])
@@ -272,11 +273,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
272
273
  style: vue.normalizeStyle({ "--el-card-padding": props.cardPadding })
273
274
  }, {
274
275
  default: vue.withCtx(() => {
275
- var _a2;
276
+ var _a3;
276
277
  return [
277
278
  vue.createVNode(Tabs_vue_vue_type_script_setup_true_lang.default, {
278
279
  store: vue.unref(tabsStore),
279
- round: (_a2 = props.roundTabs) != null ? _a2 : _ctx.$attrs["round-tabs"],
280
+ round: (_a3 = props.roundTabs) != null ? _a3 : _ctx.$attrs["round-tabs"],
280
281
  mode: "route",
281
282
  cachable: props.cachable,
282
283
  closable: true
@@ -290,7 +291,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
290
291
  store: vue.unref(tabsStore),
291
292
  mode: "route",
292
293
  cachable: props.cachable,
293
- round: (_a = props.roundTabs) != null ? _a : _ctx.$attrs["round-tabs"],
294
+ round: (_a2 = props.roundTabs) != null ? _a2 : _ctx.$attrs["round-tabs"],
294
295
  closable: true
295
296
  }, null, 8, ["store", "cachable", "round"])),
296
297
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.mainWithCard ? vue.unref(ElementPlus.ElCard) : "div"), {
@@ -29,5 +29,5 @@ declare const _default: import('vue').DefineComponent<ToolbarProps, {
29
29
  };
30
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
31
31
  toolbarRightRef: HTMLDivElement;
32
- }, HTMLDivElement>;
32
+ }, any>;
33
33
  export default _default;
@@ -23,12 +23,12 @@ const vue = require("vue");
23
23
  const iconsVue = require("@element-plus/icons-vue");
24
24
  const ElementPlus = require("element-plus");
25
25
  const responsiveToolbar = require("../utils/responsive-toolbar.js");
26
- const _hoisted_1 = { class: "flex items-center justify-between mb-2 py-2 jky-page-table__toolbar" };
27
- const _hoisted_2 = { class: "flex items-center" };
28
- const _hoisted_3 = { class: "flex items-center ml-2 text-gray-500" };
29
- const _hoisted_4 = ["title", "onClick"];
26
+ const _hoisted_1 = { class: "flex items-center" };
27
+ const _hoisted_2 = { class: "flex items-center ml-2 text-gray-500" };
28
+ const _hoisted_3 = ["title", "onClick"];
30
29
  const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
31
- name: "JkyPageTableToolbar"
30
+ name: "JkyPageTableToolbar",
31
+ inheritAttrs: false
32
32
  }), {
33
33
  __name: "Toolbar",
34
34
  props: {
@@ -102,6 +102,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
102
102
  const buttons = [];
103
103
  if (props.leftButtons) {
104
104
  props.leftButtons.forEach((button, index) => {
105
+ if (typeof button.hidden === "function") {
106
+ if (button.hidden(button, index)) {
107
+ return;
108
+ }
109
+ }
110
+ if (button.hidden) {
111
+ return;
112
+ }
105
113
  const iconSpan = button.icon ? vue.h("span", {
106
114
  class: `${button.icon} text-[1em] inline-block`
107
115
  }) : null;
@@ -131,6 +139,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
131
139
  const items = [];
132
140
  if (props.batchButtons) {
133
141
  props.batchButtons.forEach((button, index) => {
142
+ if (typeof button.hidden === "function") {
143
+ if (button.hidden(button, index)) {
144
+ return;
145
+ }
146
+ }
147
+ if (button.hidden) {
148
+ return;
149
+ }
134
150
  items.push(
135
151
  vue.h(
136
152
  ElementPlus.ElDropdownItem,
@@ -152,6 +168,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
152
168
  const buttons = [];
153
169
  if (props.rightButtons) {
154
170
  props.rightButtons.forEach((button, index) => {
171
+ if (typeof button.hidden === "function") {
172
+ if (button.hidden(button, index)) {
173
+ return;
174
+ }
175
+ }
176
+ if (button.hidden) {
177
+ return;
178
+ }
155
179
  const isVisible = index < visibleRightCount.value || !needCollapseRight.value;
156
180
  if (isVisible) {
157
181
  const iconSpan = button.icon ? vue.h("span", {
@@ -205,8 +229,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
205
229
  handleRightCommand
206
230
  });
207
231
  return (_ctx, _cache) => {
208
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
209
- vue.createElementVNode("div", _hoisted_2, [
232
+ return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "flex items-center justify-between mb-2 py-2 jky-page-table__toolbar" }, _ctx.$attrs), [
233
+ vue.createElementVNode("div", _hoisted_1, [
210
234
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderLeftButtons))),
211
235
  showBatchActions.value ? (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElDropdown), {
212
236
  key: 0,
@@ -276,7 +300,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
276
300
  ]),
277
301
  _: 1
278
302
  })) : vue.createCommentVNode("", true),
279
- vue.createElementVNode("div", _hoisted_3, [
303
+ vue.createElementVNode("div", _hoisted_2, [
280
304
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.defaultButtons, (button) => {
281
305
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
282
306
  key: button.label + button.icon
@@ -286,12 +310,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
286
310
  title: button.label,
287
311
  class: vue.normalizeClass(["text-2xl inline-flex items-center justify-center cursor-pointer hover:opacity-70 ml-1", [button.icon]]),
288
312
  onClick: vue.withModifiers(($event) => handleToolbarButtonClick(button), ["stop"])
289
- }, null, 10, _hoisted_4)) : vue.createCommentVNode("", true)
313
+ }, null, 10, _hoisted_3)) : vue.createCommentVNode("", true)
290
314
  ], 64);
291
315
  }), 128))
292
316
  ])
293
317
  ], 512)
294
- ]);
318
+ ], 16);
295
319
  };
296
320
  }
297
321
  }));
@@ -3,5 +3,5 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const PageTableV2_vue_vue_type_script_setup_true_lang = require("./PageTableV2.vue2.js");
4
4
  ;/* empty css */
5
5
  const _pluginVue_exportHelper = require("../_virtual/_plugin-vue_export-helper.js");
6
- const PageTableV2 = /* @__PURE__ */ _pluginVue_exportHelper.default(PageTableV2_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-6a04e384"]]);
6
+ const PageTableV2 = /* @__PURE__ */ _pluginVue_exportHelper.default(PageTableV2_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-26060aeb"]]);
7
7
  exports.default = PageTableV2;
@@ -293,7 +293,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
293
293
  tableData: internalData.value,
294
294
  selectedRows: [],
295
295
  filterData: __spreadValues({}, form.value)
296
- }
296
+ },
297
+ class: "sticky left-0"
297
298
  }, null, 8, ["left-buttons", "batch-buttons", "right-buttons", "default-buttons", "selected-count", "toolbar-button-limit", "payload"]),
298
299
  vue.withDirectives(vue.createVNode(vue.unref(ElementPlus.ElTableV2), vue.mergeProps({
299
300
  ref_key: "tableRef",
@@ -1,13 +1,13 @@
1
1
  /* PageTableV2 组件样式 */
2
- .jky-page-table-v2[data-v-6a04e384] {
2
+ .jky-page-table-v2[data-v-26060aeb] {
3
3
  /* 基础样式 */
4
4
  }
5
- .jky-page-table-v2__filter-card[data-v-6a04e384] {
5
+ .jky-page-table-v2__filter-card[data-v-26060aeb] {
6
6
  /* 筛选项卡片样式 */
7
7
  }
8
- .jky-page-table-v2__table-card[data-v-6a04e384] {
8
+ .jky-page-table-v2__table-card[data-v-26060aeb] {
9
9
  /* 表格卡片样式 */
10
10
  }
11
- .jky-page-table-v2-toolbar[data-v-6a04e384] {
11
+ .jky-page-table-v2-toolbar[data-v-26060aeb] {
12
12
  /* 工具栏样式 */
13
13
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jky-component-lib",
3
3
  "type": "module",
4
- "version": "0.0.104",
4
+ "version": "0.0.106",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },