@tplc/business 0.2.44 → 0.2.46

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,28 @@
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.46](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.45...v0.2.46) (2024-12-31)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * action 调整布局 ([c2410b2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c2410b21437c1882c9b5b34f48f056d445b42754))
11
+
12
+ ### [0.2.45](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.48...v0.2.45) (2024-12-31)
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.1.49 ([6853d70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6853d7041d1858bd302b57275447e407847526e6))
18
+ * **release:** 0.2.44 ([002a105](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/002a1059fc99b8ec685afa03dfe2de972604484a))
19
+
20
+
21
+ ### ✨ Features | 新功能
22
+
23
+ * calendar 支持 open cancel 事件 ([a93093a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a93093ab96b0365986ce0c426b49164ca0064b6e))
24
+ * lcb-calendar 新增confirm 事件回调 ([0b7a090](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0b7a090e4200e299bc3cf6f6d49e0864ee8466b5))
25
+ * 跳转layout策略 ([ba902ef](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ba902effd43a57ff3b0d2da3af4088dea5363a9b))
26
+
5
27
  ### [0.2.44](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.49...v0.2.44) (2024-12-30)
6
28
 
7
29
  ### [0.2.43](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.39...v0.2.43) (2024-12-30)
package/action.d.ts CHANGED
@@ -38,6 +38,7 @@ export interface LcbGlobal {
38
38
  getUser: () => void
39
39
  }
40
40
  getIsTabbar: () => boolean
41
+ layoutId: string
41
42
  }
42
43
 
43
44
  global {
@@ -38,7 +38,7 @@ 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 { getFinalUrl } from '../../utils/utils'
41
+ import { getFinalUrl, onPageScrollSelector } from '../../utils/utils'
42
42
  defineOptions({
43
43
  name: 'LcbActionView',
44
44
  options: {
@@ -118,9 +118,7 @@ const onActionClick = async () => {
118
118
  /** 锚点跳转 */
119
119
  case 16:
120
120
  if (url) {
121
- uni.pageScrollTo({
122
- selector: `#${url}`,
123
- })
121
+ onPageScrollSelector(url)
124
122
  }
125
123
  break
126
124
  case 17:
@@ -49,7 +49,7 @@
49
49
 
50
50
  <view
51
51
  :style="{
52
- height: isTabBar ? 'calc(var(--window-bottom) + 10px)' : '10px',
52
+ height: '10px',
53
53
  }"
54
54
  />
55
55
  </view>
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.44",
3
+ "version": "0.2.46",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -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
+ }