@tplc/wot 1.0.28 → 1.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
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.29](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.77...v1.0.29) (2026-01-18)
|
|
6
|
+
|
|
5
7
|
### [1.0.28](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.67...v1.0.28) (2026-01-13)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
<view v-if="!showTypeSwitch && shortcuts.length === 0" class="wd-calendar__title">
|
|
46
46
|
{{ title || translate('title') }}
|
|
47
47
|
</view>
|
|
48
|
+
<slot name="header"></slot>
|
|
48
49
|
<view v-if="showTypeSwitch" class="wd-calendar__tabs">
|
|
49
50
|
<wd-tabs ref="calendarTabs" v-model="currentTab" @change="handleTypeChange">
|
|
50
51
|
<wd-tab :title="translate('day')" :name="translate('day')" />
|
|
@@ -16,8 +16,8 @@ export default {
|
|
|
16
16
|
options: {
|
|
17
17
|
addGlobalClass: true,
|
|
18
18
|
virtualHost: true,
|
|
19
|
-
styleIsolation: 'shared'
|
|
20
|
-
}
|
|
19
|
+
styleIsolation: 'shared',
|
|
20
|
+
},
|
|
21
21
|
}
|
|
22
22
|
</script>
|
|
23
23
|
|
|
@@ -32,6 +32,7 @@ import { STICKY_BOX_KEY } from '../wd-sticky-box/types'
|
|
|
32
32
|
const props = defineProps(stickyProps)
|
|
33
33
|
const styckyId = ref<string>(`wd-sticky${uuid()}`)
|
|
34
34
|
const observerList = ref<UniApp.IntersectionObserver[]>([])
|
|
35
|
+
const emits = defineEmits(['sticky'])
|
|
35
36
|
|
|
36
37
|
const stickyState = reactive({
|
|
37
38
|
position: 'absolute',
|
|
@@ -39,7 +40,7 @@ const stickyState = reactive({
|
|
|
39
40
|
top: 0,
|
|
40
41
|
height: 0,
|
|
41
42
|
width: 0,
|
|
42
|
-
state: ''
|
|
43
|
+
state: '',
|
|
43
44
|
})
|
|
44
45
|
|
|
45
46
|
const { parent: stickyBox } = useParent(STICKY_BOX_KEY)
|
|
@@ -50,10 +51,10 @@ const rootStyle = computed(() => {
|
|
|
50
51
|
const style: CSSProperties = {
|
|
51
52
|
'z-index': props.zIndex,
|
|
52
53
|
height: addUnit(stickyState.height),
|
|
53
|
-
width: addUnit(stickyState.width)
|
|
54
|
+
width: addUnit(stickyState.width),
|
|
54
55
|
}
|
|
55
56
|
if (!stickyState.boxLeaved) {
|
|
56
|
-
style
|
|
57
|
+
style.position = 'relative'
|
|
57
58
|
}
|
|
58
59
|
return `${objToStyle(style)}${props.customStyle}`
|
|
59
60
|
})
|
|
@@ -62,10 +63,10 @@ const stickyStyle = computed(() => {
|
|
|
62
63
|
const style: CSSProperties = {
|
|
63
64
|
'z-index': props.zIndex,
|
|
64
65
|
height: addUnit(stickyState.height),
|
|
65
|
-
width: addUnit(stickyState.width)
|
|
66
|
+
width: addUnit(stickyState.width),
|
|
66
67
|
}
|
|
67
68
|
if (!stickyState.boxLeaved) {
|
|
68
|
-
style
|
|
69
|
+
style.position = 'relative'
|
|
69
70
|
}
|
|
70
71
|
return `${objToStyle(style)}`
|
|
71
72
|
})
|
|
@@ -73,7 +74,7 @@ const stickyStyle = computed(() => {
|
|
|
73
74
|
const containerStyle = computed(() => {
|
|
74
75
|
const style: CSSProperties = {
|
|
75
76
|
position: stickyState.position as 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed',
|
|
76
|
-
top: addUnit(stickyState.top)
|
|
77
|
+
top: addUnit(stickyState.top),
|
|
77
78
|
}
|
|
78
79
|
return objToStyle(style)
|
|
79
80
|
})
|
|
@@ -86,6 +87,10 @@ const innerOffsetTop = computed(() => {
|
|
|
86
87
|
top = 44
|
|
87
88
|
// #endif
|
|
88
89
|
|
|
90
|
+
// 如果是小程序 需要 44+statusBar高度
|
|
91
|
+
// #ifdef MP
|
|
92
|
+
top = 44 + (uni.getWindowInfo().statusBarHeight || 0)
|
|
93
|
+
// #endif
|
|
89
94
|
return top + props.offsetTop
|
|
90
95
|
})
|
|
91
96
|
|
|
@@ -125,7 +130,7 @@ function observerContentScroll() {
|
|
|
125
130
|
clearObserver()
|
|
126
131
|
createObserver()
|
|
127
132
|
.relativeToViewport({
|
|
128
|
-
top: -offset
|
|
133
|
+
top: -offset,
|
|
129
134
|
})
|
|
130
135
|
.observe(`#${styckyId.value}`, (result) => {
|
|
131
136
|
handleRelativeTo(result)
|
|
@@ -159,11 +164,13 @@ function handleRelativeTo({ boundingClientRect }: any) {
|
|
|
159
164
|
stickyState.boxLeaved = false
|
|
160
165
|
stickyState.position = 'fixed'
|
|
161
166
|
stickyState.top = innerOffsetTop.value
|
|
167
|
+
emits('sticky', true)
|
|
162
168
|
} else {
|
|
163
169
|
stickyState.state = 'normal'
|
|
164
170
|
stickyState.boxLeaved = false
|
|
165
171
|
stickyState.position = 'absolute'
|
|
166
172
|
stickyState.top = 0
|
|
173
|
+
emits('sticky', false)
|
|
167
174
|
}
|
|
168
175
|
}
|
|
169
176
|
|
|
@@ -182,7 +189,7 @@ function setPosition(boxLeaved: boolean, position: string, top: number) {
|
|
|
182
189
|
defineExpose({
|
|
183
190
|
setPosition,
|
|
184
191
|
stickyState,
|
|
185
|
-
offsetTop: props.offsetTop
|
|
192
|
+
offsetTop: props.offsetTop,
|
|
186
193
|
})
|
|
187
194
|
</script>
|
|
188
195
|
<style lang="scss" scoped>
|
package/package.json
CHANGED
|
@@ -35,7 +35,9 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
35
35
|
{},
|
|
36
36
|
import('vue').ComponentOptionsMixin,
|
|
37
37
|
import('vue').ComponentOptionsMixin,
|
|
38
|
-
{
|
|
38
|
+
{
|
|
39
|
+
sticky: (...args: any[]) => void
|
|
40
|
+
},
|
|
39
41
|
string,
|
|
40
42
|
import('vue').PublicProps,
|
|
41
43
|
Readonly<
|
|
@@ -57,7 +59,9 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
57
59
|
default: string
|
|
58
60
|
}
|
|
59
61
|
}>
|
|
60
|
-
|
|
62
|
+
> & {
|
|
63
|
+
onSticky?: ((...args: any[]) => any) | undefined
|
|
64
|
+
},
|
|
61
65
|
{
|
|
62
66
|
customStyle: string
|
|
63
67
|
customClass: string
|