@nutui/nutui 4.0.0-beta.7 → 4.0.0-beta.9

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.
Files changed (33) hide show
  1. package/dist/nutui.es.js +125 -0
  2. package/dist/nutui.umd.cjs +7 -20046
  3. package/dist/packages/_es/Barrage.js +15 -27
  4. package/dist/packages/_es/Dialog.js +11 -16
  5. package/dist/packages/_es/ImagePreview.js +10 -13
  6. package/dist/packages/_es/Notify.js +6 -5
  7. package/dist/packages/_es/Swiper.js +56 -114
  8. package/dist/packages/_es/Switch.js +1 -1
  9. package/dist/packages/_es/Toast.js +6 -7
  10. package/dist/packages/barrage/index.scss +17 -1
  11. package/dist/packages/cell/index.scss +3 -1
  12. package/dist/packages/dialog/index.mjs +2 -1
  13. package/dist/packages/imagepreview/index.mjs +2 -1
  14. package/dist/packages/notify/index.mjs +2 -1
  15. package/dist/packages/pullrefresh/index.scss +3 -2
  16. package/dist/packages/toast/index.mjs +2 -1
  17. package/dist/smartips/attributes.json +25 -21
  18. package/dist/smartips/tags.json +9 -8
  19. package/dist/smartips/web-types.json +38 -29
  20. package/dist/style.css +1 -1
  21. package/dist/styles/themes/default.scss +53 -53
  22. package/dist/styles/themes/jdb.scss +53 -53
  23. package/dist/styles/themes/jddkh.scss +53 -53
  24. package/dist/styles/themes/jdt.scss +53 -53
  25. package/dist/types/__VUE/barrage/index.vue.d.ts +0 -1
  26. package/dist/types/__VUE/dialog/index.d.ts +9 -9
  27. package/dist/types/__VUE/imagepreview/index.d.ts +12 -12
  28. package/dist/types/__VUE/imagepreview/index.vue.d.ts +0 -9
  29. package/dist/types/__VUE/notify/index.d.ts +3 -3
  30. package/dist/types/__VUE/swiper/index.vue.d.ts +8 -7
  31. package/dist/types/__VUE/toast/index.d.ts +3 -3
  32. package/dist/types/index.d.ts +10 -6
  33. package/package.json +1 -1
@@ -18,8 +18,9 @@
18
18
  justify-content: center;
19
19
 
20
20
  &-icon {
21
- width: 28px;
22
- height: 24px;
21
+ margin-right: 4px;
22
+ width: 16px;
23
+ height: 16px;
23
24
  }
24
25
  &-text {
25
26
  font-size: $font-size-2;
@@ -1,4 +1,5 @@
1
1
  import _Toast from '../_es/Toast.js';
2
+ import { showToast } from '../_es/Toast.js';
2
3
  const treeshaking = (t) => t;
3
4
  const Toast = treeshaking(_Toast);
4
- export { Toast };
5
+ export { Toast, showToast };
@@ -1429,31 +1429,31 @@
1429
1429
  },
1430
1430
  "nut-notify/type": {
1431
1431
  "type": "string",
1432
- "description": "属性说明:提示的信息类型(primarysuccessdangerwarning),默认值:'danger'"
1432
+ "description": "属性说明:提示的信息类型,可选值为`primary` `success` `danger` `warning`,默认值:`danger`"
1433
1433
  },
1434
1434
  "nut-notify/message": {
1435
1435
  "type": "boolean",
1436
- "description": "属性说明:展示文案,支持通过\\n换行,默认值:false"
1436
+ "description": "属性说明:展示文案,支持通过\\n换行,默认值:`false`"
1437
1437
  },
1438
1438
  "nut-notify/duration": {
1439
1439
  "type": "number",
1440
- "description": "属性说明:展示时长(ms),值为 0 时,notify 不会消失,默认值:3000"
1440
+ "description": "属性说明:展示时长(ms),值为 0 时,notify 不会消失,默认值:`3000`"
1441
1441
  },
1442
1442
  "nut-notify/color": {
1443
1443
  "type": "string",
1444
- "description": "属性说明:字体颜色,默认值:空"
1444
+ "description": "属性说明:字体颜色,默认值:`''`"
1445
1445
  },
1446
1446
  "nut-notify/background": {
1447
1447
  "type": "string",
1448
- "description": "属性说明:背景颜色,默认值:空"
1448
+ "description": "属性说明:背景颜色,默认值:`''`"
1449
1449
  },
1450
1450
  "nut-notify/class-name": {
1451
- "type": "string/number",
1452
- "description": "属性说明:自定义类名,默认值:1"
1451
+ "type": "string\\/number",
1452
+ "description": "属性说明:自定义类名,默认值:`1`"
1453
1453
  },
1454
1454
  "nut-notify/position": {
1455
1455
  "type": "string",
1456
- "description": "属性说明:自定义位置,默认值:'top'"
1456
+ "description": "属性说明:自定义位置,可选值为 `top` `bottom` `left` `right` `center`,默认值:`top`"
1457
1457
  },
1458
1458
  "nut-numberkeyboard/v-model:visible": {
1459
1459
  "type": "boolean",
@@ -1500,7 +1500,7 @@
1500
1500
  "description": "属性说明:自定义遮罩层级,默认值:`2000`"
1501
1501
  },
1502
1502
  "nut-overlay/duration": {
1503
- "type": "string, string",
1503
+ "type": "string, number",
1504
1504
  "description": "属性说明:显示/隐藏的动画时长,单位秒,默认值:`0.3`"
1505
1505
  },
1506
1506
  "nut-overlay/overlay-class": {
@@ -1735,6 +1735,14 @@
1735
1735
  "type": "boolean",
1736
1736
  "description": "属性说明:是否允许挂载节点,默认值:`false`"
1737
1737
  },
1738
+ "nut-popup/overlay-class": {
1739
+ "type": "string",
1740
+ "description": "属性说明:自定义遮罩层类名,默认值:''"
1741
+ },
1742
+ "nut-popup/overlay-style": {
1743
+ "type": "string",
1744
+ "description": "属性说明:自定义遮罩层样式,默认值:''"
1745
+ },
1738
1746
  "nut-popup/safe-area-inset-bottom": {
1739
1747
  "type": "boolean",
1740
1748
  "description": "属性说明:是否开启 iphone 系列全面屏底部安全区适配,仅当 `position` 为 `bottom` 时有效,默认值:`false`"
@@ -1761,11 +1769,11 @@
1761
1769
  },
1762
1770
  "nut-price/position": {
1763
1771
  "type": "string",
1764
- "description": "属性说明:符号显示在价格前或者后,`before`、`after`,默认值:before"
1772
+ "description": "属性说明:符号显示在价格前或者后,`before`、`after`,默认值:`before`"
1765
1773
  },
1766
1774
  "nut-price/size": {
1767
1775
  "type": "string",
1768
- "description": "属性说明:价格尺寸,`large`、`normal`、`small`,默认值:large"
1776
+ "description": "属性说明:价格尺寸,`large`、`normal`、`small`,默认值:`large`"
1769
1777
  },
1770
1778
  "nut-progress/percentage": {
1771
1779
  "type": "number",
@@ -2247,10 +2255,6 @@
2247
2255
  "type": "boolean",
2248
2256
  "description": "属性说明:滑动过程中是否禁止冒泡,默认值:true"
2249
2257
  },
2250
- "nut-swiper/is-center": {
2251
- "type": "boolean",
2252
- "description": "属性说明:是否居中展示,必须传对应的`width` 和 `height`,默认值:false"
2253
- },
2254
2258
  "nut-switch/v-model": {
2255
2259
  "type": "boolean | string | number",
2256
2260
  "description": "属性说明:开关状态,默认值:`false`"
@@ -2483,27 +2487,27 @@
2483
2487
  "type": "boolean",
2484
2488
  "description": "属性说明:背景是否锁定,默认值:`false`"
2485
2489
  },
2486
- "nut-toast/Toast.text": {
2490
+ "nut-toast/showToast.text": {
2487
2491
  "type": "message| options",
2488
2492
  "description": "属性说明:展示文字提示,默认值:toast 实例(message支持传入HTML)"
2489
2493
  },
2490
- "nut-toast/Toast.success": {
2494
+ "nut-toast/showToast.success": {
2491
2495
  "type": "message| options",
2492
2496
  "description": "属性说明:展示成功提示,默认值:toast 实例"
2493
2497
  },
2494
- "nut-toast/Toast.fail": {
2498
+ "nut-toast/showToast.fail": {
2495
2499
  "type": "message| options",
2496
2500
  "description": "属性说明:展示失败提示,默认值:toast 实例"
2497
2501
  },
2498
- "nut-toast/Toast.warn": {
2502
+ "nut-toast/showToast.warn": {
2499
2503
  "type": "message| options",
2500
2504
  "description": "属性说明:展示警告提示,默认值:toast 实例"
2501
2505
  },
2502
- "nut-toast/Toast.hide": {
2506
+ "nut-toast/showToast.hide": {
2503
2507
  "type": "默认关闭所有实例,可传id关闭指定实例",
2504
2508
  "description": "属性说明:关闭提示,默认值:void"
2505
2509
  },
2506
- "nut-toast/Toast.loading": {
2510
+ "nut-toast/showToast.loading": {
2507
2511
  "type": "message| options",
2508
2512
  "description": "属性说明:展示加载提示,默认值:toast 实例"
2509
2513
  },
@@ -647,6 +647,8 @@
647
647
  "round",
648
648
  "teleport",
649
649
  "teleport-disable",
650
+ "overlay-class",
651
+ "overlay-style",
650
652
  "safe-area-inset-bottom"
651
653
  ]
652
654
  },
@@ -838,8 +840,7 @@
838
840
  "init-page",
839
841
  "touchable",
840
842
  "is-preventDefault",
841
- "is-stopPropagation",
842
- "is-center"
843
+ "is-stopPropagation"
843
844
  ]
844
845
  },
845
846
  "nut-swiperitem": {
@@ -941,12 +942,12 @@
941
942
  },
942
943
  "nut-toast": {
943
944
  "attributes": [
944
- "Toast.text",
945
- "Toast.success",
946
- "Toast.fail",
947
- "Toast.warn",
948
- "Toast.hide",
949
- "Toast.loading"
945
+ "showToast.text",
946
+ "showToast.success",
947
+ "showToast.fail",
948
+ "showToast.warn",
949
+ "showToast.hide",
950
+ "showToast.loading"
950
951
  ]
951
952
  },
952
953
  "nut-tour": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "NutUI",
5
- "version": "4.0.0-beta.7",
5
+ "version": "4.0.0-beta.9",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -3555,8 +3555,8 @@
3555
3555
  "attributes": [
3556
3556
  {
3557
3557
  "name": "type",
3558
- "default": "'danger'",
3559
- "description": "提示的信息类型(primarysuccessdangerwarning",
3558
+ "default": "`danger`",
3559
+ "description": "提示的信息类型,可选值为`primary` `success` `danger` `warning`",
3560
3560
  "value": {
3561
3561
  "type": "string",
3562
3562
  "kind": "expression"
@@ -3564,7 +3564,7 @@
3564
3564
  },
3565
3565
  {
3566
3566
  "name": "message",
3567
- "default": "false",
3567
+ "default": "`false`",
3568
3568
  "description": "展示文案,支持通过\\n换行",
3569
3569
  "value": {
3570
3570
  "type": "boolean",
@@ -3573,7 +3573,7 @@
3573
3573
  },
3574
3574
  {
3575
3575
  "name": "duration",
3576
- "default": "3000",
3576
+ "default": "`3000`",
3577
3577
  "description": "展示时长(ms),值为 0 时,notify 不会消失",
3578
3578
  "value": {
3579
3579
  "type": "number",
@@ -3582,7 +3582,7 @@
3582
3582
  },
3583
3583
  {
3584
3584
  "name": "color",
3585
- "default": "",
3585
+ "default": "`''`",
3586
3586
  "description": "字体颜色",
3587
3587
  "value": {
3588
3588
  "type": "string",
@@ -3591,7 +3591,7 @@
3591
3591
  },
3592
3592
  {
3593
3593
  "name": "background",
3594
- "default": "",
3594
+ "default": "`''`",
3595
3595
  "description": "背景颜色",
3596
3596
  "value": {
3597
3597
  "type": "string",
@@ -3600,17 +3600,17 @@
3600
3600
  },
3601
3601
  {
3602
3602
  "name": "class-name",
3603
- "default": "1",
3603
+ "default": "`1`",
3604
3604
  "description": "自定义类名",
3605
3605
  "value": {
3606
- "type": "string/number",
3606
+ "type": "string\\/number",
3607
3607
  "kind": "expression"
3608
3608
  }
3609
3609
  },
3610
3610
  {
3611
3611
  "name": "position",
3612
- "default": "'top'",
3613
- "description": "自定义位置",
3612
+ "default": "`top`",
3613
+ "description": "自定义位置,可选值为 `top` `bottom` `left` `right` `center`",
3614
3614
  "value": {
3615
3615
  "type": "string",
3616
3616
  "kind": "expression"
@@ -3734,7 +3734,7 @@
3734
3734
  "default": "`0.3`",
3735
3735
  "description": "显示/隐藏的动画时长,单位秒",
3736
3736
  "value": {
3737
- "type": "string, string",
3737
+ "type": "string, number",
3738
3738
  "kind": "expression"
3739
3739
  }
3740
3740
  },
@@ -4288,6 +4288,24 @@
4288
4288
  "kind": "expression"
4289
4289
  }
4290
4290
  },
4291
+ {
4292
+ "name": "overlay-class",
4293
+ "default": "''",
4294
+ "description": "自定义遮罩层类名",
4295
+ "value": {
4296
+ "type": "string",
4297
+ "kind": "expression"
4298
+ }
4299
+ },
4300
+ {
4301
+ "name": "overlay-style",
4302
+ "default": "''",
4303
+ "description": "自定义遮罩层样式",
4304
+ "value": {
4305
+ "type": "string",
4306
+ "kind": "expression"
4307
+ }
4308
+ },
4291
4309
  {
4292
4310
  "name": "safe-area-inset-bottom",
4293
4311
  "default": "`false`",
@@ -4351,7 +4369,7 @@
4351
4369
  },
4352
4370
  {
4353
4371
  "name": "position",
4354
- "default": "before",
4372
+ "default": "`before`",
4355
4373
  "description": "符号显示在价格前或者后,`before`、`after`",
4356
4374
  "value": {
4357
4375
  "type": "string",
@@ -4360,7 +4378,7 @@
4360
4378
  },
4361
4379
  {
4362
4380
  "name": "size",
4363
- "default": "large",
4381
+ "default": "`large`",
4364
4382
  "description": "价格尺寸,`large`、`normal`、`small`",
4365
4383
  "value": {
4366
4384
  "type": "string",
@@ -5551,15 +5569,6 @@
5551
5569
  "type": "boolean",
5552
5570
  "kind": "expression"
5553
5571
  }
5554
- },
5555
- {
5556
- "name": "is-center",
5557
- "default": "false",
5558
- "description": "是否居中展示,必须传对应的`width` 和 `height`",
5559
- "value": {
5560
- "type": "boolean",
5561
- "kind": "expression"
5562
- }
5563
5572
  }
5564
5573
  ]
5565
5574
  },
@@ -6160,7 +6169,7 @@
6160
6169
  "events": [],
6161
6170
  "attributes": [
6162
6171
  {
6163
- "name": "Toast.text",
6172
+ "name": "showToast.text",
6164
6173
  "default": "toast 实例(message支持传入HTML)",
6165
6174
  "description": "展示文字提示",
6166
6175
  "value": {
@@ -6169,7 +6178,7 @@
6169
6178
  }
6170
6179
  },
6171
6180
  {
6172
- "name": "Toast.success",
6181
+ "name": "showToast.success",
6173
6182
  "default": "toast 实例",
6174
6183
  "description": "展示成功提示",
6175
6184
  "value": {
@@ -6178,7 +6187,7 @@
6178
6187
  }
6179
6188
  },
6180
6189
  {
6181
- "name": "Toast.fail",
6190
+ "name": "showToast.fail",
6182
6191
  "default": "toast 实例",
6183
6192
  "description": "展示失败提示",
6184
6193
  "value": {
@@ -6187,7 +6196,7 @@
6187
6196
  }
6188
6197
  },
6189
6198
  {
6190
- "name": "Toast.warn",
6199
+ "name": "showToast.warn",
6191
6200
  "default": "toast 实例",
6192
6201
  "description": "展示警告提示",
6193
6202
  "value": {
@@ -6196,7 +6205,7 @@
6196
6205
  }
6197
6206
  },
6198
6207
  {
6199
- "name": "Toast.hide",
6208
+ "name": "showToast.hide",
6200
6209
  "default": "void",
6201
6210
  "description": "关闭提示",
6202
6211
  "value": {
@@ -6205,7 +6214,7 @@
6205
6214
  }
6206
6215
  },
6207
6216
  {
6208
- "name": "Toast.loading",
6217
+ "name": "showToast.loading",
6209
6218
  "default": "toast 实例",
6210
6219
  "description": "展示加载提示",
6211
6220
  "value": {