aaa-ui-test 1.0.1

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.

Potentially problematic release.


This version of aaa-ui-test might be problematic. Click here for more details.

Files changed (189) hide show
  1. package/README.md +62 -0
  2. package/babel-plugin-on-demand-load/index.js +74 -0
  3. package/babel-plugin-on-demand-load/report.js +49 -0
  4. package/lib/address/index.js +19 -0
  5. package/lib/address/src/address.js +340 -0
  6. package/lib/amount/index.js +19 -0
  7. package/lib/amount/src/amount.js +206 -0
  8. package/lib/button/index.js +19 -0
  9. package/lib/button/src/button.js +75 -0
  10. package/lib/button-group/index.js +19 -0
  11. package/lib/button-group/src/button-group.js +53 -0
  12. package/lib/checkbox/index.js +22 -0
  13. package/lib/checkbox/src/checkbox-group.js +85 -0
  14. package/lib/checkbox/src/checkbox.js +228 -0
  15. package/lib/components/address/index.js +19 -0
  16. package/lib/components/amount/index.js +19 -0
  17. package/lib/components/button/index.js +19 -0
  18. package/lib/components/button-group/index.js +19 -0
  19. package/lib/components/checkbox/index.js +22 -0
  20. package/lib/components/date-selecter/index.js +19 -0
  21. package/lib/components/default/index.js +19 -0
  22. package/lib/components/dialog/index.js +204 -0
  23. package/lib/components/field/index.js +19 -0
  24. package/lib/components/input/index.js +19 -0
  25. package/lib/components/list/index.js +19 -0
  26. package/lib/components/list-item/index.js +19 -0
  27. package/lib/components/loading/index.js +116 -0
  28. package/lib/components/mask/index.js +19 -0
  29. package/lib/components/notice/index.js +19 -0
  30. package/lib/components/overlay/index.js +19 -0
  31. package/lib/components/picker/index.js +19 -0
  32. package/lib/components/popup/index.js +19 -0
  33. package/lib/components/popup-header/index.js +19 -0
  34. package/lib/components/radio/index.js +19 -0
  35. package/lib/components/select/index.js +19 -0
  36. package/lib/components/swiper/index.js +19 -0
  37. package/lib/components/switch/index.js +19 -0
  38. package/lib/components/tabs/index.js +22 -0
  39. package/lib/components/textarea/index.js +19 -0
  40. package/lib/components/toast/index.js +60 -0
  41. package/lib/date-selecter/index.js +19 -0
  42. package/lib/date-selecter/src/dateselecter.js +544 -0
  43. package/lib/default/index.js +19 -0
  44. package/lib/default/src/default.js +61 -0
  45. package/lib/dialog/index.js +204 -0
  46. package/lib/dialog/src/dialog.js +258 -0
  47. package/lib/field/index.js +19 -0
  48. package/lib/field/src/field.js +91 -0
  49. package/lib/index.css +2213 -0
  50. package/lib/index.js +10083 -0
  51. package/lib/input/index.js +19 -0
  52. package/lib/input/src/input.js +365 -0
  53. package/lib/list/index.js +19 -0
  54. package/lib/list/src/list.js +54 -0
  55. package/lib/list-item/index.js +19 -0
  56. package/lib/list-item/src/list-item.js +122 -0
  57. package/lib/loading/index.js +116 -0
  58. package/lib/loading/src/loading.js +80 -0
  59. package/lib/mask/index.js +19 -0
  60. package/lib/mask/src/mask.js +94 -0
  61. package/lib/mixins/emitter.js +43 -0
  62. package/lib/mixins/visible.js +29 -0
  63. package/lib/notice/index.js +19 -0
  64. package/lib/notice/src/notice.js +188 -0
  65. package/lib/overlay/index.js +19 -0
  66. package/lib/overlay/src/overlay.js +153 -0
  67. package/lib/picker/index.js +19 -0
  68. package/lib/picker/src/picker.js +218 -0
  69. package/lib/popup/index.js +19 -0
  70. package/lib/popup/src/popup.js +170 -0
  71. package/lib/popup-header/index.js +19 -0
  72. package/lib/popup-header/src/popup-header.js +93 -0
  73. package/lib/radio/index.js +19 -0
  74. package/lib/radio/src/radio.js +102 -0
  75. package/lib/select/index.js +19 -0
  76. package/lib/select/src/select.js +136 -0
  77. package/lib/swiper/index.js +19 -0
  78. package/lib/swiper/src/swiper.js +270 -0
  79. package/lib/switch/index.js +19 -0
  80. package/lib/switch/src/switch.js +143 -0
  81. package/lib/tabs/index.js +22 -0
  82. package/lib/tabs/src/tab-item.js +72 -0
  83. package/lib/tabs/src/tabs.js +171 -0
  84. package/lib/textarea/index.js +19 -0
  85. package/lib/textarea/src/textarea.js +219 -0
  86. package/lib/toast/index.js +60 -0
  87. package/lib/toast/src/toast.js +59 -0
  88. package/lib/utils/clickoutside.js +45 -0
  89. package/lib/utils/fix-body.js +57 -0
  90. package/lib/utils/utils.js +74 -0
  91. package/package.json +73 -0
  92. package/src/assets/css/common/_mixin.scss +130 -0
  93. package/src/assets/css/common/_var.scss +69 -0
  94. package/src/components/address/index.js +8 -0
  95. package/src/components/address/index.scss +72 -0
  96. package/src/components/address/src/address.vue +238 -0
  97. package/src/components/amount/index.js +6 -0
  98. package/src/components/amount/index.scss +88 -0
  99. package/src/components/amount/src/amount.vue +143 -0
  100. package/src/components/button/__tests__/__snapshots__/index.test.js.snap +7 -0
  101. package/src/components/button/__tests__/index.test.js +39 -0
  102. package/src/components/button/index.js +7 -0
  103. package/src/components/button/index.scss +83 -0
  104. package/src/components/button/src/button.vue +39 -0
  105. package/src/components/button-group/index.js +8 -0
  106. package/src/components/button-group/index.scss +37 -0
  107. package/src/components/button-group/src/button-group.vue +21 -0
  108. package/src/components/checkbox/index.js +8 -0
  109. package/src/components/checkbox/index.scss +47 -0
  110. package/src/components/checkbox/src/checkbox-group.vue +53 -0
  111. package/src/components/checkbox/src/checkbox.vue +153 -0
  112. package/src/components/date-selecter/index.js +6 -0
  113. package/src/components/date-selecter/index.scss +190 -0
  114. package/src/components/date-selecter/src/dateselecter.vue +387 -0
  115. package/src/components/default/index.js +6 -0
  116. package/src/components/default/index.scss +25 -0
  117. package/src/components/default/src/default.vue +23 -0
  118. package/src/components/dialog/index.js +146 -0
  119. package/src/components/dialog/index.scss +250 -0
  120. package/src/components/dialog/src/dialog.vue +153 -0
  121. package/src/components/field/index.js +8 -0
  122. package/src/components/field/index.scss +93 -0
  123. package/src/components/field/src/field.vue +57 -0
  124. package/src/components/input/__tests__/__snapshots__/index.test.js.snap +10 -0
  125. package/src/components/input/__tests__/index.test.js +63 -0
  126. package/src/components/input/index.js +8 -0
  127. package/src/components/input/index.scss +91 -0
  128. package/src/components/input/src/input.vue +214 -0
  129. package/src/components/list/index.js +8 -0
  130. package/src/components/list/index.scss +21 -0
  131. package/src/components/list/src/list.vue +16 -0
  132. package/src/components/list-item/index.js +8 -0
  133. package/src/components/list-item/index.scss +126 -0
  134. package/src/components/list-item/src/list-item.vue +59 -0
  135. package/src/components/loading/__tests__/__snapshots__/index.test.js.snap +9 -0
  136. package/src/components/loading/__tests__/index.test.js +30 -0
  137. package/src/components/loading/index.js +128 -0
  138. package/src/components/loading/index.scss +33 -0
  139. package/src/components/loading/src/loading.vue +23 -0
  140. package/src/components/mask/index.js +9 -0
  141. package/src/components/mask/index.scss +16 -0
  142. package/src/components/mask/src/mask.vue +52 -0
  143. package/src/components/notice/index.js +6 -0
  144. package/src/components/notice/index.scss +81 -0
  145. package/src/components/notice/src/notice.vue +128 -0
  146. package/src/components/overlay/index.js +8 -0
  147. package/src/components/overlay/index.scss +119 -0
  148. package/src/components/overlay/src/overlay.vue +72 -0
  149. package/src/components/picker/index.js +7 -0
  150. package/src/components/picker/index.scss +49 -0
  151. package/src/components/picker/src/picker.vue +205 -0
  152. package/src/components/popup/index.js +8 -0
  153. package/src/components/popup/index.scss +79 -0
  154. package/src/components/popup/src/popup.vue +88 -0
  155. package/src/components/popup-header/index.js +8 -0
  156. package/src/components/popup-header/index.scss +45 -0
  157. package/src/components/popup-header/src/popup-header.vue +41 -0
  158. package/src/components/radio/index.js +8 -0
  159. package/src/components/radio/index.scss +19 -0
  160. package/src/components/radio/src/radio.vue +51 -0
  161. package/src/components/select/index.js +8 -0
  162. package/src/components/select/index.scss +51 -0
  163. package/src/components/select/src/select.vue +86 -0
  164. package/src/components/swiper/index.js +6 -0
  165. package/src/components/swiper/index.scss +49 -0
  166. package/src/components/swiper/src/swiper.vue +211 -0
  167. package/src/components/switch/__tests__/__snapshots__/index.test.js.snap +15 -0
  168. package/src/components/switch/__tests__/index.test.js +44 -0
  169. package/src/components/switch/index.js +8 -0
  170. package/src/components/switch/index.scss +85 -0
  171. package/src/components/switch/src/switch.vue +60 -0
  172. package/src/components/tabs/index.js +8 -0
  173. package/src/components/tabs/index.scss +73 -0
  174. package/src/components/tabs/src/tab-item.vue +40 -0
  175. package/src/components/tabs/src/tabs.vue +121 -0
  176. package/src/components/textarea/index.js +8 -0
  177. package/src/components/textarea/index.scss +41 -0
  178. package/src/components/textarea/src/textarea.vue +140 -0
  179. package/src/components/toast/__tests__/__snapshots__/index.test.js.snap +3 -0
  180. package/src/components/toast/__tests__/index.test.js +25 -0
  181. package/src/components/toast/index.js +53 -0
  182. package/src/components/toast/index.scss +102 -0
  183. package/src/components/toast/src/toast.vue +19 -0
  184. package/src/index.js +87 -0
  185. package/src/mixins/emitter.js +33 -0
  186. package/src/mixins/visible.js +23 -0
  187. package/src/utils/clickoutside.js +42 -0
  188. package/src/utils/fix-body.js +46 -0
  189. package/src/utils/utils.js +71 -0
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _input = _interopRequireDefault(require("./src/input"));
11
+
12
+ require("./index.css");
13
+
14
+ _input.default.install = function (Vue) {
15
+ Vue.component(_input.default.name, _input.default);
16
+ };
17
+
18
+ var _default = _input.default;
19
+ exports.default = _default;
@@ -0,0 +1,365 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _field = _interopRequireDefault(require("../../field"));
13
+
14
+ //
15
+ //
16
+ //
17
+ //
18
+ //
19
+ //
20
+ //
21
+ //
22
+ //
23
+ //
24
+ //
25
+ //
26
+ //
27
+ //
28
+ //
29
+ //
30
+ //
31
+ //
32
+ //
33
+ //
34
+ //
35
+ //
36
+ //
37
+ //
38
+ //
39
+ //
40
+ //
41
+ //
42
+ //
43
+ //
44
+ //
45
+ //
46
+ //
47
+ //
48
+ //
49
+ //
50
+ //
51
+ //
52
+ //
53
+ // fix problem when page in pc mode clearicon click event trigger after input blur event
54
+ //import Clickoutside from '../../utils/clickoutside';
55
+ var __script__ = {
56
+ name: "JddInput",
57
+ inheritAttrs: false,
58
+ props: {
59
+ direction: {
60
+ type: String,
61
+ default: "row"
62
+ },
63
+ title: {
64
+ type: String,
65
+ default: ""
66
+ },
67
+ value: {
68
+ type: String,
69
+ default: ""
70
+ },
71
+ border: {
72
+ type: String,
73
+ default: ""
74
+ },
75
+ placeholder: {
76
+ type: String,
77
+ default: ""
78
+ },
79
+ validateOption: {
80
+ type: Object,
81
+ default: function _default() {
82
+ return {
83
+ type: "",
84
+ errorText: "",
85
+ pattern: ""
86
+ };
87
+ }
88
+ }
89
+ },
90
+ // directives: {
91
+ // Clickoutside
92
+ // },
93
+ components: {
94
+ jddField: _field.default
95
+ },
96
+ data: function data() {
97
+ return {
98
+ label: this.title,
99
+ currentVal: this.value,
100
+ isFocus: false,
101
+ pattern: "",
102
+ validateStatus: true,
103
+ // placeholderText: this.placeholder,
104
+ disabled: this.$attrs.readonly || this.$attrs.disabled
105
+ };
106
+ },
107
+ created: function created() {
108
+ // if(this.value){
109
+ // this.isFocus = true;
110
+ // }
111
+ if (this.validateOption.pattern) {
112
+ this.pattern = this.validateOption.pattern;
113
+ } else {
114
+ switch (this.validateOption.type) {
115
+ case "mobile":
116
+ this.pattern = /^1\d{10}$/;
117
+ break;
118
+
119
+ case "email":
120
+ this.pattern = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
121
+ break;
122
+
123
+ default:
124
+ break;
125
+ }
126
+ }
127
+ },
128
+ methods: {
129
+ onLabelclick: function onLabelclick() {
130
+ if (!this.disabled) {
131
+ this.isFocus = true;
132
+ this.$refs.input.focus();
133
+ }
134
+ },
135
+ validate: function validate() {
136
+ if (this.validateOption.type === "mobile" || this.validateOption.type === "email") {
137
+ if (this.pattern.test(this.currentVal)) {
138
+ this.label = this.title;
139
+ this.validateStatus = true;
140
+ } else {
141
+ this.label = this.validateOption.errorText;
142
+ this.validateStatus = false;
143
+ }
144
+ }
145
+ },
146
+ // inputResetValidate() {
147
+ // if (this.validateOption.type === "mobile") {
148
+ // if (this.pattern.test(this.currentVal)) {
149
+ // this.validateStatus = false;
150
+ // this.placeholderText = this.placeholder;
151
+ // }
152
+ // }
153
+ // },
154
+ // focus() {
155
+ // //console.log(1)
156
+ // this.isFocus = true;
157
+ // this.active = true;
158
+ // //var _this = this;
159
+ // this.$res.input.focus();
160
+ // },
161
+ cleanVal: function cleanVal() {
162
+ this.currentVal = ""; //this.formDom.focus();
163
+
164
+ this.$refs.input.focus();
165
+ this.$emit("input");
166
+ this.$emit("on-clean-value");
167
+ },
168
+ onFocus: function onFocus() {
169
+ this.isFocus = true; //this.active = true;
170
+ },
171
+ onBlur: function onBlur() {
172
+ if (this.isFocus) this.validate(); // if (
173
+ // (!this.currentVal && this.direction === "column") ||
174
+ // this.direction === "row"
175
+ // )
176
+
177
+ this.isFocus = false; //this.active = false;
178
+ },
179
+ onChange: function onChange() {
180
+ this.validate();
181
+ },
182
+ onInput: function onInput() {
183
+ if (!this.validateStatus) this.validate();
184
+ this.$emit("input", this.currentVal); // if (this.validateOption.type) this.inputResetValidate();
185
+ }
186
+ },
187
+ computed: {
188
+ isInputFocus: function isInputFocus() {
189
+ return this.isFocus || this.currentVal;
190
+ },
191
+ getPlaceholder: function getPlaceholder() {
192
+ return this.direction !== "column" && this.placeholder;
193
+ },
194
+ showClear: function showClear() {
195
+ return this.currentVal && !this.disabled && this.isFocus;
196
+ },
197
+ getFocus: function getFocus() {
198
+ return this.isFocus || this.currentVal !== '';
199
+ }
200
+ },
201
+ watch: {
202
+ value: function value(newVal) {
203
+ if (newVal) {
204
+ this.isFocus = true;
205
+ }
206
+
207
+ this.currentVal = newVal;
208
+ },
209
+ currentVal: function currentVal(newVal) {
210
+ this.$emit("input", newVal);
211
+ }
212
+ },
213
+ mounted: function mounted() {
214
+ this.formDom = this.$el.querySelector("input");
215
+ }
216
+ };
217
+
218
+ var render = function render() {
219
+ var _vm = this;
220
+
221
+ var _h = _vm.$createElement;
222
+
223
+ var _c = _vm._self._c || _h;
224
+
225
+ return _c('jdd-field', {
226
+ attrs: {
227
+ "label": _vm.label,
228
+ "state": _vm.validateStatus,
229
+ "isFocus": _vm.getFocus,
230
+ "direction": _vm.direction,
231
+ "border": _vm.border
232
+ },
233
+ on: {
234
+ "label-click": _vm.onLabelclick
235
+ }
236
+ }, [_c('div', {
237
+ staticClass: "jdd-field-control jdd-field-input",
238
+ class: {
239
+ 'jdd-field-input-with-icon': _vm.$slots.icon
240
+ }
241
+ }, [_vm.$attrs.type === 'checkbox' ? _c('input', _vm._b({
242
+ directives: [{
243
+ name: "model",
244
+ rawName: "v-model",
245
+ value: _vm.currentVal,
246
+ expression: "currentVal"
247
+ }],
248
+ ref: "input",
249
+ class: {
250
+ 'jdd-field-disable': _vm.$attrs.readonly
251
+ },
252
+ attrs: {
253
+ "placeholder": _vm.getPlaceholder,
254
+ "type": "checkbox"
255
+ },
256
+ domProps: {
257
+ "checked": Array.isArray(_vm.currentVal) ? _vm._i(_vm.currentVal, null) > -1 : _vm.currentVal
258
+ },
259
+ on: {
260
+ "input": _vm.onInput,
261
+ "focus": _vm.onFocus,
262
+ "blur": _vm.onBlur,
263
+ "change": [function ($event) {
264
+ var $$a = _vm.currentVal,
265
+ $$el = $event.target,
266
+ $$c = $$el.checked ? true : false;
267
+
268
+ if (Array.isArray($$a)) {
269
+ var $$v = null,
270
+ $$i = _vm._i($$a, $$v);
271
+
272
+ if ($$el.checked) {
273
+ $$i < 0 && (_vm.currentVal = $$a.concat([$$v]));
274
+ } else {
275
+ $$i > -1 && (_vm.currentVal = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
276
+ }
277
+ } else {
278
+ _vm.currentVal = $$c;
279
+ }
280
+ }, _vm.onChange]
281
+ }
282
+ }, 'input', _vm.$attrs, false)) : _vm.$attrs.type === 'radio' ? _c('input', _vm._b({
283
+ directives: [{
284
+ name: "model",
285
+ rawName: "v-model",
286
+ value: _vm.currentVal,
287
+ expression: "currentVal"
288
+ }],
289
+ ref: "input",
290
+ class: {
291
+ 'jdd-field-disable': _vm.$attrs.readonly
292
+ },
293
+ attrs: {
294
+ "placeholder": _vm.getPlaceholder,
295
+ "type": "radio"
296
+ },
297
+ domProps: {
298
+ "checked": _vm._q(_vm.currentVal, null)
299
+ },
300
+ on: {
301
+ "input": _vm.onInput,
302
+ "focus": _vm.onFocus,
303
+ "blur": _vm.onBlur,
304
+ "change": [function ($event) {
305
+ _vm.currentVal = null;
306
+ }, _vm.onChange]
307
+ }
308
+ }, 'input', _vm.$attrs, false)) : _c('input', _vm._b({
309
+ directives: [{
310
+ name: "model",
311
+ rawName: "v-model",
312
+ value: _vm.currentVal,
313
+ expression: "currentVal"
314
+ }],
315
+ ref: "input",
316
+ class: {
317
+ 'jdd-field-disable': _vm.$attrs.readonly
318
+ },
319
+ attrs: {
320
+ "placeholder": _vm.getPlaceholder,
321
+ "type": _vm.$attrs.type
322
+ },
323
+ domProps: {
324
+ "value": _vm.currentVal
325
+ },
326
+ on: {
327
+ "input": [function ($event) {
328
+ if ($event.target.composing) {
329
+ return;
330
+ }
331
+
332
+ _vm.currentVal = $event.target.value;
333
+ }, _vm.onInput],
334
+ "focus": _vm.onFocus,
335
+ "blur": _vm.onBlur,
336
+ "change": _vm.onChange
337
+ }
338
+ }, 'input', _vm.$attrs, false)), _vm._v(" "), _c('div', {
339
+ staticClass: "jdd-field-icon-wrap"
340
+ }, [_c('i', {
341
+ directives: [{
342
+ name: "show",
343
+ rawName: "v-show",
344
+ value: _vm.showClear,
345
+ expression: "showClear"
346
+ }],
347
+ staticClass: "jdd-field-clean-icon",
348
+ on: {
349
+ "click": function click($event) {
350
+ $event.stopPropagation();
351
+ return _vm.cleanVal($event);
352
+ }
353
+ }
354
+ }), _vm._v(" "), _vm._t("icon")], 2)])]);
355
+ };
356
+
357
+ var staticRenderFns = [];
358
+ var __template__ = {
359
+ render: render,
360
+ staticRenderFns: staticRenderFns
361
+ };
362
+
363
+ var _default2 = (0, _extends2.default)({}, __script__, __template__);
364
+
365
+ exports.default = _default2;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _list = _interopRequireDefault(require("./src/list"));
11
+
12
+ require("./index.css");
13
+
14
+ _list.default.install = function (Vue) {
15
+ Vue.component(_list.default.name, _list.default);
16
+ };
17
+
18
+ var _default = _list.default;
19
+ exports.default = _default;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ //
13
+ //
14
+ //
15
+ //
16
+ //
17
+ //
18
+ //
19
+ //
20
+ var __script__ = {
21
+ name: 'JddList',
22
+ props: {
23
+ title: String
24
+ }
25
+ };
26
+
27
+ var render = function render() {
28
+ var _vm = this;
29
+
30
+ var _h = _vm.$createElement;
31
+
32
+ var _c = _vm._self._c || _h;
33
+
34
+ return _c('div', {
35
+ staticClass: "jdd-list"
36
+ }, [_vm.title ? _c('div', {
37
+ staticClass: "jdd-list-title",
38
+ domProps: {
39
+ "textContent": _vm._s(_vm.title)
40
+ }
41
+ }) : _vm._e(), _vm._v(" "), _c('div', {
42
+ staticClass: "jdd-list-body"
43
+ }, [_vm._t("default")], 2)]);
44
+ };
45
+
46
+ var staticRenderFns = [];
47
+ var __template__ = {
48
+ render: render,
49
+ staticRenderFns: staticRenderFns
50
+ };
51
+
52
+ var _default = (0, _extends2.default)({}, __script__, __template__);
53
+
54
+ exports.default = _default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _listItem = _interopRequireDefault(require("./src/list-item"));
11
+
12
+ require("./index.css");
13
+
14
+ _listItem.default.install = function (Vue) {
15
+ Vue.component(_listItem.default.name, _listItem.default);
16
+ };
17
+
18
+ var _default = _listItem.default;
19
+ exports.default = _default;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ //
13
+ //
14
+ //
15
+ //
16
+ //
17
+ //
18
+ //
19
+ //
20
+ //
21
+ //
22
+ //
23
+ //
24
+ //
25
+ //
26
+ //
27
+ //
28
+ //
29
+ //
30
+ //
31
+ //
32
+ //
33
+ var __script__ = {
34
+ name: 'JddListItem',
35
+ props: {
36
+ arrow: {
37
+ type: Boolean,
38
+ default: false
39
+ },
40
+ title: String,
41
+ value: [String, Number, Array],
42
+ desc: String,
43
+ disabled: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ border: {
48
+ type: String,
49
+ default: "bottom"
50
+ }
51
+ },
52
+ data: function data() {
53
+ return {
54
+ hasDesc: this.desc || this.$slots.desc && this.$slots.desc.length > 0 ? true : false,
55
+ hasIcon: this.$slots.icon && this.$slots.icon.length > 0 ? true : false
56
+ };
57
+ },
58
+ methods: {
59
+ onClick: function onClick(target) {
60
+ if (target.target.tagName !== 'A') {
61
+ !this.disabled && this.$emit("onClick");
62
+ }
63
+ },
64
+ valueClick: function valueClick() {
65
+ this.$emit("value-click");
66
+ }
67
+ }
68
+ };
69
+
70
+ var render = function render() {
71
+ var _vm = this;
72
+
73
+ var _h = _vm.$createElement;
74
+
75
+ var _c = _vm._self._c || _h;
76
+
77
+ return _c('div', {
78
+ staticClass: "jdd-list-item",
79
+ class: [_vm.arrow && 'jdd-list-item-link', _vm.hasDesc && 'jdd-list-item-mheight', _vm.disabled && 'jdd-list-item-diasbled'],
80
+ on: {
81
+ "click": _vm.onClick
82
+ }
83
+ }, [_vm.hasIcon ? _c('div', {
84
+ staticClass: "jdd-list-item-icon"
85
+ }, [_vm._t("icon")], 2) : _vm._e(), _vm._v(" "), _c('div', {
86
+ staticClass: "jdd-list-item-inner",
87
+ class: [_vm.border ? 'jdd-list-item-border-bottom' : '']
88
+ }, [_c('div', {
89
+ staticClass: "jdd-list-item-cont"
90
+ }, [_vm._t("title", [_c('p', {
91
+ staticClass: "title",
92
+ domProps: {
93
+ "textContent": _vm._s(_vm.title)
94
+ }
95
+ })]), _vm._v(" "), _vm._t("desc", [_vm.desc ? _c('p', {
96
+ staticClass: "desc",
97
+ domProps: {
98
+ "textContent": _vm._s(_vm.desc)
99
+ }
100
+ }) : _vm._e()])], 2), _vm._v(" "), _c('div', {
101
+ staticClass: "jdd-list-item-after",
102
+ on: {
103
+ "click": _vm.valueClick
104
+ }
105
+ }, [_vm._t("value", [_vm.value ? _c('p', {
106
+ domProps: {
107
+ "textContent": _vm._s(_vm.value)
108
+ }
109
+ }) : _vm._e()]), _vm._v(" "), _c('i', {
110
+ staticClass: "arrow"
111
+ })], 2)])]);
112
+ };
113
+
114
+ var staticRenderFns = [];
115
+ var __template__ = {
116
+ render: render,
117
+ staticRenderFns: staticRenderFns
118
+ };
119
+
120
+ var _default = (0, _extends2.default)({}, __script__, __template__);
121
+
122
+ exports.default = _default;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _vue = _interopRequireDefault(require("vue"));
11
+
12
+ var _loading = _interopRequireDefault(require("./src/loading"));
13
+
14
+ require("./index.css");
15
+
16
+ // const Loading = {};
17
+ var Loading = {}; // 注册Loading
18
+ //Loading.install = function (Vue) {
19
+ // 生成一个Vue的子类
20
+ // 同时这个子类也就是组件
21
+
22
+ var LoadingConstructor = _vue.default.extend(_loading.default);
23
+
24
+ var toastPool = []; // 生成一个该子类的实例
25
+
26
+ var getAnInstance = function getAnInstance() {
27
+ if (toastPool.length > 0) {
28
+ var instance = toastPool[0];
29
+ toastPool.splice(0, 1);
30
+ return instance;
31
+ }
32
+
33
+ return new LoadingConstructor({
34
+ el: document.createElement('div')
35
+ });
36
+ };
37
+
38
+ var returnAnInstance = function returnAnInstance(instance) {
39
+ if (instance) {
40
+ toastPool.push(instance);
41
+ }
42
+ };
43
+
44
+ var removeDom = function removeDom(event) {
45
+ if (event.target.parentNode) {
46
+ event.target.parentNode.removeChild(event.target);
47
+ }
48
+ };
49
+
50
+ LoadingConstructor.prototype.close = function () {
51
+ this.show = false;
52
+ this.closed = true;
53
+ this.$el.addEventListener('transitionend', removeDom);
54
+ returnAnInstance(this);
55
+ return this;
56
+ }; // LoadingConstructor.prototype.open = function() {
57
+ // this.test()
58
+ // this.show = true;
59
+ // this.closed = false;
60
+ // //this.$el.addEventListener('transitionend', removeDom);
61
+ // document.body.appendChild(this.$el);
62
+ // returnAnInstance(this);
63
+ // return this;
64
+ // };
65
+ // 通过Vue的原型注册一个方法
66
+ // 让所有实例共享这个方法
67
+
68
+
69
+ Loading = _vue.default.prototype.$loading = function () {
70
+ var instance = getAnInstance();
71
+ instance.closed = false;
72
+ clearTimeout(instance.timer);
73
+ instance.show = true;
74
+ document.body.appendChild(instance.$el);
75
+
76
+ _vue.default.nextTick(function () {
77
+ instance.show = true;
78
+ instance.$el.removeEventListener('transitionend', removeDom); // ~duration && (instance.timer = setTimeout(function() {
79
+ // instance.show = false;
80
+ // if (instance.closed) return;
81
+ // instance.close();
82
+ // }, duration));
83
+ });
84
+
85
+ return instance;
86
+ };
87
+
88
+ Loading.install = function (Vue) {}; // 生成一个Vue的子类
89
+ // 同时这个子类也就是组件
90
+ // const LoadingConstructor = Vue.extend(LoadingComponent)
91
+ // 生成一个该子类的实例
92
+ // LoadingConstructor.prototype.close = function(){
93
+ // this.show = false;
94
+ // return this;
95
+ // }
96
+ // LoadingConstructor.prototype.open = function(){
97
+ // this.show = true;
98
+ // return this;
99
+ // }
100
+ // const instance = new LoadingConstructor();
101
+ // // 通过Vue的原型注册一个方法
102
+ // // 让所有实例共享这个方法
103
+ // Vue.prototype.$loading = () => {
104
+ // // debugger;
105
+ // // 将这个实例挂载在我创建的div上
106
+ // // 并将此div加入全局挂载点内部
107
+ // instance.$mount(document.createElement('div'))
108
+ // document.body.appendChild(instance.$el)
109
+ // instance.open();
110
+ // return instance
111
+ // }
112
+ //}
113
+
114
+
115
+ var _default = Loading;
116
+ exports.default = _default;