@tplc/business 0.1.0 → 0.1.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.
@@ -0,0 +1,67 @@
1
+ import { FilterTabsProps } from './components/FilterTabs/type'
2
+ import { Option } from './types'
3
+ export interface LcbListInfo {
4
+ url: string
5
+ baseParam: Record<string, unknown>
6
+ }
7
+ export interface LcbFilterResult {
8
+ btnComponent: BtnComponent
9
+ filterTags: FilterTags
10
+ filterComponent: FilterComponent[]
11
+ listInfo: LcbListInfo
12
+ filterTabs?: {
13
+ componentProps: FilterTabsProps
14
+ valueName: string
15
+ defaultValue?: string
16
+ }
17
+ }
18
+
19
+ export interface FilterComponent {
20
+ filterName?: string
21
+ component: string
22
+ defaultValue?: string
23
+ defaultName?: string
24
+ valueName: string
25
+ componentProps: FilterComponentProps
26
+ }
27
+
28
+ interface FilterComponentProps {
29
+ mode?: 'multiple' | 'single'
30
+ apiPath?: string
31
+ options?: Option[]
32
+ componentList?: ComponentList[]
33
+ }
34
+
35
+ export interface ComponentList {
36
+ filterName: string
37
+ component: string
38
+ valueName: string
39
+ defaultValue?: string | string[] | number[]
40
+ componentProps: FilterTagsProps
41
+ }
42
+
43
+ export interface FilterTags {
44
+ component: string
45
+ valueName: string
46
+ defaultValue?: string
47
+ defaultName?: string
48
+ componentProps: FilterTagsProps
49
+ }
50
+
51
+ export interface FilterTagsProps {
52
+ mode?: 'multiple' | 'single'
53
+ max: number
54
+ min: number
55
+ apiPath: string
56
+ options: Option[]
57
+ unit?: string
58
+ }
59
+
60
+ interface BtnComponent {
61
+ postRequest: string
62
+ }
63
+
64
+ export const getFilterDetail = (val: string) =>
65
+ uni.$lcb.http.post<LcbFilterResult>('/pageDecoration/list/detail', {
66
+ pageListType: val,
67
+ })
@@ -71,8 +71,8 @@
71
71
  <FilterList v-bind="{ ...info.listInfo, listType, filter, ...attrs }">
72
72
  <template #default="{ items }">
73
73
  <slot name="list" :items="items">
74
- <!-- <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items"> -->
75
- <!-- <template #item="slotContext">
74
+ <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items">
75
+ <template #item="slotContext">
76
76
  <slot name="item" v-bind="slotContext" />
77
77
  </template>
78
78
  <template
@@ -80,9 +80,9 @@
80
80
  :key="slotName"
81
81
  #[slotName]="slotContext"
82
82
  >
83
- <slot :name="slotName" v-bind="slotContext || {}" />
84
- </template> -->
85
- <!-- </lcb-product> -->
83
+ <slot :name="slotName" v-bind="slotContext" />
84
+ </template>
85
+ </lcb-product>
86
86
  </slot>
87
87
  </template>
88
88
  </FilterList>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -0,0 +1,60 @@
1
+ import { FilterTabsProps } from './components/FilterTabs/type'
2
+ import { Option } from './types'
3
+ export interface LcbListInfo {
4
+ url: string
5
+ baseParam: Record<string, unknown>
6
+ }
7
+ export interface LcbFilterResult {
8
+ btnComponent: BtnComponent
9
+ filterTags: FilterTags
10
+ filterComponent: FilterComponent[]
11
+ listInfo: LcbListInfo
12
+ filterTabs?: {
13
+ componentProps: FilterTabsProps
14
+ valueName: string
15
+ defaultValue?: string
16
+ }
17
+ }
18
+ export interface FilterComponent {
19
+ filterName?: string
20
+ component: string
21
+ defaultValue?: string
22
+ defaultName?: string
23
+ valueName: string
24
+ componentProps: FilterComponentProps
25
+ }
26
+ interface FilterComponentProps {
27
+ mode?: 'multiple' | 'single'
28
+ apiPath?: string
29
+ options?: Option[]
30
+ componentList?: ComponentList[]
31
+ }
32
+ export interface ComponentList {
33
+ filterName: string
34
+ component: string
35
+ valueName: string
36
+ defaultValue?: string | string[] | number[]
37
+ componentProps: FilterTagsProps
38
+ }
39
+ export interface FilterTags {
40
+ component: string
41
+ valueName: string
42
+ defaultValue?: string
43
+ defaultName?: string
44
+ componentProps: FilterTagsProps
45
+ }
46
+ export interface FilterTagsProps {
47
+ mode?: 'multiple' | 'single'
48
+ max: number
49
+ min: number
50
+ apiPath: string
51
+ options: Option[]
52
+ unit?: string
53
+ }
54
+ interface BtnComponent {
55
+ postRequest: string
56
+ }
57
+ export declare const getFilterDetail: (
58
+ val: string,
59
+ ) => Promise<import('../../action').IResData<LcbFilterResult>>
60
+ export {}
@@ -1,7 +1,25 @@
1
1
  import { LcbListProps } from './types'
2
2
  import './index.scss'
3
- declare function __VLS_template(): {
3
+ declare function __VLS_template(): Partial<
4
+ Record<
5
+ NonNullable<
6
+ | 'image'
7
+ | 'title'
8
+ | 'location'
9
+ | 'subTitle'
10
+ | 'price'
11
+ | 'priceUnit'
12
+ | 'priceSuffix'
13
+ | 'originPrice'
14
+ | 'originPriceUnit'
15
+ | 'tags'
16
+ | 'distance'
17
+ >,
18
+ (_: any) => any
19
+ >
20
+ > & {
4
21
  list?(_: { items: any[] }): any
22
+ item?(_: any): any
5
23
  }
6
24
  declare const __VLS_component: import('vue').DefineComponent<
7
25
  __VLS_WithDefaults<__VLS_TypePropsToOption<LcbListProps>, any>,
@@ -1,4 +1,4 @@
1
- export declare const getUserPhone: (data: {
1
+ export declare const getPhone: (data: {
2
2
  encryptedData: string
3
3
  iv: string
4
4
  code?: string