@tplc/business 0.0.54 → 0.0.55
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 +11 -0
- package/components/lcb-action-view/lcb-action-view.vue +4 -0
- package/components/lcb-banner-block/lcb-banner-block.vue +3 -4
- package/components/lcb-calendar-search/lcb-calendar-search.vue +3 -2
- package/components/lcb-gap/lcb-gap.vue +7 -1
- package/components/lcb-list/components/FilterList/index.vue +14 -17
- package/components/lcb-list/components/FilterList/type.ts +1 -1
- package/components/lcb-list/components/FilterView/index.vue +121 -0
- package/components/lcb-list/components/FilterView/type.ts +8 -0
- package/components/lcb-list/lcb-list.vue +44 -127
- package/components/lcb-list/types.ts +1 -0
- package/components/lcb-nav/lcb-nav.vue +1 -2
- package/iconfonts/index.css +24 -3
- package/package.json +1 -1
- package/types/components/lcb-action-view/lcb-action-view.vue.d.ts +2 -22
- package/types/components/lcb-banner-block/lcb-banner-block.vue.d.ts +0 -9
- package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +5 -3
- package/types/components/lcb-list/components/FilterList/type.d.ts +1 -1
- package/types/components/lcb-list/components/FilterView/index.vue.d.ts +36 -0
- package/types/components/lcb-list/components/FilterView/type.d.ts +7 -0
- package/types/components/lcb-list/lcb-list.vue.d.ts +1 -0
- package/types/components/lcb-list/types.d.ts +1 -0
- package/types/components/lcb-nav/lcb-nav.vue.d.ts +0 -3
- package/types/components/lcb-list/components/FilterList/mockData.d.ts +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.55](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.54...v0.0.55) (2024-11-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 兼容icon ([dce6350](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dce63504062480ec2413f61a18705ab1f56b2253))
|
|
11
|
+
* 兼容no sticky ([f4b44f3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f4b44f39bf8b3f5aacaab4ed8db74bb651c48b80))
|
|
12
|
+
* 兼容引擎 ([ea2de3b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ea2de3bda892b118444db583576bdbaf627e378a))
|
|
13
|
+
* 新增默认click ([2cf168e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2cf168e9a38c58f61d65989ae9ebccd094b71231))
|
|
14
|
+
* 调整手机号策略 ([c17daaa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c17daaa82f485bb68b8e0176934403a8c818de4d))
|
|
15
|
+
|
|
5
16
|
### [0.0.54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.53...v0.0.54) (2024-10-30)
|
|
6
17
|
|
|
7
18
|
### [0.0.53](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.52...v0.0.53) (2024-10-30)
|
|
@@ -27,6 +27,7 @@ const props = defineProps<LcbActionViewProps>()
|
|
|
27
27
|
const emits = defineEmits<{
|
|
28
28
|
(e: 'phone', value: { detail: { errMsg: string; encryptedData: string; iv: string } }): void
|
|
29
29
|
(e: 'avatar', value: string): void
|
|
30
|
+
(e: 'click', value: void): void
|
|
30
31
|
}>()
|
|
31
32
|
|
|
32
33
|
const openType = computed(() => {
|
|
@@ -126,6 +127,9 @@ const onActionClick = () => {
|
|
|
126
127
|
phoneNumber,
|
|
127
128
|
})
|
|
128
129
|
break
|
|
130
|
+
default:
|
|
131
|
+
emits('click')
|
|
132
|
+
break
|
|
129
133
|
}
|
|
130
134
|
}
|
|
131
135
|
const getPhoneNumber = (e) => {
|
|
@@ -13,14 +13,16 @@
|
|
|
13
13
|
</view>
|
|
14
14
|
<scroll-view scroll-x class="w-full whitespace-nowrap pb-24rpx">
|
|
15
15
|
<lcb-action-view v-for="(item, index) in items" :key="index" v-bind="item.link">
|
|
16
|
-
<
|
|
16
|
+
<image
|
|
17
17
|
:src="item.url"
|
|
18
18
|
class="block"
|
|
19
19
|
:style="{
|
|
20
20
|
height: transformValueUnit(height),
|
|
21
21
|
width: transformValueUnit(imgWidth),
|
|
22
22
|
marginRight: transformValueUnit(itemPadding),
|
|
23
|
+
borderRadius: transformValueUnit(imageRadius),
|
|
23
24
|
}"
|
|
25
|
+
mode="aspectFill"
|
|
24
26
|
/>
|
|
25
27
|
</lcb-action-view>
|
|
26
28
|
</scroll-view>
|
|
@@ -59,9 +61,6 @@ defineOptions({
|
|
|
59
61
|
},
|
|
60
62
|
})
|
|
61
63
|
const props = withDefaults(defineProps<LcbBannerListProps>(), {
|
|
62
|
-
radius: 16,
|
|
63
|
-
imageRadius: 0,
|
|
64
|
-
marginHorizontal: 24,
|
|
65
64
|
backgroundColor: '#ffffff',
|
|
66
65
|
})
|
|
67
66
|
const bannerProps = computed(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<lcb-block v-bind="$props" customClass="flex items-center">
|
|
2
|
+
<lcb-block v-bind="$props" customClass="flex items-center !bg-white">
|
|
3
3
|
<view
|
|
4
4
|
class="flex flex-1 text-#333 rounded-16rpx bg-#F5F5F7 h-78rpx flex items-center px-3 text-[28rpx]"
|
|
5
5
|
>
|
|
@@ -46,9 +46,10 @@ defineOptions({
|
|
|
46
46
|
},
|
|
47
47
|
})
|
|
48
48
|
withDefaults(defineProps<LcbCalendarSearchProps>(), {
|
|
49
|
-
|
|
49
|
+
paddingHorizontal: 24,
|
|
50
50
|
radius: 16,
|
|
51
51
|
placeholder: '城市|地点|品牌',
|
|
52
|
+
icon: 'search',
|
|
52
53
|
})
|
|
53
54
|
const addressCity = ref<ChildHotAddress>()
|
|
54
55
|
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
:safe-area-bottom="safeAreaBottom"
|
|
5
5
|
:bg-color="bgColor"
|
|
6
6
|
:safe-area-top="safeAreaTop"
|
|
7
|
+
:custom-class="cutomClass"
|
|
7
8
|
/>
|
|
8
9
|
</template>
|
|
9
10
|
|
|
10
11
|
<script setup lang="ts">
|
|
11
12
|
import { LcbGapProps } from './types'
|
|
12
13
|
import { transformValueUnit } from '../../utils/transform'
|
|
14
|
+
import { computed } from 'vue'
|
|
13
15
|
defineOptions({
|
|
14
16
|
name: 'LcbGap',
|
|
15
17
|
options: {
|
|
@@ -18,7 +20,11 @@ defineOptions({
|
|
|
18
20
|
styleIsolation: 'shared',
|
|
19
21
|
},
|
|
20
22
|
})
|
|
21
|
-
withDefaults(defineProps<LcbGapProps>(), {})
|
|
23
|
+
const props = withDefaults(defineProps<LcbGapProps>(), {})
|
|
24
|
+
/** 兼容引擎 */
|
|
25
|
+
const cutomClass = computed(() => {
|
|
26
|
+
return props.safeAreaTop ? 'anyTopGap' : ''
|
|
27
|
+
})
|
|
22
28
|
</script>
|
|
23
29
|
|
|
24
30
|
<style lang="scss" scoped></style>
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<view id="pagingTop"></view>
|
|
2
3
|
<z-paging
|
|
3
4
|
ref="paging"
|
|
4
5
|
:empty-view-z-index="0"
|
|
5
6
|
:auto="true"
|
|
6
7
|
v-model="dataList"
|
|
7
8
|
@query="queryList"
|
|
8
|
-
|
|
9
|
+
:fixed="false"
|
|
10
|
+
:use-page-scroll="!autoHeight"
|
|
11
|
+
:height="autoHeight ? height : ''"
|
|
9
12
|
>
|
|
10
13
|
<slot :items="normalizeDataList"></slot>
|
|
11
14
|
</z-paging>
|
|
12
15
|
</template>
|
|
13
16
|
|
|
14
17
|
<script setup lang="ts">
|
|
15
|
-
import { computed, ref, watch
|
|
18
|
+
import { computed, getCurrentInstance, onMounted, ref, watch } from 'vue'
|
|
16
19
|
import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging'
|
|
17
20
|
import { LcbFilterListProps } from './type'
|
|
18
21
|
import { formatJson } from '../../../../utils/utils'
|
|
19
|
-
import
|
|
20
|
-
const attrs = useAttrs()
|
|
22
|
+
import { getRect } from '@tplc/wot/components/common/util'
|
|
21
23
|
|
|
22
24
|
defineOptions({
|
|
23
25
|
name: 'FilterList',
|
|
@@ -30,6 +32,8 @@ defineOptions({
|
|
|
30
32
|
const props = defineProps<LcbFilterListProps>()
|
|
31
33
|
const dataList = ref<unknown[]>([])
|
|
32
34
|
const paging = ref()
|
|
35
|
+
const viewPageHeight = uni.getSystemInfoSync().windowHeight
|
|
36
|
+
const height = ref('')
|
|
33
37
|
useZPaging(paging)
|
|
34
38
|
|
|
35
39
|
const normalizeDataList = computed(() => {
|
|
@@ -39,18 +43,13 @@ const normalizeDataList = computed(() => {
|
|
|
39
43
|
return {
|
|
40
44
|
image: imgArr?.[1] || imgArr?.[0],
|
|
41
45
|
title: item?.productName,
|
|
42
|
-
// subTitle: item?.poiName,
|
|
43
46
|
location: item?.address,
|
|
44
47
|
price: item?.price,
|
|
45
48
|
priceSuffix: item?.behindUnit,
|
|
46
|
-
// originPrice: item?.price,
|
|
47
|
-
// originPriceSuffix: item?.behindUnit,
|
|
48
49
|
...item,
|
|
49
50
|
tags,
|
|
50
51
|
}
|
|
51
52
|
})
|
|
52
|
-
// console.log('list', list)
|
|
53
|
-
|
|
54
53
|
return list
|
|
55
54
|
})
|
|
56
55
|
|
|
@@ -80,7 +79,6 @@ watch(
|
|
|
80
79
|
)
|
|
81
80
|
const queryList = async (page: number, limit: number) => {
|
|
82
81
|
try {
|
|
83
|
-
// const { data } = mockData
|
|
84
82
|
const { data } = await uni.$lcb.http.post(props.url, {
|
|
85
83
|
...props.baseParam,
|
|
86
84
|
...props.filter,
|
|
@@ -94,13 +92,12 @@ const queryList = async (page: number, limit: number) => {
|
|
|
94
92
|
paging.value.complete(false)
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// )
|
|
95
|
+
const { proxy } = getCurrentInstance() as any
|
|
96
|
+
onMounted(() => {
|
|
97
|
+
getRect(`#pagingTop`, false, proxy).then((res) => {
|
|
98
|
+
height.value = viewPageHeight - (res.top || 0) + 'px'
|
|
99
|
+
})
|
|
100
|
+
})
|
|
104
101
|
</script>
|
|
105
102
|
<style lang="scss" scoped>
|
|
106
103
|
.action-view {
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
:class="{
|
|
4
|
+
'lcb-filter__border-top': showPlain ? false : border,
|
|
5
|
+
'lcb-filter__plain': showPlain,
|
|
6
|
+
'lcb-filter__view': !showPlain,
|
|
7
|
+
}"
|
|
8
|
+
class="w-100vw"
|
|
9
|
+
>
|
|
10
|
+
<FilterTabs
|
|
11
|
+
v-model="filter[info?.filterTabs?.valueName]"
|
|
12
|
+
v-bind="info?.filterTabs?.componentProps"
|
|
13
|
+
v-if="info?.filterTabs"
|
|
14
|
+
/>
|
|
15
|
+
<wd-drop-menu>
|
|
16
|
+
<wd-drop-menu-item
|
|
17
|
+
v-for="(item, index) in info?.filterComponent"
|
|
18
|
+
:key="item.valueName"
|
|
19
|
+
:title="titleObj[item.valueName] || item.filterName"
|
|
20
|
+
icon="caret-down-small"
|
|
21
|
+
icon-size="26rpx"
|
|
22
|
+
:selected="getSelect(item)"
|
|
23
|
+
ref="dropMenu"
|
|
24
|
+
@opened="handleOpened"
|
|
25
|
+
>
|
|
26
|
+
<view class="lcb-filter__popup">
|
|
27
|
+
<FilterSelect
|
|
28
|
+
v-if="item.component === 'select'"
|
|
29
|
+
v-bind="item.componentProps"
|
|
30
|
+
v-model="filter[item.valueName]"
|
|
31
|
+
v-model:title="titleObj[item.valueName]"
|
|
32
|
+
@submit="onSubmit(index)"
|
|
33
|
+
/>
|
|
34
|
+
<TreeSelect
|
|
35
|
+
v-else-if="item.component === 'treeSelect'"
|
|
36
|
+
v-bind="item.componentProps"
|
|
37
|
+
v-model="filter[item.valueName]"
|
|
38
|
+
v-model:title="titleObj[item.valueName]"
|
|
39
|
+
@submit="onSubmit(index)"
|
|
40
|
+
/>
|
|
41
|
+
<ComponentGroup
|
|
42
|
+
v-else-if="item.component === 'componentGroup'"
|
|
43
|
+
v-bind="item.componentProps"
|
|
44
|
+
:filter="filter"
|
|
45
|
+
@submit="onSubmit(index, $event)"
|
|
46
|
+
/>
|
|
47
|
+
</view>
|
|
48
|
+
</wd-drop-menu-item>
|
|
49
|
+
</wd-drop-menu>
|
|
50
|
+
<view
|
|
51
|
+
v-if="info?.filterTags || info.btnComponent"
|
|
52
|
+
class="px-3 pb-2 box-border flex items-center"
|
|
53
|
+
:class="{
|
|
54
|
+
'mt-2': showPlain,
|
|
55
|
+
}"
|
|
56
|
+
>
|
|
57
|
+
<view class="flex gap-3.5 flex-1">
|
|
58
|
+
<TagSelect
|
|
59
|
+
v-if="info.filterTags"
|
|
60
|
+
size="small"
|
|
61
|
+
v-bind="info.filterTags.componentProps"
|
|
62
|
+
v-model="filter[info.filterTags.valueName]"
|
|
63
|
+
/>
|
|
64
|
+
</view>
|
|
65
|
+
<wd-button v-if="info?.btnComponent" custom-class="!h-60rpx opacity-primary">
|
|
66
|
+
{{ info?.btnComponent?.postRequest }}
|
|
67
|
+
</wd-button>
|
|
68
|
+
</view>
|
|
69
|
+
</view>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script setup lang="ts">
|
|
73
|
+
import { computed, ref } from 'vue'
|
|
74
|
+
import { FilterComponent } from '../../../lcb-list/api'
|
|
75
|
+
import ComponentGroup from '../ComponentGroup/index.vue'
|
|
76
|
+
import FilterSelect from '../FilterSelect/index.vue'
|
|
77
|
+
import FilterTabs from '../FilterTabs/index.vue'
|
|
78
|
+
import TagSelect from '../TagSelect/index.vue'
|
|
79
|
+
import TreeSelect from '../TreeSelect/index.vue'
|
|
80
|
+
import { FilterViewProps } from './type'
|
|
81
|
+
|
|
82
|
+
defineOptions({
|
|
83
|
+
name: 'FilterView',
|
|
84
|
+
options: {
|
|
85
|
+
addGlobalClass: true,
|
|
86
|
+
virtualHost: true,
|
|
87
|
+
styleIsolation: 'shared',
|
|
88
|
+
},
|
|
89
|
+
})
|
|
90
|
+
const dropMenu = ref()
|
|
91
|
+
const props = defineProps<FilterViewProps>()
|
|
92
|
+
|
|
93
|
+
const filter = defineModel<Record<string, any>>({
|
|
94
|
+
default: {},
|
|
95
|
+
})
|
|
96
|
+
const showPlain = computed(() => {
|
|
97
|
+
return props.styleMode === 'plain' && !props.sticky
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
const onSubmit = (index: number, filterObj?: Record<string, any>) => {
|
|
101
|
+
dropMenu.value?.[index]?.close()
|
|
102
|
+
if (filterObj) {
|
|
103
|
+
filter.value = {
|
|
104
|
+
...filter.value,
|
|
105
|
+
...filterObj,
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const getSelect = (item: FilterComponent) => {
|
|
110
|
+
if (item.component === 'componentGroup') {
|
|
111
|
+
return item.componentProps.componentList?.some((v) => filter.value[v.valueName])
|
|
112
|
+
} else {
|
|
113
|
+
return Boolean(filter.value[item.valueName])
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const handleOpened = () => {
|
|
118
|
+
uni.$emit('drop-opened')
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,77 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<wd-sticky @sticky="sticky = $event" :offset-top="0.0001">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
<FilterTabs
|
|
13
|
-
v-model="filter[info?.filterTabs?.valueName]"
|
|
14
|
-
v-bind="info?.filterTabs?.componentProps"
|
|
15
|
-
v-if="info?.filterTabs"
|
|
16
|
-
/>
|
|
17
|
-
<wd-drop-menu>
|
|
18
|
-
<wd-drop-menu-item
|
|
19
|
-
v-for="(item, index) in info?.filterComponent"
|
|
20
|
-
:key="item.valueName"
|
|
21
|
-
:title="titleObj[item.valueName] || item.filterName"
|
|
22
|
-
icon="caret-down-small"
|
|
23
|
-
icon-size="26rpx"
|
|
24
|
-
:selected="getSelect(item)"
|
|
25
|
-
ref="dropMenu"
|
|
26
|
-
@opened="handleOpened"
|
|
27
|
-
>
|
|
28
|
-
<view class="lcb-filter__popup">
|
|
29
|
-
<FilterSelect
|
|
30
|
-
v-if="item.component === 'select'"
|
|
31
|
-
v-bind="item.componentProps"
|
|
32
|
-
v-model="filter[item.valueName]"
|
|
33
|
-
v-model:title="titleObj[item.valueName]"
|
|
34
|
-
@submit="onSubmit(index)"
|
|
35
|
-
/>
|
|
36
|
-
<TreeSelect
|
|
37
|
-
v-else-if="item.component === 'treeSelect'"
|
|
38
|
-
v-bind="item.componentProps"
|
|
39
|
-
v-model="filter[item.valueName]"
|
|
40
|
-
v-model:title="titleObj[item.valueName]"
|
|
41
|
-
@submit="onSubmit(index)"
|
|
42
|
-
/>
|
|
43
|
-
<ComponentGroup
|
|
44
|
-
v-else-if="item.component === 'componentGroup'"
|
|
45
|
-
v-bind="item.componentProps"
|
|
46
|
-
:filter="filter"
|
|
47
|
-
@submit="onSubmit(index, $event)"
|
|
48
|
-
/>
|
|
49
|
-
</view>
|
|
50
|
-
</wd-drop-menu-item>
|
|
51
|
-
</wd-drop-menu>
|
|
52
|
-
<view
|
|
53
|
-
v-if="info?.filterTags || info.btnComponent"
|
|
54
|
-
class="px-3 pb-2 box-border flex items-center"
|
|
55
|
-
:class="{
|
|
56
|
-
'mt-2': showPlain,
|
|
57
|
-
}"
|
|
58
|
-
>
|
|
59
|
-
<view class="flex gap-3.5 flex-1">
|
|
60
|
-
<TagSelect
|
|
61
|
-
v-if="info.filterTags"
|
|
62
|
-
size="small"
|
|
63
|
-
v-bind="info.filterTags.componentProps"
|
|
64
|
-
v-model="filter[info.filterTags.valueName]"
|
|
65
|
-
/>
|
|
66
|
-
</view>
|
|
67
|
-
<wd-button v-if="info.btnComponent" custom-class="!h-60rpx opacity-primary">
|
|
68
|
-
{{ info.btnComponent?.postRequest }}
|
|
69
|
-
</wd-button>
|
|
70
|
-
</view>
|
|
71
|
-
</view>
|
|
2
|
+
<template v-if="info">
|
|
3
|
+
<wd-sticky @sticky="sticky = $event" :offset-top="0.0001" v-if="isSticky">
|
|
4
|
+
<FilterView
|
|
5
|
+
v-bind="$props"
|
|
6
|
+
:info="info"
|
|
7
|
+
v-model="filter"
|
|
8
|
+
:titleObj="titleObj"
|
|
9
|
+
:sticky="sticky"
|
|
10
|
+
/>
|
|
72
11
|
</wd-sticky>
|
|
12
|
+
<FilterView
|
|
13
|
+
v-else
|
|
14
|
+
v-bind="$props"
|
|
15
|
+
:info="info"
|
|
16
|
+
v-model="filter"
|
|
17
|
+
:titleObj="titleObj"
|
|
18
|
+
:sticky="sticky"
|
|
19
|
+
/>
|
|
73
20
|
|
|
74
|
-
<FilterList v-bind="{ ...info.listInfo, listType, filter, ...attrs }">
|
|
21
|
+
<FilterList v-bind="{ ...info.listInfo, listType, filter, ...attrs }" :autoHeight="!isSticky">
|
|
75
22
|
<template #default="{ items }">
|
|
76
23
|
<slot name="list" :items="items">
|
|
77
24
|
<lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items" v-if="$slots.item">
|
|
@@ -88,24 +35,21 @@
|
|
|
88
35
|
</slot>
|
|
89
36
|
</template>
|
|
90
37
|
</FilterList>
|
|
91
|
-
</
|
|
38
|
+
</template>
|
|
92
39
|
</template>
|
|
93
40
|
|
|
94
41
|
<script setup lang="ts">
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import { FilterComponent, getFilterDetail, LcbFilterResult } from './api'
|
|
98
|
-
import FilterSelect from './components/FilterSelect/index.vue'
|
|
99
|
-
import TreeSelect from './components/TreeSelect/index.vue'
|
|
100
|
-
import ComponentGroup from './components/ComponentGroup/index.vue'
|
|
101
|
-
import TagSelect from './components/TagSelect/index.vue'
|
|
42
|
+
import { inject, Ref, ref, useAttrs, watch } from 'vue'
|
|
43
|
+
import { getFilterDetail, LcbFilterResult } from './api'
|
|
102
44
|
import FilterList from './components/FilterList/index.vue'
|
|
103
|
-
import
|
|
45
|
+
import FilterView from './components/FilterView/index.vue'
|
|
46
|
+
import { LcbListProps } from './types'
|
|
104
47
|
|
|
105
|
-
import './index.scss'
|
|
106
48
|
import { FORM_KEY } from '../../constants'
|
|
49
|
+
import './index.scss'
|
|
107
50
|
const attrs = useAttrs()
|
|
108
|
-
|
|
51
|
+
/** 是否悬停 */
|
|
52
|
+
const sticky = ref(false)
|
|
109
53
|
defineOptions({
|
|
110
54
|
name: 'LcbList',
|
|
111
55
|
options: {
|
|
@@ -114,13 +58,15 @@ defineOptions({
|
|
|
114
58
|
styleIsolation: 'shared',
|
|
115
59
|
},
|
|
116
60
|
})
|
|
61
|
+
const titleObj = ref<Record<string, any>>({})
|
|
117
62
|
const form = inject<Ref<Record<string, any>>>(FORM_KEY)
|
|
118
|
-
const
|
|
63
|
+
const filter = ref<Record<string, any>>({})
|
|
119
64
|
const props = withDefaults(defineProps<LcbListProps>(), {
|
|
120
65
|
pageFilterType: 'hotelTravelFilter',
|
|
121
66
|
border: true,
|
|
122
67
|
styleMode: 'default',
|
|
123
68
|
listType: 'list',
|
|
69
|
+
isSticky: true,
|
|
124
70
|
// @ts-ignore
|
|
125
71
|
pageListProps: () => ({
|
|
126
72
|
productProps: {
|
|
@@ -129,14 +75,21 @@ const props = withDefaults(defineProps<LcbListProps>(), {
|
|
|
129
75
|
}),
|
|
130
76
|
} as LcbListProps as any)
|
|
131
77
|
const info = ref<LcbFilterResult>()
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
78
|
+
watch(
|
|
79
|
+
() => filter.value,
|
|
80
|
+
async (val) => {
|
|
81
|
+
if (form && Object.keys(val).length) {
|
|
82
|
+
form.value = {
|
|
83
|
+
...form.value,
|
|
84
|
+
...val,
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
immediate: true,
|
|
90
|
+
deep: true,
|
|
91
|
+
},
|
|
92
|
+
)
|
|
140
93
|
watch(
|
|
141
94
|
() => props.pageFilterType,
|
|
142
95
|
async (val) => {
|
|
@@ -166,42 +119,6 @@ watch(
|
|
|
166
119
|
immediate: true,
|
|
167
120
|
},
|
|
168
121
|
)
|
|
169
|
-
const onSubmit = (index: number, filterObj?: Record<string, any>) => {
|
|
170
|
-
dropMenu.value?.[index]?.close()
|
|
171
|
-
if (filterObj) {
|
|
172
|
-
filter.value = {
|
|
173
|
-
...filter.value,
|
|
174
|
-
...filterObj,
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
const getSelect = (item: FilterComponent) => {
|
|
179
|
-
if (item.component === 'componentGroup') {
|
|
180
|
-
return item.componentProps.componentList?.some((v) => filter.value[v.valueName])
|
|
181
|
-
} else {
|
|
182
|
-
return Boolean(filter.value[item.valueName])
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
const handleOpened = () => {
|
|
186
|
-
uni.$emit('drop-opened')
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
watch(
|
|
190
|
-
() => filter.value,
|
|
191
|
-
async (val) => {
|
|
192
|
-
if (form && Object.keys(val).length) {
|
|
193
|
-
form.value = {
|
|
194
|
-
...form.value,
|
|
195
|
-
...val,
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
immediate: true,
|
|
201
|
-
deep: true,
|
|
202
|
-
},
|
|
203
|
-
)
|
|
204
|
-
|
|
205
122
|
defineSlots<{
|
|
206
123
|
list(props: { items: any }): any
|
|
207
124
|
item(props: { item: any }): any
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="customNavigation"
|
|
4
4
|
:class="{
|
|
5
5
|
immersiveTop: topStyle === 2,
|
|
6
|
-
fixed,
|
|
6
|
+
fixed: topStyle === 1,
|
|
7
7
|
}"
|
|
8
8
|
:style="{
|
|
9
9
|
paddingTop,
|
|
@@ -114,7 +114,6 @@ const props = withDefaults(defineProps<NavProps>(), {
|
|
|
114
114
|
backColor: '#ffffff',
|
|
115
115
|
contentColor: '#000000',
|
|
116
116
|
logoImg: '',
|
|
117
|
-
fixed: false,
|
|
118
117
|
back: false,
|
|
119
118
|
capsuleMode: 'light',
|
|
120
119
|
immersionMode: 1,
|
package/iconfonts/index.css
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
|
1
2
|
@font-face {
|
|
2
3
|
font-family: 'lcb'; /* Project id 4710234 */
|
|
3
4
|
src:
|
|
4
|
-
url('//at.alicdn.com/t/c/
|
|
5
|
-
url('//at.alicdn.com/t/c/
|
|
6
|
-
url('//at.alicdn.com/t/c/
|
|
5
|
+
url('//at.alicdn.com/t/c/font_4710234_15ayvpii3yk.woff2?t=1730440551449') format('woff2'),
|
|
6
|
+
url('//at.alicdn.com/t/c/font_4710234_15ayvpii3yk.woff?t=1730440551449') format('woff'),
|
|
7
|
+
url('//at.alicdn.com/t/c/font_4710234_15ayvpii3yk.ttf?t=1730440551449') format('truetype');
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
.lcb {
|
|
@@ -14,6 +15,26 @@
|
|
|
14
15
|
-moz-osx-font-smoothing: grayscale;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
.lcb-a-xingzhuang103:before {
|
|
19
|
+
content: '\e64e';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.lcb-a-xingzhuang97:before {
|
|
23
|
+
content: '\e651';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.lcb-jiaobiao:before {
|
|
27
|
+
content: '\e62c';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.lcb-jianshao:before {
|
|
31
|
+
content: '\e649';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.lcb-zengjia:before {
|
|
35
|
+
content: '\e64a';
|
|
36
|
+
}
|
|
37
|
+
|
|
17
38
|
.lcb-mingpian:before {
|
|
18
39
|
content: '\e654';
|
|
19
40
|
}
|
package/package.json
CHANGED
|
@@ -10,30 +10,10 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
10
10
|
{},
|
|
11
11
|
import('vue').ComponentOptionsMixin,
|
|
12
12
|
import('vue').ComponentOptionsMixin,
|
|
13
|
-
|
|
14
|
-
phone: (value: {
|
|
15
|
-
detail: {
|
|
16
|
-
errMsg: string
|
|
17
|
-
encryptedData: string
|
|
18
|
-
iv: string
|
|
19
|
-
}
|
|
20
|
-
}) => void
|
|
21
|
-
avatar: (value: string) => void
|
|
22
|
-
},
|
|
13
|
+
any,
|
|
23
14
|
string,
|
|
24
15
|
import('vue').PublicProps,
|
|
25
|
-
|
|
26
|
-
onPhone?:
|
|
27
|
-
| ((value: {
|
|
28
|
-
detail: {
|
|
29
|
-
errMsg: string
|
|
30
|
-
encryptedData: string
|
|
31
|
-
iv: string
|
|
32
|
-
}
|
|
33
|
-
}) => any)
|
|
34
|
-
| undefined
|
|
35
|
-
onAvatar?: ((value: string) => any) | undefined
|
|
36
|
-
},
|
|
16
|
+
any,
|
|
37
17
|
{},
|
|
38
18
|
{}
|
|
39
19
|
>
|
|
@@ -3,9 +3,6 @@ declare const _default: import('vue').DefineComponent<
|
|
|
3
3
|
__VLS_WithDefaults<
|
|
4
4
|
__VLS_TypePropsToOption<LcbBannerListProps>,
|
|
5
5
|
{
|
|
6
|
-
radius: number
|
|
7
|
-
imageRadius: number
|
|
8
|
-
marginHorizontal: number
|
|
9
6
|
backgroundColor: string
|
|
10
7
|
}
|
|
11
8
|
>,
|
|
@@ -23,18 +20,12 @@ declare const _default: import('vue').DefineComponent<
|
|
|
23
20
|
__VLS_WithDefaults<
|
|
24
21
|
__VLS_TypePropsToOption<LcbBannerListProps>,
|
|
25
22
|
{
|
|
26
|
-
radius: number
|
|
27
|
-
imageRadius: number
|
|
28
|
-
marginHorizontal: number
|
|
29
23
|
backgroundColor: string
|
|
30
24
|
}
|
|
31
25
|
>
|
|
32
26
|
>
|
|
33
27
|
>,
|
|
34
28
|
{
|
|
35
|
-
imageRadius: number
|
|
36
|
-
radius: number
|
|
37
|
-
marginHorizontal: number
|
|
38
29
|
backgroundColor: string
|
|
39
30
|
},
|
|
40
31
|
{}
|
|
@@ -3,9 +3,10 @@ declare const _default: import('vue').DefineComponent<
|
|
|
3
3
|
__VLS_WithDefaults<
|
|
4
4
|
__VLS_TypePropsToOption<LcbCalendarSearchProps>,
|
|
5
5
|
{
|
|
6
|
-
|
|
6
|
+
paddingHorizontal: number
|
|
7
7
|
radius: number
|
|
8
8
|
placeholder: string
|
|
9
|
+
icon: string
|
|
9
10
|
}
|
|
10
11
|
>,
|
|
11
12
|
{},
|
|
@@ -22,9 +23,10 @@ declare const _default: import('vue').DefineComponent<
|
|
|
22
23
|
__VLS_WithDefaults<
|
|
23
24
|
__VLS_TypePropsToOption<LcbCalendarSearchProps>,
|
|
24
25
|
{
|
|
25
|
-
|
|
26
|
+
paddingHorizontal: number
|
|
26
27
|
radius: number
|
|
27
28
|
placeholder: string
|
|
29
|
+
icon: string
|
|
28
30
|
}
|
|
29
31
|
>
|
|
30
32
|
>
|
|
@@ -32,7 +34,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
32
34
|
{
|
|
33
35
|
radius: number
|
|
34
36
|
placeholder: string
|
|
35
|
-
|
|
37
|
+
paddingHorizontal: number
|
|
36
38
|
},
|
|
37
39
|
{}
|
|
38
40
|
>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FilterViewProps } from './type'
|
|
2
|
+
declare let __VLS_typeProps: FilterViewProps
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: Record<string, any>
|
|
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: Record<string, any>) => void
|
|
16
|
+
},
|
|
17
|
+
string,
|
|
18
|
+
import('vue').PublicProps,
|
|
19
|
+
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
20
|
+
'onUpdate:modelValue'?: ((modelValue: Record<string, any>) => 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
|
+
}
|
|
@@ -13,7 +13,6 @@ declare const _default: import('vue').DefineComponent<
|
|
|
13
13
|
backColor: string
|
|
14
14
|
contentColor: string
|
|
15
15
|
logoImg: string
|
|
16
|
-
fixed: boolean
|
|
17
16
|
back: boolean
|
|
18
17
|
capsuleMode: string
|
|
19
18
|
immersionMode: number
|
|
@@ -43,7 +42,6 @@ declare const _default: import('vue').DefineComponent<
|
|
|
43
42
|
backColor: string
|
|
44
43
|
contentColor: string
|
|
45
44
|
logoImg: string
|
|
46
|
-
fixed: boolean
|
|
47
45
|
back: boolean
|
|
48
46
|
capsuleMode: string
|
|
49
47
|
immersionMode: number
|
|
@@ -53,7 +51,6 @@ declare const _default: import('vue').DefineComponent<
|
|
|
53
51
|
>,
|
|
54
52
|
{
|
|
55
53
|
title: string
|
|
56
|
-
fixed: boolean
|
|
57
54
|
styleGroup: 1 | 2 | 3 | 4
|
|
58
55
|
back: boolean
|
|
59
56
|
topStyle: 1 | 2
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
code: string
|
|
3
|
-
count: number
|
|
4
|
-
data: {
|
|
5
|
-
address: string
|
|
6
|
-
agentId: string
|
|
7
|
-
areaId: string
|
|
8
|
-
areaName: string
|
|
9
|
-
auditDateTime: string
|
|
10
|
-
auditRemark: string
|
|
11
|
-
auditStatus: number
|
|
12
|
-
behindUnit: string
|
|
13
|
-
bigIcon: boolean
|
|
14
|
-
businessStatus: number
|
|
15
|
-
cityAreaName: string
|
|
16
|
-
cityId: string
|
|
17
|
-
cityName: string
|
|
18
|
-
clickCount: number
|
|
19
|
-
collectCount: number
|
|
20
|
-
collectFlag: boolean
|
|
21
|
-
commentCount: number
|
|
22
|
-
coverImg: string
|
|
23
|
-
createDate: string
|
|
24
|
-
distance: string
|
|
25
|
-
hideTags: string
|
|
26
|
-
hierarchy: number
|
|
27
|
-
lastModifyDate: string
|
|
28
|
-
latitude: string
|
|
29
|
-
level: string
|
|
30
|
-
longitude: string
|
|
31
|
-
mapShowFlag: boolean
|
|
32
|
-
marketingType: number
|
|
33
|
-
merchantHeadId: string
|
|
34
|
-
merchantId: string
|
|
35
|
-
orderCount: number
|
|
36
|
-
orderSkuCount: number
|
|
37
|
-
peopleNumScope: string
|
|
38
|
-
phone: string
|
|
39
|
-
poiId: string
|
|
40
|
-
poiName: string
|
|
41
|
-
poiNameI18n: string
|
|
42
|
-
poiType: string
|
|
43
|
-
praiseCount: number
|
|
44
|
-
praiseFlag: boolean
|
|
45
|
-
price: number
|
|
46
|
-
productId: string
|
|
47
|
-
productName: string
|
|
48
|
-
productNameI18n: string
|
|
49
|
-
productType: string
|
|
50
|
-
provinceId: string
|
|
51
|
-
provinceName: string
|
|
52
|
-
scribePrice: number
|
|
53
|
-
showDateFlag: boolean
|
|
54
|
-
startDateStr: string
|
|
55
|
-
startTime: string
|
|
56
|
-
status: number
|
|
57
|
-
tags: string
|
|
58
|
-
weightSort: string
|
|
59
|
-
}[]
|
|
60
|
-
dataClass: string
|
|
61
|
-
traceId: string
|
|
62
|
-
}
|
|
63
|
-
export default _default
|