@tplc/business 0.0.25 → 0.0.26

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,16 @@
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.26](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.10...v0.0.26) (2024-09-27)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 处理为esm ([3ac1688](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3ac168860e3345a015b106c3400b7fcee8a80a6a))
11
+ * 支持翻译 ([87a54ee](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/87a54eebb1dfc0df0a907cafde642fa240fd2439))
12
+ * 新增数据同步 ([c1c8a59](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c1c8a5960a1898e8e1b2ace64c561a98ee992324))
13
+ * 翻译本地化 ([8e448a2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8e448a2aac46191f6064551b90eec64839452614))
14
+
5
15
  ### [0.0.25](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.24...v0.0.25) (2024-09-25)
6
16
 
7
17
 
@@ -68,7 +68,7 @@
68
68
  <script setup lang="ts">
69
69
  import { computed, ref } from 'vue'
70
70
  import { LcbHomeSearch } from './types'
71
- import dayjs from 'dayjs'
71
+ import dayjs from 'dayjs/esm'
72
72
  const dayRange = ref([dayjs(), dayjs().add(1, 'day')])
73
73
  const nightCount = computed(() => {
74
74
  return dayRange.value[1].diff(dayRange.value[0], 'day')
@@ -1,53 +1,32 @@
1
1
  <template>
2
- <view
3
- v-for="(item, index) in items"
4
- :key="index"
5
- :class="styleGroup == 2 ? 'flex-1' : ''"
6
- :style="{
7
- marginLeft: transformValueUnit(styleGroup != 1 && index > 0 ? imageMargin : 0),
8
- marginTop: transformValueUnit(styleGroup == 1 && index > 0 ? imageMargin : 0),
9
- // marginLeft: transformValueUnit(styleGroup == 2 && index > 0 ? imageMargin : 0),
10
- width: styleGroup == 3 ? transformValueUnit(imageSize) : 'auto',
11
- }"
12
- >
2
+ <view v-for="(item, index) in items" :key="index" :class="styleGroup == 2 ? 'flex-1' : ''" :style="{
3
+ marginLeft: transformValueUnit(styleGroup != 1 && index > 0 ? imageMargin : 0),
4
+ marginTop: transformValueUnit(styleGroup == 1 && index > 0 ? imageMargin : 0),
5
+ // marginLeft: transformValueUnit(styleGroup == 2 && index > 0 ? imageMargin : 0),
6
+ width: styleGroup == 3 ? transformValueUnit(imageSize) : 'auto',
7
+ }">
13
8
  <view class="relative overflow-hidden">
14
- <wd-img
15
- v-if="!!item.url"
16
- :width="`${styleGroup == 3 ? transformValueUnit(imageSize) : '100%'}`"
17
- @click="item.mode == 1 && onClickItem(item)"
18
- :src="item.url"
19
- :enable-preview="enablePreview"
20
- mode="widthFix"
21
- :class="`${styleGroup == 3 ? 'overflow-hidden' : 'overflow-hidden block'}`"
22
- :style="{
9
+ <wd-img v-if="!!item.url" :width="`${styleGroup == 3 ? transformValueUnit(imageSize) : '100%'}`"
10
+ @click="item.mode == 1 && onClickItem(item)" :src="item.url" :enable-preview="enablePreview" mode="widthFix"
11
+ :class="`${styleGroup == 3 ? 'overflow-hidden' : 'overflow-hidden block'}`" :style="{
23
12
  borderRadius: transformValueUnit(imageRadius),
24
13
  display: 'block',
25
- }"
26
- />
14
+ }" />
27
15
 
28
- <view
29
- v-if="!item.url"
30
- class="flex justify-center items-center bg-light color-gray overflow-hidden"
31
- :style="{
32
- height: transformValueUnit(styleGroup == 3 ? 300 : 400),
33
- borderRadius: transformValueUnit(imageRadius),
34
- }"
35
- >
16
+ <view v-if="!item.url" class="flex justify-center items-center bg-light color-gray overflow-hidden" :style="{
17
+ height: transformValueUnit(styleGroup == 3 ? 300 : 400),
18
+ borderRadius: transformValueUnit(imageRadius),
19
+ }">
36
20
  <wd-icon name="image" size="50px"></wd-icon>
37
21
  </view>
38
22
 
39
- <view
40
- v-for="(each, edx) in item.hotSpot"
41
- :key="edx"
42
- class="link absolute"
43
- :style="{
44
- width: transformValueUnit(getRealSize(each.width)),
45
- height: transformValueUnit(getRealSize(each.height)),
46
- left: transformValueUnit(getRealSize(each.x)),
47
- top: transformValueUnit(getRealSize(each.y)),
48
- }"
49
- >
50
- <lcb-action-view v-bind="each.urlObj" />
23
+ <view v-for="(each, edx) in item.hotSpot" :key="edx" class="link absolute" :style="{
24
+ width: transformValueUnit(getRealSize(each.width)),
25
+ height: transformValueUnit(getRealSize(each.height)),
26
+ left: transformValueUnit(getRealSize(each.x)),
27
+ top: transformValueUnit(getRealSize(each.y)),
28
+ }">
29
+ <lcb-action-view v-bind="each.urlObj" customClass="link" />
51
30
  </view>
52
31
  </view>
53
32
  </view>
@@ -84,14 +63,12 @@ function getRealSize(size: number = 0) {
84
63
  </script>
85
64
  <style lang="scss" scoped>
86
65
  .link {
87
- .lcb-action-btn {
88
- position: absolute;
89
- width: 100%;
90
- height: 100%;
91
- top: 0;
92
- bottom: 0;
93
- left: 0;
94
- right: 0;
95
- }
66
+ position: absolute;
67
+ width: 100%;
68
+ height: 100%;
69
+ top: 0;
70
+ bottom: 0;
71
+ left: 0;
72
+ right: 0;
96
73
  }
97
74
  </style>
@@ -1,6 +1,14 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props">
3
- <lcb-title v-if="showTitle" :title="title" :marginHorizontal="0" />
3
+ <lcb-title v-if="showTitle" v-bind="{
4
+ title,
5
+ marginHorizontal: 0,
6
+ paddingHorizontal: titlePadding,
7
+ paddingBottom: 25,
8
+ fontSize,
9
+ fontWeight,
10
+ color,
11
+ }" />
4
12
  <view :style="{
5
13
  gridTemplateColumns: `repeat(${pictureDistribution}, minmax(0, 1fr))`,
6
14
  }" :class="[styleGroup === 2 ? 'mutil' : 'single']">
@@ -26,4 +26,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
26
26
  //是否显示标题
27
27
  showTitle?: boolean
28
28
  title?: string
29
+ fontWeight?: number
30
+ fontSize?: number
31
+ color?: string
32
+ titlePadding?: number
29
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
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.9"
14
+ "@tplc/wot": "0.1.10"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -23,4 +23,8 @@ export interface LcbImgNavProps extends LcbBlockProps {
23
23
  iconTextMargin?: number
24
24
  showTitle?: boolean
25
25
  title?: string
26
+ fontWeight?: number
27
+ fontSize?: number
28
+ color?: string
29
+ titlePadding?: number
26
30
  }