@tplc/business 0.5.7 → 0.5.9
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,27 @@
|
|
|
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.5.9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.8...v0.5.9) (2025-10-10)
|
|
6
|
+
|
|
7
|
+
### [0.5.8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.2...v0.5.8) (2025-10-10)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
11
|
+
|
|
12
|
+
* **release:** 0.5.3 ([57c7130](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/57c7130540071280353fd605b87f6815cc2d89e2))
|
|
13
|
+
* **release:** 0.5.4 ([e26bb51](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e26bb514cdfbce2ec5f90f1f11b9e7a705a75236))
|
|
14
|
+
* **release:** 0.5.5 ([5e54c9a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5e54c9a5d7595feab969bb272c538ab9e81dce0e))
|
|
15
|
+
* **release:** 0.5.6 ([8927745](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8927745805c238149ef478bee1b0e5528e9c9187))
|
|
16
|
+
* **release:** 0.5.7 ([2ffa756](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2ffa75665995fe5ec0df5e36956564f1069be226))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### ✨ Features | 新功能
|
|
20
|
+
|
|
21
|
+
* 支持地址选择 ([2bdb47b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2bdb47bededa3a5b091f4c0d52b2a55219bf9369))
|
|
22
|
+
* 新增pop ([70282d2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/70282d2ce61843f7c81dd686385f38a7a8da1956))
|
|
23
|
+
* 新增组件 ([090ee4f](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/090ee4f5aec2f05922dc12eee7cc1c5ea5906ea9))
|
|
24
|
+
* 调整参数 ([fa298c9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fa298c94d7b34b3374f3d9fa82a22b50ccc8ac6d))
|
|
25
|
+
|
|
5
26
|
### [0.5.7](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.6...v0.5.7) (2025-10-10)
|
|
6
27
|
|
|
7
28
|
### [0.5.6](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.5...v0.5.6) (2025-10-10)
|
package/action.d.ts
CHANGED
|
@@ -27,6 +27,30 @@ export interface DataSource {
|
|
|
27
27
|
/** 动态key */
|
|
28
28
|
dependKey?: string
|
|
29
29
|
}
|
|
30
|
+
export interface AddressCommunity {
|
|
31
|
+
address?: string
|
|
32
|
+
addressId?: string
|
|
33
|
+
addressIntro?: string
|
|
34
|
+
addressName?: string
|
|
35
|
+
addressType?: number
|
|
36
|
+
agentId?: string
|
|
37
|
+
areaId?: string
|
|
38
|
+
categoryName?: string
|
|
39
|
+
cityId?: string
|
|
40
|
+
createDate?: string
|
|
41
|
+
defaultFlag?: boolean
|
|
42
|
+
hotFlag?: boolean
|
|
43
|
+
lastModifyDate?: string
|
|
44
|
+
latitude?: string
|
|
45
|
+
longitude?: string
|
|
46
|
+
merchantHeadId?: string
|
|
47
|
+
merchantId?: string
|
|
48
|
+
openFlag?: boolean
|
|
49
|
+
productWeightSort?: number
|
|
50
|
+
provinceCityAreaType?: number
|
|
51
|
+
provinceId?: string
|
|
52
|
+
weightSort?: number
|
|
53
|
+
}
|
|
30
54
|
export interface LcbGlobal {
|
|
31
55
|
http: {
|
|
32
56
|
get<T>(url: string, query?: Record<string, any> | undefined): Promise<IResData<T>>
|
|
@@ -48,6 +72,9 @@ export interface LcbGlobal {
|
|
|
48
72
|
constantsStore?: () => {
|
|
49
73
|
mainConfig?: Record<string, any>
|
|
50
74
|
otherConfig?: Record<string, any>
|
|
75
|
+
addressId?: string
|
|
76
|
+
setAddressId: (addressId: string) => void
|
|
77
|
+
getAddressId: () => string
|
|
51
78
|
}
|
|
52
79
|
messageStore?: () => {
|
|
53
80
|
messageCount: number
|
|
@@ -18,10 +18,8 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
|
-
import { ref, watch } from 'vue'
|
|
21
|
+
import { computed, ref, watch } from 'vue'
|
|
22
22
|
import { AddressCommunityProps } from '../types'
|
|
23
|
-
import useLocation from '../../../hooks/useLocation'
|
|
24
|
-
import { AddressCommunity } from '../../../utils/addressCommunity'
|
|
25
23
|
defineOptions({
|
|
26
24
|
name: 'AddressCommunity',
|
|
27
25
|
options: {
|
|
@@ -35,38 +33,34 @@ withDefaults(defineProps<AddressCommunityProps>(), {
|
|
|
35
33
|
color: '#000',
|
|
36
34
|
width: 240,
|
|
37
35
|
})
|
|
38
|
-
const { userLocation } = useLocation()
|
|
39
36
|
const value = defineModel<string>('')
|
|
40
37
|
const title = ref<string>('地址社区')
|
|
41
|
-
const options =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
title.value = e.selectedItem.label
|
|
45
|
-
AddressCommunity.setAddressId(e.selectedItem.addressId)
|
|
46
|
-
}
|
|
38
|
+
const options = computed(() => {
|
|
39
|
+
return uni.$lcb.constantsStore?.().mainConfig?.addressList
|
|
40
|
+
})
|
|
47
41
|
watch(
|
|
48
|
-
() =>
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (data.length > 0) {
|
|
54
|
-
const firstItem = data[0]
|
|
55
|
-
title.value = firstItem.label
|
|
56
|
-
value.value = firstItem.addressId
|
|
57
|
-
AddressCommunity.setAddressId(firstItem.addressId)
|
|
58
|
-
}
|
|
42
|
+
() => uni.$lcb.constantsStore?.().mainConfig?.address,
|
|
43
|
+
({ addressId }: { addressId: string }) => {
|
|
44
|
+
if (addressId) {
|
|
45
|
+
title.value = options.value.find((item) => item.addressId === addressId)?.addressName
|
|
46
|
+
value.value = addressId
|
|
59
47
|
}
|
|
60
48
|
},
|
|
61
49
|
{
|
|
62
50
|
immediate: true,
|
|
63
51
|
},
|
|
64
52
|
)
|
|
53
|
+
|
|
54
|
+
const handleChange = (e: any) => {
|
|
55
|
+
title.value = e.selectedItem.label
|
|
56
|
+
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId)
|
|
57
|
+
}
|
|
65
58
|
</script>
|
|
66
59
|
|
|
67
60
|
<style lang="scss" scoped>
|
|
68
61
|
.drop-menu-container {
|
|
69
62
|
margin-right: 24rpx;
|
|
63
|
+
margin-left: -24rpx;
|
|
70
64
|
|
|
71
65
|
:deep(.wd-drop-menu__list) {
|
|
72
66
|
background-color: transparent;
|
|
@@ -24,12 +24,7 @@
|
|
|
24
24
|
}"
|
|
25
25
|
>
|
|
26
26
|
<!-- 左边布局 -->
|
|
27
|
-
<view
|
|
28
|
-
class="navbar-left z-1"
|
|
29
|
-
:style="{
|
|
30
|
-
paddingLeft: showAddressCommunity ? '0rpx' : '24rpx',
|
|
31
|
-
}"
|
|
32
|
-
>
|
|
27
|
+
<view class="navbar-left z-1">
|
|
33
28
|
<AddressCommunity v-if="showAddressCommunity" v-bind="addressCommunityProps" />
|
|
34
29
|
<view
|
|
35
30
|
v-if="(styleGroup === 3 || moreThanTwoPages() || !canBack) && capsuleList.length"
|
|
@@ -197,7 +192,7 @@ const props = withDefaults(defineProps<NavProps>(), {
|
|
|
197
192
|
fontWeight: 500,
|
|
198
193
|
textColor: '#000000',
|
|
199
194
|
keyFromUser: false,
|
|
200
|
-
showAddressCommunity:
|
|
195
|
+
showAddressCommunity: true,
|
|
201
196
|
})
|
|
202
197
|
const navbarBgColor = computed(() => {
|
|
203
198
|
return props.backgroundType === 'color' ? props.backColor : ''
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: weisheng
|
|
3
|
-
* @Date: 2024-01-25 23:06:48
|
|
4
|
-
* @LastEditTime: 2024-03-30 11:30:55
|
|
5
|
-
* @LastEditors: weisheng
|
|
6
|
-
* @Description:
|
|
7
|
-
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/locale/index.ts
|
|
8
|
-
* 记得注释
|
|
9
|
-
*/
|
|
10
|
-
import { ref } from 'vue'
|
|
11
|
-
|
|
12
|
-
const addressCommunity = ref<string>('')
|
|
13
|
-
|
|
14
|
-
export const AddressCommunity = {
|
|
15
|
-
setAddressId(newLang: string) {
|
|
16
|
-
addressCommunity.value = newLang
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
getAddressId() {
|
|
20
|
-
return addressCommunity.value
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const useCurrentAddressCommunity = () => addressCommunity
|
|
25
|
-
|
|
26
|
-
export default AddressCommunity
|