@tplc/business 0.0.52 → 0.0.54

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,15 @@
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.0.54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.53...v0.0.54) (2024-10-30)
6
+
7
+ ### [0.0.53](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.52...v0.0.53) (2024-10-30)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * 增加 list 瀑布流布局 ([53e7752](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/53e7752b90a009fa9c3d946a9472ca94c66088ad))
13
+
5
14
  ### [0.0.52](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.23...v0.0.52) (2024-10-29)
6
15
 
7
16
 
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, useAttrs } from 'vue'
3
+ import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
3
4
  import { LcbProductProps } from './types'
4
5
 
5
6
  const attrs = useAttrs()
@@ -92,6 +93,103 @@ defineSlots<{
92
93
  </view>
93
94
  </view>
94
95
 
96
+ <u-waterfall :modelValue="items" v-if="listType === 'waterfall'" class="flex gap-3 p-3">
97
+ <template #left="{ leftList: list }">
98
+ <view class="flex flex-col gap-3">
99
+ <view
100
+ v-for="(item, index) in list"
101
+ :key="`${item?.productId}:${index}`"
102
+ class="rounded overflow-hidden"
103
+ >
104
+ <slot name="item" :item="item">
105
+ <lcb-product-item
106
+ v-bind="{ ...item, ...attrs }"
107
+ layoutType="vertical"
108
+ tag-overflow-wrap
109
+ :title-line-clamp="2"
110
+ >
111
+ <template #image="{ value }">
112
+ <image :src="value" class="w-full" mode="widthFix" />
113
+ </template>
114
+ <!-- <template #itemTopSection>
115
+ <view class="min-w-10 min-h-10 bg-red-500/50"></view>
116
+ </template>
117
+ <template #itemBottomSection>
118
+ <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
119
+ </template>
120
+ <template #itemLeftSection>
121
+ <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
122
+ </template>
123
+ <template #itemRightSection>
124
+ <view class="min-w-10 min-h-10 bg-green-500/50"></view>
125
+ </template> -->
126
+
127
+ <!-- <template #imageSection>
128
+ <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
129
+ </template>
130
+
131
+ <template #itemSection>
132
+ <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
133
+ </template>
134
+ <template #contentSection>
135
+ <view
136
+ class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
137
+ ></view>
138
+ </template> -->
139
+ </lcb-product-item>
140
+ </slot>
141
+ </view>
142
+ </view>
143
+ </template>
144
+ <template #right="{ rightList: list }">
145
+ <view class="flex flex-col gap-3">
146
+ <view
147
+ v-for="(item, index) in list"
148
+ :key="`${item?.productId}:${index}`"
149
+ class="rounded overflow-hidden"
150
+ >
151
+ <slot name="item" :item="item">
152
+ <lcb-product-item
153
+ v-bind="{ ...item, ...attrs }"
154
+ layoutType="vertical"
155
+ tag-overflow-wrap
156
+ :title-line-clamp="2"
157
+ >
158
+ <template #image="{ value }">
159
+ <image :src="value" class="w-full" mode="widthFix" />
160
+ </template>
161
+ <!-- <template #itemTopSection>
162
+ <view class="min-w-10 min-h-10 bg-red-500/50"></view>
163
+ </template>
164
+ <template #itemBottomSection>
165
+ <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
166
+ </template>
167
+ <template #itemLeftSection>
168
+ <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
169
+ </template>
170
+ <template #itemRightSection>
171
+ <view class="min-w-10 min-h-10 bg-green-500/50"></view>
172
+ </template> -->
173
+
174
+ <!-- <template #imageSection>
175
+ <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
176
+ </template>
177
+
178
+ <template #itemSection>
179
+ <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
180
+ </template>
181
+ <template #contentSection>
182
+ <view
183
+ class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
184
+ ></view>
185
+ </template> -->
186
+ </lcb-product-item>
187
+ </slot>
188
+ </view>
189
+ </view>
190
+ </template>
191
+ </u-waterfall>
192
+
95
193
  <scroll-view v-if="listType == 'horizontal'" scroll-x>
96
194
  <view class="p-2 flex gap-2 whitespace-nowrap overflow-auto flex-nowrap">
97
195
  <view
@@ -49,7 +49,7 @@ const value = computed(() => {
49
49
  >
50
50
  <!-- 图片 -->
51
51
  <slot :value="value" v-if="prop === 'image'" name="image">
52
- <view :value="value" :class="className" :style="style">
52
+ <view :class="className" :style="style">
53
53
  <image :src="value" class="w-full h-full" mode="aspectFill" />
54
54
  <slot></slot>
55
55
  </view>
@@ -79,7 +79,6 @@ const value = computed(() => {
79
79
  <view
80
80
  :class="className"
81
81
  :style="style"
82
- :value="value"
83
82
  class="text-22rpx text-gray-500 text-ellipsis line-clamp-1"
84
83
  >
85
84
  <view>{{ value }}</view>
@@ -91,7 +90,6 @@ const value = computed(() => {
91
90
  <view
92
91
  :class="className"
93
92
  :style="style"
94
- :value="value"
95
93
  class="text-gray-500 text-22rpx flex gap-3rpx items-center"
96
94
  >
97
95
  <wd-icon name="location" size="32rpx"></wd-icon>
@@ -104,7 +102,6 @@ const value = computed(() => {
104
102
  <view
105
103
  :class="className"
106
104
  :style="style"
107
- :value="value"
108
105
  class="text-gray-500 text-22rpx flex gap-3rpx items-center"
109
106
  >
110
107
  <wd-icon name="location" size="32rpx"></wd-icon>
@@ -145,12 +142,7 @@ const value = computed(() => {
145
142
 
146
143
  <!-- 价格单位 -->
147
144
  <slot :value="value" v-if="prop === 'priceUnit'" name="priceUnit">
148
- <view
149
- :class="className"
150
- :style="style"
151
- :value="value"
152
- class="text-red-500 font-bold text-22rpx"
153
- >
145
+ <view :class="className" :style="style" class="text-red-500 font-bold text-22rpx">
154
146
  <view>{{ value }}</view>
155
147
  </view>
156
148
  </slot>
@@ -169,38 +161,28 @@ const value = computed(() => {
169
161
 
170
162
  <!-- 价格后缀 -->
171
163
  <slot :value="value" v-if="prop === 'priceSuffix'" name="priceSuffix">
172
- <view :class="className" :style="style" :value="value" class="text-22rpx">
164
+ <view :class="className" :style="style" class="text-22rpx">
173
165
  <view>{{ value }}</view>
174
166
  </view>
175
167
  </slot>
176
168
 
177
169
  <!-- 原始价格单位 -->
178
170
  <slot :value="value" v-if="prop === 'originPriceUnit'" name="originPriceUnit">
179
- <view
180
- :class="className"
181
- :style="style"
182
- :value="value"
183
- class="text-gray-500 font-bold text-19rpx"
184
- >
171
+ <view :class="className" :style="style" class="text-gray-500 font-bold text-19rpx">
185
172
  <view>{{ value }}</view>
186
173
  </view>
187
174
  </slot>
188
175
 
189
176
  <!-- 原始价格 -->
190
177
  <slot :value="value" v-if="prop === 'originPrice'" name="originPrice">
191
- <view
192
- :class="className"
193
- :style="style"
194
- :value="value"
195
- class="text-gray-500 font-bold text-20rpx"
196
- >
178
+ <view :class="className" :style="style" class="text-gray-500 font-bold text-20rpx">
197
179
  <view>{{ value }}</view>
198
180
  </view>
199
181
  </slot>
200
182
 
201
183
  <!-- 原始价格后缀 -->
202
184
  <slot :value="value" v-if="prop === 'originPriceSuffix'" name="originPriceSuffix">
203
- <view :class="className" :style="style" :value="value" class="text-gray-500 text-20rpx">
185
+ <view :class="className" :style="style" class="text-gray-500 text-20rpx">
204
186
  <view>{{ value }}</view>
205
187
  </view>
206
188
  </slot>
@@ -27,17 +27,17 @@
27
27
  />
28
28
  </lcb-action-view>
29
29
  <view class="flex-1">
30
- <lcb-action-view :jumpType="88" @phone="phoneHandler" v-if="!userStore?.userInfo?.phone">
31
- <view
32
- class="font-500"
33
- :style="{
34
- fontSize: transformValueUnit(textSize),
35
- color: textColor,
36
- }"
37
- >
38
- 授权登录
39
- </view>
40
- </lcb-action-view>
30
+ <view
31
+ class="font-500"
32
+ v-if="!userStore?.userInfo?.phone"
33
+ :style="{
34
+ fontSize: transformValueUnit(textSize),
35
+ color: textColor,
36
+ }"
37
+ @click="phoneHandler"
38
+ >
39
+ 授权登录
40
+ </view>
41
41
  <view v-else class="leading-none">
42
42
  <view class="text-32rpx font-#333 font-500 mb-20rpx">
43
43
  {{ userStore?.userInfo?.userName || '微信用户' }}
@@ -104,7 +104,6 @@ import { transformValueUnit } from '../../utils/transform'
104
104
  import Nums from './Nums/index.vue'
105
105
  import { computed } from 'vue'
106
106
  import { addUnit } from '@tplc/wot/components/common/util'
107
- import { getPhone } from '../../utils/auth'
108
107
 
109
108
  const { statusBarHeight } = uni.getSystemInfoSync()
110
109
  defineOptions({
@@ -137,9 +136,10 @@ withDefaults(defineProps<LcbUserTopProps>(), {
137
136
  const padTop = computed(() => {
138
137
  return addUnit(statusBarHeight || 0)
139
138
  })
140
- const phoneHandler = async (e) => {
141
- await getPhone(e)
142
- userStore?.getUser()
139
+ const phoneHandler = () => {
140
+ uni.navigateTo({
141
+ url: '/pages/system/authPhone',
142
+ })
143
143
  }
144
144
  const onAvatar = (headImgUrl) => {
145
145
  userStore?.updateUser({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -18,7 +18,8 @@
18
18
  "pnpm": ">=7.30"
19
19
  },
20
20
  "dependencies": {
21
- "qs": "6.5.3"
21
+ "qs": "6.5.3",
22
+ "uview-plus": "^3.3.9"
22
23
  },
23
24
  "scripts": {
24
25
  "pub": "pnpm dts && pnpm publish --no-git-checks",
@@ -110,10 +110,10 @@ declare const __VLS_component: import('vue').DefineComponent<
110
110
  >,
111
111
  {
112
112
  layoutType: 'vertical' | 'horizontal'
113
+ tagOverflowWrap: boolean
114
+ titleLineClamp: number
113
115
  priceUnit: any
114
116
  originPriceUnit: any
115
- titleLineClamp: number
116
- tagOverflowWrap: boolean
117
117
  tagType: import('@tplc/wot/components/wd-tag/types').TagType
118
118
  tagPlain: boolean
119
119
  tagMark: boolean