bm-admin-ui 1.0.34-alpha → 1.0.35-alpha

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.
Files changed (205) hide show
  1. package/es/components/feedback/index.js +25 -1306
  2. package/es/components/float-table/index.js +36 -27
  3. package/es/components/form-create/index.js +2901 -0
  4. package/es/components/form-designer/index.js +4203 -9
  5. package/es/components/index.js +1 -0
  6. package/es/components/input-tags-display/index.js +19 -1137
  7. package/es/components/over-tooltips/index.js +27 -20
  8. package/es/components/search-filter/index.js +24 -1179
  9. package/es/components/shops-filter/index.js +24 -1182
  10. package/es/components/staffs-selector/index.js +124 -1234
  11. package/es/components/timeline/index.js +7 -7
  12. package/es/components/upload/index.js +122 -1249
  13. package/es/utils/bm-admin-ui-resolver.js +4 -2
  14. package/es/utils/uniqueId.js +5 -0
  15. package/es/utils/vxe-table.js +4 -2
  16. package/es/utils/with-install.js +0 -1
  17. package/index.esm.js +116090 -27969
  18. package/index.js +116286 -28164
  19. package/lib/components/feedback/index.js +23 -1304
  20. package/lib/components/float-table/index.js +36 -27
  21. package/lib/components/form-create/index.js +2913 -0
  22. package/lib/components/form-designer/index.js +4208 -8
  23. package/lib/components/index.js +7 -0
  24. package/lib/components/input-tags-display/index.js +18 -1136
  25. package/lib/components/over-tooltips/index.js +27 -20
  26. package/lib/components/search-filter/index.js +23 -1178
  27. package/lib/components/shops-filter/index.js +23 -1181
  28. package/lib/components/staffs-selector/index.js +123 -1233
  29. package/lib/components/timeline/index.js +7 -7
  30. package/lib/components/upload/index.js +121 -1248
  31. package/lib/utils/bm-admin-ui-resolver.js +4 -2
  32. package/lib/utils/uniqueId.js +8 -0
  33. package/lib/utils/vxe-table.js +3 -1
  34. package/lib/utils/with-install.js +0 -1
  35. package/package.json +9 -4
  36. package/theme-chalk/button.css +1 -1
  37. package/theme-chalk/feedback.css +1 -1
  38. package/theme-chalk/float-table.css +1 -1
  39. package/theme-chalk/floating-vue.css +1 -1
  40. package/theme-chalk/flow-designer.css +1 -1
  41. package/theme-chalk/form-create.css +1 -0
  42. package/theme-chalk/form-designer.css +1 -0
  43. package/theme-chalk/index.css +1 -1
  44. package/theme-chalk/modal.css +1 -1
  45. package/theme-chalk/over-tooltips.css +1 -1
  46. package/theme-chalk/search-filter.css +1 -1
  47. package/theme-chalk/staffs-selector.css +1 -1
  48. package/theme-chalk/timeline.css +1 -1
  49. package/theme-chalk/upload.css +1 -1
  50. package/es/components/button/index.d.ts +0 -307
  51. package/es/components/button/src/button.d.ts +0 -12
  52. package/es/components/button/src/button.vue.d.ts +0 -308
  53. package/es/components/feedback/index.d.ts +0 -1037
  54. package/es/components/feedback/src/bmAlert.vue.d.ts +0 -193
  55. package/es/components/feedback/src/bmModal.vue.d.ts +0 -839
  56. package/es/components/float-table/index.d.ts +0 -70
  57. package/es/components/float-table/src/float-table.vue.d.ts +0 -69
  58. package/es/components/flow-designer/index.d.ts +0 -7
  59. package/es/components/flow-designer/src/bm-nodes/AddCondition.d.ts +0 -26
  60. package/es/components/flow-designer/src/bm-nodes/AddFlowNode.d.ts +0 -29
  61. package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +0 -249
  62. package/es/components/flow-designer/src/bm-nodes/BmFlowHtmlNode.d.ts +0 -19
  63. package/es/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +0 -15
  64. package/es/components/flow-designer/src/bm-nodes/BmPolyLine.d.ts +0 -21
  65. package/es/components/flow-designer/src/bm-nodes/EndCircle.d.ts +0 -19
  66. package/es/components/flow-designer/src/config.d.ts +0 -24
  67. package/es/components/flow-designer/src/flow-designer-test.d.ts +0 -20
  68. package/es/components/flow-designer/src/flow-designer.d.ts +0 -11
  69. package/es/components/flow-designer/src/flow-designer.vue.d.ts +0 -6
  70. package/es/components/flow-designer/src/utils.d.ts +0 -29
  71. package/es/components/form-designer/index.d.ts +0 -9
  72. package/es/components/form-designer/src/form-designer.vue.d.ts +0 -8
  73. package/es/components/index.d.ts +0 -12
  74. package/es/components/input-tags-display/index.d.ts +0 -131
  75. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +0 -128
  76. package/es/components/over-tooltips/index.d.ts +0 -35
  77. package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +0 -34
  78. package/es/components/search-filter/index.d.ts +0 -223
  79. package/es/components/search-filter/src/search-filter.d.ts +0 -81
  80. package/es/components/search-filter/src/search-filter.vue.d.ts +0 -222
  81. package/es/components/search-filter/src/search-reset-btn.vue.d.ts +0 -106
  82. package/es/components/shops-filter/index.d.ts +0 -99
  83. package/es/components/shops-filter/src/shops-filter.d.ts +0 -25
  84. package/es/components/shops-filter/src/shops-filter.vue.d.ts +0 -98
  85. package/es/components/staffs-selector/index.d.ts +0 -109
  86. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -97
  87. package/es/components/staffs-selector/src/radioCmp.vue.d.ts +0 -31
  88. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +0 -108
  89. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +0 -62
  90. package/es/components/timeline/index.d.ts +0 -118
  91. package/es/components/timeline/src/props.d.ts +0 -27
  92. package/es/components/timeline/src/timeline-item.vue.d.ts +0 -66
  93. package/es/components/timeline/src/timeline.vue.d.ts +0 -52
  94. package/es/components/upload/index.d.ts +0 -138
  95. package/es/components/upload/src/icons.d.ts +0 -13
  96. package/es/components/upload/src/upload.vue.d.ts +0 -137
  97. package/es/components/upload/utils/index.d.ts +0 -7
  98. package/es/index.d.ts +0 -6
  99. package/es/utils/bm-admin-ui-resolver.d.ts +0 -9
  100. package/es/utils/vxe-table.d.ts +0 -6
  101. package/es/utils/with-install.d.ts +0 -3
  102. package/lib/components/button/index.d.ts +0 -307
  103. package/lib/components/button/src/button.d.ts +0 -12
  104. package/lib/components/button/src/button.vue.d.ts +0 -308
  105. package/lib/components/feedback/index.d.ts +0 -1037
  106. package/lib/components/feedback/src/bmAlert.vue.d.ts +0 -193
  107. package/lib/components/feedback/src/bmModal.vue.d.ts +0 -839
  108. package/lib/components/float-table/index.d.ts +0 -70
  109. package/lib/components/float-table/src/float-table.vue.d.ts +0 -69
  110. package/lib/components/flow-designer/index.d.ts +0 -7
  111. package/lib/components/flow-designer/src/bm-nodes/AddCondition.d.ts +0 -26
  112. package/lib/components/flow-designer/src/bm-nodes/AddFlowNode.d.ts +0 -29
  113. package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +0 -249
  114. package/lib/components/flow-designer/src/bm-nodes/BmFlowHtmlNode.d.ts +0 -19
  115. package/lib/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +0 -15
  116. package/lib/components/flow-designer/src/bm-nodes/BmPolyLine.d.ts +0 -21
  117. package/lib/components/flow-designer/src/bm-nodes/EndCircle.d.ts +0 -19
  118. package/lib/components/flow-designer/src/config.d.ts +0 -24
  119. package/lib/components/flow-designer/src/flow-designer-test.d.ts +0 -20
  120. package/lib/components/flow-designer/src/flow-designer.d.ts +0 -11
  121. package/lib/components/flow-designer/src/flow-designer.vue.d.ts +0 -6
  122. package/lib/components/flow-designer/src/utils.d.ts +0 -29
  123. package/lib/components/form-designer/index.d.ts +0 -9
  124. package/lib/components/form-designer/src/form-designer.vue.d.ts +0 -8
  125. package/lib/components/index.d.ts +0 -12
  126. package/lib/components/input-tags-display/index.d.ts +0 -131
  127. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +0 -128
  128. package/lib/components/over-tooltips/index.d.ts +0 -35
  129. package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +0 -34
  130. package/lib/components/search-filter/index.d.ts +0 -223
  131. package/lib/components/search-filter/src/search-filter.d.ts +0 -81
  132. package/lib/components/search-filter/src/search-filter.vue.d.ts +0 -222
  133. package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +0 -106
  134. package/lib/components/shops-filter/index.d.ts +0 -99
  135. package/lib/components/shops-filter/src/shops-filter.d.ts +0 -25
  136. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +0 -98
  137. package/lib/components/staffs-selector/index.d.ts +0 -109
  138. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -97
  139. package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +0 -31
  140. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +0 -108
  141. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +0 -62
  142. package/lib/components/timeline/index.d.ts +0 -118
  143. package/lib/components/timeline/src/props.d.ts +0 -27
  144. package/lib/components/timeline/src/timeline-item.vue.d.ts +0 -66
  145. package/lib/components/timeline/src/timeline.vue.d.ts +0 -52
  146. package/lib/components/upload/index.d.ts +0 -138
  147. package/lib/components/upload/src/icons.d.ts +0 -13
  148. package/lib/components/upload/src/upload.vue.d.ts +0 -137
  149. package/lib/components/upload/utils/index.d.ts +0 -7
  150. package/lib/index.d.ts +0 -6
  151. package/lib/utils/bm-admin-ui-resolver.d.ts +0 -9
  152. package/lib/utils/vxe-table.d.ts +0 -6
  153. package/lib/utils/with-install.d.ts +0 -3
  154. package/types/components/button/index.d.ts +0 -307
  155. package/types/components/button/src/button.d.ts +0 -12
  156. package/types/components/button/src/button.vue.d.ts +0 -308
  157. package/types/components/feedback/index.d.ts +0 -1037
  158. package/types/components/feedback/src/bmAlert.vue.d.ts +0 -193
  159. package/types/components/feedback/src/bmModal.vue.d.ts +0 -839
  160. package/types/components/float-table/index.d.ts +0 -70
  161. package/types/components/float-table/src/float-table.vue.d.ts +0 -69
  162. package/types/components/flow-designer/index.d.ts +0 -7
  163. package/types/components/flow-designer/src/bm-nodes/AddCondition.d.ts +0 -26
  164. package/types/components/flow-designer/src/bm-nodes/AddFlowNode.d.ts +0 -29
  165. package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +0 -249
  166. package/types/components/flow-designer/src/bm-nodes/BmFlowHtmlNode.d.ts +0 -19
  167. package/types/components/flow-designer/src/bm-nodes/BmHtmlNode.vue.d.ts +0 -15
  168. package/types/components/flow-designer/src/bm-nodes/BmPolyLine.d.ts +0 -21
  169. package/types/components/flow-designer/src/bm-nodes/EndCircle.d.ts +0 -19
  170. package/types/components/flow-designer/src/config.d.ts +0 -24
  171. package/types/components/flow-designer/src/flow-designer-test.d.ts +0 -20
  172. package/types/components/flow-designer/src/flow-designer.d.ts +0 -11
  173. package/types/components/flow-designer/src/flow-designer.vue.d.ts +0 -6
  174. package/types/components/flow-designer/src/utils.d.ts +0 -29
  175. package/types/components/form-designer/index.d.ts +0 -9
  176. package/types/components/form-designer/src/form-designer.vue.d.ts +0 -8
  177. package/types/components/index.d.ts +0 -12
  178. package/types/components/input-tags-display/index.d.ts +0 -131
  179. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +0 -128
  180. package/types/components/over-tooltips/index.d.ts +0 -35
  181. package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +0 -34
  182. package/types/components/search-filter/index.d.ts +0 -223
  183. package/types/components/search-filter/src/search-filter.d.ts +0 -81
  184. package/types/components/search-filter/src/search-filter.vue.d.ts +0 -222
  185. package/types/components/search-filter/src/search-reset-btn.vue.d.ts +0 -106
  186. package/types/components/shops-filter/index.d.ts +0 -99
  187. package/types/components/shops-filter/src/shops-filter.d.ts +0 -25
  188. package/types/components/shops-filter/src/shops-filter.vue.d.ts +0 -98
  189. package/types/components/staffs-selector/index.d.ts +0 -109
  190. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -97
  191. package/types/components/staffs-selector/src/radioCmp.vue.d.ts +0 -31
  192. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +0 -108
  193. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +0 -62
  194. package/types/components/timeline/index.d.ts +0 -118
  195. package/types/components/timeline/src/props.d.ts +0 -27
  196. package/types/components/timeline/src/timeline-item.vue.d.ts +0 -66
  197. package/types/components/timeline/src/timeline.vue.d.ts +0 -52
  198. package/types/components/upload/index.d.ts +0 -138
  199. package/types/components/upload/src/icons.d.ts +0 -13
  200. package/types/components/upload/src/upload.vue.d.ts +0 -137
  201. package/types/components/upload/utils/index.d.ts +0 -7
  202. package/types/index.d.ts +0 -6
  203. package/types/utils/bm-admin-ui-resolver.d.ts +0 -9
  204. package/types/utils/vxe-table.d.ts +0 -6
  205. package/types/utils/with-install.d.ts +0 -3
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var withInstall = require('bm-admin-ui/lib/utils/with-install');
6
6
  var vue = require('vue');
7
+ var iconsVue = require('@ant-design/icons-vue');
7
8
  var input = require('ant-design-vue/lib/input');
8
9
  var Checkbox = require('ant-design-vue/lib/checkbox');
9
10
  var Button = require('ant-design-vue/lib/button');
@@ -17,1171 +18,6 @@ var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
17
18
  var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
18
19
  var Empty__default = /*#__PURE__*/_interopDefaultLegacy(Empty);
19
20
 
20
- /**
21
- * Take input from [0, n] and return it as [0, 1]
22
- * @hidden
23
- */
24
- function bound01(n, max) {
25
- if (isOnePointZero(n)) {
26
- n = '100%';
27
- }
28
- var isPercent = isPercentage(n);
29
- n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
30
- // Automatically convert percentage into number
31
- if (isPercent) {
32
- n = parseInt(String(n * max), 10) / 100;
33
- }
34
- // Handle floating point rounding errors
35
- if (Math.abs(n - max) < 0.000001) {
36
- return 1;
37
- }
38
- // Convert into [0, 1] range if it isn't already
39
- if (max === 360) {
40
- // If n is a hue given in degrees,
41
- // wrap around out-of-range values into [0, 360] range
42
- // then convert into [0, 1].
43
- n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));
44
- }
45
- else {
46
- // If n not a hue given in degrees
47
- // Convert into [0, 1] range if it isn't already.
48
- n = (n % max) / parseFloat(String(max));
49
- }
50
- return n;
51
- }
52
- /**
53
- * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
54
- * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
55
- * @hidden
56
- */
57
- function isOnePointZero(n) {
58
- return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
59
- }
60
- /**
61
- * Check to see if string passed in is a percentage
62
- * @hidden
63
- */
64
- function isPercentage(n) {
65
- return typeof n === 'string' && n.indexOf('%') !== -1;
66
- }
67
- /**
68
- * Return a valid alpha value [0,1] with all invalid values being set to 1
69
- * @hidden
70
- */
71
- function boundAlpha(a) {
72
- a = parseFloat(a);
73
- if (isNaN(a) || a < 0 || a > 1) {
74
- a = 1;
75
- }
76
- return a;
77
- }
78
- /**
79
- * Replace a decimal with it's percentage value
80
- * @hidden
81
- */
82
- function convertToPercentage(n) {
83
- if (n <= 1) {
84
- return Number(n) * 100 + "%";
85
- }
86
- return n;
87
- }
88
- /**
89
- * Force a hex value to have 2 characters
90
- * @hidden
91
- */
92
- function pad2(c) {
93
- return c.length === 1 ? '0' + c : String(c);
94
- }
95
-
96
- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
97
- // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
98
- /**
99
- * Handle bounds / percentage checking to conform to CSS color spec
100
- * <http://www.w3.org/TR/css3-color/>
101
- * *Assumes:* r, g, b in [0, 255] or [0, 1]
102
- * *Returns:* { r, g, b } in [0, 255]
103
- */
104
- function rgbToRgb(r, g, b) {
105
- return {
106
- r: bound01(r, 255) * 255,
107
- g: bound01(g, 255) * 255,
108
- b: bound01(b, 255) * 255,
109
- };
110
- }
111
- function hue2rgb(p, q, t) {
112
- if (t < 0) {
113
- t += 1;
114
- }
115
- if (t > 1) {
116
- t -= 1;
117
- }
118
- if (t < 1 / 6) {
119
- return p + (q - p) * (6 * t);
120
- }
121
- if (t < 1 / 2) {
122
- return q;
123
- }
124
- if (t < 2 / 3) {
125
- return p + (q - p) * (2 / 3 - t) * 6;
126
- }
127
- return p;
128
- }
129
- /**
130
- * Converts an HSL color value to RGB.
131
- *
132
- * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
133
- * *Returns:* { r, g, b } in the set [0, 255]
134
- */
135
- function hslToRgb(h, s, l) {
136
- var r;
137
- var g;
138
- var b;
139
- h = bound01(h, 360);
140
- s = bound01(s, 100);
141
- l = bound01(l, 100);
142
- if (s === 0) {
143
- // achromatic
144
- g = l;
145
- b = l;
146
- r = l;
147
- }
148
- else {
149
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
150
- var p = 2 * l - q;
151
- r = hue2rgb(p, q, h + 1 / 3);
152
- g = hue2rgb(p, q, h);
153
- b = hue2rgb(p, q, h - 1 / 3);
154
- }
155
- return { r: r * 255, g: g * 255, b: b * 255 };
156
- }
157
- /**
158
- * Converts an RGB color value to HSV
159
- *
160
- * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
161
- * *Returns:* { h, s, v } in [0,1]
162
- */
163
- function rgbToHsv(r, g, b) {
164
- r = bound01(r, 255);
165
- g = bound01(g, 255);
166
- b = bound01(b, 255);
167
- var max = Math.max(r, g, b);
168
- var min = Math.min(r, g, b);
169
- var h = 0;
170
- var v = max;
171
- var d = max - min;
172
- var s = max === 0 ? 0 : d / max;
173
- if (max === min) {
174
- h = 0; // achromatic
175
- }
176
- else {
177
- switch (max) {
178
- case r:
179
- h = (g - b) / d + (g < b ? 6 : 0);
180
- break;
181
- case g:
182
- h = (b - r) / d + 2;
183
- break;
184
- case b:
185
- h = (r - g) / d + 4;
186
- break;
187
- }
188
- h /= 6;
189
- }
190
- return { h: h, s: s, v: v };
191
- }
192
- /**
193
- * Converts an HSV color value to RGB.
194
- *
195
- * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
196
- * *Returns:* { r, g, b } in the set [0, 255]
197
- */
198
- function hsvToRgb(h, s, v) {
199
- h = bound01(h, 360) * 6;
200
- s = bound01(s, 100);
201
- v = bound01(v, 100);
202
- var i = Math.floor(h);
203
- var f = h - i;
204
- var p = v * (1 - s);
205
- var q = v * (1 - f * s);
206
- var t = v * (1 - (1 - f) * s);
207
- var mod = i % 6;
208
- var r = [v, q, p, p, t, v][mod];
209
- var g = [t, v, v, q, p, p][mod];
210
- var b = [p, p, t, v, v, q][mod];
211
- return { r: r * 255, g: g * 255, b: b * 255 };
212
- }
213
- /**
214
- * Converts an RGB color to hex
215
- *
216
- * Assumes r, g, and b are contained in the set [0, 255]
217
- * Returns a 3 or 6 character hex
218
- */
219
- function rgbToHex(r, g, b, allow3Char) {
220
- var hex = [
221
- pad2(Math.round(r).toString(16)),
222
- pad2(Math.round(g).toString(16)),
223
- pad2(Math.round(b).toString(16)),
224
- ];
225
- // Return a 3 character hex if possible
226
- if (allow3Char &&
227
- hex[0].startsWith(hex[0].charAt(1)) &&
228
- hex[1].startsWith(hex[1].charAt(1)) &&
229
- hex[2].startsWith(hex[2].charAt(1))) {
230
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
231
- }
232
- return hex.join('');
233
- }
234
- /** Converts a hex value to a decimal */
235
- function convertHexToDecimal(h) {
236
- return parseIntFromHex(h) / 255;
237
- }
238
- /** Parse a base-16 hex value into a base-10 integer */
239
- function parseIntFromHex(val) {
240
- return parseInt(val, 16);
241
- }
242
-
243
- // https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json
244
- /**
245
- * @hidden
246
- */
247
- var names = {
248
- aliceblue: '#f0f8ff',
249
- antiquewhite: '#faebd7',
250
- aqua: '#00ffff',
251
- aquamarine: '#7fffd4',
252
- azure: '#f0ffff',
253
- beige: '#f5f5dc',
254
- bisque: '#ffe4c4',
255
- black: '#000000',
256
- blanchedalmond: '#ffebcd',
257
- blue: '#0000ff',
258
- blueviolet: '#8a2be2',
259
- brown: '#a52a2a',
260
- burlywood: '#deb887',
261
- cadetblue: '#5f9ea0',
262
- chartreuse: '#7fff00',
263
- chocolate: '#d2691e',
264
- coral: '#ff7f50',
265
- cornflowerblue: '#6495ed',
266
- cornsilk: '#fff8dc',
267
- crimson: '#dc143c',
268
- cyan: '#00ffff',
269
- darkblue: '#00008b',
270
- darkcyan: '#008b8b',
271
- darkgoldenrod: '#b8860b',
272
- darkgray: '#a9a9a9',
273
- darkgreen: '#006400',
274
- darkgrey: '#a9a9a9',
275
- darkkhaki: '#bdb76b',
276
- darkmagenta: '#8b008b',
277
- darkolivegreen: '#556b2f',
278
- darkorange: '#ff8c00',
279
- darkorchid: '#9932cc',
280
- darkred: '#8b0000',
281
- darksalmon: '#e9967a',
282
- darkseagreen: '#8fbc8f',
283
- darkslateblue: '#483d8b',
284
- darkslategray: '#2f4f4f',
285
- darkslategrey: '#2f4f4f',
286
- darkturquoise: '#00ced1',
287
- darkviolet: '#9400d3',
288
- deeppink: '#ff1493',
289
- deepskyblue: '#00bfff',
290
- dimgray: '#696969',
291
- dimgrey: '#696969',
292
- dodgerblue: '#1e90ff',
293
- firebrick: '#b22222',
294
- floralwhite: '#fffaf0',
295
- forestgreen: '#228b22',
296
- fuchsia: '#ff00ff',
297
- gainsboro: '#dcdcdc',
298
- ghostwhite: '#f8f8ff',
299
- goldenrod: '#daa520',
300
- gold: '#ffd700',
301
- gray: '#808080',
302
- green: '#008000',
303
- greenyellow: '#adff2f',
304
- grey: '#808080',
305
- honeydew: '#f0fff0',
306
- hotpink: '#ff69b4',
307
- indianred: '#cd5c5c',
308
- indigo: '#4b0082',
309
- ivory: '#fffff0',
310
- khaki: '#f0e68c',
311
- lavenderblush: '#fff0f5',
312
- lavender: '#e6e6fa',
313
- lawngreen: '#7cfc00',
314
- lemonchiffon: '#fffacd',
315
- lightblue: '#add8e6',
316
- lightcoral: '#f08080',
317
- lightcyan: '#e0ffff',
318
- lightgoldenrodyellow: '#fafad2',
319
- lightgray: '#d3d3d3',
320
- lightgreen: '#90ee90',
321
- lightgrey: '#d3d3d3',
322
- lightpink: '#ffb6c1',
323
- lightsalmon: '#ffa07a',
324
- lightseagreen: '#20b2aa',
325
- lightskyblue: '#87cefa',
326
- lightslategray: '#778899',
327
- lightslategrey: '#778899',
328
- lightsteelblue: '#b0c4de',
329
- lightyellow: '#ffffe0',
330
- lime: '#00ff00',
331
- limegreen: '#32cd32',
332
- linen: '#faf0e6',
333
- magenta: '#ff00ff',
334
- maroon: '#800000',
335
- mediumaquamarine: '#66cdaa',
336
- mediumblue: '#0000cd',
337
- mediumorchid: '#ba55d3',
338
- mediumpurple: '#9370db',
339
- mediumseagreen: '#3cb371',
340
- mediumslateblue: '#7b68ee',
341
- mediumspringgreen: '#00fa9a',
342
- mediumturquoise: '#48d1cc',
343
- mediumvioletred: '#c71585',
344
- midnightblue: '#191970',
345
- mintcream: '#f5fffa',
346
- mistyrose: '#ffe4e1',
347
- moccasin: '#ffe4b5',
348
- navajowhite: '#ffdead',
349
- navy: '#000080',
350
- oldlace: '#fdf5e6',
351
- olive: '#808000',
352
- olivedrab: '#6b8e23',
353
- orange: '#ffa500',
354
- orangered: '#ff4500',
355
- orchid: '#da70d6',
356
- palegoldenrod: '#eee8aa',
357
- palegreen: '#98fb98',
358
- paleturquoise: '#afeeee',
359
- palevioletred: '#db7093',
360
- papayawhip: '#ffefd5',
361
- peachpuff: '#ffdab9',
362
- peru: '#cd853f',
363
- pink: '#ffc0cb',
364
- plum: '#dda0dd',
365
- powderblue: '#b0e0e6',
366
- purple: '#800080',
367
- rebeccapurple: '#663399',
368
- red: '#ff0000',
369
- rosybrown: '#bc8f8f',
370
- royalblue: '#4169e1',
371
- saddlebrown: '#8b4513',
372
- salmon: '#fa8072',
373
- sandybrown: '#f4a460',
374
- seagreen: '#2e8b57',
375
- seashell: '#fff5ee',
376
- sienna: '#a0522d',
377
- silver: '#c0c0c0',
378
- skyblue: '#87ceeb',
379
- slateblue: '#6a5acd',
380
- slategray: '#708090',
381
- slategrey: '#708090',
382
- snow: '#fffafa',
383
- springgreen: '#00ff7f',
384
- steelblue: '#4682b4',
385
- tan: '#d2b48c',
386
- teal: '#008080',
387
- thistle: '#d8bfd8',
388
- tomato: '#ff6347',
389
- turquoise: '#40e0d0',
390
- violet: '#ee82ee',
391
- wheat: '#f5deb3',
392
- white: '#ffffff',
393
- whitesmoke: '#f5f5f5',
394
- yellow: '#ffff00',
395
- yellowgreen: '#9acd32',
396
- };
397
-
398
- /**
399
- * Given a string or object, convert that input to RGB
400
- *
401
- * Possible string inputs:
402
- * ```
403
- * "red"
404
- * "#f00" or "f00"
405
- * "#ff0000" or "ff0000"
406
- * "#ff000000" or "ff000000"
407
- * "rgb 255 0 0" or "rgb (255, 0, 0)"
408
- * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
409
- * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
410
- * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
411
- * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
412
- * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
413
- * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
414
- * ```
415
- */
416
- function inputToRGB(color) {
417
- var rgb = { r: 0, g: 0, b: 0 };
418
- var a = 1;
419
- var s = null;
420
- var v = null;
421
- var l = null;
422
- var ok = false;
423
- var format = false;
424
- if (typeof color === 'string') {
425
- color = stringInputToObject(color);
426
- }
427
- if (typeof color === 'object') {
428
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
429
- rgb = rgbToRgb(color.r, color.g, color.b);
430
- ok = true;
431
- format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';
432
- }
433
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
434
- s = convertToPercentage(color.s);
435
- v = convertToPercentage(color.v);
436
- rgb = hsvToRgb(color.h, s, v);
437
- ok = true;
438
- format = 'hsv';
439
- }
440
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
441
- s = convertToPercentage(color.s);
442
- l = convertToPercentage(color.l);
443
- rgb = hslToRgb(color.h, s, l);
444
- ok = true;
445
- format = 'hsl';
446
- }
447
- if (Object.prototype.hasOwnProperty.call(color, 'a')) {
448
- a = color.a;
449
- }
450
- }
451
- a = boundAlpha(a);
452
- return {
453
- ok: ok,
454
- format: color.format || format,
455
- r: Math.min(255, Math.max(rgb.r, 0)),
456
- g: Math.min(255, Math.max(rgb.g, 0)),
457
- b: Math.min(255, Math.max(rgb.b, 0)),
458
- a: a,
459
- };
460
- }
461
- // <http://www.w3.org/TR/css3-values/#integers>
462
- var CSS_INTEGER = '[-\\+]?\\d+%?';
463
- // <http://www.w3.org/TR/css3-values/#number-value>
464
- var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
465
- // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
466
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
467
- // Actual matching.
468
- // Parentheses and commas are optional, but not required.
469
- // Whitespace can take the place of commas or opening paren
470
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
471
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
472
- var matchers = {
473
- CSS_UNIT: new RegExp(CSS_UNIT),
474
- rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
475
- rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),
476
- hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),
477
- hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),
478
- hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),
479
- hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),
480
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
481
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
482
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
483
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
484
- };
485
- /**
486
- * Permissive string parsing. Take in a number of formats, and output an object
487
- * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
488
- */
489
- function stringInputToObject(color) {
490
- color = color.trim().toLowerCase();
491
- if (color.length === 0) {
492
- return false;
493
- }
494
- var named = false;
495
- if (names[color]) {
496
- color = names[color];
497
- named = true;
498
- }
499
- else if (color === 'transparent') {
500
- return { r: 0, g: 0, b: 0, a: 0, format: 'name' };
501
- }
502
- // Try to match string input using regular expressions.
503
- // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
504
- // Just return an object and let the conversion functions handle that.
505
- // This way the result will be the same whether the tinycolor is initialized with string or object.
506
- var match = matchers.rgb.exec(color);
507
- if (match) {
508
- return { r: match[1], g: match[2], b: match[3] };
509
- }
510
- match = matchers.rgba.exec(color);
511
- if (match) {
512
- return { r: match[1], g: match[2], b: match[3], a: match[4] };
513
- }
514
- match = matchers.hsl.exec(color);
515
- if (match) {
516
- return { h: match[1], s: match[2], l: match[3] };
517
- }
518
- match = matchers.hsla.exec(color);
519
- if (match) {
520
- return { h: match[1], s: match[2], l: match[3], a: match[4] };
521
- }
522
- match = matchers.hsv.exec(color);
523
- if (match) {
524
- return { h: match[1], s: match[2], v: match[3] };
525
- }
526
- match = matchers.hsva.exec(color);
527
- if (match) {
528
- return { h: match[1], s: match[2], v: match[3], a: match[4] };
529
- }
530
- match = matchers.hex8.exec(color);
531
- if (match) {
532
- return {
533
- r: parseIntFromHex(match[1]),
534
- g: parseIntFromHex(match[2]),
535
- b: parseIntFromHex(match[3]),
536
- a: convertHexToDecimal(match[4]),
537
- format: named ? 'name' : 'hex8',
538
- };
539
- }
540
- match = matchers.hex6.exec(color);
541
- if (match) {
542
- return {
543
- r: parseIntFromHex(match[1]),
544
- g: parseIntFromHex(match[2]),
545
- b: parseIntFromHex(match[3]),
546
- format: named ? 'name' : 'hex',
547
- };
548
- }
549
- match = matchers.hex4.exec(color);
550
- if (match) {
551
- return {
552
- r: parseIntFromHex(match[1] + match[1]),
553
- g: parseIntFromHex(match[2] + match[2]),
554
- b: parseIntFromHex(match[3] + match[3]),
555
- a: convertHexToDecimal(match[4] + match[4]),
556
- format: named ? 'name' : 'hex8',
557
- };
558
- }
559
- match = matchers.hex3.exec(color);
560
- if (match) {
561
- return {
562
- r: parseIntFromHex(match[1] + match[1]),
563
- g: parseIntFromHex(match[2] + match[2]),
564
- b: parseIntFromHex(match[3] + match[3]),
565
- format: named ? 'name' : 'hex',
566
- };
567
- }
568
- return false;
569
- }
570
- /**
571
- * Check to see if it looks like a CSS unit
572
- * (see `matchers` above for definition).
573
- */
574
- function isValidCSSUnit(color) {
575
- return Boolean(matchers.CSS_UNIT.exec(String(color)));
576
- }
577
-
578
- var hueStep = 2; // 色相阶梯
579
-
580
- var saturationStep = 0.16; // 饱和度阶梯,浅色部分
581
-
582
- var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
583
-
584
- var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
585
-
586
- var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
587
-
588
- var lightColorCount = 5; // 浅色数量,主色上
589
-
590
- var darkColorCount = 4; // 深色数量,主色下
591
- // 暗色主题颜色映射关系表
592
-
593
- var darkColorMap = [{
594
- index: 7,
595
- opacity: 0.15
596
- }, {
597
- index: 6,
598
- opacity: 0.25
599
- }, {
600
- index: 5,
601
- opacity: 0.3
602
- }, {
603
- index: 5,
604
- opacity: 0.45
605
- }, {
606
- index: 5,
607
- opacity: 0.65
608
- }, {
609
- index: 5,
610
- opacity: 0.85
611
- }, {
612
- index: 4,
613
- opacity: 0.9
614
- }, {
615
- index: 3,
616
- opacity: 0.95
617
- }, {
618
- index: 2,
619
- opacity: 0.97
620
- }, {
621
- index: 1,
622
- opacity: 0.98
623
- }]; // Wrapper function ported from TinyColor.prototype.toHsv
624
- // Keep it here because of `hsv.h * 360`
625
-
626
- function toHsv(_ref) {
627
- var r = _ref.r,
628
- g = _ref.g,
629
- b = _ref.b;
630
- var hsv = rgbToHsv(r, g, b);
631
- return {
632
- h: hsv.h * 360,
633
- s: hsv.s,
634
- v: hsv.v
635
- };
636
- } // Wrapper function ported from TinyColor.prototype.toHexString
637
- // Keep it here because of the prefix `#`
638
-
639
-
640
- function toHex(_ref2) {
641
- var r = _ref2.r,
642
- g = _ref2.g,
643
- b = _ref2.b;
644
- return "#".concat(rgbToHex(r, g, b, false));
645
- } // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
646
- // Amount in range [0, 1]
647
- // Assume color1 & color2 has no alpha, since the following src code did so.
648
-
649
-
650
- function mix(rgb1, rgb2, amount) {
651
- var p = amount / 100;
652
- var rgb = {
653
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
654
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
655
- b: (rgb2.b - rgb1.b) * p + rgb1.b
656
- };
657
- return rgb;
658
- }
659
-
660
- function getHue(hsv, i, light) {
661
- var hue; // 根据色相不同,色相转向不同
662
-
663
- if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
664
- hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
665
- } else {
666
- hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
667
- }
668
-
669
- if (hue < 0) {
670
- hue += 360;
671
- } else if (hue >= 360) {
672
- hue -= 360;
673
- }
674
-
675
- return hue;
676
- }
677
-
678
- function getSaturation(hsv, i, light) {
679
- // grey color don't change saturation
680
- if (hsv.h === 0 && hsv.s === 0) {
681
- return hsv.s;
682
- }
683
-
684
- var saturation;
685
-
686
- if (light) {
687
- saturation = hsv.s - saturationStep * i;
688
- } else if (i === darkColorCount) {
689
- saturation = hsv.s + saturationStep;
690
- } else {
691
- saturation = hsv.s + saturationStep2 * i;
692
- } // 边界值修正
693
-
694
-
695
- if (saturation > 1) {
696
- saturation = 1;
697
- } // 第一格的 s 限制在 0.06-0.1 之间
698
-
699
-
700
- if (light && i === lightColorCount && saturation > 0.1) {
701
- saturation = 0.1;
702
- }
703
-
704
- if (saturation < 0.06) {
705
- saturation = 0.06;
706
- }
707
-
708
- return Number(saturation.toFixed(2));
709
- }
710
-
711
- function getValue(hsv, i, light) {
712
- var value;
713
-
714
- if (light) {
715
- value = hsv.v + brightnessStep1 * i;
716
- } else {
717
- value = hsv.v - brightnessStep2 * i;
718
- }
719
-
720
- if (value > 1) {
721
- value = 1;
722
- }
723
-
724
- return Number(value.toFixed(2));
725
- }
726
-
727
- function generate$1(color) {
728
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
729
- var patterns = [];
730
- var pColor = inputToRGB(color);
731
-
732
- for (var i = lightColorCount; i > 0; i -= 1) {
733
- var hsv = toHsv(pColor);
734
- var colorString = toHex(inputToRGB({
735
- h: getHue(hsv, i, true),
736
- s: getSaturation(hsv, i, true),
737
- v: getValue(hsv, i, true)
738
- }));
739
- patterns.push(colorString);
740
- }
741
-
742
- patterns.push(toHex(pColor));
743
-
744
- for (var _i = 1; _i <= darkColorCount; _i += 1) {
745
- var _hsv = toHsv(pColor);
746
-
747
- var _colorString = toHex(inputToRGB({
748
- h: getHue(_hsv, _i),
749
- s: getSaturation(_hsv, _i),
750
- v: getValue(_hsv, _i)
751
- }));
752
-
753
- patterns.push(_colorString);
754
- } // dark theme patterns
755
-
756
-
757
- if (opts.theme === 'dark') {
758
- return darkColorMap.map(function (_ref3) {
759
- var index = _ref3.index,
760
- opacity = _ref3.opacity;
761
- var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));
762
- return darkColorString;
763
- });
764
- }
765
-
766
- return patterns;
767
- }
768
-
769
- var presetPrimaryColors = {
770
- red: '#F5222D',
771
- volcano: '#FA541C',
772
- orange: '#FA8C16',
773
- gold: '#FAAD14',
774
- yellow: '#FADB14',
775
- lime: '#A0D911',
776
- green: '#52C41A',
777
- cyan: '#13C2C2',
778
- blue: '#1890FF',
779
- geekblue: '#2F54EB',
780
- purple: '#722ED1',
781
- magenta: '#EB2F96',
782
- grey: '#666666'
783
- };
784
- var presetPalettes = {};
785
- var presetDarkPalettes = {};
786
- Object.keys(presetPrimaryColors).forEach(function (key) {
787
- presetPalettes[key] = generate$1(presetPrimaryColors[key]);
788
- presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes
789
-
790
- presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
791
- theme: 'dark',
792
- backgroundColor: '#141414'
793
- });
794
- presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
795
- });
796
- presetPalettes.red;
797
- presetPalettes.volcano;
798
- presetPalettes.gold;
799
- presetPalettes.orange;
800
- presetPalettes.yellow;
801
- presetPalettes.lime;
802
- presetPalettes.green;
803
- presetPalettes.cyan;
804
- presetPalettes.blue;
805
- presetPalettes.geekblue;
806
- presetPalettes.purple;
807
- presetPalettes.magenta;
808
- presetPalettes.grey;
809
-
810
- // https://github.com/substack/insert-css
811
- var containers = []; // will store container HTMLElement references
812
-
813
- var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}
814
-
815
- var usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';
816
-
817
- function createStyleElement() {
818
- var styleElement = document.createElement('style');
819
- styleElement.setAttribute('type', 'text/css');
820
- return styleElement;
821
- } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
822
-
823
-
824
- function insertCss(css, options) {
825
- options = options || {};
826
-
827
- if (css === undefined) {
828
- throw new Error(usage);
829
- }
830
-
831
- var position = options.prepend === true ? 'prepend' : 'append';
832
- var container = options.container !== undefined ? options.container : document.querySelector('head');
833
- var containerId = containers.indexOf(container); // first time we see this container, create the necessary entries
834
-
835
- if (containerId === -1) {
836
- containerId = containers.push(container) - 1;
837
- styleElements[containerId] = {};
838
- } // try to get the correponding container + position styleElement, create it otherwise
839
-
840
-
841
- var styleElement;
842
-
843
- if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {
844
- styleElement = styleElements[containerId][position];
845
- } else {
846
- styleElement = styleElements[containerId][position] = createStyleElement();
847
-
848
- if (position === 'prepend') {
849
- container.insertBefore(styleElement, container.childNodes[0]);
850
- } else {
851
- container.appendChild(styleElement);
852
- }
853
- } // strip potential UTF-8 BOM if css was read from a file
854
-
855
-
856
- if (css.charCodeAt(0) === 0xfeff) {
857
- css = css.substr(1, css.length);
858
- } // actually add the stylesheet
859
-
860
-
861
- if (styleElement.styleSheet) {
862
- styleElement.styleSheet.cssText += css;
863
- } else {
864
- styleElement.textContent += css;
865
- }
866
-
867
- return styleElement;
868
- }
869
-
870
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$5(target, key, source[key]); }); } return target; }
871
-
872
- function _defineProperty$5(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
873
- function warn(valid, message) {
874
- // Support uglify
875
- if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
876
- console.error("Warning: ".concat(message));
877
- }
878
- }
879
- function warning(valid, message) {
880
- warn(valid, "[@ant-design/icons-vue] ".concat(message));
881
- } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
882
-
883
- function isIconDefinition(target) {
884
- return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function');
885
- }
886
- function generate(node, key, rootProps) {
887
- if (!rootProps) {
888
- return vue.h(node.tag, _objectSpread$5({
889
- key: key
890
- }, node.attrs), (node.children || []).map(function (child, index) {
891
- return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
892
- }));
893
- }
894
-
895
- return vue.h(node.tag, _objectSpread$5({
896
- key: key
897
- }, rootProps, node.attrs), (node.children || []).map(function (child, index) {
898
- return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
899
- }));
900
- }
901
- function getSecondaryColor(primaryColor) {
902
- // choose the second color
903
- return generate$1(primaryColor)[0];
904
- }
905
- function normalizeTwoToneColors(twoToneColor) {
906
- if (!twoToneColor) {
907
- return [];
908
- }
909
-
910
- return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
911
- } // These props make sure that the SVG behaviours like general text.
912
- var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
913
- var cssInjectedFlag = false;
914
- var useInsertStyles = function useInsertStyles() {
915
- var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
916
- vue.nextTick(function () {
917
- if (!cssInjectedFlag) {
918
- if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
919
- insertCss(styleStr, {
920
- prepend: true
921
- });
922
- }
923
-
924
- cssInjectedFlag = true;
925
- }
926
- });
927
- };
928
-
929
- var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
930
-
931
- function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
932
-
933
- function _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
934
-
935
- function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } return target; }
936
-
937
- function _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
938
- var twoToneColorPalette = {
939
- primaryColor: '#333',
940
- secondaryColor: '#E6E6E6',
941
- calculated: false
942
- };
943
-
944
- function setTwoToneColors(_ref) {
945
- var primaryColor = _ref.primaryColor,
946
- secondaryColor = _ref.secondaryColor;
947
- twoToneColorPalette.primaryColor = primaryColor;
948
- twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
949
- twoToneColorPalette.calculated = !!secondaryColor;
950
- }
951
-
952
- function getTwoToneColors() {
953
- return _objectSpread$4({}, twoToneColorPalette);
954
- }
955
-
956
- var IconBase = function IconBase(props, context) {
957
- var _props$context$attrs = _objectSpread$4({}, props, context.attrs),
958
- icon = _props$context$attrs.icon,
959
- primaryColor = _props$context$attrs.primaryColor,
960
- secondaryColor = _props$context$attrs.secondaryColor,
961
- restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
962
-
963
- var colors = twoToneColorPalette;
964
-
965
- if (primaryColor) {
966
- colors = {
967
- primaryColor: primaryColor,
968
- secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
969
- };
970
- }
971
-
972
- useInsertStyles();
973
- warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
974
-
975
- if (!isIconDefinition(icon)) {
976
- return null;
977
- }
978
-
979
- var target = icon;
980
-
981
- if (target && typeof target.icon === 'function') {
982
- target = _objectSpread$4({}, target, {
983
- icon: target.icon(colors.primaryColor, colors.secondaryColor)
984
- });
985
- }
986
-
987
- return generate(target.icon, "svg-".concat(target.name), _objectSpread$4({}, restProps, {
988
- 'data-icon': target.name,
989
- width: '1em',
990
- height: '1em',
991
- fill: 'currentColor',
992
- 'aria-hidden': 'true'
993
- })); // },
994
- };
995
-
996
- IconBase.props = {
997
- icon: Object,
998
- primaryColor: String,
999
- secondaryColor: String,
1000
- focusable: String
1001
- };
1002
- IconBase.inheritAttrs = false;
1003
- IconBase.displayName = 'IconBase';
1004
- IconBase.getTwoToneColors = getTwoToneColors;
1005
- IconBase.setTwoToneColors = setTwoToneColors;
1006
- var VueIcon = IconBase;
1007
-
1008
- function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1(); }
1009
-
1010
- function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1011
-
1012
- function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
1013
-
1014
- function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1015
-
1016
- function _iterableToArrayLimit$1(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1017
-
1018
- function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }
1019
- function setTwoToneColor(twoToneColor) {
1020
- var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1021
- _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
1022
- primaryColor = _normalizeTwoToneColo2[0],
1023
- secondaryColor = _normalizeTwoToneColo2[1];
1024
-
1025
- return VueIcon.setTwoToneColors({
1026
- primaryColor: primaryColor,
1027
- secondaryColor: secondaryColor
1028
- });
1029
- }
1030
- function getTwoToneColor() {
1031
- var colors = VueIcon.getTwoToneColors();
1032
-
1033
- if (!colors.calculated) {
1034
- return colors.primaryColor;
1035
- }
1036
-
1037
- return [colors.primaryColor, colors.secondaryColor];
1038
- }
1039
-
1040
- var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
1041
-
1042
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1043
-
1044
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1045
-
1046
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1047
-
1048
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1049
-
1050
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1051
-
1052
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1053
-
1054
- function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }
1055
-
1056
- function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1057
-
1058
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1059
-
1060
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1061
-
1062
- setTwoToneColor('#1890ff');
1063
-
1064
- var Icon = function Icon(props, context) {
1065
- var _classObj;
1066
-
1067
- var _props$context$attrs = _objectSpread$3({}, props, context.attrs),
1068
- cls = _props$context$attrs["class"],
1069
- icon = _props$context$attrs.icon,
1070
- spin = _props$context$attrs.spin,
1071
- rotate = _props$context$attrs.rotate,
1072
- tabindex = _props$context$attrs.tabindex,
1073
- twoToneColor = _props$context$attrs.twoToneColor,
1074
- onClick = _props$context$attrs.onClick,
1075
- restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
1076
-
1077
- var classObj = (_classObj = {
1078
- anticon: true
1079
- }, _defineProperty$3(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$3(_classObj, cls, cls), _classObj);
1080
- var svgClassString = spin === '' || !!spin || icon.name === 'loading' ? 'anticon-spin' : '';
1081
- var iconTabIndex = tabindex;
1082
-
1083
- if (iconTabIndex === undefined && onClick) {
1084
- iconTabIndex = -1;
1085
- restProps.tabindex = iconTabIndex;
1086
- }
1087
-
1088
- var svgStyle = rotate ? {
1089
- msTransform: "rotate(".concat(rotate, "deg)"),
1090
- transform: "rotate(".concat(rotate, "deg)")
1091
- } : undefined;
1092
-
1093
- var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1094
- _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
1095
- primaryColor = _normalizeTwoToneColo2[0],
1096
- secondaryColor = _normalizeTwoToneColo2[1];
1097
-
1098
- return vue.createVNode("span", _objectSpread$3({
1099
- "role": "img",
1100
- "aria-label": icon.name
1101
- }, restProps, {
1102
- "onClick": onClick,
1103
- "class": classObj
1104
- }), [vue.createVNode(VueIcon, {
1105
- "class": svgClassString,
1106
- "icon": icon,
1107
- "primaryColor": primaryColor,
1108
- "secondaryColor": secondaryColor,
1109
- "style": svgStyle
1110
- }, null)]);
1111
- };
1112
-
1113
- Icon.props = {
1114
- spin: Boolean,
1115
- rotate: Number,
1116
- icon: Object,
1117
- twoToneColor: String
1118
- };
1119
- Icon.displayName = 'AntdIcon';
1120
- Icon.inheritAttrs = false;
1121
- Icon.getTwoToneColor = getTwoToneColor;
1122
- Icon.setTwoToneColor = setTwoToneColor;
1123
- var AntdIcon = Icon;
1124
-
1125
- // This icon file is generated automatically.
1126
- var CloseCircleFilled$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" } }] }, "name": "close-circle", "theme": "filled" };
1127
- var CloseCircleFilledSvg = CloseCircleFilled$2;
1128
-
1129
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }
1130
-
1131
- function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1132
-
1133
- var CloseCircleFilled = function CloseCircleFilled(props, context) {
1134
- var p = _objectSpread$2({}, props, context.attrs);
1135
-
1136
- return vue.createVNode(AntdIcon, _objectSpread$2({}, p, {
1137
- "icon": CloseCircleFilledSvg
1138
- }), null);
1139
- };
1140
-
1141
- CloseCircleFilled.displayName = 'CloseCircleFilled';
1142
- CloseCircleFilled.inheritAttrs = false;
1143
- var CloseCircleFilled$1 = CloseCircleFilled;
1144
-
1145
- // This icon file is generated automatically.
1146
- var DeleteOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
1147
- var DeleteOutlinedSvg = DeleteOutlined$2;
1148
-
1149
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }
1150
-
1151
- function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1152
-
1153
- var DeleteOutlined = function DeleteOutlined(props, context) {
1154
- var p = _objectSpread$1({}, props, context.attrs);
1155
-
1156
- return vue.createVNode(AntdIcon, _objectSpread$1({}, p, {
1157
- "icon": DeleteOutlinedSvg
1158
- }), null);
1159
- };
1160
-
1161
- DeleteOutlined.displayName = 'DeleteOutlined';
1162
- DeleteOutlined.inheritAttrs = false;
1163
- var DeleteOutlined$1 = DeleteOutlined;
1164
-
1165
- // This icon file is generated automatically.
1166
- var DownOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
1167
- var DownOutlinedSvg = DownOutlined$2;
1168
-
1169
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
1170
-
1171
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1172
-
1173
- var DownOutlined = function DownOutlined(props, context) {
1174
- var p = _objectSpread({}, props, context.attrs);
1175
-
1176
- return vue.createVNode(AntdIcon, _objectSpread({}, p, {
1177
- "icon": DownOutlinedSvg
1178
- }), null);
1179
- };
1180
-
1181
- DownOutlined.displayName = 'DownOutlined';
1182
- DownOutlined.inheritAttrs = false;
1183
- var DownOutlined$1 = DownOutlined;
1184
-
1185
21
  var _export_sfc = (sfc, props) => {
1186
22
  const target = sfc.__vccOpts || sfc;
1187
23
  for (const [key, val] of props) {
@@ -1193,9 +29,9 @@ var _export_sfc = (sfc, props) => {
1193
29
  const _sfc_main = vue.defineComponent({
1194
30
  name: "BmShopsFilter",
1195
31
  components: {
1196
- DownOutlined: DownOutlined$1,
1197
- DeleteOutlined: DeleteOutlined$1,
1198
- CloseCircleFilled: CloseCircleFilled$1,
32
+ DownOutlined: iconsVue.DownOutlined,
33
+ DeleteOutlined: iconsVue.DeleteOutlined,
34
+ CloseCircleFilled: iconsVue.CloseCircleFilled,
1199
35
  InputSearch: input.InputSearch,
1200
36
  Checkbox: Checkbox__default["default"],
1201
37
  Button: Button__default["default"],
@@ -1350,22 +186,28 @@ const _sfc_main = vue.defineComponent({
1350
186
  };
1351
187
  props.loadFilter().then((data) => {
1352
188
  state.filterArr = data;
1353
- state.filterSelects = state.filterArr.map((item) => {
1354
- return item.multiple ? [] : "";
1355
- });
189
+ state.filterSelects = state.filterArr.map(
190
+ (item) => {
191
+ return item.multiple ? [] : "";
192
+ }
193
+ );
1356
194
  }).finally(() => {
1357
195
  methods.fetchData();
1358
196
  });
1359
- vue.watch(() => state.shopCheck, () => {
1360
- let list = [];
1361
- for (let [key, value] of Object.entries(state.shopCheck)) {
1362
- value && list.push(key);
1363
- }
1364
- state.selected = list;
1365
- emit("update:selected", list);
1366
- emit("change", list);
1367
- methods.checkboxChange();
1368
- }, { deep: true });
197
+ vue.watch(
198
+ () => state.shopCheck,
199
+ () => {
200
+ let list = [];
201
+ for (let [key, value] of Object.entries(state.shopCheck)) {
202
+ value && list.push(key);
203
+ }
204
+ state.selected = list;
205
+ emit("update:selected", list);
206
+ emit("change", list);
207
+ methods.checkboxChange();
208
+ },
209
+ { deep: true }
210
+ );
1369
211
  if (props.showAlways) {
1370
212
  state.isActive = true;
1371
213
  }