mdui 2.1.2 → 2.1.3

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 (53) hide show
  1. package/components/bottom-app-bar/style.js +1 -1
  2. package/components/button/style.js +2 -2
  3. package/components/button-icon/style.js +2 -2
  4. package/components/card/style.js +1 -1
  5. package/components/checkbox/style.js +1 -1
  6. package/components/chip/style.js +2 -2
  7. package/components/dialog/style.js +1 -1
  8. package/components/divider/style.js +1 -1
  9. package/components/dropdown/index.js +9 -4
  10. package/components/fab/style.js +1 -1
  11. package/components/layout/layout-style.js +1 -1
  12. package/components/list/list-item-style.js +2 -2
  13. package/components/menu/menu-item-style.js +1 -1
  14. package/components/navigation-bar/navigation-bar-style.js +1 -1
  15. package/components/navigation-drawer/index.d.ts +1 -0
  16. package/components/navigation-drawer/index.js +17 -11
  17. package/components/navigation-drawer/style.js +1 -1
  18. package/components/navigation-rail/navigation-rail-style.js +1 -1
  19. package/components/radio/radio-style.js +1 -1
  20. package/components/segmented-button/segmented-button-group-style.js +1 -1
  21. package/components/segmented-button/segmented-button-style.js +1 -1
  22. package/components/select/index.d.ts +0 -2
  23. package/components/select/index.js +3 -4
  24. package/components/slider/slider-base-style.js +1 -1
  25. package/components/snackbar/index.d.ts +12 -0
  26. package/components/snackbar/index.js +105 -46
  27. package/components/snackbar/style.js +1 -1
  28. package/components/switch/style.js +1 -1
  29. package/components/tabs/tab-style.js +1 -1
  30. package/components/tabs/tabs-style.js +1 -1
  31. package/components/tabs/tabs.d.ts +2 -2
  32. package/components/tabs/tabs.js +6 -4
  33. package/components/text-field/index.d.ts +5 -7
  34. package/components/text-field/index.js +30 -30
  35. package/components/text-field/style.js +1 -1
  36. package/components/tooltip/index.js +6 -4
  37. package/components/top-app-bar/top-app-bar-style.js +1 -1
  38. package/components/top-app-bar/top-app-bar.js +1 -1
  39. package/custom-elements.json +173 -86
  40. package/functions/alert.js +5 -3
  41. package/functions/confirm.js +5 -3
  42. package/functions/dialog.js +8 -3
  43. package/functions/prompt.js +5 -3
  44. package/functions/snackbar.js +8 -2
  45. package/html-data.en.json +1 -11
  46. package/html-data.zh-cn.json +1 -11
  47. package/jsx.en.d.ts +2 -5
  48. package/jsx.zh-cn.d.ts +2 -5
  49. package/mdui.esm.js +8 -8
  50. package/mdui.global.js +8 -8
  51. package/package.json +2 -3
  52. package/web-types.en.json +5 -11
  53. package/web-types.zh-cn.json +5 -11
@@ -65,7 +65,7 @@ let TopAppBar = class TopAppBar extends ScrollBehaviorMixin(LayoutItemBase) {
65
65
  // variant 变更时,重新为 scrollTargetContainer 元素添加 padding-top。避免 top-app-bar 覆盖内容
66
66
  this.addEventListener('transitionend', async () => {
67
67
  await this.scrollBehaviorDefinedController.whenDefined();
68
- this.updateContainerPadding();
68
+ this.setContainerPadding('update', this.scrollTarget);
69
69
  }, { once: true });
70
70
  }
71
71
  else {
@@ -572,13 +572,28 @@
572
572
  },
573
573
  {
574
574
  "kind": "method",
575
- "name": "updateContainerPadding",
575
+ "name": "setContainerPadding",
576
576
  "privacy": "protected",
577
577
  "return": {
578
578
  "type": {
579
579
  "text": "void"
580
580
  }
581
- }
581
+ },
582
+ "parameters": [
583
+ {
584
+ "name": "action",
585
+ "type": {
586
+ "text": "'add' | 'update' | 'remove'"
587
+ }
588
+ },
589
+ {
590
+ "name": "scrollTarget",
591
+ "optional": true,
592
+ "type": {
593
+ "text": "string | HTMLElement | JQ<HTMLElement>"
594
+ }
595
+ }
596
+ ]
582
597
  },
583
598
  {
584
599
  "kind": "method",
@@ -705,21 +720,7 @@
705
720
  {
706
721
  "kind": "method",
707
722
  "name": "onScrollBehaviorChange",
708
- "privacy": "private",
709
- "parameters": [
710
- {
711
- "name": "oldValue",
712
- "type": {
713
- "text": "string"
714
- }
715
- },
716
- {
717
- "name": "newValue",
718
- "type": {
719
- "text": "string"
720
- }
721
- }
722
- ]
723
+ "privacy": "private"
723
724
  },
724
725
  {
725
726
  "kind": "method",
@@ -787,7 +788,7 @@
787
788
  },
788
789
  {
789
790
  "kind": "method",
790
- "name": "updateContainerPadding",
791
+ "name": "setContainerPadding",
791
792
  "privacy": "protected",
792
793
  "return": {
793
794
  "type": {
@@ -796,12 +797,22 @@
796
797
  },
797
798
  "parameters": [
798
799
  {
799
- "name": "withPadding",
800
- "default": "true",
801
- "description": "该值为 false 时,为移除 padding"
800
+ "name": "action",
801
+ "type": {
802
+ "text": "'add' | 'update' | 'remove'"
803
+ },
804
+ "description": "新增、更新、移除 padding"
805
+ },
806
+ {
807
+ "name": "scrollTarget",
808
+ "optional": true,
809
+ "type": {
810
+ "text": "string | HTMLElement | JQ<HTMLElement>"
811
+ },
812
+ "description": "在该元素上添加、更新或移除 padding"
802
813
  }
803
814
  ],
804
- "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖\n仅 scrollBehavior 包含 hide、shrink 时,添加 padding"
815
+ "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖"
805
816
  },
806
817
  {
807
818
  "kind": "method",
@@ -1378,20 +1389,6 @@
1378
1389
  "kind": "method",
1379
1390
  "name": "onScrollBehaviorChange",
1380
1391
  "privacy": "private",
1381
- "parameters": [
1382
- {
1383
- "name": "oldValue",
1384
- "type": {
1385
- "text": "string"
1386
- }
1387
- },
1388
- {
1389
- "name": "newValue",
1390
- "type": {
1391
- "text": "string"
1392
- }
1393
- }
1394
- ],
1395
1392
  "inheritedFrom": {
1396
1393
  "name": "ScrollBehaviorMixin",
1397
1394
  "module": "@mdui/shared/mixins/scrollBehavior.js"
@@ -1449,7 +1446,7 @@
1449
1446
  },
1450
1447
  {
1451
1448
  "kind": "method",
1452
- "name": "updateContainerPadding",
1449
+ "name": "setContainerPadding",
1453
1450
  "privacy": "protected",
1454
1451
  "return": {
1455
1452
  "type": {
@@ -1458,12 +1455,22 @@
1458
1455
  },
1459
1456
  "parameters": [
1460
1457
  {
1461
- "name": "withPadding",
1462
- "default": "true",
1463
- "description": "该值为 false 时,为移除 padding"
1458
+ "name": "action",
1459
+ "type": {
1460
+ "text": "'add' | 'update' | 'remove'"
1461
+ },
1462
+ "description": "新增、更新、移除 padding"
1463
+ },
1464
+ {
1465
+ "name": "scrollTarget",
1466
+ "optional": true,
1467
+ "type": {
1468
+ "text": "string | HTMLElement | JQ<HTMLElement>"
1469
+ },
1470
+ "description": "在该元素上添加、更新或移除 padding"
1464
1471
  }
1465
1472
  ],
1466
- "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖\n仅 scrollBehavior 包含 hide、shrink 时,添加 padding",
1473
+ "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖",
1467
1474
  "inheritedFrom": {
1468
1475
  "name": "ScrollBehaviorMixin",
1469
1476
  "module": "@mdui/shared/mixins/scrollBehavior.js"
@@ -14145,20 +14152,6 @@
14145
14152
  "kind": "method",
14146
14153
  "name": "onScrollBehaviorChange",
14147
14154
  "privacy": "private",
14148
- "parameters": [
14149
- {
14150
- "name": "oldValue",
14151
- "type": {
14152
- "text": "string"
14153
- }
14154
- },
14155
- {
14156
- "name": "newValue",
14157
- "type": {
14158
- "text": "string"
14159
- }
14160
- }
14161
- ],
14162
14155
  "inheritedFrom": {
14163
14156
  "name": "ScrollBehaviorMixin",
14164
14157
  "module": "@mdui/shared/mixins/scrollBehavior.js"
@@ -14216,7 +14209,7 @@
14216
14209
  },
14217
14210
  {
14218
14211
  "kind": "method",
14219
- "name": "updateContainerPadding",
14212
+ "name": "setContainerPadding",
14220
14213
  "privacy": "protected",
14221
14214
  "return": {
14222
14215
  "type": {
@@ -14225,12 +14218,22 @@
14225
14218
  },
14226
14219
  "parameters": [
14227
14220
  {
14228
- "name": "withPadding",
14229
- "default": "true",
14230
- "description": "该值为 false 时,为移除 padding"
14221
+ "name": "action",
14222
+ "type": {
14223
+ "text": "'add' | 'update' | 'remove'"
14224
+ },
14225
+ "description": "新增、更新、移除 padding"
14226
+ },
14227
+ {
14228
+ "name": "scrollTarget",
14229
+ "optional": true,
14230
+ "type": {
14231
+ "text": "string | HTMLElement | JQ<HTMLElement>"
14232
+ },
14233
+ "description": "在该元素上添加、更新或移除 padding"
14231
14234
  }
14232
14235
  ],
14233
- "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖\n仅 scrollBehavior 包含 hide、shrink 时,添加 padding",
14236
+ "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖",
14234
14237
  "inheritedFrom": {
14235
14238
  "name": "ScrollBehaviorMixin",
14236
14239
  "module": "@mdui/shared/mixins/scrollBehavior.js"
@@ -14721,6 +14724,11 @@
14721
14724
  "name": "onOpenChange",
14722
14725
  "privacy": "private"
14723
14726
  },
14727
+ {
14728
+ "kind": "method",
14729
+ "name": "setObserveResize",
14730
+ "privacy": "private"
14731
+ },
14724
14732
  {
14725
14733
  "kind": "method",
14726
14734
  "name": "onOverlayClick",
@@ -22371,6 +22379,17 @@
22371
22379
  "attribute": "close-on-outside-click",
22372
22380
  "reflects": true
22373
22381
  },
22382
+ {
22383
+ "kind": "field",
22384
+ "name": "mobile",
22385
+ "type": {
22386
+ "text": "boolean"
22387
+ },
22388
+ "privacy": "private",
22389
+ "default": "false",
22390
+ "attribute": "mobile",
22391
+ "reflects": true
22392
+ },
22374
22393
  {
22375
22394
  "kind": "field",
22376
22395
  "name": "closeTimeout",
@@ -22379,11 +22398,41 @@
22379
22398
  },
22380
22399
  "privacy": "private"
22381
22400
  },
22401
+ {
22402
+ "kind": "field",
22403
+ "name": "observeResize",
22404
+ "type": {
22405
+ "text": "ObserveResize | undefined"
22406
+ },
22407
+ "privacy": "private"
22408
+ },
22382
22409
  {
22383
22410
  "kind": "method",
22384
22411
  "name": "onOpenChange",
22385
22412
  "privacy": "private"
22386
22413
  },
22414
+ {
22415
+ "kind": "method",
22416
+ "name": "onStackChange",
22417
+ "privacy": "private",
22418
+ "description": "这两个属性变更时,需要重新排序该组件后面的 snackbar"
22419
+ },
22420
+ {
22421
+ "kind": "method",
22422
+ "name": "reorderStack",
22423
+ "privacy": "private",
22424
+ "parameters": [
22425
+ {
22426
+ "name": "startSnackbar",
22427
+ "optional": true,
22428
+ "type": {
22429
+ "text": "Snackbar"
22430
+ },
22431
+ "description": "从哪个 snackbar 开始重新排列,默认从第一个开始"
22432
+ }
22433
+ ],
22434
+ "description": "重新排序 snackbar 堆叠"
22435
+ },
22387
22436
  {
22388
22437
  "kind": "method",
22389
22438
  "name": "onDocumentClick",
@@ -22517,6 +22566,14 @@
22517
22566
  "default": "false",
22518
22567
  "description": "点击或触摸 Snackbar 以外的区域时,是否关闭 Snackbar",
22519
22568
  "fieldName": "closeOnOutsideClick"
22569
+ },
22570
+ {
22571
+ "name": "mobile",
22572
+ "type": {
22573
+ "text": "boolean"
22574
+ },
22575
+ "default": "false",
22576
+ "fieldName": "mobile"
22520
22577
  }
22521
22578
  ],
22522
22579
  "superclass": {
@@ -24668,10 +24725,10 @@
24668
24725
  "kind": "field",
24669
24726
  "name": "autocomplete",
24670
24727
  "type": {
24671
- "text": "| /*禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法*/ 'off'\n | /*浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示*/ 'on' | undefined"
24728
+ "text": "string | undefined"
24672
24729
  },
24673
24730
  "privacy": "public",
24674
- "description": "是否使用浏览器的自动填充功能。可选值包括:\n\n* `off`:禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法\n* `on`:浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示",
24731
+ "description": "`input` 元素的 `autocomplete` 属性",
24675
24732
  "attribute": "autocomplete",
24676
24733
  "reflects": true
24677
24734
  },
@@ -25078,7 +25135,15 @@
25078
25135
  {
25079
25136
  "kind": "method",
25080
25137
  "name": "onInput",
25081
- "privacy": "private"
25138
+ "privacy": "private",
25139
+ "parameters": [
25140
+ {
25141
+ "name": "event",
25142
+ "type": {
25143
+ "text": "InputEvent"
25144
+ }
25145
+ }
25146
+ ]
25082
25147
  },
25083
25148
  {
25084
25149
  "kind": "method",
@@ -25151,6 +25216,16 @@
25151
25216
  "kind": "method",
25152
25217
  "name": "renderSuffix",
25153
25218
  "privacy": "private",
25219
+ "return": {
25220
+ "type": {
25221
+ "text": "TemplateResult"
25222
+ }
25223
+ }
25224
+ },
25225
+ {
25226
+ "kind": "method",
25227
+ "name": "renderRightIcon",
25228
+ "privacy": "private",
25154
25229
  "return": {
25155
25230
  "type": {
25156
25231
  "text": "TemplateResult"
@@ -25173,7 +25248,15 @@
25173
25248
  "type": {
25174
25249
  "text": "TemplateResult"
25175
25250
  }
25176
- }
25251
+ },
25252
+ "parameters": [
25253
+ {
25254
+ "name": "hasClearButton",
25255
+ "type": {
25256
+ "text": "boolean"
25257
+ }
25258
+ }
25259
+ ]
25177
25260
  },
25178
25261
  {
25179
25262
  "kind": "method",
@@ -25183,7 +25266,15 @@
25183
25266
  "type": {
25184
25267
  "text": "TemplateResult"
25185
25268
  }
25186
- }
25269
+ },
25270
+ "parameters": [
25271
+ {
25272
+ "name": "hasTogglePasswordButton",
25273
+ "type": {
25274
+ "text": "boolean"
25275
+ }
25276
+ }
25277
+ ]
25187
25278
  },
25188
25279
  {
25189
25280
  "kind": "method",
@@ -25810,9 +25901,9 @@
25810
25901
  {
25811
25902
  "name": "autocomplete",
25812
25903
  "type": {
25813
- "text": "| /*禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法*/ 'off'\n | /*浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示*/ 'on' | undefined"
25904
+ "text": "string | undefined"
25814
25905
  },
25815
- "description": "是否使用浏览器的自动填充功能。可选值包括:\n\n* `off`:禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法\n* `on`:浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示",
25906
+ "description": "`input` 元素的 `autocomplete` 属性",
25816
25907
  "fieldName": "autocomplete"
25817
25908
  },
25818
25909
  {
@@ -26819,20 +26910,6 @@
26819
26910
  "kind": "method",
26820
26911
  "name": "onScrollBehaviorChange",
26821
26912
  "privacy": "private",
26822
- "parameters": [
26823
- {
26824
- "name": "oldValue",
26825
- "type": {
26826
- "text": "string"
26827
- }
26828
- },
26829
- {
26830
- "name": "newValue",
26831
- "type": {
26832
- "text": "string"
26833
- }
26834
- }
26835
- ],
26836
26913
  "inheritedFrom": {
26837
26914
  "name": "ScrollBehaviorMixin",
26838
26915
  "module": "@mdui/shared/mixins/scrollBehavior.js"
@@ -26864,7 +26941,7 @@
26864
26941
  },
26865
26942
  {
26866
26943
  "kind": "method",
26867
- "name": "updateContainerPadding",
26944
+ "name": "setContainerPadding",
26868
26945
  "privacy": "protected",
26869
26946
  "return": {
26870
26947
  "type": {
@@ -26873,12 +26950,22 @@
26873
26950
  },
26874
26951
  "parameters": [
26875
26952
  {
26876
- "name": "withPadding",
26877
- "default": "true",
26878
- "description": "该值为 false 时,为移除 padding"
26953
+ "name": "action",
26954
+ "type": {
26955
+ "text": "'add' | 'update' | 'remove'"
26956
+ },
26957
+ "description": "新增、更新、移除 padding"
26958
+ },
26959
+ {
26960
+ "name": "scrollTarget",
26961
+ "optional": true,
26962
+ "type": {
26963
+ "text": "string | HTMLElement | JQ<HTMLElement>"
26964
+ },
26965
+ "description": "在该元素上添加、更新或移除 padding"
26879
26966
  }
26880
26967
  ],
26881
- "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖\n仅 scrollBehavior 包含 hide、shrink 时,添加 padding",
26968
+ "description": "更新滚动容器的 padding,避免内容被 navigation-bar 覆盖",
26882
26969
  "inheritedFrom": {
26883
26970
  "name": "ScrollBehaviorMixin",
26884
26971
  "module": "@mdui/shared/mixins/scrollBehavior.js"
@@ -66,9 +66,11 @@ export const alert = (options) => {
66
66
  $(dialog).find('[slot="action"]').text(getConfirmText());
67
67
  });
68
68
  }
69
- $(dialog).on('close', () => {
70
- isResolve ? resolve() : reject();
71
- offLocaleReady(dialog);
69
+ $(dialog).on('close', (e) => {
70
+ if (e.target === dialog) {
71
+ isResolve ? resolve() : reject();
72
+ offLocaleReady(dialog);
73
+ }
72
74
  });
73
75
  });
74
76
  };
@@ -87,9 +87,11 @@ export const confirm = (options) => {
87
87
  $(dialog).find('[slot="action"]').first().text(getCancelText());
88
88
  });
89
89
  }
90
- $(dialog).on('close', () => {
91
- isResolve ? resolve() : reject();
92
- offLocaleReady(dialog);
90
+ $(dialog).on('close', (e) => {
91
+ if (e.target === dialog) {
92
+ isResolve ? resolve() : reject();
93
+ offLocaleReady(dialog);
94
+ }
93
95
  });
94
96
  });
95
97
  };
@@ -38,8 +38,10 @@ export const dialog = (options) => {
38
38
  }
39
39
  else if (callbacks.includes(key)) {
40
40
  const eventName = toKebabCase(key.slice(2));
41
- $dialog.on(eventName, () => {
42
- value.call(dialog, dialog);
41
+ $dialog.on(eventName, (e) => {
42
+ if (e.target === dialog) {
43
+ value.call(dialog, dialog);
44
+ }
43
45
  });
44
46
  }
45
47
  });
@@ -72,7 +74,10 @@ export const dialog = (options) => {
72
74
  });
73
75
  });
74
76
  }
75
- $dialog.appendTo('body').on('closed', () => {
77
+ $dialog.appendTo('body').on('closed', (e) => {
78
+ if (e.target !== dialog) {
79
+ return;
80
+ }
76
81
  $dialog.remove();
77
82
  if (options.queue) {
78
83
  currentDialog = undefined;
@@ -122,9 +122,11 @@ export const prompt = (options) => {
122
122
  $(dialog).find('[slot="action"]').first().text(getCancelText());
123
123
  });
124
124
  }
125
- $(dialog).on('close', () => {
126
- isResolve ? resolve(textField.value) : reject();
127
- offLocaleReady(dialog);
125
+ $(dialog).on('close', (e) => {
126
+ if (e.target === dialog) {
127
+ isResolve ? resolve(textField.value) : reject();
128
+ offLocaleReady(dialog);
129
+ }
128
130
  });
129
131
  });
130
132
  };
@@ -28,7 +28,10 @@ export const snackbar = (options) => {
28
28
  'onClosed',
29
29
  ].includes(key)) {
30
30
  const eventName = toKebabCase(key.slice(2));
31
- $snackbar.on(eventName, () => {
31
+ $snackbar.on(eventName, (e) => {
32
+ if (e.target !== snackbar) {
33
+ return;
34
+ }
32
35
  if (key === 'onActionClick') {
33
36
  const actionClick = (options.onActionClick ?? returnTrue).call(snackbar, snackbar);
34
37
  if (isPromise(actionClick)) {
@@ -55,7 +58,10 @@ export const snackbar = (options) => {
55
58
  snackbar[key] = value;
56
59
  }
57
60
  });
58
- $snackbar.appendTo('body').on('closed', () => {
61
+ $snackbar.appendTo('body').on('closed', (e) => {
62
+ if (e.target !== snackbar) {
63
+ return;
64
+ }
59
65
  $snackbar.remove();
60
66
  if (options.queue) {
61
67
  currentSnackbar = undefined;
package/html-data.en.json CHANGED
@@ -6082,17 +6082,7 @@
6082
6082
  },
6083
6083
  {
6084
6084
  "name": "autocomplete",
6085
- "description": "Enables the browser's autocomplete feature for text input. Possible values:\n\n* `off`: Disables browser autocomplete.\n* `on`: Enables browser autocomplete.",
6086
- "values": [
6087
- {
6088
- "name": "off",
6089
- "description": "Disables browser autocomplete."
6090
- },
6091
- {
6092
- "name": "on",
6093
- "description": "Enables browser autocomplete."
6094
- }
6095
- ],
6085
+ "description": "The `autocomplete` attribute of the `input` element.",
6096
6086
  "references": [
6097
6087
  {
6098
6088
  "name": "Docs",
@@ -6082,17 +6082,7 @@
6082
6082
  },
6083
6083
  {
6084
6084
  "name": "autocomplete",
6085
- "description": "是否使用浏览器的自动填充功能。可选值包括:\n\n* `off`:禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法\n* `on`:浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示",
6086
- "values": [
6087
- {
6088
- "name": "off",
6089
- "description": "禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法"
6090
- },
6091
- {
6092
- "name": "on",
6093
- "description": "浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示"
6094
- }
6095
- ],
6085
+ "description": "`input` 元素的 `autocomplete` 属性",
6096
6086
  "references": [
6097
6087
  {
6098
6088
  "name": "开发文档",
package/jsx.en.d.ts CHANGED
@@ -3090,13 +3090,10 @@ declare global {
3090
3090
  */
3091
3091
  'autocorrect'?: string;
3092
3092
  /**
3093
- * Enables the browser's autocomplete feature for text input. Possible values:
3094
- *
3095
- * * `off`: Disables browser autocomplete.
3096
- * * `on`: Enables browser autocomplete.
3093
+ * The `autocomplete` attribute of the `input` element.
3097
3094
  * @see https://www.mdui.org/en/docs/2/components/text-field#attributes-autocomplete
3098
3095
  */
3099
- 'autocomplete'?: 'off' | 'on';
3096
+ 'autocomplete'?: string;
3100
3097
  /**
3101
3098
  * Customizes the Enter key text or icon on the virtual keyboard. The effect varies based on the device and language. Possible values:
3102
3099
  *
package/jsx.zh-cn.d.ts CHANGED
@@ -3138,13 +3138,10 @@ declare global {
3138
3138
  */
3139
3139
  'autocorrect'?: string;
3140
3140
  /**
3141
- * 是否使用浏览器的自动填充功能。可选值包括:
3142
- *
3143
- * * `off`:禁用浏览器的自动填充,使用者必须输入他们想要输入的所有内容。或者网页提供了自己的自动填充方法
3144
- * * `on`:浏览器根据用户之前输入的内容或者习惯,在用户输入的时候给出相应输入提示
3141
+ * `input` 元素的 `autocomplete` 属性
3145
3142
  * @see https://www.mdui.org/zh-cn/docs/2/components/text-field#attributes-autocomplete
3146
3143
  */
3147
- 'autocomplete'?: 'off' | 'on';
3144
+ 'autocomplete'?: string;
3148
3145
  /**
3149
3146
  * `input` 元素的 `enterkeyhint` 属性,用于定制虚拟键盘上的 Enter 键的显示文本或图标。具体显示效果取决于用户使用的设备和语言。可选值包括:
3150
3147
  *