@tplc/wot 0.1.7 → 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 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
+ ### [0.1.8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.22...v0.1.8) (2024-09-24)
6
+
5
7
  ### [0.1.7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.20...v0.1.7) (2024-09-22)
6
8
 
7
9
  ## [0.1.0](http://gitlab888.30jia.com.cn/frontend-material/zero-code-pro/compare/v1.1.0...v0.1.0) (2024-08-25)
@@ -8,6 +8,7 @@
8
8
  * 记得注释
9
9
  */
10
10
  import { camelCase, getPropByPath, isFunction } from '../common/util'
11
+ // eslint-disable-next-line import/no-named-as-default
11
12
  import Locale from '../../locale'
12
13
 
13
14
  export const useTranslate = (name?: string) => {
@@ -213,6 +213,8 @@ export const swiperProps = {
213
213
  imageRadius: makeStringProp(''),
214
214
 
215
215
  radius: makeStringProp(''),
216
+
217
+ action: makeBooleanProp(false),
216
218
  }
217
219
 
218
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
- <image
28
- :src="isObj(item) ? item[valueKey] : item"
27
+ <view
29
28
  :class="`wd-swiper__image ${customImageClass} ${getCustomImageClass(navCurrent, index, list)}`"
30
- :style="{
31
- height: getCustomImageHeight(navCurrent, index, list),
32
- borderRadius: imageRadius,
33
- width: imgWidth ? addUnit(imgWidth) : undefined,
34
- }"
35
- :mode="imageMode"
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
@@ -10,6 +10,7 @@
10
10
 
11
11
  // Toast
12
12
  export { useToast } from './components/wd-toast'
13
+ export { useTranslate } from './components/composables/useTranslate'
13
14
  // Messageb
14
15
  export { useMessage } from './components/wd-message-box'
15
16
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -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
@@ -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
@@ -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