@tplc/business 0.0.25 → 0.0.27

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 (52) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/components/lcb-calendar/api/index.ts +17 -0
  3. package/components/lcb-calendar/lcb-calendar.vue +116 -0
  4. package/components/lcb-calendar-search/lcb-calendar-search.vue +69 -0
  5. package/components/lcb-calendar-search/types.ts +6 -0
  6. package/components/lcb-city-select/api/index.ts +20 -0
  7. package/components/lcb-city-select/lcb-city-select.vue +168 -0
  8. package/components/lcb-city-select/types.ts +7 -0
  9. package/components/lcb-filter/components/ComponentGroup/index.vue +31 -0
  10. package/components/lcb-filter/components/TreeSelect/index.vue +3 -2
  11. package/components/lcb-filter/lcb-filter.vue +19 -1
  12. package/components/lcb-home-search/lcb-home-search.vue +38 -13
  13. package/components/lcb-image/Image/index.vue +8 -10
  14. package/components/lcb-img-nav/lcb-img-nav.vue +9 -1
  15. package/components/lcb-img-nav/types.ts +4 -0
  16. package/components/lcb-product/lcb-product.vue +47 -0
  17. package/components/lcb-product/types.ts +14 -0
  18. package/components/lcb-product-item/lcb-product-item.vue +85 -0
  19. package/components/lcb-product-item/types.ts +14 -0
  20. package/components/lcb-tags/Tag/index.vue +27 -0
  21. package/components/lcb-tags/lcb-tags.vue +49 -0
  22. package/components/lcb-tags/types.ts +30 -0
  23. package/components/lcb-title/lcb-title.vue +14 -8
  24. package/components/lcb-title/types.ts +5 -0
  25. package/constants.ts +1 -0
  26. package/global.d.ts +6 -0
  27. package/hooks/useLocation.api.ts +7 -0
  28. package/hooks/useLocation.ts +78 -0
  29. package/package.json +2 -2
  30. package/types/components/lcb-calendar/api/index.d.ts +16 -0
  31. package/types/components/lcb-calendar/lcb-calendar.vue.d.ts +137 -0
  32. package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +62 -0
  33. package/types/components/lcb-calendar-search/types.d.ts +4 -0
  34. package/types/components/lcb-city-select/api/index.d.ts +19 -0
  35. package/types/components/lcb-city-select/lcb-city-select.vue.d.ts +68 -0
  36. package/types/components/lcb-city-select/types.d.ts +5 -0
  37. package/types/components/lcb-filter/components/ActionView/index.vue.d.ts +1 -1
  38. package/types/components/lcb-img-nav/lcb-img-nav.vue.d.ts +1 -1
  39. package/types/components/lcb-img-nav/types.d.ts +4 -0
  40. package/types/components/lcb-product/lcb-product.vue.d.ts +42 -0
  41. package/types/components/lcb-product/types.d.ts +13 -0
  42. package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +62 -0
  43. package/types/components/lcb-product-item/types.d.ts +13 -0
  44. package/types/components/lcb-tags/Tag/index.vue.d.ts +44 -0
  45. package/types/components/lcb-tags/lcb-tags.vue.d.ts +59 -0
  46. package/types/components/lcb-tags/types.d.ts +13 -0
  47. package/types/components/lcb-title/types.d.ts +5 -0
  48. package/types/constants.d.ts +1 -0
  49. package/types/hooks/useLocation.api.d.ts +9 -0
  50. package/types/hooks/useLocation.d.ts +7 -0
  51. package/types/utils/utils.d.ts +1 -0
  52. package/utils/utils.ts +12 -0
@@ -0,0 +1,62 @@
1
+ import { LcbCalendarSearchProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbCalendarSearchProps>,
5
+ {
6
+ marginHorizontal: number
7
+ radius: number
8
+ placeholder: 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<LcbCalendarSearchProps>,
24
+ {
25
+ marginHorizontal: number
26
+ radius: number
27
+ placeholder: string
28
+ }
29
+ >
30
+ >
31
+ >,
32
+ {
33
+ marginHorizontal: number
34
+ radius: number
35
+ placeholder: string
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,4 @@
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+ export interface LcbCalendarSearchProps extends LcbBlockProps {
3
+ placeholder?: string
4
+ }
@@ -0,0 +1,19 @@
1
+ export interface HotAddress {
2
+ categoryName: string
3
+ hint: string
4
+ childHotAddress: ChildHotAddress[]
5
+ }
6
+ export interface ChildHotAddress {
7
+ addr: string
8
+ addrFlag: boolean
9
+ area: string
10
+ categoryName: string
11
+ createDate?: string
12
+ hotAddressId: string
13
+ lastModifyDate?: string
14
+ latitude?: string
15
+ longitude?: string
16
+ weightSort: string
17
+ addressInfo?: string
18
+ }
19
+ export declare const getHotAddress: () => Promise<import('../../../action').IResData<HotAddress[]>>
@@ -0,0 +1,68 @@
1
+ import { LcbCitySelectProps } from './types'
2
+ declare function __VLS_template(): {
3
+ default?(_: {}): any
4
+ }
5
+ declare const __VLS_component: import('vue').DefineComponent<
6
+ __VLS_WithDefaults<
7
+ __VLS_TypePropsToOption<LcbCitySelectProps>,
8
+ {
9
+ placeholder: string
10
+ }
11
+ >,
12
+ {},
13
+ unknown,
14
+ {},
15
+ {},
16
+ import('vue').ComponentOptionsMixin,
17
+ import('vue').ComponentOptionsMixin,
18
+ {},
19
+ string,
20
+ import('vue').PublicProps,
21
+ Readonly<
22
+ import('vue').ExtractPropTypes<
23
+ __VLS_WithDefaults<
24
+ __VLS_TypePropsToOption<LcbCitySelectProps>,
25
+ {
26
+ placeholder: string
27
+ }
28
+ >
29
+ >
30
+ >,
31
+ {
32
+ placeholder: string
33
+ },
34
+ {}
35
+ >
36
+ declare const _default: __VLS_WithTemplateSlots<
37
+ typeof __VLS_component,
38
+ ReturnType<typeof __VLS_template>
39
+ >
40
+ export default _default
41
+ type __VLS_WithDefaults<P, D> = {
42
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
43
+ ? __VLS_Prettify<
44
+ P[K] & {
45
+ default: D[K]
46
+ }
47
+ >
48
+ : P[K]
49
+ }
50
+ type __VLS_Prettify<T> = {
51
+ [K in keyof T]: T[K]
52
+ } & {}
53
+ type __VLS_WithTemplateSlots<T, S> = T & {
54
+ new (): {
55
+ $slots: S
56
+ }
57
+ }
58
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
59
+ type __VLS_TypePropsToOption<T> = {
60
+ [K in keyof T]-?: {} extends Pick<T, K>
61
+ ? {
62
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
63
+ }
64
+ : {
65
+ type: import('vue').PropType<T[K]>
66
+ required: true
67
+ }
68
+ }
@@ -0,0 +1,5 @@
1
+ import { UserLocation } from '../../hooks/useLocation.api'
2
+ export interface LcbCitySelectProps {
3
+ location?: UserLocation
4
+ placeholder?: string
5
+ }
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<
11
11
  import('vue').ComponentOptionsMixin,
12
12
  import('vue').ComponentOptionsMixin,
13
13
  {
14
- submit: (...args: any[]) => void
15
14
  cancel: (...args: any[]) => void
15
+ submit: (...args: any[]) => void
16
16
  },
17
17
  string,
18
18
  import('vue').PublicProps,
@@ -43,8 +43,8 @@ declare const _default: import('vue').DefineComponent<
43
43
  paddingHorizontal: number
44
44
  paddingVertical: number
45
45
  iconSize: number
46
- textColor: string
47
46
  iconColor: string
47
+ textColor: string
48
48
  pictureDistribution: 3 | 4 | 5
49
49
  iconRadius: number
50
50
  iconTextMargin: number
@@ -23,4 +23,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
23
23
  iconTextMargin?: number
24
24
  showTitle?: boolean
25
25
  title?: string
26
+ fontWeight?: number
27
+ fontSize?: number
28
+ color?: string
29
+ titlePadding?: number
26
30
  }
@@ -0,0 +1,42 @@
1
+ import { LcbProductProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<__VLS_TypePropsToOption<LcbProductProps>, {}>,
4
+ {},
5
+ unknown,
6
+ {},
7
+ {},
8
+ import('vue').ComponentOptionsMixin,
9
+ import('vue').ComponentOptionsMixin,
10
+ {},
11
+ string,
12
+ import('vue').PublicProps,
13
+ Readonly<
14
+ import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LcbProductProps>, {}>>
15
+ >,
16
+ {},
17
+ {}
18
+ >
19
+ export default _default
20
+ type __VLS_WithDefaults<P, D> = {
21
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
22
+ ? __VLS_Prettify<
23
+ P[K] & {
24
+ default: D[K]
25
+ }
26
+ >
27
+ : P[K]
28
+ }
29
+ type __VLS_Prettify<T> = {
30
+ [K in keyof T]: T[K]
31
+ } & {}
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
33
+ type __VLS_TypePropsToOption<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K>
35
+ ? {
36
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
37
+ }
38
+ : {
39
+ type: import('vue').PropType<T[K]>
40
+ required: true
41
+ }
42
+ }
@@ -0,0 +1,13 @@
1
+ export interface LcbProductProps {
2
+ styleGroup?: 1 | 2 | 3 | 4
3
+ items?: Record<string, any>
4
+ marginHorizontal?: number
5
+ productStyle?: 'image' | 'flat' | 'card' | 'border'
6
+ productTitle?: 0 | 1 | 2
7
+ showTags?: boolean
8
+ showPrice?: boolean
9
+ showScribePrice?: boolean
10
+ showCart?: boolean
11
+ showLocation?: boolean
12
+ showCollection?: boolean
13
+ }
@@ -0,0 +1,62 @@
1
+ import { LcbProductItemProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbProductItemProps>,
5
+ {
6
+ idx: number
7
+ picWidth: number
8
+ picHeight: number
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<LcbProductItemProps>,
24
+ {
25
+ idx: number
26
+ picWidth: number
27
+ picHeight: number
28
+ }
29
+ >
30
+ >
31
+ >,
32
+ {
33
+ idx: number
34
+ picWidth: number
35
+ picHeight: 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,13 @@
1
+ export interface LcbProductItemProps {
2
+ coverImg?: string
3
+ picWidth?: number
4
+ picHeight?: number
5
+ productName?: string
6
+ tags?: string | Record<string, any>
7
+ subTitle?: string
8
+ price?: string | number
9
+ priceColor?: string
10
+ scribePrice?: string | number
11
+ styleProps?: Record<string, any>
12
+ idx?: number
13
+ }
@@ -0,0 +1,44 @@
1
+ import type { LcbTagsItemProps } from '../types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<__VLS_TypePropsToOption<LcbTagsItemProps>, {}>,
4
+ {},
5
+ unknown,
6
+ {},
7
+ {},
8
+ import('vue').ComponentOptionsMixin,
9
+ import('vue').ComponentOptionsMixin,
10
+ {},
11
+ string,
12
+ import('vue').PublicProps,
13
+ Readonly<
14
+ import('vue').ExtractPropTypes<
15
+ __VLS_WithDefaults<__VLS_TypePropsToOption<LcbTagsItemProps>, {}>
16
+ >
17
+ >,
18
+ {},
19
+ {}
20
+ >
21
+ export default _default
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
24
+ ? __VLS_Prettify<
25
+ P[K] & {
26
+ default: D[K]
27
+ }
28
+ >
29
+ : P[K]
30
+ }
31
+ type __VLS_Prettify<T> = {
32
+ [K in keyof T]: T[K]
33
+ } & {}
34
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
35
+ type __VLS_TypePropsToOption<T> = {
36
+ [K in keyof T]-?: {} extends Pick<T, K>
37
+ ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
39
+ }
40
+ : {
41
+ type: import('vue').PropType<T[K]>
42
+ required: true
43
+ }
44
+ }
@@ -0,0 +1,59 @@
1
+ import { LcbTagsProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbTagsProps>,
5
+ {
6
+ fontSize: number
7
+ tagColor: string
8
+ }
9
+ >,
10
+ {},
11
+ unknown,
12
+ {},
13
+ {},
14
+ import('vue').ComponentOptionsMixin,
15
+ import('vue').ComponentOptionsMixin,
16
+ {},
17
+ string,
18
+ import('vue').PublicProps,
19
+ Readonly<
20
+ import('vue').ExtractPropTypes<
21
+ __VLS_WithDefaults<
22
+ __VLS_TypePropsToOption<LcbTagsProps>,
23
+ {
24
+ fontSize: number
25
+ tagColor: string
26
+ }
27
+ >
28
+ >
29
+ >,
30
+ {
31
+ fontSize: number
32
+ tagColor: string
33
+ },
34
+ {}
35
+ >
36
+ export default _default
37
+ type __VLS_WithDefaults<P, D> = {
38
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
39
+ ? __VLS_Prettify<
40
+ P[K] & {
41
+ default: D[K]
42
+ }
43
+ >
44
+ : P[K]
45
+ }
46
+ type __VLS_Prettify<T> = {
47
+ [K in keyof T]: T[K]
48
+ } & {}
49
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
50
+ type __VLS_TypePropsToOption<T> = {
51
+ [K in keyof T]-?: {} extends Pick<T, K>
52
+ ? {
53
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
54
+ }
55
+ : {
56
+ type: import('vue').PropType<T[K]>
57
+ required: true
58
+ }
59
+ }
@@ -0,0 +1,13 @@
1
+ export interface LcbTagsProps {
2
+ items?: any
3
+ mode?: 1 | 2
4
+ tagRadius?: number
5
+ fontSize?: number
6
+ tagColor?: string
7
+ }
8
+ export interface LcbTagsItemProps {
9
+ items: object[]
10
+ tagRadius?: number
11
+ fontSize?: number
12
+ tagColor?: string
13
+ }
@@ -1,5 +1,10 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
1
2
  import { LcbBlockProps } from '../lcb-block/types'
2
3
  export interface LcbTitleProps extends LcbBlockProps {
3
4
  title: string
5
+ /** 副标题 */
6
+ hint?: string
4
7
  fontWeight?: number
8
+ showMore?: boolean
9
+ action?: LcbActionViewProps
5
10
  }
@@ -0,0 +1 @@
1
+ export declare const FORM_KEY = 'form'
@@ -0,0 +1,9 @@
1
+ export interface UserLocation {
2
+ addressInfo: string
3
+ cityId: string
4
+ cityName: string
5
+ }
6
+ export declare const getUserLocation: (data: {
7
+ userLongitude: string
8
+ userLatitude: string
9
+ }) => Promise<import('../action').IResData<UserLocation>>
@@ -0,0 +1,7 @@
1
+ import { UserLocation } from './useLocation.api'
2
+ declare const useLocation: () => {
3
+ getLocation: () => Promise<void>
4
+ locationIng: import('vue').Ref<boolean>
5
+ userLocation: import('vue').Ref<UserLocation | undefined>
6
+ }
7
+ export default useLocation
@@ -0,0 +1 @@
1
+ export declare function formatJson(str: string | object | undefined, defVal?: {}): {}
package/utils/utils.ts ADDED
@@ -0,0 +1,12 @@
1
+ export function formatJson(str: string | object | undefined, defVal = {}) {
2
+ if (!str) return defVal;
3
+ if (typeof str == 'object') return str;
4
+ let json = defVal;
5
+ try {
6
+ json = JSON.parse(str);
7
+ // console.log('formatJson :', json)
8
+ } catch (e) {
9
+ json = defVal;
10
+ };
11
+ return json;
12
+ }