@tplc/business 0.0.22 → 0.0.25

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/components/lcb-image/Image/index.vue +1 -0
  3. package/components/lcb-image/lcb-image.vue +1 -0
  4. package/components/lcb-img-nav/lcb-img-nav.vue +20 -36
  5. package/components/lcb-img-nav/types.ts +4 -0
  6. package/components/lcb-nav/lcb-nav.vue +11 -2
  7. package/components/{lcb-notice-bar → lcb-notice}/Item/index.vue +34 -7
  8. package/components/{lcb-notice-bar/lcb-notice-bar.vue → lcb-notice/lcb-notice.vue} +25 -12
  9. package/components/{lcb-notice-bar → lcb-notice}/types.ts +10 -2
  10. package/components/lcb-user-order/lcb-user-order.vue +1 -1
  11. package/components/lcb-user-order/types.ts +11 -0
  12. package/components/lcb-user-top/Nums/index.vue +20 -0
  13. package/components/lcb-user-top/lcb-user-top.vue +72 -81
  14. package/components/lcb-user-top/types.ts +18 -2
  15. package/global.d.ts +1 -1
  16. package/package.json +2 -2
  17. package/types/components/lcb-img-nav/types.d.ts +2 -0
  18. package/types/components/lcb-notice/Item/index.vue.d.ts +56 -0
  19. package/types/components/{lcb-notice-bar/lcb-notice-bar.vue.d.ts → lcb-notice/lcb-notice.vue.d.ts} +15 -3
  20. package/types/components/lcb-notice/types.d.ts +24 -0
  21. package/types/components/lcb-user-order/types.d.ts +6 -0
  22. package/types/components/{lcb-notice-bar/Item → lcb-user-top/Nums}/index.vue.d.ts +3 -3
  23. package/types/components/lcb-user-top/lcb-user-top.vue.d.ts +0 -2
  24. package/types/components/lcb-user-top/types.d.ts +16 -2
  25. package/types/utils/transform.d.ts +1 -1
  26. package/utils/transform.ts +1 -1
  27. package/types/components/lcb-notice-bar/types.d.ts +0 -15
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
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.25](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.24...v0.0.25) (2024-09-25)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 更新组件库版本 ([36a4708](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/36a470830951a4a071944e1d96f960ec31830ddb))
11
+
12
+ ### [0.0.24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.23...v0.0.24) (2024-09-25)
13
+
14
+ ### [0.0.23](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.9...v0.0.23) (2024-09-25)
15
+
5
16
  ### [0.0.22](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.21...v0.0.22) (2024-09-24)
6
17
 
7
18
  ### [0.0.21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.7...v0.0.21) (2024-09-24)
@@ -78,6 +78,7 @@ function getRealSize(size: number = 0) {
78
78
  if (mode !== 3 && props.marginHorizontal) realWidth -= props.marginHorizontal * 2
79
79
  const imgSpan = props.imageMargin
80
80
  if (mode === 2 && imgSpan) realWidth -= (lens - 1) / 2
81
+ // console.log('size', size, 'realWidth', realWidth, 'props.marginHorizontal', props.marginHorizontal)
81
82
  return (realWidth / 375) * size
82
83
  }
83
84
  </script>
@@ -76,6 +76,7 @@ const imageProps = computed(() => {
76
76
  imageSize: props.imageSize,
77
77
  imageMargin: props.imageMargin,
78
78
  imageRadius: props.imageRadius,
79
+ marginHorizontal: props.marginHorizontal,
79
80
  enablePreview: props.enablePreview,
80
81
  styleGroup: props.styleGroup,
81
82
  }
@@ -1,42 +1,23 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props">
3
- <view
4
- :style="{
5
- gridTemplateColumns: `repeat(${pictureDistribution}, minmax(0, 1fr))`,
6
- }"
7
- :class="[styleGroup === 2 ? 'mutil' : 'single']"
8
- >
9
- <lcb-action-view
10
- v-for="item in items"
11
- :key="item.title"
12
- v-bind="item.link"
13
- custom-class="!flex flex-col justify-center items-center"
14
- >
15
- <view
16
- class="overflow-hidden"
17
- :style="{
18
- marginBottom: iconTextMargin + 'rpx',
19
- }"
20
- >
3
+ <lcb-title v-if="showTitle" :title="title" :marginHorizontal="0" />
4
+ <view :style="{
5
+ gridTemplateColumns: `repeat(${pictureDistribution}, minmax(0, 1fr))`,
6
+ }" :class="[styleGroup === 2 ? 'mutil' : 'single']">
7
+ <lcb-action-view v-for="item in items" :key="item.title" v-bind="item.link"
8
+ custom-class="!flex flex-col justify-center items-center">
9
+ <view class="overflow-hidden" :style="{
10
+ marginBottom: iconTextMargin + 'rpx',
11
+ }">
21
12
  <!-- <div v-if="iconType === 0" class="flex justify-center items-center"> -->
22
- <wd-icon
23
- v-if="iconType === 0"
24
- class-prefix="iconfont"
25
- :name="item.icon!"
26
- :size="iconSize + 'rpx'"
27
- :color="iconColor"
28
- />
13
+ <wd-icon v-if="iconType === 0" class-prefix="iconfont" :name="item.icon!" :size="iconSize + 'rpx'"
14
+ :color="iconColor" />
29
15
  <!-- </div> -->
30
- <img
31
- v-else
32
- class="block"
33
- :style="{
34
- borderRadius: iconRadius + 'rpx',
35
- height: iconSize + 'rpx',
36
- width: iconSize + 'rpx',
37
- }"
38
- :src="item.url"
39
- />
16
+ <img v-else class="block" :style="{
17
+ borderRadius: iconRadius + 'rpx',
18
+ height: iconSize + 'rpx',
19
+ width: iconSize + 'rpx',
20
+ }" :src="item.url" />
40
21
  </view>
41
22
  <view class="title">{{ item.title }}</view>
42
23
  </lcb-action-view>
@@ -75,14 +56,17 @@ withDefaults(defineProps<LcbImgNavProps>(), {
75
56
  width: 100%;
76
57
  overflow-x: auto;
77
58
  white-space: nowrap;
78
- > view {
59
+
60
+ >view {
79
61
  display: inline-flex;
80
62
  }
81
63
  }
64
+
82
65
  .mutil {
83
66
  display: grid;
84
67
  row-gap: 36rpx;
85
68
  }
69
+
86
70
  .title {
87
71
  width: 68px;
88
72
  overflow: hidden;
@@ -22,4 +22,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
22
22
  iconRadius?: number
23
23
  /** 文字与图标距离 */
24
24
  iconTextMargin?: number
25
+
26
+ //是否显示标题
27
+ showTitle?: boolean
28
+ title?: string
25
29
  }
@@ -92,7 +92,7 @@ import { ICapsule, NavProps } from './types'
92
92
  import Title from './Title/index.vue'
93
93
  import Search from './Search/index.vue'
94
94
  import { onPageScroll } from '@dcloudio/uni-app'
95
-
95
+ import { Locale } from '@tplc/wot'
96
96
  defineOptions({
97
97
  name: 'LcbNav',
98
98
  options: {
@@ -184,7 +184,16 @@ const onCapsule = ({ action }: ICapsule) => {
184
184
  })
185
185
  break
186
186
  case 'translate':
187
- toBack()
187
+ uni.showActionSheet({
188
+ itemList: ['中文', '英文'],
189
+ success: (res) => {
190
+ if (res.tapIndex === 0) {
191
+ Locale.use('zh-CN')
192
+ } else {
193
+ Locale.use('en-US')
194
+ }
195
+ },
196
+ })
188
197
  break
189
198
  case 'setting':
190
199
  uni.navigateTo({
@@ -1,13 +1,34 @@
1
1
  <template>
2
- <view class="flex">
2
+ <view class="flex items-center">
3
+ <div
4
+ v-if="iconType === 1"
5
+ class="overflow-hidden bg-no-repeat bg-contain mr-12rpx"
6
+ :style="{
7
+ height: transformValueUnit(40),
8
+ width: transformValueUnit(40),
9
+ // color: textColor,
10
+ backgroundImage: `url('${item?.icon}')`,
11
+ }"
12
+ />
13
+ <view v-if="iconType === 0" class="mr-12rpx">
14
+ <wd-icon
15
+ class-prefix="iconfont"
16
+ v-bind="{
17
+ name: item?.icon || '',
18
+ size: transformValueUnit(40),
19
+ // color: textColor,
20
+ }"
21
+ />
22
+ </view>
3
23
  <view class="flex-1 noticeBar relative overflow-hidden">
4
24
  <view
5
- :class="`absolute left0 top0 noticeItem flex overflow-hidden${lens == 1 ? ' infinite' : ''}${showAni ? ' animation' : ''}`"
25
+ :class="`text-28rpx absolute left-0 top-0 noticeItem flex overflow-hidden${lens == 1 ? ' infinite' : ''}${showAni ? ' animation' : ''}`"
6
26
  :style="{
7
- animationDuration: getTime(text),
27
+ animationDuration: getTime(item?.noticeContent),
8
28
  }"
9
29
  >
10
- {{ text }}
30
+ {{ item?.noticeContent }}
31
+ <lcb-action-view v-bind="item?.link" customClass="absolute top-0 left-0 right-0 bottom-0" />
11
32
  </view>
12
33
  </view>
13
34
  </view>
@@ -16,6 +37,7 @@
16
37
  <script setup lang="ts">
17
38
  import { NoticeBarItemProps } from '../types'
18
39
  import { computed } from 'vue'
40
+ import { transformValueUnit } from '../../../utils/transform'
19
41
  defineOptions({
20
42
  name: 'NoticeBarItem',
21
43
  options: {
@@ -24,7 +46,9 @@ defineOptions({
24
46
  styleIsolation: 'shared',
25
47
  },
26
48
  })
27
- const props = defineProps<NoticeBarItemProps>()
49
+ const props = withDefaults(defineProps<NoticeBarItemProps>(), {
50
+ textSpeed: 1,
51
+ })
28
52
  // const { proxy } = getCurrentInstance() as any
29
53
  const showAni = computed(() => {
30
54
  // const query = uni.createSelectorQuery().in(proxy)
@@ -32,12 +56,15 @@ const showAni = computed(() => {
32
56
  // query.exec((res) => {
33
57
  // console.log(res)
34
58
  // })
35
- return props.current === props.idx && (props.text?.length || 0) > 25
59
+ const len = props.item?.noticeContent?.length || 0
60
+ // console.log('showAni', props.idx, len)
61
+ return props.current === props.idx && len > 25
36
62
  })
37
63
 
38
64
  function getTime(text: string | undefined) {
39
65
  const len = text?.length || 0
40
- return `${(50 - len) / 10 + 3}s`
66
+ // console.log('item---', props.textSpeed)
67
+ return `${((50 - len) / 10) * props.textSpeed + 3}s`
41
68
  }
42
69
  </script>
43
70
  <style lang="scss" scoped>
@@ -1,9 +1,23 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props">
3
- <swiper class="swiper" circular :autoplay="true" :disableTouch="true" :interval="interval" :vertical="vertical"
4
- @change="onSwiperChange">
5
- <swiper-item v-for="item in items" :key="item.id">
6
- <Item :idx="0" :current="current" :text="item.text" :lens="items?.length" />
3
+ <swiper
4
+ class="swiper"
5
+ circular
6
+ :autoplay="true"
7
+ :disableTouch="true"
8
+ :interval="interval"
9
+ :vertical="direction == 'up'"
10
+ @change="onSwiperChange"
11
+ >
12
+ <swiper-item v-for="(item, idx) in items" :key="item.id">
13
+ <Item
14
+ :idx="idx"
15
+ :current="current"
16
+ :lens="items?.length"
17
+ :iconType="iconType"
18
+ :item="item"
19
+ :textSpeed="textSpeed"
20
+ />
7
21
  </swiper-item>
8
22
  <!-- <swiper-item>
9
23
  <Item :idx="1" :current="current" text="请填写公告111" @setInterval="onSetInterval" />
@@ -21,7 +35,7 @@ import { LcbNoticeBarProps } from './types'
21
35
  import Item from './Item/index.vue'
22
36
 
23
37
  defineOptions({
24
- name: 'LcbNoticeBar',
38
+ name: 'LcbNotice',
25
39
  options: {
26
40
  addGlobalClass: true,
27
41
  virtualHost: true,
@@ -30,12 +44,13 @@ defineOptions({
30
44
  })
31
45
 
32
46
  const props = withDefaults(defineProps<LcbNoticeBarProps>(), {
33
-
47
+ textSpeed: 1,
34
48
  })
35
49
 
36
50
  function getTime(text: string | undefined) {
37
- const len = text?.length || 0;
38
- return len > 25 ? (50 - len) / 10 * 1200 + 3000 : 3000;
51
+ const len = text?.length || 0
52
+ // console.log('props.textSpeed', len, props.textSpeed)
53
+ return len > 25 ? ((50 - len) / 10) * props.textSpeed * 1000 + 3000 : 3000
39
54
  }
40
55
  // const params = ref<number>(0)
41
56
  // const model = defineModel<number>()
@@ -43,17 +58,15 @@ const current = defineModel({ type: Number, default: 0 })
43
58
  const interval = defineModel('interval', { type: Number, default: 3000 })
44
59
  function onSwiperChange(item: any) {
45
60
  // console.log('current.value', current.value)
46
- current.value = item?.detail?.current;
47
- interval.value = getTime(props.items?.[current.value]?.text);
61
+ current.value = item?.detail?.current
62
+ interval.value = getTime(props.items?.[current.value]?.noticeContent)
48
63
  // console.log('onSwiperChange item', item)
49
64
  // console.log('interval.value', interval.value)
50
65
  }
51
66
 
52
-
53
67
  // function onSetInterval(val: number) {
54
68
  // interval.value = val;
55
69
  // }
56
-
57
70
  </script>
58
71
 
59
72
  <style lang="scss" scoped>
@@ -1,13 +1,18 @@
1
- // import { ActionView } from 'action'
1
+ import { LcbActionViewProps } from '../../components/lcb-action-view/types'
2
2
  interface NoticeItem {
3
3
  id?: number
4
- text?: string
4
+ noticeContent?: string
5
+ icon?: string
6
+ link?: LcbActionViewProps
5
7
  }
6
8
 
7
9
  export interface LcbNoticeBarProps {
8
10
  // Define the component's prop types here
9
11
  items?: Partial<NoticeItem>[]
10
12
  vertical?: boolean
13
+ iconType?: number
14
+ direction?: string
15
+ textSpeed?: number
11
16
  }
12
17
 
13
18
  export interface NoticeBarItemProps {
@@ -15,5 +20,8 @@ export interface NoticeBarItemProps {
15
20
  current?: number
16
21
  text?: string
17
22
  lens?: number
23
+ iconType?: number
24
+ item?: NoticeItem,
25
+ textSpeed?: number
18
26
  // setInterval?: Function
19
27
  }
@@ -54,7 +54,7 @@ const props = withDefaults(defineProps<LcbUserOrderProps>(), {
54
54
  paddingHorizontal: 0,
55
55
  blurSize: 5,
56
56
  })
57
- const statusNumbers = ['0', '1', '2', '3', '5', '']
57
+ const statusNumbers = ['0', '1', '4', '2', '3', '5', '']
58
58
  const iconList = computed(() => {
59
59
  const list: IIconList[] = []
60
60
  for (let i = 0; i < statusNumbers.length; i++) {
@@ -35,20 +35,31 @@ export interface LcbUserOrderProps {
35
35
  iconType0?: 0 | 1
36
36
  iconName0?: string
37
37
  iconUpload0?: string
38
+
38
39
  iconTitle1?: string
39
40
  iconType1?: 0 | 1
40
41
  iconName1?: string
41
42
  iconUpload1?: string
43
+ iconShow1?: boolean
44
+
42
45
  iconTitle2?: string
43
46
  iconType2?: 0 | 1
44
47
  iconName2?: string
45
48
  iconUpload2?: string
46
49
  iconShow2?: boolean
50
+
47
51
  iconTitle3?: string
48
52
  iconType3?: 0 | 1
49
53
  iconName3?: string
50
54
  iconUpload3?: string
51
55
  iconShow3?: boolean
56
+
57
+ iconTitle4?: string
58
+ iconType4?: 0 | 1
59
+ iconName4?: string
60
+ iconUpload4?: string
61
+ iconShow4?: boolean
62
+
52
63
  iconTitle5?: string
53
64
  iconType5?: 0 | 1
54
65
  iconName5?: string
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <View class="">
3
+ <view class="font-bold leading-none" :style="{
4
+ fontSize: transformValueUnit(numsSize),
5
+ color: numsColor,
6
+ }">0</view>
7
+ <view class="mt-15rpx" :style="{
8
+ fontSize: transformValueUnit(titleSize),
9
+ color: titleColor,
10
+ }">{{ title }}</view>
11
+ </View>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import { NumsItemProps } from '../types'
16
+ import { transformValueUnit } from '../../../utils/transform'
17
+
18
+ defineProps<NumsItemProps>()
19
+
20
+ </script>
@@ -1,96 +1,74 @@
1
1
  <template>
2
- <lcb-block
3
- v-bind="{
4
- paddingTop,
5
- paddingBottom,
6
- paddingLeft,
7
- paddingRight,
8
- backgroundColor: bgStyle === 1 ? backgroundColor : '',
9
- backgroundImage: bgStyle === 2 ? backgroundImage : '',
10
- }"
11
- >
2
+ <lcb-block v-bind="{
3
+ paddingTop,
4
+ paddingBottom,
5
+ paddingHorizontal,
6
+ backgroundColor: bgStyle === 1 ? backgroundColor : '',
7
+ backgroundImage: bgStyle === 2 ? backgroundImage : '',
8
+ }">
9
+ <view class="anyTopGap" :style="{
10
+ paddingTop: padTop,
11
+ }" />
12
12
  <view class="flex flex-items-center">
13
- <wd-img
14
- v-if="!!photoUrl"
15
- v-bind="{
16
- width: transformValueUnit(photoSize),
17
- height: transformValueUnit(photoSize),
18
- round: photoRound,
19
- src: photoUrl,
20
- }"
21
- class="mr-20rpx"
22
- />
23
- <view
24
- v-if="!photoUrl"
25
- :style="{
26
- width: transformValueUnit(photoSize),
27
- height: transformValueUnit(photoSize),
28
- borderRadius: photoRound ? '50%' : '',
29
- }"
30
- class="bg-#eee userPlace mr-20rpx"
31
- >
13
+ <wd-img v-if="!!photoUrl" v-bind="{
14
+ width: transformValueUnit(photoSize),
15
+ height: transformValueUnit(photoSize),
16
+ round: photoRound,
17
+ src: photoUrl,
18
+ }" class="mr-20rpx" />
19
+ <view v-if="!photoUrl" :style="{
20
+ width: transformValueUnit(photoSize),
21
+ height: transformValueUnit(photoSize),
22
+ borderRadius: photoRound ? '50%' : '',
23
+ }" class="bg-#eee userPlace mr-40rpx">
32
24
  <!-- flex justify-center items-center overflow-hidden relative -->
33
25
  <!-- <wd-icon name="user" :size="transformValueUnit(photoSize * 0.9)" color="#ddd" class="absolute photoIcon"></wd-icon> -->
34
26
  </view>
35
27
  <view class="flex-1">
36
- <view
37
- class="font-bold"
38
- :style="{
39
- fontSize: transformValueUnit(textSize),
40
- color: textColor,
41
- }"
42
- >
43
- 用户
28
+ <view class="font-bold" :style="{
29
+ fontSize: transformValueUnit(textSize),
30
+ color: textColor,
31
+ }">
32
+ 授权登录
44
33
  </view>
45
34
  <view class="flex" v-if="editBtn == true">
46
- <view
47
- class="flex flex-content-center flex-items-center mt-5px border-style-solid"
48
- :style="{
49
- color: textColor,
50
- borderWidth: editBorder ? transformValueUnit(1) : 0,
51
- borderColor: textColor,
52
- padding: editBorder ? `2px ${editSize / 2.5}px 2px ${editSize / 2.5}px` : '',
53
- borderRadius: transformValueUnit(30),
54
- fontSize: transformValueUnit(editSize),
55
- }"
56
- >
35
+ <view class="flex flex-content-center flex-items-center mt-5px border-style-solid" :style="{
36
+ color: textColor,
37
+ borderWidth: editBorder ? transformValueUnit(1) : 0,
38
+ borderColor: textColor,
39
+ padding: editBorder ? `2px ${editSize / 2.5}px 2px ${editSize / 2.5}px` : '',
40
+ borderRadius: transformValueUnit(30),
41
+ fontSize: transformValueUnit(editSize),
42
+ }">
57
43
  <view>{{ editText }}</view>
58
44
  </view>
59
45
  </view>
60
46
  </view>
61
- <div
62
- v-if="moreIcon == true && iconType === 1"
63
- class="overflow-hidden bg-no-repeat bg-contain"
64
- :style="{
65
- height: transformValueUnit(textSize),
66
- width: transformValueUnit(textSize),
67
- color: textColor,
68
- backgroundImage: `url('${iconUpload}')`,
69
- }"
70
- />
47
+ <div v-if="moreIcon == true && iconType === 1" class="overflow-hidden bg-no-repeat bg-contain" :style="{
48
+ height: transformValueUnit(textSize),
49
+ width: transformValueUnit(textSize),
50
+ color: textColor,
51
+ backgroundImage: `url('${iconUpload}')`,
52
+ }" />
71
53
  <view v-if="moreIcon == true && iconType === 0">
72
- <wd-icon
73
- class-prefix="iconfont"
74
- v-bind="{
75
- name: iconName,
76
- size: transformValueUnit(textSize),
77
- color: textColor,
78
- }"
79
- />
54
+ <wd-icon class-prefix="iconfont" v-bind="{
55
+ name: iconName,
56
+ size: transformValueUnit(textSize),
57
+ color: textColor,
58
+ }" />
80
59
  </view>
81
60
  </view>
82
- <view
83
- v-if="valuesCard == true || coupons == true || presales == true"
84
- class="flex flex-justify-between text-center mt-15px"
85
- :style="{
61
+ <view v-if="valuesCard == true || coupons == true || presales == true || memberPoints == true"
62
+ class="flex flex-justify-between text-center" :style="{
86
63
  color: textColor,
87
- }"
88
- >
89
- <View v-if="valuesCard == true" class="">
90
- <view class="text-22px font-bold">0</view>
91
- <view class="text-12px optName">储值卡</view>
92
- </View>
93
- <View v-if="coupons == true" class="">
64
+ marginTop: transformValueUnit(numsMarginTop),
65
+ padding: `0 ${transformValueUnit(numsPadLR || 0)}`,
66
+ }">
67
+ <Nums v-if="valuesCard == true" v-bind="$props" title="储值卡" />
68
+ <Nums v-if="coupons == true" v-bind="$props" title="优惠券" />
69
+ <Nums v-if="presales == true" v-bind="$props" title="预售券" />
70
+ <Nums v-if="memberPoints == true" v-bind="$props" title="会员积分" />
71
+ <!-- <View v-if="coupons == true" class="">
94
72
  <view class="text-22px font-bold">0</view>
95
73
  <view class="text-12px optName">优惠券</view>
96
74
  </View>
@@ -98,6 +76,10 @@
98
76
  <view class="text-22px font-bold">0</view>
99
77
  <view class="text-12px optName">预售券</view>
100
78
  </View>
79
+ <View v-if="memberPoints == true" class="">
80
+ <view class="text-22px font-bold">0</view>
81
+ <view class="text-12px optName">会员积分</view>
82
+ </View> -->
101
83
  </view>
102
84
  </lcb-block>
103
85
  </template>
@@ -105,7 +87,11 @@
105
87
  <script setup lang="ts">
106
88
  import { LcbUserTopProps } from './types'
107
89
  import { transformValueUnit } from '../../utils/transform'
90
+ import Nums from './Nums/index.vue'
108
91
  import { styleText } from 'util'
92
+ import { computed } from 'vue';
93
+ import { addUnit } from '@tplc/wot/components/common/util'
94
+ const { statusBarHeight } = uni.getSystemInfoSync()
109
95
  defineOptions({
110
96
  name: 'LcbUserTop',
111
97
  options: {
@@ -130,16 +116,21 @@ withDefaults(defineProps<LcbUserTopProps>(), {
130
116
  editSize: 28,
131
117
  bgStyle: 1,
132
118
  })
119
+ const padTop = computed(() => {
120
+ return addUnit(statusBarHeight || 0)
121
+ })
133
122
  </script>
134
123
  <style lang="scss" scoped>
135
- .optName {
136
- opacity: 0.7;
137
- }
124
+ // .optName {
125
+ // opacity: 0.7;
126
+ // }
127
+
138
128
  .userPlace {
139
- background-image: url('https://image-c.weimobwmc.com/static-resource/33c59afc76d04917a8b3b62520835db6.jpg');
129
+ background-image: url('https://lycs.eluying.com/material/icon/1/20240925185540/userPhoto.jpg');
140
130
  background-size: contain;
141
131
  background-position: center bottom;
142
132
  }
133
+
143
134
  .photoIcon {
144
135
  bottom: -20rpx;
145
136
  left: 50%;
@@ -46,8 +46,8 @@ export interface LcbUserTopProps {
46
46
 
47
47
  paddingTop?: number
48
48
  paddingBottom?: number
49
- paddingLeft?: number
50
- paddingRight?: number
49
+ paddingHorizontal?: number
50
+ // paddingRight?: number
51
51
  photoUrl?: string
52
52
  photoRound?: boolean
53
53
  photoSize?: number
@@ -67,4 +67,20 @@ export interface LcbUserTopProps {
67
67
  valuesCard?: boolean
68
68
  coupons?: boolean
69
69
  presales?: boolean
70
+ memberPoints?: boolean
71
+ numsSize?: number
72
+ numsColor?: string
73
+ titleSize?: number
74
+ titleColor?: string
75
+ numsMarginTop?: number
76
+ numsPadLR?: number
70
77
  }
78
+
79
+ export interface NumsItemProps {
80
+ numsSize?: number
81
+ numsColor?: string
82
+ titleSize?: number
83
+ titleColor?: string
84
+ value?: number
85
+ title?: string
86
+ }
package/global.d.ts CHANGED
@@ -12,7 +12,7 @@ declare module 'vue' {
12
12
  'lcb-image': (typeof import('./types/components/lcb-image/lcb-image.vue'))['default']
13
13
  'lcb-img-nav': (typeof import('./types/components/lcb-img-nav/lcb-img-nav.vue'))['default']
14
14
  'lcb-nav': (typeof import('./types/components/lcb-nav/lcb-nav.vue'))['default']
15
- 'lcb-notice-bar': (typeof import('./types/components/lcb-notice-bar/lcb-notice-bar.vue'))['default']
15
+ 'lcb-notice': (typeof import('./types/components/lcb-notice/lcb-notice.vue'))['default']
16
16
  'lcb-swiper': (typeof import('./types/components/lcb-swiper/lcb-swiper.vue'))['default']
17
17
  'lcb-title': (typeof import('./types/components/lcb-title/lcb-title.vue'))['default']
18
18
  'lcb-user-order': (typeof import('./types/components/lcb-user-order/lcb-user-order.vue'))['default']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.22",
3
+ "version": "0.0.25",
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.7"
14
+ "@tplc/wot": "0.1.9"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -21,4 +21,6 @@ export interface LcbImgNavProps extends LcbBlockProps {
21
21
  iconRadius?: number
22
22
  /** 文字与图标距离 */
23
23
  iconTextMargin?: number
24
+ showTitle?: boolean
25
+ title?: string
24
26
  }
@@ -0,0 +1,56 @@
1
+ import { NoticeBarItemProps } from '../types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<NoticeBarItemProps>,
5
+ {
6
+ textSpeed: number
7
+ }
8
+ >,
9
+ {},
10
+ unknown,
11
+ {},
12
+ {},
13
+ import('vue').ComponentOptionsMixin,
14
+ import('vue').ComponentOptionsMixin,
15
+ {},
16
+ string,
17
+ import('vue').PublicProps,
18
+ Readonly<
19
+ import('vue').ExtractPropTypes<
20
+ __VLS_WithDefaults<
21
+ __VLS_TypePropsToOption<NoticeBarItemProps>,
22
+ {
23
+ textSpeed: number
24
+ }
25
+ >
26
+ >
27
+ >,
28
+ {
29
+ textSpeed: number
30
+ },
31
+ {}
32
+ >
33
+ export default _default
34
+ type __VLS_WithDefaults<P, D> = {
35
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
36
+ ? __VLS_Prettify<
37
+ P[K] & {
38
+ default: D[K]
39
+ }
40
+ >
41
+ : P[K]
42
+ }
43
+ type __VLS_Prettify<T> = {
44
+ [K in keyof T]: T[K]
45
+ } & {}
46
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
47
+ type __VLS_TypePropsToOption<T> = {
48
+ [K in keyof T]-?: {} extends Pick<T, K>
49
+ ? {
50
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
51
+ }
52
+ : {
53
+ type: import('vue').PropType<T[K]>
54
+ required: true
55
+ }
56
+ }
@@ -6,7 +6,12 @@ type __VLS_PublicProps = {
6
6
  interval?: NonNullable<(typeof interval)['value']>
7
7
  } & typeof __VLS_typeProps
8
8
  declare const _default: import('vue').DefineComponent<
9
- __VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {}>,
9
+ __VLS_WithDefaults<
10
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
11
+ {
12
+ textSpeed: number
13
+ }
14
+ >,
10
15
  {},
11
16
  unknown,
12
17
  {},
@@ -21,13 +26,20 @@ declare const _default: import('vue').DefineComponent<
21
26
  import('vue').PublicProps,
22
27
  Readonly<
23
28
  import('vue').ExtractPropTypes<
24
- __VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {}>
29
+ __VLS_WithDefaults<
30
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
31
+ {
32
+ textSpeed: number
33
+ }
34
+ >
25
35
  >
26
36
  > & {
27
37
  'onUpdate:modelValue'?: ((modelValue: any) => any) | undefined
28
38
  'onUpdate:interval'?: ((interval: number) => any) | undefined
29
39
  },
30
- {},
40
+ {
41
+ textSpeed: number
42
+ },
31
43
  {}
32
44
  >
33
45
  export default _default
@@ -0,0 +1,24 @@
1
+ import { LcbActionViewProps } from '../../components/lcb-action-view/types'
2
+ interface NoticeItem {
3
+ id?: number
4
+ noticeContent?: string
5
+ icon?: string
6
+ link?: LcbActionViewProps
7
+ }
8
+ export interface LcbNoticeBarProps {
9
+ items?: Partial<NoticeItem>[]
10
+ vertical?: boolean
11
+ iconType?: number
12
+ direction?: string
13
+ textSpeed?: number
14
+ }
15
+ export interface NoticeBarItemProps {
16
+ idx?: number
17
+ current?: number
18
+ text?: string
19
+ lens?: number
20
+ iconType?: number
21
+ item?: NoticeItem
22
+ textSpeed?: number
23
+ }
24
+ export {}
@@ -30,6 +30,7 @@ export interface LcbUserOrderProps {
30
30
  iconType1?: 0 | 1
31
31
  iconName1?: string
32
32
  iconUpload1?: string
33
+ iconShow1?: boolean
33
34
  iconTitle2?: string
34
35
  iconType2?: 0 | 1
35
36
  iconName2?: string
@@ -40,6 +41,11 @@ export interface LcbUserOrderProps {
40
41
  iconName3?: string
41
42
  iconUpload3?: string
42
43
  iconShow3?: boolean
44
+ iconTitle4?: string
45
+ iconType4?: 0 | 1
46
+ iconName4?: string
47
+ iconUpload4?: string
48
+ iconShow4?: boolean
43
49
  iconTitle5?: string
44
50
  iconType5?: 0 | 1
45
51
  iconName5?: string
@@ -1,6 +1,6 @@
1
- import { NoticeBarItemProps } from '../types'
1
+ import { NumsItemProps } from '../types'
2
2
  declare const _default: import('vue').DefineComponent<
3
- __VLS_TypePropsToOption<NoticeBarItemProps>,
3
+ __VLS_TypePropsToOption<NumsItemProps>,
4
4
  {},
5
5
  unknown,
6
6
  {},
@@ -10,7 +10,7 @@ declare const _default: import('vue').DefineComponent<
10
10
  {},
11
11
  string,
12
12
  import('vue').PublicProps,
13
- Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<NoticeBarItemProps>>>,
13
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<NumsItemProps>>>,
14
14
  {},
15
15
  {}
16
16
  >
@@ -54,8 +54,6 @@ declare const _default: import('vue').DefineComponent<
54
54
  {
55
55
  paddingTop: number
56
56
  paddingBottom: number
57
- paddingLeft: number
58
- paddingRight: number
59
57
  iconName: string
60
58
  textColor: string
61
59
  iconType: 0 | 1
@@ -1,8 +1,7 @@
1
1
  export interface LcbUserTopProps {
2
2
  paddingTop?: number
3
3
  paddingBottom?: number
4
- paddingLeft?: number
5
- paddingRight?: number
4
+ paddingHorizontal?: number
6
5
  photoUrl?: string
7
6
  photoRound?: boolean
8
7
  photoSize?: number
@@ -22,4 +21,19 @@ export interface LcbUserTopProps {
22
21
  valuesCard?: boolean
23
22
  coupons?: boolean
24
23
  presales?: boolean
24
+ memberPoints?: boolean
25
+ numsSize?: number
26
+ numsColor?: string
27
+ titleSize?: number
28
+ titleColor?: string
29
+ numsMarginTop?: number
30
+ numsPadLR?: number
31
+ }
32
+ export interface NumsItemProps {
33
+ numsSize?: number
34
+ numsColor?: string
35
+ titleSize?: number
36
+ titleColor?: string
37
+ value?: number
38
+ title?: string
25
39
  }
@@ -1 +1 @@
1
- export declare const transformValueUnit: (value?: number, uni?: string) => string | undefined
1
+ export declare const transformValueUnit: (value?: number, uni?: string) => string
@@ -1,3 +1,3 @@
1
1
  export const transformValueUnit = (value?: number, uni = 'rpx') => {
2
- return typeof value === 'number' ? value + uni : value
2
+ return typeof value === 'number' ? value + uni : '0rpx'
3
3
  }
@@ -1,15 +0,0 @@
1
- interface NoticeItem {
2
- id?: number
3
- text?: string
4
- }
5
- export interface LcbNoticeBarProps {
6
- items?: Partial<NoticeItem>[]
7
- vertical?: boolean
8
- }
9
- export interface NoticeBarItemProps {
10
- idx?: number
11
- current?: number
12
- text?: string
13
- lens?: number
14
- }
15
- export {}