@tplc/business 0.0.78 → 0.0.80

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,59 @@
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.80](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.78...v0.0.80) (2024-11-26)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.0.79 ([f149975](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f1499756bccbee4fe6e1c3794e58604606c6ad00))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * 新增 按钮模式 ([e839a01](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e839a01dd81996dae49a5259940cbfea6d03acca))
16
+ * 新增usertop点击路径 ([3e37a4d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3e37a4d49806be2d756102fa1cc80b72b4e487fb))
17
+
18
+ ### [0.0.79](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.73...v0.0.79) (2024-11-26)
19
+
20
+
21
+ ### 🐛 Bug Fixes | Bug 修复
22
+
23
+ * 修复lcb-home-search ([7810778](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/78107780e9660739e0d426810fb5b86eb9fa0201))
24
+ * 修改qrcode 兼容小程序 ([e04f9aa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e04f9aaeaa64e7681e01bcbd860f075186cdce32))
25
+ * 新增user-top点击地址 ([7c69203](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7c6920384dd6750496a78a1480b0659c59ff0a55))
26
+
27
+
28
+ ### 🚀 Chore | 构建/工程依赖/工具
29
+
30
+ * **release:** 0.0.74 ([612f0f6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/612f0f69e0a2d2145898e6d41d732352b18f11c8))
31
+ * **release:** 0.0.75 ([d52fcda](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d52fcda79e12d0fb6f40776297fedd5061c1215f))
32
+ * **release:** 0.0.76 ([f75c168](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f75c168d3b9165fe722dfef97753f4c4089914ae))
33
+ * **release:** 0.0.77 ([24e3ae2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/24e3ae2bc1ea9d20b96af065fcfa4baf56a42ffc))
34
+ * **release:** 0.0.78 ([323cfbc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/323cfbc8f61b53c8e9bd093e6f1577076590d43b))
35
+ * **release:** 0.1.31 ([bb7e5bb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bb7e5bb67c21da5b6fcb5deb1289d086b8f813b0))
36
+ * **release:** 0.1.32 ([3f28000](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3f280007de08dfd18e51277d044ec2e20aa5878e))
37
+ * **release:** 0.1.33 ([4fac397](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4fac39781eaa045c500b681916a3d8c1cfd71796))
38
+ * **release:** 0.1.34 ([9596a6f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9596a6f894ad8ab08d4c1af9943154b822022b75))
39
+ * **release:** 0.1.35 ([a237dd5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a237dd5af30d425d954ab53755959204f25c2a92))
40
+ * **release:** 0.1.36 ([f390dc4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f390dc455a22d9f16e4ff3facbd41dcc02902367))
41
+ * **release:** 0.1.37 ([557a2ba](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/557a2ba947c1e9936a006d22ccd8211107fd0aa1))
42
+ * **release:** 0.1.38 ([6375a2c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6375a2c3c39e29ad9ebd388bff41e96101d78c5a))
43
+ * **release:** 0.1.39 ([2bc41d1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2bc41d15414a5f6926099eefeee2a69f28a61f89))
44
+
45
+
46
+ ### ✨ Features | 新功能
47
+
48
+ * overlay inject ([e4880dc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e4880dc9008191dbdf42b0c6c720be04d9ed4ca8))
49
+ * lcb-img-nav 支持调整底色 ([cde9bcc](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cde9bcce0d343e1ec9159d59b75d0596c16130c2))
50
+ * 完成富文本组件 ([6ca6d20](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6ca6d20100724795e086a45d25608db6854a7ebf))
51
+ * 尝试增加自定义组件交互 ([6a08c74](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6a08c74c3bd07af327a1dd23dddbd4e2ecab88df))
52
+ * 新增usertop点击路径 ([3e37a4d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3e37a4d49806be2d756102fa1cc80b72b4e487fb))
53
+ * 自定义组件可配置 ([8ed2eba](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8ed2eba97f007a03eb96313e219b265b7b22ff1c))
54
+ * 自定义组件可配置 ([0186bbb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0186bbbf1efbf1541fa0246465e88f1044ca13e6))
55
+ * 自定义组件可配置 ([92e6e54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/92e6e5444dc7cc17297386ac9eb760c0b840b6f7))
56
+ * 自定义组件可配置 ([a8837ad](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a8837ade986287ae026eca69f9d4984ce02a89f4))
57
+
5
58
  ### [0.0.78](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.39...v0.0.78) (2024-11-25)
6
59
 
7
60
 
@@ -31,7 +31,14 @@ const emits = defineEmits<{
31
31
  }>()
32
32
 
33
33
  const openType = computed(() => {
34
- return { 88: 'getPhoneNumber', 12: 'contact', 101: 'chooseAvatar' }[props.jumpType || '']
34
+ return {
35
+ 88: 'getPhoneNumber',
36
+ 12: 'contact',
37
+ 101: 'chooseAvatar',
38
+ 102: 'share',
39
+ 103: 'feedback',
40
+ 104: 'openSetting',
41
+ }[props.jumpType || '']
35
42
  })
36
43
  const onActionClick = () => {
37
44
  const { jumpAppid, jumpUrl: url, jumpType, phoneNumber } = props
@@ -2,9 +2,28 @@ export interface LcbActionViewProps {
2
2
  /**
3
3
  * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
4
4
  * 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
5
- * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像
5
+ * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页
6
6
  */
7
- jumpType?: 1 | 2 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 88 | 101
7
+ jumpType?:
8
+ | 1
9
+ | 2
10
+ | 10
11
+ | 11
12
+ | 12
13
+ | 13
14
+ | 14
15
+ | 21
16
+ | 22
17
+ | 23
18
+ | 24
19
+ | 25
20
+ | 26
21
+ | 30
22
+ | 88
23
+ | 101
24
+ | 102
25
+ | 103
26
+ | 104
8
27
  /** 跳转路径 */
9
28
  jumpUrl?: string
10
29
  /** 小程序appid */
@@ -10,12 +10,12 @@
10
10
  :use-page-scroll="!autoHeight"
11
11
  :height="autoHeight ? height : ''"
12
12
  >
13
- <slot :items="normalizeDataList"></slot>
13
+ <slot />
14
14
  </z-paging>
15
15
  </template>
16
16
 
17
17
  <script setup lang="ts">
18
- import { computed, getCurrentInstance, onMounted, ref, watch } from 'vue'
18
+ import { computed, getCurrentInstance, onMounted, ref, watch, watchEffect } from 'vue'
19
19
  import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging'
20
20
  import { LcbFilterListProps } from './type'
21
21
  import { formatJson } from '../../../../utils/utils'
@@ -35,8 +35,10 @@ const paging = ref()
35
35
  const viewPageHeight = uni.getSystemInfoSync().windowHeight
36
36
  const height = ref('')
37
37
  useZPaging(paging)
38
-
39
- const normalizeDataList = computed(() => {
38
+ const modelValue = defineModel<unknown[]>({
39
+ default: [],
40
+ })
41
+ watchEffect(() => {
40
42
  const list = dataList.value?.map?.((item: any) => {
41
43
  const imgArr = formatJson(item.coverImg, [])
42
44
  const tags = formatJson(item.tags, [])
@@ -50,7 +52,7 @@ const normalizeDataList = computed(() => {
50
52
  tags,
51
53
  }
52
54
  })
53
- return list
55
+ modelValue.value = list
54
56
  })
55
57
 
56
58
  watch(
@@ -18,21 +18,19 @@
18
18
  :sticky="sticky"
19
19
  />
20
20
 
21
- <FilterList v-bind="{ ...info.listInfo, listType, filter, ...attrs }" :autoHeight="!isSticky">
22
- <template #default="{ items }">
23
- <slot name="list" :items="items">
24
- <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items" v-if="$slots.item">
25
- <template #item="{ item }">
26
- <slot name="item" :item="item"></slot>
27
- </template>
28
- </lcb-product>
29
- <lcb-product
30
- v-bind="{ ...attrs }"
31
- :listType="listType"
32
- :items="items"
33
- v-else
34
- ></lcb-product>
35
- </slot>
21
+ <FilterList
22
+ v-bind="{ ...info.listInfo, listType, filter, ...attrs }"
23
+ :autoHeight="!isSticky"
24
+ v-model="items"
25
+ >
26
+ <slot name="list" :items="items" v-if="$slots.list" />
27
+ <template v-else>
28
+ <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items" v-if="$slots.item">
29
+ <template #item="{ item }">
30
+ <slot name="item" :item="item"></slot>
31
+ </template>
32
+ </lcb-product>
33
+ <lcb-product v-bind="{ ...attrs }" :listType="listType" :items="items" v-else></lcb-product>
36
34
  </template>
37
35
  </FilterList>
38
36
  </template>
@@ -50,6 +48,7 @@ import './index.scss'
50
48
  const attrs = useAttrs()
51
49
  /** 是否悬停 */
52
50
  const sticky = ref(false)
51
+ const items = ref([])
53
52
  defineOptions({
54
53
  name: 'LcbList',
55
54
  options: {
@@ -27,7 +27,11 @@ defineSlots<{
27
27
  <template>
28
28
  <lcb-block v-bind="$props">
29
29
  <view class="flex flex-col gap-2 p-2" v-if="listType === 'list'">
30
- <view v-for="(item, index) in items" :key="`${item?.productId}:${index}`">
30
+ <lcb-action-view
31
+ v-for="(item, index) in items"
32
+ :key="`${item?.productId}:${index}`"
33
+ v-bind="item.link"
34
+ >
31
35
  <slot name="item" :item="item">
32
36
  <lcb-product-item
33
37
  v-bind="{ ...item, ...attrs }"
@@ -65,7 +69,7 @@ defineSlots<{
65
69
  </template> -->
66
70
  </lcb-product-item>
67
71
  </slot>
68
- </view>
72
+ </lcb-action-view>
69
73
  </view>
70
74
 
71
75
  <view class="flex p-1 flex-wrap" v-if="listType === 'grid'">
@@ -1,7 +1,14 @@
1
1
  <script setup lang="ts">
2
2
  import { inject, computed, useAttrs } from 'vue'
3
3
  import { isArray } from '@tplc/wot/components/common/util'
4
-
4
+ defineOptions({
5
+ name: 'LcbProductItemView',
6
+ options: {
7
+ addGlobalClass: true,
8
+ virtualHost: true,
9
+ styleIsolation: 'shared',
10
+ },
11
+ })
5
12
  // const attrs = useAttrs()
6
13
 
7
14
  const itemProps: any = inject('lcb-product-item-props')
@@ -2,9 +2,6 @@
2
2
  import { computed, provide, useAttrs } from 'vue'
3
3
  import { LcbProductItemProps } from './types'
4
4
  import ItemValue from './components/ItemValue.vue'
5
-
6
- const isNumber = (value: any) => typeof value === 'number'
7
-
8
5
  defineOptions({
9
6
  name: 'LcbProductItem',
10
7
  options: {
@@ -13,6 +10,7 @@ defineOptions({
13
10
  styleIsolation: 'shared',
14
11
  },
15
12
  })
13
+ const isNumber = (value: any) => typeof value === 'number'
16
14
 
17
15
  const props = withDefaults(defineProps<LcbProductItemProps>(), {
18
16
  layoutType: 'horizontal',
@@ -139,7 +137,9 @@ defineSlots<{
139
137
  <template #title="{ value }"><slot name="title" :value="value" /></template>
140
138
  <template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
141
139
  <template #price="{ value }"><slot name="price" :value="value" /></template>
142
- <template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
140
+ <template #priceUnit="{ value }">
141
+ <slot name="priceUnit" :value="value" />
142
+ </template>
143
143
  <template #priceSuffix="{ value }">
144
144
  <slot name="priceSuffix" :value="value" />
145
145
  </template>
@@ -169,7 +169,9 @@ defineSlots<{
169
169
  <template #title="{ value }"><slot name="title" :value="value" /></template>
170
170
  <template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
171
171
  <template #price="{ value }"><slot name="price" :value="value" /></template>
172
- <template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
172
+ <template #priceUnit="{ value }">
173
+ <slot name="priceUnit" :value="value" />
174
+ </template>
173
175
  <template #priceSuffix="{ value }">
174
176
  <slot name="priceSuffix" :value="value" />
175
177
  </template>
@@ -256,7 +258,9 @@ defineSlots<{
256
258
  <template #title="{ value }"><slot name="title" :value="value" /></template>
257
259
  <template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
258
260
  <template #price="{ value }"><slot name="price" :value="value" /></template>
259
- <template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
261
+ <template #priceUnit="{ value }">
262
+ <slot name="priceUnit" :value="value" />
263
+ </template>
260
264
  <template #priceSuffix="{ value }">
261
265
  <slot name="priceSuffix" :value="value" />
262
266
  </template>
@@ -286,7 +290,9 @@ defineSlots<{
286
290
  <template #title="{ value }"><slot name="title" :value="value" /></template>
287
291
  <template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
288
292
  <template #price="{ value }"><slot name="price" :value="value" /></template>
289
- <template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
293
+ <template #priceUnit="{ value }">
294
+ <slot name="priceUnit" :value="value" />
295
+ </template>
290
296
  <template #priceSuffix="{ value }">
291
297
  <slot name="priceSuffix" :value="value" />
292
298
  </template>
package/package.json CHANGED
@@ -1,17 +1,26 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
7
7
  "type": "module",
8
+ "scripts": {
9
+ "pub": "pnpm dts && pnpm publish --no-git-checks",
10
+ "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
11
+ "release-major": "standard-version --release-as major ",
12
+ "release-minor": "standard-version --release-as minor",
13
+ "release-patch": "standard-version --release-as patch ",
14
+ "generateComponent": "node ./scripts/createComponent.mjs",
15
+ "generateGlobalDts": "node ./scripts/generateGlobalDts.mjs"
16
+ },
8
17
  "publishConfig": {
9
18
  "access": "public",
10
19
  "registry": "https://registry.npmjs.org/"
11
20
  },
12
21
  "peerDependencies": {
13
- "vue": ">=3.2.47",
14
- "@tplc/wot": "0.1.39"
22
+ "@tplc/wot": "workspace:*",
23
+ "vue": ">=3.2.47"
15
24
  },
16
25
  "engines": {
17
26
  "node": ">=18",
@@ -24,14 +33,5 @@
24
33
  },
25
34
  "devDependencies": {
26
35
  "standard-version": "^9.5.0"
27
- },
28
- "scripts": {
29
- "pub": "pnpm dts && pnpm publish --no-git-checks",
30
- "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
31
- "release-major": "standard-version --release-as major ",
32
- "release-minor": "standard-version --release-as minor",
33
- "release-patch": "standard-version --release-as patch ",
34
- "generateComponent": "node ./scripts/createComponent.mjs",
35
- "generateGlobalDts": "node ./scripts/generateGlobalDts.mjs"
36
36
  }
37
- }
37
+ }
@@ -2,9 +2,28 @@ export interface LcbActionViewProps {
2
2
  /**
3
3
  * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
4
4
  * 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
5
- * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像
5
+ * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页
6
6
  */
7
- jumpType?: 1 | 2 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 88 | 101
7
+ jumpType?:
8
+ | 1
9
+ | 2
10
+ | 10
11
+ | 11
12
+ | 12
13
+ | 13
14
+ | 14
15
+ | 21
16
+ | 22
17
+ | 23
18
+ | 24
19
+ | 25
20
+ | 26
21
+ | 30
22
+ | 88
23
+ | 101
24
+ | 102
25
+ | 103
26
+ | 104
8
27
  /** 跳转路径 */
9
28
  jumpUrl?: string
10
29
  /** 小程序appid */
@@ -1,19 +1,27 @@
1
1
  import { LcbFilterListProps } from './type'
2
+ declare let __VLS_typeProps: LcbFilterListProps
3
+ type __VLS_PublicProps = {
4
+ modelValue?: unknown[]
5
+ } & typeof __VLS_typeProps
2
6
  declare function __VLS_template(): {
3
- default?(_: { items: any[] }): any
7
+ default?(_: {}): any
4
8
  }
5
9
  declare const __VLS_component: import('vue').DefineComponent<
6
- __VLS_TypePropsToOption<LcbFilterListProps>,
10
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
7
11
  {},
8
12
  unknown,
9
13
  {},
10
14
  {},
11
15
  import('vue').ComponentOptionsMixin,
12
16
  import('vue').ComponentOptionsMixin,
13
- {},
17
+ {
18
+ 'update:modelValue': (modelValue: unknown[]) => void
19
+ },
14
20
  string,
15
21
  import('vue').PublicProps,
16
- Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbFilterListProps>>>,
22
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
23
+ 'onUpdate:modelValue'?: ((modelValue: unknown[]) => any) | undefined
24
+ },
17
25
  {},
18
26
  {}
19
27
  >