@tplc/business 0.4.108 → 0.4.110
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-img-nav/lcb-img-nav.vue +1 -1
- package/components/lcb-nav/lcb-nav.vue +1 -1
- package/components/lcb-product/components/ProductSkeleton/index.vue +54 -0
- package/components/lcb-product/components/SKeletonItem/index.vue +38 -0
- package/components/lcb-product/lcb-product.vue +3 -2
- package/package.json +2 -2
- package/types/components/lcb-product/components/ProductSkeleton/index.vue.d.ts +70 -0
- package/types/components/lcb-product/components/SKeletonItem/index.vue.d.ts +28 -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.4.110](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.84...v0.4.110) (2025-05-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* swiper 兼容小程序pc ([677655c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/677655c96596404322b76258db277d530c66f8e5))
|
|
11
|
+
|
|
12
|
+
### [0.4.109](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.108...v0.4.109) (2025-05-11)
|
|
13
|
+
|
|
5
14
|
### [0.4.108](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.107...v0.4.108) (2025-05-10)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -143,7 +143,7 @@ const renderItems = computed(() => {
|
|
|
143
143
|
if (item.dependKeyCompareValue) {
|
|
144
144
|
return `${value}` === `${item.dependKeyCompareValue}`
|
|
145
145
|
}
|
|
146
|
-
return
|
|
146
|
+
return item.reverse ? !value : Boolean(value)
|
|
147
147
|
}
|
|
148
148
|
return true
|
|
149
149
|
}) || []
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="loading">
|
|
3
|
+
<view v-if="listType === 'list'" class="flex flex-col gap-3">
|
|
4
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
5
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
6
|
+
</view>
|
|
7
|
+
<!-- horizontal -->
|
|
8
|
+
<view
|
|
9
|
+
v-else-if="listType === 'horizontal'"
|
|
10
|
+
class="flex flex-row gap-3 overflow-x-auto whitespace-nowrap"
|
|
11
|
+
>
|
|
12
|
+
<SkeletonItem :layout-type="layoutType" :custom-class="`!w-45% flex-shrink-0`" />
|
|
13
|
+
<SkeletonItem :layout-type="layoutType" :custom-class="`!w-45% flex-shrink-0`" />
|
|
14
|
+
<SkeletonItem :layout-type="layoutType" :custom-class="`!w-45% flex-shrink-0`" />
|
|
15
|
+
</view>
|
|
16
|
+
<!-- grid -->
|
|
17
|
+
<view v-else-if="listType === 'grid'" class="grid grid-cols-2 gap-3">
|
|
18
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
19
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
20
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
21
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
22
|
+
</view>
|
|
23
|
+
<!-- waterfall -->
|
|
24
|
+
<view v-else-if="listType === 'waterfall'" class="grid grid-cols-2 gap-3">
|
|
25
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
26
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
27
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
28
|
+
<SkeletonItem :layout-type="layoutType" />
|
|
29
|
+
</view>
|
|
30
|
+
</template>
|
|
31
|
+
<slot v-else />
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { LcbProductProps } from '../../types'
|
|
36
|
+
import { defineProps } from 'vue'
|
|
37
|
+
import SkeletonItem from '../SKeletonItem/index.vue'
|
|
38
|
+
defineOptions({
|
|
39
|
+
name: 'ProductSkeleton',
|
|
40
|
+
options: {
|
|
41
|
+
addGlobalClass: true,
|
|
42
|
+
virtualHost: true,
|
|
43
|
+
layoutType: 'vertical',
|
|
44
|
+
styleIsolation: 'shared',
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
withDefaults(defineProps<LcbProductProps & { loading?: boolean }>(), {})
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<style lang="scss" scoped>
|
|
51
|
+
.lcb-product-skeleton {
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- vertical -->
|
|
3
|
+
<view v-if="layoutType === 'vertical'" :class="customClass" class="w-full">
|
|
4
|
+
<wd-skeleton :row-col="verticalRowCol" animation="gradient" />
|
|
5
|
+
</view>
|
|
6
|
+
<!-- horizontal -->
|
|
7
|
+
<view v-else class="flex flex-row w-fuull" :class="customClass">
|
|
8
|
+
<wd-skeleton :row-col="[{ size: '80px', type: 'rect' }]" animation="gradient" />
|
|
9
|
+
<wd-skeleton
|
|
10
|
+
animation="gradient"
|
|
11
|
+
:custom-style="{ width: '100%', marginLeft: '24rpx' }"
|
|
12
|
+
:row-col="[1, { width: '80%' }, [{ width: '40%' }, { width: '20%' }]]"
|
|
13
|
+
/>
|
|
14
|
+
</view>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { LcbProductProps } from '../../types'
|
|
19
|
+
import { defineProps } from 'vue'
|
|
20
|
+
|
|
21
|
+
defineOptions({
|
|
22
|
+
name: 'SkeletonItem',
|
|
23
|
+
options: {
|
|
24
|
+
addGlobalClass: true,
|
|
25
|
+
virtualHost: true,
|
|
26
|
+
layoutType: 'vertical',
|
|
27
|
+
styleIsolation: 'shared',
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
const props = defineProps<LcbProductProps>()
|
|
31
|
+
const verticalRowCol = [
|
|
32
|
+
{ height: '171px' },
|
|
33
|
+
1,
|
|
34
|
+
{ width: '80%' },
|
|
35
|
+
{ width: '60%' },
|
|
36
|
+
[{ width: '30%' }, { width: '10%', marginLeft: '41px' }],
|
|
37
|
+
]
|
|
38
|
+
</script>
|
|
@@ -8,6 +8,7 @@ import { calculateImageHeight } from '../../utils/utils'
|
|
|
8
8
|
import UnconditionedLayout from '../lcb-list/components/UnconditionedLayout/index.vue'
|
|
9
9
|
import { LcbProductProps } from './types'
|
|
10
10
|
import isEqual from 'lodash-es/isEqual'
|
|
11
|
+
import ProductSkeleton from './components/ProductSkeleton/index.vue'
|
|
11
12
|
|
|
12
13
|
const uWaterfallRef = ref()
|
|
13
14
|
defineOptions({
|
|
@@ -176,7 +177,7 @@ const blockProps = computed(() => {
|
|
|
176
177
|
|
|
177
178
|
<template>
|
|
178
179
|
<lcb-block v-bind="loading ? blockProps[0] : {}">
|
|
179
|
-
<
|
|
180
|
+
<ProductSkeleton :loading="loading" v-bind="$props">
|
|
180
181
|
<lcb-block
|
|
181
182
|
v-bind="{
|
|
182
183
|
...$props,
|
|
@@ -426,7 +427,7 @@ const blockProps = computed(() => {
|
|
|
426
427
|
</lcb-action-view>
|
|
427
428
|
</template>
|
|
428
429
|
</lcb-block>
|
|
429
|
-
</
|
|
430
|
+
</ProductSkeleton>
|
|
430
431
|
</lcb-block>
|
|
431
432
|
</template>
|
|
432
433
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.110",
|
|
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.84"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LcbProductProps } from '../../types'
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
default?(_: {}): any
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_component: import('vue').DefineComponent<
|
|
6
|
+
__VLS_WithDefaults<
|
|
7
|
+
__VLS_TypePropsToOption<
|
|
8
|
+
LcbProductProps & {
|
|
9
|
+
loading?: boolean
|
|
10
|
+
}
|
|
11
|
+
>,
|
|
12
|
+
{}
|
|
13
|
+
>,
|
|
14
|
+
{},
|
|
15
|
+
unknown,
|
|
16
|
+
{},
|
|
17
|
+
{},
|
|
18
|
+
import('vue').ComponentOptionsMixin,
|
|
19
|
+
import('vue').ComponentOptionsMixin,
|
|
20
|
+
{},
|
|
21
|
+
string,
|
|
22
|
+
import('vue').PublicProps,
|
|
23
|
+
Readonly<
|
|
24
|
+
import('vue').ExtractPropTypes<
|
|
25
|
+
__VLS_WithDefaults<
|
|
26
|
+
__VLS_TypePropsToOption<
|
|
27
|
+
LcbProductProps & {
|
|
28
|
+
loading?: boolean
|
|
29
|
+
}
|
|
30
|
+
>,
|
|
31
|
+
{}
|
|
32
|
+
>
|
|
33
|
+
>
|
|
34
|
+
>,
|
|
35
|
+
{},
|
|
36
|
+
{}
|
|
37
|
+
>
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<
|
|
39
|
+
typeof __VLS_component,
|
|
40
|
+
ReturnType<typeof __VLS_template>
|
|
41
|
+
>
|
|
42
|
+
export default _default
|
|
43
|
+
type __VLS_WithDefaults<P, D> = {
|
|
44
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D
|
|
45
|
+
? __VLS_Prettify<
|
|
46
|
+
P[K] & {
|
|
47
|
+
default: D[K]
|
|
48
|
+
}
|
|
49
|
+
>
|
|
50
|
+
: P[K]
|
|
51
|
+
}
|
|
52
|
+
type __VLS_Prettify<T> = {
|
|
53
|
+
[K in keyof T]: T[K]
|
|
54
|
+
} & {}
|
|
55
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
61
|
+
type __VLS_TypePropsToOption<T> = {
|
|
62
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
63
|
+
? {
|
|
64
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
65
|
+
}
|
|
66
|
+
: {
|
|
67
|
+
type: import('vue').PropType<T[K]>
|
|
68
|
+
required: true
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LcbProductProps } from '../../types'
|
|
2
|
+
declare const _default: import('vue').DefineComponent<
|
|
3
|
+
__VLS_TypePropsToOption<LcbProductProps>,
|
|
4
|
+
{},
|
|
5
|
+
unknown,
|
|
6
|
+
{},
|
|
7
|
+
{},
|
|
8
|
+
import('vue').ComponentOptionsMixin,
|
|
9
|
+
import('vue').ComponentOptionsMixin,
|
|
10
|
+
{},
|
|
11
|
+
string,
|
|
12
|
+
import('vue').PublicProps,
|
|
13
|
+
Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbProductProps>>>,
|
|
14
|
+
{},
|
|
15
|
+
{}
|
|
16
|
+
>
|
|
17
|
+
export default _default
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
19
|
+
type __VLS_TypePropsToOption<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
21
|
+
? {
|
|
22
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
23
|
+
}
|
|
24
|
+
: {
|
|
25
|
+
type: import('vue').PropType<T[K]>
|
|
26
|
+
required: true
|
|
27
|
+
}
|
|
28
|
+
}
|