@tplc/business 0.0.27 → 0.0.29
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/CHANGELOG.md +48 -0
- package/components/lcb-area-picker/api/index.ts +45 -0
- package/components/lcb-area-picker/lcb-area-picker.vue +77 -0
- package/components/lcb-area-picker/types.ts +3 -0
- package/components/lcb-banner-block/lcb-banner-block.vue +2 -2
- package/components/lcb-calendar/lcb-calendar.vue +3 -3
- package/components/lcb-calendar-search/lcb-calendar-search.vue +5 -2
- package/components/lcb-city-select/api/index.ts +15 -1
- package/components/lcb-city-select/components/lcb-city-letter/index.vue +171 -0
- package/components/lcb-city-select/components/lcb-city-list/index.vue +127 -0
- package/components/lcb-city-select/components/lcb-city-list/types.ts +6 -0
- package/components/lcb-city-select/images/hot.png +0 -0
- package/components/lcb-city-select/lcb-city-select.vue +95 -118
- package/components/lcb-dynamic-data/lcb-dynamic-data.vue +25 -0
- package/components/lcb-dynamic-data/types.ts +7 -0
- package/components/lcb-home-search/lcb-home-search.vue +16 -7
- package/components/lcb-image/lcb-image.vue +35 -23
- package/components/lcb-image/types.ts +1 -1
- package/components/lcb-img-nav/lcb-img-nav.vue +70 -30
- package/components/lcb-img-nav/types.ts +3 -3
- package/components/{lcb-filter → lcb-list}/api.ts +20 -9
- package/components/{lcb-filter → lcb-list}/components/ComponentGroup/index.vue +1 -1
- package/components/lcb-list/components/FilterList/index.vue +85 -0
- package/components/lcb-list/components/FilterList/type.ts +9 -0
- package/components/{lcb-filter → lcb-list}/components/FilterSlider/index.vue +2 -1
- package/components/lcb-list/components/FilterSlider/types.ts +3 -0
- package/components/lcb-list/components/FilterTabs/index.vue +27 -0
- package/components/lcb-list/components/FilterTabs/type.ts +6 -0
- package/components/{lcb-filter → lcb-list}/index.scss +23 -0
- package/components/lcb-list/lcb-list.vue +179 -0
- package/components/{lcb-filter → lcb-list}/types.ts +6 -1
- package/components/lcb-nav/lcb-nav.vue +10 -22
- package/components/lcb-notice/Item/index.vue +4 -4
- package/components/lcb-notice/lcb-notice.vue +10 -8
- package/components/lcb-notice/types.ts +4 -1
- package/components/lcb-product/lcb-product.vue +7 -7
- package/components/lcb-product/types.ts +3 -3
- package/components/lcb-product-item/lcb-product-item.vue +24 -12
- package/components/lcb-user-order/lcb-user-order.vue +44 -23
- package/components/lcb-user-top/lcb-user-top.vue +77 -48
- package/global.d.ts +3 -1
- package/hooks/usePageScroll.ts +10 -0
- package/iconfonts/index.css +1 -175
- package/package.json +5 -2
- package/types/components/lcb-area-picker/api/index.d.ts +38 -0
- package/types/components/lcb-area-picker/lcb-area-picker.vue.d.ts +67 -0
- package/types/components/lcb-area-picker/types.d.ts +1 -0
- package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +1 -1
- package/types/components/lcb-city-select/api/index.d.ts +14 -1
- package/types/components/lcb-city-select/components/lcb-city-letter/index.vue.d.ts +53 -0
- package/types/components/{lcb-filter/lcb-filter.vue.d.ts → lcb-city-select/components/lcb-city-list/index.vue.d.ts} +9 -18
- package/types/components/lcb-city-select/components/lcb-city-list/types.d.ts +5 -0
- package/types/components/lcb-city-select/lcb-city-select.vue.d.ts +13 -4
- package/types/components/lcb-dynamic-data/lcb-dynamic-data.vue.d.ts +44 -0
- package/types/components/lcb-dynamic-data/types.d.ts +7 -0
- package/types/components/lcb-home-search/lcb-home-search.vue.d.ts +1 -1
- package/types/components/lcb-image/lcb-image.vue.d.ts +1 -1
- package/types/components/lcb-img-nav/types.d.ts +2 -2
- package/types/components/{lcb-filter → lcb-list}/api.d.ts +18 -7
- package/types/components/lcb-list/components/FilterList/index.vue.d.ts +28 -0
- package/types/components/lcb-list/components/FilterList/type.d.ts +9 -0
- package/types/components/lcb-list/components/FilterSlider/types.d.ts +2 -0
- package/types/components/lcb-list/components/FilterTabs/index.vue.d.ts +36 -0
- package/types/components/lcb-list/components/FilterTabs/type.d.ts +5 -0
- package/types/components/lcb-list/lcb-list.vue.d.ts +74 -0
- package/types/components/{lcb-filter → lcb-list}/types.d.ts +5 -1
- package/types/components/lcb-notice/lcb-notice.vue.d.ts +3 -0
- package/types/components/lcb-notice/types.d.ts +3 -0
- package/types/hooks/usePageScroll.d.ts +2 -0
- package/components/lcb-filter/components/FilterSlider/types.ts +0 -3
- package/components/lcb-filter/lcb-filter.vue +0 -147
- package/types/components/lcb-filter/components/FilterSlider/types.d.ts +0 -2
- /package/components/{lcb-filter → lcb-list}/components/ActionView/index.vue +0 -0
- /package/components/{lcb-filter → lcb-list}/components/ComponentGroup/type.ts +0 -0
- /package/components/{lcb-filter → lcb-list}/components/FilterSelect/index.vue +0 -0
- /package/components/{lcb-filter → lcb-list}/components/FilterSelect/type.ts +0 -0
- /package/components/{lcb-filter → lcb-list}/components/SelectTagView/index.vue +0 -0
- /package/components/{lcb-filter → lcb-list}/components/TagSelect/index.vue +0 -0
- /package/components/{lcb-filter → lcb-list}/components/TagSelect/type.ts +0 -0
- /package/components/{lcb-filter → lcb-list}/components/TreeSelect/index.vue +0 -0
- /package/components/{lcb-filter → lcb-list}/components/TreeSelect/type.ts +0 -0
- /package/components/{lcb-filter → lcb-list}/hooks/useSelect.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/ActionView/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/ComponentGroup/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/ComponentGroup/type.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/FilterSelect/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/FilterSelect/type.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/FilterSlider/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/SelectTagView/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/TagSelect/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/TagSelect/type.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/TreeSelect/index.vue.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/components/TreeSelect/type.d.ts +0 -0
- /package/types/components/{lcb-filter → lcb-list}/hooks/useSelect.d.ts +0 -0
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './index.scss'
|
|
1
|
+
import { LcbCityListProps } from './types'
|
|
3
2
|
declare const _default: import('vue').DefineComponent<
|
|
4
|
-
__VLS_WithDefaults<
|
|
5
|
-
__VLS_TypePropsToOption<LcbFilterProps>,
|
|
6
|
-
{
|
|
7
|
-
pageFilterType: string
|
|
8
|
-
}
|
|
9
|
-
>,
|
|
3
|
+
__VLS_WithDefaults<__VLS_TypePropsToOption<LcbCityListProps>, {}>,
|
|
10
4
|
{},
|
|
11
5
|
unknown,
|
|
12
6
|
{},
|
|
13
7
|
{},
|
|
14
8
|
import('vue').ComponentOptionsMixin,
|
|
15
9
|
import('vue').ComponentOptionsMixin,
|
|
16
|
-
{
|
|
10
|
+
{
|
|
11
|
+
click: (...args: any[]) => void
|
|
12
|
+
},
|
|
17
13
|
string,
|
|
18
14
|
import('vue').PublicProps,
|
|
19
15
|
Readonly<
|
|
20
16
|
import('vue').ExtractPropTypes<
|
|
21
|
-
__VLS_WithDefaults<
|
|
22
|
-
__VLS_TypePropsToOption<LcbFilterProps>,
|
|
23
|
-
{
|
|
24
|
-
pageFilterType: string
|
|
25
|
-
}
|
|
26
|
-
>
|
|
17
|
+
__VLS_WithDefaults<__VLS_TypePropsToOption<LcbCityListProps>, {}>
|
|
27
18
|
>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
pageFilterType: string
|
|
19
|
+
> & {
|
|
20
|
+
onClick?: ((...args: any[]) => any) | undefined
|
|
31
21
|
},
|
|
22
|
+
{},
|
|
32
23
|
{}
|
|
33
24
|
>
|
|
34
25
|
export default _default
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { ChildHotAddress } from './api'
|
|
1
2
|
import { LcbCitySelectProps } from './types'
|
|
3
|
+
declare let __VLS_typeProps: LcbCitySelectProps
|
|
4
|
+
type __VLS_PublicProps = {
|
|
5
|
+
modelValue?: ChildHotAddress
|
|
6
|
+
} & typeof __VLS_typeProps
|
|
2
7
|
declare function __VLS_template(): {
|
|
3
8
|
default?(_: {}): any
|
|
4
9
|
}
|
|
5
10
|
declare const __VLS_component: import('vue').DefineComponent<
|
|
6
11
|
__VLS_WithDefaults<
|
|
7
|
-
__VLS_TypePropsToOption<
|
|
12
|
+
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
8
13
|
{
|
|
9
14
|
placeholder: string
|
|
10
15
|
}
|
|
@@ -15,19 +20,23 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
15
20
|
{},
|
|
16
21
|
import('vue').ComponentOptionsMixin,
|
|
17
22
|
import('vue').ComponentOptionsMixin,
|
|
18
|
-
{
|
|
23
|
+
{
|
|
24
|
+
'update:modelValue': (modelValue: ChildHotAddress) => void
|
|
25
|
+
},
|
|
19
26
|
string,
|
|
20
27
|
import('vue').PublicProps,
|
|
21
28
|
Readonly<
|
|
22
29
|
import('vue').ExtractPropTypes<
|
|
23
30
|
__VLS_WithDefaults<
|
|
24
|
-
__VLS_TypePropsToOption<
|
|
31
|
+
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
25
32
|
{
|
|
26
33
|
placeholder: string
|
|
27
34
|
}
|
|
28
35
|
>
|
|
29
36
|
>
|
|
30
|
-
|
|
37
|
+
> & {
|
|
38
|
+
'onUpdate:modelValue'?: ((modelValue: ChildHotAddress) => any) | undefined
|
|
39
|
+
},
|
|
31
40
|
{
|
|
32
41
|
placeholder: string
|
|
33
42
|
},
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LcbDynamicDataProps } from './types'
|
|
2
|
+
declare const _default: import('vue').DefineComponent<
|
|
3
|
+
__VLS_WithDefaults<__VLS_TypePropsToOption<LcbDynamicDataProps>, {}>,
|
|
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<LcbDynamicDataProps>, {}>
|
|
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
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionView } from 'action'
|
|
2
2
|
import { LcbBlockProps } from '../lcb-block/types'
|
|
3
3
|
export interface LcbImgNavProps extends LcbBlockProps {
|
|
4
|
-
/** 模式 1.单行 2.多行 */
|
|
5
|
-
styleGroup?: 1 | 2
|
|
4
|
+
/** 模式 1.单行 2.多行 3.cell */
|
|
5
|
+
styleGroup?: 1 | 2 | 3
|
|
6
6
|
/** 文字颜色 #212121 */
|
|
7
7
|
textColor?: string
|
|
8
8
|
/** 背景图片 */
|
|
@@ -1,38 +1,49 @@
|
|
|
1
|
+
import { FilterTabsProps } from './components/FilterTabs/type'
|
|
1
2
|
import { Option } from './types'
|
|
3
|
+
export interface LcbListInfo {
|
|
4
|
+
url: string
|
|
5
|
+
baseParam: Record<string, unknown>
|
|
6
|
+
}
|
|
2
7
|
export interface LcbFilterResult {
|
|
3
8
|
btnComponent: BtnComponent
|
|
4
9
|
filterTags: FilterTags
|
|
5
10
|
filterComponent: FilterComponent[]
|
|
11
|
+
listInfo: LcbListInfo
|
|
12
|
+
filterTabs?: {
|
|
13
|
+
componentProps: FilterTabsProps
|
|
14
|
+
valueName: string
|
|
15
|
+
defaultValue?: string
|
|
16
|
+
}
|
|
6
17
|
}
|
|
7
18
|
export interface FilterComponent {
|
|
8
|
-
|
|
19
|
+
filterName?: string
|
|
9
20
|
component: string
|
|
10
21
|
defaultValue?: string
|
|
11
22
|
defaultName?: string
|
|
12
23
|
valueName: string
|
|
13
|
-
componentProps:
|
|
24
|
+
componentProps: FilterComponentProps
|
|
14
25
|
}
|
|
15
|
-
interface
|
|
26
|
+
interface FilterComponentProps {
|
|
16
27
|
mode?: 'multiple' | 'single'
|
|
17
28
|
apiPath?: string
|
|
18
29
|
options?: Option[]
|
|
19
30
|
componentList?: ComponentList[]
|
|
20
31
|
}
|
|
21
32
|
export interface ComponentList {
|
|
22
|
-
|
|
33
|
+
filterName: string
|
|
23
34
|
component: string
|
|
24
35
|
valueName: string
|
|
25
36
|
defaultValue?: string | string[] | number[]
|
|
26
|
-
componentProps:
|
|
37
|
+
componentProps: FilterTagsProps
|
|
27
38
|
}
|
|
28
39
|
export interface FilterTags {
|
|
29
40
|
component: string
|
|
30
41
|
valueName: string
|
|
31
42
|
defaultValue?: string
|
|
32
43
|
defaultName?: string
|
|
33
|
-
componentProps:
|
|
44
|
+
componentProps: FilterTagsProps
|
|
34
45
|
}
|
|
35
|
-
export interface
|
|
46
|
+
export interface FilterTagsProps {
|
|
36
47
|
mode?: 'multiple' | 'single'
|
|
37
48
|
max: number
|
|
38
49
|
min: number
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LcbFilterListProps } from './type'
|
|
2
|
+
declare const _default: import('vue').DefineComponent<
|
|
3
|
+
__VLS_TypePropsToOption<LcbFilterListProps>,
|
|
4
|
+
{},
|
|
5
|
+
unknown,
|
|
6
|
+
{},
|
|
7
|
+
{},
|
|
8
|
+
import('vue').ComponentOptionsMixin,
|
|
9
|
+
import('vue').ComponentOptionsMixin,
|
|
10
|
+
{},
|
|
11
|
+
string,
|
|
12
|
+
import('vue').PublicProps,
|
|
13
|
+
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbFilterListProps>>>,
|
|
14
|
+
{},
|
|
15
|
+
{}
|
|
16
|
+
>
|
|
17
|
+
export default _default
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
19
|
+
type __VLS_TypePropsToOption<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
21
|
+
? {
|
|
22
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
23
|
+
}
|
|
24
|
+
: {
|
|
25
|
+
type: import('vue').PropType<T[K]>
|
|
26
|
+
required: true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LcbListInfo } from '../../api'
|
|
2
|
+
import { LcbProductProps } from '../../../lcb-product/types'
|
|
3
|
+
export interface PageListProps {
|
|
4
|
+
emptyImage?: string
|
|
5
|
+
productProps?: LcbProductProps
|
|
6
|
+
}
|
|
7
|
+
export interface LcbFilterListProps extends PageListProps, LcbListInfo {
|
|
8
|
+
filter?: Record<string, any>
|
|
9
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FilterTabsProps } from './type'
|
|
2
|
+
declare let __VLS_typeProps: FilterTabsProps
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: string
|
|
5
|
+
} & typeof __VLS_typeProps
|
|
6
|
+
declare const _default: import('vue').DefineComponent<
|
|
7
|
+
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
8
|
+
{},
|
|
9
|
+
unknown,
|
|
10
|
+
{},
|
|
11
|
+
{},
|
|
12
|
+
import('vue').ComponentOptionsMixin,
|
|
13
|
+
import('vue').ComponentOptionsMixin,
|
|
14
|
+
{
|
|
15
|
+
'update:modelValue': (modelValue: string) => void
|
|
16
|
+
},
|
|
17
|
+
string,
|
|
18
|
+
import('vue').PublicProps,
|
|
19
|
+
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
20
|
+
'onUpdate:modelValue'?: ((modelValue: string) => any) | undefined
|
|
21
|
+
},
|
|
22
|
+
{},
|
|
23
|
+
{}
|
|
24
|
+
>
|
|
25
|
+
export default _default
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
27
|
+
type __VLS_TypePropsToOption<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
29
|
+
? {
|
|
30
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
type: import('vue').PropType<T[K]>
|
|
34
|
+
required: true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { LcbListProps } from './types'
|
|
2
|
+
import './index.scss'
|
|
3
|
+
declare const _default: import('vue').DefineComponent<
|
|
4
|
+
__VLS_WithDefaults<
|
|
5
|
+
__VLS_TypePropsToOption<LcbListProps>,
|
|
6
|
+
{
|
|
7
|
+
pageFilterType: string
|
|
8
|
+
border: boolean
|
|
9
|
+
styleMode: string
|
|
10
|
+
pageListProps: () => {
|
|
11
|
+
productProps: {
|
|
12
|
+
styleGroup: number
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
>,
|
|
17
|
+
{},
|
|
18
|
+
unknown,
|
|
19
|
+
{},
|
|
20
|
+
{},
|
|
21
|
+
import('vue').ComponentOptionsMixin,
|
|
22
|
+
import('vue').ComponentOptionsMixin,
|
|
23
|
+
{},
|
|
24
|
+
string,
|
|
25
|
+
import('vue').PublicProps,
|
|
26
|
+
Readonly<
|
|
27
|
+
import('vue').ExtractPropTypes<
|
|
28
|
+
__VLS_WithDefaults<
|
|
29
|
+
__VLS_TypePropsToOption<LcbListProps>,
|
|
30
|
+
{
|
|
31
|
+
pageFilterType: string
|
|
32
|
+
border: boolean
|
|
33
|
+
styleMode: string
|
|
34
|
+
pageListProps: () => {
|
|
35
|
+
productProps: {
|
|
36
|
+
styleGroup: number
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
>
|
|
42
|
+
>,
|
|
43
|
+
{
|
|
44
|
+
border: boolean
|
|
45
|
+
pageFilterType: string
|
|
46
|
+
pageListProps: import('./components/FilterList/type').PageListProps
|
|
47
|
+
styleMode: 'default' | 'plain'
|
|
48
|
+
},
|
|
49
|
+
{}
|
|
50
|
+
>
|
|
51
|
+
export default _default
|
|
52
|
+
type __VLS_WithDefaults<P, D> = {
|
|
53
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D
|
|
54
|
+
? __VLS_Prettify<
|
|
55
|
+
P[K] & {
|
|
56
|
+
default: D[K]
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
: P[K]
|
|
60
|
+
}
|
|
61
|
+
type __VLS_Prettify<T> = {
|
|
62
|
+
[K in keyof T]: T[K]
|
|
63
|
+
} & {}
|
|
64
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
65
|
+
type __VLS_TypePropsToOption<T> = {
|
|
66
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
67
|
+
? {
|
|
68
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
69
|
+
}
|
|
70
|
+
: {
|
|
71
|
+
type: import('vue').PropType<T[K]>
|
|
72
|
+
required: true
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { PageListProps } from './components/FilterList/type'
|
|
2
|
+
export interface LcbListProps {
|
|
2
3
|
pageFilterType?: string
|
|
4
|
+
pageListProps?: PageListProps
|
|
5
|
+
border?: boolean
|
|
6
|
+
styleMode?: 'default' | 'plain'
|
|
3
7
|
}
|
|
4
8
|
export interface Option {
|
|
5
9
|
label: string
|
|
@@ -10,6 +10,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
10
10
|
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
11
11
|
{
|
|
12
12
|
textSpeed: number
|
|
13
|
+
borderColor: string
|
|
13
14
|
}
|
|
14
15
|
>,
|
|
15
16
|
{},
|
|
@@ -30,6 +31,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
30
31
|
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
31
32
|
{
|
|
32
33
|
textSpeed: number
|
|
34
|
+
borderColor: string
|
|
33
35
|
}
|
|
34
36
|
>
|
|
35
37
|
>
|
|
@@ -39,6 +41,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
39
41
|
},
|
|
40
42
|
{
|
|
41
43
|
textSpeed: number
|
|
44
|
+
borderColor: string
|
|
42
45
|
},
|
|
43
46
|
{}
|
|
44
47
|
>
|
|
@@ -11,6 +11,8 @@ export interface LcbNoticeBarProps {
|
|
|
11
11
|
iconType?: number
|
|
12
12
|
direction?: string
|
|
13
13
|
textSpeed?: number
|
|
14
|
+
textColor?: string
|
|
15
|
+
borderColor?: string
|
|
14
16
|
}
|
|
15
17
|
export interface NoticeBarItemProps {
|
|
16
18
|
idx?: number
|
|
@@ -20,5 +22,6 @@ export interface NoticeBarItemProps {
|
|
|
20
22
|
iconType?: number
|
|
21
23
|
item?: NoticeItem
|
|
22
24
|
textSpeed?: number
|
|
25
|
+
textColor?: string
|
|
23
26
|
}
|
|
24
27
|
export {}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view v-if="info">
|
|
3
|
-
<wd-drop-menu>
|
|
4
|
-
<wd-drop-menu-item
|
|
5
|
-
v-for="(item, index) in info?.filterComponent"
|
|
6
|
-
:key="item.valueName"
|
|
7
|
-
:title="titleObj[item.valueName] || item.fitlerName"
|
|
8
|
-
icon="caret-down-small"
|
|
9
|
-
icon-size="26px"
|
|
10
|
-
:selected="getSelect(item)"
|
|
11
|
-
ref="dropMenu"
|
|
12
|
-
@opened="handleOpened"
|
|
13
|
-
>
|
|
14
|
-
<view class="lcb-filter__popup">
|
|
15
|
-
<FilterSelect
|
|
16
|
-
v-if="item.component === 'select'"
|
|
17
|
-
v-bind="item.componentProps"
|
|
18
|
-
v-model="filter[item.valueName]"
|
|
19
|
-
v-model:title="titleObj[item.valueName]"
|
|
20
|
-
@submit="onSubmit(index)"
|
|
21
|
-
/>
|
|
22
|
-
<TreeSelect
|
|
23
|
-
v-else-if="item.component === 'treeSelect'"
|
|
24
|
-
v-bind="item.componentProps"
|
|
25
|
-
v-model="filter[item.valueName]"
|
|
26
|
-
v-model:title="titleObj[item.valueName]"
|
|
27
|
-
@submit="onSubmit(index)"
|
|
28
|
-
/>
|
|
29
|
-
<ComponentGroup
|
|
30
|
-
v-else-if="item.component === 'componentGroup'"
|
|
31
|
-
v-bind="item.componentProps"
|
|
32
|
-
:filter="filter"
|
|
33
|
-
@submit="onSubmit(index, $event)"
|
|
34
|
-
/>
|
|
35
|
-
</view>
|
|
36
|
-
</wd-drop-menu-item>
|
|
37
|
-
</wd-drop-menu>
|
|
38
|
-
<view
|
|
39
|
-
v-if="info?.filterTags || info.btnComponent"
|
|
40
|
-
class="bg-white px-3 pb-2 box-border flex items-center"
|
|
41
|
-
>
|
|
42
|
-
<view class="flex gap-3.5 flex-1">
|
|
43
|
-
<TagSelect
|
|
44
|
-
v-if="info.filterTags"
|
|
45
|
-
size="small"
|
|
46
|
-
v-bind="info.filterTags.componentProps"
|
|
47
|
-
v-model="filter[info.filterTags.valueName]"
|
|
48
|
-
/>
|
|
49
|
-
</view>
|
|
50
|
-
<wd-button v-if="info.btnComponent" custom-class="!h-60rpx opacity-primary">
|
|
51
|
-
{{ info.btnComponent?.postRequest }}
|
|
52
|
-
</wd-button>
|
|
53
|
-
</view>
|
|
54
|
-
</view>
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<script setup lang="ts">
|
|
58
|
-
import { inject, Ref, ref, watch } from 'vue'
|
|
59
|
-
import { LcbFilterProps } from './types'
|
|
60
|
-
import { FilterComponent, getFilterDetail, LcbFilterResult } from './api'
|
|
61
|
-
import FilterSelect from './components/FilterSelect/index.vue'
|
|
62
|
-
import TreeSelect from './components/TreeSelect/index.vue'
|
|
63
|
-
import ComponentGroup from './components/ComponentGroup/index.vue'
|
|
64
|
-
import TagSelect from './components/TagSelect/index.vue'
|
|
65
|
-
import './index.scss'
|
|
66
|
-
import { FORM_KEY } from '../../constants'
|
|
67
|
-
defineOptions({
|
|
68
|
-
name: 'LcbFilter',
|
|
69
|
-
options: {
|
|
70
|
-
addGlobalClass: true,
|
|
71
|
-
virtualHost: true,
|
|
72
|
-
styleIsolation: 'shared',
|
|
73
|
-
},
|
|
74
|
-
})
|
|
75
|
-
const form = inject<Ref<Record<string, any>>>(FORM_KEY)
|
|
76
|
-
const dropMenu = ref()
|
|
77
|
-
const props = withDefaults(defineProps<LcbFilterProps>(), {
|
|
78
|
-
pageFilterType: 'hotelTravelFilter',
|
|
79
|
-
})
|
|
80
|
-
const info = ref<LcbFilterResult>()
|
|
81
|
-
const filter = ref<Record<string, any>>({})
|
|
82
|
-
const titleObj = ref<Record<string, any>>({})
|
|
83
|
-
watch(
|
|
84
|
-
() => props.pageFilterType,
|
|
85
|
-
async (val) => {
|
|
86
|
-
if (val) {
|
|
87
|
-
const { data } = await getFilterDetail(val)
|
|
88
|
-
data.filterComponent.forEach((item) => {
|
|
89
|
-
filter.value[item.valueName] = item.defaultValue
|
|
90
|
-
titleObj.value[item.valueName] = item.fitlerName
|
|
91
|
-
if (item.componentProps?.componentList) {
|
|
92
|
-
item.componentProps.componentList.forEach((data) => {
|
|
93
|
-
filter.value[data.valueName] = data.defaultValue
|
|
94
|
-
})
|
|
95
|
-
}
|
|
96
|
-
})
|
|
97
|
-
if (data.filterTags) {
|
|
98
|
-
filter.value[data.filterTags.valueName] = data.filterTags.defaultValue
|
|
99
|
-
titleObj.value[data.filterTags.valueName] = data.filterTags.defaultName
|
|
100
|
-
}
|
|
101
|
-
info.value = data
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
immediate: true,
|
|
106
|
-
},
|
|
107
|
-
)
|
|
108
|
-
const onSubmit = (index: number, filterObj?: Record<string, any>) => {
|
|
109
|
-
dropMenu.value?.[index]?.close()
|
|
110
|
-
if (filterObj) {
|
|
111
|
-
filter.value = {
|
|
112
|
-
...filter.value,
|
|
113
|
-
...filterObj,
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
const getSelect = (item: FilterComponent) => {
|
|
118
|
-
if (item.component === 'componentGroup') {
|
|
119
|
-
return item.componentProps.componentList?.some((v) => filter.value[v.valueName])
|
|
120
|
-
} else {
|
|
121
|
-
return Boolean(filter.value[item.valueName])
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
const handleOpened = () => {
|
|
125
|
-
uni.$emit('drop-opened')
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
watch(
|
|
129
|
-
() => filter.value,
|
|
130
|
-
async (val) => {
|
|
131
|
-
if (form && Object.keys(val).length) {
|
|
132
|
-
form.value = {
|
|
133
|
-
...form.value,
|
|
134
|
-
...val,
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
immediate: true,
|
|
140
|
-
deep: true,
|
|
141
|
-
},
|
|
142
|
-
)
|
|
143
|
-
</script>
|
|
144
|
-
|
|
145
|
-
<style lang="scss" scoped>
|
|
146
|
-
@import './index';
|
|
147
|
-
</style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|