@titaui/pc 1.10.26 → 1.10.27
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/lib/components/toast/index.js +10 -19
- package/package.json +1 -1
|
@@ -47,8 +47,8 @@ function _getInstance() {
|
|
|
47
47
|
style: {
|
|
48
48
|
top: "36px",
|
|
49
49
|
left: "50%",
|
|
50
|
-
position: "
|
|
51
|
-
// 'transform': 'translate(-50%, 0)'
|
|
50
|
+
position: "fixed",
|
|
51
|
+
// 'transform': 'translate(-50%, 0)',
|
|
52
52
|
borderRadius: 12
|
|
53
53
|
},
|
|
54
54
|
maxCount: 1,
|
|
@@ -80,26 +80,17 @@ var Toast = /*#__PURE__*/function () {
|
|
|
80
80
|
_createClass(Toast, null, [{
|
|
81
81
|
key: "Success",
|
|
82
82
|
value: function () {
|
|
83
|
-
var _Success = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(msg) {
|
|
84
|
-
var
|
|
85
|
-
key,
|
|
86
|
-
ins,
|
|
87
|
-
canClose,
|
|
88
|
-
_args = arguments;
|
|
83
|
+
var _Success = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(msg, options) {
|
|
84
|
+
var key, ins, canClose;
|
|
89
85
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
90
86
|
while (1) {
|
|
91
87
|
switch (_context.prev = _context.next) {
|
|
92
88
|
case 0:
|
|
93
|
-
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {
|
|
94
|
-
style: {
|
|
95
|
-
position: "fixed"
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
89
|
key = (0, _uuid["default"])();
|
|
99
|
-
_context.next =
|
|
90
|
+
_context.next = 3;
|
|
100
91
|
return getInstance();
|
|
101
92
|
|
|
102
|
-
case
|
|
93
|
+
case 3:
|
|
103
94
|
ins = _context.sent;
|
|
104
95
|
canClose = options.canClose !== undefined ? options.canClose : false;
|
|
105
96
|
ins.notice({
|
|
@@ -109,7 +100,7 @@ var Toast = /*#__PURE__*/function () {
|
|
|
109
100
|
key: key
|
|
110
101
|
});
|
|
111
102
|
|
|
112
|
-
case
|
|
103
|
+
case 6:
|
|
113
104
|
case "end":
|
|
114
105
|
return _context.stop();
|
|
115
106
|
}
|
|
@@ -117,7 +108,7 @@ var Toast = /*#__PURE__*/function () {
|
|
|
117
108
|
}, _callee);
|
|
118
109
|
}));
|
|
119
110
|
|
|
120
|
-
function Success(_x) {
|
|
111
|
+
function Success(_x, _x2) {
|
|
121
112
|
return _Success.apply(this, arguments);
|
|
122
113
|
}
|
|
123
114
|
|
|
@@ -163,7 +154,7 @@ var Toast = /*#__PURE__*/function () {
|
|
|
163
154
|
}, _callee2);
|
|
164
155
|
}));
|
|
165
156
|
|
|
166
|
-
function Warning(
|
|
157
|
+
function Warning(_x3) {
|
|
167
158
|
return _Warning.apply(this, arguments);
|
|
168
159
|
}
|
|
169
160
|
|
|
@@ -207,7 +198,7 @@ var Toast = /*#__PURE__*/function () {
|
|
|
207
198
|
}, _callee3);
|
|
208
199
|
}));
|
|
209
200
|
|
|
210
|
-
function Error(
|
|
201
|
+
function Error(_x4) {
|
|
211
202
|
return _Error.apply(this, arguments);
|
|
212
203
|
}
|
|
213
204
|
|