@tplc/business 0.2.21 → 0.2.22
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 +13 -0
- package/components/lcb-absolute-config-layout/lcb-absolute-config-layout.vue +206 -0
- package/components/lcb-absolute-config-layout/types.ts +29 -0
- package/components/lcb-action-view/lcb-action-view.vue +6 -1
- package/components/lcb-action-view/types.ts +8 -1
- package/components/lcb-product/lcb-product.vue +50 -1
- package/components/lcb-product/types.ts +9 -0
- package/global.d.ts +1 -0
- package/package.json +1 -1
- package/types/components/lcb-absolute-config-layout/lcb-absolute-config-layout.vue.d.ts +71 -0
- package/types/components/lcb-absolute-config-layout/types.d.ts +26 -0
- package/types/components/lcb-action-view/lcb-action-view.vue.d.ts +0 -1
- package/types/components/lcb-action-view/types.d.ts +8 -1
- package/types/components/lcb-home-search/lcb-home-search.vue.d.ts +1 -1
- package/types/components/lcb-list/components/FilterSelect/index.vue.d.ts +1 -1
- package/types/components/lcb-list/components/TreeSelect/index.vue.d.ts +1 -1
- package/types/components/lcb-notice/lcb-notice.vue.d.ts +2 -2
- package/types/components/lcb-product/lcb-product.vue.d.ts +9 -0
- package/types/components/lcb-product/types.d.ts +9 -0
- package/types/components/lcb-swiper/lcb-swiper.vue.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
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.2.22](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.21...v0.2.22) (2024-12-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
9
|
+
|
|
10
|
+
* banner-block 兼容小程序 ([aa79283](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/aa79283f24e97ca68d8ad7fd18863b05dc5c9e26))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features | 新功能
|
|
14
|
+
|
|
15
|
+
* 引擎支持list ([012e9cb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/012e9cbf03cff9a434fd6f9adbb4aa6b7f88d8f4))
|
|
16
|
+
* 自定义组件支持变量 ([237bc85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/237bc85163905f4a9d776e14027c53392cb0b3df))
|
|
17
|
+
|
|
5
18
|
### [0.2.21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.20...v0.2.21) (2024-12-06)
|
|
6
19
|
|
|
7
20
|
### [0.2.20](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.19...v0.2.20) (2024-12-06)
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { LcbAbsoluteConfigLayoutProps, LcbAbsoluteConfigLayoutBlock } from './types'
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: 'LcbAbsoluteConfigLayout',
|
|
7
|
+
options: {
|
|
8
|
+
addGlobalClass: true,
|
|
9
|
+
virtualHost: true,
|
|
10
|
+
styleIsolation: 'shared',
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
const props = withDefaults(defineProps<LcbAbsoluteConfigLayoutProps>(), {
|
|
14
|
+
mode: 'view',
|
|
15
|
+
dataset: {},
|
|
16
|
+
blocks: [],
|
|
17
|
+
canvas: {
|
|
18
|
+
width: 0,
|
|
19
|
+
height: 0,
|
|
20
|
+
},
|
|
21
|
+
} as any)
|
|
22
|
+
const highlightId = defineModel<number>()
|
|
23
|
+
const emit = defineEmits(['startCanvasResize', 'startDragBlock', 'removeBlock', 'startResizeBlock'])
|
|
24
|
+
|
|
25
|
+
function startCanvasResize(...args: any[]) {
|
|
26
|
+
if (props.mode !== 'edit') return
|
|
27
|
+
emit('startCanvasResize', ...args)
|
|
28
|
+
}
|
|
29
|
+
function startDragBlock(...args: any[]) {
|
|
30
|
+
highlightId.value = args[1].id
|
|
31
|
+
if (props.mode !== 'edit') return
|
|
32
|
+
emit('startDragBlock', ...args)
|
|
33
|
+
}
|
|
34
|
+
function removeBlock(...args: any[]) {
|
|
35
|
+
if (props.mode !== 'edit') return
|
|
36
|
+
emit('removeBlock', ...args)
|
|
37
|
+
}
|
|
38
|
+
function startResizeBlock(...args: any[]) {
|
|
39
|
+
if (props.mode !== 'edit') return
|
|
40
|
+
emit('startResizeBlock', ...args)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function resolvePlaceholders(template, values) {
|
|
44
|
+
// 递归处理模板
|
|
45
|
+
const resolveValue = (value) => {
|
|
46
|
+
if (typeof value === 'string' && value.startsWith('$')) {
|
|
47
|
+
const resolvedKey = value.slice(1) // 去掉占位符前的 '$'
|
|
48
|
+
return values.hasOwnProperty(resolvedKey) ? values[resolvedKey] : '' // 替换或置空
|
|
49
|
+
}
|
|
50
|
+
if (Array.isArray(value)) {
|
|
51
|
+
return value.map(resolveValue) // 递归处理数组
|
|
52
|
+
}
|
|
53
|
+
if (value && typeof value === 'object') {
|
|
54
|
+
return resolvePlaceholders(value, values) // 递归处理对象
|
|
55
|
+
}
|
|
56
|
+
return value // 非占位符值直接返回
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 遍历模板对象的键值对
|
|
60
|
+
return Object.fromEntries(
|
|
61
|
+
Object.entries(template).map(([key, value]) => [key, resolveValue(value)]),
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const calcBlocks = computed<LcbAbsoluteConfigLayoutBlock[]>(() => {
|
|
66
|
+
if (!props?.dataset) {
|
|
67
|
+
return props.blocks
|
|
68
|
+
}
|
|
69
|
+
// const currentBlockString = JSON.stringify(props.blocks)
|
|
70
|
+
// const mapBlockString = Object.entries(props?.dataset ?? {}).reduce((string, [key, value]) => {
|
|
71
|
+
// const reg = new RegExp(`\\$${key}`, 'g')
|
|
72
|
+
// // @ts-ignore
|
|
73
|
+
// const nextString = string.replace(reg, Array.isArray(value) ? JSON.stringify(value) : value)
|
|
74
|
+
|
|
75
|
+
// return nextString
|
|
76
|
+
// }, currentBlockString)
|
|
77
|
+
|
|
78
|
+
// console.log('mapBlockString', currentBlockString, props?.dataset, mapBlockString)
|
|
79
|
+
|
|
80
|
+
// return JSON.parse(mapBlockString) as LcbAbsoluteConfigLayoutBlock[]
|
|
81
|
+
|
|
82
|
+
return ((props.blocks as any) ?? [])?.map?.((block) => {
|
|
83
|
+
return {
|
|
84
|
+
...block,
|
|
85
|
+
props: resolvePlaceholders(block.props, props?.dataset ?? {}),
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
</script>
|
|
90
|
+
<template>
|
|
91
|
+
<view
|
|
92
|
+
:class="[
|
|
93
|
+
'relative',
|
|
94
|
+
{
|
|
95
|
+
'border border-gray-100 border-solid': mode === 'edit',
|
|
96
|
+
},
|
|
97
|
+
]"
|
|
98
|
+
:style="{
|
|
99
|
+
width: `${canvas?.width}px`,
|
|
100
|
+
height: `${canvas?.height}px`,
|
|
101
|
+
backgroundColor: canvas?.backgroundColor,
|
|
102
|
+
}"
|
|
103
|
+
>
|
|
104
|
+
<view
|
|
105
|
+
v-if="mode === 'edit'"
|
|
106
|
+
class="absolute text-white bottom-0 -right-[2px] translate-y-[100%] bg-gray-500/50 flex gap-2 p-1"
|
|
107
|
+
>
|
|
108
|
+
<!-- 画布调整大小 -->
|
|
109
|
+
<view
|
|
110
|
+
class="cursor-se-resize flex items-center justify-center"
|
|
111
|
+
@mousedown="startCanvasResize($event)"
|
|
112
|
+
>
|
|
113
|
+
<wd-icon name="fullsreen" size="14px" custom-class="!block"></wd-icon>
|
|
114
|
+
</view>
|
|
115
|
+
</view>
|
|
116
|
+
|
|
117
|
+
<!-- 渲染块 -->
|
|
118
|
+
<view
|
|
119
|
+
v-for="block in mode === 'edit' ? blocks : calcBlocks"
|
|
120
|
+
:key="block.id"
|
|
121
|
+
:class="[
|
|
122
|
+
'absolute',
|
|
123
|
+
{
|
|
124
|
+
'cursor-move group hover:outline hover:outline-blue hover:bg-gray-100/20':
|
|
125
|
+
mode === 'edit',
|
|
126
|
+
'outline outline-blue/30 ': mode === 'edit' && highlightId === block.id,
|
|
127
|
+
},
|
|
128
|
+
]"
|
|
129
|
+
:style="{
|
|
130
|
+
// background: block.color,
|
|
131
|
+
zIndex: block.zIndex,
|
|
132
|
+
left: block.x + 'px',
|
|
133
|
+
top: block.y + 'px',
|
|
134
|
+
width: block.width + 'px',
|
|
135
|
+
height: block.height + 'px',
|
|
136
|
+
}"
|
|
137
|
+
@mousedown="startDragBlock($event, block)"
|
|
138
|
+
>
|
|
139
|
+
<wd-text
|
|
140
|
+
v-if="block.type === 'text'"
|
|
141
|
+
custom-class="!break-all"
|
|
142
|
+
:lines="99"
|
|
143
|
+
v-bind="block.props"
|
|
144
|
+
:size="`${block?.props?.size ?? 12}px`"
|
|
145
|
+
/>
|
|
146
|
+
<wd-button
|
|
147
|
+
v-else-if="block.type === 'button'"
|
|
148
|
+
custom-class="!min-w-full !min-h-full !w-full !h-full"
|
|
149
|
+
:style="{
|
|
150
|
+
backgroundColor: block.props?.backgroundColor,
|
|
151
|
+
...(block.props?.style ?? {}),
|
|
152
|
+
}"
|
|
153
|
+
v-bind="block.props"
|
|
154
|
+
>
|
|
155
|
+
{{ block.props?.content }}
|
|
156
|
+
</wd-button>
|
|
157
|
+
<wd-img
|
|
158
|
+
v-else-if="block.type === 'image'"
|
|
159
|
+
:custom-class="`!w-full !h-full ${!block?.props?.src ? '!bg-coolGray' : ''}`"
|
|
160
|
+
v-bind="block.props"
|
|
161
|
+
:src="block?.props?.src"
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
<view
|
|
165
|
+
v-else-if="block.type === 'tags'"
|
|
166
|
+
:class="[
|
|
167
|
+
'flex gap-1',
|
|
168
|
+
{
|
|
169
|
+
'whitespace-nowrap overflow-auto': !block.props?.overflowWrap,
|
|
170
|
+
'flex-wrap': block.props?.overflowWrap,
|
|
171
|
+
},
|
|
172
|
+
]"
|
|
173
|
+
>
|
|
174
|
+
<wd-tag v-for="tag in block?.props?.tags ?? []" :key="tag" v-bind="block.props">
|
|
175
|
+
{{ tag }}
|
|
176
|
+
</wd-tag>
|
|
177
|
+
</view>
|
|
178
|
+
|
|
179
|
+
<view class="bg-gray-500/30 group-hover:bg-gray-500/70" v-else>
|
|
180
|
+
{{ block.type ?? 'unknow type' }}
|
|
181
|
+
</view>
|
|
182
|
+
|
|
183
|
+
<view
|
|
184
|
+
v-if="mode === 'edit'"
|
|
185
|
+
class="absolute text-white bottom-0 -right-[2px] translate-y-[100%] bg-gray-500/50 flex gap-2 p-1 group-hover:visible invisible"
|
|
186
|
+
>
|
|
187
|
+
<wd-icon
|
|
188
|
+
name="delete"
|
|
189
|
+
size="14px"
|
|
190
|
+
color="red"
|
|
191
|
+
custom-class="!cursor-pointer"
|
|
192
|
+
@click="removeBlock(block)"
|
|
193
|
+
></wd-icon>
|
|
194
|
+
<!-- 调整块大小 -->
|
|
195
|
+
<view
|
|
196
|
+
class="cursor-se-resize flex items-center justify-center group-hover:visible invisible"
|
|
197
|
+
@mousedown="startResizeBlock($event, block)"
|
|
198
|
+
>
|
|
199
|
+
<wd-icon name="fullsreen" size="14px" custom-class="!block"></wd-icon>
|
|
200
|
+
</view>
|
|
201
|
+
</view>
|
|
202
|
+
</view>
|
|
203
|
+
</view>
|
|
204
|
+
</template>
|
|
205
|
+
|
|
206
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface LcbAbsoluteConfigLayoutBlock {
|
|
2
|
+
id: number
|
|
3
|
+
x: number
|
|
4
|
+
y: number
|
|
5
|
+
offsetX: number
|
|
6
|
+
offsetY: number
|
|
7
|
+
zIndex: number
|
|
8
|
+
width: number
|
|
9
|
+
height: number
|
|
10
|
+
minWidth: number
|
|
11
|
+
minHeight: number
|
|
12
|
+
maxWidth: number
|
|
13
|
+
maxHeight: number
|
|
14
|
+
type: string
|
|
15
|
+
props: Record<string, any>
|
|
16
|
+
// color: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface LcbAbsoluteConfigLayoutProps {
|
|
20
|
+
// Define the component's prop types here
|
|
21
|
+
mode: 'edit' | 'view'
|
|
22
|
+
dataset?: Record<string, any>
|
|
23
|
+
blocks: LcbAbsoluteConfigLayoutBlock[]
|
|
24
|
+
canvas: {
|
|
25
|
+
width: number
|
|
26
|
+
height: number
|
|
27
|
+
backgroundColor?: string
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -66,7 +66,7 @@ const openType = computed(() => {
|
|
|
66
66
|
}[props.jumpType || '']
|
|
67
67
|
})
|
|
68
68
|
const onActionClick = () => {
|
|
69
|
-
const { jumpAppid, jumpUrl: url, jumpType, phoneNumber } = props
|
|
69
|
+
const { jumpAppid, jumpUrl: url, jumpType, phoneNumber, addressInfo } = props
|
|
70
70
|
/**
|
|
71
71
|
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
72
72
|
* 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
@@ -160,6 +160,11 @@ const onActionClick = () => {
|
|
|
160
160
|
phoneNumber,
|
|
161
161
|
})
|
|
162
162
|
break
|
|
163
|
+
case 105:
|
|
164
|
+
if (addressInfo) {
|
|
165
|
+
uni.openLocation(addressInfo)
|
|
166
|
+
}
|
|
167
|
+
break
|
|
163
168
|
default:
|
|
164
169
|
emits('click')
|
|
165
170
|
break
|
|
@@ -2,7 +2,7 @@ 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 用户头像 102 分享 103 意见反馈 104 打开授权设置页
|
|
5
|
+
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
|
|
6
6
|
*/
|
|
7
7
|
jumpType?:
|
|
8
8
|
| 1
|
|
@@ -24,6 +24,7 @@ export interface LcbActionViewProps {
|
|
|
24
24
|
| 102
|
|
25
25
|
| 103
|
|
26
26
|
| 104
|
|
27
|
+
| 105
|
|
27
28
|
/** 跳转路径 */
|
|
28
29
|
jumpUrl?: string
|
|
29
30
|
/** 小程序appid */
|
|
@@ -33,4 +34,10 @@ export interface LcbActionViewProps {
|
|
|
33
34
|
content?: string
|
|
34
35
|
title?: string
|
|
35
36
|
position?: string
|
|
37
|
+
addressInfo?: {
|
|
38
|
+
address: string
|
|
39
|
+
latitude: number
|
|
40
|
+
longitude: number
|
|
41
|
+
name: string
|
|
42
|
+
}
|
|
36
43
|
}
|
|
@@ -33,7 +33,17 @@ defineSlots<{
|
|
|
33
33
|
v-bind="item.link"
|
|
34
34
|
>
|
|
35
35
|
<slot name="item" :item="item">
|
|
36
|
+
<lcb-absolute-config-layout
|
|
37
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
38
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
39
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
40
|
+
:dataset="{
|
|
41
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
42
|
+
...item,
|
|
43
|
+
}"
|
|
44
|
+
/>
|
|
36
45
|
<lcb-product-item
|
|
46
|
+
v-else
|
|
37
47
|
v-bind="{ ...item, ...attrs }"
|
|
38
48
|
:imageStyle="{
|
|
39
49
|
width: imageWidth ?? `${imageWidthPercent}%`,
|
|
@@ -77,7 +87,17 @@ defineSlots<{
|
|
|
77
87
|
<view class="p-1 overflow-hidden">
|
|
78
88
|
<view class="rounded overflow-hidden" :style="{ height: `${itemHeight}rpx` }">
|
|
79
89
|
<slot name="item" :item="item">
|
|
90
|
+
<lcb-absolute-config-layout
|
|
91
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
92
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
93
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
94
|
+
:dataset="{
|
|
95
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
96
|
+
...item,
|
|
97
|
+
}"
|
|
98
|
+
/>
|
|
80
99
|
<lcb-product-item
|
|
100
|
+
v-else
|
|
81
101
|
v-bind="{ ...item, ...attrs }"
|
|
82
102
|
layoutType="vertical"
|
|
83
103
|
className="!h-full"
|
|
@@ -114,7 +134,17 @@ defineSlots<{
|
|
|
114
134
|
class="rounded overflow-hidden"
|
|
115
135
|
>
|
|
116
136
|
<slot name="item" :item="item">
|
|
137
|
+
<lcb-absolute-config-layout
|
|
138
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
139
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
140
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
141
|
+
:dataset="{
|
|
142
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
143
|
+
...item,
|
|
144
|
+
}"
|
|
145
|
+
/>
|
|
117
146
|
<lcb-product-item
|
|
147
|
+
v-else
|
|
118
148
|
v-bind="{ ...item, ...attrs }"
|
|
119
149
|
layoutType="vertical"
|
|
120
150
|
tag-overflow-wrap
|
|
@@ -161,7 +191,17 @@ defineSlots<{
|
|
|
161
191
|
class="rounded overflow-hidden"
|
|
162
192
|
>
|
|
163
193
|
<slot name="item" :item="item">
|
|
194
|
+
<lcb-absolute-config-layout
|
|
195
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
196
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
197
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
198
|
+
:dataset="{
|
|
199
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
200
|
+
...item,
|
|
201
|
+
}"
|
|
202
|
+
/>
|
|
164
203
|
<lcb-product-item
|
|
204
|
+
v-else
|
|
165
205
|
v-bind="{ ...item, ...attrs }"
|
|
166
206
|
layoutType="vertical"
|
|
167
207
|
tag-overflow-wrap
|
|
@@ -210,7 +250,16 @@ defineSlots<{
|
|
|
210
250
|
class="!w-66vw flex-shrink-0"
|
|
211
251
|
>
|
|
212
252
|
<slot name="item" :item="item">
|
|
213
|
-
<lcb-
|
|
253
|
+
<lcb-absolute-config-layout
|
|
254
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
255
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
256
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
257
|
+
:dataset="{
|
|
258
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
259
|
+
...item,
|
|
260
|
+
}"
|
|
261
|
+
/>
|
|
262
|
+
<lcb-product-item v-else v-bind="item" imageClass="!w-1/2"></lcb-product-item>
|
|
214
263
|
</slot>
|
|
215
264
|
</view>
|
|
216
265
|
</view>
|
|
@@ -8,4 +8,13 @@ export interface LcbProductProps {
|
|
|
8
8
|
imageRadius?: number
|
|
9
9
|
itemHeight?: number // 列表项高度
|
|
10
10
|
items?: Record<string, any>[]
|
|
11
|
+
renderItemAbsoluteConfigLayout?: {
|
|
12
|
+
dataset?: Record<string, any>
|
|
13
|
+
blocks: any[]
|
|
14
|
+
canvas: {
|
|
15
|
+
width: number
|
|
16
|
+
height: number
|
|
17
|
+
backgroundColor?: string
|
|
18
|
+
}
|
|
19
|
+
}
|
|
11
20
|
}
|
package/global.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare module 'vue' {
|
|
2
2
|
// Helper for Volar
|
|
3
3
|
export interface GlobalComponents {
|
|
4
|
+
'lcb-absolute-config-layout': (typeof import('./types/components/lcb-absolute-config-layout/lcb-absolute-config-layout.vue'))['default']
|
|
4
5
|
'lcb-action-view': (typeof import('./types/components/lcb-action-view/lcb-action-view.vue'))['default']
|
|
5
6
|
'lcb-advert': (typeof import('./types/components/lcb-advert/lcb-advert.vue'))['default']
|
|
6
7
|
'lcb-area-picker': (typeof import('./types/components/lcb-area-picker/lcb-area-picker.vue'))['default']
|
package/package.json
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { LcbAbsoluteConfigLayoutProps, LcbAbsoluteConfigLayoutBlock } from './types'
|
|
2
|
+
declare let __VLS_typeProps: LcbAbsoluteConfigLayoutProps
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: number
|
|
5
|
+
} & typeof __VLS_typeProps
|
|
6
|
+
declare const _default: import('vue').DefineComponent<
|
|
7
|
+
__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, any>,
|
|
8
|
+
{},
|
|
9
|
+
unknown,
|
|
10
|
+
{},
|
|
11
|
+
{},
|
|
12
|
+
import('vue').ComponentOptionsMixin,
|
|
13
|
+
import('vue').ComponentOptionsMixin,
|
|
14
|
+
{
|
|
15
|
+
'update:modelValue': (modelValue: number) => void
|
|
16
|
+
startCanvasResize: (...args: any[]) => void
|
|
17
|
+
startDragBlock: (...args: any[]) => void
|
|
18
|
+
removeBlock: (...args: any[]) => void
|
|
19
|
+
startResizeBlock: (...args: any[]) => void
|
|
20
|
+
},
|
|
21
|
+
string,
|
|
22
|
+
import('vue').PublicProps,
|
|
23
|
+
Readonly<
|
|
24
|
+
import('vue').ExtractPropTypes<
|
|
25
|
+
__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, any>
|
|
26
|
+
>
|
|
27
|
+
> & {
|
|
28
|
+
onStartCanvasResize?: ((...args: any[]) => any) | undefined
|
|
29
|
+
onStartDragBlock?: ((...args: any[]) => any) | undefined
|
|
30
|
+
onRemoveBlock?: ((...args: any[]) => any) | undefined
|
|
31
|
+
onStartResizeBlock?: ((...args: any[]) => any) | undefined
|
|
32
|
+
'onUpdate:modelValue'?: ((modelValue: number) => any) | undefined
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
mode: 'edit' | 'view'
|
|
36
|
+
dataset: Record<string, any>
|
|
37
|
+
blocks: LcbAbsoluteConfigLayoutBlock[]
|
|
38
|
+
canvas: {
|
|
39
|
+
width: number
|
|
40
|
+
height: number
|
|
41
|
+
backgroundColor?: string
|
|
42
|
+
}
|
|
43
|
+
modelValue: number
|
|
44
|
+
},
|
|
45
|
+
{}
|
|
46
|
+
>
|
|
47
|
+
export default _default
|
|
48
|
+
|
|
49
|
+
type __VLS_WithDefaults<P, D> = {
|
|
50
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D
|
|
51
|
+
? __VLS_Prettify<
|
|
52
|
+
P[K] & {
|
|
53
|
+
default: D[K]
|
|
54
|
+
}
|
|
55
|
+
>
|
|
56
|
+
: P[K]
|
|
57
|
+
}
|
|
58
|
+
type __VLS_Prettify<T> = {
|
|
59
|
+
[K in keyof T]: T[K]
|
|
60
|
+
} & {}
|
|
61
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
62
|
+
type __VLS_TypePropsToOption<T> = {
|
|
63
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
64
|
+
? {
|
|
65
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
66
|
+
}
|
|
67
|
+
: {
|
|
68
|
+
type: import('vue').PropType<T[K]>
|
|
69
|
+
required: true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface LcbAbsoluteConfigLayoutBlock {
|
|
2
|
+
id: number
|
|
3
|
+
x: number
|
|
4
|
+
y: number
|
|
5
|
+
offsetX: number
|
|
6
|
+
offsetY: number
|
|
7
|
+
zIndex: number
|
|
8
|
+
width: number
|
|
9
|
+
height: number
|
|
10
|
+
minWidth: number
|
|
11
|
+
minHeight: number
|
|
12
|
+
maxWidth: number
|
|
13
|
+
maxHeight: number
|
|
14
|
+
type: string
|
|
15
|
+
props: Record<string, any>
|
|
16
|
+
}
|
|
17
|
+
export interface LcbAbsoluteConfigLayoutProps {
|
|
18
|
+
mode: 'edit' | 'view'
|
|
19
|
+
dataset?: Record<string, any>
|
|
20
|
+
blocks: LcbAbsoluteConfigLayoutBlock[]
|
|
21
|
+
canvas: {
|
|
22
|
+
width: number
|
|
23
|
+
height: number
|
|
24
|
+
backgroundColor?: string
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -2,7 +2,7 @@ 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 用户头像 102 分享 103 意见反馈 104 打开授权设置页
|
|
5
|
+
* 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
|
|
6
6
|
*/
|
|
7
7
|
jumpType?:
|
|
8
8
|
| 1
|
|
@@ -24,6 +24,7 @@ export interface LcbActionViewProps {
|
|
|
24
24
|
| 102
|
|
25
25
|
| 103
|
|
26
26
|
| 104
|
|
27
|
+
| 105
|
|
27
28
|
/** 跳转路径 */
|
|
28
29
|
jumpUrl?: string
|
|
29
30
|
/** 小程序appid */
|
|
@@ -33,4 +34,10 @@ export interface LcbActionViewProps {
|
|
|
33
34
|
content?: string
|
|
34
35
|
title?: string
|
|
35
36
|
position?: string
|
|
37
|
+
addressInfo?: {
|
|
38
|
+
address: string
|
|
39
|
+
latitude: number
|
|
40
|
+
longitude: number
|
|
41
|
+
name: string
|
|
42
|
+
}
|
|
36
43
|
}
|
|
@@ -20,8 +20,8 @@ declare const _default: import('vue').DefineComponent<
|
|
|
20
20
|
string,
|
|
21
21
|
import('vue').PublicProps,
|
|
22
22
|
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
23
|
-
onSubmit?: ((...args: any[]) => any) | undefined
|
|
24
23
|
'onUpdate:modelValue'?: ((modelValue: string | string[]) => any) | undefined
|
|
24
|
+
onSubmit?: ((...args: any[]) => any) | undefined
|
|
25
25
|
'onUpdate:title'?: ((title: string) => any) | undefined
|
|
26
26
|
},
|
|
27
27
|
{},
|
|
@@ -20,8 +20,8 @@ declare const _default: import('vue').DefineComponent<
|
|
|
20
20
|
string,
|
|
21
21
|
import('vue').PublicProps,
|
|
22
22
|
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
23
|
-
onSubmit?: ((...args: any[]) => any) | undefined
|
|
24
23
|
'onUpdate:modelValue'?: ((modelValue: string | string[]) => any) | undefined
|
|
24
|
+
onSubmit?: ((...args: any[]) => any) | undefined
|
|
25
25
|
'onUpdate:title'?: ((title: string) => any) | undefined
|
|
26
26
|
},
|
|
27
27
|
{},
|
|
@@ -40,10 +40,10 @@ declare const _default: import('vue').DefineComponent<
|
|
|
40
40
|
>
|
|
41
41
|
>,
|
|
42
42
|
{
|
|
43
|
-
|
|
43
|
+
backgroundColor: string
|
|
44
44
|
color: string
|
|
45
|
+
direction: import('@tplc/wot/types/components/wd-notice-bar/types').NoticeBarScrollDirection
|
|
45
46
|
paddingVertical: number
|
|
46
|
-
backgroundColor: string
|
|
47
47
|
borderColor: string
|
|
48
48
|
iconSize: number
|
|
49
49
|
speed: number
|
|
@@ -29,6 +29,15 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
29
29
|
imageWidthPercent: number
|
|
30
30
|
imageHeightPercent: number
|
|
31
31
|
itemHeight: number
|
|
32
|
+
renderItemAbsoluteConfigLayout: {
|
|
33
|
+
dataset?: Record<string, any>
|
|
34
|
+
blocks: any[]
|
|
35
|
+
canvas: {
|
|
36
|
+
width: number
|
|
37
|
+
height: number
|
|
38
|
+
backgroundColor?: string
|
|
39
|
+
}
|
|
40
|
+
}
|
|
32
41
|
},
|
|
33
42
|
{}
|
|
34
43
|
>
|
|
@@ -7,4 +7,13 @@ export interface LcbProductProps {
|
|
|
7
7
|
imageRadius?: number
|
|
8
8
|
itemHeight?: number
|
|
9
9
|
items?: Record<string, any>[]
|
|
10
|
+
renderItemAbsoluteConfigLayout?: {
|
|
11
|
+
dataset?: Record<string, any>
|
|
12
|
+
blocks: any[]
|
|
13
|
+
canvas: {
|
|
14
|
+
width: number
|
|
15
|
+
height: number
|
|
16
|
+
backgroundColor?: string
|
|
17
|
+
}
|
|
18
|
+
}
|
|
10
19
|
}
|
|
@@ -70,11 +70,11 @@ declare const _default: import('vue').DefineComponent<
|
|
|
70
70
|
>
|
|
71
71
|
>,
|
|
72
72
|
{
|
|
73
|
+
height: number
|
|
73
74
|
duration: number
|
|
74
75
|
autoplay: boolean
|
|
75
76
|
direction: 'horizontal' | 'vertical'
|
|
76
77
|
displayMultipleItems: number
|
|
77
|
-
height: number
|
|
78
78
|
loop: boolean
|
|
79
79
|
indicatorPosition:
|
|
80
80
|
| 'left'
|