@keyblade/pro-components 0.0.1-alpha.3 → 0.0.1-alpha.5

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.
@@ -2,6 +2,7 @@ declare module 'vue' {
2
2
  interface GlobalComponents {
3
3
  KbProBreadcrumb: typeof import('./index')['ProBreadcrumb'];
4
4
  KbProMenu: typeof import('./index')['ProMenu'];
5
+ KbProPageWrapper: typeof import('./index')['ProPageWrapper'];
5
6
  KbProReuseTabs: typeof import('./index')['ProReuseTabs'];
6
7
  }
7
8
  }
package/es/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export default _default;
6
6
  export { default as ProBreadcrumb } from './pro-breadcrumb';
7
7
  export { default as ProMenu } from './pro-menu';
8
8
  export type { IProMenuItem } from './pro-menu';
9
+ export { default as ProPageWrapper } from './pro-page-wrapper';
9
10
  export { default as ProReuseTabs } from './pro-reuse-tabs';
10
11
  export type { IProTab } from './pro-reuse-tabs';
11
12
  export type {} from './components';
package/es/index.js CHANGED
@@ -2,18 +2,22 @@ import { ProBreadcrumb } from "./pro-breadcrumb/index.js";
2
2
  import { ProBreadcrumb as ProBreadcrumb2 } from "./pro-breadcrumb/index.js";
3
3
  import { ProMenu } from "./pro-menu/index.js";
4
4
  import { ProMenu as ProMenu2 } from "./pro-menu/index.js";
5
+ import { ProPageWrapper } from "./pro-page-wrapper/index.js";
6
+ import { ProPageWrapper as ProPageWrapper2 } from "./pro-page-wrapper/index.js";
5
7
  import { ProReuseTabs } from "./pro-reuse-tabs/index.js";
6
8
  import { ProReuseTabs as ProReuseTabs2 } from "./pro-reuse-tabs/index.js";
7
9
  const index = {
8
10
  install(app) {
9
11
  app.use(ProBreadcrumb);
10
12
  app.use(ProMenu);
13
+ app.use(ProPageWrapper);
11
14
  app.use(ProReuseTabs);
12
15
  }
13
16
  };
14
17
  export {
15
18
  ProBreadcrumb2 as ProBreadcrumb,
16
19
  ProMenu2 as ProMenu,
20
+ ProPageWrapper2 as ProPageWrapper,
17
21
  ProReuseTabs2 as ProReuseTabs,
18
22
  index as default
19
23
  };
@@ -0,0 +1,110 @@
1
+ import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
2
+ declare const ProPageWrapper: {
3
+ new (...args: any[]): {
4
+ $: ComponentInternalInstance;
5
+ $data: {};
6
+ $props: Partial<{
7
+ hidePageWrapper: boolean;
8
+ breadcrumbItems: string[];
9
+ }> & Omit<Readonly<ExtractPropTypes<{
10
+ hidePageWrapper: {
11
+ type: PropType<boolean>;
12
+ required: false;
13
+ default: boolean;
14
+ };
15
+ breadcrumbItems: {
16
+ type: PropType<string[]>;
17
+ required: false;
18
+ default: () => never[];
19
+ };
20
+ }>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "hidePageWrapper" | "breadcrumbItems">;
21
+ $attrs: {
22
+ [x: string]: unknown;
23
+ };
24
+ $refs: {
25
+ [x: string]: unknown;
26
+ };
27
+ $slots: Readonly<{
28
+ [name: string]: Slot | undefined;
29
+ }>;
30
+ $root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
31
+ $parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
32
+ $emit: (event: string, ...args: any[]) => void;
33
+ $el: any;
34
+ $options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
35
+ hidePageWrapper: {
36
+ type: PropType<boolean>;
37
+ required: false;
38
+ default: boolean;
39
+ };
40
+ breadcrumbItems: {
41
+ type: PropType<string[]>;
42
+ required: false;
43
+ default: () => never[];
44
+ };
45
+ }>>, {
46
+ prefixClsName: string;
47
+ prefixClsHideName: string;
48
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
49
+ hidePageWrapper: boolean;
50
+ breadcrumbItems: string[];
51
+ }, {}, string> & {
52
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
53
+ created?: ((() => void) | (() => void)[]) | undefined;
54
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
55
+ mounted?: ((() => void) | (() => void)[]) | undefined;
56
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
57
+ updated?: ((() => void) | (() => void)[]) | undefined;
58
+ activated?: ((() => void) | (() => void)[]) | undefined;
59
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
60
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
61
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
62
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
63
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
64
+ renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
65
+ renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
66
+ errorCaptured?: (((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
67
+ };
68
+ $forceUpdate: () => void;
69
+ $nextTick: typeof nextTick;
70
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
71
+ } & Readonly<ExtractPropTypes<{
72
+ hidePageWrapper: {
73
+ type: PropType<boolean>;
74
+ required: false;
75
+ default: boolean;
76
+ };
77
+ breadcrumbItems: {
78
+ type: PropType<string[]>;
79
+ required: false;
80
+ default: () => never[];
81
+ };
82
+ }>> & ShallowUnwrapRef<{
83
+ prefixClsName: string;
84
+ prefixClsHideName: string;
85
+ }> & {} & ComponentCustomProperties & {};
86
+ __isFragment?: undefined;
87
+ __isTeleport?: undefined;
88
+ __isSuspense?: undefined;
89
+ } & ComponentOptionsBase<Readonly<ExtractPropTypes<{
90
+ hidePageWrapper: {
91
+ type: PropType<boolean>;
92
+ required: false;
93
+ default: boolean;
94
+ };
95
+ breadcrumbItems: {
96
+ type: PropType<string[]>;
97
+ required: false;
98
+ default: () => never[];
99
+ };
100
+ }>>, {
101
+ prefixClsName: string;
102
+ prefixClsHideName: string;
103
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
104
+ hidePageWrapper: boolean;
105
+ breadcrumbItems: string[];
106
+ }, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
107
+ install: (app: App) => void;
108
+ };
109
+ export { ProPageWrapper };
110
+ export default ProPageWrapper;
@@ -0,0 +1,13 @@
1
+ import _sfc_main from "./pro-page-wrapper.vue.js";
2
+ import "./pro-page-wrapper.vue2.js";
3
+ import { ProBreadcrumb } from "../pro-breadcrumb/index.js";
4
+ const ProPageWrapper = Object.assign(_sfc_main, {
5
+ install: (app) => {
6
+ app.use(ProBreadcrumb);
7
+ app.component("KbProPageWrapper", _sfc_main);
8
+ }
9
+ });
10
+ export {
11
+ ProPageWrapper,
12
+ ProPageWrapper as default
13
+ };
@@ -0,0 +1,35 @@
1
+ import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PropType } from 'vue';
2
+ declare const _sfc_main: DefineComponent<{
3
+ /** 是否隐藏面包屑 */
4
+ hidePageWrapper: {
5
+ type: PropType<boolean>;
6
+ required: false;
7
+ default: boolean;
8
+ };
9
+ /** 面包屑 */
10
+ breadcrumbItems: {
11
+ type: PropType<string[]>;
12
+ required: false;
13
+ default: () => never[];
14
+ };
15
+ }, {
16
+ prefixClsName: string;
17
+ prefixClsHideName: string;
18
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
19
+ /** 是否隐藏面包屑 */
20
+ hidePageWrapper: {
21
+ type: PropType<boolean>;
22
+ required: false;
23
+ default: boolean;
24
+ };
25
+ /** 面包屑 */
26
+ breadcrumbItems: {
27
+ type: PropType<string[]>;
28
+ required: false;
29
+ default: () => never[];
30
+ };
31
+ }>>, {
32
+ hidePageWrapper: boolean;
33
+ breadcrumbItems: string[];
34
+ }>;
35
+ export default _sfc_main;
@@ -0,0 +1,36 @@
1
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot } from "vue";
2
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3
+ __name: "pro-page-wrapper",
4
+ props: {
5
+ hidePageWrapper: {
6
+ type: Boolean,
7
+ required: false,
8
+ default: false
9
+ },
10
+ breadcrumbItems: {
11
+ type: Array,
12
+ required: false,
13
+ default: () => []
14
+ }
15
+ },
16
+ setup(__props) {
17
+ const prefixClsName = "keyblade-pro-page-wrapper";
18
+ const prefixClsHideName = "keyblade-pro-page-wrapper-hide";
19
+ return (_ctx, _cache) => {
20
+ const _component_kb_pro_breadcrumb = resolveComponent("kb-pro-breadcrumb");
21
+ return openBlock(), createElementBlock("div", {
22
+ class: normalizeClass(__props.hidePageWrapper ? prefixClsHideName : prefixClsName)
23
+ }, [
24
+ !__props.hidePageWrapper ? (openBlock(), createBlock(_component_kb_pro_breadcrumb, {
25
+ key: 0,
26
+ style: { "margin": "16px 0" },
27
+ items: __props.breadcrumbItems
28
+ }, null, 8, ["items"])) : createCommentVNode("", true),
29
+ renderSlot(_ctx.$slots, "default")
30
+ ], 2);
31
+ };
32
+ }
33
+ });
34
+ export {
35
+ _sfc_main as default
36
+ };
@@ -0,0 +1,4 @@
1
+ const proPageWrapper_vue_vue_type_style_index_0_lang = "";
2
+ export {
3
+ proPageWrapper_vue_vue_type_style_index_0_lang as default
4
+ };
@@ -0,0 +1,6 @@
1
+ import _sfc_main from "./pro-page-wrapper.vue.js";
2
+ import { default as default2 } from "./pro-page-wrapper.vue.js";
3
+ import "./pro-page-wrapper.vue2.js";
4
+ export {
5
+ default2 as default
6
+ };
@@ -1,9 +1,10 @@
1
- import _ProReuseTabs from "./pro-reuse-tabs.vue.js";
1
+ import _sfc_main from "./pro-reuse-tabs.vue.js";
2
+ import "./pro-reuse-tabs.vue2.js";
2
3
  import { Tabs } from "@arco-design/web-vue";
3
- const ProReuseTabs = Object.assign(_ProReuseTabs, {
4
+ const ProReuseTabs = Object.assign(_sfc_main, {
4
5
  install: (app) => {
5
6
  app.use(Tabs);
6
- app.component("KbProReuseTabs", _ProReuseTabs);
7
+ app.component("KbProReuseTabs", _sfc_main);
7
8
  }
8
9
  });
9
10
  export {
@@ -1,7 +1,57 @@
1
- import _sfc_main from "./pro-reuse-tabs.vue2.js";
2
- import "./pro-reuse-tabs.vue3.js";
3
- import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const _ProReuseTabs = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-65af5f68"]]);
1
+ import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
2
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3
+ __name: "pro-reuse-tabs",
4
+ props: {
5
+ tabs: {
6
+ type: Array,
7
+ required: true,
8
+ default: () => []
9
+ }
10
+ },
11
+ emits: ["tab-click", "tab-delete"],
12
+ setup(__props, { emit }) {
13
+ const props = __props;
14
+ const prefixClsName = "keyblade-pro-reuse-tabs";
15
+ const activeKey = computed(() => {
16
+ var _a;
17
+ return ((_a = props.tabs.find((v) => v.active)) == null ? void 0 : _a.name) ?? void 0;
18
+ });
19
+ const onTabClick = (key) => {
20
+ emit("tab-click", String(key));
21
+ };
22
+ const onTabDelete = (key) => {
23
+ emit("tab-delete", String(key));
24
+ };
25
+ return (_ctx, _cache) => {
26
+ const _component_a_tab_pane = resolveComponent("a-tab-pane");
27
+ const _component_a_tabs = resolveComponent("a-tabs");
28
+ return openBlock(), createElementBlock("div", {
29
+ class: normalizeClass(prefixClsName)
30
+ }, [
31
+ createVNode(_component_a_tabs, {
32
+ "active-key": unref(activeKey),
33
+ size: "mini",
34
+ type: "rounded",
35
+ editable: __props.tabs.length > 1,
36
+ "hide-content": "",
37
+ "destroy-on-hide": "",
38
+ onTabClick,
39
+ onDelete: onTabDelete
40
+ }, {
41
+ default: withCtx(() => [
42
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab) => {
43
+ return openBlock(), createBlock(_component_a_tab_pane, {
44
+ key: tab.name,
45
+ title: tab.title
46
+ }, null, 8, ["title"]);
47
+ }), 128))
48
+ ]),
49
+ _: 1
50
+ }, 8, ["active-key", "editable"])
51
+ ]);
52
+ };
53
+ }
54
+ });
5
55
  export {
6
- _ProReuseTabs as default
56
+ _sfc_main as default
7
57
  };
@@ -1,57 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
2
- const _sfc_main = /* @__PURE__ */ defineComponent({
3
- __name: "pro-reuse-tabs",
4
- props: {
5
- tabs: {
6
- type: Array,
7
- required: true,
8
- default: () => []
9
- }
10
- },
11
- emits: ["tab-click", "tab-delete"],
12
- setup(__props, { emit }) {
13
- const props = __props;
14
- const prefixClsName = "keyblade-pro-reuse-tabs";
15
- const activeKey = computed(() => {
16
- var _a;
17
- return ((_a = props.tabs.find((v) => v.active)) == null ? void 0 : _a.name) ?? void 0;
18
- });
19
- const onTabClick = (key) => {
20
- emit("tab-click", String(key));
21
- };
22
- const onTabDelete = (key) => {
23
- emit("tab-delete", String(key));
24
- };
25
- return (_ctx, _cache) => {
26
- const _component_a_tab_pane = resolveComponent("a-tab-pane");
27
- const _component_a_tabs = resolveComponent("a-tabs");
28
- return openBlock(), createElementBlock("div", {
29
- class: normalizeClass(prefixClsName)
30
- }, [
31
- createVNode(_component_a_tabs, {
32
- "active-key": unref(activeKey),
33
- size: "mini",
34
- type: "rounded",
35
- editable: __props.tabs.length > 1,
36
- "hide-content": "",
37
- "destroy-on-hide": "",
38
- onTabClick,
39
- onDelete: onTabDelete
40
- }, {
41
- default: withCtx(() => [
42
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab) => {
43
- return openBlock(), createBlock(_component_a_tab_pane, {
44
- key: tab.name,
45
- title: tab.title
46
- }, null, 8, ["title"]);
47
- }), 128))
48
- ]),
49
- _: 1
50
- }, 8, ["active-key", "editable"])
51
- ]);
52
- };
53
- }
54
- });
1
+ const proReuseTabs_vue_vue_type_style_index_0_lang = "";
55
2
  export {
56
- _sfc_main as default
3
+ proReuseTabs_vue_vue_type_style_index_0_lang as default
57
4
  };
@@ -1,4 +1,6 @@
1
- const proReuseTabs_vue_vue_type_style_index_0_scoped_65af5f68_lang = "";
1
+ import _sfc_main from "./pro-reuse-tabs.vue.js";
2
+ import { default as default2 } from "./pro-reuse-tabs.vue.js";
3
+ import "./pro-reuse-tabs.vue2.js";
2
4
  export {
3
- proReuseTabs_vue_vue_type_style_index_0_scoped_65af5f68_lang as default
5
+ default2 as default
4
6
  };
package/es/style.css CHANGED
@@ -1,4 +1,7 @@
1
- .keyblade-pro-reuse-tabs[data-v-65af5f68] {
1
+ .keyblade-pro-page-wrapper {
2
+ padding: 0 20px 20px 20px;
3
+ }
4
+ .keyblade-pro-reuse-tabs {
2
5
  position: relative;
3
6
  background-color: var(--color-bg-2);
4
7
  padding: 4px 20px;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "0.0.1-alpha.3",
5
+ "version": "0.0.1-alpha.5",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",
package/src/index.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { App } from 'vue'
2
2
  import { ProBreadcrumb } from './pro-breadcrumb'
3
3
  import { ProMenu } from './pro-menu'
4
+ import { ProPageWrapper } from './pro-page-wrapper'
4
5
  import { ProReuseTabs } from './pro-reuse-tabs'
5
6
 
6
7
  export default {
7
8
  install(app: App): void {
8
9
  app.use(ProBreadcrumb)
9
10
  app.use(ProMenu)
11
+ app.use(ProPageWrapper)
10
12
  app.use(ProReuseTabs)
11
13
  }
12
14
  }
@@ -17,6 +19,8 @@ export { default as ProBreadcrumb } from './pro-breadcrumb'
17
19
  export { default as ProMenu } from './pro-menu'
18
20
  export type { IProMenuItem } from './pro-menu'
19
21
 
22
+ export { default as ProPageWrapper } from './pro-page-wrapper'
23
+
20
24
  export { default as ProReuseTabs } from './pro-reuse-tabs'
21
25
  export type { IProTab } from './pro-reuse-tabs'
22
26
 
@@ -1,10 +0,0 @@
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
- };