@tplc/business 0.0.6 → 0.0.8

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.
Files changed (42) hide show
  1. package/components/lcb-banner/lcb-banner.vue +57 -0
  2. package/components/lcb-banner/types.ts +50 -0
  3. package/components/lcb-banner-block/lcb-banner-block.vue +70 -0
  4. package/components/lcb-banner-block/types.ts +13 -0
  5. package/components/lcb-block/lcb-block.vue +38 -0
  6. package/components/lcb-block/types.ts +17 -0
  7. package/components/lcb-grid/lcb-grid.vue +38 -0
  8. package/components/lcb-grid/types.ts +8 -0
  9. package/components/lcb-home-search/lcb-home-search.vue +85 -0
  10. package/components/lcb-img-nav/lcb-img-nav.vue +5 -37
  11. package/components/lcb-img-nav/types.ts +32 -0
  12. package/components/lcb-nav/lcb-nav-search.vue +59 -0
  13. package/components/lcb-nav/lcb-nav-title.vue +48 -0
  14. package/components/lcb-nav/lcb-nav.vue +183 -164
  15. package/components/lcb-nav/types.ts +45 -0
  16. package/components/lcb-swiper/lcb-swiper.vue +95 -0
  17. package/components/lcb-title/lcb-title.vue +37 -0
  18. package/components/lcb-title/types.ts +5 -0
  19. package/global.d.ts +12 -0
  20. package/package.json +4 -4
  21. package/tsconfig.dts.json +9 -0
  22. package/types/components/lcb-banner/lcb-banner.vue.d.ts +63 -0
  23. package/types/components/lcb-banner/types.d.ts +47 -0
  24. package/types/components/lcb-banner-block/lcb-banner-block.vue.d.ts +58 -0
  25. package/types/components/lcb-banner-block/types.d.ts +13 -0
  26. package/types/components/lcb-block/lcb-block.vue.d.ts +54 -0
  27. package/types/components/lcb-block/types.d.ts +17 -0
  28. package/types/components/lcb-grid/lcb-grid.vue.d.ts +62 -0
  29. package/types/components/lcb-grid/types.d.ts +8 -0
  30. package/types/components/lcb-home-search/lcb-home-search.vue.d.ts +35 -0
  31. package/types/components/lcb-img-nav/lcb-img-nav.vue.d.ts +80 -85
  32. package/types/components/lcb-img-nav/types.d.ts +31 -0
  33. package/types/components/lcb-nav/lcb-nav-search.vue.d.ts +44 -0
  34. package/types/components/lcb-nav/lcb-nav-title.vue.d.ts +28 -0
  35. package/types/components/lcb-nav/lcb-nav.vue.d.ts +92 -87
  36. package/types/components/lcb-nav/types.d.ts +42 -0
  37. package/types/components/lcb-swiper/lcb-swiper.vue.d.ts +118 -0
  38. package/types/components/lcb-title/lcb-title.vue.d.ts +62 -0
  39. package/types/components/lcb-title/types.d.ts +5 -0
  40. package/types/utils/transform.d.ts +1 -0
  41. package/utils/transform.ts +3 -0
  42. package/types/index.d.ts +0 -0
@@ -1,90 +1,95 @@
1
- interface NanProps {
2
- /** 是否固定 */
3
- fixed?: boolean;
4
- /** 模式 1.标题 2.搜索 3.导航 4.沉浸式 */
5
- styleGroup?: 1 | 2 | 3 | 4;
6
- /** 方位 */
7
- titleLocation?: 'left' | 'center';
8
- /** 是否沉浸式状态栏 */
9
- topStyle?: 1 | 2;
10
- /** 标题 */
11
- title?: string;
12
- /** 图片 */
13
- logoImg?: string;
14
- /** 背景图片 */
15
- backgroundImage?: string;
16
- /** 模式 */
17
- titleMode?: 'text' | 'img';
18
- /** 颜色模式 */
19
- colorMode?: 'custom' | 'default';
20
- /** 背景颜色 */
21
- backColor?: string;
22
- /** 背景样式 */
23
- backgroundType?: 'img' | 'color';
24
- /** 内容颜色 */
25
- contentColor?: string;
26
- searchText?: string;
27
- typographyTextBackground?: string;
28
- }
29
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<NanProps>, {
30
- styleGroup: number;
31
- titleLocation: string;
32
- topStyle: number;
33
- title: string;
34
- titleMode: string;
35
- backgroundType: string;
36
- colorMode: string;
37
- backColor: string;
38
- contentColor: string;
39
- logoImg: string;
40
- searchText: string;
41
- fixed: boolean;
42
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
- search: () => void;
44
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<NanProps>, {
45
- styleGroup: number;
46
- titleLocation: string;
47
- topStyle: number;
48
- title: string;
49
- titleMode: string;
50
- backgroundType: string;
51
- colorMode: string;
52
- backColor: string;
53
- contentColor: string;
54
- logoImg: string;
55
- searchText: string;
56
- fixed: boolean;
57
- }>>> & {
58
- onSearch?: (() => any) | undefined;
59
- }, {
60
- styleGroup: 1 | 2 | 3 | 4;
61
- fixed: boolean;
62
- title: string;
63
- titleLocation: "left" | "center";
64
- topStyle: 1 | 2;
65
- logoImg: string;
66
- titleMode: "text" | "img";
67
- colorMode: "custom" | "default";
68
- backColor: string;
69
- backgroundType: "img" | "color";
70
- contentColor: string;
71
- searchText: string;
72
- }, {}>;
73
- export default _default;
1
+ import { NavProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<NavProps>,
5
+ {
6
+ styleGroup: number
7
+ titleLocation: string
8
+ topStyle: number
9
+ title: string
10
+ titleMode: string
11
+ backgroundType: string
12
+ colorMode: string
13
+ backColor: string
14
+ contentColor: string
15
+ logoImg: string
16
+ fixed: boolean
17
+ back: boolean
18
+ capsuleMode: string
19
+ immersionMode: number
20
+ }
21
+ >,
22
+ {},
23
+ unknown,
24
+ {},
25
+ {},
26
+ import('vue').ComponentOptionsMixin,
27
+ import('vue').ComponentOptionsMixin,
28
+ {},
29
+ string,
30
+ import('vue').PublicProps,
31
+ Readonly<
32
+ import('vue').ExtractPropTypes<
33
+ __VLS_WithDefaults<
34
+ __VLS_TypePropsToOption<NavProps>,
35
+ {
36
+ styleGroup: number
37
+ titleLocation: string
38
+ topStyle: number
39
+ title: string
40
+ titleMode: string
41
+ backgroundType: string
42
+ colorMode: string
43
+ backColor: string
44
+ contentColor: string
45
+ logoImg: string
46
+ fixed: boolean
47
+ back: boolean
48
+ capsuleMode: string
49
+ immersionMode: number
50
+ }
51
+ >
52
+ >
53
+ >,
54
+ {
55
+ fixed: boolean
56
+ title: string
57
+ styleGroup: 1 | 2 | 3 | 4
58
+ back: boolean
59
+ topStyle: 1 | 2
60
+ immersionMode: 1 | 2
61
+ colorMode: 'custom' | 'default'
62
+ backColor: string
63
+ backgroundType: 'img' | 'color'
64
+ contentColor: string
65
+ capsuleMode: 'light' | 'dark'
66
+ titleMode: 'text' | 'img'
67
+ logoImg: string
68
+ titleLocation: 'left' | 'center'
69
+ },
70
+ {}
71
+ >
72
+ export default _default
74
73
  type __VLS_WithDefaults<P, D> = {
75
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
76
- default: D[K];
77
- }> : P[K];
78
- };
74
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
75
+ ? __VLS_Prettify<
76
+ P[K] & {
77
+ default: D[K]
78
+ }
79
+ >
80
+ : P[K]
81
+ }
79
82
  type __VLS_Prettify<T> = {
80
- [K in keyof T]: T[K];
81
- } & {};
82
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
83
+ [K in keyof T]: T[K]
84
+ } & {}
85
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
83
86
  type __VLS_TypePropsToOption<T> = {
84
- [K in keyof T]-?: {} extends Pick<T, K> ? {
85
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
86
- } : {
87
- type: import('vue').PropType<T[K]>;
88
- required: true;
89
- };
90
- };
87
+ [K in keyof T]-?: {} extends Pick<T, K>
88
+ ? {
89
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
90
+ }
91
+ : {
92
+ type: import('vue').PropType<T[K]>
93
+ required: true
94
+ }
95
+ }
@@ -0,0 +1,42 @@
1
+ export interface ICapsule {
2
+ icon: string
3
+ action: 'translate' | 'scanCode' | 'link' | 'home'
4
+ linkUrl?: string
5
+ }
6
+ export interface NavTitleProps {
7
+ /** 模式 */
8
+ titleMode?: 'text' | 'img'
9
+ /** 标题 */
10
+ title?: string
11
+ /** 图片 */
12
+ logoImg?: string
13
+ typographyTextBackground?: string
14
+ /** 方位 */
15
+ titleLocation?: 'left' | 'center'
16
+ }
17
+ export interface NavProps extends NavTitleProps {
18
+ /** 是否固定 */
19
+ fixed?: boolean
20
+ /** 是否沉浸式状态栏 */
21
+ topStyle?: 1 | 2
22
+ immersionMode?: 1 | 2
23
+ /** 模式 1.标题 2.搜索 3.导航 4.沉浸式 */
24
+ styleGroup?: 1 | 2 | 3 | 4
25
+ /** 背景图片 */
26
+ backgroundImage?: string
27
+ /** 颜色模式 */
28
+ colorMode?: 'custom' | 'default'
29
+ /** 背景颜色 */
30
+ backColor?: string
31
+ /** 背景样式 */
32
+ backgroundType?: 'img' | 'color'
33
+ /** 内容颜色 */
34
+ contentColor?: string
35
+ searchText?: string
36
+ /** 是否显示返回按钮 */
37
+ back?: boolean
38
+ /** 胶囊样式 */
39
+ capsuleMode?: 'light' | 'dark'
40
+ /** 胶囊列表 */
41
+ capsules?: ICapsule[]
42
+ }
@@ -0,0 +1,118 @@
1
+ interface NanProps {
2
+ list?: Array<any>
3
+ /** 是否自动播放 */
4
+ autoplay?: boolean
5
+ /** 模式 1.标题 2.搜索 3.导航 4.沉浸式 */
6
+ styleGroup?: 1 | 2 | 3 | 4
7
+ /** 轮播滑动方向 */
8
+ direction?: 'horizontal' | 'vertical'
9
+ displayMultipleItems?: number
10
+ duration?: number
11
+ height?: number
12
+ loop?: boolean
13
+ indicator?: boolean
14
+ indicatorType?: 'dots' | 'dots-bar' | 'fraction'
15
+ indicatorPosition?:
16
+ | 'left'
17
+ | 'top-left'
18
+ | 'top'
19
+ | 'top-right'
20
+ | 'bottom-left'
21
+ | 'bottom'
22
+ | 'bottom-right'
23
+ | 'right'
24
+ borderRadius?: number
25
+ }
26
+ declare const _default: import('vue').DefineComponent<
27
+ __VLS_WithDefaults<
28
+ __VLS_TypePropsToOption<NanProps>,
29
+ {
30
+ autoplay: boolean
31
+ styleGroup: number
32
+ direction: string
33
+ displayMultipleItems: number
34
+ duration: number
35
+ height: number
36
+ loop: boolean
37
+ indicator: boolean
38
+ indicatorType: string
39
+ indicatorPosition: string
40
+ borderRadius: number
41
+ }
42
+ >,
43
+ {},
44
+ unknown,
45
+ {},
46
+ {},
47
+ import('vue').ComponentOptionsMixin,
48
+ import('vue').ComponentOptionsMixin,
49
+ {},
50
+ string,
51
+ import('vue').PublicProps,
52
+ Readonly<
53
+ import('vue').ExtractPropTypes<
54
+ __VLS_WithDefaults<
55
+ __VLS_TypePropsToOption<NanProps>,
56
+ {
57
+ autoplay: boolean
58
+ styleGroup: number
59
+ direction: string
60
+ displayMultipleItems: number
61
+ duration: number
62
+ height: number
63
+ loop: boolean
64
+ indicator: boolean
65
+ indicatorType: string
66
+ indicatorPosition: string
67
+ borderRadius: number
68
+ }
69
+ >
70
+ >
71
+ >,
72
+ {
73
+ borderRadius: number
74
+ styleGroup: 1 | 2 | 3 | 4
75
+ autoplay: boolean
76
+ direction: 'horizontal' | 'vertical'
77
+ displayMultipleItems: number
78
+ duration: number
79
+ height: number
80
+ loop: boolean
81
+ indicatorPosition:
82
+ | 'left'
83
+ | 'top-left'
84
+ | 'top'
85
+ | 'top-right'
86
+ | 'bottom-left'
87
+ | 'bottom'
88
+ | 'bottom-right'
89
+ | 'right'
90
+ indicator: boolean
91
+ indicatorType: 'dots' | 'dots-bar' | 'fraction'
92
+ },
93
+ {}
94
+ >
95
+ export default _default
96
+ type __VLS_WithDefaults<P, D> = {
97
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
98
+ ? __VLS_Prettify<
99
+ P[K] & {
100
+ default: D[K]
101
+ }
102
+ >
103
+ : P[K]
104
+ }
105
+ type __VLS_Prettify<T> = {
106
+ [K in keyof T]: T[K]
107
+ } & {}
108
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
109
+ type __VLS_TypePropsToOption<T> = {
110
+ [K in keyof T]-?: {} extends Pick<T, K>
111
+ ? {
112
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
113
+ }
114
+ : {
115
+ type: import('vue').PropType<T[K]>
116
+ required: true
117
+ }
118
+ }
@@ -0,0 +1,62 @@
1
+ import { LcbTitleProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbTitleProps>,
5
+ {
6
+ fontWeight: number
7
+ fontSize: number
8
+ color: string
9
+ }
10
+ >,
11
+ {},
12
+ unknown,
13
+ {},
14
+ {},
15
+ import('vue').ComponentOptionsMixin,
16
+ import('vue').ComponentOptionsMixin,
17
+ {},
18
+ string,
19
+ import('vue').PublicProps,
20
+ Readonly<
21
+ import('vue').ExtractPropTypes<
22
+ __VLS_WithDefaults<
23
+ __VLS_TypePropsToOption<LcbTitleProps>,
24
+ {
25
+ fontWeight: number
26
+ fontSize: number
27
+ color: string
28
+ }
29
+ >
30
+ >
31
+ >,
32
+ {
33
+ color: string
34
+ fontSize: number
35
+ fontWeight: number
36
+ },
37
+ {}
38
+ >
39
+ export default _default
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
42
+ ? __VLS_Prettify<
43
+ P[K] & {
44
+ default: D[K]
45
+ }
46
+ >
47
+ : P[K]
48
+ }
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K]
51
+ } & {}
52
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
53
+ type __VLS_TypePropsToOption<T> = {
54
+ [K in keyof T]-?: {} extends Pick<T, K>
55
+ ? {
56
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
57
+ }
58
+ : {
59
+ type: import('vue').PropType<T[K]>
60
+ required: true
61
+ }
62
+ }
@@ -0,0 +1,5 @@
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+ export interface LcbTitleProps extends LcbBlockProps {
3
+ title: string
4
+ fontWeight?: number
5
+ }
@@ -0,0 +1 @@
1
+ export declare const transformValueUnit: (value?: number, uni?: string) => string | undefined
@@ -0,0 +1,3 @@
1
+ export const transformValueUnit = (value?: number, uni = 'px') => {
2
+ return typeof value === 'number' ? value + uni : value
3
+ }
package/types/index.d.ts DELETED
File without changes