@tplc/business 0.2.22 → 0.2.24
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 +33 -0
- package/components/lcb-action-view/lcb-action-view.vue +23 -12
- package/components/lcb-action-view/types.ts +60 -41
- package/constants.ts +2 -0
- package/package.json +1 -1
- package/types/components/lcb-action-view/lcb-action-view.vue.d.ts +1 -1
- package/types/components/lcb-action-view/types.d.ts +58 -41
- package/types/constants.d.ts +2 -0
- package/types/index.d.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
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.24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.23...v0.2.24) (2024-12-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* action-view 新增锚点类型 ([a34dc9f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a34dc9f31a526ceb4c6b52a43e51f2e72fa91f6d))
|
|
11
|
+
|
|
12
|
+
### [0.2.23](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.17...v0.2.23) (2024-12-16)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
16
|
+
|
|
17
|
+
* banner-block 兼容小程序 ([aa79283](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/aa79283f24e97ca68d8ad7fd18863b05dc5c9e26))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
21
|
+
|
|
22
|
+
* **release:** 0.2.18 ([c4cc997](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c4cc997bad57984a73337fe84d09a2bfbddaa03b))
|
|
23
|
+
* **release:** 0.2.19 ([8244906](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/82449068dc7466bdb4c881254f150af4b4721d1e))
|
|
24
|
+
* **release:** 0.2.20 ([40b1730](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/40b1730473b764d84e3259235fd3ee44b1ed2b54))
|
|
25
|
+
* **release:** 0.2.21 ([736c482](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/736c482a6827a75606eec8774c9f6b31daa0f096))
|
|
26
|
+
* **release:** 0.2.22 ([230f4dd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/230f4dd925a132878a2601b2bd239e23b7a4b806))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### ✨ Features | 新功能
|
|
30
|
+
|
|
31
|
+
* action-view pop ([3695f0b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3695f0be2d1bfb025822be3190c96bb9cb71ea05))
|
|
32
|
+
* search 调整查询模式 ([7fa381d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7fa381daab8935c27005615ddc15252ec01f8399))
|
|
33
|
+
* 引擎支持list ([012e9cb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/012e9cbf03cff9a434fd6f9adbb4aa6b7f88d8f4))
|
|
34
|
+
* 新增action地图查看 ([b1b4a51](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b1b4a5159c431dd8b8a4518ce6699e34f393c206))
|
|
35
|
+
* 自定义组件支持变量 ([237bc85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/237bc85163905f4a9d776e14027c53392cb0b3df))
|
|
36
|
+
* 调整action样式 ([04ed49d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/04ed49dd37e2db636f2a2dd02064bd869f0bb550))
|
|
37
|
+
|
|
5
38
|
### [0.2.22](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.21...v0.2.22) (2024-12-14)
|
|
6
39
|
|
|
7
40
|
|
|
@@ -34,10 +34,12 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script setup lang="ts">
|
|
37
|
-
import { computed, ref } from 'vue'
|
|
37
|
+
import { computed, inject, Ref, ref } from 'vue'
|
|
38
38
|
import { LcbActionViewProps } from './types'
|
|
39
39
|
import { uploadFile } from '../../hooks/useUpload'
|
|
40
40
|
import mpHtml from 'mp-html/src/uni-app/components/mp-html/mp-html.vue'
|
|
41
|
+
import { PAGE_ANCHOR_PROVIDE_KEY } from '../../constants'
|
|
42
|
+
import { $lcb } from 'index'
|
|
41
43
|
defineOptions({
|
|
42
44
|
name: 'LcbActionView',
|
|
43
45
|
options: {
|
|
@@ -51,9 +53,12 @@ const emits = defineEmits<{
|
|
|
51
53
|
(e: 'phone', value: { detail: { errMsg: string; encryptedData: string; iv: string } }): void
|
|
52
54
|
(e: 'avatar', value: string): void
|
|
53
55
|
(e: 'click', value: void): void
|
|
56
|
+
(e: 'refresh', value: void): void
|
|
54
57
|
}>()
|
|
55
58
|
|
|
56
59
|
const show = ref(false)
|
|
60
|
+
// 锚点
|
|
61
|
+
const anchor = inject(PAGE_ANCHOR_PROVIDE_KEY) as Ref<string>
|
|
57
62
|
|
|
58
63
|
const openType = computed(() => {
|
|
59
64
|
return {
|
|
@@ -65,8 +70,8 @@ const openType = computed(() => {
|
|
|
65
70
|
104: 'openSetting',
|
|
66
71
|
}[props.jumpType || '']
|
|
67
72
|
})
|
|
68
|
-
const onActionClick = () => {
|
|
69
|
-
const {
|
|
73
|
+
const onActionClick = async () => {
|
|
74
|
+
const { jumpUrl: url, jumpType } = props
|
|
70
75
|
/**
|
|
71
76
|
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
72
77
|
* 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
@@ -90,18 +95,18 @@ const onActionClick = () => {
|
|
|
90
95
|
break
|
|
91
96
|
/** 跳转小程序 */
|
|
92
97
|
case 10:
|
|
93
|
-
if (url && jumpAppid) {
|
|
98
|
+
if (url && props.jumpAppid) {
|
|
94
99
|
uni.navigateToMiniProgram({
|
|
95
|
-
appId: jumpAppid,
|
|
100
|
+
appId: props.jumpAppid,
|
|
96
101
|
path: url,
|
|
97
102
|
})
|
|
98
103
|
}
|
|
99
104
|
break
|
|
100
105
|
/** 跳转半屏小程序 */
|
|
101
106
|
case 11:
|
|
102
|
-
if (url && jumpAppid) {
|
|
107
|
+
if (url && props.jumpAppid) {
|
|
103
108
|
uni.openEmbeddedMiniProgram({
|
|
104
|
-
appId: jumpAppid,
|
|
109
|
+
appId: props.jumpAppid,
|
|
105
110
|
path: url,
|
|
106
111
|
})
|
|
107
112
|
}
|
|
@@ -113,6 +118,14 @@ const onActionClick = () => {
|
|
|
113
118
|
case 14:
|
|
114
119
|
show.value = true
|
|
115
120
|
break
|
|
121
|
+
/** 锚点跳转 */
|
|
122
|
+
case 16:
|
|
123
|
+
if (url) anchor.value = url
|
|
124
|
+
break
|
|
125
|
+
case 17:
|
|
126
|
+
await $lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
|
|
127
|
+
emits('refresh')
|
|
128
|
+
break
|
|
116
129
|
/** 新窗口跳到页面 */
|
|
117
130
|
case 21:
|
|
118
131
|
if (url) {
|
|
@@ -155,15 +168,13 @@ const onActionClick = () => {
|
|
|
155
168
|
break
|
|
156
169
|
/** 拨打电话 */
|
|
157
170
|
case 30:
|
|
158
|
-
if (phoneNumber)
|
|
171
|
+
if (props.phoneNumber)
|
|
159
172
|
uni.makePhoneCall({
|
|
160
|
-
phoneNumber,
|
|
173
|
+
phoneNumber: props.phoneNumber,
|
|
161
174
|
})
|
|
162
175
|
break
|
|
163
176
|
case 105:
|
|
164
|
-
|
|
165
|
-
uni.openLocation(addressInfo)
|
|
166
|
-
}
|
|
177
|
+
uni.openLocation(props.addressInfo)
|
|
167
178
|
break
|
|
168
179
|
default:
|
|
169
180
|
emits('click')
|
|
@@ -1,43 +1,62 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
4
|
-
* 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
5
|
-
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
|
|
6
|
-
*/
|
|
7
|
-
jumpType?:
|
|
8
|
-
| 1
|
|
9
|
-
| 2
|
|
10
|
-
| 10
|
|
11
|
-
| 11
|
|
12
|
-
| 12
|
|
13
|
-
| 13
|
|
14
|
-
| 14
|
|
15
|
-
| 21
|
|
16
|
-
| 22
|
|
17
|
-
| 23
|
|
18
|
-
| 24
|
|
19
|
-
| 25
|
|
20
|
-
| 26
|
|
21
|
-
| 30
|
|
22
|
-
| 88
|
|
23
|
-
| 101
|
|
24
|
-
| 102
|
|
25
|
-
| 103
|
|
26
|
-
| 104
|
|
27
|
-
| 105
|
|
1
|
+
export type LcbActionViewProps = {
|
|
28
2
|
/** 跳转路径 */
|
|
29
3
|
jumpUrl?: string
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
} & (
|
|
5
|
+
| {
|
|
6
|
+
/**
|
|
7
|
+
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
8
|
+
* 13: 退出登录 14: 小程序弹框 16: 小程序锚点 17 网络请求 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
9
|
+
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
|
|
10
|
+
*/
|
|
11
|
+
jumpType?:
|
|
12
|
+
| 1
|
|
13
|
+
| 2
|
|
14
|
+
| 10
|
|
15
|
+
| 11
|
|
16
|
+
| 12
|
|
17
|
+
| 13
|
|
18
|
+
| 14
|
|
19
|
+
| 16
|
|
20
|
+
| 21
|
|
21
|
+
| 22
|
|
22
|
+
| 23
|
|
23
|
+
| 24
|
|
24
|
+
| 25
|
|
25
|
+
| 26
|
|
26
|
+
| 30
|
|
27
|
+
| 88
|
|
28
|
+
| 101
|
|
29
|
+
| 102
|
|
30
|
+
| 103
|
|
31
|
+
| 104
|
|
32
|
+
|
|
33
|
+
/** 小程序appid */
|
|
34
|
+
jumpAppid?: string
|
|
35
|
+
/** 手机号 */
|
|
36
|
+
phoneNumber?: string
|
|
37
|
+
customClass?: string
|
|
38
|
+
/** 弹窗文案 */
|
|
39
|
+
content?: string
|
|
40
|
+
/** 弹窗标题 */
|
|
41
|
+
title?: string
|
|
42
|
+
/** 弹窗位置 */
|
|
43
|
+
position?: string
|
|
44
|
+
/** 查看地图信息 */
|
|
45
|
+
}
|
|
46
|
+
| {
|
|
47
|
+
jumpType: 17
|
|
48
|
+
requestInfo: {
|
|
49
|
+
requestUrl: string
|
|
50
|
+
requestParams: Record<string, any>
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
| {
|
|
54
|
+
jumpType: 105
|
|
55
|
+
addressInfo: {
|
|
56
|
+
address: string
|
|
57
|
+
latitude: number
|
|
58
|
+
longitude: number
|
|
59
|
+
name: string
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
)
|
package/constants.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,43 +1,60 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
4
|
-
* 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
5
|
-
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
|
|
6
|
-
*/
|
|
7
|
-
jumpType?:
|
|
8
|
-
| 1
|
|
9
|
-
| 2
|
|
10
|
-
| 10
|
|
11
|
-
| 11
|
|
12
|
-
| 12
|
|
13
|
-
| 13
|
|
14
|
-
| 14
|
|
15
|
-
| 21
|
|
16
|
-
| 22
|
|
17
|
-
| 23
|
|
18
|
-
| 24
|
|
19
|
-
| 25
|
|
20
|
-
| 26
|
|
21
|
-
| 30
|
|
22
|
-
| 88
|
|
23
|
-
| 101
|
|
24
|
-
| 102
|
|
25
|
-
| 103
|
|
26
|
-
| 104
|
|
27
|
-
| 105
|
|
1
|
+
export type LcbActionViewProps = {
|
|
28
2
|
/** 跳转路径 */
|
|
29
3
|
jumpUrl?: string
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
} & (
|
|
5
|
+
| {
|
|
6
|
+
/**
|
|
7
|
+
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
8
|
+
* 13: 退出登录 14: 小程序弹框 16: 小程序锚点 17 网络请求 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
9
|
+
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
|
|
10
|
+
*/
|
|
11
|
+
jumpType?:
|
|
12
|
+
| 1
|
|
13
|
+
| 2
|
|
14
|
+
| 10
|
|
15
|
+
| 11
|
|
16
|
+
| 12
|
|
17
|
+
| 13
|
|
18
|
+
| 14
|
|
19
|
+
| 16
|
|
20
|
+
| 21
|
|
21
|
+
| 22
|
|
22
|
+
| 23
|
|
23
|
+
| 24
|
|
24
|
+
| 25
|
|
25
|
+
| 26
|
|
26
|
+
| 30
|
|
27
|
+
| 88
|
|
28
|
+
| 101
|
|
29
|
+
| 102
|
|
30
|
+
| 103
|
|
31
|
+
| 104
|
|
32
|
+
/** 小程序appid */
|
|
33
|
+
jumpAppid?: string
|
|
34
|
+
/** 手机号 */
|
|
35
|
+
phoneNumber?: string
|
|
36
|
+
customClass?: string
|
|
37
|
+
/** 弹窗文案 */
|
|
38
|
+
content?: string
|
|
39
|
+
/** 弹窗标题 */
|
|
40
|
+
title?: string
|
|
41
|
+
/** 弹窗位置 */
|
|
42
|
+
position?: string
|
|
43
|
+
}
|
|
44
|
+
| {
|
|
45
|
+
jumpType: 17
|
|
46
|
+
requestInfo: {
|
|
47
|
+
requestUrl: string
|
|
48
|
+
requestParams: Record<string, any>
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
| {
|
|
52
|
+
jumpType: 105
|
|
53
|
+
addressInfo: {
|
|
54
|
+
address: string
|
|
55
|
+
latitude: number
|
|
56
|
+
longitude: number
|
|
57
|
+
name: string
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
)
|
package/types/constants.d.ts
CHANGED