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,206 @@
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
+ var __script__ = {
25
+ name: "JddAmount",
26
+ props: {
27
+ value: {},
28
+ showUnit: {
29
+ type: Boolean,
30
+ default: true
31
+ },
32
+ placeholder: {
33
+ type: String,
34
+ default: "请输入金额"
35
+ },
36
+ focus: {
37
+ type: Boolean,
38
+ default: false
39
+ }
40
+ },
41
+ inject: {
42
+ handleCheck: {
43
+ default: "itemSelect"
44
+ },
45
+ parent: {
46
+ default: null
47
+ }
48
+ },
49
+ data: function data() {
50
+ return {
51
+ checkValue: this.value,
52
+ validateStatus: true,
53
+ label: this.title,
54
+ left: 0
55
+ };
56
+ },
57
+ created: function created() {
58
+ if (this.isGroup()) {
59
+ this.checkValue = this.parent.value;
60
+ } else {
61
+ this.checkValue = this.value;
62
+ }
63
+ },
64
+ computed: {
65
+ getUnit: function getUnit() {
66
+ var unit = "";
67
+
68
+ if (this.showUnit) {
69
+ if (this.value >= 100000 && this.value < 1000000) {
70
+ unit = "十万";
71
+ } else if (this.value >= 10000 && this.value < 100000) {
72
+ unit = "万";
73
+ } else if (this.value >= 1000 && this.value < 10000) {
74
+ unit = "千";
75
+ } else if (this.value >= 100 && this.value < 1000) {
76
+ unit = "百";
77
+ } else if (this.value >= 1000000 && this.value < 10000000) {
78
+ unit = "百万";
79
+ } else if (this.value >= 10000000 && this.value < 100000000) {
80
+ unit = "千万";
81
+ } else if (this.value >= 10000000) {
82
+ unit = "亿";
83
+ }
84
+ }
85
+
86
+ return unit;
87
+ },
88
+ getFillColor: function getFillColor() {
89
+ var finalStyle = "";
90
+
91
+ if (!this.disabled && !this.isChecked) {
92
+ return this.fillColor;
93
+ }
94
+ },
95
+ isChecked: function isChecked() {
96
+ if (this.isGroup()) {
97
+ return this.name === this.parent.value;
98
+ } else {
99
+ return this.checkValue;
100
+ }
101
+ },
102
+ getValue: function getValue() {
103
+ return this.focus ? this.value : this.value || this.value === 0 ? this.value : this.placeholder; // return this.value|| this.value===0?this.value:this.placeholder;
104
+ },
105
+ hasValue: function hasValue() {
106
+ return this.value || this.value === 0 || this.focus;
107
+ }
108
+ },
109
+ methods: {
110
+ onClick: function onClick() {
111
+ this.$emit("update:focus", true);
112
+ this.$emit("click");
113
+ },
114
+ isGroup: function isGroup() {
115
+ return this.parent ? true : false;
116
+ },
117
+ handleChange: function handleChange() {// if(this.isGroup()){
118
+ // }else{
119
+ // this.checkValue =
120
+ // }
121
+ }
122
+ },
123
+ watch: {
124
+ value: function value(newVal) {
125
+ var _this = this;
126
+
127
+ this.checkValue = newVal;
128
+ this.$nextTick(function () {
129
+ if (newVal.length === 1) {
130
+ _this.left = document.querySelector(".jdd-amount-value").offsetLeft + document.querySelector(".jdd-amount-value").offsetWidth;
131
+ }
132
+ });
133
+ } // "parent.value": function(newVal) {
134
+ // //if(this.name === newVal)
135
+ // this.checkValue = this.name === newVal ? true : false;
136
+ // },
137
+ // checkValue(newVal) {
138
+ // if (typeof this.handleCheck === "function") {
139
+ // if (newVal) this.handleCheck(this.name);
140
+ // else this.handleCheck("");
141
+ // } else {
142
+ // this.$emit("change", newVal);
143
+ // this.$emit("input", newVal);
144
+ // }
145
+ // }
146
+
147
+ }
148
+ };
149
+
150
+ var render = function render() {
151
+ var _vm = this;
152
+
153
+ var _h = _vm.$createElement;
154
+
155
+ var _c = _vm._self._c || _h;
156
+
157
+ return _c('div', {
158
+ staticClass: "jdd-amount-wrap"
159
+ }, [_c('span', {
160
+ staticClass: "jdd-amount-icon"
161
+ }, [_vm._v("¥")]), _vm._v(" "), _c('p', {
162
+ class: [{
163
+ 'jdd-amount-hasvalue': _vm.hasValue
164
+ }, 'jdd-amount-edit'],
165
+ on: {
166
+ "click": _vm.onClick
167
+ }
168
+ }, [_c('span', {
169
+ staticClass: "jdd-amount-value"
170
+ }, [_vm._v(_vm._s(_vm.getValue))]), _vm._v(" "), _c('span', {
171
+ directives: [{
172
+ name: "show",
173
+ rawName: "v-show",
174
+ value: _vm.focus,
175
+ expression: "focus"
176
+ }],
177
+ staticClass: "jdd-amount-shine"
178
+ })]), _c('div', {
179
+ directives: [{
180
+ name: "show",
181
+ rawName: "v-show",
182
+ value: _vm.getUnit,
183
+ expression: "getUnit"
184
+ }],
185
+ staticClass: "jdd-amount-unit-wrap",
186
+ style: {
187
+ 'left': _vm.left + 'px'
188
+ }
189
+ }, [_c('span', {
190
+ staticClass: "jdd-amount-line"
191
+ }), _c('span', {
192
+ staticClass: "jdd-amount-unit"
193
+ }, [_vm._v(_vm._s(_vm.getUnit))])]), _vm._v(" "), _c('span', {
194
+ staticClass: "jdd-amount-slot"
195
+ }, [_vm._t("default")], 2)]);
196
+ };
197
+
198
+ var staticRenderFns = [];
199
+ var __template__ = {
200
+ render: render,
201
+ staticRenderFns: staticRenderFns
202
+ };
203
+
204
+ var _default = (0, _extends2.default)({}, __script__, __template__);
205
+
206
+ 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 _button = _interopRequireDefault(require("./src/button"));
11
+
12
+ require("./index.css");
13
+
14
+ _button.default.install = function (Vue) {
15
+ Vue.component(_button.default.name, _button.default);
16
+ };
17
+
18
+ var _default = _button.default;
19
+ exports.default = _default;
@@ -0,0 +1,75 @@
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
+ var __script__ = {
27
+ name: 'JddButton',
28
+ props: {
29
+ type: {
30
+ type: String,
31
+ default: 'default'
32
+ },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ size: {
38
+ type: String,
39
+ default: 'large'
40
+ }
41
+ },
42
+ methods: {
43
+ handleClick: function handleClick(evt) {
44
+ if (!this.disabled) this.$emit('click', evt);
45
+ }
46
+ }
47
+ };
48
+
49
+ var render = function render() {
50
+ var _vm = this;
51
+
52
+ var _h = _vm.$createElement;
53
+
54
+ var _c = _vm._self._c || _h;
55
+
56
+ return _c('span', {
57
+ staticClass: "jdd-button",
58
+ class: [_vm.type ? 'jdd-button-' + _vm.type : '', {
59
+ 'is-disabled': _vm.disabled
60
+ }, 'jdd-button-' + _vm.size],
61
+ on: {
62
+ "click": _vm.handleClick
63
+ }
64
+ }, [_vm.$slots.default ? _c('span', [_vm._t("default")], 2) : _vm._e()]);
65
+ };
66
+
67
+ var staticRenderFns = [];
68
+ var __template__ = {
69
+ render: render,
70
+ staticRenderFns: staticRenderFns
71
+ };
72
+
73
+ var _default = (0, _extends2.default)({}, __script__, __template__);
74
+
75
+ 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 _buttonGroup = _interopRequireDefault(require("./src/button-group"));
11
+
12
+ require("./index.css");
13
+
14
+ _buttonGroup.default.install = function (Vue) {
15
+ Vue.component(_buttonGroup.default.name, _buttonGroup.default);
16
+ };
17
+
18
+ var _default = _buttonGroup.default;
19
+ exports.default = _default;
@@ -0,0 +1,53 @@
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
+ var __script__ = {
23
+ name: 'JddButtonGroup',
24
+ props: {
25
+ type: {
26
+ type: String,
27
+ default: 'default'
28
+ }
29
+ }
30
+ };
31
+
32
+ var render = function render() {
33
+ var _vm = this;
34
+
35
+ var _h = _vm.$createElement;
36
+
37
+ var _c = _vm._self._c || _h;
38
+
39
+ return _c('div', {
40
+ staticClass: "jdd-button-group",
41
+ class: [_vm.type ? 'jdd-button-group-' + _vm.type : '']
42
+ }, [_vm._t("default")], 2);
43
+ };
44
+
45
+ var staticRenderFns = [];
46
+ var __template__ = {
47
+ render: render,
48
+ staticRenderFns: staticRenderFns
49
+ };
50
+
51
+ var _default = (0, _extends2.default)({}, __script__, __template__);
52
+
53
+ 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 _checkbox = _interopRequireDefault(require("./src/checkbox"));
11
+
12
+ var _checkboxGroup = _interopRequireDefault(require("./src/checkbox-group"));
13
+
14
+ require("./index.css");
15
+
16
+ _checkbox.default.install = function (Vue) {
17
+ Vue.component(_checkbox.default.name, _checkbox.default);
18
+ Vue.component(_checkboxGroup.default.name, _checkboxGroup.default);
19
+ };
20
+
21
+ var _default = _checkbox.default;
22
+ exports.default = _default;
@@ -0,0 +1,85 @@
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: "JddCheckboxGroup",
20
+ props: {
21
+ value: {
22
+ default: 0
23
+ }
24
+ },
25
+ provide: function provide() {
26
+ return {
27
+ handleCheck: this.boxChecked,
28
+ parent: this
29
+ };
30
+ },
31
+ data: function data() {
32
+ return {
33
+ checkValue: this.value
34
+ };
35
+ },
36
+ created: function created() {
37
+ var slotsLength = 0;
38
+
39
+ if (this.$slots.default && this.$slots.default.length) {
40
+ slotsLength = this.$slots.default.length;
41
+ }
42
+
43
+ if (slotsLength >= 5) {
44
+ this.needScroll = true;
45
+ } //let slotsLength = this.$slots.default.length;
46
+ // console.log()
47
+
48
+ },
49
+ methods: {
50
+ itemSelect: function itemSelect(value, content) {
51
+ this.$emit("input", value);
52
+ },
53
+ boxChecked: function boxChecked(check) {
54
+ this.checkValue = check;
55
+ this.$emit("input", check);
56
+ }
57
+ },
58
+ watch: {
59
+ value: function value(newVal) {
60
+ this.checkValue = newVal;
61
+ }
62
+ }
63
+ };
64
+
65
+ var render = function render() {
66
+ var _vm = this;
67
+
68
+ var _h = _vm.$createElement;
69
+
70
+ var _c = _vm._self._c || _h;
71
+
72
+ return _c('div', {
73
+ staticClass: "jdd-checkbox-list"
74
+ }, [_vm._t("default")], 2);
75
+ };
76
+
77
+ var staticRenderFns = [];
78
+ var __template__ = {
79
+ render: render,
80
+ staticRenderFns: staticRenderFns
81
+ };
82
+
83
+ var _default = (0, _extends2.default)({}, __script__, __template__);
84
+
85
+ exports.default = _default;
@@ -0,0 +1,228 @@
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
+ //
34
+ //
35
+ //
36
+ //
37
+ //
38
+ //
39
+ //
40
+ //
41
+ //
42
+ var __script__ = {
43
+ name: "JddCheckbox",
44
+ props: {
45
+ value: {
46
+ type: Boolean,
47
+ default: false
48
+ },
49
+ disabled: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ fillColor: {
54
+ type: String,
55
+ default: "#4D7BFE"
56
+ },
57
+ name: {
58
+ default: undefined
59
+ }
60
+ },
61
+ inject: {
62
+ handleCheck: {
63
+ default: "itemSelect"
64
+ },
65
+ parent: {
66
+ default: null
67
+ }
68
+ },
69
+ data: function data() {
70
+ return {
71
+ checkValue: this.value,
72
+ validateStatus: true,
73
+ label: this.title
74
+ };
75
+ },
76
+ created: function created() {
77
+ if (this.isGroup()) {
78
+ this.checkValue = this.parent.value;
79
+ } else {
80
+ this.checkValue = this.value;
81
+ }
82
+ },
83
+ computed: {
84
+ getFillColor: function getFillColor() {
85
+ var finalStyle = "";
86
+
87
+ if (!this.disabled && !this.isChecked) {
88
+ return this.fillColor;
89
+ }
90
+ },
91
+ isChecked: function isChecked() {
92
+ if (this.isGroup()) {
93
+ return this.name === this.parent.value;
94
+ } else {
95
+ return this.checkValue;
96
+ }
97
+ },
98
+ getValue: {
99
+ get: function get() {
100
+ if (this.isGroup()) {
101
+ return this.parent.value;
102
+ } else {
103
+ return this.checkValue;
104
+ }
105
+ },
106
+ set: function set(newVal) {
107
+ if (this.isGroup()) {
108
+ this.handleCheck(this.name); // else this.handleCheck("");
109
+ } else {
110
+ this.$emit("change", newVal);
111
+ this.$emit("input", newVal);
112
+ }
113
+ }
114
+ }
115
+ },
116
+ methods: {
117
+ check: function check(target) {
118
+ if (target.target.tagName !== 'A' && !this.disabled) {
119
+ if (this.isGroup()) {
120
+ this.handleCheck(this.name); // else this.handleCheck("");
121
+ } else {
122
+ this.$emit("change", !this.checkValue);
123
+ this.$emit("input", !this.checkValue);
124
+ }
125
+ }
126
+ },
127
+ isGroup: function isGroup() {
128
+ return this.parent ? true : false;
129
+ },
130
+ handleChange: function handleChange() {// if(this.isGroup()){
131
+ // }else{
132
+ // this.checkValue =
133
+ // }
134
+ }
135
+ },
136
+ watch: {
137
+ value: function value(newVal) {
138
+ this.checkValue = newVal;
139
+ }
140
+ }
141
+ };
142
+
143
+ var render = function render() {
144
+ var _vm = this;
145
+
146
+ var _h = _vm.$createElement;
147
+
148
+ var _c = _vm._self._c || _h;
149
+
150
+ return _c('div', {
151
+ staticClass: "jdd-checkbox-wrap"
152
+ }, [_c('label', {
153
+ class: ['jdd-checkbox', _vm.disabled ? 'jdd-checkbox-disabled' : ''],
154
+ attrs: {
155
+ "for": ""
156
+ },
157
+ on: {
158
+ "click": _vm.check
159
+ }
160
+ }, [_c('span', {
161
+ staticClass: "jdd-checkbox-icon",
162
+ class: [_vm.isChecked ? 'jdd-checkbox-checked' : 'jdd-checkbox-unchecked'],
163
+ style: {
164
+ 'borderColor': _vm.getFillColor
165
+ }
166
+ }, [_c('svg', {
167
+ attrs: {
168
+ "t": "1575962492834",
169
+ "viewBox": "0 0 1024 1024",
170
+ "version": "1.1",
171
+ "p-id": "2415",
172
+ "data-spm-anchor-id": "a313x.7781069.0.i17"
173
+ }
174
+ }, [_c('path', {
175
+ attrs: {
176
+ "d": "M512 0C228.430769 0 0 228.430769 0 512s228.430769 512 512 512 512-228.430769 512-512S795.569231 0 512 0z m256 413.538462l-271.753846 271.753846c-7.876923 7.876923-19.692308 11.815385-31.507692 11.815384-11.815385 0-23.630769-3.938462-31.507693-11.815384l-169.353846-169.353846c-15.753846-15.753846-15.753846-47.261538 0-63.015385 15.753846-15.753846 47.261538-15.753846 63.015385 0l137.846154 137.846154 240.246153-240.246154c15.753846-15.753846 47.261538-15.753846 63.015385 0 19.692308 15.753846 19.692308 47.261538 0 63.015385z",
177
+ "p-id": "2416",
178
+ "fill": _vm.fillColor
179
+ }
180
+ })]), _vm._v(" "), _c('input', {
181
+ directives: [{
182
+ name: "model",
183
+ rawName: "v-model",
184
+ value: _vm.getValue,
185
+ expression: "getValue"
186
+ }],
187
+ staticClass: "jdd-checkbox-input",
188
+ attrs: {
189
+ "type": "checkbox",
190
+ "disabled": _vm.disabled
191
+ },
192
+ domProps: {
193
+ "checked": Array.isArray(_vm.getValue) ? _vm._i(_vm.getValue, null) > -1 : _vm.getValue
194
+ },
195
+ on: {
196
+ "change": [function ($event) {
197
+ var $$a = _vm.getValue,
198
+ $$el = $event.target,
199
+ $$c = $$el.checked ? true : false;
200
+
201
+ if (Array.isArray($$a)) {
202
+ var $$v = null,
203
+ $$i = _vm._i($$a, $$v);
204
+
205
+ if ($$el.checked) {
206
+ $$i < 0 && (_vm.getValue = $$a.concat([$$v]));
207
+ } else {
208
+ $$i > -1 && (_vm.getValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
209
+ }
210
+ } else {
211
+ _vm.getValue = $$c;
212
+ }
213
+ }, _vm.handleChange]
214
+ }
215
+ })]), _vm._v(" "), _c('span', {
216
+ staticClass: "jdd-checkbox-label"
217
+ }, [_vm._t("default")], 2)])]);
218
+ };
219
+
220
+ var staticRenderFns = [];
221
+ var __template__ = {
222
+ render: render,
223
+ staticRenderFns: staticRenderFns
224
+ };
225
+
226
+ var _default = (0, _extends2.default)({}, __script__, __template__);
227
+
228
+ exports.default = _default;