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,136 @@
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
+ var __script__ = {
33
+ name: "JddSelect",
34
+ props: {
35
+ direction: {
36
+ type: String,
37
+ default: "row"
38
+ },
39
+ title: {
40
+ type: String,
41
+ default: ""
42
+ },
43
+ value: {
44
+ type: String,
45
+ default: ""
46
+ },
47
+ disabled: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ placeholder: {
52
+ type: String,
53
+ default: ""
54
+ },
55
+ border: {
56
+ type: String,
57
+ default: ""
58
+ },
59
+ prompt: {
60
+ type: Boolean,
61
+ default: false
62
+ }
63
+ },
64
+ components: {
65
+ jddField: _field.default
66
+ },
67
+ data: function data() {
68
+ return {
69
+ isFocus: false,
70
+ placeholderText: this.placeholder,
71
+ label: this.title
72
+ };
73
+ },
74
+ methods: {
75
+ onClick: function onClick() {
76
+ this.$emit("get-select");
77
+ }
78
+ },
79
+ computed: {
80
+ textTrans: function textTrans() {
81
+ if (this.direction === "row") {
82
+ return this.value || this.placeholder;
83
+ } else {
84
+ return this.value;
85
+ }
86
+ },
87
+ getColor: function getColor() {
88
+ return this.value ? "#333" : this.prompt ? "#4D7BFE" : "#CCC";
89
+ },
90
+ hasValue: function hasValue() {
91
+ return this.value !== "";
92
+ }
93
+ }
94
+ };
95
+
96
+ var render = function render() {
97
+ var _vm = this;
98
+
99
+ var _h = _vm.$createElement;
100
+
101
+ var _c = _vm._self._c || _h;
102
+
103
+ return _c('jdd-field', {
104
+ attrs: {
105
+ "label": _vm.label,
106
+ "isFocus": _vm.hasValue,
107
+ "direction": _vm.direction,
108
+ "border": _vm.border
109
+ },
110
+ on: {
111
+ "label-click": _vm.onClick
112
+ }
113
+ }, [_c('div', {
114
+ staticClass: "jdd-field-control jdd-field-select"
115
+ }, [_c('span', {
116
+ staticClass: "jdd-select-show",
117
+ class: {
118
+ 'jdd-field-hasvalue': _vm.value
119
+ },
120
+ style: {
121
+ color: _vm.getColor
122
+ }
123
+ }, [_vm._v(_vm._s(_vm.textTrans))]), _vm._v(" "), _c('i', {
124
+ staticClass: "jdd-select-icon"
125
+ })])]);
126
+ };
127
+
128
+ var staticRenderFns = [];
129
+ var __template__ = {
130
+ render: render,
131
+ staticRenderFns: staticRenderFns
132
+ };
133
+
134
+ var _default = (0, _extends2.default)({}, __script__, __template__);
135
+
136
+ 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 _swiper = _interopRequireDefault(require("./src/swiper"));
11
+
12
+ require("./index.css");
13
+
14
+ _swiper.default.install = function (Vue) {
15
+ Vue.component(_swiper.default.name, _swiper.default);
16
+ };
17
+
18
+ var _default = _swiper.default;
19
+ exports.default = _default;
@@ -0,0 +1,270 @@
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 _utils = require("../../utils/utils");
13
+
14
+ var _betterScroll = _interopRequireDefault(require("better-scroll"));
15
+
16
+ //
17
+ //
18
+ //
19
+ //
20
+ //
21
+ //
22
+ //
23
+ //
24
+ //
25
+ //
26
+ //
27
+ //
28
+ //
29
+ //
30
+ //
31
+ var COMPONENT_NAME = "JddSwiper";
32
+ var __script__ = {
33
+ name: COMPONENT_NAME,
34
+ props: {
35
+ loop: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ autoPlay: {
40
+ type: Boolean,
41
+ default: true
42
+ },
43
+ interval: {
44
+ type: Number,
45
+ default: 4000
46
+ },
47
+ showDot: {
48
+ type: Boolean,
49
+ default: true
50
+ },
51
+ click: {
52
+ type: Boolean,
53
+ default: true
54
+ },
55
+ threshold: {
56
+ type: Number,
57
+ default: 0.3
58
+ },
59
+ speed: {
60
+ type: Number,
61
+ default: 400
62
+ }
63
+ },
64
+ data: function data() {
65
+ return {
66
+ dots: [],
67
+ currentPageIndex: 0
68
+ };
69
+ },
70
+ mounted: function mounted() {
71
+ var _this = this;
72
+
73
+ this.update();
74
+ window.addEventListener("resize", function () {
75
+ if (!_this.slide || !_this.slide.enabled) {
76
+ return;
77
+ }
78
+
79
+ clearTimeout(_this.resizeTimer);
80
+ _this.resizeTimer = setTimeout(function () {
81
+ if (_this.slide.isInTransition) {
82
+ _this._onScrollEnd();
83
+ } else {
84
+ if (_this.autoPlay) {
85
+ _this._play();
86
+ }
87
+ }
88
+
89
+ _this.refresh();
90
+ }, 60);
91
+ });
92
+ },
93
+ activated: function activated() {
94
+ if (!this.slide) {
95
+ return;
96
+ }
97
+
98
+ this.slide.enable();
99
+ var pageIndex = this.slide.getCurrentPage().pageX;
100
+ this.slide.goToPage(pageIndex, 0, 0);
101
+ this.currentPageIndex = pageIndex;
102
+
103
+ if (this.autoPlay) {
104
+ this._play();
105
+ }
106
+ },
107
+ deactivated: function deactivated() {
108
+ this.slide.disable();
109
+ clearTimeout(this.timer);
110
+ },
111
+ beforeDestroy: function beforeDestroy() {
112
+ this.slide.disable();
113
+ clearTimeout(this.timer);
114
+ },
115
+ methods: {
116
+ update: function update() {
117
+ var _this2 = this;
118
+
119
+ if (this.slide) {
120
+ this.slide.destroy();
121
+ }
122
+
123
+ this.$nextTick(function () {
124
+ _this2.init();
125
+ });
126
+ },
127
+ refresh: function refresh() {
128
+ this._setSlideWidth(true);
129
+
130
+ this.slide.refresh();
131
+ },
132
+ prev: function prev() {
133
+ this.slide.prev();
134
+ },
135
+ next: function next() {
136
+ this.slide.next();
137
+ },
138
+ init: function init() {
139
+ clearTimeout(this.timer);
140
+ this.currentPageIndex = 0;
141
+
142
+ this._setSlideWidth();
143
+
144
+ if (this.showDot) {
145
+ this._initDots();
146
+ }
147
+
148
+ this._initSlide();
149
+
150
+ if (this.autoPlay) {
151
+ this._play();
152
+ }
153
+ },
154
+ _setSlideWidth: function _setSlideWidth(isResize) {
155
+ this.children = this.$refs.swiperGroup.children;
156
+ var width = 0;
157
+ var slideWidth = this.$refs.swiper.clientWidth;
158
+
159
+ for (var i = 0; i < this.children.length; i++) {
160
+ var child = this.children[i];
161
+ (0, _utils.addClass)(child, "jdd-swiper-item");
162
+ child.style.width = slideWidth + "px";
163
+ width += slideWidth;
164
+ }
165
+
166
+ if (this.loop && !isResize) {
167
+ width += 2 * slideWidth;
168
+ }
169
+
170
+ this.$refs.swiperGroup.style.width = width + "px";
171
+ },
172
+ _initSlide: function _initSlide() {
173
+ var _this3 = this;
174
+
175
+ console.log(this.threshold);
176
+ this.slide = new _betterScroll.default(this.$refs.swiper, {
177
+ scrollX: true,
178
+ scrollY: false,
179
+ momentum: false,
180
+ snap: {
181
+ loop: this.loop,
182
+ threshold: this.threshold,
183
+ speed: this.speed
184
+ },
185
+ bounce: false,
186
+ stopPropagation: true,
187
+ click: this.click
188
+ });
189
+ this.slide.on("scrollEnd", this._onScrollEnd);
190
+ this.slide.on("touchEnd", function () {
191
+ if (_this3.autoPlay) {
192
+ _this3._play();
193
+ }
194
+ });
195
+ this.slide.on("beforeScrollStart", function () {
196
+ if (_this3.autoPlay) {
197
+ clearTimeout(_this3.timer);
198
+ }
199
+ });
200
+ },
201
+ _onScrollEnd: function _onScrollEnd() {
202
+ var pageIndex = this.slide.getCurrentPage().pageX;
203
+ this.currentPageIndex = pageIndex;
204
+
205
+ if (this.autoPlay) {
206
+ this._play();
207
+ }
208
+ },
209
+ _initDots: function _initDots() {
210
+ this.dots = new Array(this.children.length);
211
+ },
212
+ _play: function _play() {
213
+ var _this4 = this;
214
+
215
+ clearTimeout(this.timer);
216
+ this.timer = setTimeout(function () {
217
+ _this4.slide.next();
218
+ }, this.interval);
219
+ }
220
+ },
221
+ watch: {
222
+ loop: function loop() {
223
+ this.update();
224
+ },
225
+ autoPlay: function autoPlay() {
226
+ this.update();
227
+ },
228
+ speed: function speed() {
229
+ this.update();
230
+ },
231
+ threshold: function threshold() {
232
+ this.update();
233
+ }
234
+ }
235
+ };
236
+
237
+ var render = function render() {
238
+ var _vm = this;
239
+
240
+ var _h = _vm.$createElement;
241
+
242
+ var _c = _vm._self._c || _h;
243
+
244
+ return _c('div', {
245
+ ref: "swiper",
246
+ staticClass: "jdd-swiper"
247
+ }, [_c('div', {
248
+ ref: "swiperGroup",
249
+ staticClass: "jdd-swiper-group"
250
+ }, [_vm._t("default")], 2), _vm._v(" "), _vm.showDot ? _c('div', {
251
+ staticClass: "jdd-dots"
252
+ }, _vm._l(_vm.dots, function (item, index) {
253
+ return _c('span', {
254
+ staticClass: "jdd-dot",
255
+ class: {
256
+ active: _vm.currentPageIndex === index
257
+ }
258
+ });
259
+ }), 0) : _vm._e()]);
260
+ };
261
+
262
+ var staticRenderFns = [];
263
+ var __template__ = {
264
+ render: render,
265
+ staticRenderFns: staticRenderFns
266
+ };
267
+
268
+ var _default = (0, _extends2.default)({}, __script__, __template__);
269
+
270
+ 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 _switch = _interopRequireDefault(require("./src/switch"));
11
+
12
+ require("./index.css");
13
+
14
+ _switch.default.install = function (Vue) {
15
+ Vue.component(_switch.default.name, _switch.default);
16
+ };
17
+
18
+ var _default = _switch.default;
19
+ exports.default = _default;
@@ -0,0 +1,143 @@
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
+ var __script__ = {
25
+ name: "JddSwitch",
26
+ props: {
27
+ value: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ title: {
32
+ type: String,
33
+ default: ""
34
+ },
35
+ direction: {
36
+ type: String,
37
+ default: "row"
38
+ },
39
+ disabled: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ border: {
44
+ type: String,
45
+ default: ""
46
+ }
47
+ },
48
+ components: {
49
+ jddField: _field.default
50
+ },
51
+ data: function data() {
52
+ return {
53
+ checkValue: this.value,
54
+ validateStatus: true,
55
+ label: this.title
56
+ };
57
+ },
58
+ methods: {},
59
+ watch: {
60
+ value: function value(newVal) {
61
+ this.checkValue = newVal;
62
+ },
63
+ checkValue: function checkValue(newVal) {
64
+ this.$emit("change", newVal);
65
+ this.$emit("input", newVal);
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('jdd-field', {
78
+ staticClass: "jdd-field-row",
79
+ attrs: {
80
+ "label": _vm.label,
81
+ "state": _vm.validateStatus,
82
+ "direction": _vm.direction,
83
+ "border": _vm.border
84
+ }
85
+ }, [_c('div', {
86
+ staticClass: "jdd-field-control jdd-field-switch"
87
+ }, [_c('label', {
88
+ staticClass: "jdd-switch",
89
+ class: {
90
+ 'jdd-switch-disable': _vm.disabled
91
+ },
92
+ attrs: {
93
+ "for": ""
94
+ }
95
+ }, [_c('input', {
96
+ directives: [{
97
+ name: "model",
98
+ rawName: "v-model",
99
+ value: _vm.checkValue,
100
+ expression: "checkValue"
101
+ }],
102
+ staticClass: "jdd-switch-input",
103
+ attrs: {
104
+ "type": "checkbox",
105
+ "disabled": _vm.disabled
106
+ },
107
+ domProps: {
108
+ "checked": Array.isArray(_vm.checkValue) ? _vm._i(_vm.checkValue, null) > -1 : _vm.checkValue
109
+ },
110
+ on: {
111
+ "change": function change($event) {
112
+ var $$a = _vm.checkValue,
113
+ $$el = $event.target,
114
+ $$c = $$el.checked ? true : false;
115
+
116
+ if (Array.isArray($$a)) {
117
+ var $$v = null,
118
+ $$i = _vm._i($$a, $$v);
119
+
120
+ if ($$el.checked) {
121
+ $$i < 0 && (_vm.checkValue = $$a.concat([$$v]));
122
+ } else {
123
+ $$i > -1 && (_vm.checkValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
124
+ }
125
+ } else {
126
+ _vm.checkValue = $$c;
127
+ }
128
+ }
129
+ }
130
+ }), _vm._v(" "), _c('span', {
131
+ staticClass: "jdd-switch-show"
132
+ })])])]);
133
+ };
134
+
135
+ var staticRenderFns = [];
136
+ var __template__ = {
137
+ render: render,
138
+ staticRenderFns: staticRenderFns
139
+ };
140
+
141
+ var _default = (0, _extends2.default)({}, __script__, __template__);
142
+
143
+ exports.default = _default;
@@ -0,0 +1,22 @@
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 _tabs = _interopRequireDefault(require("./src/tabs"));
11
+
12
+ var _tabItem = _interopRequireDefault(require("./src/tab-item"));
13
+
14
+ require("./index.css");
15
+
16
+ _tabs.default.install = function (Vue) {
17
+ Vue.component(_tabs.default.name, _tabs.default);
18
+ Vue.component(_tabItem.default.name, _tabItem.default);
19
+ };
20
+
21
+ var _default = _tabs.default;
22
+ exports.default = _default;
@@ -0,0 +1,72 @@
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
+ var __script__ = {
19
+ name: "JddTabItem",
20
+ props: {
21
+ value: {},
22
+ content: [String, Number],
23
+ midPos: {
24
+ type: Number,
25
+ default: 0
26
+ }
27
+ },
28
+ inject: {
29
+ handleClick: {
30
+ default: 'itemSelect'
31
+ },
32
+ parent: {
33
+ default: void 0
34
+ }
35
+ },
36
+ methods: {
37
+ itemSelect: function itemSelect() {
38
+ // console.log(typeof this.handleClick)
39
+ if (typeof this.handleClick === 'function') {
40
+ this.handleClick(this.value, this.content, this.$refs.tab.offsetLeft);
41
+ } else {
42
+ this.$emit("click", this.value, this.content);
43
+ }
44
+ }
45
+ }
46
+ };
47
+
48
+ var render = function render() {
49
+ var _vm = this;
50
+
51
+ var _h = _vm.$createElement;
52
+
53
+ var _c = _vm._self._c || _h;
54
+
55
+ return _c('div', {
56
+ ref: "tab",
57
+ class: ['jdd-tabs-item', _vm.parent.value === _vm.value ? 'jdd-tabs-active' : ''],
58
+ on: {
59
+ "click": _vm.itemSelect
60
+ }
61
+ }, [_c('p', [_vm._v(_vm._s(_vm.content))])]);
62
+ };
63
+
64
+ var staticRenderFns = [];
65
+ var __template__ = {
66
+ render: render,
67
+ staticRenderFns: staticRenderFns
68
+ };
69
+
70
+ var _default = (0, _extends2.default)({}, __script__, __template__);
71
+
72
+ exports.default = _default;