@tplc/wot 0.1.6 → 0.1.8
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 +4 -0
- package/components/composables/useTranslate.ts +1 -0
- package/components/wd-swiper/types.ts +10 -2
- package/components/wd-swiper/wd-swiper.vue +32 -10
- package/index.ts +1 -0
- package/package.json +1 -1
- package/types/components/wd-swiper/types.d.ts +6 -2
- package/types/components/wd-swiper/wd-swiper.vue.d.ts +15 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,4 +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
|
+
### [0.1.8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.22...v0.1.8) (2024-09-24)
|
|
6
|
+
|
|
7
|
+
### [0.1.7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.20...v0.1.7) (2024-09-22)
|
|
8
|
+
|
|
5
9
|
## [0.1.0](http://gitlab888.30jia.com.cn/frontend-material/zero-code-pro/compare/v1.1.0...v0.1.0) (2024-08-25)
|
|
@@ -182,8 +182,14 @@ export const swiperProps = {
|
|
|
182
182
|
*/
|
|
183
183
|
customPrevImageClass: makeStringProp(''),
|
|
184
184
|
|
|
185
|
-
customPrevImageHeight:
|
|
186
|
-
|
|
185
|
+
customPrevImageHeight: {
|
|
186
|
+
type: [Number, String] as PropType<number | string>,
|
|
187
|
+
default: undefined,
|
|
188
|
+
},
|
|
189
|
+
customNextImageHeight: {
|
|
190
|
+
type: [Number, String] as PropType<number | string>,
|
|
191
|
+
default: undefined,
|
|
192
|
+
},
|
|
187
193
|
|
|
188
194
|
customPrevImageStyle: {
|
|
189
195
|
type: Object as PropType<CSSProperties>,
|
|
@@ -207,6 +213,8 @@ export const swiperProps = {
|
|
|
207
213
|
imageRadius: makeStringProp(''),
|
|
208
214
|
|
|
209
215
|
radius: makeStringProp(''),
|
|
216
|
+
|
|
217
|
+
action: makeBooleanProp(false),
|
|
210
218
|
}
|
|
211
219
|
|
|
212
220
|
export type SwiperProps = ExtractPropTypes<typeof swiperProps>
|
|
@@ -24,16 +24,37 @@
|
|
|
24
24
|
:style="{ paddingRight: itemPadding }"
|
|
25
25
|
@click="handleClick(index, item)"
|
|
26
26
|
>
|
|
27
|
-
<
|
|
28
|
-
:src="isObj(item) ? item[valueKey] : item"
|
|
27
|
+
<view
|
|
29
28
|
:class="`wd-swiper__image ${customImageClass} ${getCustomImageClass(navCurrent, index, list)}`"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
>
|
|
30
|
+
<lcb-action-view
|
|
31
|
+
v-if="action && typeof item === 'object'"
|
|
32
|
+
v-bind="item"
|
|
33
|
+
customClass="w-full h-full"
|
|
34
|
+
>
|
|
35
|
+
<image
|
|
36
|
+
:src="isObj(item) ? item[valueKey] : item"
|
|
37
|
+
class="h-full w-full"
|
|
38
|
+
:style="{
|
|
39
|
+
height: getCustomImageHeight(navCurrent, index, list),
|
|
40
|
+
borderRadius: imageRadius,
|
|
41
|
+
width: imgWidth ? addUnit(imgWidth) : undefined,
|
|
42
|
+
}"
|
|
43
|
+
:mode="imageMode"
|
|
44
|
+
/>
|
|
45
|
+
</lcb-action-view>
|
|
46
|
+
<image
|
|
47
|
+
v-else
|
|
48
|
+
:src="isObj(item) ? item[valueKey] : item"
|
|
49
|
+
class="h-full w-full"
|
|
50
|
+
:style="{
|
|
51
|
+
height: getCustomImageHeight(navCurrent, index, list),
|
|
52
|
+
borderRadius: imageRadius,
|
|
53
|
+
width: imgWidth ? addUnit(imgWidth) : undefined,
|
|
54
|
+
}"
|
|
55
|
+
:mode="imageMode"
|
|
56
|
+
/>
|
|
57
|
+
</view>
|
|
37
58
|
</swiper-item>
|
|
38
59
|
</swiper>
|
|
39
60
|
|
|
@@ -56,7 +77,7 @@
|
|
|
56
77
|
</template>
|
|
57
78
|
|
|
58
79
|
<script lang="ts" setup>
|
|
59
|
-
import { computed, watch, ref } from 'vue'
|
|
80
|
+
import { computed, watch, ref, useSlots } from 'vue'
|
|
60
81
|
import { addUnit, isObj } from '../common/util'
|
|
61
82
|
import { swiperProps, type SwiperList } from './types'
|
|
62
83
|
import type { SwiperNavProps } from '../wd-swiper-nav/types'
|
|
@@ -64,6 +85,7 @@ import type { SwiperNavProps } from '../wd-swiper-nav/types'
|
|
|
64
85
|
const props = defineProps(swiperProps)
|
|
65
86
|
const emit = defineEmits(['click', 'change', 'animationfinish', 'update:current'])
|
|
66
87
|
const navCurrent = ref<number>(0) // 当前滑块
|
|
88
|
+
const slots = useSlots()
|
|
67
89
|
|
|
68
90
|
watch(
|
|
69
91
|
() => props.current,
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -207,11 +207,11 @@ export declare const swiperProps: {
|
|
|
207
207
|
default: string
|
|
208
208
|
}
|
|
209
209
|
customPrevImageHeight: {
|
|
210
|
-
type:
|
|
210
|
+
type: PropType<number | string>
|
|
211
211
|
default: undefined
|
|
212
212
|
}
|
|
213
213
|
customNextImageHeight: {
|
|
214
|
-
type:
|
|
214
|
+
type: PropType<number | string>
|
|
215
215
|
default: undefined
|
|
216
216
|
}
|
|
217
217
|
customPrevImageStyle: {
|
|
@@ -246,6 +246,10 @@ export declare const swiperProps: {
|
|
|
246
246
|
type: PropType<string>
|
|
247
247
|
default: string
|
|
248
248
|
}
|
|
249
|
+
action: {
|
|
250
|
+
type: BooleanConstructor
|
|
251
|
+
default: boolean
|
|
252
|
+
}
|
|
249
253
|
customStyle: {
|
|
250
254
|
type: PropType<string>
|
|
251
255
|
default: string
|
|
@@ -90,11 +90,11 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
90
90
|
default: string
|
|
91
91
|
}
|
|
92
92
|
customPrevImageHeight: {
|
|
93
|
-
type:
|
|
93
|
+
type: import('vue').PropType<number | string>
|
|
94
94
|
default: undefined
|
|
95
95
|
}
|
|
96
96
|
customNextImageHeight: {
|
|
97
|
-
type:
|
|
97
|
+
type: import('vue').PropType<number | string>
|
|
98
98
|
default: undefined
|
|
99
99
|
}
|
|
100
100
|
customPrevImageStyle: {
|
|
@@ -123,6 +123,10 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
123
123
|
type: import('vue').PropType<string>
|
|
124
124
|
default: string
|
|
125
125
|
}
|
|
126
|
+
action: {
|
|
127
|
+
type: BooleanConstructor
|
|
128
|
+
default: boolean
|
|
129
|
+
}
|
|
126
130
|
customStyle: {
|
|
127
131
|
type: import('vue').PropType<string>
|
|
128
132
|
default: string
|
|
@@ -233,11 +237,11 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
233
237
|
default: string
|
|
234
238
|
}
|
|
235
239
|
customPrevImageHeight: {
|
|
236
|
-
type:
|
|
240
|
+
type: import('vue').PropType<number | string>
|
|
237
241
|
default: undefined
|
|
238
242
|
}
|
|
239
243
|
customNextImageHeight: {
|
|
240
|
-
type:
|
|
244
|
+
type: import('vue').PropType<number | string>
|
|
241
245
|
default: undefined
|
|
242
246
|
}
|
|
243
247
|
customPrevImageStyle: {
|
|
@@ -266,6 +270,10 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
266
270
|
type: import('vue').PropType<string>
|
|
267
271
|
default: string
|
|
268
272
|
}
|
|
273
|
+
action: {
|
|
274
|
+
type: BooleanConstructor
|
|
275
|
+
default: boolean
|
|
276
|
+
}
|
|
269
277
|
customStyle: {
|
|
270
278
|
type: import('vue').PropType<string>
|
|
271
279
|
default: string
|
|
@@ -285,6 +293,7 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
285
293
|
duration: number
|
|
286
294
|
customStyle: string
|
|
287
295
|
customClass: string
|
|
296
|
+
action: boolean
|
|
288
297
|
current: number
|
|
289
298
|
height: string | number
|
|
290
299
|
valueKey: string
|
|
@@ -306,8 +315,8 @@ declare const __VLS_component: import('vue').DefineComponent<
|
|
|
306
315
|
customIndicatorClass: string
|
|
307
316
|
customImageClass: string
|
|
308
317
|
customPrevImageClass: string
|
|
309
|
-
customPrevImageHeight: number
|
|
310
|
-
customNextImageHeight: number
|
|
318
|
+
customPrevImageHeight: string | number
|
|
319
|
+
customNextImageHeight: string | number
|
|
311
320
|
customImageStyle: import('vue').CSSProperties
|
|
312
321
|
customNextImageClass: string
|
|
313
322
|
itemPadding: string
|