@tplc/business 0.2.48 → 0.2.49

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 CHANGED
@@ -2,6 +2,15 @@
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.2.49](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.48...v0.2.49) (2025-01-01)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 修复问题 ([2c67644](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2c67644cc03e4f88b8e0f5aac2f8837c9317f7ec))
11
+ * 修复问题 ([1c9f269](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1c9f269c95b79e67abeec8af5b309d765069fd3a))
12
+ * 修改打包方式 ([9580a78](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9580a789d427c2db7e07c493c36f7f03258d1462))
13
+
5
14
  ### [0.2.48](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.47...v0.2.48) (2025-01-01)
6
15
 
7
16
  ### [0.2.47](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.44...v0.2.47) (2025-01-01)
@@ -23,7 +23,13 @@
23
23
  <view class="v-line"></view>
24
24
  <view class="flex-1 flex items-center gap-2">
25
25
  <wd-icon name="search" size="34rpx" color="#999999" />
26
- <view class="text-#999999">{{ placeholder }}</view>
26
+ <input
27
+ class="text-#333"
28
+ :placeholder="placeholder"
29
+ :value="form.keywords"
30
+ @blur="onSearch"
31
+ @submit="onSearch"
32
+ />
27
33
  </view>
28
34
  </view>
29
35
  <lcb-action-view v-bind="link" v-if="link">
@@ -38,7 +44,7 @@ import dayjs from 'dayjs/esm'
38
44
  import useLocation from '../../hooks/useLocation'
39
45
  import { inject, Ref, ref, watch } from 'vue'
40
46
  import { LcbCalendarSearchProps } from './types'
41
- import { ChildHotAddress } from '../lcb-city-select/api'
47
+ import { LcbAddress } from '../lcb-city-select/api'
42
48
  import { FORM_KEY } from '../../constants'
43
49
  defineOptions({
44
50
  name: 'LcbCalendarSearch',
@@ -54,9 +60,12 @@ withDefaults(defineProps<LcbCalendarSearchProps>(), {
54
60
  placeholder: '城市|地点|品牌',
55
61
  icon: 'search',
56
62
  })
57
- const addressCity = ref<ChildHotAddress>()
58
- const form = inject<Ref<Record<string, any>>>(FORM_KEY)
59
- const dayRange = ref([dayjs().valueOf(), dayjs().add(1, 'day').valueOf()])
63
+ const addressCity = ref<LcbAddress>()
64
+ const form = inject(FORM_KEY) as Ref<Record<string, any>>
65
+ const dayRange = ref([
66
+ form.value.startDate ? dayjs(form.value.startDate).valueOf() : dayjs().valueOf(),
67
+ form.value.endDate ? dayjs(form.value.endDate).valueOf() : dayjs().add(1, 'day').valueOf(),
68
+ ])
60
69
  const { translate } = useTranslate()
61
70
  const { getLocation, userLocation } = useLocation()
62
71
  watch(
@@ -64,7 +73,7 @@ watch(
64
73
  (val) => {
65
74
  form!.value = {
66
75
  ...form!.value,
67
- hotAddressId: val?.hotAddressId,
76
+ cityId: val?.cityId,
68
77
  }
69
78
  },
70
79
  )
@@ -73,12 +82,18 @@ watch(
73
82
  (val) => {
74
83
  form!.value = {
75
84
  ...form!.value,
76
- checkInDate: dayjs(val[0]).format('YYYY-MM-DD'),
77
- checkOutDate: dayjs(val[1]).format('YYYY-MM-DD'),
85
+ startDate: dayjs(val[0]).format('YYYY-MM-DD'),
86
+ endDate: dayjs(val[1]).format('YYYY-MM-DD'),
78
87
  }
79
88
  },
80
89
  )
81
90
  getLocation()
91
+ const onSearch = (e) => {
92
+ form.value = {
93
+ ...form.value,
94
+ keywords: e.detail.value,
95
+ }
96
+ }
82
97
  </script>
83
98
 
84
99
  <style lang="scss" scoped>
@@ -13,6 +13,7 @@ export interface ChildHotAddress {
13
13
  hotAddressId: string
14
14
  lastModifyDate?: string
15
15
  latitude?: string
16
+ cityId: string
16
17
  longitude?: string
17
18
  weightSort: string
18
19
  addressInfo?: string
@@ -25,7 +25,7 @@
25
25
  <view
26
26
  class="address-tag"
27
27
  :class="{
28
- 'current-address': modelValue && modelValue.hotAddressId === city.hotAddressId,
28
+ 'current-address': modelValue && modelValue.cityId === city.cityId,
29
29
  }"
30
30
  v-for="city in item.childHotAddress"
31
31
  :key="city.addr"
@@ -79,7 +79,7 @@ const locationAddress = computed<HotAddress[]>(() => {
79
79
  {
80
80
  addressInfo: props.location.addressInfo,
81
81
  addr: props.location.cityName,
82
- hotAddressId: props.location.cityId,
82
+ cityId: props.location.cityId,
83
83
  },
84
84
  ],
85
85
  },
@@ -112,9 +112,7 @@ const onAddrClick = (city: ChildHotAddress, letter = false) => {
112
112
  return
113
113
  }
114
114
  modelValue.value = city
115
- historyAddress.value = historyAddress.value.filter(
116
- (item) => item.hotAddressId !== city.hotAddressId,
117
- )
115
+ historyAddress.value = historyAddress.value.filter((item) => item.cityId !== city.cityId)
118
116
  if (historyAddress.value.length === 8) {
119
117
  historyAddress.value = [city, ...historyAddress.value.slice(0, 7)]
120
118
  } else {
@@ -129,7 +127,7 @@ const indexBars = computed<HotAddress[]>(() => {
129
127
  childHotAddress: letterList.value.map((v) => {
130
128
  return {
131
129
  addr: v,
132
- hotAddressId: v,
130
+ cityId: v,
133
131
  }
134
132
  }),
135
133
  },
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view class="p-3 box-border h-full overflow-y-auto">
3
- <view v-for="item in list" :key="item.hotAddressId" @click="onItemClick(item)">
3
+ <view v-for="item in list" :key="item.cityId" @click="onItemClick(item)">
4
4
  <view class="flex">
5
5
  <view class="tag">{{ item.categoryName }}</view>
6
6
  <view class="content">
@@ -18,7 +18,7 @@
18
18
  <view class="flex gap-2 flex-wrap">
19
19
  <view
20
20
  v-for="item in historyList"
21
- :key="item.hotAddressId"
21
+ :key="item.cityId"
22
22
  @click="emits('click', item)"
23
23
  class="history-tag"
24
24
  >
@@ -58,9 +58,9 @@ const getText = (text: string) => {
58
58
  return `<div class="flex">${str}</div>`
59
59
  }
60
60
  const onItemClick = (item: LcbAddress) => {
61
- if (historyList.value.some((historyItem) => historyItem.hotAddressId === item.hotAddressId)) {
61
+ if (historyList.value.some((historyItem) => historyItem.cityId === item.cityId)) {
62
62
  historyList.value = historyList.value.filter(
63
- (historyItem) => historyItem.hotAddressId !== item.hotAddressId,
63
+ (historyItem) => historyItem.cityId !== item.cityId,
64
64
  )
65
65
  }
66
66
  historyList.value.unshift(item)
@@ -111,7 +111,7 @@ watch(
111
111
  modelValue.value = {
112
112
  addressInfo: val.addressInfo,
113
113
  addr: val.cityName,
114
- hotAddressId: val.cityId,
114
+ cityId: val.cityId,
115
115
  } as ChildHotAddress
116
116
  }
117
117
  },
@@ -84,7 +84,7 @@ watch(
84
84
  layoutType="vertical"
85
85
  className="!h-full"
86
86
  :coverImgStyle="{
87
- height: imageHeight ?? `${imageHeightPercent}%`,
87
+ height: `${imageHeightPercent}%`,
88
88
  ...(attrs?.coverImgStyle ?? {}),
89
89
  }"
90
90
  ></lcb-product-item>
@@ -63,7 +63,7 @@ const style = computed(() => {
63
63
  const color = itemAttrs?.[`${props?.prop}Color`]
64
64
 
65
65
  return {
66
- fontSize,
66
+ fontSize: fontSize ? `${fontSize}rpx` : '',
67
67
  fontWeight,
68
68
  color,
69
69
  ...style,
package/constants.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const FORM_KEY = 'form'
1
+ export const FORM_KEY = 'page_form'
2
2
  /** 页面信息 */
3
3
  export const PAGE_PROVIDE_KEY = 'page_provide'
4
4
  /** 页面类型 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -12,6 +12,7 @@ export interface ChildHotAddress {
12
12
  hotAddressId: string
13
13
  lastModifyDate?: string
14
14
  latitude?: string
15
+ cityId: string
15
16
  longitude?: string
16
17
  weightSort: string
17
18
  addressInfo?: string
@@ -1,4 +1,4 @@
1
- export declare const FORM_KEY = 'form'
1
+ export declare const FORM_KEY = 'page_form'
2
2
  /** 页面信息 */
3
3
  export declare const PAGE_PROVIDE_KEY = 'page_provide'
4
4
  /** 页面类型 */