@ecolovo/uniapp-components 2.0.6 → 2.0.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.
@@ -181,20 +181,20 @@ const buttonSize = computed(() => {
181
181
  return props.large
182
182
  ? $style['Button--text-large']
183
183
  : props.small
184
- ? $style['Button--text-small']
185
- : '';
184
+ ? $style['Button--text-small']
185
+ : '';
186
186
  }
187
187
  return props.large
188
188
  ? $style['Button--block-large']
189
189
  : props.small
190
- ? $style['Button--block-small']
191
- : '';
190
+ ? $style['Button--block-small']
191
+ : '';
192
192
  });
193
193
  /** 按钮是否处于 loading 状态 */
194
194
  const isLoading = computed(() => props.loading || isAsyncLoading.value);
195
195
  /** 是否显示按钮 loading 状态 */
196
196
  const isShowLoading = computed(
197
- () => isLoading.value && (props.showLoading ?? props.text ? false : true)
197
+ () => isLoading.value && ((props.showLoading ?? props.text) ? false : true)
198
198
  );
199
199
  /** 按钮是否可被点击 */
200
200
  const isNotClickable = computed(
@@ -97,7 +97,7 @@ const isReadonly = computed<boolean>(() =>
97
97
  const isInCheckboxGroup = computed<boolean>(() => !!groupProps);
98
98
  /** 是否显示勾选图标 */
99
99
  const hasIcon = computed<boolean>(() =>
100
- props.icon !== undefined ? props.icon : groupProps?.icon ?? true
100
+ props.icon !== undefined ? props.icon : (groupProps?.icon ?? true)
101
101
  );
102
102
  /** 是否为单选 */
103
103
  const isRadio = computed<boolean>(() =>
@@ -7,7 +7,7 @@
7
7
  radio
8
8
  ? item.value === currentValue
9
9
  : Array.isArray(currentValue) &&
10
- currentValue.includes(item.value)
10
+ currentValue.includes(item.value)
11
11
  "
12
12
  :icon="icon"
13
13
  :checked-icon="
@@ -261,7 +261,9 @@ const onConfirm = () => {
261
261
  height: 72rpx;
262
262
  background: UTILS__GLOBAL_VAR(color, background);
263
263
  border-radius: 12rpx;
264
- transition: color 0.3s, background 0.3s;
264
+ transition:
265
+ color 0.3s,
266
+ background 0.3s;
265
267
  &.DatePicker--date-checked {
266
268
  background: UTILS__GLOBAL_VAR(theme, primary);
267
269
  color: #fff;
@@ -76,10 +76,10 @@ const showValue = computed(() => {
76
76
  return props.formatter
77
77
  ? props.formatter(props.modelValue)
78
78
  : props.multiple &&
79
- Array.isArray(props.modelValue) &&
80
- props.modelValue.length > 1
81
- ? `+${props.modelValue.length}`
82
- : props.modelValue;
79
+ Array.isArray(props.modelValue) &&
80
+ props.modelValue.length > 1
81
+ ? `+${props.modelValue.length}`
82
+ : props.modelValue;
83
83
  });
84
84
  </script>
85
85
 
@@ -86,7 +86,7 @@ const iconClass = computed(() =>
86
86
  ? [
87
87
  iconEntry.value.fontFamily,
88
88
  iconEntry.value.prefix + iconEntry.value.name,
89
- ]
89
+ ]
90
90
  : []
91
91
  );
92
92
  </script>
@@ -43,27 +43,37 @@ const classNames = useClassNames('loading-animation3');
43
43
  width: $main-size;
44
44
  aspect-ratio: 1;
45
45
  border-radius: 50%;
46
- box-shadow: $left-x $translate-y 0 $size-s, 0 $translate-y 0 $size-s,
46
+ box-shadow:
47
+ $left-x $translate-y 0 $size-s,
48
+ 0 $translate-y 0 $size-s,
47
49
  $right-x $translate-y 0 $size-s;
48
50
  translate: 0 (-1 * $translate-y);
49
51
  animation: LoadingAnimation3--loading-dots 1.5s infinite linear;
50
52
 
51
53
  @keyframes LoadingAnimation3--loading-dots {
52
54
  15% {
53
- box-shadow: $left-x $translate-y 0 $size-l,
54
- 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
55
+ box-shadow:
56
+ $left-x $translate-y 0 $size-l,
57
+ 0 $translate-y 0 $size-s,
58
+ $right-x $translate-y 0 $size-s;
55
59
  }
56
60
  30% {
57
- box-shadow: $left-x $translate-y 0 $size-s,
58
- 0 $translate-y 0 $size-l, $right-x $translate-y 0 $size-s;
61
+ box-shadow:
62
+ $left-x $translate-y 0 $size-s,
63
+ 0 $translate-y 0 $size-l,
64
+ $right-x $translate-y 0 $size-s;
59
65
  }
60
66
  45% {
61
- box-shadow: $left-x $translate-y 0 $size-s,
62
- 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-l;
67
+ box-shadow:
68
+ $left-x $translate-y 0 $size-s,
69
+ 0 $translate-y 0 $size-s,
70
+ $right-x $translate-y 0 $size-l;
63
71
  }
64
72
  60% {
65
- box-shadow: $left-x $translate-y 0 $size-s,
66
- 0 $translate-y 0 $size-s, $right-x $translate-y 0 $size-s;
73
+ box-shadow:
74
+ $left-x $translate-y 0 $size-s,
75
+ 0 $translate-y 0 $size-s,
76
+ $right-x $translate-y 0 $size-s;
67
77
  }
68
78
  }
69
79
 
@@ -30,7 +30,8 @@ const classNames = useClassNames('loading-animation4');
30
30
  aspect-ratio: 1;
31
31
  border-radius: 50%;
32
32
  border: 0.1em solid currentcolor;
33
- animation: spinner-1 0.8s infinite linear alternate,
33
+ animation:
34
+ spinner-1 0.8s infinite linear alternate,
34
35
  spinner-2 1.6s infinite linear;
35
36
 
36
37
  @keyframes spinner-1 {
@@ -295,8 +295,8 @@ const handleInput = (e: InputEvent) => {
295
295
  const integerVal = integer
296
296
  ? Number(integer) || '0'
297
297
  : decimal
298
- ? '0'
299
- : '';
298
+ ? '0'
299
+ : '';
300
300
  value = signVal + integerVal + decimal;
301
301
 
302
302
  _lastEditValue = value;
@@ -261,7 +261,8 @@ defineExpose({
261
261
  @extend %external-vars;
262
262
 
263
263
  --header-placeholder-height: calc(
264
- var(--page-header-bottom) + #{UTILS__VAR(page-header, extra-height, 0px)}
264
+ var(--page-header-bottom) +
265
+ #{UTILS__VAR(page-header, extra-height, 0px)}
265
266
  );
266
267
  --footer-placeholder-height: calc(
267
268
  var(--safe-area-bottom) + #{UTILS__VAR(page-footer, height, 100rpx)}
@@ -311,7 +312,8 @@ defineExpose({
311
312
  flex-direction: column;
312
313
  .PageBody--scroll-body & {
313
314
  padding-bottom: calc(
314
- #{UTILS__LOCAL_VAR(padding-bottom, UTILS__LOCAL_VAR(padding))} + var(--bottom-safe-height)
315
+ #{UTILS__LOCAL_VAR(padding-bottom, UTILS__LOCAL_VAR(padding))} +
316
+ var(--bottom-safe-height)
315
317
  );
316
318
  }
317
319
  }
@@ -197,7 +197,7 @@ const filteredList = computed(() => {
197
197
  return text
198
198
  ? optionList.value.filter((item) =>
199
199
  (item.option[props.labelKey] as string).includes(text)
200
- )
200
+ )
201
201
  : optionList.value;
202
202
  });
203
203
 
@@ -136,9 +136,8 @@ onMounted(() => {
136
136
  min-height: UTILS__LOCAL_VAR(min-height);
137
137
  max-height: UTILS__LOCAL_VAR(max-height);
138
138
  transform: translate(0, -100%) scale(1);
139
- --content-radius: 0 0 #{UTILS__LOCAL_VAR(radius)} #{UTILS__LOCAL_VAR(
140
- radius
141
- )};
139
+ --content-radius: 0 0 #{UTILS__LOCAL_VAR(radius)}
140
+ #{UTILS__LOCAL_VAR(radius)};
142
141
  --scroll-max-height: #{UTILS__LOCAL_VAR(max-height)};
143
142
  }
144
143
  &.PopoverContent--at-bottom {
@@ -148,9 +147,8 @@ onMounted(() => {
148
147
  min-height: UTILS__LOCAL_VAR(min-height);
149
148
  max-height: UTILS__LOCAL_VAR(max-height);
150
149
  transform: translate(0, 100%) scale(1);
151
- --content-radius: #{UTILS__LOCAL_VAR(radius)} #{UTILS__LOCAL_VAR(
152
- radius
153
- )} 0 0;
150
+ --content-radius: #{UTILS__LOCAL_VAR(radius)}
151
+ #{UTILS__LOCAL_VAR(radius)} 0 0;
154
152
  --scroll-max-height: #{UTILS__LOCAL_VAR(max-height)};
155
153
  }
156
154
  &.PopoverContent--at-left {
@@ -159,9 +157,8 @@ onMounted(() => {
159
157
  width: UTILS__LOCAL_VAR(width);
160
158
  height: 100%;
161
159
  transform: translate(-100%, 0) scale(1);
162
- --content-radius: 0 #{UTILS__LOCAL_VAR(radius)} #{UTILS__LOCAL_VAR(
163
- radius
164
- )} 0;
160
+ --content-radius: 0 #{UTILS__LOCAL_VAR(radius)}
161
+ #{UTILS__LOCAL_VAR(radius)} 0;
165
162
  --scroll-max-height: 100vh;
166
163
  }
167
164
  &.PopoverContent--at-right {
@@ -170,9 +167,8 @@ onMounted(() => {
170
167
  width: UTILS__LOCAL_VAR(width);
171
168
  height: 100%;
172
169
  transform: translate(100%, 0) scale(1);
173
- --content-radius: #{UTILS__LOCAL_VAR(radius)} 0 0 #{UTILS__LOCAL_VAR(
174
- radius
175
- )};
170
+ --content-radius: #{UTILS__LOCAL_VAR(radius)} 0 0
171
+ #{UTILS__LOCAL_VAR(radius)};
176
172
  --scroll-max-height: 100vh;
177
173
  }
178
174
  &.PopoverContent--at-center {
@@ -203,7 +199,9 @@ onMounted(() => {
203
199
 
204
200
  // 内容部分显示动画
205
201
  &.PopoverContent--content-initialized {
206
- transition: transform 0.3s, opacity 0.3s;
202
+ transition:
203
+ transform 0.3s,
204
+ opacity 0.3s;
207
205
 
208
206
  :global(.PopoverMask--visible) & {
209
207
  opacity: 1;
@@ -267,7 +265,8 @@ onMounted(() => {
267
265
  );
268
266
  min-height: max(
269
267
  calc(
270
- #{UTILS__LOCAL_VAR(min-height)} - #{$header-padding} - #{$footer-padding}
268
+ #{UTILS__LOCAL_VAR(min-height)} - #{$header-padding} -
269
+ #{$footer-padding}
271
270
  ),
272
271
  0px
273
272
  );
@@ -179,7 +179,8 @@ const $_toggle = () => {
179
179
  (
180
180
  UTILS__LOCAL_VAR(height) +
181
181
  UTILS__LOCAL_VAR(indicator-size)
182
- ) / 2
182
+ ) /
183
+ 2
183
184
  );
184
185
  }
185
186
  }
@@ -270,7 +270,9 @@ const onChangeTab = (index: number) => {
270
270
  left: var(--indicator-center, 0);
271
271
  width: UTILS__LOCAL_VAR(indicator-width, var(--tab-text-width, 0));
272
272
  &.Tab--indicator-animation {
273
- transition: left 0.3s, width 0.3s;
273
+ transition:
274
+ left 0.3s,
275
+ width 0.3s;
274
276
  }
275
277
  }
276
278
  </style>
@@ -48,7 +48,7 @@ const useUpload = <
48
48
  event: 'update:modelValue',
49
49
  value: UniApp.UploadMediaFile[]
50
50
  ) => void) &
51
- ((event: 'change', value: UniApp.UploadMediaFile[]) => void)
51
+ ((event: 'change', value: UniApp.UploadMediaFile[]) => void),
52
52
  >(
53
53
  props: CommonProps,
54
54
  emit: Emit
@@ -172,11 +172,11 @@ const useUpload = <
172
172
  url: res.url,
173
173
  type: file.type,
174
174
  uploadStatus: 'success' as const,
175
- }
175
+ }
176
176
  : {
177
177
  ...file,
178
178
  uploadStatus: 'error' as const,
179
- }
179
+ }
180
180
  );
181
181
  currentValue.value = tempCurrentValue;
182
182
  return currentValue.value[index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecolovo/uniapp-components",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Ecolovo UniApp Vue3 组件库",
5
5
  "keywords": [
6
6
  "components",
@@ -35,7 +35,6 @@
35
35
  "globals": "^17.4.0",
36
36
  "jiti": "^2.7.0",
37
37
  "miniprogram-api-typings": "^5.2.1",
38
- "prettier": "^2.8.8",
39
38
  "sass-embedded": "^1.100.0",
40
39
  "typescript": "^5.9.3",
41
40
  "vite": "^8.1.3",
package/utils/upload.ts CHANGED
@@ -7,6 +7,6 @@ export const toUploadMediaFile = (
7
7
  : {
8
8
  ...file,
9
9
  uploadStatus: file.uploadStatus || 'success',
10
- }
10
+ }
11
11
  );
12
12
  };