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