@tplc/wot 0.1.46 → 0.1.48
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,10 @@
|
|
|
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.1.48](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.43...v0.1.48) (2024-12-30)
|
|
6
|
+
|
|
7
|
+
### [0.1.47](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.37...v0.1.47) (2024-12-26)
|
|
8
|
+
|
|
5
9
|
### [0.1.46](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.36...v0.1.46) (2024-12-26)
|
|
6
10
|
|
|
7
11
|
|
|
@@ -220,7 +220,7 @@ const formatRange = (value: number, rangeType: 'start' | 'end', type: CalendarTy
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
const props = defineProps(calendarProps)
|
|
223
|
-
const emit = defineEmits(['cancel', 'change', 'update:modelValue', 'confirm'])
|
|
223
|
+
const emit = defineEmits(['cancel', 'change', 'update:modelValue', 'confirm', 'open'])
|
|
224
224
|
|
|
225
225
|
const pickerShow = ref<boolean>(false)
|
|
226
226
|
const calendarValue = ref<null | number | number[]>(null)
|
|
@@ -363,6 +363,7 @@ function open() {
|
|
|
363
363
|
calendarTabs.value.updateLineStyle(false)
|
|
364
364
|
}
|
|
365
365
|
}, 250)
|
|
366
|
+
emit('open')
|
|
366
367
|
}
|
|
367
368
|
// 对外暴露方法
|
|
368
369
|
function close() {
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="rootClass" @click="handleClick" :style="rootStyle">
|
|
3
|
+
<image
|
|
4
|
+
v-if="status !== 'success'"
|
|
5
|
+
:class="`wd-img__image coverImg ${customImage}`"
|
|
6
|
+
:src="wrapPhoto({ photo: src, width: lazyPlaceWidth })"
|
|
7
|
+
:mode="mode"
|
|
8
|
+
:lazy-load="lazyLoad"
|
|
9
|
+
/>
|
|
3
10
|
<image
|
|
4
11
|
:class="`wd-img__image coverImg ${customImage}`"
|
|
5
12
|
:src="wrapPhoto({ photo: src, width, type: 2 })"
|
|
6
13
|
:mode="mode"
|
|
7
|
-
:style="
|
|
8
|
-
status != 'success' && {
|
|
9
|
-
...wrapPhoto({ photo: src, width: lazyPlaceWidth }),
|
|
10
|
-
}
|
|
11
|
-
"
|
|
12
14
|
:lazy-load="lazyLoad"
|
|
13
15
|
@load="handleLoad"
|
|
14
16
|
@error="handleError"
|
|
17
|
+
:style="{
|
|
18
|
+
display: status === 'success' ? 'block' : 'none',
|
|
19
|
+
}"
|
|
15
20
|
/>
|
|
16
21
|
<slot v-if="status === 'loading'" name="loading"></slot>
|
|
17
22
|
<slot v-if="status === 'error'" name="error"></slot>
|
|
@@ -75,18 +80,14 @@ function handleLoad(event: Event) {
|
|
|
75
80
|
emit('load', event)
|
|
76
81
|
}
|
|
77
82
|
|
|
78
|
-
function wrapPhoto({ photo, width = 200,
|
|
83
|
+
function wrapPhoto({ photo, width = 200, type = 1 }: any) {
|
|
79
84
|
const isctyun = photo?.indexOf('.ctyun') >= 0
|
|
80
85
|
const sym = photo?.indexOf('?') > 0 ? '&' : '?'
|
|
81
86
|
const suffix = isctyun
|
|
82
87
|
? `${sym}x-amz-process=image/resize,w_${width},m_lfit`
|
|
83
88
|
: `${sym}x-oss-process=image/resize,m_mfit,w_${width}&imageView2/2/w/${width}`
|
|
84
89
|
const url = `${photo}${width > 0 ? suffix : ''}`
|
|
85
|
-
return
|
|
86
|
-
? url
|
|
87
|
-
: photo
|
|
88
|
-
? { backgroundImage: `url('${url}')`, ...otherParams }
|
|
89
|
-
: otherParams
|
|
90
|
+
return url
|
|
90
91
|
}
|
|
91
92
|
</script>
|
|
92
93
|
|
|
@@ -96,5 +97,7 @@ function wrapPhoto({ photo, width = 200, otherParams = {}, type = 1 }: any) {
|
|
|
96
97
|
.coverImg {
|
|
97
98
|
background-repeat: no-repeat;
|
|
98
99
|
background-size: cover;
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 100%;
|
|
99
102
|
}
|
|
100
103
|
</style>
|
package/global.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ declare module 'vue' {
|
|
|
29
29
|
'wd-img-cropper': (typeof import('./types/components/wd-img-cropper/wd-img-cropper.vue'))['default']
|
|
30
30
|
'wd-input': (typeof import('./types/components/wd-input/wd-input.vue'))['default']
|
|
31
31
|
'wd-input-number': (typeof import('./types/components/wd-input-number/wd-input-number.vue'))['default']
|
|
32
|
-
'wd-loading': (typeof import('./types/components/wd-
|
|
33
|
-
'wd-loadmore': (typeof import('./types/components/wd-
|
|
32
|
+
'wd-loading': (typeof import('./types/components/wd-loading/wd-loading.vue'))['default']
|
|
33
|
+
'wd-loadmore': (typeof import('./types/components/wd-loadmore/wd-loadmore.vue'))['default']
|
|
34
34
|
'wd-message-box': (typeof import('./types/components/wd-message-box/wd-message-box.vue'))['default']
|
|
35
35
|
'wd-overlay': (typeof import('./types/components/wd-overlay/wd-overlay.vue'))['default']
|
|
36
36
|
'wd-notice-bar': (typeof import('./types/components/wd-notice-bar/wd-notice-bar.vue'))['default']
|
package/package.json
CHANGED
|
@@ -149,6 +149,7 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
149
149
|
import('vue').ComponentOptionsMixin,
|
|
150
150
|
{
|
|
151
151
|
cancel: (...args: any[]) => void
|
|
152
|
+
open: (...args: any[]) => void
|
|
152
153
|
'update:modelValue': (...args: any[]) => void
|
|
153
154
|
change: (...args: any[]) => void
|
|
154
155
|
confirm: (...args: any[]) => void
|
|
@@ -294,6 +295,7 @@ declare const _default: __VLS_WithTemplateSlots<
|
|
|
294
295
|
}>
|
|
295
296
|
> & {
|
|
296
297
|
onCancel?: ((...args: any[]) => any) | undefined
|
|
298
|
+
onOpen?: ((...args: any[]) => any) | undefined
|
|
297
299
|
'onUpdate:modelValue'?: ((...args: any[]) => any) | undefined
|
|
298
300
|
onChange?: ((...args: any[]) => any) | undefined
|
|
299
301
|
onConfirm?: ((...args: any[]) => any) | undefined
|