@varlet/ui 1.23.12-alpha.31 → 1.24.0

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
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.24.0](https://github.com/haoziqaq/varlet/compare/v1.23.11...v1.24.0) (2021-12-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **card:** add word-break for description ([38d7427](https://github.com/haoziqaq/varlet/commit/38d74270eed5bc71b4f821f5433604b7a62eecbc))
12
+ * **d.ts:** fix pack declare lost after build ([d7df27e](https://github.com/haoziqaq/varlet/commit/d7df27e439a2b28fa4a9cfb867129611f2a268b3))
13
+ * **loading:** add transition for overlay ([2a62eaa](https://github.com/haoziqaq/varlet/commit/2a62eaa8eed6a5ff77222b48932b39655744ffae))
14
+ * **loading:** expose marigin css variable ([313d232](https://github.com/haoziqaq/varlet/commit/313d232b363981ce94c11e419ace904bfc2b246d))
15
+ * **placeholder:** text-overflow to ellipsis ([7c586d2](https://github.com/haoziqaq/varlet/commit/7c586d2f7e751a12993d06e46d460ac25de24b22))
16
+ * **select:** fix select's placeholder when too long ([a7e08a6](https://github.com/haoziqaq/varlet/commit/a7e08a60e7d2d8f49f0863fcda6814bc1fdd4fdc))
17
+ * **types:** fix prompts that could not find a declaration file when import translation file ([2637884](https://github.com/haoziqaq/varlet/commit/26378841f2fbafeda8bcd6fffd5eccfd50e9e559))
18
+ * **types:** fix prompts that could not find a declaration file when import translation file ([e17c6d2](https://github.com/haoziqaq/varlet/commit/e17c6d2c430f1b4601875e98ca92d075a1de5813))
19
+ * **ui/input, select:** fix placeholder animation and var--ellipsis class ([458ab30](https://github.com/haoziqaq/varlet/commit/458ab307652328ace71dc0523323422f7ebdbaac))
20
+ * **ui/swipe:** do not use initialIndex when resize ([46e997e](https://github.com/haoziqaq/varlet/commit/46e997e8f014432149f409e40545592757ae4484))
21
+
22
+
23
+ ### Features
24
+
25
+ * **loading:** add slots and desc prop ([db0df16](https://github.com/haoziqaq/varlet/commit/db0df16af2cab2de059282e9a8c15c66077b1ae2))
26
+
27
+
28
+
29
+
30
+
6
31
  ## [1.23.11](https://github.com/haoziqaq/varlet/compare/v1.23.10...v1.23.11) (2021-12-10)
7
32
 
8
33
 
package/es/swipe/Swipe.js CHANGED
@@ -175,12 +175,7 @@ export default defineComponent({
175
175
  };
176
176
 
177
177
  var initialIndex = () => {
178
- lockDuration.value = true;
179
178
  index.value = boundaryIndex(toNumber(props.initialIndex));
180
- translate.value = index.value * -size.value;
181
- nextTickFrame(() => {
182
- lockDuration.value = false;
183
- });
184
179
  };
185
180
 
186
181
  var startAutoplay = () => {
@@ -288,10 +283,17 @@ export default defineComponent({
288
283
 
289
284
 
290
285
  var resize = () => {
286
+ lockDuration.value = true;
291
287
  size.value = props.vertical ? swipeEl.value.offsetHeight : swipeEl.value.offsetWidth;
292
288
  trackSize.value = size.value * length.value;
293
- initialIndex();
289
+ translate.value = index.value * -size.value;
290
+ swipeItems.forEach(swipeItem => {
291
+ swipeItem.setTranslate(0);
292
+ });
294
293
  startAutoplay();
294
+ setTimeout(() => {
295
+ lockDuration.value = false;
296
+ });
295
297
  }; // expose
296
298
 
297
299
 
@@ -365,7 +367,10 @@ export default defineComponent({
365
367
  vertical
366
368
  };
367
369
  bindSwipeItems(swipeProvider);
368
- watch(() => length.value, resize);
370
+ watch(() => length.value, () => {
371
+ initialIndex();
372
+ resize();
373
+ });
369
374
  onMounted(() => {
370
375
  window.addEventListener('resize', resize);
371
376
  });
@@ -1055,7 +1055,7 @@
1055
1055
  "type": "string | number",
1056
1056
  "description": "成功提示展示时长(ms) 默认值:2000"
1057
1057
  },
1058
- "var-pull-refresh/bgColor": {
1058
+ "var-pull-refresh/bg-color": {
1059
1059
  "type": "string",
1060
1060
  "description": "control的背景颜色 默认值:#005CAF"
1061
1061
  },
@@ -1063,11 +1063,11 @@
1063
1063
  "type": "string",
1064
1064
  "description": "control 的颜色 默认值:#ffffff"
1065
1065
  },
1066
- "var-pull-refresh/successBgColor": {
1066
+ "var-pull-refresh/success-bg-color": {
1067
1067
  "type": "string",
1068
1068
  "description": "成功状态下control的背景颜色 默认值:#4CAF50"
1069
1069
  },
1070
- "var-pull-refresh/successColor": {
1070
+ "var-pull-refresh/success-color": {
1071
1071
  "type": "string",
1072
1072
  "description": "成功状态下control的颜色 默认值:ffffff"
1073
1073
  },
@@ -406,10 +406,10 @@
406
406
  "disabled",
407
407
  "animation-duration",
408
408
  "success-duration",
409
- "bgColor",
409
+ "bg-color",
410
410
  "color",
411
- "successBgColor",
412
- "successColor"
411
+ "success-bg-color",
412
+ "success-color"
413
413
  ]
414
414
  },
415
415
  "var-radio": {
@@ -3188,7 +3188,7 @@
3188
3188
  }
3189
3189
  },
3190
3190
  {
3191
- "name": "bgColor",
3191
+ "name": "bg-color",
3192
3192
  "description": "control的背景颜色",
3193
3193
  "default": "#005CAF",
3194
3194
  "value": {
@@ -3206,7 +3206,7 @@
3206
3206
  }
3207
3207
  },
3208
3208
  {
3209
- "name": "successBgColor",
3209
+ "name": "success-bg-color",
3210
3210
  "description": "成功状态下control的背景颜色",
3211
3211
  "default": "#4CAF50",
3212
3212
  "value": {
@@ -3215,7 +3215,7 @@
3215
3215
  }
3216
3216
  },
3217
3217
  {
3218
- "name": "successColor",
3218
+ "name": "success-color",
3219
3219
  "description": "成功状态下control的颜色",
3220
3220
  "default": "ffffff",
3221
3221
  "value": {
@@ -1,8 +1,8 @@
1
1
  require('../../styles/common.css')
2
+ require('../SnackbarSfc.css')
2
3
  require('../../styles/elevation.css')
3
4
  require('../../loading/loading.css')
4
5
  require('../../button/button.css')
5
6
  require('../../icon/icon.css')
6
7
  require('../snackbar.css')
7
8
  require('../coreSfc.css')
8
- require('../SnackbarSfc.css')
@@ -1,8 +1,8 @@
1
1
  require('../../styles/common.less')
2
+ require('../SnackbarSfc.less')
2
3
  require('../../styles/elevation.less')
3
4
  require('../../loading/loading.less')
4
5
  require('../../button/button.less')
5
6
  require('../../icon/icon.less')
6
7
  require('../snackbar.less')
7
8
  require('../coreSfc.less')
8
- require('../SnackbarSfc.less')
@@ -187,12 +187,7 @@ var _default = (0, _vue.defineComponent)({
187
187
  };
188
188
 
189
189
  var initialIndex = () => {
190
- lockDuration.value = true;
191
190
  index.value = boundaryIndex((0, _shared.toNumber)(props.initialIndex));
192
- translate.value = index.value * -size.value;
193
- (0, _elements.nextTickFrame)(() => {
194
- lockDuration.value = false;
195
- });
196
191
  };
197
192
 
198
193
  var startAutoplay = () => {
@@ -300,10 +295,17 @@ var _default = (0, _vue.defineComponent)({
300
295
 
301
296
 
302
297
  var resize = () => {
298
+ lockDuration.value = true;
303
299
  size.value = props.vertical ? swipeEl.value.offsetHeight : swipeEl.value.offsetWidth;
304
300
  trackSize.value = size.value * length.value;
305
- initialIndex();
301
+ translate.value = index.value * -size.value;
302
+ swipeItems.forEach(swipeItem => {
303
+ swipeItem.setTranslate(0);
304
+ });
306
305
  startAutoplay();
306
+ setTimeout(() => {
307
+ lockDuration.value = false;
308
+ });
307
309
  }; // expose
308
310
 
309
311
 
@@ -377,7 +379,10 @@ var _default = (0, _vue.defineComponent)({
377
379
  vertical
378
380
  };
379
381
  bindSwipeItems(swipeProvider);
380
- (0, _vue.watch)(() => length.value, resize);
382
+ (0, _vue.watch)(() => length.value, () => {
383
+ initialIndex();
384
+ resize();
385
+ });
381
386
  (0, _vue.onMounted)(() => {
382
387
  window.addEventListener('resize', resize);
383
388
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "1.23.12-alpha.31+5b819182",
3
+ "version": "1.24.0",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -47,9 +47,9 @@
47
47
  "peerDependencies": {
48
48
  "vue": "^3.2.0"
49
49
  },
50
- "gitHead": "5b8191822305e5a485003223d3109a6554b33251",
50
+ "gitHead": "859769307c762134844c0ddfdb69452631f76d62",
51
51
  "devDependencies": {
52
- "@varlet/cli": "^1.23.12-alpha.31+5b819182"
52
+ "@varlet/cli": "^1.24.0"
53
53
  },
54
54
  "dependencies": {
55
55
  "dayjs": "^1.10.4",