antd-mobile 0.0.0-dev-626cbf51f → 0.0.0-dev.fc623d614
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/2x/README.md +10 -8
- package/2x/cjs/components/action-sheet/action-sheet.css +22 -7
- package/2x/cjs/components/action-sheet/action-sheet.js +8 -16
- package/2x/cjs/components/badge/badge.d.ts +1 -1
- package/2x/cjs/components/badge/badge.js +3 -1
- package/2x/cjs/components/badge/index.d.ts +1 -1
- package/2x/cjs/components/button/button.d.ts +6 -4
- package/2x/cjs/components/button/button.js +5 -1
- package/2x/cjs/components/calendar/calendar.css +4 -0
- package/2x/cjs/components/calendar/calendar.d.ts +1 -0
- package/2x/cjs/components/calendar/calendar.js +2 -2
- package/2x/cjs/components/dialog/dialog.d.ts +4 -1
- package/2x/cjs/components/dialog/dialog.js +24 -13
- package/2x/cjs/components/dropdown/dropdown.css +1 -1
- package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
- package/2x/cjs/components/error-block/images/default.d.ts +1 -0
- package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
- package/2x/cjs/components/form/form-item.js +1 -4
- package/2x/cjs/components/image/broken-image-icon.d.ts +1 -0
- package/2x/cjs/components/image/broken-image-icon.js +21 -0
- package/2x/cjs/components/image/image-icon.d.ts +1 -0
- package/2x/cjs/components/image/image-icon.js +21 -0
- package/2x/cjs/components/image/image.css +4 -2
- package/2x/cjs/components/image/image.d.ts +2 -1
- package/2x/cjs/components/image/image.js +10 -6
- package/2x/cjs/components/image-uploader/image-uploader.js +1 -4
- package/2x/cjs/components/image-viewer/image-viewer.css +7 -1
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +5 -2
- package/2x/cjs/components/image-viewer/image-viewer.js +24 -4
- package/2x/cjs/components/image-viewer/index.d.ts +2 -1
- package/2x/cjs/components/index-bar/index-bar.d.ts +2 -0
- package/2x/cjs/components/index-bar/index-bar.js +6 -0
- package/2x/cjs/components/index-bar/index.d.ts +1 -0
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/cjs/components/mask/mask.js +9 -7
- package/2x/cjs/components/modal/modal.d.ts +4 -1
- package/2x/cjs/components/modal/modal.js +24 -11
- package/2x/cjs/components/popover/popover.css +1 -0
- package/2x/cjs/components/popup/popup.d.ts +2 -1
- package/2x/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/2x/cjs/components/search-bar/search-bar.js +5 -8
- package/2x/cjs/components/side-bar/side-bar.d.ts +2 -1
- package/2x/cjs/components/swiper/index.d.ts +1 -1
- package/2x/cjs/components/swiper/swiper.d.ts +1 -1
- package/2x/cjs/components/tabs/tabs.css +4 -3
- package/2x/cjs/components/tabs/tabs.d.ts +1 -1
- package/2x/cjs/components/text-area/text-area.js +2 -1
- package/2x/cjs/components/toast/toast.css +1 -1
- package/2x/cjs/components/toast/toast.d.ts +2 -1
- package/2x/cjs/locales/fr-FR.d.ts +106 -0
- package/2x/cjs/locales/fr-FR.js +119 -0
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/cjs/utils/render.js +14 -2
- package/2x/cjs/utils/use-inner-visible.d.ts +1 -0
- package/2x/cjs/utils/use-inner-visible.js +18 -0
- package/2x/es/components/action-sheet/action-sheet.css +22 -7
- package/2x/es/components/action-sheet/action-sheet.js +8 -15
- package/2x/es/components/badge/badge.d.ts +1 -1
- package/2x/es/components/badge/badge.js +1 -1
- package/2x/es/components/badge/index.d.ts +1 -1
- package/2x/es/components/button/button.d.ts +6 -4
- package/2x/es/components/button/button.js +5 -1
- package/2x/es/components/calendar/calendar.css +4 -0
- package/2x/es/components/calendar/calendar.d.ts +1 -0
- package/2x/es/components/calendar/calendar.js +2 -2
- package/2x/es/components/dialog/dialog.d.ts +4 -1
- package/2x/es/components/dialog/dialog.js +23 -14
- package/2x/es/components/dropdown/dropdown.css +1 -1
- package/2x/es/components/error-block/images/busy.d.ts +1 -0
- package/2x/es/components/error-block/images/default.d.ts +1 -0
- package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/es/components/error-block/images/empty.d.ts +1 -0
- package/2x/es/components/form/form-item.js +1 -4
- package/2x/es/components/image/broken-image-icon.d.ts +1 -0
- package/2x/es/components/image/broken-image-icon.js +9 -0
- package/2x/es/components/image/image-icon.d.ts +1 -0
- package/2x/es/components/image/image-icon.js +9 -0
- package/2x/es/components/image/image.css +4 -2
- package/2x/es/components/image/image.d.ts +2 -1
- package/2x/es/components/image/image.js +8 -5
- package/2x/es/components/image-uploader/image-uploader.js +2 -5
- package/2x/es/components/image-viewer/image-viewer.css +7 -1
- package/2x/es/components/image-viewer/image-viewer.d.ts +5 -2
- package/2x/es/components/image-viewer/image-viewer.js +24 -5
- package/2x/es/components/image-viewer/index.d.ts +2 -1
- package/2x/es/components/index-bar/index-bar.d.ts +2 -0
- package/2x/es/components/index-bar/index-bar.js +6 -0
- package/2x/es/components/index-bar/index.d.ts +1 -0
- package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/es/components/mask/mask.js +10 -8
- package/2x/es/components/modal/modal.d.ts +4 -1
- package/2x/es/components/modal/modal.js +23 -12
- package/2x/es/components/popover/popover.css +1 -0
- package/2x/es/components/popup/popup.d.ts +2 -1
- package/2x/es/components/search-bar/search-bar.d.ts +1 -1
- package/2x/es/components/search-bar/search-bar.js +5 -8
- package/2x/es/components/side-bar/side-bar.d.ts +2 -1
- package/2x/es/components/swiper/index.d.ts +1 -1
- package/2x/es/components/swiper/swiper.d.ts +1 -1
- package/2x/es/components/tabs/tabs.css +4 -3
- package/2x/es/components/tabs/tabs.d.ts +1 -1
- package/2x/es/components/text-area/text-area.js +2 -1
- package/2x/es/components/toast/toast.css +1 -1
- package/2x/es/components/toast/toast.d.ts +2 -1
- package/2x/es/locales/fr-FR.d.ts +106 -0
- package/2x/es/locales/fr-FR.js +109 -0
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/es/utils/render.js +14 -2
- package/2x/es/utils/use-inner-visible.d.ts +1 -0
- package/2x/es/utils/use-inner-visible.js +9 -0
- package/2x/package.json +6 -11
- package/README.md +10 -8
- package/bundle/antd-mobile.cjs.js +293 -229
- package/bundle/antd-mobile.es.js +295 -231
- package/bundle/style.css +110 -86
- package/cjs/components/action-sheet/action-sheet.css +19 -7
- package/cjs/components/action-sheet/action-sheet.js +8 -16
- package/cjs/components/badge/badge.d.ts +1 -1
- package/cjs/components/badge/badge.js +3 -1
- package/cjs/components/badge/index.d.ts +1 -1
- package/cjs/components/button/button.d.ts +6 -4
- package/cjs/components/button/button.js +5 -1
- package/cjs/components/calendar/calendar.css +3 -0
- package/cjs/components/calendar/calendar.d.ts +1 -0
- package/cjs/components/calendar/calendar.js +2 -2
- package/cjs/components/dialog/dialog.d.ts +4 -1
- package/cjs/components/dialog/dialog.js +24 -13
- package/cjs/components/dropdown/dropdown.css +1 -1
- package/cjs/components/error-block/images/busy.d.ts +1 -0
- package/cjs/components/error-block/images/default.d.ts +1 -0
- package/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/cjs/components/error-block/images/empty.d.ts +1 -0
- package/cjs/components/form/form-item.js +1 -4
- package/cjs/components/image/broken-image-icon.d.ts +1 -0
- package/cjs/components/image/broken-image-icon.js +21 -0
- package/cjs/components/image/image-icon.d.ts +1 -0
- package/cjs/components/image/image-icon.js +21 -0
- package/cjs/components/image/image.css +4 -2
- package/cjs/components/image/image.d.ts +2 -1
- package/cjs/components/image/image.js +10 -6
- package/cjs/components/image-uploader/image-uploader.js +1 -4
- package/cjs/components/image-viewer/image-viewer.css +6 -1
- package/cjs/components/image-viewer/image-viewer.d.ts +5 -2
- package/cjs/components/image-viewer/image-viewer.js +24 -4
- package/cjs/components/image-viewer/index.d.ts +2 -1
- package/cjs/components/index-bar/index-bar.d.ts +2 -0
- package/cjs/components/index-bar/index-bar.js +6 -0
- package/cjs/components/index-bar/index.d.ts +1 -0
- package/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/cjs/components/mask/mask.js +9 -7
- package/cjs/components/modal/modal.d.ts +4 -1
- package/cjs/components/modal/modal.js +24 -11
- package/cjs/components/popover/popover.css +1 -0
- package/cjs/components/popup/popup.d.ts +2 -1
- package/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/cjs/components/search-bar/search-bar.js +5 -8
- package/cjs/components/side-bar/side-bar.d.ts +2 -1
- package/cjs/components/swiper/index.d.ts +1 -1
- package/cjs/components/swiper/swiper.d.ts +1 -1
- package/cjs/components/tabs/tabs.css +4 -3
- package/cjs/components/tabs/tabs.d.ts +1 -1
- package/cjs/components/text-area/text-area.js +2 -1
- package/cjs/components/toast/toast.css +1 -1
- package/cjs/components/toast/toast.d.ts +2 -1
- package/cjs/locales/fr-FR.d.ts +106 -0
- package/cjs/locales/fr-FR.js +119 -0
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/cjs/utils/render.js +14 -2
- package/cjs/utils/use-inner-visible.d.ts +1 -0
- package/cjs/utils/use-inner-visible.js +18 -0
- package/es/components/action-sheet/action-sheet.css +19 -7
- package/es/components/action-sheet/action-sheet.js +8 -15
- package/es/components/badge/badge.d.ts +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/index.d.ts +1 -1
- package/es/components/button/button.d.ts +6 -4
- package/es/components/button/button.js +5 -1
- package/es/components/calendar/calendar.css +3 -0
- package/es/components/calendar/calendar.d.ts +1 -0
- package/es/components/calendar/calendar.js +2 -2
- package/es/components/dialog/dialog.d.ts +4 -1
- package/es/components/dialog/dialog.js +23 -14
- package/es/components/dropdown/dropdown.css +1 -1
- package/es/components/error-block/images/busy.d.ts +1 -0
- package/es/components/error-block/images/default.d.ts +1 -0
- package/es/components/error-block/images/disconnected.d.ts +1 -0
- package/es/components/error-block/images/empty.d.ts +1 -0
- package/es/components/form/form-item.js +1 -4
- package/es/components/image/broken-image-icon.d.ts +1 -0
- package/es/components/image/broken-image-icon.js +9 -0
- package/es/components/image/image-icon.d.ts +1 -0
- package/es/components/image/image-icon.js +9 -0
- package/es/components/image/image.css +4 -2
- package/es/components/image/image.d.ts +2 -1
- package/es/components/image/image.js +8 -5
- package/es/components/image-uploader/image-uploader.js +2 -5
- package/es/components/image-viewer/image-viewer.css +6 -1
- package/es/components/image-viewer/image-viewer.d.ts +5 -2
- package/es/components/image-viewer/image-viewer.js +24 -5
- package/es/components/image-viewer/index.d.ts +2 -1
- package/es/components/index-bar/index-bar.d.ts +2 -0
- package/es/components/index-bar/index-bar.js +6 -0
- package/es/components/index-bar/index.d.ts +1 -0
- package/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/es/components/mask/mask.js +10 -8
- package/es/components/modal/modal.d.ts +4 -1
- package/es/components/modal/modal.js +23 -12
- package/es/components/popover/popover.css +1 -0
- package/es/components/popup/popup.d.ts +2 -1
- package/es/components/search-bar/search-bar.d.ts +1 -1
- package/es/components/search-bar/search-bar.js +5 -8
- package/es/components/side-bar/side-bar.d.ts +2 -1
- package/es/components/swiper/index.d.ts +1 -1
- package/es/components/swiper/swiper.d.ts +1 -1
- package/es/components/tabs/tabs.css +4 -3
- package/es/components/tabs/tabs.d.ts +1 -1
- package/es/components/text-area/text-area.js +2 -1
- package/es/components/toast/toast.css +1 -1
- package/es/components/toast/toast.d.ts +2 -1
- package/es/locales/fr-FR.d.ts +106 -0
- package/es/locales/fr-FR.js +109 -0
- package/es/utils/get-scroll-parent.js +1 -1
- package/es/utils/render.js +14 -2
- package/es/utils/use-inner-visible.d.ts +1 -0
- package/es/utils/use-inner-visible.js +9 -0
- package/package.json +6 -11
- package/umd/antd-mobile.js +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _mergeLocale = require("../utils/merge-locale");
|
|
9
|
+
|
|
10
|
+
var _base = require("./base");
|
|
11
|
+
|
|
12
|
+
const typeTemplate = '${label}Pas un valide${type}';
|
|
13
|
+
const frFR = (0, _mergeLocale.mergeLocale)(_base.base, {
|
|
14
|
+
locale: 'fr-FR',
|
|
15
|
+
common: {
|
|
16
|
+
confirm: 'Valider',
|
|
17
|
+
cancel: 'Annuler',
|
|
18
|
+
loading: 'Chargement'
|
|
19
|
+
},
|
|
20
|
+
Calendar: {
|
|
21
|
+
markItems: ['un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept'],
|
|
22
|
+
renderYearAndMonth: (year, month) => `${year}Année ${month}Mois`
|
|
23
|
+
},
|
|
24
|
+
Cascader: {
|
|
25
|
+
placeholder: 'Veuillez sélectionner'
|
|
26
|
+
},
|
|
27
|
+
Dialog: {
|
|
28
|
+
ok: 'Je l’ai compris'
|
|
29
|
+
},
|
|
30
|
+
ErrorBlock: {
|
|
31
|
+
default: {
|
|
32
|
+
title: 'La page rencontre des problèmes mineurs',
|
|
33
|
+
description: 'Venez essayer plus tard'
|
|
34
|
+
},
|
|
35
|
+
busy: {
|
|
36
|
+
title: 'Pas chargé.',
|
|
37
|
+
description: 'Tentative de rafraîchir la page'
|
|
38
|
+
},
|
|
39
|
+
disconnected: {
|
|
40
|
+
title: 'Le réseau est occupé',
|
|
41
|
+
description: 'Tentative de rafraîchir la page'
|
|
42
|
+
},
|
|
43
|
+
empty: {
|
|
44
|
+
title: 'Vous n’avez pas trouvé ce que vous cherchez',
|
|
45
|
+
description: 'Trouvez les autres'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
Form: {
|
|
49
|
+
required: 'Qu’il remplit',
|
|
50
|
+
optional: 'Décharge sélectionnés',
|
|
51
|
+
defaultValidateMessages: {
|
|
52
|
+
default: 'Erreur de validation de champ${label}',
|
|
53
|
+
required: 'Veuillez entrer le${label}',
|
|
54
|
+
enum: '${label}doit être l’un des[${enum}]',
|
|
55
|
+
whitespace: '${label}Ne peut pas être un caractère vide',
|
|
56
|
+
date: {
|
|
57
|
+
format: '${label}Format de date invalide',
|
|
58
|
+
parse: '${label}Non convertible en date',
|
|
59
|
+
invalid: '${label}Est une date non valide'
|
|
60
|
+
},
|
|
61
|
+
types: {
|
|
62
|
+
string: typeTemplate,
|
|
63
|
+
method: typeTemplate,
|
|
64
|
+
array: typeTemplate,
|
|
65
|
+
object: typeTemplate,
|
|
66
|
+
number: typeTemplate,
|
|
67
|
+
date: typeTemplate,
|
|
68
|
+
boolean: typeTemplate,
|
|
69
|
+
integer: typeTemplate,
|
|
70
|
+
float: typeTemplate,
|
|
71
|
+
regexp: typeTemplate,
|
|
72
|
+
email: typeTemplate,
|
|
73
|
+
url: typeTemplate,
|
|
74
|
+
hex: typeTemplate
|
|
75
|
+
},
|
|
76
|
+
string: {
|
|
77
|
+
len: '${label}pour${len}Un caractère',
|
|
78
|
+
min: '${label}Au moins${min}Un caractère',
|
|
79
|
+
max: '${label}Un maximum de${max}Un caractère',
|
|
80
|
+
range: '${label}Dans les${min}-${max}Entre les caractères'
|
|
81
|
+
},
|
|
82
|
+
number: {
|
|
83
|
+
len: '${label}Doit être égal à${len}',
|
|
84
|
+
min: '${label}La valeur minimale est${min}',
|
|
85
|
+
max: '${label}La valeur maximale est${max}',
|
|
86
|
+
range: '${label}Dans les${min}-${max}entre'
|
|
87
|
+
},
|
|
88
|
+
array: {
|
|
89
|
+
len: 'pour${len}个${label}',
|
|
90
|
+
min: 'Au moins${min}个${label}',
|
|
91
|
+
max: 'Un maximum de${max}个${label}',
|
|
92
|
+
range: '${label}Montant de${min}-${max}entre'
|
|
93
|
+
},
|
|
94
|
+
pattern: {
|
|
95
|
+
mismatch: '${label}Ne correspond pas au modèle${pattern}'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
ImageUploader: {
|
|
100
|
+
uploading: 'Téléchargement...',
|
|
101
|
+
upload: 'Télécharger'
|
|
102
|
+
},
|
|
103
|
+
InfiniteScroll: {
|
|
104
|
+
noMore: 'Non, plus maintenant.'
|
|
105
|
+
},
|
|
106
|
+
Mask: {
|
|
107
|
+
name: 'Masques'
|
|
108
|
+
},
|
|
109
|
+
Modal: {
|
|
110
|
+
ok: 'Je l’ai compris'
|
|
111
|
+
},
|
|
112
|
+
PullToRefresh: {
|
|
113
|
+
pulling: 'Rafraîchir la liste déroulante',
|
|
114
|
+
canRelease: 'Libérez instantanément rafraîchir',
|
|
115
|
+
complete: 'Rafraîchir avec succès'
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
var _default = frFR;
|
|
119
|
+
exports.default = _default;
|
|
@@ -27,7 +27,7 @@ function getScrollParent(el, root = defaultRoot) {
|
|
|
27
27
|
overflowY
|
|
28
28
|
} = window.getComputedStyle(node);
|
|
29
29
|
|
|
30
|
-
if (overflowStylePatterns.includes(overflowY)) {
|
|
30
|
+
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
31
31
|
return node;
|
|
32
32
|
}
|
|
33
33
|
|
package/2x/cjs/utils/render.js
CHANGED
|
@@ -26,13 +26,23 @@ let createRoot;
|
|
|
26
26
|
try {
|
|
27
27
|
const mainVersion = Number((version || '').split('.')[0]);
|
|
28
28
|
|
|
29
|
-
if (mainVersion >= 18) {
|
|
29
|
+
if (mainVersion >= 18 && fullClone.createRoot) {
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
31
|
-
createRoot =
|
|
31
|
+
createRoot = fullClone.createRoot;
|
|
32
32
|
}
|
|
33
33
|
} catch (e) {// Do nothing;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
function toggleWarning(skip) {
|
|
37
|
+
const {
|
|
38
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
39
|
+
} = fullClone;
|
|
40
|
+
|
|
41
|
+
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === 'object') {
|
|
42
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
36
46
|
const MARK = '__antd_mobile_root__';
|
|
37
47
|
|
|
38
48
|
function legacyRender(node, container) {
|
|
@@ -40,7 +50,9 @@ function legacyRender(node, container) {
|
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
function concurrentRender(node, container) {
|
|
53
|
+
toggleWarning(true);
|
|
43
54
|
const root = container[MARK] || createRoot(container);
|
|
55
|
+
toggleWarning(false);
|
|
44
56
|
root.render(node);
|
|
45
57
|
container[MARK] = root;
|
|
46
58
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useInnerVisible(outerVisible: boolean): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useInnerVisible = useInnerVisible;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _ahooks = require("ahooks");
|
|
11
|
+
|
|
12
|
+
function useInnerVisible(outerVisible) {
|
|
13
|
+
const [innerVisible, setInnerVisible] = (0, _react.useState)(outerVisible);
|
|
14
|
+
(0, _ahooks.useIsomorphicLayoutEffect)(() => {
|
|
15
|
+
setInnerVisible(outerVisible);
|
|
16
|
+
}, [outerVisible]);
|
|
17
|
+
return innerVisible;
|
|
18
|
+
}
|
|
@@ -9,22 +9,37 @@
|
|
|
9
9
|
justify-content: center;
|
|
10
10
|
color: var(--adm-color-weak);
|
|
11
11
|
font-size: 30px;
|
|
12
|
-
padding: 36px
|
|
12
|
+
padding: 36px 24px;
|
|
13
|
+
border-bottom: 2px solid var(--adm-border-color);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.adm-action-sheet-button-list {
|
|
13
17
|
border-bottom: 2px solid var(--adm-border-color);
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
.adm-action-sheet-button-item-wrapper {
|
|
17
|
-
|
|
18
|
-
border-top: 2px solid var(--adm-border-color);
|
|
21
|
+
border-bottom: 2px solid var(--adm-border-color);
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
.adm-action-sheet-button-item-wrapper:
|
|
22
|
-
border-
|
|
24
|
+
.adm-action-sheet-button-item-wrapper:last-child {
|
|
25
|
+
border-bottom: none;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
.adm-action-sheet-button-item {
|
|
26
|
-
padding: 28px;
|
|
27
29
|
text-align: center;
|
|
30
|
+
display: block;
|
|
31
|
+
background-color: #ffffff;
|
|
32
|
+
padding: 32px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.adm-action-sheet-button-item:active {
|
|
36
|
+
background-color: #eeeeee;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.adm-action-sheet-button-item-disabled {
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
opacity: 0.4;
|
|
28
43
|
}
|
|
29
44
|
|
|
30
45
|
.adm-action-sheet-button-item-name {
|
|
@@ -35,7 +50,7 @@
|
|
|
35
50
|
.adm-action-sheet-button-item-description {
|
|
36
51
|
font-size: 24px;
|
|
37
52
|
color: var(--adm-color-weak);
|
|
38
|
-
padding-top:
|
|
53
|
+
padding-top: 4px;
|
|
39
54
|
}
|
|
40
55
|
|
|
41
56
|
.adm-action-sheet-button-item-danger .adm-action-sheet-button-item-name {
|
|
@@ -3,7 +3,6 @@ import { withNativeProps } from '../../utils/native-props';
|
|
|
3
3
|
import { mergeProps } from '../../utils/with-default-props';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import Popup from '../popup';
|
|
6
|
-
import Button from '../button';
|
|
7
6
|
import SafeArea from '../safe-area';
|
|
8
7
|
import { renderImperatively } from '../../utils/render-imperatively';
|
|
9
8
|
const classPrefix = `adm-action-sheet`;
|
|
@@ -41,11 +40,11 @@ export const ActionSheet = p => {
|
|
|
41
40
|
}, props.actions.map((action, index) => React.createElement("div", {
|
|
42
41
|
key: action.key,
|
|
43
42
|
className: `${classPrefix}-button-item-wrapper`
|
|
44
|
-
}, React.createElement(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
}, React.createElement("a", {
|
|
44
|
+
className: classNames('adm-plain-anchor', `${classPrefix}-button-item`, {
|
|
45
|
+
[`${classPrefix}-button-item-danger`]: action.danger,
|
|
46
|
+
[`${classPrefix}-button-item-disabled`]: action.disabled
|
|
47
|
+
}),
|
|
49
48
|
onClick: () => {
|
|
50
49
|
var _a, _b, _c;
|
|
51
50
|
|
|
@@ -55,10 +54,7 @@ export const ActionSheet = p => {
|
|
|
55
54
|
if (props.closeOnAction) {
|
|
56
55
|
(_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
57
56
|
}
|
|
58
|
-
}
|
|
59
|
-
className: classNames(`${classPrefix}-button-item`, {
|
|
60
|
-
[`${classPrefix}-button-item-danger`]: action.danger
|
|
61
|
-
})
|
|
57
|
+
}
|
|
62
58
|
}, React.createElement("div", {
|
|
63
59
|
className: `${classPrefix}-button-item-name`
|
|
64
60
|
}, action.text), action.description && React.createElement("div", {
|
|
@@ -67,11 +63,8 @@ export const ActionSheet = p => {
|
|
|
67
63
|
className: `${classPrefix}-cancel`
|
|
68
64
|
}, React.createElement("div", {
|
|
69
65
|
className: `${classPrefix}-button-item-wrapper`
|
|
70
|
-
}, React.createElement(
|
|
71
|
-
|
|
72
|
-
fill: 'none',
|
|
73
|
-
shape: 'rectangular',
|
|
74
|
-
className: `${classPrefix}-button-item`,
|
|
66
|
+
}, React.createElement("a", {
|
|
67
|
+
className: classNames('adm-plain-anchor', `${classPrefix}-button-item`),
|
|
75
68
|
onClick: () => {
|
|
76
69
|
var _a;
|
|
77
70
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
-
export declare const dot:
|
|
3
|
+
export declare const dot: JSX.Element;
|
|
4
4
|
export declare type BadgeProps = {
|
|
5
5
|
content?: React.ReactNode | typeof dot;
|
|
6
6
|
color?: string;
|
|
@@ -2,7 +2,7 @@ import classNames from 'classnames';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
4
|
const classPrefix = `adm-badge`;
|
|
5
|
-
export const dot =
|
|
5
|
+
export const dot = React.createElement(React.Fragment, null);
|
|
6
6
|
export const Badge = props => {
|
|
7
7
|
const {
|
|
8
8
|
content,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
declare type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
3
4
|
export declare type ButtonProps = {
|
|
4
5
|
color?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
5
6
|
fill?: 'solid' | 'outline' | 'none';
|
|
@@ -9,11 +10,11 @@ export declare type ButtonProps = {
|
|
|
9
10
|
loadingText?: string;
|
|
10
11
|
loadingIcon?: React.ReactNode;
|
|
11
12
|
disabled?: boolean;
|
|
12
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void> | unknown;
|
|
13
14
|
type?: 'submit' | 'reset' | 'button';
|
|
14
15
|
shape?: 'default' | 'rounded' | 'rectangular';
|
|
15
16
|
children?: React.ReactNode;
|
|
16
|
-
} & NativeProps<'--text-color' | '--background-color' | '--border-radius' | '--border-width' | '--border-style' | '--border-color'>;
|
|
17
|
+
} & Pick<NativeButtonProps, 'onMouseDown' | 'onMouseUp' | 'onTouchStart' | 'onTouchEnd'> & NativeProps<'--text-color' | '--background-color' | '--border-radius' | '--border-width' | '--border-style' | '--border-color'>;
|
|
17
18
|
export declare type ButtonRef = {
|
|
18
19
|
nativeElement: HTMLButtonElement | null;
|
|
19
20
|
};
|
|
@@ -26,8 +27,9 @@ export declare const Button: React.ForwardRefExoticComponent<{
|
|
|
26
27
|
loadingText?: string | undefined;
|
|
27
28
|
loadingIcon?: React.ReactNode;
|
|
28
29
|
disabled?: boolean | undefined;
|
|
29
|
-
onClick?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void>) | undefined;
|
|
30
|
+
onClick?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void> | unknown) | undefined;
|
|
30
31
|
type?: "reset" | "submit" | "button" | undefined;
|
|
31
32
|
shape?: "default" | "rounded" | "rectangular" | undefined;
|
|
32
33
|
children?: React.ReactNode;
|
|
33
|
-
} & NativeProps<"--
|
|
34
|
+
} & Pick<NativeButtonProps, "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & NativeProps<"--border-radius" | "--text-color" | "--background-color" | "--border-width" | "--border-style" | "--border-color"> & React.RefAttributes<ButtonRef>>;
|
|
35
|
+
export {};
|
|
@@ -61,7 +61,11 @@ export const Button = forwardRef((p, ref) => {
|
|
|
61
61
|
[`${classPrefix}-large`]: props.size === 'large',
|
|
62
62
|
[`${classPrefix}-loading`]: loading
|
|
63
63
|
}, `${classPrefix}-shape-${props.shape}`),
|
|
64
|
-
disabled: disabled
|
|
64
|
+
disabled: disabled,
|
|
65
|
+
onMouseDown: props.onMouseDown,
|
|
66
|
+
onMouseUp: props.onMouseUp,
|
|
67
|
+
onTouchStart: props.onTouchStart,
|
|
68
|
+
onTouchEnd: props.onTouchEnd
|
|
65
69
|
}, loading ? React.createElement("div", {
|
|
66
70
|
className: `${classPrefix}-loading-wrapper`
|
|
67
71
|
}, props.loadingIcon, props.loadingText) : props.children));
|
|
@@ -86,6 +86,10 @@
|
|
|
86
86
|
border-bottom-right-radius: 8px;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
.adm-calendar-cell.adm-calendar-cell-disabled.adm-calendar-cell.adm-calendar-cell-selected {
|
|
90
|
+
color: var(--adm-color-light);
|
|
91
|
+
}
|
|
92
|
+
|
|
89
93
|
.adm-calendar-cell .adm-calendar-cell-top {
|
|
90
94
|
flex: none;
|
|
91
95
|
font-size: 36px;
|
|
@@ -125,10 +125,10 @@ export const Calendar = forwardRef((p, ref) => {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
const inThisMonth = d.month() === current.month();
|
|
128
|
-
const disabled =
|
|
128
|
+
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, 'day') || minDay && d.isBefore(minDay, 'day');
|
|
129
129
|
cells.push(React.createElement("div", {
|
|
130
130
|
key: d.valueOf(),
|
|
131
|
-
className: classNames(`${classPrefix}-cell`, disabled && `${classPrefix}-cell-disabled`, inThisMonth && {
|
|
131
|
+
className: classNames(`${classPrefix}-cell`, (disabled || !inThisMonth) && `${classPrefix}-cell-disabled`, inThisMonth && {
|
|
132
132
|
[`${classPrefix}-cell-today`]: d.isSame(today, 'day'),
|
|
133
133
|
[`${classPrefix}-cell-selected`]: isSelect,
|
|
134
134
|
[`${classPrefix}-cell-selected-begin`]: isBegin,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
import type { MaskProps } from '../mask';
|
|
2
3
|
import { Action } from './dialog-action-button';
|
|
3
4
|
import { GetContainer } from '../../utils/render-to-container';
|
|
4
5
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
@@ -19,9 +20,11 @@ export declare type DialogProps = {
|
|
|
19
20
|
getContainer?: GetContainer;
|
|
20
21
|
bodyStyle?: React.CSSProperties;
|
|
21
22
|
bodyClassName?: string;
|
|
22
|
-
maskStyle?:
|
|
23
|
+
maskStyle?: MaskProps['style'];
|
|
23
24
|
maskClassName?: string;
|
|
24
25
|
stopPropagation?: PropagationEvent[];
|
|
25
26
|
disableBodyScroll?: boolean;
|
|
27
|
+
destroyOnClose?: boolean;
|
|
28
|
+
forceRender?: boolean;
|
|
26
29
|
} & NativeProps;
|
|
27
30
|
export declare const Dialog: FC<DialogProps>;
|
|
@@ -2,7 +2,7 @@ import { __awaiter } from "tslib";
|
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { mergeProps } from '../../utils/with-default-props';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { useUnmountedRef } from 'ahooks';
|
|
5
|
+
import { useIsomorphicLayoutEffect, useUnmountedRef } from 'ahooks';
|
|
6
6
|
import Mask from '../mask';
|
|
7
7
|
import { DialogActionButton } from './dialog-action-button';
|
|
8
8
|
import Image from '../image';
|
|
@@ -11,6 +11,8 @@ import { withStopPropagation } from '../../utils/with-stop-propagation';
|
|
|
11
11
|
import AutoCenter from '../auto-center';
|
|
12
12
|
import { useSpring, animated } from '@react-spring/web';
|
|
13
13
|
import { withNativeProps } from '../../utils/native-props';
|
|
14
|
+
import { ShouldRender } from '../../utils/should-render';
|
|
15
|
+
import { useInnerVisible } from '../../utils/use-inner-visible';
|
|
14
16
|
const defaultProps = {
|
|
15
17
|
visible: false,
|
|
16
18
|
actions: [],
|
|
@@ -18,7 +20,9 @@ const defaultProps = {
|
|
|
18
20
|
closeOnMaskClick: false,
|
|
19
21
|
stopPropagation: ['click'],
|
|
20
22
|
getContainer: null,
|
|
21
|
-
disableBodyScroll: true
|
|
23
|
+
disableBodyScroll: true,
|
|
24
|
+
destroyOnClose: false,
|
|
25
|
+
forceRender: false
|
|
22
26
|
};
|
|
23
27
|
export const Dialog = p => {
|
|
24
28
|
const props = mergeProps(defaultProps, p);
|
|
@@ -32,9 +36,6 @@ export const Dialog = p => {
|
|
|
32
36
|
friction: 25,
|
|
33
37
|
clamp: true
|
|
34
38
|
},
|
|
35
|
-
onStart: () => {
|
|
36
|
-
setActive(true);
|
|
37
|
-
},
|
|
38
39
|
onRest: () => {
|
|
39
40
|
var _a, _b;
|
|
40
41
|
|
|
@@ -49,6 +50,12 @@ export const Dialog = p => {
|
|
|
49
50
|
}
|
|
50
51
|
});
|
|
51
52
|
const [active, setActive] = useState(props.visible);
|
|
53
|
+
useIsomorphicLayoutEffect(() => {
|
|
54
|
+
if (props.visible) {
|
|
55
|
+
setActive(true);
|
|
56
|
+
}
|
|
57
|
+
}, [props.visible]);
|
|
58
|
+
const maskVisible = useInnerVisible(active && props.visible);
|
|
52
59
|
const body = React.createElement("div", {
|
|
53
60
|
className: classNames(cls('body'), props.image && cls('with-image'), props.bodyClassName),
|
|
54
61
|
style: props.bodyStyle
|
|
@@ -85,26 +92,28 @@ export const Dialog = p => {
|
|
|
85
92
|
})
|
|
86
93
|
})));
|
|
87
94
|
})));
|
|
88
|
-
const node = withNativeProps(props, React.createElement("div", {
|
|
95
|
+
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React.createElement("div", {
|
|
89
96
|
className: cls(),
|
|
90
97
|
style: {
|
|
91
|
-
display: active ? undefined : 'none'
|
|
98
|
+
display: active ? undefined : 'none',
|
|
99
|
+
pointerEvents: active ? undefined : 'none'
|
|
92
100
|
}
|
|
93
101
|
}, React.createElement(Mask, {
|
|
94
|
-
visible:
|
|
102
|
+
visible: maskVisible,
|
|
95
103
|
onMaskClick: props.closeOnMaskClick ? props.onClose : undefined,
|
|
96
104
|
style: props.maskStyle,
|
|
97
105
|
className: classNames(cls('mask'), props.maskClassName),
|
|
98
106
|
disableBodyScroll: props.disableBodyScroll
|
|
99
107
|
}), React.createElement("div", {
|
|
100
|
-
className: cls('wrap')
|
|
101
|
-
style: {
|
|
102
|
-
pointerEvents: props.visible ? undefined : 'none'
|
|
103
|
-
}
|
|
108
|
+
className: cls('wrap')
|
|
104
109
|
}, React.createElement(animated.div, {
|
|
105
110
|
style: style
|
|
106
|
-
}, body))));
|
|
107
|
-
return
|
|
111
|
+
}, body)))));
|
|
112
|
+
return React.createElement(ShouldRender, {
|
|
113
|
+
active: active,
|
|
114
|
+
forceRender: props.forceRender,
|
|
115
|
+
destroyOnClose: props.destroyOnClose
|
|
116
|
+
}, renderToContainer(props.getContainer, node));
|
|
108
117
|
};
|
|
109
118
|
|
|
110
119
|
function cls(name = '') {
|
|
@@ -228,10 +228,7 @@ export const FormItem = props => {
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
let Variables = {};
|
|
231
|
-
|
|
232
|
-
if (typeof label === 'string') {
|
|
233
|
-
Variables.label = label;
|
|
234
|
-
}
|
|
231
|
+
Variables.label = typeof label === 'string' ? label : '';
|
|
235
232
|
|
|
236
233
|
if (messageVariables) {
|
|
237
234
|
Variables = Object.assign(Object.assign({}, Variables), messageVariables);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BrokenImageIcon: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const BrokenImageIcon = () => React.createElement("svg", {
|
|
3
|
+
viewBox: '0 0 48 48',
|
|
4
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
|
5
|
+
}, React.createElement("path", {
|
|
6
|
+
d: 'M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z',
|
|
7
|
+
fill: '#DBDBDB',
|
|
8
|
+
fillRule: 'nonzero'
|
|
9
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImageIcon: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const ImageIcon = () => React.createElement("svg", {
|
|
3
|
+
viewBox: '0 0 48 48',
|
|
4
|
+
xmlns: 'http://www.w3.org/2000/svg'
|
|
5
|
+
}, React.createElement("path", {
|
|
6
|
+
d: 'M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z',
|
|
7
|
+
fill: '#DBDBDB',
|
|
8
|
+
fillRule: 'nonzero'
|
|
9
|
+
}));
|
|
@@ -14,13 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
.adm-image-tip {
|
|
16
16
|
position: relative;
|
|
17
|
-
background-color: #
|
|
17
|
+
background-color: #f5f5f5;
|
|
18
18
|
height: 100%;
|
|
19
19
|
min-height: 48px;
|
|
20
20
|
min-width: 48px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.adm-image-tip >
|
|
23
|
+
.adm-image-tip > svg {
|
|
24
|
+
width: 48px;
|
|
25
|
+
height: 48px;
|
|
24
26
|
position: absolute;
|
|
25
27
|
left: 50%;
|
|
26
28
|
top: 50%;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type ImageProps = {
|
|
4
|
-
src
|
|
4
|
+
src?: string;
|
|
5
5
|
alt?: string;
|
|
6
6
|
width?: number | string;
|
|
7
7
|
height?: number | string;
|
|
@@ -9,6 +9,7 @@ export declare type ImageProps = {
|
|
|
9
9
|
placeholder?: ReactNode;
|
|
10
10
|
fallback?: ReactNode;
|
|
11
11
|
lazy?: boolean;
|
|
12
|
+
draggable?: boolean;
|
|
12
13
|
onClick?: (event: React.MouseEvent<HTMLImageElement, Event>) => void;
|
|
13
14
|
onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
14
15
|
onLoad?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { mergeProps } from '../../utils/with-default-props';
|
|
2
2
|
import React, { useState, useRef } from 'react';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
|
-
import { PictureOutline, PictureWrongOutline } from 'antd-mobile-icons';
|
|
5
4
|
import { staged } from 'staged-components';
|
|
6
5
|
import { toCSSLength } from '../../utils/to-css-length';
|
|
7
6
|
import { LazyDetector } from './lazy-detector';
|
|
8
7
|
import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-update-layout-effect';
|
|
8
|
+
import { ImageIcon } from './image-icon';
|
|
9
|
+
import { BrokenImageIcon } from './broken-image-icon';
|
|
9
10
|
const classPrefix = `adm-image`;
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
fit: 'fill',
|
|
12
13
|
placeholder: React.createElement("div", {
|
|
13
14
|
className: `${classPrefix}-tip`
|
|
14
|
-
}, React.createElement(
|
|
15
|
+
}, React.createElement(ImageIcon, null)),
|
|
15
16
|
fallback: React.createElement("div", {
|
|
16
17
|
className: `${classPrefix}-tip`
|
|
17
|
-
}, React.createElement(
|
|
18
|
-
lazy: false
|
|
18
|
+
}, React.createElement(BrokenImageIcon, null)),
|
|
19
|
+
lazy: false,
|
|
20
|
+
draggable: false
|
|
19
21
|
};
|
|
20
22
|
export const Image = staged(p => {
|
|
21
23
|
const props = mergeProps(defaultProps, p);
|
|
@@ -64,7 +66,8 @@ export const Image = staged(p => {
|
|
|
64
66
|
referrerPolicy: props.referrerPolicy,
|
|
65
67
|
sizes: props.sizes,
|
|
66
68
|
srcSet: srcSet,
|
|
67
|
-
useMap: props.useMap
|
|
69
|
+
useMap: props.useMap,
|
|
70
|
+
draggable: props.draggable
|
|
68
71
|
});
|
|
69
72
|
return React.createElement(React.Fragment, null, !loaded && props.placeholder, img);
|
|
70
73
|
}
|