@keyblade/pro-components 0.0.1-alpha.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.
- package/es/components.d.ts +6 -0
- package/es/index.d.ts +8 -0
- package/es/index.js +11 -0
- package/es/pro-breadcrumb/index.d.ts +90 -0
- package/es/pro-breadcrumb/index.js +10 -0
- package/es/pro-breadcrumb/pro-breadcrumb.vue.d.ts +21 -0
- package/es/pro-breadcrumb/pro-breadcrumb.vue.js +44 -0
- package/es/pro-breadcrumb/pro-breadcrumb.vue2.js +5 -0
- package/package.json +31 -0
- package/src/index.ts +14 -0
package/es/index.d.ts
ADDED
package/es/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProBreadcrumb } from "./pro-breadcrumb/index.js";
|
|
2
|
+
import { ProBreadcrumb as ProBreadcrumb2 } from "./pro-breadcrumb/index.js";
|
|
3
|
+
const index = {
|
|
4
|
+
install(app) {
|
|
5
|
+
app.use(ProBreadcrumb);
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
ProBreadcrumb2 as ProBreadcrumb,
|
|
10
|
+
index as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { ComponentInternalInstance, ExtractPropTypes, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
|
|
2
|
+
declare const ProBreadcrumb: {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
$: ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: Partial<{
|
|
7
|
+
items: unknown[];
|
|
8
|
+
}> & Omit<Readonly<ExtractPropTypes<{
|
|
9
|
+
items: {
|
|
10
|
+
type: ArrayConstructor;
|
|
11
|
+
required: false;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
}>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "items">;
|
|
15
|
+
$attrs: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
};
|
|
18
|
+
$refs: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
$slots: Readonly<{
|
|
22
|
+
[name: string]: Slot | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
25
|
+
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
26
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
27
|
+
$el: any;
|
|
28
|
+
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
29
|
+
items: {
|
|
30
|
+
type: ArrayConstructor;
|
|
31
|
+
required: false;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
}>>, {
|
|
35
|
+
prefixClsName: string;
|
|
36
|
+
props: any;
|
|
37
|
+
injectValue: never[];
|
|
38
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
39
|
+
items: unknown[];
|
|
40
|
+
}, {}, string> & {
|
|
41
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
42
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
43
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
44
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
45
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
46
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
47
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
48
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
49
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
50
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
51
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
52
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
53
|
+
renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
54
|
+
renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
55
|
+
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;
|
|
56
|
+
};
|
|
57
|
+
$forceUpdate: () => void;
|
|
58
|
+
$nextTick: typeof nextTick;
|
|
59
|
+
$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;
|
|
60
|
+
} & Readonly<ExtractPropTypes<{
|
|
61
|
+
items: {
|
|
62
|
+
type: ArrayConstructor;
|
|
63
|
+
required: false;
|
|
64
|
+
default: () => never[];
|
|
65
|
+
};
|
|
66
|
+
}>> & ShallowUnwrapRef<{
|
|
67
|
+
prefixClsName: string;
|
|
68
|
+
props: any;
|
|
69
|
+
injectValue: never[];
|
|
70
|
+
}> & {} & ComponentCustomProperties & {};
|
|
71
|
+
__isFragment?: undefined;
|
|
72
|
+
__isTeleport?: undefined;
|
|
73
|
+
__isSuspense?: undefined;
|
|
74
|
+
} & ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
75
|
+
items: {
|
|
76
|
+
type: ArrayConstructor;
|
|
77
|
+
required: false;
|
|
78
|
+
default: () => never[];
|
|
79
|
+
};
|
|
80
|
+
}>>, {
|
|
81
|
+
prefixClsName: string;
|
|
82
|
+
props: any;
|
|
83
|
+
injectValue: never[];
|
|
84
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
85
|
+
items: unknown[];
|
|
86
|
+
}, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
|
|
87
|
+
install: (app: App) => void;
|
|
88
|
+
};
|
|
89
|
+
export { ProBreadcrumb };
|
|
90
|
+
export default ProBreadcrumb;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
declare const _sfc_main: DefineComponent<{
|
|
3
|
+
items: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
required: false;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
prefixClsName: string;
|
|
10
|
+
props: any;
|
|
11
|
+
injectValue: never[];
|
|
12
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
13
|
+
items: {
|
|
14
|
+
type: ArrayConstructor;
|
|
15
|
+
required: false;
|
|
16
|
+
default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
}>>, {
|
|
19
|
+
items: unknown[];
|
|
20
|
+
}>;
|
|
21
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineComponent, inject, resolveComponent, unref, openBlock, createBlock, normalizeClass, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
|
+
__name: "pro-breadcrumb",
|
|
4
|
+
props: {
|
|
5
|
+
items: { default: () => [] }
|
|
6
|
+
},
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const props = __props;
|
|
9
|
+
const prefixClsName = "keyblade-pro-breadcrumb";
|
|
10
|
+
const injectValue = inject("ProBreadcrumbItems", []);
|
|
11
|
+
return (_ctx, _cache) => {
|
|
12
|
+
const _component_icon_apps = resolveComponent("icon-apps");
|
|
13
|
+
const _component_a_breadcrumb_item = resolveComponent("a-breadcrumb-item");
|
|
14
|
+
const _component_a_breadcrumb = resolveComponent("a-breadcrumb");
|
|
15
|
+
return (props.items.length > 0 ? props.items : unref(injectValue)).length > 0 ? (openBlock(), createBlock(_component_a_breadcrumb, {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: normalizeClass(prefixClsName)
|
|
18
|
+
}, {
|
|
19
|
+
default: withCtx(() => [
|
|
20
|
+
createVNode(_component_a_breadcrumb_item, null, {
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
createVNode(_component_icon_apps)
|
|
23
|
+
]),
|
|
24
|
+
_: 1
|
|
25
|
+
}),
|
|
26
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.items.length > 0 ? props.items : unref(injectValue), (item, index) => {
|
|
27
|
+
return openBlock(), createBlock(_component_a_breadcrumb_item, {
|
|
28
|
+
key: `${item}-${index}`
|
|
29
|
+
}, {
|
|
30
|
+
default: withCtx(() => [
|
|
31
|
+
createTextVNode(toDisplayString(item), 1)
|
|
32
|
+
]),
|
|
33
|
+
_: 2
|
|
34
|
+
}, 1024);
|
|
35
|
+
}), 128))
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
})) : createCommentVNode("", true);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export {
|
|
43
|
+
_sfc_main as default
|
|
44
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@keyblade/pro-components",
|
|
3
|
+
"description": "KeyBlade Pro Components",
|
|
4
|
+
"author": "yangshuai <704807396@qq.com>",
|
|
5
|
+
"version": "0.0.1-alpha.1",
|
|
6
|
+
"private": false,
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "es/index.js",
|
|
9
|
+
"module": "es/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"es",
|
|
12
|
+
"package.json",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": [
|
|
19
|
+
"*.css"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@arco-design/web-vue": "^2.40.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"vue": "^3.2.45"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "vue-tsc --noEmit && vite build"
|
|
29
|
+
},
|
|
30
|
+
"typings": "es/index.d.ts"
|
|
31
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import { default as ProBreadcrumb } from './pro-breadcrumb'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
install(app: App): void {
|
|
6
|
+
app.use(ProBreadcrumb)
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 按组件导出
|
|
11
|
+
export { ProBreadcrumb }
|
|
12
|
+
|
|
13
|
+
// components.d.ts
|
|
14
|
+
export type {} from './components'
|