jky-component-lib 0.0.100 → 0.0.104

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.
@@ -0,0 +1,10 @@
1
+ const _export_sfc = (sfc, props) => {
2
+ const target = sfc.__vccOpts || sfc;
3
+ for (const [key, val] of props) {
4
+ target[key] = val;
5
+ }
6
+ return target;
7
+ };
8
+ export {
9
+ _export_sfc as default
10
+ };
@@ -10,6 +10,7 @@ export * from './modal';
10
10
  export * from './page-header';
11
11
  export * from './page-layout';
12
12
  export * from './page-table';
13
+ export * from './page-table-v2';
13
14
  export * from './rich-editor';
14
15
  export * from './say-hello';
15
16
  export * from './tabs';
@@ -11,6 +11,7 @@ import { JkyPageHeader } from "./page-header/index.js";
11
11
  import { JkyPageLayout } from "./page-layout/index.js";
12
12
  import { JkyPageTable } from "./page-table/index.js";
13
13
  import { JkyActionColumn, JkyPageTableColumn } from "./page-table/index.js";
14
+ import { JkyPageTableV2 } from "./page-table-v2/index.js";
14
15
  import { JkyRichEditor } from "./rich-editor/index.js";
15
16
  import { JkySayHello } from "./say-hello/index.js";
16
17
  import { JkyTabs } from "./tabs/index.js";
@@ -25,6 +26,7 @@ const components = [
25
26
  JkyAddInput,
26
27
  JkyRichEditor,
27
28
  JkyPageTable,
29
+ JkyPageTableV2,
28
30
  JkyPageLayout,
29
31
  JkyTabs,
30
32
  JkyModal,
@@ -46,6 +48,7 @@ export {
46
48
  JkyPageLayout,
47
49
  JkyPageTable,
48
50
  JkyPageTableColumn,
51
+ JkyPageTableV2,
49
52
  JkyRichEditor,
50
53
  JkySayHello,
51
54
  JkyTabs,
package/dist/es/index.js CHANGED
@@ -17,6 +17,7 @@ import { JkyMenu } from "./menu/index.js";
17
17
  import { JkyModal } from "./modal/index.js";
18
18
  import { JkyPageHeader } from "./page-header/index.js";
19
19
  import { JkyPageLayout } from "./page-layout/index.js";
20
+ import { JkyPageTableV2 } from "./page-table-v2/index.js";
20
21
  import { JkyRichEditor } from "./rich-editor/index.js";
21
22
  import { JkySayHello } from "./say-hello/index.js";
22
23
  import { JkyTabs } from "./tabs/index.js";
@@ -44,6 +45,7 @@ export {
44
45
  JkyPageLayout,
45
46
  JkyPageTable,
46
47
  JkyPageTableColumn,
48
+ JkyPageTableV2,
47
49
  JkyRichEditor,
48
50
  JkySayHello,
49
51
  JkyTabs,
@@ -1,4 +1,4 @@
1
- const version = "0.0.100";
1
+ const version = "0.0.104";
2
2
  export {
3
3
  version
4
4
  };
@@ -130,7 +130,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
130
130
  }
131
131
  return menuData.value;
132
132
  });
133
+ const showSideMenu = computed(() => {
134
+ var _a, _b;
135
+ return (_b = (_a = props.showSideMenu) != null ? _a : attrs.showSideMenu) != null ? _b : attrs["show-side-menu"];
136
+ });
137
+ const showTopMenu = computed(() => {
138
+ var _a, _b;
139
+ return (_b = (_a = props.showTopMenu) != null ? _a : attrs.showTopMenu) != null ? _b : attrs["show-top-menu"];
140
+ });
133
141
  const displayedSideMenu = computed(() => {
142
+ if (!showSideMenu.value) {
143
+ return [];
144
+ }
145
+ if (!showTopMenu.value) {
146
+ return menuData.value;
147
+ }
134
148
  if (menuData.value.length === 0) {
135
149
  return [];
136
150
  }
@@ -153,7 +167,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
153
167
  return [];
154
168
  });
155
169
  const computedAsideWidth = computed(() => {
156
- if (props.showSideMenu && displayedSideMenu.value.length > 0) {
170
+ if (showSideMenu.value && displayedSideMenu.value.length > 0) {
157
171
  return props.asideWidth;
158
172
  }
159
173
  return "0";
@@ -189,7 +203,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
189
203
  return openBlock(), createElementBlock("div", {
190
204
  class: normalizeClass(["jky-page-layout flex h-full w-full flex-col overflow-hidden gap-3", props.className])
191
205
  }, [
192
- props.showTopMenu && menuData.value.length > 0 ? (openBlock(), createBlock(unref(ElCard), {
206
+ showTopMenu.value && menuData.value.length > 0 ? (openBlock(), createBlock(unref(ElCard), {
193
207
  key: 0,
194
208
  class: "jky-page-layout__top-menu shrink-0 overflow-hidden p-0",
195
209
  style: { "--el-card-padding": 0 }
@@ -216,7 +230,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
216
230
  style: normalizeStyle({ "--el-aside-width": computedAsideWidth.value })
217
231
  }, {
218
232
  default: withCtx(() => [
219
- props.showSideMenu && displayedSideMenu.value.length > 0 ? (openBlock(), createBlock(unref(ElCard), {
233
+ showSideMenu.value && displayedSideMenu.value.length > 0 ? (openBlock(), createBlock(unref(ElCard), {
220
234
  key: 0,
221
235
  class: "h-full",
222
236
  style: normalizeStyle({ "--el-card-padding": props.cardPadding })
@@ -102,7 +102,7 @@ declare function __VLS_template(): {
102
102
  };
103
103
  $forceUpdate: () => void;
104
104
  $nextTick: typeof nextTick;
105
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
105
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
106
106
  } & Readonly<{
107
107
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
108
108
  labelWidth: string | number;
@@ -201,7 +201,7 @@ declare function __VLS_template(): {
201
201
  };
202
202
  $forceUpdate: () => void;
203
203
  $nextTick: typeof nextTick;
204
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
204
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
205
205
  } & Readonly<{
206
206
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
207
207
  labelWidth: string | number;
@@ -328,7 +328,7 @@ declare function __VLS_template(): {
328
328
  };
329
329
  $forceUpdate: () => void;
330
330
  $nextTick: typeof nextTick;
331
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
331
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
332
332
  } & Readonly<{
333
333
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
334
334
  labelWidth: string | number;
@@ -448,7 +448,7 @@ declare function __VLS_template(): {
448
448
  };
449
449
  $forceUpdate: () => void;
450
450
  $nextTick: typeof nextTick;
451
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
451
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
452
452
  } & Readonly<{
453
453
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
454
454
  labelWidth: string | number;
@@ -547,7 +547,7 @@ declare function __VLS_template(): {
547
547
  };
548
548
  $forceUpdate: () => void;
549
549
  $nextTick: typeof nextTick;
550
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
550
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
551
551
  } & Readonly<{
552
552
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
553
553
  labelWidth: string | number;
@@ -2866,7 +2866,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
2866
2866
  };
2867
2867
  $forceUpdate: () => void;
2868
2868
  $nextTick: typeof nextTick;
2869
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
2869
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
2870
2870
  } & Readonly<{
2871
2871
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
2872
2872
  labelWidth: string | number;
@@ -2965,7 +2965,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
2965
2965
  };
2966
2966
  $forceUpdate: () => void;
2967
2967
  $nextTick: typeof nextTick;
2968
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
2968
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
2969
2969
  } & Readonly<{
2970
2970
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
2971
2971
  labelWidth: string | number;
@@ -3092,7 +3092,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
3092
3092
  };
3093
3093
  $forceUpdate: () => void;
3094
3094
  $nextTick: typeof nextTick;
3095
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
3095
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
3096
3096
  } & Readonly<{
3097
3097
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
3098
3098
  labelWidth: string | number;
@@ -3212,7 +3212,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
3212
3212
  };
3213
3213
  $forceUpdate: () => void;
3214
3214
  $nextTick: typeof nextTick;
3215
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
3215
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
3216
3216
  } & Readonly<{
3217
3217
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
3218
3218
  labelWidth: string | number;
@@ -3311,7 +3311,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
3311
3311
  };
3312
3312
  $forceUpdate: () => void;
3313
3313
  $nextTick: typeof nextTick;
3314
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
3314
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (... /** @type { [typeof __VLS_components.JkyForm, ] } */args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
3315
3315
  } & Readonly<{
3316
3316
  scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
3317
3317
  labelWidth: string | number;
@@ -370,11 +370,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
370
370
  return openBlock(), createElementBlock("div", {
371
371
  ref_key: "pageTableRef",
372
372
  ref: pageTableRef,
373
- class: normalizeClass(["bg-transparent jky-page-table", [props.class]])
373
+ class: normalizeClass(["bg-transparent flex flex-col jky-page-table", [props.class]])
374
374
  }, [
375
375
  __props.filterItems && __props.filterItems.length > 0 ? (openBlock(), createBlock(unref(ElCard), {
376
376
  key: 0,
377
- class: "mb-3 jky-page-table__filter-card"
377
+ class: "mb-3 flex-none jky-page-table__filter-card"
378
378
  }, {
379
379
  default: withCtx(() => [
380
380
  createVNode(unref(JkyForm), mergeProps({
@@ -394,7 +394,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
394
394
  ]),
395
395
  _: 1
396
396
  })) : createCommentVNode("", true),
397
- (openBlock(), createBlock(resolveDynamicComponent(props.withCard ? unref(ElCard) : "div"), { class: "jky-page-table__table-card min-h-0" }, {
397
+ (openBlock(), createBlock(resolveDynamicComponent(props.withCard ? unref(ElCard) : "div"), { class: "flex-1 min-h-0 jky-page-table__table-card" }, {
398
398
  default: withCtx(() => {
399
399
  var _a2, _b2, _c2, _d, _e, _f, _g;
400
400
  return [
@@ -477,7 +477,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
477
477
  })),
478
478
  showPagination.value ? (openBlock(), createBlock(resolveDynamicComponent(((_a = pagination.value) == null ? void 0 : _a.withCard) ? unref(ElCard) : "div"), {
479
479
  key: 1,
480
- class: normalizeClass(["flex flex-end bg-white justify-center mt-4 p-2 z-30 sticky bottom-0 jky-page-table__pagination", [((_b = pagination.value) == null ? void 0 : _b.class) || ""]]),
480
+ class: normalizeClass(["flex flex-none flex-end bg-white justify-center mt-4 p-2 z-30 sticky bottom-0 jky-page-table__pagination", [((_b = pagination.value) == null ? void 0 : _b.class) || ""]]),
481
481
  style: normalizeStyle({
482
482
  "--jky-page-table_pagination-position": ((_c = pagination.value) == null ? void 0 : _c.position) || "flex-end"
483
483
  })