@tplc/business 0.5.28 → 0.5.30

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,21 @@
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.5.30](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.29...v0.5.30) (2025-10-26)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 新增render-view ([03b80da](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/03b80da7835eb28fb639046ab247db6f5af63d50))
11
+ * 暂时提交custompopup ([8c1b8b2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8c1b8b29eac78d265d045772a4e393ee33353e3e))
12
+
13
+ ### [0.5.29](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.28...v0.5.29) (2025-10-25)
14
+
15
+
16
+ ### ✨ Features | 新功能
17
+
18
+ * 支持gap配置 ([9420e0e](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9420e0e62567719c639dc3daac0c618b432e1c81))
19
+
5
20
  ### [0.5.28](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.27...v0.5.28) (2025-10-23)
6
21
 
7
22
 
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <wd-popup
3
+ v-model="show"
4
+ :z-index="1000"
5
+ closable
6
+ position="center"
7
+ custom-class="!bg-transparent"
8
+ >
9
+ <view
10
+ :style="{ width: transformValueUnit(pageInfo?.page.popupWidth || '500') }"
11
+ class="mx-auto"
12
+ >
13
+ <lcb-render-view
14
+ v-for="(element, index) in pageInfo?.modules"
15
+ :key="index"
16
+ :element="element"
17
+ />
18
+ </view>
19
+ </wd-popup>
20
+ </template>
21
+ <script setup lang="ts">
22
+ import { transformValueUnit } from '../../../../utils/transform'
23
+ import { TextRenderViewItem } from '../../../../action'
24
+ import { provide, ref, watch } from 'vue'
25
+ import { PAGE_PROVIDE_KEY } from '../../../../constants'
26
+ defineOptions({
27
+ name: 'ActionCustomPopup',
28
+ options: {
29
+ addGlobalClass: true,
30
+ virtualHost: true,
31
+ styleIsolation: 'shared',
32
+ },
33
+ })
34
+
35
+ const props = defineProps<{
36
+ jumpType?: string
37
+ }>()
38
+ const popupInfo = ref<Record<string, any>>({})
39
+ provide(PAGE_PROVIDE_KEY, popupInfo)
40
+ const show = defineModel({ default: false })
41
+ const pageInfo = ref<{
42
+ modules: TextRenderViewItem['items']
43
+ page: {
44
+ popupWidth: number
45
+ requestApi: string
46
+ }
47
+ }>()
48
+
49
+ watch(
50
+ () => show.value,
51
+ async (newVal) => {
52
+ if (newVal) {
53
+ const { data } = (await uni.$lcb.http.post('/pageDecoration/page/detail', {
54
+ pageType: props.jumpType,
55
+ })) as any
56
+ pageInfo.value = data
57
+ if (pageInfo.value?.page?.requestApi) {
58
+ uni.$lcb.http.post<Record<string, any>>(pageInfo.value?.page?.requestApi).then((res) => {
59
+ popupInfo.value = {
60
+ ...pageInfo.value,
61
+ ...res.data,
62
+ }
63
+ })
64
+ }
65
+ }
66
+ },
67
+ {
68
+ immediate: true,
69
+ },
70
+ )
71
+ </script>
@@ -59,6 +59,11 @@
59
59
  v-if="[144].includes(getJumpType(jumpType)) && showPay && requestInfo && submitRequestInfo"
60
60
  />
61
61
  <SharePopup v-model="showPoster" :params="requestParam" />
62
+ <CustomPopup
63
+ v-model="showCustomPopup"
64
+ v-if="[145].includes(getJumpType(jumpType)) && showCustomPopup"
65
+ :jumpType="getJumpType(jumpType)"
66
+ />
62
67
  </template>
63
68
 
64
69
  <script setup lang="ts">
@@ -66,7 +71,8 @@ import { computed, ref, inject, Ref, onMounted } from 'vue'
66
71
  import { jumpTypeMap, LcbActionViewProps } from './types'
67
72
  import { uploadFile } from '../../hooks/useUpload'
68
73
  import { getFinalUrl, onPageScrollSelector, getExposed, getCurrentPage } from '../../utils/utils'
69
- import SharePopup from '../lcb-nav/SharePopup/index.vue'
74
+ import SharePopup from '../../components/lcb-nav/SharePopup/index.vue'
75
+ import CustomPopup from './components/CustomPopup/index.vue'
70
76
  import { useTranslate } from '@tplc/wot'
71
77
  import { PAGE_PROVIDE_KEY, USER_BASIC_INFO } from '../../constants'
72
78
  import { getTemplateMessageList, TemplateMessage } from '../../api/user'
@@ -110,6 +116,7 @@ onMounted(async () => {
110
116
  routeFullPath.value = getCurrentPage()?.fullPath
111
117
  })
112
118
  const show = ref(false)
119
+ const showCustomPopup = ref(false)
113
120
  const openType = computed(() => {
114
121
  return {
115
122
  88: 'getPhoneNumber',
@@ -307,6 +314,9 @@ const onActionClick = async () => {
307
314
  case 144:
308
315
  showPay.value = true
309
316
  break
317
+ case 145:
318
+ showCustomPopup.value = true
319
+ break
310
320
  default:
311
321
  emits('click', props)
312
322
  break
@@ -134,4 +134,5 @@ export const jumpTypeMap = {
134
134
  qrCode: 141,
135
135
  templateMessage: 142,
136
136
  'mixture-pay': 144,
137
+ customPopup: 145,
137
138
  }
@@ -0,0 +1,78 @@
1
+ <template>
2
+ <lcb-nav v-if="element.moduleName === 'lcb-nav'" v-bind="element.props" />
3
+ <lcb-img-nav v-else-if="element.moduleName === 'lcb-img-nav'" v-bind="element.props" />
4
+ <lcb-banner v-else-if="element.moduleName === 'lcb-banner'" v-bind="element.props" />
5
+ <lcb-banner-block v-else-if="element.moduleName === 'lcb-banner-block'" v-bind="element.props" />
6
+ <lcb-title v-else-if="element.moduleName === 'lcb-title'" v-bind="element.props" />
7
+ <lcb-grid v-else-if="element.moduleName === 'lcb-grid'" v-bind="element.props" />
8
+ <lcb-home-search v-else-if="element.moduleName === 'lcb-home-search'" v-bind="element.props" />
9
+ <lcb-user-order v-else-if="element.moduleName === 'lcb-user-order'" v-bind="element.props" />
10
+ <lcb-user-top v-else-if="element.moduleName === 'lcb-user-top'" v-bind="element.props" />
11
+ <lcb-list v-else-if="element.moduleName === 'lcb-list'" v-bind="element.props" />
12
+ <lcb-gap v-else-if="element.moduleName === 'lcb-gap'" v-bind="element.props" />
13
+ <lcb-image v-else-if="element.moduleName === 'lcb-image'" v-bind="element.props" />
14
+ <lcb-notice v-else-if="element.moduleName === 'lcb-notice'" v-bind="element.props" />
15
+ <lcb-video v-else-if="element.moduleName === 'lcb-video'" v-bind="element.props" />
16
+ <lcb-dynamic-data v-else-if="element.moduleName === 'lcb-dynamic-data'" v-bind="element.props" />
17
+ <lcb-advert v-else-if="element.moduleName === 'lcb-advert'" v-bind="element.props" />
18
+ <lcb-tabs v-else-if="element.moduleName === 'lcb-tabs'" v-bind="element.props" />
19
+ <lcb-filter-grid v-else-if="element.moduleName === 'lcb-filter-grid'" v-bind="element.props" />
20
+ <lcb-calendar-search
21
+ v-else-if="element.moduleName === 'lcb-calendar-search'"
22
+ v-bind="element.props"
23
+ />
24
+ <lcb-vip v-else-if="element.moduleName === 'lcb-vip'" v-bind="element.props" />
25
+ <lcb-product v-else-if="element.moduleName === 'lcb-product'" v-bind="element.props" />
26
+ <lcb-area
27
+ v-else-if="element.moduleName === 'lcb-area'"
28
+ v-bind="element.props"
29
+ :list="element.children"
30
+ >
31
+ <template #default="{ item }">
32
+ <schema-item :element="item" />
33
+ </template>
34
+ </lcb-area>
35
+ <lcb-wrapper-list
36
+ v-else-if="element.moduleName === 'lcb-wrapper-list'"
37
+ v-bind="element.props"
38
+ :list="element.children"
39
+ >
40
+ <template #default="{ data, list }">
41
+ <lcb-wrapper-item :data="data" :provide-key="WRAPPER_ITEM_KEY">
42
+ <schema-item :element="item" v-for="item in list" :key="item.id" />
43
+ </lcb-wrapper-item>
44
+ </template>
45
+ </lcb-wrapper-list>
46
+ <lcb-rich-text v-else-if="element.moduleName === 'lcb-rich-text'" v-bind="element.props" />
47
+ <lcb-form v-else-if="element.moduleName === 'lcb-form'" v-bind="element.props" />
48
+ <lcb-search v-else-if="element.moduleName === 'lcb-search'" v-bind="element.props" />
49
+ <lcb-calendar-filter
50
+ v-else-if="element.moduleName === 'lcb-calendar-filter'"
51
+ v-bind="element.props"
52
+ />
53
+ <lcb-particulars v-else-if="element.moduleName === 'lcb-particulars'" v-bind="element.props" />
54
+ <lcb-tags v-else-if="element.moduleName === 'lcb-tags'" v-bind="element.props" />
55
+ <lcb-button v-else-if="element.moduleName === 'lcb-button'" v-bind="element.props" />
56
+ <lcb-room-calendar
57
+ v-else-if="element.moduleName === 'lcb-room-calendar'"
58
+ v-bind="element.props"
59
+ />
60
+ <lcb-swiper v-else-if="element.moduleName === 'lcb-swiper'" v-bind="element.props" />
61
+ </template>
62
+
63
+ <script setup lang="ts">
64
+ import { WRAPPER_ITEM_KEY } from '../../constants'
65
+ defineOptions({
66
+ name: 'LcbRenderView',
67
+ options: {
68
+ addGlobalClass: true,
69
+ virtualHost: true,
70
+ styleIsolation: 'shared',
71
+ },
72
+ })
73
+ defineProps<{
74
+ element: any
75
+ }>()
76
+ </script>
77
+
78
+ <style lang="scss" scoped></style>
@@ -0,0 +1,3 @@
1
+ export interface LcbRenderViewProps {
2
+ // Define the component's prop types here
3
+ }
package/global.d.ts CHANGED
@@ -36,6 +36,7 @@ declare module 'vue' {
36
36
  'lcb-poster': (typeof import('@tplc/business/components/lcb-poster/lcb-poster.vue'))['default']
37
37
  'lcb-product': (typeof import('@tplc/business/components/lcb-product/lcb-product.vue'))['default']
38
38
  'lcb-product-item': (typeof import('@tplc/business/components/lcb-product-item/lcb-product-item.vue'))['default']
39
+ 'lcb-render-view': (typeof import('@tplc/business/components/lcb-render-view/lcb-render-view.vue'))['default']
39
40
  'lcb-rich-text': (typeof import('@tplc/business/components/lcb-rich-text/lcb-rich-text.vue'))['default']
40
41
  'lcb-room-calendar': (typeof import('@tplc/business/components/lcb-room-calendar/lcb-room-calendar.vue'))['default']
41
42
  'lcb-search': (typeof import('@tplc/business/components/lcb-search/lcb-search.vue'))['default']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.28",
3
+ "version": "0.5.30",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -0,0 +1,37 @@
1
+ declare let __VLS_typeProps: {
2
+ jumpType?: string
3
+ }
4
+ type __VLS_PublicProps = {
5
+ modelValue?: any
6
+ } & typeof __VLS_typeProps
7
+ declare const _default: import('vue').DefineComponent<
8
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
9
+ {},
10
+ unknown,
11
+ {},
12
+ {},
13
+ import('vue').ComponentOptionsMixin,
14
+ import('vue').ComponentOptionsMixin,
15
+ {
16
+ 'update:modelValue': (modelValue: any) => void
17
+ },
18
+ string,
19
+ import('vue').PublicProps,
20
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
21
+ 'onUpdate:modelValue'?: ((modelValue: any) => any) | undefined
22
+ },
23
+ {},
24
+ {}
25
+ >
26
+ export default _default
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
28
+ type __VLS_TypePropsToOption<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K>
30
+ ? {
31
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
32
+ }
33
+ : {
34
+ type: import('vue').PropType<T[K]>
35
+ required: true
36
+ }
37
+ }
@@ -127,4 +127,5 @@ export declare const jumpTypeMap: {
127
127
  qrCode: number
128
128
  templateMessage: number
129
129
  'mixture-pay': number
130
+ customPopup: number
130
131
  }
@@ -0,0 +1,35 @@
1
+ declare const _default: import('vue').DefineComponent<
2
+ __VLS_TypePropsToOption<{
3
+ element: any
4
+ }>,
5
+ {},
6
+ unknown,
7
+ {},
8
+ {},
9
+ import('vue').ComponentOptionsMixin,
10
+ import('vue').ComponentOptionsMixin,
11
+ {},
12
+ string,
13
+ import('vue').PublicProps,
14
+ Readonly<
15
+ import('vue').ExtractPropTypes<
16
+ __VLS_TypePropsToOption<{
17
+ element: any
18
+ }>
19
+ >
20
+ >,
21
+ {},
22
+ {}
23
+ >
24
+ export default _default
25
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
26
+ type __VLS_TypePropsToOption<T> = {
27
+ [K in keyof T]-?: {} extends Pick<T, K>
28
+ ? {
29
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
30
+ }
31
+ : {
32
+ type: import('vue').PropType<T[K]>
33
+ required: true
34
+ }
35
+ }
@@ -2,12 +2,19 @@ import { UploadMethod } from '@tplc/wot/types/components/wd-upload/types'
2
2
  export declare function formatJson(str: string | object | undefined, defVal?: {}): {}
3
3
  /** 获取上个页面Exposed */
4
4
  export declare const getExposed: () => any
5
- export declare const getCurrentPage: () => {
6
- pageId: string | number
7
- fullPath: string
8
- options: any
9
- route: string
10
- }
5
+ export declare const getCurrentPage: () =>
6
+ | {
7
+ pageId: number
8
+ fullPath: string
9
+ options: {}
10
+ route: string
11
+ }
12
+ | {
13
+ pageId: string
14
+ fullPath: string
15
+ options: any
16
+ route: string
17
+ }
11
18
  export declare const getPreviousPageId: () => string | number
12
19
  /** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
13
20
  export declare const getFinalUrl: (url: string, urlParams?: string) => string
package/utils/utils.ts CHANGED
@@ -27,6 +27,7 @@ export const getCurrentPage = () => {
27
27
  id: string
28
28
  fullPath: string
29
29
  }
30
+ __wxWebviewId__: string
30
31
  route: string
31
32
  getPageId: () => number
32
33
  }
@@ -41,9 +42,9 @@ export const getCurrentPage = () => {
41
42
 
42
43
  const fullPath = decodeURIComponent(page.$page?.fullPath?.split('?')[1] || '')
43
44
  return {
44
- pageId: isH5 ? page.$page.id : page.getPageId?.(),
45
+ pageId: isH5 ? page.$page.id : page.__wxWebviewId__,
45
46
  fullPath: page.$page?.fullPath,
46
- options: parse(fullPath),
47
+ options: parse(fullPath) as any,
47
48
  route: page.route,
48
49
  }
49
50
  }