@tplc/business 0.7.5 → 0.7.7

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.7.7](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.6...v0.7.7) (2025-12-13)
6
+
7
+ ### [0.7.6](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.5...v0.7.6) (2025-12-13)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * 兼容版本 ([4d19c5b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/4d19c5b41796d2ba3335b5c792008a4642503d1d))
13
+
5
14
  ### [0.7.5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.89...v0.7.5) (2025-12-13)
6
15
 
7
16
 
@@ -151,7 +151,9 @@ watch(
151
151
  watch(
152
152
  () => modelValue.value,
153
153
  () => {
154
- uni.$emit('lcb-city-select-change', modelValue.value)
154
+ if (modelValue.value && Object.keys(modelValue.value).length > 0) {
155
+ uni.$emit('lcb-city-select-change', modelValue.value)
156
+ }
155
157
  },
156
158
  {
157
159
  immediate: true,
@@ -43,7 +43,7 @@ const props = withDefaults(defineProps<AddressCommunityProps>(), {
43
43
  popupWidth: 240,
44
44
  switchType: 'address',
45
45
  })
46
- type Merchant = { merchantName: string; pageDecorationId: string }
46
+ type Merchant = { merchantName: string; pageDecorationId: string; merchantId: string }
47
47
  const value = defineModel<string>('')
48
48
  const constantsStore = uni.$lcb.constantsStore?.()
49
49
  const title = ref<string>('')
@@ -51,8 +51,9 @@ const merchantList = ref<Merchant[]>([])
51
51
  const options = computed(() => {
52
52
  return props.switchType === 'merchant'
53
53
  ? (merchantList.value || []).map((item) => ({
54
+ ...item,
54
55
  addressName: item.merchantName,
55
- addressId: item.pageDecorationId,
56
+ addressId: item.merchantId,
56
57
  }))
57
58
  : constantsStore?.mainConfig?.addressList
58
59
  })
@@ -72,6 +73,18 @@ watch(
72
73
  deep: true,
73
74
  },
74
75
  )
76
+ const getMerchantList = async () => {
77
+ const { data } = await uni.$lcb.http.post('/merchant/page', {
78
+ pageSearch: {
79
+ limit: 1000,
80
+ page: 1,
81
+ },
82
+ pageDecorationFlag: true,
83
+ })
84
+ merchantList.value = data as Merchant[]
85
+ title.value = merchantList.value[0].merchantName
86
+ value.value = merchantList.value[0].merchantId
87
+ }
75
88
  watch(
76
89
  () => props.switchType,
77
90
  (switchType) => {
@@ -89,7 +102,7 @@ const handleChange = (e: any) => {
89
102
  if (props.switchType === 'merchant') {
90
103
  // 刷新当前页面
91
104
  uni.$emit('refreshSchemaPage', {
92
- pageDecorationId: e.selectedItem.addressId,
105
+ pageDecorationId: e.selectedItem.pageDecorationId,
93
106
  pageId: getCurrentPage().pageId,
94
107
  })
95
108
  } else {
@@ -116,15 +129,6 @@ const containerStyle = computed(() => {
116
129
  [props.mode === 'normal' ? 'max-width' : 'width']: `${props.width}rpx`,
117
130
  }
118
131
  })
119
- const getMerchantList = async () => {
120
- const { data } = await uni.$lcb.http.post('/merchant/page', {
121
- pageSearch: {
122
- limit: 1000,
123
- page: 1,
124
- },
125
- })
126
- merchantList.value = data as Merchant[]
127
- }
128
132
  </script>
129
133
 
130
134
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,26 +1,17 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
7
7
  "type": "module",
8
- "scripts": {
9
- "pub": "pnpm dts && pnpm publish --no-git-checks",
10
- "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
11
- "release-major": "standard-version --release-as major ",
12
- "release-minor": "standard-version --release-as minor",
13
- "release-patch": "standard-version --release-as patch ",
14
- "generateComponent": "node ./scripts/createComponent.mjs",
15
- "generateGlobalDts": "node ./scripts/generateGlobalDts.mjs"
16
- },
17
8
  "publishConfig": {
18
9
  "access": "public",
19
10
  "registry": "https://registry.npmjs.org/"
20
11
  },
21
12
  "peerDependencies": {
22
- "@tplc/wot": "workspace:*",
23
- "vue": ">=3.2.47"
13
+ "vue": ">=3.2.47",
14
+ "@tplc/wot": "1.0.14"
24
15
  },
25
16
  "engines": {
26
17
  "node": ">=18",
@@ -33,5 +24,14 @@
33
24
  },
34
25
  "devDependencies": {
35
26
  "standard-version": "^9.5.0"
27
+ },
28
+ "scripts": {
29
+ "pub": "pnpm dts && pnpm publish --no-git-checks",
30
+ "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
31
+ "release-major": "standard-version --release-as major ",
32
+ "release-minor": "standard-version --release-as minor",
33
+ "release-patch": "standard-version --release-as patch ",
34
+ "generateComponent": "node ./scripts/createComponent.mjs",
35
+ "generateGlobalDts": "node ./scripts/generateGlobalDts.mjs"
36
36
  }
37
- }
37
+ }