@tplc/wot 0.1.5 → 0.1.7

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,4 +2,6 @@
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.7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.20...v0.1.7) (2024-09-22)
6
+
5
7
  ## [0.1.0](http://gitlab888.30jia.com.cn/frontend-material/zero-code-pro/compare/v1.1.0...v0.1.0) (2024-08-25)
@@ -44,7 +44,7 @@
44
44
  height: $-calendar-day-height;
45
45
  line-height: $-calendar-day-height;
46
46
  text-align: center;
47
-
47
+ margin-bottom: 6rpx;
48
48
  @include when(disabled) {
49
49
  .wd-month__day-text {
50
50
  color: $-calendar-disabled-color;
@@ -90,6 +90,9 @@
90
90
  background: $-calendar-active-color;
91
91
  border-radius: $-calendar-active-border;
92
92
  }
93
+ .wd-month__day-text-custom{
94
+ color:#fff
95
+ }
93
96
  }
94
97
 
95
98
  @include when(end) {
@@ -109,6 +112,9 @@
109
112
  background: $-calendar-active-color;
110
113
  border-radius: $-calendar-active-border;
111
114
  }
115
+ .wd-month__day-text-custom{
116
+ color:#fff
117
+ }
112
118
  }
113
119
 
114
120
  @include when(same) {
@@ -123,15 +129,22 @@
123
129
  @include e(day-container) {
124
130
  position: relative;
125
131
  z-index: 2;
132
+ height: 100%;
133
+ padding: 0 2px;
134
+
126
135
  }
127
136
 
128
137
  @include e(day-text) {
129
138
  font-weight: $-calendar-day-fw;
139
+ &-custom{
140
+ font-size: 14px;
141
+ color:$-calendar-active-color;
142
+ }
130
143
  }
131
144
 
132
145
  @include e(day-top) {
133
146
  position: absolute;
134
- top: 10px;
147
+ top: 6px;
135
148
  right: 0;
136
149
  left: 0;
137
150
  font-size: $-calendar-info-fs;
@@ -142,7 +155,7 @@
142
155
  @include e(day-bottom) {
143
156
  position: absolute;
144
157
  right: 0;
145
- bottom: 10px;
158
+ bottom: 6px;
146
159
  left: 0;
147
160
  font-size: $-calendar-info-fs;
148
161
  line-height: 1.1;
@@ -14,7 +14,10 @@
14
14
  >
15
15
  <view class="wd-month__day-container">
16
16
  <view class="wd-month__day-top">{{ item.topInfo }}</view>
17
- <view class="wd-month__day-text">
17
+ <view
18
+ class="wd-month__day-text"
19
+ :class="{ 'wd-month__day-text-custom': item.text !== item.day }"
20
+ >
18
21
  {{ item.text }}
19
22
  </view>
20
23
  <view class="wd-month__day-bottom">{{ item.bottomInfo }}</view>
@@ -372,6 +375,7 @@ function getFormatterDate(date: number, day: string | number, type?: CalendarDay
372
375
  topInfo: '',
373
376
  bottomInfo: '',
374
377
  type,
378
+ day,
375
379
  disabled: compareDate(date, props.minDate) === -1 || compareDate(date, props.maxDate) === 1,
376
380
  }
377
381
  if (props.formatter) {
@@ -105,6 +105,7 @@ export type CalendarDayItem = {
105
105
  bottomInfo?: string
106
106
  type?: CalendarDayType
107
107
  disabled?: boolean
108
+ day?: number | string
108
109
  }
109
110
 
110
111
  export type CalendarFormatter = (day: CalendarDayItem) => CalendarDayItem
@@ -92,6 +92,10 @@ export const sliderProps = {
92
92
  type: [Number, Array] as PropType<number | number[]>,
93
93
  default: 0,
94
94
  },
95
+
96
+ minText: makeStringProp(''),
97
+
98
+ maxText: makeStringProp(''),
95
99
  }
96
100
 
97
101
  export type SliderExpose = {
@@ -4,7 +4,7 @@
4
4
  <view :id="sliderId" style="flex: 1" :class="rootClass">
5
5
  <!-- #endif -->
6
6
  <view :class="`wd-slider__label-min ${customMinClass}`" v-if="!hideMinMax">
7
- {{ minValue }}
7
+ {{ minText || minValue }}
8
8
  </view>
9
9
  <view class="wd-slider__bar-wrapper" :style="barWrapperStyle">
10
10
  <view class="wd-slider__bar" :style="barCustomStyle"></view>
@@ -35,7 +35,7 @@
35
35
  </view>
36
36
  </view>
37
37
  <view :class="`wd-slider__label-max ${customMaxClass}`" v-if="!hideMinMax">
38
- {{ maxValue }}
38
+ {{ maxText || maxValue }}
39
39
  </view>
40
40
  <!-- #ifdef MP-DINGTALK -->
41
41
  </view>
@@ -1,9 +1,10 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, PropType, CSSProperties } from 'vue'
2
2
  import {
3
3
  baseProps,
4
4
  makeBooleanProp,
5
5
  makeNumberProp,
6
6
  makeNumericProp,
7
+ makeRequiredProp,
7
8
  makeStringProp,
8
9
  } from '../common/props'
9
10
  import type { SwiperNavProps } from '../wd-swiper-nav/types'
@@ -88,6 +89,8 @@ export const swiperProps = {
88
89
  * 默认值:'192'
89
90
  */
90
91
  height: makeNumericProp('192'),
92
+ /** 图片宽度 */
93
+ imgWidth: makeNumericProp(undefined),
91
94
 
92
95
  /**
93
96
  * 轮播间隔时间,单位为毫秒
@@ -179,8 +182,25 @@ export const swiperProps = {
179
182
  */
180
183
  customPrevImageClass: makeStringProp(''),
181
184
 
182
- customPrevImageHeight: makeNumberProp(undefined),
183
- customNextImageHeight: makeNumberProp(undefined),
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
+ },
193
+
194
+ customPrevImageStyle: {
195
+ type: Object as PropType<CSSProperties>,
196
+ },
197
+ customNextImageStyle: {
198
+ type: Object as PropType<CSSProperties>,
199
+ },
200
+ customImageStyle: {
201
+ type: Object as PropType<CSSProperties>,
202
+ default: () => ({}),
203
+ },
184
204
 
185
205
  /**
186
206
  * 自定义下一个图片类名
@@ -21,7 +21,7 @@
21
21
  v-for="(item, index) in list"
22
22
  :key="index"
23
23
  class="wd-swiper__item"
24
- :style="{ padding: itemPadding }"
24
+ :style="{ paddingRight: itemPadding }"
25
25
  @click="handleClick(index, item)"
26
26
  >
27
27
  <image
@@ -30,6 +30,7 @@
30
30
  :style="{
31
31
  height: getCustomImageHeight(navCurrent, index, list),
32
32
  borderRadius: imageRadius,
33
+ width: imgWidth ? addUnit(imgWidth) : undefined,
33
34
  }"
34
35
  :mode="imageMode"
35
36
  />
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -118,6 +118,7 @@ export type CalendarDayItem = {
118
118
  bottomInfo?: string
119
119
  type?: CalendarDayType
120
120
  disabled?: boolean
121
+ day?: number | string
121
122
  }
122
123
  export type CalendarFormatter = (day: CalendarDayItem) => CalendarDayItem
123
124
  export type CalendarTimeFilterOptionType = 'hour' | 'minute' | 'second'
@@ -99,6 +99,14 @@ export declare const sliderProps: {
99
99
  type: PropType<number | number[]>
100
100
  default: number
101
101
  }
102
+ minText: {
103
+ type: PropType<string>
104
+ default: string
105
+ }
106
+ maxText: {
107
+ type: PropType<string>
108
+ default: string
109
+ }
102
110
  customStyle: {
103
111
  type: PropType<string>
104
112
  default: string
@@ -44,6 +44,14 @@ declare const _default: import('vue').DefineComponent<
44
44
  type: import('vue').PropType<number | number[]>
45
45
  default: number
46
46
  }
47
+ minText: {
48
+ type: import('vue').PropType<string>
49
+ default: string
50
+ }
51
+ maxText: {
52
+ type: import('vue').PropType<string>
53
+ default: string
54
+ }
47
55
  customStyle: {
48
56
  type: import('vue').PropType<string>
49
57
  default: string
@@ -115,6 +123,14 @@ declare const _default: import('vue').DefineComponent<
115
123
  type: import('vue').PropType<number | number[]>
116
124
  default: number
117
125
  }
126
+ minText: {
127
+ type: import('vue').PropType<string>
128
+ default: string
129
+ }
130
+ maxText: {
131
+ type: import('vue').PropType<string>
132
+ default: string
133
+ }
118
134
  customStyle: {
119
135
  type: import('vue').PropType<string>
120
136
  default: string
@@ -144,6 +160,8 @@ declare const _default: import('vue').DefineComponent<
144
160
  hideMinMax: boolean
145
161
  hideLabel: boolean
146
162
  inactiveColor: string
163
+ minText: string
164
+ maxText: string
147
165
  },
148
166
  {}
149
167
  >
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, PropType } from 'vue'
1
+ import type { ExtractPropTypes, PropType, CSSProperties } from 'vue'
2
2
  import type { SwiperNavProps } from '../wd-swiper-nav/types'
3
3
  import type { ImageMode } from '../wd-img/types'
4
4
  /**
@@ -89,6 +89,11 @@ export declare const swiperProps: {
89
89
  type: (NumberConstructor | StringConstructor)[]
90
90
  default: string
91
91
  }
92
+ /** 图片宽度 */
93
+ imgWidth: {
94
+ type: (NumberConstructor | StringConstructor)[]
95
+ default: undefined
96
+ }
92
97
  /**
93
98
  * 轮播间隔时间,单位为毫秒
94
99
  * 类型:number
@@ -202,13 +207,23 @@ export declare const swiperProps: {
202
207
  default: string
203
208
  }
204
209
  customPrevImageHeight: {
205
- type: NumberConstructor
210
+ type: PropType<number | string>
206
211
  default: undefined
207
212
  }
208
213
  customNextImageHeight: {
209
- type: NumberConstructor
214
+ type: PropType<number | string>
210
215
  default: undefined
211
216
  }
217
+ customPrevImageStyle: {
218
+ type: PropType<CSSProperties>
219
+ }
220
+ customNextImageStyle: {
221
+ type: PropType<CSSProperties>
222
+ }
223
+ customImageStyle: {
224
+ type: PropType<CSSProperties>
225
+ default: () => {}
226
+ }
212
227
  /**
213
228
  * 自定义下一个图片类名
214
229
  * 类型:string
@@ -33,6 +33,10 @@ declare const __VLS_component: import('vue').DefineComponent<
33
33
  type: (NumberConstructor | StringConstructor)[]
34
34
  default: string
35
35
  }
36
+ imgWidth: {
37
+ type: (NumberConstructor | StringConstructor)[]
38
+ default: undefined
39
+ }
36
40
  interval: {
37
41
  type: NumberConstructor
38
42
  default: number
@@ -86,13 +90,23 @@ declare const __VLS_component: import('vue').DefineComponent<
86
90
  default: string
87
91
  }
88
92
  customPrevImageHeight: {
89
- type: NumberConstructor
93
+ type: import('vue').PropType<number | string>
90
94
  default: undefined
91
95
  }
92
96
  customNextImageHeight: {
93
- type: NumberConstructor
97
+ type: import('vue').PropType<number | string>
94
98
  default: undefined
95
99
  }
100
+ customPrevImageStyle: {
101
+ type: import('vue').PropType<import('vue').CSSProperties>
102
+ }
103
+ customNextImageStyle: {
104
+ type: import('vue').PropType<import('vue').CSSProperties>
105
+ }
106
+ customImageStyle: {
107
+ type: import('vue').PropType<import('vue').CSSProperties>
108
+ default: () => {}
109
+ }
96
110
  customNextImageClass: {
97
111
  type: import('vue').PropType<string>
98
112
  default: string
@@ -162,6 +176,10 @@ declare const __VLS_component: import('vue').DefineComponent<
162
176
  type: (NumberConstructor | StringConstructor)[]
163
177
  default: string
164
178
  }
179
+ imgWidth: {
180
+ type: (NumberConstructor | StringConstructor)[]
181
+ default: undefined
182
+ }
165
183
  interval: {
166
184
  type: NumberConstructor
167
185
  default: number
@@ -215,13 +233,23 @@ declare const __VLS_component: import('vue').DefineComponent<
215
233
  default: string
216
234
  }
217
235
  customPrevImageHeight: {
218
- type: NumberConstructor
236
+ type: import('vue').PropType<number | string>
219
237
  default: undefined
220
238
  }
221
239
  customNextImageHeight: {
222
- type: NumberConstructor
240
+ type: import('vue').PropType<number | string>
223
241
  default: undefined
224
242
  }
243
+ customPrevImageStyle: {
244
+ type: import('vue').PropType<import('vue').CSSProperties>
245
+ }
246
+ customNextImageStyle: {
247
+ type: import('vue').PropType<import('vue').CSSProperties>
248
+ }
249
+ customImageStyle: {
250
+ type: import('vue').PropType<import('vue').CSSProperties>
251
+ default: () => {}
252
+ }
225
253
  customNextImageClass: {
226
254
  type: import('vue').PropType<string>
227
255
  default: string
@@ -262,6 +290,7 @@ declare const __VLS_component: import('vue').DefineComponent<
262
290
  valueKey: string
263
291
  direction: import('./types').DirectionType
264
292
  radius: string
293
+ imgWidth: string | number
265
294
  imageMode: import('../wd-img/types').ImageMode
266
295
  indicatorPosition: import('./types').IndicatorPositionType
267
296
  autoplay: boolean
@@ -277,8 +306,9 @@ declare const __VLS_component: import('vue').DefineComponent<
277
306
  customIndicatorClass: string
278
307
  customImageClass: string
279
308
  customPrevImageClass: string
280
- customPrevImageHeight: number
281
- customNextImageHeight: number
309
+ customPrevImageHeight: string | number
310
+ customNextImageHeight: string | number
311
+ customImageStyle: import('vue').CSSProperties
282
312
  customNextImageClass: string
283
313
  itemPadding: string
284
314
  imageRadius: string