@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.
Files changed (94) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/components/lcb-area-picker/api/index.ts +45 -0
  3. package/components/lcb-area-picker/lcb-area-picker.vue +77 -0
  4. package/components/lcb-area-picker/types.ts +3 -0
  5. package/components/lcb-banner-block/lcb-banner-block.vue +2 -2
  6. package/components/lcb-calendar/lcb-calendar.vue +3 -3
  7. package/components/lcb-calendar-search/lcb-calendar-search.vue +5 -2
  8. package/components/lcb-city-select/api/index.ts +15 -1
  9. package/components/lcb-city-select/components/lcb-city-letter/index.vue +171 -0
  10. package/components/lcb-city-select/components/lcb-city-list/index.vue +127 -0
  11. package/components/lcb-city-select/components/lcb-city-list/types.ts +6 -0
  12. package/components/lcb-city-select/images/hot.png +0 -0
  13. package/components/lcb-city-select/lcb-city-select.vue +95 -118
  14. package/components/lcb-dynamic-data/lcb-dynamic-data.vue +25 -0
  15. package/components/lcb-dynamic-data/types.ts +7 -0
  16. package/components/lcb-home-search/lcb-home-search.vue +16 -7
  17. package/components/lcb-image/lcb-image.vue +35 -23
  18. package/components/lcb-image/types.ts +1 -1
  19. package/components/lcb-img-nav/lcb-img-nav.vue +70 -30
  20. package/components/lcb-img-nav/types.ts +3 -3
  21. package/components/{lcb-filter → lcb-list}/api.ts +20 -9
  22. package/components/{lcb-filter → lcb-list}/components/ComponentGroup/index.vue +1 -1
  23. package/components/lcb-list/components/FilterList/index.vue +85 -0
  24. package/components/lcb-list/components/FilterList/type.ts +9 -0
  25. package/components/{lcb-filter → lcb-list}/components/FilterSlider/index.vue +2 -1
  26. package/components/lcb-list/components/FilterSlider/types.ts +3 -0
  27. package/components/lcb-list/components/FilterTabs/index.vue +27 -0
  28. package/components/lcb-list/components/FilterTabs/type.ts +6 -0
  29. package/components/{lcb-filter → lcb-list}/index.scss +23 -0
  30. package/components/lcb-list/lcb-list.vue +179 -0
  31. package/components/{lcb-filter → lcb-list}/types.ts +6 -1
  32. package/components/lcb-nav/lcb-nav.vue +10 -22
  33. package/components/lcb-notice/Item/index.vue +4 -4
  34. package/components/lcb-notice/lcb-notice.vue +10 -8
  35. package/components/lcb-notice/types.ts +4 -1
  36. package/components/lcb-product/lcb-product.vue +7 -7
  37. package/components/lcb-product/types.ts +3 -3
  38. package/components/lcb-product-item/lcb-product-item.vue +24 -12
  39. package/components/lcb-user-order/lcb-user-order.vue +44 -23
  40. package/components/lcb-user-top/lcb-user-top.vue +77 -48
  41. package/global.d.ts +3 -1
  42. package/hooks/usePageScroll.ts +10 -0
  43. package/iconfonts/index.css +1 -175
  44. package/package.json +5 -2
  45. package/types/components/lcb-area-picker/api/index.d.ts +38 -0
  46. package/types/components/lcb-area-picker/lcb-area-picker.vue.d.ts +67 -0
  47. package/types/components/lcb-area-picker/types.d.ts +1 -0
  48. package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +1 -1
  49. package/types/components/lcb-city-select/api/index.d.ts +14 -1
  50. package/types/components/lcb-city-select/components/lcb-city-letter/index.vue.d.ts +53 -0
  51. package/types/components/{lcb-filter/lcb-filter.vue.d.ts → lcb-city-select/components/lcb-city-list/index.vue.d.ts} +9 -18
  52. package/types/components/lcb-city-select/components/lcb-city-list/types.d.ts +5 -0
  53. package/types/components/lcb-city-select/lcb-city-select.vue.d.ts +13 -4
  54. package/types/components/lcb-dynamic-data/lcb-dynamic-data.vue.d.ts +44 -0
  55. package/types/components/lcb-dynamic-data/types.d.ts +7 -0
  56. package/types/components/lcb-home-search/lcb-home-search.vue.d.ts +1 -1
  57. package/types/components/lcb-image/lcb-image.vue.d.ts +1 -1
  58. package/types/components/lcb-img-nav/types.d.ts +2 -2
  59. package/types/components/{lcb-filter → lcb-list}/api.d.ts +18 -7
  60. package/types/components/lcb-list/components/FilterList/index.vue.d.ts +28 -0
  61. package/types/components/lcb-list/components/FilterList/type.d.ts +9 -0
  62. package/types/components/lcb-list/components/FilterSlider/types.d.ts +2 -0
  63. package/types/components/lcb-list/components/FilterTabs/index.vue.d.ts +36 -0
  64. package/types/components/lcb-list/components/FilterTabs/type.d.ts +5 -0
  65. package/types/components/lcb-list/lcb-list.vue.d.ts +74 -0
  66. package/types/components/{lcb-filter → lcb-list}/types.d.ts +5 -1
  67. package/types/components/lcb-notice/lcb-notice.vue.d.ts +3 -0
  68. package/types/components/lcb-notice/types.d.ts +3 -0
  69. package/types/hooks/usePageScroll.d.ts +2 -0
  70. package/components/lcb-filter/components/FilterSlider/types.ts +0 -3
  71. package/components/lcb-filter/lcb-filter.vue +0 -147
  72. package/types/components/lcb-filter/components/FilterSlider/types.d.ts +0 -2
  73. /package/components/{lcb-filter → lcb-list}/components/ActionView/index.vue +0 -0
  74. /package/components/{lcb-filter → lcb-list}/components/ComponentGroup/type.ts +0 -0
  75. /package/components/{lcb-filter → lcb-list}/components/FilterSelect/index.vue +0 -0
  76. /package/components/{lcb-filter → lcb-list}/components/FilterSelect/type.ts +0 -0
  77. /package/components/{lcb-filter → lcb-list}/components/SelectTagView/index.vue +0 -0
  78. /package/components/{lcb-filter → lcb-list}/components/TagSelect/index.vue +0 -0
  79. /package/components/{lcb-filter → lcb-list}/components/TagSelect/type.ts +0 -0
  80. /package/components/{lcb-filter → lcb-list}/components/TreeSelect/index.vue +0 -0
  81. /package/components/{lcb-filter → lcb-list}/components/TreeSelect/type.ts +0 -0
  82. /package/components/{lcb-filter → lcb-list}/hooks/useSelect.ts +0 -0
  83. /package/types/components/{lcb-filter → lcb-list}/components/ActionView/index.vue.d.ts +0 -0
  84. /package/types/components/{lcb-filter → lcb-list}/components/ComponentGroup/index.vue.d.ts +0 -0
  85. /package/types/components/{lcb-filter → lcb-list}/components/ComponentGroup/type.d.ts +0 -0
  86. /package/types/components/{lcb-filter → lcb-list}/components/FilterSelect/index.vue.d.ts +0 -0
  87. /package/types/components/{lcb-filter → lcb-list}/components/FilterSelect/type.d.ts +0 -0
  88. /package/types/components/{lcb-filter → lcb-list}/components/FilterSlider/index.vue.d.ts +0 -0
  89. /package/types/components/{lcb-filter → lcb-list}/components/SelectTagView/index.vue.d.ts +0 -0
  90. /package/types/components/{lcb-filter → lcb-list}/components/TagSelect/index.vue.d.ts +0 -0
  91. /package/types/components/{lcb-filter → lcb-list}/components/TagSelect/type.d.ts +0 -0
  92. /package/types/components/{lcb-filter → lcb-list}/components/TreeSelect/index.vue.d.ts +0 -0
  93. /package/types/components/{lcb-filter → lcb-list}/components/TreeSelect/type.d.ts +0 -0
  94. /package/types/components/{lcb-filter → lcb-list}/hooks/useSelect.d.ts +0 -0
@@ -5,47 +5,50 @@
5
5
  <wd-popup
6
6
  v-model="show"
7
7
  position="bottom"
8
+ @after-enter="isOver = true"
9
+ custom-class="lcb-city__p"
8
10
  custom-style="height: 90vh;border-top-left-radius: 24rpx;border-top-right-radius: 24rpx;"
9
11
  :safe-area-inset-bottom="true"
10
12
  >
11
13
  <view class="flex flex-col h-full">
12
- <wd-search hide-cancel :placeholder="placeholder" />
13
- <view class="h-0 flex-1" v-if="addressRef.length > 0">
14
- <wd-index-bar>
15
- <view
16
- v-for="item in [...locationAddress, ...historyList, ...addressRef]"
17
- :key="item.categoryName"
18
- >
19
- <wd-index-anchor
20
- :index="item.categoryName"
21
- :hint="item.hint"
22
- customClass="!bg-transparent !pb-0 font-bold !text-28rpx !pl-4"
23
- />
24
- <view class="grid grid-cols-4 gap-3 py-3 pl-4 pr-10 box-border">
25
- <view
26
- class="address-tag"
27
- :class="{
28
- 'current-address':
29
- currentAddress && currentAddress.hotAddressId === city.hotAddressId,
30
- }"
31
- v-for="city in item.childHotAddress"
32
- :key="city.addr"
33
- @click="onAddrClick(city)"
34
- >
35
- {{ city.addr }}
36
- </view>
37
- </view>
38
- </view>
39
- </wd-index-bar>
14
+ <view class="top-search">
15
+ <view class="text-28rpx text-#333 text-center mt-28rpx mb-2 font-500">选择所在地区</view>
16
+ <wd-icon
17
+ custom-class="absolute top-0 right-0 mt-28rpx mr-5"
18
+ name="close-circle"
19
+ @click="show = false"
20
+ size="40rpx"
21
+ color="#999"
22
+ />
23
+ <wd-search
24
+ :hide-cancel="!showList"
25
+ :placeholder="placeholder"
26
+ placeholder-left
27
+ v-model="searchValue"
28
+ @focus="onFocus"
29
+ @cancel="onCancel"
30
+ />
40
31
  </view>
32
+ <lcb-city-list
33
+ v-show="showList"
34
+ :list="lcbAddress"
35
+ :keyword="searchValue"
36
+ @click="onAddressClick"
37
+ />
38
+
39
+ <lcb-city-letter v-show="!showList && isOver" v-bind="$props" v-model="modelValue" />
41
40
  </view>
42
41
  </wd-popup>
43
42
  </template>
44
43
 
45
44
  <script setup lang="ts">
46
- import { computed, onMounted, ref, watch } from 'vue'
47
- import { ChildHotAddress, getHotAddress, HotAddress } from './api'
45
+ import { ref, watch } from 'vue'
46
+ import { ChildHotAddress, getAddressList, LcbAddress } from './api'
47
+ import LcbCityLetter from './components/lcb-city-letter/index.vue'
48
+ import LcbCityList from './components/lcb-city-list/index.vue'
48
49
  import { LcbCitySelectProps } from './types'
50
+ import { debounce } from '@tplc/wot/components/common/util'
51
+ import qs from 'qs'
49
52
  defineOptions({
50
53
  name: 'LcbCitySelect',
51
54
  options: {
@@ -57,56 +60,43 @@ defineOptions({
57
60
  const props = withDefaults(defineProps<LcbCitySelectProps>(), {
58
61
  placeholder: '搜索城市/区域/景点',
59
62
  })
60
- const addressRef = ref<HotAddress[]>([])
61
- const historyAddress = ref<ChildHotAddress[]>([])
62
- const currentAddress = ref<ChildHotAddress | undefined>(
63
- props.location
64
- ? ({
65
- addressInfo: props.location.addressInfo,
66
- addr: props.location.cityName,
67
- hotAddressId: props.location.cityId,
68
- } as ChildHotAddress)
69
- : undefined,
70
- )
63
+ const modelValue = defineModel<ChildHotAddress>()
64
+ const isOver = ref(false)
65
+ const searchValue = ref('')
71
66
  const show = ref(false)
72
- onMounted(async () => {
73
- const { data } = await getHotAddress()
74
- addressRef.value = data
75
- })
76
- const locationAddress = computed<HotAddress[]>(() => {
77
- return props.location
78
- ? ([
79
- {
80
- categoryName: '定位',
81
- hint: '当前定位',
82
- childHotAddress: [
83
- {
84
- addressInfo: props.location.addressInfo,
85
- addr: props.location.cityName,
86
- hotAddressId: props.location.cityId,
87
- },
88
- ],
89
- },
90
- ] as HotAddress[])
91
- : []
92
- })
67
+ const lcbAddress = ref<LcbAddress[]>([])
68
+ const showList = ref(false)
93
69
 
94
- const historyList = computed<HotAddress[]>(() => {
95
- return historyAddress.value.length
96
- ? [
97
- {
98
- categoryName: '历史',
99
- hint: '历史记录',
100
- childHotAddress: historyAddress.value,
101
- },
102
- ]
103
- : []
104
- })
70
+ const onFocus = () => {
71
+ showList.value = true
72
+ }
73
+
74
+ const onCancel = () => {
75
+ showList.value = false
76
+ searchValue.value = ''
77
+ lcbAddress.value = []
78
+ }
79
+
80
+ const onAddressClick = (item: LcbAddress) => {
81
+ if (item.addrFlag) {
82
+ modelValue.value = item as ChildHotAddress
83
+ } else {
84
+ uni.navigateTo({
85
+ url: `/pages/residentialHotel/index?${qs.stringify(item)}`,
86
+ })
87
+ }
88
+ onCancel()
89
+ show.value = false
90
+ }
105
91
  watch(
106
- () => show.value,
92
+ () => props.location,
107
93
  (val) => {
108
- if (val) {
109
- historyAddress.value = JSON.parse(uni.getStorageSync('historyAddress') || '[]')
94
+ if (val && !modelValue.value) {
95
+ modelValue.value = {
96
+ addressInfo: val.addressInfo,
97
+ addr: val.cityName,
98
+ hotAddressId: val.cityId,
99
+ } as ChildHotAddress
110
100
  }
111
101
  },
112
102
  {
@@ -115,54 +105,41 @@ watch(
115
105
  )
116
106
 
117
107
  watch(
118
- () => historyAddress.value,
108
+ () => modelValue.value,
109
+ () => {
110
+ show.value = false
111
+ },
112
+ )
113
+
114
+ watch(
115
+ () => show.value,
119
116
  (val) => {
120
- if (val.length) {
121
- uni.setStorageSync('historyAddress', JSON.stringify(val))
117
+ if (!val) {
118
+ onCancel()
122
119
  }
123
120
  },
124
121
  )
125
- const onAddrClick = (city: ChildHotAddress) => {
126
- currentAddress.value = city
127
- show.value = false
128
- historyAddress.value = historyAddress.value.filter(
129
- (item) => item.hotAddressId !== city.hotAddressId,
130
- )
131
- if (historyAddress.value.length === 8) {
132
- historyAddress.value = [city, ...historyAddress.value.slice(0, 7)]
133
- } else {
134
- historyAddress.value = [city, ...historyAddress.value]
135
- }
136
- }
122
+
123
+ watch(
124
+ () => searchValue.value,
125
+ () => {
126
+ if (!searchValue.value) {
127
+ lcbAddress.value = []
128
+ return
129
+ }
130
+ search()
131
+ },
132
+ )
133
+
134
+ const search = debounce(async () => {
135
+ const { data } = await getAddressList(searchValue.value)
136
+ lcbAddress.value = data
137
+ }, 200)
137
138
  </script>
138
139
 
139
140
  <style lang="scss" scoped>
140
- @import '@tplc/wot/components/common/abstracts/variable';
141
- .address-tag {
142
- background: #f7f7f7;
143
- height: 80rpx;
144
- display: flex;
145
- align-items: center;
146
- justify-content: center;
147
- padding: 0 16rpx;
148
- border-radius: 10rpx;
149
- font-size: 24rpx;
150
- text-align: center;
151
- overflow: hidden;
152
- }
153
- .current-address {
154
- color: $-color-theme;
155
- position: relative;
156
- &::after {
157
- content: '';
158
- position: absolute;
159
- bottom: 0;
160
- left: 0;
161
- width: 100%;
162
- height: 100%;
163
- z-index: 1;
164
- background: $-color-theme;
165
- opacity: 0.15;
166
- }
141
+ .top-search {
142
+ background: #ffffff;
143
+ box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(243, 245, 249, 0.94);
167
144
  }
168
145
  </style>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <lcb-block v-bind="$props">
3
+ <view class="flex">
4
+ <view v-for="item in items" :key="item.title">
5
+ <view>{{ item.unit }} {{ item.key }}</view>
6
+ <view>{{ item.title }}</view>
7
+ </view>
8
+ </view>
9
+ </lcb-block>
10
+ </template>
11
+
12
+ <script setup lang="ts">
13
+ import { LcbDynamicDataProps } from './types'
14
+ defineOptions({
15
+ name: 'LcbDynamicData',
16
+ options: {
17
+ addGlobalClass: true,
18
+ virtualHost: true,
19
+ styleIsolation: 'shared',
20
+ },
21
+ })
22
+ withDefaults(defineProps<LcbDynamicDataProps>(), {})
23
+ </script>
24
+
25
+ <style lang="scss" scoped></style>
@@ -0,0 +1,7 @@
1
+ export interface LcbDynamicDataProps {
2
+ items: {
3
+ title: string
4
+ unit?: string
5
+ key?: string
6
+ }[]
7
+ }
@@ -17,12 +17,19 @@
17
17
  </view>
18
18
  <view class="box-border px-3 leading-none">
19
19
  <view class="flex items-center justify-center mt-3 text-#333 gap-16rpx">
20
- <view class="text-30rpx font-bold">义乌</view>
21
- <img
22
- class="w-30rpx h-30rpx"
23
- mode="aspectFit"
24
- src="https://ddll-lycs.oss-cn-hangzhou.aliyuncs.com/default/1/20240914164446/%E5%BD%A2%E7%8A%B6%2092%402x.png"
25
- />
20
+ <lcb-city-select :location="userLocation" v-model="addressCity">
21
+ <view class="flex items-center gap-16rpx">
22
+ <view class="text-30rpx font-bold max-w-13 truncate">
23
+ {{ addressCity?.addr || '附近' }}
24
+ </view>
25
+ <img
26
+ class="w-30rpx h-30rpx"
27
+ mode="aspectFit"
28
+ src="https://ddll-lycs.oss-cn-hangzhou.aliyuncs.com/default/1/20240914164446/%E5%BD%A2%E7%8A%B6%2092%402x.png"
29
+ />
30
+ </view>
31
+ </lcb-city-select>
32
+
26
33
  <view class="h-42rpx w-1px bg-#F1F1F1"></view>
27
34
  <view class="text-#999 text-28rpx">{{ placeholder }}</view>
28
35
  <view class="flex-1"></view>
@@ -78,9 +85,11 @@ import { LcbHomeSearch } from './types'
78
85
  import dayjs from 'dayjs/esm'
79
86
  import useLocation from '../../hooks/useLocation'
80
87
  import { useTranslate } from '@tplc/wot'
88
+ import { ChildHotAddress } from '../lcb-city-select/api'
81
89
  const dayRange = ref([dayjs().valueOf(), dayjs().add(1, 'day').valueOf()])
82
90
  const { translate } = useTranslate()
83
- const { getLocation, locationIng } = useLocation()
91
+ const { getLocation, userLocation, locationIng } = useLocation()
92
+ const addressCity = ref<ChildHotAddress>()
84
93
  getLocation()
85
94
  const nightCount = computed(() => {
86
95
  return dayjs(dayRange.value[1]).diff(dayRange.value[0], 'day')
@@ -1,18 +1,27 @@
1
1
  <template>
2
+ <view
3
+ v-if="!items?.length"
4
+ class="flex justify-center items-center bg-light color-gray overflow-hidden"
5
+ :style="{
6
+ height: transformValueUnit(400),
7
+ borderRadius: transformValueUnit(imageRadius),
8
+ marginTop: transformValueUnit(-(floatUp || 0)),
9
+ }"
10
+ >
11
+ <wd-icon name="image" size="50px"></wd-icon>
12
+ </view>
2
13
 
3
- <view v-if="!items?.length" class="flex justify-center items-center bg-light color-gray overflow-hidden" :style="{
4
- height: transformValueUnit(400),
5
- borderRadius: transformValueUnit(imageRadius),
6
- marginTop: transformValueUnit(-(floatUp || 0)),
7
- }"><wd-icon name="image" size="50px"></wd-icon></view>
8
-
9
- <view v-if="styleGroup != 3" :class="styleGroup == 2 ? 'flex' : ''" :style="{
10
- marginLeft: transformValueUnit(marginHorizontal),
11
- marginRight: transformValueUnit(marginHorizontal),
12
- marginTop: transformValueUnit(-(floatUp || 0)),
13
- // marginTop: transformValueUnit(marginTop),
14
- // marginBottom: transformValueUnit(marginBottom),
15
- }">
14
+ <view
15
+ v-if="styleGroup != 3"
16
+ :class="styleGroup == 2 ? 'flex' : ''"
17
+ :style="{
18
+ marginLeft: transformValueUnit(marginHorizontal),
19
+ marginRight: transformValueUnit(marginHorizontal),
20
+ marginTop: transformValueUnit(-(floatUp || 0)),
21
+ // marginTop: transformValueUnit(marginTop),
22
+ // marginBottom: transformValueUnit(marginBottom),
23
+ }"
24
+ >
16
25
  <!-- <view v-for="(item, index) in items" :key="index" :class="styleGroup == 2 ? 'flex-1 relative' : 'relative'" :style="{
17
26
  marginTop: transformValueUnit(styleGroup == 1 && index > 0 ? imageMargin : 0),
18
27
  marginLeft: transformValueUnit(styleGroup == 2 && index > 0 ? imageMargin : 0),
@@ -32,24 +41,28 @@
32
41
  <Image v-bind="imageProps" />
33
42
  </view>
34
43
 
35
- <scroll-view v-if="styleGroup == 3" scroll-x class="w-full whitespace-nowrap" :style="{
36
- marginLeft: transformValueUnit(marginHorizontal),
37
- marginRight: transformValueUnit(marginHorizontal),
38
- marginTop: transformValueUnit(-(floatUp || 0)),
39
- // marginTop: transformValueUnit(marginTop),
40
- // marginBottom: transformValueUnit(marginBottom),
41
- }">
44
+ <scroll-view
45
+ v-if="styleGroup == 3"
46
+ scroll-x
47
+ class="w-full whitespace-nowrap"
48
+ :style="{
49
+ marginLeft: transformValueUnit(marginHorizontal),
50
+ marginRight: transformValueUnit(marginHorizontal),
51
+ marginTop: transformValueUnit(-(floatUp || 0)),
52
+ // marginTop: transformValueUnit(marginTop),
53
+ // marginBottom: transformValueUnit(marginBottom),
54
+ }"
55
+ >
42
56
  <view class="flex shrink-0">
43
57
  <Image v-bind="imageProps" />
44
58
  </view>
45
59
  </scroll-view>
46
60
 
47
61
  <!-- <view class="pl-20px pr-20px break-all">{{ JSON.stringify(iconItems) }}</view> -->
48
-
49
62
  </template>
50
63
 
51
64
  <script setup lang="ts">
52
- import { computed } from 'vue';
65
+ import { computed } from 'vue'
53
66
  import { transformValueUnit } from '../../utils/transform'
54
67
  import Image from './Image/index.vue'
55
68
  import { LcbImageProps } from './types'
@@ -86,7 +99,6 @@ const imageProps = computed(() => {
86
99
  // console.log('props.items', props.items)
87
100
  // return props.items;
88
101
  // })
89
-
90
102
  </script>
91
103
 
92
104
  <style lang="scss" scoped></style>
@@ -2,7 +2,7 @@ import { ActionView } from 'action'
2
2
  export interface LcbImageProps {
3
3
  // Define the component's prop types here
4
4
  items?: Partial<ActionView>[]
5
- styleGroup?: number //1 纵向 2 横向 3 横向滚动
5
+ styleGroup?: number // 1 纵向 2 横向 3 横向滚动
6
6
 
7
7
  imageRadius?: number
8
8
  itemPadding?: number
@@ -1,33 +1,61 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props">
3
- <lcb-title v-if="showTitle" v-bind="{
4
- title,
5
- marginHorizontal: 0,
6
- paddingHorizontal: titlePadding,
7
- paddingBottom: 25,
8
- fontSize,
9
- fontWeight,
10
- color,
11
- }" />
12
- <view :style="{
13
- gridTemplateColumns: `repeat(${pictureDistribution}, minmax(0, 1fr))`,
14
- }" :class="[styleGroup === 2 ? 'mutil' : 'single']">
15
- <lcb-action-view v-for="item in items" :key="item.title" v-bind="item.link"
16
- custom-class="!flex flex-col justify-center items-center">
17
- <view class="overflow-hidden" :style="{
18
- marginBottom: iconTextMargin + 'rpx',
19
- }">
20
- <!-- <div v-if="iconType === 0" class="flex justify-center items-center"> -->
21
- <wd-icon v-if="iconType === 0" class-prefix="iconfont" :name="item.icon!" :size="iconSize + 'rpx'"
22
- :color="iconColor" />
23
- <!-- </div> -->
24
- <img v-else class="block" :style="{
25
- borderRadius: iconRadius + 'rpx',
26
- height: iconSize + 'rpx',
27
- width: iconSize + 'rpx',
28
- }" :src="item.url" />
3
+ <lcb-title
4
+ v-if="showTitle"
5
+ v-bind="{
6
+ title,
7
+ marginHorizontal: 0,
8
+ paddingHorizontal: titlePadding,
9
+ paddingBottom: 25,
10
+ fontSize,
11
+ fontWeight,
12
+ color,
13
+ }"
14
+ />
15
+ <view
16
+ :style="{
17
+ gridTemplateColumns: `repeat(${pictureDistribution}, minmax(0, 1fr))`,
18
+ }"
19
+ :class="[
20
+ {
21
+ 1: 'single',
22
+ 2: 'mutil',
23
+ 3: 'cell',
24
+ }[styleGroup!],
25
+ ]"
26
+ >
27
+ <lcb-action-view
28
+ v-for="item in items"
29
+ :key="item.title"
30
+ v-bind="item.link"
31
+ custom-class="!flex flex-col justify-center items-center item"
32
+ >
33
+ <view
34
+ class="overflow-hidden"
35
+ :style="{
36
+ marginBottom: iconTextMargin + 'rpx',
37
+ }"
38
+ >
39
+ <wd-icon
40
+ v-if="iconType === 0"
41
+ class-prefix="lcb"
42
+ :name="item.icon!"
43
+ :size="iconSize + 'rpx'"
44
+ :color="iconColor"
45
+ />
46
+ <img
47
+ v-else
48
+ class="block"
49
+ :style="{
50
+ borderRadius: iconRadius + 'rpx',
51
+ height: iconSize + 'rpx',
52
+ width: iconSize + 'rpx',
53
+ }"
54
+ :src="item.url"
55
+ />
29
56
  </view>
30
57
  <view class="title">{{ item.title }}</view>
58
+ <wd-icon v-if="styleGroup === 3" name="chevron-right" size="22"></wd-icon>
31
59
  </lcb-action-view>
32
60
  </view>
33
61
  </lcb-block>
@@ -65,7 +93,7 @@ withDefaults(defineProps<LcbImgNavProps>(), {
65
93
  overflow-x: auto;
66
94
  white-space: nowrap;
67
95
 
68
- >view {
96
+ > view {
69
97
  display: inline-flex;
70
98
  }
71
99
  }
@@ -74,12 +102,24 @@ withDefaults(defineProps<LcbImgNavProps>(), {
74
102
  display: grid;
75
103
  row-gap: 36rpx;
76
104
  }
77
-
105
+ .cell {
106
+ display: flex;
107
+ flex-direction: column;
108
+ gap: 40rpx;
109
+ .item {
110
+ flex-direction: row;
111
+ }
112
+ .title {
113
+ flex: 1;
114
+ text-align: start;
115
+ margin-left: 24rpx;
116
+ }
117
+ }
78
118
  .title {
79
119
  width: 68px;
80
120
  overflow: hidden;
81
- font-size: 24rpx;
82
- line-height: 14px;
121
+ font-size: 28rpx;
122
+ line-height: 1;
83
123
  text-align: center;
84
124
  letter-spacing: 0;
85
125
  white-space: nowrap;
@@ -2,8 +2,8 @@ import { ActionView } from 'action'
2
2
  import { LcbBlockProps } from '../lcb-block/types'
3
3
 
4
4
  export interface LcbImgNavProps extends LcbBlockProps {
5
- /** 模式 1.单行 2.多行 */
6
- styleGroup?: 1 | 2
5
+ /** 模式 1.单行 2.多行 3.cell */
6
+ styleGroup?: 1 | 2 | 3
7
7
  /** 文字颜色 #212121 */
8
8
  textColor?: string
9
9
  /** 背景图片 */
@@ -23,7 +23,7 @@ export interface LcbImgNavProps extends LcbBlockProps {
23
23
  /** 文字与图标距离 */
24
24
  iconTextMargin?: number
25
25
 
26
- //是否显示标题
26
+ // 是否显示标题
27
27
  showTitle?: boolean
28
28
  title?: string
29
29
  fontWeight?: number
@@ -1,20 +1,31 @@
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
 
8
19
  export interface FilterComponent {
9
- fitlerName?: string
20
+ filterName?: string
10
21
  component: string
11
22
  defaultValue?: string
12
23
  defaultName?: string
13
24
  valueName: string
14
- componentProps: ComponentProps3
25
+ componentProps: FilterComponentProps
15
26
  }
16
27
 
17
- interface ComponentProps3 {
28
+ interface FilterComponentProps {
18
29
  mode?: 'multiple' | 'single'
19
30
  apiPath?: string
20
31
  options?: Option[]
@@ -22,11 +33,11 @@ interface ComponentProps3 {
22
33
  }
23
34
 
24
35
  export interface ComponentList {
25
- fitlerName: string
36
+ filterName: string
26
37
  component: string
27
38
  valueName: string
28
39
  defaultValue?: string | string[] | number[]
29
- componentProps: ComponentProps
40
+ componentProps: FilterTagsProps
30
41
  }
31
42
 
32
43
  export interface FilterTags {
@@ -34,10 +45,10 @@ export interface FilterTags {
34
45
  valueName: string
35
46
  defaultValue?: string
36
47
  defaultName?: string
37
- componentProps: ComponentProps
48
+ componentProps: FilterTagsProps
38
49
  }
39
50
 
40
- export interface ComponentProps {
51
+ export interface FilterTagsProps {
41
52
  mode?: 'multiple' | 'single'
42
53
  max: number
43
54
  min: number
@@ -51,6 +62,6 @@ interface BtnComponent {
51
62
  }
52
63
 
53
64
  export const getFilterDetail = (val: string) =>
54
- uni.$lcb.http.post<LcbFilterResult>('/pageDecoration/filter/detail', {
55
- pageFilterType: val,
65
+ uni.$lcb.http.post<LcbFilterResult>('/pageDecoration/list//detail', {
66
+ pageListType: val,
56
67
  })
@@ -2,7 +2,7 @@
2
2
  <view class="px-5 pt-2 pb-4 bg-#fafafa max-h-70vh overflow-y-auto box-border">
3
3
  <view v-for="child in componentList" :key="child.valueName" class="mb-12rpx">
4
4
  <view class="lcb-filter__group-title mt2">
5
- {{ child.fitlerName }}
5
+ {{ child.filterName }}
6
6
  <view v-if="child.componentProps.mode === 'multiple'" class="!text-22rpx">可多选</view>
7
7
  <view v-if="child.component === 'slider'" class="!text-26rpx slider-title">
8
8
  {{