@tplc/business 0.0.28 → 0.0.29
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 +9 -0
- package/components/lcb-image/lcb-image.vue +35 -23
- package/components/lcb-image/types.ts +1 -1
- package/components/lcb-list/api.ts +13 -7
- package/components/lcb-list/components/ComponentGroup/index.vue +1 -1
- package/components/lcb-list/components/FilterList/index.vue +8 -1
- package/components/lcb-list/components/FilterSlider/types.ts +2 -2
- package/components/lcb-list/components/FilterTabs/index.vue +27 -0
- package/components/lcb-list/components/FilterTabs/type.ts +6 -0
- package/components/lcb-list/index.scss +20 -0
- package/components/lcb-list/lcb-list.vue +21 -5
- package/components/lcb-list/types.ts +1 -0
- package/components/lcb-nav/lcb-nav.vue +2 -9
- package/components/lcb-notice/Item/index.vue +3 -3
- package/components/lcb-notice/lcb-notice.vue +10 -8
- package/components/lcb-notice/types.ts +4 -1
- package/hooks/usePageScroll.ts +10 -0
- package/package.json +2 -2
- package/types/components/lcb-list/api.d.ts +13 -7
- package/types/components/lcb-list/components/FilterSlider/types.d.ts +2 -2
- package/types/components/lcb-list/components/FilterTabs/index.vue.d.ts +36 -0
- package/types/components/lcb-list/components/FilterTabs/type.d.ts +5 -0
- package/types/components/lcb-list/lcb-list.vue.d.ts +3 -0
- package/types/components/lcb-list/types.d.ts +1 -0
- package/types/components/lcb-notice/lcb-notice.vue.d.ts +3 -0
- package/types/components/lcb-notice/types.d.ts +3 -0
- package/types/hooks/usePageScroll.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.29](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.14...v0.0.29) (2024-10-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* notice 修改 ([274090d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/274090dbf6697e1e8059e83005ea0df1dbc679a5))
|
|
11
|
+
* 完成列表首页 ([d00b2e0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d00b2e0d3e8c397fe8723675ee311bd93a463908))
|
|
12
|
+
* 新增tabs todo 自定义颜色 ([4a71d82](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4a71d82f3c300695e0004426f31a46f0d86cebe4))
|
|
13
|
+
|
|
5
14
|
### [0.0.28](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.13...v0.0.28) (2024-10-19)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<view
|
|
3
|
+
v-if="!items?.length"
|
|
4
|
+
class="flex justify-center items-center bg-light color-gray overflow-hidden"
|
|
5
|
+
:style="{
|
|
6
|
+
height: transformValueUnit(400),
|
|
7
|
+
borderRadius: transformValueUnit(imageRadius),
|
|
8
|
+
marginTop: transformValueUnit(-(floatUp || 0)),
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<wd-icon name="image" size="50px"></wd-icon>
|
|
12
|
+
</view>
|
|
2
13
|
|
|
3
|
-
<view
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// marginBottom: transformValueUnit(marginBottom),
|
|
15
|
-
}">
|
|
14
|
+
<view
|
|
15
|
+
v-if="styleGroup != 3"
|
|
16
|
+
:class="styleGroup == 2 ? 'flex' : ''"
|
|
17
|
+
:style="{
|
|
18
|
+
marginLeft: transformValueUnit(marginHorizontal),
|
|
19
|
+
marginRight: transformValueUnit(marginHorizontal),
|
|
20
|
+
marginTop: transformValueUnit(-(floatUp || 0)),
|
|
21
|
+
// marginTop: transformValueUnit(marginTop),
|
|
22
|
+
// marginBottom: transformValueUnit(marginBottom),
|
|
23
|
+
}"
|
|
24
|
+
>
|
|
16
25
|
<!-- <view v-for="(item, index) in items" :key="index" :class="styleGroup == 2 ? 'flex-1 relative' : 'relative'" :style="{
|
|
17
26
|
marginTop: transformValueUnit(styleGroup == 1 && index > 0 ? imageMargin : 0),
|
|
18
27
|
marginLeft: transformValueUnit(styleGroup == 2 && index > 0 ? imageMargin : 0),
|
|
@@ -32,24 +41,28 @@
|
|
|
32
41
|
<Image v-bind="imageProps" />
|
|
33
42
|
</view>
|
|
34
43
|
|
|
35
|
-
<scroll-view
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
<scroll-view
|
|
45
|
+
v-if="styleGroup == 3"
|
|
46
|
+
scroll-x
|
|
47
|
+
class="w-full whitespace-nowrap"
|
|
48
|
+
:style="{
|
|
49
|
+
marginLeft: transformValueUnit(marginHorizontal),
|
|
50
|
+
marginRight: transformValueUnit(marginHorizontal),
|
|
51
|
+
marginTop: transformValueUnit(-(floatUp || 0)),
|
|
52
|
+
// marginTop: transformValueUnit(marginTop),
|
|
53
|
+
// marginBottom: transformValueUnit(marginBottom),
|
|
54
|
+
}"
|
|
55
|
+
>
|
|
42
56
|
<view class="flex shrink-0">
|
|
43
57
|
<Image v-bind="imageProps" />
|
|
44
58
|
</view>
|
|
45
59
|
</scroll-view>
|
|
46
60
|
|
|
47
61
|
<!-- <view class="pl-20px pr-20px break-all">{{ JSON.stringify(iconItems) }}</view> -->
|
|
48
|
-
|
|
49
62
|
</template>
|
|
50
63
|
|
|
51
64
|
<script setup lang="ts">
|
|
52
|
-
import { computed } from 'vue'
|
|
65
|
+
import { computed } from 'vue'
|
|
53
66
|
import { transformValueUnit } from '../../utils/transform'
|
|
54
67
|
import Image from './Image/index.vue'
|
|
55
68
|
import { LcbImageProps } from './types'
|
|
@@ -86,7 +99,6 @@ const imageProps = computed(() => {
|
|
|
86
99
|
// console.log('props.items', props.items)
|
|
87
100
|
// return props.items;
|
|
88
101
|
// })
|
|
89
|
-
|
|
90
102
|
</script>
|
|
91
103
|
|
|
92
104
|
<style lang="scss" scoped></style>
|
|
@@ -2,7 +2,7 @@ import { ActionView } from 'action'
|
|
|
2
2
|
export interface LcbImageProps {
|
|
3
3
|
// Define the component's prop types here
|
|
4
4
|
items?: Partial<ActionView>[]
|
|
5
|
-
styleGroup?: number
|
|
5
|
+
styleGroup?: number // 1 纵向 2 横向 3 横向滚动
|
|
6
6
|
|
|
7
7
|
imageRadius?: number
|
|
8
8
|
itemPadding?: number
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FilterTabsProps } from './components/FilterTabs/type'
|
|
1
2
|
import { Option } from './types'
|
|
2
3
|
export interface LcbListInfo {
|
|
3
4
|
url: string
|
|
@@ -8,18 +9,23 @@ export interface LcbFilterResult {
|
|
|
8
9
|
filterTags: FilterTags
|
|
9
10
|
filterComponent: FilterComponent[]
|
|
10
11
|
listInfo: LcbListInfo
|
|
12
|
+
filterTabs?: {
|
|
13
|
+
componentProps: FilterTabsProps
|
|
14
|
+
valueName: string
|
|
15
|
+
defaultValue?: string
|
|
16
|
+
}
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
export interface FilterComponent {
|
|
14
|
-
|
|
20
|
+
filterName?: string
|
|
15
21
|
component: string
|
|
16
22
|
defaultValue?: string
|
|
17
23
|
defaultName?: string
|
|
18
24
|
valueName: string
|
|
19
|
-
componentProps:
|
|
25
|
+
componentProps: FilterComponentProps
|
|
20
26
|
}
|
|
21
27
|
|
|
22
|
-
interface
|
|
28
|
+
interface FilterComponentProps {
|
|
23
29
|
mode?: 'multiple' | 'single'
|
|
24
30
|
apiPath?: string
|
|
25
31
|
options?: Option[]
|
|
@@ -27,11 +33,11 @@ interface ComponentProps3 {
|
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export interface ComponentList {
|
|
30
|
-
|
|
36
|
+
filterName: string
|
|
31
37
|
component: string
|
|
32
38
|
valueName: string
|
|
33
39
|
defaultValue?: string | string[] | number[]
|
|
34
|
-
componentProps:
|
|
40
|
+
componentProps: FilterTagsProps
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
export interface FilterTags {
|
|
@@ -39,10 +45,10 @@ export interface FilterTags {
|
|
|
39
45
|
valueName: string
|
|
40
46
|
defaultValue?: string
|
|
41
47
|
defaultName?: string
|
|
42
|
-
componentProps:
|
|
48
|
+
componentProps: FilterTagsProps
|
|
43
49
|
}
|
|
44
50
|
|
|
45
|
-
export interface
|
|
51
|
+
export interface FilterTagsProps {
|
|
46
52
|
mode?: 'multiple' | 'single'
|
|
47
53
|
max: number
|
|
48
54
|
min: number
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="px-5 pt-2 pb-4 bg-#fafafa max-h-70vh overflow-y-auto box-border">
|
|
3
3
|
<view v-for="child in componentList" :key="child.valueName" class="mb-12rpx">
|
|
4
4
|
<view class="lcb-filter__group-title mt2">
|
|
5
|
-
{{ child.
|
|
5
|
+
{{ child.filterName }}
|
|
6
6
|
<view v-if="child.componentProps.mode === 'multiple'" class="!text-22rpx">可多选</view>
|
|
7
7
|
<view v-if="child.component === 'slider'" class="!text-26rpx slider-title">
|
|
8
8
|
{{
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<z-paging
|
|
2
|
+
<z-paging
|
|
3
|
+
ref="paging"
|
|
4
|
+
:empty-view-z-index="0"
|
|
5
|
+
:auto="true"
|
|
6
|
+
v-model="dataList"
|
|
7
|
+
@query="queryList"
|
|
8
|
+
use-page-scroll
|
|
9
|
+
>
|
|
3
10
|
<lcb-product v-bind="{ ...productProps }" :items="dataList" />
|
|
4
11
|
</z-paging>
|
|
5
12
|
</template>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterTagsProps } from '../../api'
|
|
2
2
|
|
|
3
|
-
export interface FilterSliderProps extends
|
|
3
|
+
export interface FilterSliderProps extends FilterTagsProps {}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wd-tabs
|
|
3
|
+
:mode="mode"
|
|
4
|
+
custom-class="!bg-transparent"
|
|
5
|
+
v-model="modelValue"
|
|
6
|
+
:slidable-num="slidableNum"
|
|
7
|
+
>
|
|
8
|
+
<block v-for="item in options" :key="item.value">
|
|
9
|
+
<wd-tab :title="item.label" :name="`${item.value}`" />
|
|
10
|
+
</block>
|
|
11
|
+
</wd-tabs>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { FilterTabsProps } from './type'
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'FilterTabs',
|
|
18
|
+
options: {
|
|
19
|
+
addGlobalClass: true,
|
|
20
|
+
virtualHost: true,
|
|
21
|
+
styleIsolation: 'shared',
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
defineProps<FilterTabsProps>()
|
|
25
|
+
const modelValue = defineModel<string>()
|
|
26
|
+
</script>
|
|
27
|
+
<style lang="scss" scoped></style>
|
|
@@ -13,6 +13,26 @@
|
|
|
13
13
|
border-top: 1px solid #F3F5F9;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
&__plain {
|
|
17
|
+
:deep(.wd-drop-menu__list) {
|
|
18
|
+
background-color: transparent;
|
|
19
|
+
margin-top: 20rpx;
|
|
20
|
+
gap: 20rpx;
|
|
21
|
+
padding: 0 24rpx;
|
|
22
|
+
|
|
23
|
+
.wd-drop-menu__item {
|
|
24
|
+
height: 48rpx;
|
|
25
|
+
line-height: 48rpx;
|
|
26
|
+
background: #fff;
|
|
27
|
+
border-radius: 8rpx;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:deep(.wd-tabs__nav) {
|
|
32
|
+
background-color: transparent;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
16
36
|
}
|
|
17
37
|
|
|
18
38
|
.opacity-primary {
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view v-if="info">
|
|
3
|
-
<
|
|
3
|
+
<wd-sticky @sticky="sticky = $event">
|
|
4
4
|
<view
|
|
5
5
|
:class="{
|
|
6
|
-
'lcb-filter__border-top': border,
|
|
6
|
+
'lcb-filter__border-top': styleMode === 'plain' && !sticky ? false : border,
|
|
7
|
+
'lcb-filter__plain': styleMode === 'plain' && !sticky,
|
|
7
8
|
}"
|
|
9
|
+
class="w-100vw"
|
|
8
10
|
>
|
|
11
|
+
<FilterTabs
|
|
12
|
+
v-model="filter[info?.filterTabs?.valueName]"
|
|
13
|
+
v-bind="info?.filterTabs?.componentProps"
|
|
14
|
+
v-if="info?.filterTabs"
|
|
15
|
+
/>
|
|
9
16
|
<wd-drop-menu>
|
|
10
17
|
<wd-drop-menu-item
|
|
11
18
|
v-for="(item, index) in info?.filterComponent"
|
|
12
19
|
:key="item.valueName"
|
|
13
|
-
:title="titleObj[item.valueName] || item.
|
|
20
|
+
:title="titleObj[item.valueName] || item.filterName"
|
|
14
21
|
icon="caret-down-small"
|
|
15
22
|
icon-size="26px"
|
|
16
23
|
:selected="getSelect(item)"
|
|
@@ -58,7 +65,8 @@
|
|
|
58
65
|
</wd-button>
|
|
59
66
|
</view>
|
|
60
67
|
</view>
|
|
61
|
-
</
|
|
68
|
+
</wd-sticky>
|
|
69
|
+
|
|
62
70
|
<FilterList v-bind="{ ...info.listInfo, ...pageListProps, filter }" />
|
|
63
71
|
</view>
|
|
64
72
|
</template>
|
|
@@ -72,6 +80,7 @@ import TreeSelect from './components/TreeSelect/index.vue'
|
|
|
72
80
|
import ComponentGroup from './components/ComponentGroup/index.vue'
|
|
73
81
|
import TagSelect from './components/TagSelect/index.vue'
|
|
74
82
|
import FilterList from './components/FilterList/index.vue'
|
|
83
|
+
import FilterTabs from './components/FilterTabs/index.vue'
|
|
75
84
|
import './index.scss'
|
|
76
85
|
import { FORM_KEY } from '../../constants'
|
|
77
86
|
defineOptions({
|
|
@@ -87,6 +96,7 @@ const dropMenu = ref()
|
|
|
87
96
|
const props = withDefaults(defineProps<LcbListProps>(), {
|
|
88
97
|
pageFilterType: 'hotelTravelFilter',
|
|
89
98
|
border: true,
|
|
99
|
+
styleMode: 'default',
|
|
90
100
|
pageListProps: () => ({
|
|
91
101
|
productProps: {
|
|
92
102
|
styleGroup: 1,
|
|
@@ -96,6 +106,8 @@ const props = withDefaults(defineProps<LcbListProps>(), {
|
|
|
96
106
|
const info = ref<LcbFilterResult>()
|
|
97
107
|
const filter = ref<Record<string, any>>({})
|
|
98
108
|
const titleObj = ref<Record<string, any>>({})
|
|
109
|
+
/** 是否悬停 */
|
|
110
|
+
const sticky = ref(false)
|
|
99
111
|
watch(
|
|
100
112
|
() => props.pageFilterType,
|
|
101
113
|
async (val) => {
|
|
@@ -103,7 +115,7 @@ watch(
|
|
|
103
115
|
const { data } = await getFilterDetail(val)
|
|
104
116
|
data.filterComponent.forEach((item) => {
|
|
105
117
|
filter.value[item.valueName] = item.defaultValue
|
|
106
|
-
titleObj.value[item.valueName] = item.
|
|
118
|
+
titleObj.value[item.valueName] = item.filterName
|
|
107
119
|
if (item.componentProps?.componentList) {
|
|
108
120
|
item.componentProps.componentList.forEach((data) => {
|
|
109
121
|
filter.value[data.valueName] = data.defaultValue
|
|
@@ -114,6 +126,10 @@ watch(
|
|
|
114
126
|
filter.value[data.filterTags.valueName] = data.filterTags.defaultValue
|
|
115
127
|
titleObj.value[data.filterTags.valueName] = data.filterTags.defaultName
|
|
116
128
|
}
|
|
129
|
+
if (data.filterTabs) {
|
|
130
|
+
filter.value[data.filterTabs.valueName] =
|
|
131
|
+
data.filterTabs.defaultValue || data.filterTabs.componentProps.options?.[0]?.value
|
|
132
|
+
}
|
|
117
133
|
info.value = data
|
|
118
134
|
}
|
|
119
135
|
},
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
<!-- 中间布局 -->
|
|
68
68
|
<view
|
|
69
69
|
class="navbar-center"
|
|
70
|
-
v-if="topStyle === 1"
|
|
71
70
|
:style="{
|
|
72
71
|
paddingTop,
|
|
73
72
|
}"
|
|
@@ -86,8 +85,8 @@ import { computed, ref } from 'vue'
|
|
|
86
85
|
import { ICapsule, NavProps } from './types'
|
|
87
86
|
import Title from './Title/index.vue'
|
|
88
87
|
import Search from './Search/index.vue'
|
|
89
|
-
import { onPageScroll } from '@dcloudio/uni-app'
|
|
90
88
|
import { Locale } from '@tplc/wot'
|
|
89
|
+
import usePageScroll from '../../hooks/usePageScroll'
|
|
91
90
|
defineOptions({
|
|
92
91
|
name: 'LcbNav',
|
|
93
92
|
options: {
|
|
@@ -105,7 +104,7 @@ const iconMap = {
|
|
|
105
104
|
setting: 'peizhi_config',
|
|
106
105
|
home: 'shouye_home1',
|
|
107
106
|
}
|
|
108
|
-
const scrollTop =
|
|
107
|
+
const [scrollTop] = usePageScroll()
|
|
109
108
|
const props = withDefaults(defineProps<NavProps>(), {
|
|
110
109
|
styleGroup: 1,
|
|
111
110
|
titleLocation: 'center',
|
|
@@ -207,12 +206,6 @@ const onCapsule = ({ action }: ICapsule) => {
|
|
|
207
206
|
const toBack = () => {
|
|
208
207
|
uni.navigateBack()
|
|
209
208
|
}
|
|
210
|
-
|
|
211
|
-
onPageScroll(({ scrollTop: top }) => {
|
|
212
|
-
if (props.immersionMode === 1) {
|
|
213
|
-
scrollTop.value = top
|
|
214
|
-
}
|
|
215
|
-
})
|
|
216
209
|
</script>
|
|
217
210
|
<style lang="scss" scoped>
|
|
218
211
|
.customNavigation {
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
:style="{
|
|
7
7
|
height: transformValueUnit(40),
|
|
8
8
|
width: transformValueUnit(40),
|
|
9
|
-
// color: textColor,
|
|
10
9
|
backgroundImage: `url('${item?.icon}')`,
|
|
11
10
|
}"
|
|
12
11
|
/>
|
|
@@ -16,21 +15,22 @@
|
|
|
16
15
|
v-bind="{
|
|
17
16
|
name: item?.icon || '',
|
|
18
17
|
size: transformValueUnit(40),
|
|
19
|
-
// color: textColor,
|
|
20
18
|
}"
|
|
21
19
|
/>
|
|
22
20
|
</view>
|
|
23
21
|
<view class="flex-1 noticeBar relative overflow-hidden">
|
|
24
22
|
<view
|
|
25
|
-
:class="`text-
|
|
23
|
+
:class="`text-24rpx absolute left-0 top-0 noticeItem flex overflow-hidden${lens == 1 ? ' infinite' : ''}${showAni ? ' animation' : ''}`"
|
|
26
24
|
:style="{
|
|
27
25
|
animationDuration: getTime(item?.noticeContent),
|
|
26
|
+
color: textColor,
|
|
28
27
|
}"
|
|
29
28
|
>
|
|
30
29
|
{{ item?.noticeContent }}
|
|
31
30
|
<lcb-action-view v-bind="item?.link" customClass="absolute top-0 left-0 right-0 bottom-0" />
|
|
32
31
|
</view>
|
|
33
32
|
</view>
|
|
33
|
+
<wd-icon name="arrow-right" size="32rpx" :color="textColor" />
|
|
34
34
|
</view>
|
|
35
35
|
</template>
|
|
36
36
|
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<lcb-block
|
|
2
|
+
<lcb-block
|
|
3
|
+
v-bind="$props"
|
|
4
|
+
custom-class="border-solid border-1"
|
|
5
|
+
:style="{
|
|
6
|
+
'border-color': borderColor,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
3
9
|
<swiper
|
|
4
10
|
class="swiper"
|
|
5
11
|
circular
|
|
@@ -17,20 +23,14 @@
|
|
|
17
23
|
:iconType="iconType"
|
|
18
24
|
:item="item"
|
|
19
25
|
:textSpeed="textSpeed"
|
|
26
|
+
:textColor="textColor"
|
|
20
27
|
/>
|
|
21
28
|
</swiper-item>
|
|
22
|
-
<!-- <swiper-item>
|
|
23
|
-
<Item :idx="1" :current="current" text="请填写公告111" @setInterval="onSetInterval" />
|
|
24
|
-
</swiper-item>
|
|
25
|
-
<swiper-item>
|
|
26
|
-
<Item :idx="2" :current="current" text="请填写公告222" @setInterval="onSetInterval" />
|
|
27
|
-
</swiper-item> -->
|
|
28
29
|
</swiper>
|
|
29
30
|
</lcb-block>
|
|
30
31
|
</template>
|
|
31
32
|
|
|
32
33
|
<script setup lang="ts">
|
|
33
|
-
import { ref } from 'vue'
|
|
34
34
|
import { LcbNoticeBarProps } from './types'
|
|
35
35
|
import Item from './Item/index.vue'
|
|
36
36
|
|
|
@@ -45,7 +45,9 @@ defineOptions({
|
|
|
45
45
|
|
|
46
46
|
const props = withDefaults(defineProps<LcbNoticeBarProps>(), {
|
|
47
47
|
textSpeed: 1,
|
|
48
|
+
borderColor: 'transparent',
|
|
48
49
|
})
|
|
50
|
+
console.log(props, 'props')
|
|
49
51
|
|
|
50
52
|
function getTime(text: string | undefined) {
|
|
51
53
|
const len = text?.length || 0
|
|
@@ -13,6 +13,8 @@ export interface LcbNoticeBarProps {
|
|
|
13
13
|
iconType?: number
|
|
14
14
|
direction?: string
|
|
15
15
|
textSpeed?: number
|
|
16
|
+
textColor?: string
|
|
17
|
+
borderColor?: string
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export interface NoticeBarItemProps {
|
|
@@ -21,7 +23,8 @@ export interface NoticeBarItemProps {
|
|
|
21
23
|
text?: string
|
|
22
24
|
lens?: number
|
|
23
25
|
iconType?: number
|
|
24
|
-
item?: NoticeItem
|
|
26
|
+
item?: NoticeItem
|
|
25
27
|
textSpeed?: number
|
|
28
|
+
textColor?: string
|
|
26
29
|
// setInterval?: Function
|
|
27
30
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { onPageScroll } from '@dcloudio/uni-app'
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
const usePageScroll = () => {
|
|
4
|
+
const scrollTop = ref(0)
|
|
5
|
+
onPageScroll(({ scrollTop: top }) => {
|
|
6
|
+
scrollTop.value = top
|
|
7
|
+
})
|
|
8
|
+
return [scrollTop]
|
|
9
|
+
}
|
|
10
|
+
export default usePageScroll
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
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.
|
|
14
|
+
"@tplc/wot": "0.1.14"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FilterTabsProps } from './components/FilterTabs/type'
|
|
1
2
|
import { Option } from './types'
|
|
2
3
|
export interface LcbListInfo {
|
|
3
4
|
url: string
|
|
@@ -8,36 +9,41 @@ export interface LcbFilterResult {
|
|
|
8
9
|
filterTags: FilterTags
|
|
9
10
|
filterComponent: FilterComponent[]
|
|
10
11
|
listInfo: LcbListInfo
|
|
12
|
+
filterTabs?: {
|
|
13
|
+
componentProps: FilterTabsProps
|
|
14
|
+
valueName: string
|
|
15
|
+
defaultValue?: string
|
|
16
|
+
}
|
|
11
17
|
}
|
|
12
18
|
export interface FilterComponent {
|
|
13
|
-
|
|
19
|
+
filterName?: string
|
|
14
20
|
component: string
|
|
15
21
|
defaultValue?: string
|
|
16
22
|
defaultName?: string
|
|
17
23
|
valueName: string
|
|
18
|
-
componentProps:
|
|
24
|
+
componentProps: FilterComponentProps
|
|
19
25
|
}
|
|
20
|
-
interface
|
|
26
|
+
interface FilterComponentProps {
|
|
21
27
|
mode?: 'multiple' | 'single'
|
|
22
28
|
apiPath?: string
|
|
23
29
|
options?: Option[]
|
|
24
30
|
componentList?: ComponentList[]
|
|
25
31
|
}
|
|
26
32
|
export interface ComponentList {
|
|
27
|
-
|
|
33
|
+
filterName: string
|
|
28
34
|
component: string
|
|
29
35
|
valueName: string
|
|
30
36
|
defaultValue?: string | string[] | number[]
|
|
31
|
-
componentProps:
|
|
37
|
+
componentProps: FilterTagsProps
|
|
32
38
|
}
|
|
33
39
|
export interface FilterTags {
|
|
34
40
|
component: string
|
|
35
41
|
valueName: string
|
|
36
42
|
defaultValue?: string
|
|
37
43
|
defaultName?: string
|
|
38
|
-
componentProps:
|
|
44
|
+
componentProps: FilterTagsProps
|
|
39
45
|
}
|
|
40
|
-
export interface
|
|
46
|
+
export interface FilterTagsProps {
|
|
41
47
|
mode?: 'multiple' | 'single'
|
|
42
48
|
max: number
|
|
43
49
|
min: number
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface FilterSliderProps extends
|
|
1
|
+
import { FilterTagsProps } from '../../api'
|
|
2
|
+
export interface FilterSliderProps extends FilterTagsProps {}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FilterTabsProps } from './type'
|
|
2
|
+
declare let __VLS_typeProps: FilterTabsProps
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: string
|
|
5
|
+
} & typeof __VLS_typeProps
|
|
6
|
+
declare const _default: import('vue').DefineComponent<
|
|
7
|
+
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
8
|
+
{},
|
|
9
|
+
unknown,
|
|
10
|
+
{},
|
|
11
|
+
{},
|
|
12
|
+
import('vue').ComponentOptionsMixin,
|
|
13
|
+
import('vue').ComponentOptionsMixin,
|
|
14
|
+
{
|
|
15
|
+
'update:modelValue': (modelValue: string) => void
|
|
16
|
+
},
|
|
17
|
+
string,
|
|
18
|
+
import('vue').PublicProps,
|
|
19
|
+
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
20
|
+
'onUpdate:modelValue'?: ((modelValue: string) => any) | undefined
|
|
21
|
+
},
|
|
22
|
+
{},
|
|
23
|
+
{}
|
|
24
|
+
>
|
|
25
|
+
export default _default
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
27
|
+
type __VLS_TypePropsToOption<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
29
|
+
? {
|
|
30
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
type: import('vue').PropType<T[K]>
|
|
34
|
+
required: true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
6
6
|
{
|
|
7
7
|
pageFilterType: string
|
|
8
8
|
border: boolean
|
|
9
|
+
styleMode: string
|
|
9
10
|
pageListProps: () => {
|
|
10
11
|
productProps: {
|
|
11
12
|
styleGroup: number
|
|
@@ -29,6 +30,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
29
30
|
{
|
|
30
31
|
pageFilterType: string
|
|
31
32
|
border: boolean
|
|
33
|
+
styleMode: string
|
|
32
34
|
pageListProps: () => {
|
|
33
35
|
productProps: {
|
|
34
36
|
styleGroup: number
|
|
@@ -42,6 +44,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
42
44
|
border: boolean
|
|
43
45
|
pageFilterType: string
|
|
44
46
|
pageListProps: import('./components/FilterList/type').PageListProps
|
|
47
|
+
styleMode: 'default' | 'plain'
|
|
45
48
|
},
|
|
46
49
|
{}
|
|
47
50
|
>
|
|
@@ -10,6 +10,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
10
10
|
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
11
11
|
{
|
|
12
12
|
textSpeed: number
|
|
13
|
+
borderColor: string
|
|
13
14
|
}
|
|
14
15
|
>,
|
|
15
16
|
{},
|
|
@@ -30,6 +31,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
30
31
|
__VLS_TypePropsToOption<__VLS_PublicProps>,
|
|
31
32
|
{
|
|
32
33
|
textSpeed: number
|
|
34
|
+
borderColor: string
|
|
33
35
|
}
|
|
34
36
|
>
|
|
35
37
|
>
|
|
@@ -39,6 +41,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
39
41
|
},
|
|
40
42
|
{
|
|
41
43
|
textSpeed: number
|
|
44
|
+
borderColor: string
|
|
42
45
|
},
|
|
43
46
|
{}
|
|
44
47
|
>
|
|
@@ -11,6 +11,8 @@ export interface LcbNoticeBarProps {
|
|
|
11
11
|
iconType?: number
|
|
12
12
|
direction?: string
|
|
13
13
|
textSpeed?: number
|
|
14
|
+
textColor?: string
|
|
15
|
+
borderColor?: string
|
|
14
16
|
}
|
|
15
17
|
export interface NoticeBarItemProps {
|
|
16
18
|
idx?: number
|
|
@@ -20,5 +22,6 @@ export interface NoticeBarItemProps {
|
|
|
20
22
|
iconType?: number
|
|
21
23
|
item?: NoticeItem
|
|
22
24
|
textSpeed?: number
|
|
25
|
+
textColor?: string
|
|
23
26
|
}
|
|
24
27
|
export {}
|