@tplc/wot 1.0.14 → 1.0.15
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,13 @@
|
|
|
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
|
+
### [1.0.15](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.18...v1.0.15) (2025-12-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* area 支持接受list数据 ([5abec9c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5abec9c777a1bc503f1206378ec60bddf9090c52))
|
|
11
|
+
|
|
5
12
|
### [1.0.14](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.83...v1.0.14) (2025-12-06)
|
|
6
13
|
|
|
7
14
|
### [1.0.13](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.82...v1.0.13) (2025-12-06)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { baseProps,
|
|
1
|
+
import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props'
|
|
2
2
|
|
|
3
3
|
export const backtopProps = {
|
|
4
4
|
...baseProps,
|
|
5
5
|
/**
|
|
6
6
|
* 页面滚动距离
|
|
7
7
|
*/
|
|
8
|
-
scrollTop:
|
|
8
|
+
scrollTop: makeNumberProp(Number),
|
|
9
9
|
/**
|
|
10
10
|
* 距离顶部多少距离时显示
|
|
11
11
|
*/
|
|
@@ -33,5 +33,11 @@ export const backtopProps = {
|
|
|
33
33
|
/**
|
|
34
34
|
* 距离屏幕右边距离
|
|
35
35
|
*/
|
|
36
|
-
right: makeNumberProp(20)
|
|
36
|
+
right: makeNumberProp(20),
|
|
37
|
+
|
|
38
|
+
// 一直显示
|
|
39
|
+
alwaysShow: makeBooleanProp(false),
|
|
40
|
+
|
|
41
|
+
// 距离屏幕左边距离 优先级更高
|
|
42
|
+
left: makeNumberProp(0),
|
|
37
43
|
}
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
<wd-transition :show="show" name="fade">
|
|
3
3
|
<view
|
|
4
4
|
:class="`wd-backtop ${customClass} is-${shape}`"
|
|
5
|
-
:style="`z-index: ${zIndex}; bottom: ${bottom}px; right: ${right}px
|
|
5
|
+
:style="`z-index: ${zIndex}; bottom: ${bottom}px; ${left ? `left: ${left}px;` : `right: ${right}px;`} ${customStyle}`"
|
|
6
6
|
@click="handleBacktop"
|
|
7
7
|
>
|
|
8
8
|
<slot v-if="$slots.default"></slot>
|
|
9
|
-
<wd-icon
|
|
9
|
+
<wd-icon
|
|
10
|
+
v-else
|
|
11
|
+
custom-class="wd-backtop__backicon"
|
|
12
|
+
name="backtop"
|
|
13
|
+
:custom-style="iconStyle"
|
|
14
|
+
/>
|
|
10
15
|
</view>
|
|
11
16
|
</wd-transition>
|
|
12
17
|
</template>
|
|
@@ -17,29 +22,32 @@ export default {
|
|
|
17
22
|
options: {
|
|
18
23
|
addGlobalClass: true,
|
|
19
24
|
virtualHost: true,
|
|
20
|
-
styleIsolation: 'shared'
|
|
21
|
-
}
|
|
25
|
+
styleIsolation: 'shared',
|
|
26
|
+
},
|
|
22
27
|
}
|
|
23
28
|
</script>
|
|
24
29
|
|
|
25
30
|
<script lang="ts" setup>
|
|
26
|
-
import
|
|
27
|
-
import wdIcon from '../wd-icon/wd-icon.vue'
|
|
28
|
-
import { computed } from 'vue'
|
|
31
|
+
import { computed, ref } from 'vue'
|
|
29
32
|
import { backtopProps } from './types'
|
|
30
|
-
|
|
33
|
+
import { onPageScroll } from '@dcloudio/uni-app'
|
|
34
|
+
const scrollTop = ref(0)
|
|
31
35
|
const props = defineProps(backtopProps)
|
|
32
36
|
|
|
33
|
-
const show = computed(() =>
|
|
34
|
-
|
|
37
|
+
const show = computed(() => scrollTop.value > props.top || props.alwaysShow)
|
|
38
|
+
onPageScroll((e) => {
|
|
39
|
+
scrollTop.value = e.scrollTop
|
|
40
|
+
})
|
|
35
41
|
function handleBacktop() {
|
|
42
|
+
if (props.alwaysShow) return
|
|
43
|
+
scrollTop.value = 0
|
|
36
44
|
uni.pageScrollTo({
|
|
37
45
|
scrollTop: 0,
|
|
38
|
-
duration: props.duration
|
|
46
|
+
duration: props.duration,
|
|
39
47
|
})
|
|
40
48
|
}
|
|
41
49
|
</script>
|
|
42
50
|
|
|
43
51
|
<style lang="scss" scoped>
|
|
44
|
-
@import './index
|
|
52
|
+
@import './index';
|
|
45
53
|
</style>
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ export declare const backtopProps: {
|
|
|
4
4
|
*/
|
|
5
5
|
scrollTop: {
|
|
6
6
|
type: NumberConstructor
|
|
7
|
-
|
|
7
|
+
default: NumberConstructor
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* 距离顶部多少距离时显示
|
|
@@ -55,6 +55,14 @@ export declare const backtopProps: {
|
|
|
55
55
|
type: NumberConstructor
|
|
56
56
|
default: number
|
|
57
57
|
}
|
|
58
|
+
alwaysShow: {
|
|
59
|
+
type: BooleanConstructor
|
|
60
|
+
default: boolean
|
|
61
|
+
}
|
|
62
|
+
left: {
|
|
63
|
+
type: NumberConstructor
|
|
64
|
+
default: number
|
|
65
|
+
}
|
|
58
66
|
customStyle: {
|
|
59
67
|
type: import('vue').PropType<string>
|
|
60
68
|
default: string
|
|
@@ -3,7 +3,7 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
3
3
|
{
|
|
4
4
|
scrollTop: {
|
|
5
5
|
type: NumberConstructor
|
|
6
|
-
|
|
6
|
+
default: NumberConstructor
|
|
7
7
|
}
|
|
8
8
|
top: {
|
|
9
9
|
type: NumberConstructor
|
|
@@ -33,6 +33,14 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
33
33
|
type: NumberConstructor
|
|
34
34
|
default: number
|
|
35
35
|
}
|
|
36
|
+
alwaysShow: {
|
|
37
|
+
type: BooleanConstructor
|
|
38
|
+
default: boolean
|
|
39
|
+
}
|
|
40
|
+
left: {
|
|
41
|
+
type: NumberConstructor
|
|
42
|
+
default: number
|
|
43
|
+
}
|
|
36
44
|
customStyle: {
|
|
37
45
|
type: import('vue').PropType<string>
|
|
38
46
|
default: string
|
|
@@ -55,7 +63,7 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
55
63
|
import('vue').ExtractPropTypes<{
|
|
56
64
|
scrollTop: {
|
|
57
65
|
type: NumberConstructor
|
|
58
|
-
|
|
66
|
+
default: NumberConstructor
|
|
59
67
|
}
|
|
60
68
|
top: {
|
|
61
69
|
type: NumberConstructor
|
|
@@ -85,6 +93,14 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
85
93
|
type: NumberConstructor
|
|
86
94
|
default: number
|
|
87
95
|
}
|
|
96
|
+
alwaysShow: {
|
|
97
|
+
type: BooleanConstructor
|
|
98
|
+
default: boolean
|
|
99
|
+
}
|
|
100
|
+
left: {
|
|
101
|
+
type: NumberConstructor
|
|
102
|
+
default: number
|
|
103
|
+
}
|
|
88
104
|
customStyle: {
|
|
89
105
|
type: import('vue').PropType<string>
|
|
90
106
|
default: string
|
|
@@ -103,8 +119,11 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
103
119
|
top: number
|
|
104
120
|
right: number
|
|
105
121
|
bottom: number
|
|
122
|
+
left: number
|
|
123
|
+
scrollTop: number
|
|
106
124
|
iconStyle: string
|
|
107
125
|
shape: string
|
|
126
|
+
alwaysShow: boolean
|
|
108
127
|
},
|
|
109
128
|
{}
|
|
110
129
|
>,
|