@tplc/business 0.2.43 → 0.2.45
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 +17 -0
- package/action.d.ts +1 -0
- package/components/lcb-action-view/lcb-action-view.vue +5 -8
- package/components/lcb-calendar/lcb-calendar.vue +2 -1
- package/index.ts +4 -0
- package/package.json +2 -2
- package/types/components/lcb-calendar/lcb-calendar.vue.d.ts +2 -0
- package/types/utils/utils.d.ts +1 -0
- package/utils/utils.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
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.45](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.48...v0.2.45) (2024-12-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.1.49 ([6853d70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6853d7041d1858bd302b57275447e407847526e6))
|
|
11
|
+
* **release:** 0.2.44 ([002a105](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/002a1059fc99b8ec685afa03dfe2de972604484a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ✨ Features | 新功能
|
|
15
|
+
|
|
16
|
+
* calendar 支持 open cancel 事件 ([a93093a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a93093ab96b0365986ce0c426b49164ca0064b6e))
|
|
17
|
+
* lcb-calendar 新增confirm 事件回调 ([0b7a090](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0b7a090e4200e299bc3cf6f6d49e0864ee8466b5))
|
|
18
|
+
* 跳转layout策略 ([ba902ef](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ba902effd43a57ff3b0d2da3af4088dea5363a9b))
|
|
19
|
+
|
|
20
|
+
### [0.2.44](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.49...v0.2.44) (2024-12-30)
|
|
21
|
+
|
|
5
22
|
### [0.2.43](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.39...v0.2.43) (2024-12-30)
|
|
6
23
|
|
|
7
24
|
|
package/action.d.ts
CHANGED
|
@@ -34,12 +34,11 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script setup lang="ts">
|
|
37
|
-
import { computed,
|
|
37
|
+
import { computed, 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 {
|
|
42
|
-
import { getFinalUrl } from '../../utils/utils'
|
|
41
|
+
import { getFinalUrl, onPageScrollSelector } from '../../utils/utils'
|
|
43
42
|
defineOptions({
|
|
44
43
|
name: 'LcbActionView',
|
|
45
44
|
options: {
|
|
@@ -57,9 +56,6 @@ const emits = defineEmits<{
|
|
|
57
56
|
}>()
|
|
58
57
|
|
|
59
58
|
const show = ref(false)
|
|
60
|
-
// 锚点
|
|
61
|
-
const anchor = inject(PAGE_ANCHOR_PROVIDE_KEY) as Ref<string>
|
|
62
|
-
|
|
63
59
|
const openType = computed(() => {
|
|
64
60
|
return {
|
|
65
61
|
88: 'getPhoneNumber',
|
|
@@ -78,7 +74,6 @@ const onActionClick = async () => {
|
|
|
78
74
|
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号
|
|
79
75
|
*/
|
|
80
76
|
const url = getFinalUrl(jumpUrl || '', props.urlParams)
|
|
81
|
-
console.log('url', url)
|
|
82
77
|
switch (jumpType) {
|
|
83
78
|
/** 网页 */
|
|
84
79
|
case 1:
|
|
@@ -122,7 +117,9 @@ const onActionClick = async () => {
|
|
|
122
117
|
break
|
|
123
118
|
/** 锚点跳转 */
|
|
124
119
|
case 16:
|
|
125
|
-
if (url)
|
|
120
|
+
if (url) {
|
|
121
|
+
onPageScrollSelector(url)
|
|
122
|
+
}
|
|
126
123
|
break
|
|
127
124
|
case 17:
|
|
128
125
|
if (props.requestInfo)
|
|
@@ -30,7 +30,7 @@ defineOptions({
|
|
|
30
30
|
},
|
|
31
31
|
})
|
|
32
32
|
const holidayInfo = ref<Record<string, LcbHistoryResult>>({})
|
|
33
|
-
const emits = defineEmits(['open', 'cancel'])
|
|
33
|
+
const emits = defineEmits(['open', 'cancel', 'confirm'])
|
|
34
34
|
const props = defineProps({
|
|
35
35
|
customClass: {
|
|
36
36
|
type: String,
|
|
@@ -113,6 +113,7 @@ const formatter = (day: any) => {
|
|
|
113
113
|
}
|
|
114
114
|
const handleConfirm = ({ value }: { value: number[] }) => {
|
|
115
115
|
model.value = value
|
|
116
|
+
emits('confirm', value)
|
|
116
117
|
}
|
|
117
118
|
</script>
|
|
118
119
|
<style lang="scss" scoped></style>
|
package/index.ts
CHANGED
|
@@ -5,6 +5,10 @@ export const $lcb: LcbGlobal = {
|
|
|
5
5
|
uni.navigateTo({ url })
|
|
6
6
|
},
|
|
7
7
|
} as LcbGlobal
|
|
8
|
+
|
|
9
|
+
export const setup = (params: Partial<LcbGlobal>) => {
|
|
10
|
+
uni.$lcb = Object.assign($lcb, params)
|
|
11
|
+
}
|
|
8
12
|
uni.$lcb = $lcb
|
|
9
13
|
// #ifdef H5
|
|
10
14
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"业务组件"
|
|
6
6
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"vue": ">=3.2.47",
|
|
14
|
-
"@tplc/wot": "0.1.
|
|
14
|
+
"@tplc/wot": "0.1.49"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
|
@@ -60,6 +60,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
60
60
|
import('vue').ComponentOptionsMixin,
|
|
61
61
|
{
|
|
62
62
|
'update:modelValue': (modelValue: number[]) => void
|
|
63
|
+
confirm: (...args: any[]) => void
|
|
63
64
|
open: (...args: any[]) => void
|
|
64
65
|
cancel: (...args: any[]) => void
|
|
65
66
|
},
|
|
@@ -118,6 +119,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
118
119
|
}>
|
|
119
120
|
> & {
|
|
120
121
|
'onUpdate:modelValue'?: ((modelValue: number[]) => any) | undefined
|
|
122
|
+
onConfirm?: ((...args: any[]) => any) | undefined
|
|
121
123
|
onCancel?: ((...args: any[]) => any) | undefined
|
|
122
124
|
onOpen?: ((...args: any[]) => any) | undefined
|
|
123
125
|
},
|
package/types/utils/utils.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare const getExposed: () => any
|
|
|
4
4
|
export declare const getPageOptions: () => Record<string, any>
|
|
5
5
|
/** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
|
|
6
6
|
export declare const getFinalUrl: (url: string, urlParams?: string) => string
|
|
7
|
+
export declare const onPageScrollSelector: (selector: string) => void
|
package/utils/utils.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { onPageScroll } from '@dcloudio/uni-app'
|
|
1
2
|
import { parse, stringify } from 'qs'
|
|
2
3
|
export function formatJson(str: string | object | undefined, defVal = {}) {
|
|
3
4
|
if (!str) return defVal
|
|
@@ -34,3 +35,10 @@ export const getFinalUrl = (url: string, urlParams?: string) => {
|
|
|
34
35
|
...params,
|
|
35
36
|
})}`
|
|
36
37
|
}
|
|
38
|
+
|
|
39
|
+
export const onPageScrollSelector = (selector: string) => {
|
|
40
|
+
const prefix = uni.$lcb.layoutId ? `#${uni.$lcb.layoutId} >>> #` : '#'
|
|
41
|
+
uni.pageScrollTo({
|
|
42
|
+
selector: `${prefix}${selector}`,
|
|
43
|
+
})
|
|
44
|
+
}
|