@tplc/business 0.3.55 → 0.3.56

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,19 @@
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.3.56](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.54...v0.3.56) (2025-02-21)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.3.55 ([887edd6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/887edd642400c561dcbf7a56746d9ef8564e5c17))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * cancel ([f63cd15](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f63cd1541dac3a592233eb6479012d7869fde91d))
16
+ * 新增241 ([3550874](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/355087493cc8275a2602bb51bafed07f1d3c9658))
17
+
5
18
  ### [0.3.55](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.49...v0.3.55) (2025-02-20)
6
19
 
7
20
 
@@ -42,7 +42,7 @@
42
42
  import { useTranslate } from '@tplc/wot'
43
43
  import dayjs from 'dayjs/esm'
44
44
  import useLocation from '../../hooks/useLocation'
45
- import { inject, Ref, ref, watch } from 'vue'
45
+ import { inject, onMounted, Ref, ref, watch } from 'vue'
46
46
  import { LcbCalendarSearchProps } from './types'
47
47
  import { LcbAddress } from '../lcb-city-select/api'
48
48
  import { FORM_KEY } from '../../constants'
@@ -84,17 +84,22 @@ watch(
84
84
  },
85
85
  )
86
86
 
87
- watch(
88
- () => dayRange.value,
89
- (val) => {
90
- form.value.startDate = dayjs(val[0]).format('YYYY-MM-DD')
91
- form.value.endDate = dayjs(val[1]).format('YYYY-MM-DD')
92
- },
93
- )
94
87
  getLocation()
95
88
  const onSearch = (e) => {
96
89
  form.value.keywords = e.target.value
97
90
  }
91
+ onMounted(() => {
92
+ if (form.value.startDate) {
93
+ dayRange.value = [dayjs(form.value.startDate).valueOf(), dayjs(form.value.endDate).valueOf()]
94
+ }
95
+ watch(
96
+ () => dayRange.value,
97
+ (val) => {
98
+ form.value.startDate = dayjs(val[0]).format('YYYY-MM-DD')
99
+ form.value.endDate = dayjs(val[1]).format('YYYY-MM-DD')
100
+ },
101
+ )
102
+ })
98
103
  </script>
99
104
 
100
105
  <style lang="scss" scoped>
@@ -127,10 +127,11 @@ const onAddrClick = (city: ChildHotAddress, letter = false) => {
127
127
  className: '',
128
128
  }
129
129
  modelValue.value = currentCity
130
- historyList.value = historyList.value.filter(
131
- (historyItem) =>
132
- `${historyItem.keywords},${historyItem.addr}` !== `${city.keywords},${city.addr}`,
133
- )
130
+ historyList.value =
131
+ historyList.value?.filter(
132
+ (historyItem) =>
133
+ `${historyItem.keywords},${historyItem.addr}` !== `${city.keywords},${city.addr}`,
134
+ ) || []
134
135
  if (historyList.value.length === 8) {
135
136
  historyList.value = [currentCity as unknown as LcbAddress, ...historyList.value.slice(0, 7)]
136
137
  } else {
@@ -59,9 +59,10 @@ const getText = (text: string) => {
59
59
  }
60
60
  const onItemClick = (item: LcbAddress) => {
61
61
  const addr = `${item.keywords},${item.addr}`
62
- historyList.value = historyList.value.filter(
63
- (historyItem) => `${historyItem.keywords},${historyItem.addr}` !== addr,
64
- )
62
+ historyList.value =
63
+ historyList.value?.filter(
64
+ (historyItem) => `${historyItem.keywords},${historyItem.addr}` !== addr,
65
+ ) || []
65
66
  historyList.value.unshift(item)
66
67
  emits('click', item)
67
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.55",
3
+ "version": "0.3.56",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
package/utils/utils.ts CHANGED
@@ -14,7 +14,7 @@ export function formatJson(str: string | object | undefined, defVal = {}) {
14
14
  export const getExposed = () => {
15
15
  const pages = getCurrentPages()
16
16
  const page = pages[pages.length - 2]
17
- return page?.$vm?.$?.exposed
17
+ return page.$vm.$.exposed
18
18
  }
19
19
 
20
20
  export const getCurrentPage = () => {
@@ -35,11 +35,11 @@ export const getCurrentPage = () => {
35
35
  }
36
36
  /** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
37
37
  export const getFinalUrl = (url: string, urlParams?: string) => {
38
- if (!urlParams) return url
39
- const params = parse(urlParams)
40
- const query = parse(url.split('?')[1])
38
+ const params = parse(urlParams || '')
39
+ const query = parse(url.split('?')[1] || '')
41
40
  const path = url.split('?')[0]
42
41
  return `${path}?${stringify({
42
+ ...getCurrentPage().options,
43
43
  ...query,
44
44
  ...params,
45
45
  })}`