@tplc/business 0.3.72 → 0.3.74

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,29 @@
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.74](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.73...v0.3.74) (2025-03-09)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 新增search ([437606d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/437606d1cb6d7fdacb9a4d7622c7e57ce02cb358))
11
+
12
+ ### [0.3.73](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.69...v0.3.73) (2025-03-08)
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.3.70 ([5225f9c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5225f9c029f67f8bdb260cb4116e35b4e7bf2c8d))
18
+ * **release:** 0.3.71 ([4d93c94](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4d93c9439faf64d06ca38cbe0c24be0913a3a61f))
19
+ * **release:** 0.3.72 ([8747547](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8747547d4c92e46e7a7c15badf9570194e603150))
20
+
21
+
22
+ ### ✨ Features | 新功能
23
+
24
+ * 图片处理 ([bb8dfb8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bb8dfb854ff25447fa86c54d5ae8e065c75e0722))
25
+ * 城市数据cache ([5ca0c2a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5ca0c2a88de63694f64c6c60c96621e705b01b72))
26
+ * 调整城市 ([0d04291](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0d0429144c4f6a468faa178513ecbda2bcc48ee9))
27
+
5
28
  ### [0.3.72](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.71...v0.3.72) (2025-03-07)
6
29
 
7
30
 
@@ -16,6 +16,7 @@
16
16
  borderColor,
17
17
  boxShadow:
18
18
  shadowColor && shadowSize ? `0px 0px ${blurSize}px ${shadowSize}px ${shadowColor}` : '',
19
+ ...customStyle,
19
20
  }"
20
21
  class="box-border overflow-hidden relative"
21
22
  :class="customClass"
@@ -1,3 +1,5 @@
1
+ import { StyleValue } from 'vue'
2
+
1
3
  export interface LcbBlockProps {
2
4
  /** 左右外距 */
3
5
  marginHorizontal?: number
@@ -35,6 +37,7 @@ export interface LcbBlockProps {
35
37
  backgroundPosition?: string
36
38
  borderColor?: string
37
39
  textAlign?: 'left' | 'center' | 'right'
40
+ customStyle?: StyleValue
38
41
  }
39
42
  export interface LcbBlockInnerProps extends LcbBlockProps {
40
43
  [key: string]: any
@@ -11,6 +11,7 @@
11
11
  </lcb-action-view>
12
12
  <view class="absolute">
13
13
  <wd-message-box />
14
+ <OrderDetLogistic v-model="logistic.show" :data="logistic.data" />
14
15
  </view>
15
16
  </template>
16
17
 
@@ -18,7 +19,13 @@
18
19
  import type { ButtonProps } from '@tplc/wot/components/wd-button/types'
19
20
  import type { IPageBtn, LcbOperationActionsProps } from './types'
20
21
  import { useMessage } from '@tplc/wot'
22
+ import OrderDetLogistic from './components/OrderDetLogistic/index.vue'
23
+ import { reactive } from 'vue'
21
24
  const message = useMessage()
25
+ const logistic = reactive({
26
+ show: false,
27
+ data: {},
28
+ })
22
29
  defineOptions({
23
30
  name: 'LcbOperationActionsBtn',
24
31
  options: {
@@ -83,6 +90,14 @@ async function link({ item }: { item: IPageBtn }) {
83
90
  })
84
91
  },
85
92
  })
93
+ // 显示物流弹窗
94
+ } else if (item.buttonKey === 'showLogisticPop') {
95
+ const { data: logisticInfo } = await uni.$lcb.http.post<any>(item.requestUrl, {
96
+ ...item.requestParam,
97
+ })
98
+ console.log(logisticInfo)
99
+ logistic.data = logisticInfo
100
+ logistic.show = true
86
101
  } else {
87
102
  emits('cancel')
88
103
  }
@@ -0,0 +1,137 @@
1
+ <script setup lang="ts">
2
+ import { useTranslate } from '@tplc/wot'
3
+
4
+ interface LogisticData {
5
+ postageName?: string
6
+ externalPostageNo?: string
7
+ flowInfoList?: Array<{
8
+ statusName: string
9
+ time: string
10
+ context: string
11
+ }>
12
+ receiveName?: string
13
+ receivePhone?: string
14
+ provinceCityAreaName?: string
15
+ address?: string
16
+ }
17
+
18
+ interface Props {
19
+ data?: LogisticData
20
+ }
21
+ const { translate } = useTranslate()
22
+ const model = defineModel<boolean>({ required: true })
23
+ defineProps<Props>()
24
+
25
+ const handleCopy = (text?: string) => {
26
+ if (text) {
27
+ uni.setClipboardData({
28
+ data: text,
29
+ })
30
+ }
31
+ }
32
+ </script>
33
+
34
+ <template>
35
+ <wd-popup
36
+ v-model="model"
37
+ position="bottom"
38
+ custom-class="!rounded-t-20rpx"
39
+ closable
40
+ @close="model = false"
41
+ >
42
+ <view class="popup-view">
43
+ <view class="title">
44
+ {{ translate('物流信息') }}
45
+ </view>
46
+ <view class="p-3 box-border">
47
+ <view class="flex items-center text-3.5">
48
+ <text class="font-500 mr-3">{{ data?.postageName }}</text>
49
+ <text class="flex-1">{{ data?.externalPostageNo }}</text>
50
+ <wd-button size="small" plain @click="handleCopy(data?.externalPostageNo)">
51
+ {{ translate('复制') }}
52
+ </wd-button>
53
+ </view>
54
+ <scroll-view scroll-y class="max-h-50vh overflow-y-auto mt-3">
55
+ <view
56
+ v-for="(item, idx) in data?.flowInfoList"
57
+ :key="idx"
58
+ class="relative p-3 !pt-0 box-border"
59
+ >
60
+ <view
61
+ :class="[
62
+ 'line absolute left-0 top-3.5 h-[calc(100%-24rpx)]',
63
+ idx === (data?.flowInfoList?.length || 0) - 1 ? 'hidden' : '',
64
+ ]"
65
+ />
66
+ <view :class="['dot absolute', idx < 1 ? 'bg-primary' : '']" />
67
+ <view class="flex text-3">
68
+ <text class="font-500 mr-3">{{ item.statusName }}</text>
69
+ <text>{{ item.time }}</text>
70
+ </view>
71
+ <view class="mt-2 text-2.5 text-[#7b7b7b]">
72
+ <text>{{ item.context }}</text>
73
+ </view>
74
+ </view>
75
+ </scroll-view>
76
+ </view>
77
+ <view class="flex items-center bg-white py-3 box-border mx-3 border-top">
78
+ <wd-icon name="location" custom-class="mr-30rpx" />
79
+ <view class="flex-1 truncate">
80
+ <view class="flex items-center text-3">
81
+ <text class="font-500 mr-3">{{ data?.receiveName }}</text>
82
+ <text class="opacity-40">{{ data?.receivePhone }}</text>
83
+ </view>
84
+ <view class="mt-1 opacity-40 truncate text-2.5">
85
+ <text class="truncate">{{ data?.provinceCityAreaName }} {{ data?.address }}</text>
86
+ </view>
87
+ </view>
88
+ </view>
89
+ </view>
90
+ </wd-popup>
91
+ </template>
92
+
93
+ <style scoped lang="scss">
94
+ .icon-address {
95
+ width: 40rpx;
96
+ height: 40rpx;
97
+ }
98
+
99
+ .line {
100
+ width: 2rpx;
101
+ background-color: #ececec;
102
+ margin-left: 5rpx;
103
+ }
104
+
105
+ .top-first {
106
+ top: 50rpx;
107
+ }
108
+
109
+ .h-last {
110
+ height: 18rpx;
111
+ }
112
+
113
+ .dot {
114
+ width: 10rpx;
115
+ height: 10rpx;
116
+ background-color: #ececec;
117
+ left: 1rpx;
118
+ top: 12rpx;
119
+ border-radius: 10rpx;
120
+ z-index: 1;
121
+ }
122
+
123
+ .popup-view {
124
+ .title {
125
+ position: relative;
126
+ font-size: 32rpx;
127
+ font-weight: 500;
128
+ line-height: 96rpx;
129
+ text-align: center;
130
+ border-radius: 20rpx;
131
+ box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(243, 245, 249, 0.94);
132
+ }
133
+ }
134
+ .border-top {
135
+ border-top: 1rpx solid #ececec;
136
+ }
137
+ </style>
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <lcb-block
3
+ v-bind="$props"
4
+ customClass="border-solid"
5
+ :customStyle="{
6
+ borderWidth: `${borderWidth}px`,
7
+ }"
8
+ >
9
+ <lcb-action-view v-bind="link">
10
+ <view
11
+ class="flex items-center"
12
+ :style="{
13
+ gap: transformValueUnit(gap),
14
+ }"
15
+ >
16
+ <wd-icon :name="icon" :size="iconSize" class-prefix="lcb" :color="iconColor" v-if="icon" />
17
+ <view>{{ placeholder }}</view>
18
+ </view>
19
+ </lcb-action-view>
20
+ </lcb-block>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import { LcbSearchProps } from './types'
25
+ import { transformValueUnit } from '../../utils/transform'
26
+ defineOptions({
27
+ name: 'LcbSearch',
28
+ options: {
29
+ addGlobalClass: true,
30
+ virtualHost: true,
31
+ styleIsolation: 'shared',
32
+ },
33
+ })
34
+ withDefaults(defineProps<LcbSearchProps>(), {
35
+ placeholder: '搜索',
36
+ iconSize: '16',
37
+ borderWidth: 1,
38
+ iconColor: '#333',
39
+ gap: 16,
40
+ })
41
+ </script>
42
+
43
+ <style lang="scss" scoped></style>
@@ -0,0 +1,12 @@
1
+ import { LcbActionViewProps } from 'components/lcb-action-view/types'
2
+
3
+ export interface LcbSearchProps {
4
+ // Define the component's prop types here
5
+ placeholder?: string
6
+ icon?: string
7
+ iconSize?: string
8
+ borderWidth?: number
9
+ iconColor?: string
10
+ gap?: number
11
+ link?: LcbActionViewProps
12
+ }
package/global.d.ts CHANGED
@@ -29,6 +29,7 @@ declare module 'vue' {
29
29
  'lcb-product': (typeof import('@tplc/business/components/lcb-product/lcb-product.vue'))['default']
30
30
  'lcb-product-item': (typeof import('@tplc/business/components/lcb-product-item/lcb-product-item.vue'))['default']
31
31
  'lcb-rich-text': (typeof import('@tplc/business/components/lcb-rich-text/lcb-rich-text.vue'))['default']
32
+ 'lcb-search': (typeof import('@tplc/business/components/lcb-search/lcb-search.vue'))['default']
32
33
  'lcb-swiper': (typeof import('@tplc/business/components/lcb-swiper/lcb-swiper.vue'))['default']
33
34
  'lcb-tabs': (typeof import('@tplc/business/components/lcb-tabs/lcb-tabs.vue'))['default']
34
35
  'lcb-tags': (typeof import('@tplc/business/components/lcb-tags/lcb-tags.vue'))['default']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.72",
3
+ "version": "0.3.74",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,3 +1,4 @@
1
+ import { StyleValue } from 'vue'
1
2
  export interface LcbBlockProps {
2
3
  /** 左右外距 */
3
4
  marginHorizontal?: number
@@ -34,6 +35,7 @@ export interface LcbBlockProps {
34
35
  backgroundPosition?: string
35
36
  borderColor?: string
36
37
  textAlign?: 'left' | 'center' | 'right'
38
+ customStyle?: StyleValue
37
39
  }
38
40
  export interface LcbBlockInnerProps extends LcbBlockProps {
39
41
  [key: string]: any
@@ -22,6 +22,7 @@ declare const __VLS_component: import('vue').DefineComponent<
22
22
  mode: 'map' | 'list'
23
23
  backgroundColor: string
24
24
  color: string
25
+ customStyle: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null
25
26
  customClass: string
26
27
  radius: number
27
28
  backgroundImage: string
@@ -0,0 +1,51 @@
1
+ interface LogisticData {
2
+ postageName?: string
3
+ externalPostageNo?: string
4
+ flowInfoList?: Array<{
5
+ statusName: string
6
+ time: string
7
+ context: string
8
+ }>
9
+ receiveName?: string
10
+ receivePhone?: string
11
+ provinceCityAreaName?: string
12
+ address?: string
13
+ }
14
+ interface Props {
15
+ data?: LogisticData
16
+ }
17
+ declare let __VLS_typeProps: Props
18
+ type __VLS_PublicProps = {
19
+ modelValue: boolean
20
+ } & typeof __VLS_typeProps
21
+ declare const _default: import('vue').DefineComponent<
22
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
23
+ {},
24
+ unknown,
25
+ {},
26
+ {},
27
+ import('vue').ComponentOptionsMixin,
28
+ import('vue').ComponentOptionsMixin,
29
+ {
30
+ 'update:modelValue': (modelValue: boolean) => void
31
+ },
32
+ string,
33
+ import('vue').PublicProps,
34
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
35
+ 'onUpdate:modelValue'?: ((modelValue: boolean) => any) | undefined
36
+ },
37
+ {},
38
+ {}
39
+ >
40
+ export default _default
41
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
42
+ type __VLS_TypePropsToOption<T> = {
43
+ [K in keyof T]-?: {} extends Pick<T, K>
44
+ ? {
45
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
46
+ }
47
+ : {
48
+ type: import('vue').PropType<T[K]>
49
+ required: true
50
+ }
51
+ }
@@ -0,0 +1,68 @@
1
+ import { LcbSearchProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbSearchProps>,
5
+ {
6
+ placeholder: string
7
+ iconSize: string
8
+ borderWidth: number
9
+ iconColor: string
10
+ gap: number
11
+ }
12
+ >,
13
+ {},
14
+ unknown,
15
+ {},
16
+ {},
17
+ import('vue').ComponentOptionsMixin,
18
+ import('vue').ComponentOptionsMixin,
19
+ {},
20
+ string,
21
+ import('vue').PublicProps,
22
+ Readonly<
23
+ import('vue').ExtractPropTypes<
24
+ __VLS_WithDefaults<
25
+ __VLS_TypePropsToOption<LcbSearchProps>,
26
+ {
27
+ placeholder: string
28
+ iconSize: string
29
+ borderWidth: number
30
+ iconColor: string
31
+ gap: number
32
+ }
33
+ >
34
+ >
35
+ >,
36
+ {
37
+ iconSize: string
38
+ iconColor: string
39
+ placeholder: string
40
+ gap: number
41
+ borderWidth: number
42
+ },
43
+ {}
44
+ >
45
+ export default _default
46
+ type __VLS_WithDefaults<P, D> = {
47
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
48
+ ? __VLS_Prettify<
49
+ P[K] & {
50
+ default: D[K]
51
+ }
52
+ >
53
+ : P[K]
54
+ }
55
+ type __VLS_Prettify<T> = {
56
+ [K in keyof T]: T[K]
57
+ } & {}
58
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
59
+ type __VLS_TypePropsToOption<T> = {
60
+ [K in keyof T]-?: {} extends Pick<T, K>
61
+ ? {
62
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
63
+ }
64
+ : {
65
+ type: import('vue').PropType<T[K]>
66
+ required: true
67
+ }
68
+ }
@@ -0,0 +1,10 @@
1
+ import { LcbActionViewProps } from 'components/lcb-action-view/types'
2
+ export interface LcbSearchProps {
3
+ placeholder?: string
4
+ icon?: string
5
+ iconSize?: string
6
+ borderWidth?: number
7
+ iconColor?: string
8
+ gap?: number
9
+ link?: LcbActionViewProps
10
+ }