vxe-pc-ui 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/es/button/src/button.js +3 -0
  2. package/es/carousel/index.js +12 -0
  3. package/es/carousel/src/carousel-item.js +100 -0
  4. package/es/carousel/src/carousel.js +418 -0
  5. package/es/carousel/src/util.js +17 -0
  6. package/es/carousel/style.css +185 -0
  7. package/es/carousel/style.min.css +1 -0
  8. package/es/carousel-item/index.js +12 -0
  9. package/es/carousel-item/style.css +0 -0
  10. package/es/carousel-item/style.min.css +0 -0
  11. package/es/checkbox/index.js +12 -0
  12. package/es/checkbox/src/checkbox.js +159 -0
  13. package/es/checkbox/src/group.js +154 -0
  14. package/es/checkbox/style.css +117 -0
  15. package/es/checkbox/style.min.css +1 -0
  16. package/es/checkbox-group/index.js +12 -0
  17. package/es/checkbox-group/style.css +0 -0
  18. package/es/checkbox-group/style.min.css +0 -0
  19. package/es/components.js +39 -39
  20. package/es/date-picker/src/date-picker.js +3 -0
  21. package/es/icon/style.css +1 -1
  22. package/es/icon-picker/index.js +12 -0
  23. package/es/icon-picker/src/icon-picker.js +668 -0
  24. package/es/icon-picker/style.css +207 -0
  25. package/es/icon-picker/style.min.css +1 -0
  26. package/es/input/index.js +12 -0
  27. package/es/input/src/input.js +2892 -0
  28. package/es/input/style.css +941 -0
  29. package/es/input/style.min.css +1 -0
  30. package/es/layout-footer/src/layout-footer.js +2 -1
  31. package/es/layout-header/src/layout-header.js +2 -1
  32. package/es/optgroup/index.js +12 -0
  33. package/es/optgroup/style.css +0 -0
  34. package/es/optgroup/style.min.css +0 -0
  35. package/es/option/index.js +12 -0
  36. package/es/option/style.css +0 -0
  37. package/es/option/style.min.css +0 -0
  38. package/es/pager/index.js +12 -0
  39. package/es/pager/src/pager.js +687 -0
  40. package/es/password-input/index.js +12 -0
  41. package/es/password-input/src/password-input.js +388 -0
  42. package/es/password-input/style.css +604 -0
  43. package/es/password-input/style.min.css +1 -0
  44. package/es/pulldown/src/pulldown.js +5 -1
  45. package/es/select/index.js +12 -0
  46. package/es/select/src/optgroup.js +90 -0
  47. package/es/select/src/option-info.js +16 -0
  48. package/es/select/src/option.js +86 -0
  49. package/es/select/src/select.js +1269 -0
  50. package/es/select/src/util.js +35 -0
  51. package/es/select/style.css +207 -0
  52. package/es/select/style.min.css +1 -0
  53. package/es/style.css +1 -1
  54. package/es/style.min.css +1 -1
  55. package/es/tab-pane/index.js +12 -0
  56. package/es/tab-pane/style.css +0 -0
  57. package/es/tab-pane/style.min.css +0 -0
  58. package/es/tabs/index.js +12 -0
  59. package/es/tabs/src/tab-pane.js +119 -0
  60. package/es/tabs/src/tabs.js +593 -0
  61. package/es/tabs/src/util.js +17 -0
  62. package/es/tabs/style.css +342 -0
  63. package/es/tabs/style.min.css +1 -0
  64. package/es/ui/index.js +1 -1
  65. package/es/ui/src/log.js +1 -1
  66. package/es/vxe-carousel/index.js +3 -0
  67. package/es/vxe-carousel/style.css +185 -0
  68. package/es/vxe-carousel/style.min.css +1 -0
  69. package/es/vxe-carousel-item/index.js +3 -0
  70. package/es/vxe-carousel-item/style.css +0 -0
  71. package/es/vxe-carousel-item/style.min.css +0 -0
  72. package/es/vxe-checkbox/index.js +3 -0
  73. package/es/vxe-checkbox/style.css +117 -0
  74. package/es/vxe-checkbox/style.min.css +1 -0
  75. package/es/vxe-checkbox-group/index.js +3 -0
  76. package/es/vxe-checkbox-group/style.css +0 -0
  77. package/es/vxe-checkbox-group/style.min.css +0 -0
  78. package/es/vxe-icon-picker/index.js +3 -0
  79. package/es/vxe-icon-picker/style.css +207 -0
  80. package/es/vxe-icon-picker/style.min.css +1 -0
  81. package/es/vxe-input/index.js +3 -0
  82. package/es/vxe-input/style.css +941 -0
  83. package/es/vxe-input/style.min.css +1 -0
  84. package/es/vxe-optgroup/index.js +3 -0
  85. package/es/vxe-optgroup/style.css +0 -0
  86. package/es/vxe-optgroup/style.min.css +0 -0
  87. package/es/vxe-option/index.js +3 -0
  88. package/es/vxe-option/style.css +0 -0
  89. package/es/vxe-option/style.min.css +0 -0
  90. package/es/vxe-password-input/index.js +3 -0
  91. package/es/vxe-password-input/style.css +604 -0
  92. package/es/vxe-password-input/style.min.css +1 -0
  93. package/es/vxe-select/index.js +3 -0
  94. package/es/vxe-select/style.css +207 -0
  95. package/es/vxe-select/style.min.css +1 -0
  96. package/es/vxe-tab-pane/index.js +3 -0
  97. package/es/vxe-tab-pane/style.css +0 -0
  98. package/es/vxe-tab-pane/style.min.css +0 -0
  99. package/es/vxe-tabs/index.js +3 -0
  100. package/es/vxe-tabs/style.css +342 -0
  101. package/es/vxe-tabs/style.min.css +1 -0
  102. package/lib/button/src/button.js +3 -0
  103. package/lib/button/src/button.min.js +1 -1
  104. package/lib/carousel/index.js +19 -0
  105. package/lib/carousel/index.min.js +1 -0
  106. package/lib/carousel/src/carousel-item.js +107 -0
  107. package/lib/carousel/src/carousel-item.min.js +1 -0
  108. package/lib/carousel/src/carousel.js +437 -0
  109. package/lib/carousel/src/carousel.min.js +1 -0
  110. package/lib/carousel/src/util.js +27 -0
  111. package/lib/carousel/src/util.min.js +1 -0
  112. package/lib/carousel/style/index.js +1 -0
  113. package/lib/carousel/style/style.css +185 -0
  114. package/lib/carousel/style/style.min.css +1 -0
  115. package/lib/carousel-item/index.js +19 -0
  116. package/lib/carousel-item/index.min.js +1 -0
  117. package/lib/carousel-item/style/index.js +1 -0
  118. package/lib/carousel-item/style/style.css +0 -0
  119. package/lib/carousel-item/style/style.min.css +0 -0
  120. package/lib/checkbox/index.js +19 -0
  121. package/lib/checkbox/index.min.js +1 -0
  122. package/lib/checkbox/src/checkbox.js +169 -0
  123. package/lib/checkbox/src/checkbox.min.js +1 -0
  124. package/lib/checkbox/src/group.js +164 -0
  125. package/lib/checkbox/src/group.min.js +1 -0
  126. package/lib/checkbox/style/index.js +1 -0
  127. package/lib/checkbox/style/style.css +117 -0
  128. package/lib/checkbox/style/style.min.css +1 -0
  129. package/lib/checkbox-group/index.js +19 -0
  130. package/lib/checkbox-group/index.min.js +1 -0
  131. package/lib/checkbox-group/style/index.js +1 -0
  132. package/lib/checkbox-group/style/style.css +0 -0
  133. package/lib/checkbox-group/style/style.min.css +0 -0
  134. package/lib/components.js +159 -60
  135. package/lib/components.min.js +1 -1
  136. package/lib/date-picker/src/date-picker.js +3 -0
  137. package/lib/date-picker/src/date-picker.min.js +1 -1
  138. package/lib/icon/style/style.css +1 -1
  139. package/lib/icon/style/style.min.css +1 -1
  140. package/lib/icon-picker/index.js +19 -0
  141. package/lib/icon-picker/index.min.js +1 -0
  142. package/lib/icon-picker/src/icon-picker.js +646 -0
  143. package/lib/icon-picker/src/icon-picker.min.js +1 -0
  144. package/lib/icon-picker/style/index.js +1 -0
  145. package/lib/icon-picker/style/style.css +207 -0
  146. package/lib/icon-picker/style/style.min.css +1 -0
  147. package/lib/index.umd.js +15870 -7738
  148. package/lib/index.umd.min.js +1 -1
  149. package/lib/input/index.js +19 -0
  150. package/lib/input/index.min.js +1 -0
  151. package/lib/input/src/input.js +2897 -0
  152. package/lib/input/src/input.min.js +1 -0
  153. package/lib/input/style/index.js +1 -0
  154. package/lib/input/style/style.css +941 -0
  155. package/lib/input/style/style.min.css +1 -0
  156. package/lib/layout-footer/src/layout-footer.js +2 -1
  157. package/lib/layout-header/src/layout-header.js +2 -1
  158. package/lib/optgroup/index.js +19 -0
  159. package/lib/optgroup/index.min.js +1 -0
  160. package/lib/optgroup/style/index.js +1 -0
  161. package/lib/optgroup/style/style.css +0 -0
  162. package/lib/optgroup/style/style.min.css +0 -0
  163. package/lib/option/index.js +19 -0
  164. package/lib/option/index.min.js +1 -0
  165. package/lib/option/style/index.js +1 -0
  166. package/lib/option/style/style.css +0 -0
  167. package/lib/option/style/style.min.css +0 -0
  168. package/lib/pager/index.js +19 -0
  169. package/lib/pager/index.min.js +1 -0
  170. package/lib/pager/src/pager.js +714 -0
  171. package/lib/pager/src/pager.min.js +1 -0
  172. package/lib/password-input/index.js +19 -0
  173. package/lib/password-input/index.min.js +1 -0
  174. package/lib/password-input/src/password-input.js +398 -0
  175. package/lib/password-input/src/password-input.min.js +1 -0
  176. package/lib/password-input/style/index.js +1 -0
  177. package/lib/password-input/style/style.css +604 -0
  178. package/lib/password-input/style/style.min.css +1 -0
  179. package/lib/pulldown/src/pulldown.js +5 -1
  180. package/lib/pulldown/src/pulldown.min.js +1 -1
  181. package/lib/select/index.js +19 -0
  182. package/lib/select/index.min.js +1 -0
  183. package/lib/select/src/optgroup.js +97 -0
  184. package/lib/select/src/optgroup.min.js +1 -0
  185. package/lib/select/src/option-info.js +33 -0
  186. package/lib/select/src/option-info.min.js +1 -0
  187. package/lib/select/src/option.js +93 -0
  188. package/lib/select/src/option.min.js +1 -0
  189. package/lib/select/src/select.js +1315 -0
  190. package/lib/select/src/select.min.js +1 -0
  191. package/lib/select/src/util.js +50 -0
  192. package/lib/select/src/util.min.js +1 -0
  193. package/lib/select/style/index.js +1 -0
  194. package/lib/select/style/style.css +207 -0
  195. package/lib/select/style/style.min.css +1 -0
  196. package/lib/style.css +1 -1
  197. package/lib/style.min.css +1 -1
  198. package/lib/tab-pane/index.js +19 -0
  199. package/lib/tab-pane/index.min.js +1 -0
  200. package/lib/tab-pane/style/index.js +1 -0
  201. package/lib/tab-pane/style/style.css +0 -0
  202. package/lib/tab-pane/style/style.min.css +0 -0
  203. package/lib/tabs/index.js +19 -0
  204. package/lib/tabs/index.min.js +1 -0
  205. package/lib/tabs/src/tab-pane.js +128 -0
  206. package/lib/tabs/src/tab-pane.min.js +1 -0
  207. package/lib/tabs/src/tabs.js +630 -0
  208. package/lib/tabs/src/tabs.min.js +1 -0
  209. package/lib/tabs/src/util.js +29 -0
  210. package/lib/tabs/src/util.min.js +1 -0
  211. package/lib/tabs/style/index.js +1 -0
  212. package/lib/tabs/style/style.css +342 -0
  213. package/lib/tabs/style/style.min.css +1 -0
  214. package/lib/ui/index.js +1 -1
  215. package/lib/ui/index.min.js +1 -1
  216. package/lib/ui/src/log.js +1 -1
  217. package/lib/ui/src/log.min.js +1 -1
  218. package/lib/vxe-carousel/index.js +23 -0
  219. package/lib/vxe-carousel/index.min.js +1 -0
  220. package/lib/vxe-carousel/style/index.js +1 -0
  221. package/lib/vxe-carousel/style/style.css +185 -0
  222. package/lib/vxe-carousel/style/style.min.css +1 -0
  223. package/lib/vxe-carousel-item/index.js +23 -0
  224. package/lib/vxe-carousel-item/index.min.js +1 -0
  225. package/lib/vxe-carousel-item/style/index.js +1 -0
  226. package/lib/vxe-carousel-item/style/style.css +0 -0
  227. package/lib/vxe-carousel-item/style/style.min.css +0 -0
  228. package/lib/vxe-checkbox/index.js +23 -0
  229. package/lib/vxe-checkbox/index.min.js +1 -0
  230. package/lib/vxe-checkbox/style/index.js +1 -0
  231. package/lib/vxe-checkbox/style/style.css +117 -0
  232. package/lib/vxe-checkbox/style/style.min.css +1 -0
  233. package/lib/vxe-checkbox-group/index.js +23 -0
  234. package/lib/vxe-checkbox-group/index.min.js +1 -0
  235. package/lib/vxe-checkbox-group/style/index.js +1 -0
  236. package/lib/vxe-checkbox-group/style/style.css +0 -0
  237. package/lib/vxe-checkbox-group/style/style.min.css +0 -0
  238. package/lib/vxe-icon-picker/index.js +23 -0
  239. package/lib/vxe-icon-picker/index.min.js +1 -0
  240. package/lib/vxe-icon-picker/style/index.js +1 -0
  241. package/lib/vxe-icon-picker/style/style.css +207 -0
  242. package/lib/vxe-icon-picker/style/style.min.css +1 -0
  243. package/lib/vxe-input/index.js +23 -0
  244. package/lib/vxe-input/index.min.js +1 -0
  245. package/lib/vxe-input/style/index.js +1 -0
  246. package/lib/vxe-input/style/style.css +941 -0
  247. package/lib/vxe-input/style/style.min.css +1 -0
  248. package/lib/vxe-optgroup/index.js +23 -0
  249. package/lib/vxe-optgroup/index.min.js +1 -0
  250. package/lib/vxe-optgroup/style/index.js +1 -0
  251. package/lib/vxe-optgroup/style/style.css +0 -0
  252. package/lib/vxe-optgroup/style/style.min.css +0 -0
  253. package/lib/vxe-option/index.js +23 -0
  254. package/lib/vxe-option/index.min.js +1 -0
  255. package/lib/vxe-option/style/index.js +1 -0
  256. package/lib/vxe-option/style/style.css +0 -0
  257. package/lib/vxe-option/style/style.min.css +0 -0
  258. package/lib/vxe-password-input/index.js +23 -0
  259. package/lib/vxe-password-input/index.min.js +1 -0
  260. package/lib/vxe-password-input/style/index.js +1 -0
  261. package/lib/vxe-password-input/style/style.css +604 -0
  262. package/lib/vxe-password-input/style/style.min.css +1 -0
  263. package/lib/vxe-select/index.js +23 -0
  264. package/lib/vxe-select/index.min.js +1 -0
  265. package/lib/vxe-select/style/index.js +1 -0
  266. package/lib/vxe-select/style/style.css +207 -0
  267. package/lib/vxe-select/style/style.min.css +1 -0
  268. package/lib/vxe-tab-pane/index.js +23 -0
  269. package/lib/vxe-tab-pane/index.min.js +1 -0
  270. package/lib/vxe-tab-pane/style/index.js +1 -0
  271. package/lib/vxe-tab-pane/style/style.css +0 -0
  272. package/lib/vxe-tab-pane/style/style.min.css +0 -0
  273. package/lib/vxe-tabs/index.js +23 -0
  274. package/lib/vxe-tabs/index.min.js +1 -0
  275. package/lib/vxe-tabs/style/index.js +1 -0
  276. package/lib/vxe-tabs/style/style.css +342 -0
  277. package/lib/vxe-tabs/style/style.min.css +1 -0
  278. package/package.json +1 -1
  279. package/packages/button/src/button.ts +3 -0
  280. package/packages/carousel/index.ts +16 -0
  281. package/packages/carousel/src/carousel-item.ts +114 -0
  282. package/packages/carousel/src/carousel.ts +449 -0
  283. package/packages/carousel/src/util.ts +21 -0
  284. package/packages/carousel-item/index.ts +16 -0
  285. package/packages/checkbox/index.ts +16 -0
  286. package/packages/checkbox/src/checkbox.ts +176 -0
  287. package/packages/checkbox/src/group.ts +178 -0
  288. package/packages/checkbox-group/index.ts +16 -0
  289. package/packages/components.ts +39 -39
  290. package/packages/date-picker/src/date-picker.ts +3 -0
  291. package/packages/icon-picker/index.ts +16 -0
  292. package/packages/icon-picker/src/icon-picker.ts +711 -0
  293. package/packages/input/index.ts +16 -0
  294. package/packages/input/src/input.ts +2995 -0
  295. package/packages/layout-footer/src/layout-footer.ts +4 -3
  296. package/packages/layout-header/src/layout-header.ts +2 -1
  297. package/packages/optgroup/index.ts +16 -0
  298. package/packages/option/index.ts +16 -0
  299. package/packages/pager/index.ts +16 -0
  300. package/packages/pager/src/pager.ts +743 -0
  301. package/packages/password-input/index.ts +16 -0
  302. package/packages/password-input/src/password-input.ts +427 -0
  303. package/packages/pulldown/src/pulldown.ts +5 -1
  304. package/packages/select/index.ts +16 -0
  305. package/packages/select/src/optgroup.ts +107 -0
  306. package/packages/select/src/option-info.ts +20 -0
  307. package/packages/select/src/option.ts +103 -0
  308. package/packages/select/src/select.ts +1325 -0
  309. package/packages/select/src/util.ts +46 -0
  310. package/packages/tab-pane/index.ts +16 -0
  311. package/packages/tabs/index.ts +16 -0
  312. package/packages/tabs/src/tab-pane.ts +136 -0
  313. package/packages/tabs/src/tabs.ts +630 -0
  314. package/packages/tabs/src/util.ts +21 -0
  315. package/types/components/carousel.d.ts +5 -0
  316. package/types/components/icon-picker.d.ts +4 -0
  317. package/types/components/input.d.ts +9 -1
  318. package/types/components/optgroup.d.ts +10 -4
  319. package/types/components/tabs.d.ts +4 -0
  320. /package/es/icon/style/{iconfont.1725630285930.ttf → iconfont.1725723159302.ttf} +0 -0
  321. /package/es/icon/style/{iconfont.1725630285930.woff → iconfont.1725723159302.woff} +0 -0
  322. /package/es/icon/style/{iconfont.1725630285930.woff2 → iconfont.1725723159302.woff2} +0 -0
  323. /package/es/{iconfont.1725630285930.ttf → iconfont.1725723159302.ttf} +0 -0
  324. /package/es/{iconfont.1725630285930.woff → iconfont.1725723159302.woff} +0 -0
  325. /package/es/{iconfont.1725630285930.woff2 → iconfont.1725723159302.woff2} +0 -0
  326. /package/lib/icon/style/{iconfont.1725630285930.ttf → iconfont.1725723159302.ttf} +0 -0
  327. /package/lib/icon/style/{iconfont.1725630285930.woff → iconfont.1725723159302.woff} +0 -0
  328. /package/lib/icon/style/{iconfont.1725630285930.woff2 → iconfont.1725723159302.woff2} +0 -0
  329. /package/lib/{iconfont.1725630285930.ttf → iconfont.1725723159302.ttf} +0 -0
  330. /package/lib/{iconfont.1725630285930.woff → iconfont.1725723159302.woff} +0 -0
  331. /package/lib/{iconfont.1725630285930.woff2 → iconfont.1725723159302.woff2} +0 -0
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxePulldown",model:{prop:"value",event:"modelValue"},mixins:[_ui.globalMixins.sizeMixin,_ui.globalMixins.permissionMixin],props:{value:Boolean,disabled:Boolean,placement:String,trigger:{type:String,default:(0,_ui.getConfig)().pulldown.trigger},size:{type:String,default:function(){return(0,_ui.getConfig)().size}},options:Array,className:{type:[String,Function],default:(0,_ui.getConfig)().pulldown.className},popupClassName:[String,Function],showPopupShadow:Boolean,destroyOnClose:{type:Boolean,default:(0,_ui.getConfig)().pulldown.destroyOnClose},transfer:{type:Boolean,default:null}},inject:{$xeModal:{default:null},$xeTable:{default:null},$xeForm:{default:null}},data:function(){var e={hpTimeout:void 0};return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,panelIndex:0,panelStyle:{},panelPlacement:null,visiblePanel:!1,visibleAnimate:!1,isActivated:!1},internalData:e}},computed:Object.assign(Object.assign({},{}),{computeBtnTransfer:function(){var e=this,t=e.$xeModal,n=e.$xeDrawer,i=e.$xeTable,l=e.$xeForm,e=e.transfer;if(null===e){var o=(0,_ui.getConfig)().pulldown.transfer;if(_xeUtils.default.isBoolean(o))return o;if(i||t||n||l)return!0}return e}}),methods:{dispatchEvent:function(e,t,n){this.$emit(e,(0,_ui.createEvent)(n,{$pulldown:this},t))},updateZindex:function(){var e=this.reactData;e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},isPanelVisible:function(){return this.reactData.visiblePanel},updatePlacement:function(){var p=this,f=p,v=p.reactData;return p.$nextTick().then(function(){var e,t,n,i,l,o,a,r,u=f.placement,s=v.panelIndex,d=v.visiblePanel,c=p.computeBtnTransfer;return d&&(d=p.$refs.refPulldownContent,i=p.$refs.refPulldownPanel)&&d&&(e=d.offsetHeight,t=d.offsetWidth,n=i.offsetHeight,i=i.offsetWidth,s={zIndex:s},l=(d=(0,_dom.getAbsolutePos)(d)).boundingTop,o=d.visibleHeight,a=d.visibleWidth,r="bottom",c?(c=l+e,"top"===u?(r="top",c=l-n):u||(o<c+n+5&&(r="top",c=l-n),c<5&&(r="bottom",c=l+e)),a<(d=d.boundingLeft)+i+5&&(d-=d+i+5-a),d<5&&(d=5),Object.assign(s,{left:"".concat(d,"px"),top:"".concat(c,"px"),minWidth:"".concat(t,"px")})):"top"===u?(r="top",s.bottom="".concat(e,"px")):u||o<l+e+n&&5<l-e-n&&(r="top",s.bottom="".concat(e,"px")),v.panelStyle=s,v.panelPlacement=r),p.$nextTick()})},showPanel:function(){var t=this,n=t,i=t.reactData,l=t.internalData,e=t.computeBtnTransfer,o=t.$refs.refPulldownPanel;return i.initialized||(i.initialized=!0,e&&o&&document.body.appendChild(o)),new Promise(function(e){n.disabled?t.$nextTick(function(){e()}):(l.hpTimeout&&clearTimeout(l.hpTimeout),i.isActivated=!0,i.visibleAnimate=!0,setTimeout(function(){i.visiblePanel=!0,t.$emit("modelValue",!0),t.updatePlacement(),setTimeout(function(){e(t.updatePlacement())},40)},10),t.updateZindex())})},hidePanel:function(){var t=this,n=t.reactData,i=t.internalData;return n.visiblePanel=!1,t.$emit("modelValue",!1),new Promise(function(e){n.visibleAnimate?i.hpTimeout=window.setTimeout(function(){n.visibleAnimate=!1,t.$nextTick(function(){e()})},350):t.$nextTick(function(){e()})})},togglePanel:function(){return this.reactData.visiblePanel?this.hidePanel():this.showPanel()},handleOptionEvent:function(e,t){t.disabled||(this.hidePanel(),this.dispatchEvent("option-click",{option:t},e))},clickTargetEvent:function(e){var t=this,n=t.reactData;"click"===t.trigger&&(n.visiblePanel?t.hidePanel():t.showPanel()),t.dispatchEvent("click",{$pulldown:t},e)},handleGlobalMousewheelEvent:function(e){var t=this,n=t.reactData,i=t.disabled,n=n.visiblePanel,l=t.$refs.refPulldownPanel;i||n&&((0,_dom.getEventTargetNode)(e,l).flag?t.updatePlacement():(t.hidePanel(),t.dispatchEvent("hide-panel",{},e)))},handleGlobalMousedownEvent:function(e){var t=this,n=t.reactData,i=t.disabled,l=n.visiblePanel,o=t.$refs.refElem,a=t.$refs.refPulldownPanel;i||(n.isActivated=(0,_dom.getEventTargetNode)(e,o).flag||(0,_dom.getEventTargetNode)(e,a).flag,l&&!n.isActivated&&(t.hidePanel(),t.dispatchEvent("hide-panel",{},e)))},handleGlobalBlurEvent:function(e){var t=this.reactData;t.visiblePanel&&(t.isActivated=!1,this.hidePanel(),this.dispatchEvent("hide-panel",{},e))},renderDefaultPanel:function(e,t){var n=this,i=n.$scopedSlots.option;return e("div",{class:"vxe-pulldown--panel-list"},t?t.map(function(t){return e("div",{class:"vxe-pulldown--panel-item",on:{click:function(e){n.handleOptionEvent(e,t)}}},i?i({$pulldown:n,option:t}):"".concat(t.label||""))}):[])},renderVN:function(e){var t=this,n=t.$scopedSlots,i=t.reactData,l=t.className,o=t.options,a=t.popupClassName,r=t.showPopupShadow,u=t.destroyOnClose,s=t.disabled,d=i.initialized,c=i.isActivated,p=i.visibleAnimate,f=i.visiblePanel,v=i.panelStyle,i=i.panelPlacement,m=t.computeBtnTransfer,h=t.computeSize,b=n.default,P=n.header,w=n.footer,n=n.dropdown;return e("div",{ref:"refElem",class:["vxe-pulldown",l?_xeUtils.default.isFunction(l)?l({$pulldown:t}):l:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"is--visible",f),"is--disabled",s),"is--active",c)]},[e("div",{ref:"refPulldownContent",class:"vxe-pulldown--content",on:{click:t.clickTargetEvent}},b?b({$pulldown:t}):[]),e("div",{ref:"refPulldownPanel",class:["vxe-table--ignore-clear vxe-pulldown--panel",a?_xeUtils.default.isFunction(a)?a({$pulldown:t}):a:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"is--shadow",r),"is--transfer",m),"ani--leave",p),"ani--enter",f)],attrs:{placement:i},style:v},d?[e("div",{class:"vxe-pulldown--panel-wrapper"},!d||u&&!f&&!p?[]:[P?e("div",{class:"vxe-pulldown--panel-header"},P({$pulldown:t})):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-pulldown--panel-body"},n?n({$pulldown:t}):[t.renderDefaultPanel(e,o)]),w?e("div",{class:"vxe-pulldown--panel-footer"},w({$pulldown:t})):(0,_ui.renderEmptyElement)(t)])]:[])])}},watch:{value:function(e){e?this.showPanel():this.hidePanel()}},created:function(){var e=this;_ui.globalEvents.on(e,"mousewheel",e.handleGlobalMousewheelEvent),_ui.globalEvents.on(e,"mousedown",e.handleGlobalMousedownEvent),_ui.globalEvents.on(e,"blur",e.handleGlobalBlurEvent)},beforeDestroy:function(){var e=this.$refs.refPulldownPanel;e&&e.parentNode&&e.parentNode.removeChild(e),_ui.globalEvents.off(this,"mousewheel"),_ui.globalEvents.off(this,"mousedown"),_ui.globalEvents.off(this,"blur")},render:function(e){return this.renderVN(e)}});
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxePulldown",model:{prop:"value",event:"modelValue"},mixins:[_ui.globalMixins.sizeMixin,_ui.globalMixins.permissionMixin],props:{value:Boolean,disabled:Boolean,placement:String,trigger:{type:String,default:(0,_ui.getConfig)().pulldown.trigger},size:{type:String,default:function(){return(0,_ui.getConfig)().size}},options:Array,className:{type:[String,Function],default:(0,_ui.getConfig)().pulldown.className},popupClassName:[String,Function],showPopupShadow:Boolean,destroyOnClose:{type:Boolean,default:(0,_ui.getConfig)().pulldown.destroyOnClose},transfer:{type:Boolean,default:null}},inject:{$xeModal:{default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,panelIndex:0,panelStyle:{},panelPlacement:null,visiblePanel:!1,visibleAnimate:!1,isActivated:!1},internalData:{hpTimeout:void 0}}},computed:Object.assign(Object.assign({},{}),{computeBtnTransfer:function(){var e=this,t=e.$xeModal,n=e.$xeDrawer,i=e.$xeTable,l=e.$xeForm,e=e.transfer;if(null===e){var o=(0,_ui.getConfig)().pulldown.transfer;if(_xeUtils.default.isBoolean(o))return o;if(i||t||n||l)return!0}return e}}),methods:{dispatchEvent:function(e,t,n){this.$emit(e,(0,_ui.createEvent)(n,{$pulldown:this},t))},updateZindex:function(){var e=this.reactData;e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},isPanelVisible:function(){return this.reactData.visiblePanel},updatePlacement:function(){var p=this,f=p,v=p.reactData;return p.$nextTick().then(function(){var e,t,n,i,l,o,a,r,u=f.placement,s=v.panelIndex,d=v.visiblePanel,c=p.computeBtnTransfer;return d&&(d=p.$refs.refPulldownContent,i=p.$refs.refPulldownPanel)&&d&&(e=d.offsetHeight,t=d.offsetWidth,n=i.offsetHeight,i=i.offsetWidth,s={zIndex:s},l=(d=(0,_dom.getAbsolutePos)(d)).boundingTop,o=d.visibleHeight,a=d.visibleWidth,r="bottom",c?(c=l+e,"top"===u?(r="top",c=l-n):u||(o<c+n+5&&(r="top",c=l-n),c<5&&(r="bottom",c=l+e)),a<(d=d.boundingLeft)+i+5&&(d-=d+i+5-a),d<5&&(d=5),Object.assign(s,{left:"".concat(d,"px"),top:"".concat(c,"px"),minWidth:"".concat(t,"px")})):"top"===u?(r="top",s.bottom="".concat(e,"px")):u||o<l+e+n&&5<l-e-n&&(r="top",s.bottom="".concat(e,"px")),v.panelStyle=s,v.panelPlacement=r),p.$nextTick()})},showPanel:function(){var t=this,n=t,i=t.reactData,l=t.internalData,e=t.computeBtnTransfer,o=t.$refs.refPulldownPanel;return i.initialized||(i.initialized=!0,e&&o&&document.body.appendChild(o)),new Promise(function(e){n.disabled?t.$nextTick(function(){e()}):(l.hpTimeout&&clearTimeout(l.hpTimeout),i.isActivated=!0,i.visibleAnimate=!0,setTimeout(function(){i.visiblePanel=!0,t.$emit("modelValue",!0),t.updatePlacement(),setTimeout(function(){e(t.updatePlacement())},40)},10),t.updateZindex())})},hidePanel:function(){var t=this,n=t.reactData,i=t.internalData;return n.visiblePanel=!1,t.$emit("modelValue",!1),new Promise(function(e){n.visibleAnimate?i.hpTimeout=window.setTimeout(function(){n.visibleAnimate=!1,t.$nextTick(function(){e()})},350):t.$nextTick(function(){e()})})},togglePanel:function(){return this.reactData.visiblePanel?this.hidePanel():this.showPanel()},handleOptionEvent:function(e,t){t.disabled||(this.hidePanel(),this.dispatchEvent("option-click",{option:t},e))},clickTargetEvent:function(e){var t=this,n=t.reactData;"click"===t.trigger&&(n.visiblePanel?t.hidePanel():t.showPanel()),t.dispatchEvent("click",{$pulldown:t},e)},handleGlobalMousewheelEvent:function(e){var t=this,n=t.reactData,i=t.disabled,n=n.visiblePanel,l=t.$refs.refPulldownPanel;i||n&&((0,_dom.getEventTargetNode)(e,l).flag?t.updatePlacement():(t.hidePanel(),t.dispatchEvent("hide-panel",{},e)))},handleGlobalMousedownEvent:function(e){var t=this,n=t.reactData,i=t.disabled,l=n.visiblePanel,o=t.$refs.refElem,a=t.$refs.refPulldownPanel;i||(n.isActivated=(0,_dom.getEventTargetNode)(e,o).flag||(0,_dom.getEventTargetNode)(e,a).flag,l&&!n.isActivated&&(t.hidePanel(),t.dispatchEvent("hide-panel",{},e)))},handleGlobalBlurEvent:function(e){var t=this.reactData;t.visiblePanel&&(t.isActivated=!1,this.hidePanel(),this.dispatchEvent("hide-panel",{},e))},renderDefaultPanel:function(e,t){var n=this,i=n.$scopedSlots.option;return e("div",{class:"vxe-pulldown--panel-list"},t?t.map(function(t){return e("div",{class:"vxe-pulldown--panel-item",on:{click:function(e){n.handleOptionEvent(e,t)}}},i?i({$pulldown:n,option:t}):"".concat(t.label||""))}):[])},renderVN:function(e){var t=this,n=t.$scopedSlots,i=t.reactData,l=t.className,o=t.options,a=t.popupClassName,r=t.showPopupShadow,u=t.destroyOnClose,s=t.disabled,d=i.initialized,c=i.isActivated,p=i.visibleAnimate,f=i.visiblePanel,v=i.panelStyle,i=i.panelPlacement,m=t.computeBtnTransfer,h=t.computeSize,b=n.default,P=n.header,w=n.footer,n=n.dropdown;return e("div",{ref:"refElem",class:["vxe-pulldown",l?_xeUtils.default.isFunction(l)?l({$pulldown:t}):l:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"is--visible",f),"is--disabled",s),"is--active",c)]},[e("div",{ref:"refPulldownContent",class:"vxe-pulldown--content",on:{click:t.clickTargetEvent}},b?b({$pulldown:t}):[]),e("div",{ref:"refPulldownPanel",class:["vxe-table--ignore-clear vxe-pulldown--panel",a?_xeUtils.default.isFunction(a)?a({$pulldown:t}):a:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(h),h),"is--shadow",r),"is--transfer",m),"ani--leave",p),"ani--enter",f)],attrs:{placement:i},style:v},d?[e("div",{class:"vxe-pulldown--panel-wrapper"},!d||u&&!f&&!p?[]:[P?e("div",{class:"vxe-pulldown--panel-header"},P({$pulldown:t})):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-pulldown--panel-body"},n?n({$pulldown:t}):[t.renderDefaultPanel(e,o)]),w?e("div",{class:"vxe-pulldown--panel-footer"},w({$pulldown:t})):(0,_ui.renderEmptyElement)(t)])]:[])])}},watch:{value:function(e){e?this.showPanel():this.hidePanel()}},created:function(){var e=this;_ui.globalEvents.on(e,"mousewheel",e.handleGlobalMousewheelEvent),_ui.globalEvents.on(e,"mousedown",e.handleGlobalMousedownEvent),_ui.globalEvents.on(e,"blur",e.handleGlobalBlurEvent)},beforeDestroy:function(){var e=this.$refs.refPulldownPanel;e&&e.parentNode&&e.parentNode.removeChild(e),_ui.globalEvents.off(this,"mousewheel"),_ui.globalEvents.off(this,"mousedown"),_ui.globalEvents.off(this,"blur")},render:function(e){return this.renderVN(e)}});
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.VxeSelect = exports.Select = void 0;
7
+ var _core = require("@vxe-ui/core");
8
+ var _select = _interopRequireDefault(require("./src/select"));
9
+ var _dynamics = require("../dynamics");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ var VxeSelect = exports.VxeSelect = Object.assign(_select.default, {
12
+ install: function install(app) {
13
+ app.component(_select.default.name, _select.default);
14
+ }
15
+ });
16
+ _dynamics.dynamicApp.use(VxeSelect);
17
+ _core.VxeUI.component(_select.default);
18
+ var Select = exports.Select = VxeSelect;
19
+ var _default = exports.default = VxeSelect;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeSelect=exports.Select=void 0;var _core=require("@vxe-ui/core"),_select=_interopRequireDefault(require("./src/select")),_dynamics=require("../dynamics");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var VxeSelect=exports.VxeSelect=Object.assign(_select.default,{install:function(e){e.component(_select.default.name,_select.default)}}),Select=(_dynamics.dynamicApp.use(VxeSelect),_core.VxeUI.component(_select.default),exports.Select=VxeSelect),_default=exports.default=VxeSelect;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _comp = require("../../ui/src/comp");
8
+ var _ui = require("../../ui");
9
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
10
+ var _util = require("./util");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ var _default = exports.default = (0, _comp.defineVxeComponent)({
13
+ name: 'VxeOptgroup',
14
+ mixins: [_ui.globalMixins.sizeMixin],
15
+ props: {
16
+ label: {
17
+ type: [String, Number, Boolean],
18
+ default: ''
19
+ },
20
+ visible: {
21
+ type: Boolean,
22
+ default: null
23
+ },
24
+ className: [String, Function],
25
+ disabled: Boolean
26
+ },
27
+ inject: {
28
+ $xeSelect: {
29
+ default: null
30
+ }
31
+ },
32
+ provide: function provide() {
33
+ var $xeOptgroup = this;
34
+ return {
35
+ $xeOptgroup: $xeOptgroup
36
+ };
37
+ },
38
+ data: function data() {
39
+ var xID = _xeUtils.default.uniqueId();
40
+ var reactData = {};
41
+ var optionConfig = {};
42
+ return {
43
+ xID: xID,
44
+ reactData: reactData,
45
+ optionConfig: optionConfig
46
+ };
47
+ },
48
+ computed: Object.assign({}, {}),
49
+ methods: {
50
+ //
51
+ // Method
52
+ //
53
+ dispatchEvent: function dispatchEvent(type, params, evnt) {
54
+ var $xeOptgroup = this;
55
+ $xeOptgroup.$emit(type, (0, _ui.createEvent)(evnt, {
56
+ $optgroup: $xeOptgroup
57
+ }, params));
58
+ },
59
+ //
60
+ // Render
61
+ //
62
+ renderVN: function renderVN(h) {
63
+ var $xeOptgroup = this;
64
+ var slots = $xeOptgroup.$scopedSlots;
65
+ var defaultSlot = slots.default;
66
+ return h('div', {
67
+ ref: 'elem'
68
+ }, defaultSlot ? defaultSlot({}) : []);
69
+ }
70
+ },
71
+ created: function created() {
72
+ var $xeOptgroup = this;
73
+ var props = $xeOptgroup;
74
+ var slots = $xeOptgroup.$scopedSlots;
75
+ var $xeSelect = $xeOptgroup.$xeSelect;
76
+ var optionConfig = (0, _util.createOption)($xeSelect, props);
77
+ optionConfig.slots = slots;
78
+ $xeOptgroup.optionConfig = optionConfig;
79
+ (0, _util.watchOption)($xeOptgroup, optionConfig);
80
+ },
81
+ mounted: function mounted() {
82
+ var $xeOptgroup = this;
83
+ var optionConfig = $xeOptgroup.optionConfig;
84
+ var $xeSelect = $xeOptgroup.$xeSelect;
85
+ var el = $xeOptgroup.$refs.elem;
86
+ (0, _util.assembleOption)($xeSelect, el, optionConfig);
87
+ },
88
+ beforeDestroy: function beforeDestroy() {
89
+ var $xeOptgroup = this;
90
+ var optionConfig = $xeOptgroup.optionConfig;
91
+ var $xeSelect = $xeOptgroup.$xeSelect;
92
+ (0, _util.destroyOption)($xeSelect, optionConfig);
93
+ },
94
+ render: function render(h) {
95
+ return this.renderVN(h);
96
+ }
97
+ });
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_ui=require("../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_util=require("./util");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeOptgroup",mixins:[_ui.globalMixins.sizeMixin],props:{label:{type:[String,Number,Boolean],default:""},visible:{type:Boolean,default:null},className:[String,Function],disabled:Boolean},inject:{$xeSelect:{default:null}},provide:function(){return{$xeOptgroup:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{},optionConfig:{}}},computed:Object.assign({},{}),methods:{dispatchEvent:function(e,t,i){this.$emit(e,(0,_ui.createEvent)(i,{$optgroup:this},t))},renderVN:function(e){var t=this.$scopedSlots.default;return e("div",{ref:"elem"},t?t({}):[])}},created:function(){var e=this,t=e.$scopedSlots,i=(0,_util.createOption)(e.$xeSelect,e);i.slots=t,e.optionConfig=i,(0,_util.watchOption)(e,i)},mounted:function(){var e=this,t=e.optionConfig,i=e.$refs.elem;(0,_util.assembleOption)(e.$xeSelect,i,t)},beforeDestroy:function(){var e=this.optionConfig,t=this.$xeSelect;(0,_util.destroyOption)(t,e)},render:function(e){return this.renderVN(e)}});
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.OptionInfo = void 0;
7
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ var OptionInfo = exports.OptionInfo = /*#__PURE__*/function () {
16
+ function OptionInfo($xeselect, _vm) {
17
+ _classCallCheck(this, OptionInfo);
18
+ Object.assign(this, {
19
+ id: _xeUtils.default.uniqueId('option_'),
20
+ value: _vm.value,
21
+ label: _vm.label,
22
+ visible: _vm.visible,
23
+ className: _vm.className,
24
+ disabled: _vm.disabled
25
+ });
26
+ }
27
+ return _createClass(OptionInfo, [{
28
+ key: "update",
29
+ value: function update(name, value) {
30
+ this[name] = value;
31
+ }
32
+ }]);
33
+ }();
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.OptionInfo=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var OptionInfo=exports.OptionInfo=(()=>_createClass(function e(t,o){_classCallCheck(this,e),Object.assign(this,{id:_xeUtils.default.uniqueId("option_"),value:o.value,label:o.label,visible:o.visible,className:o.className,disabled:o.disabled})},[{key:"update",value:function(e,t){this[e]=t}}]))();
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _comp = require("../../ui/src/comp");
8
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
9
+ var _ui = require("../../ui");
10
+ var _util = require("./util");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ var _default = exports.default = (0, _comp.defineVxeComponent)({
13
+ name: 'VxeOption',
14
+ mixins: [_ui.globalMixins.sizeMixin],
15
+ props: {
16
+ value: [String, Number, Boolean],
17
+ label: {
18
+ type: [String, Number, Boolean],
19
+ default: ''
20
+ },
21
+ visible: {
22
+ type: Boolean,
23
+ default: null
24
+ },
25
+ className: [String, Function],
26
+ disabled: Boolean
27
+ },
28
+ inject: {
29
+ $xeSelect: {
30
+ default: null
31
+ },
32
+ $xeOptgroup: {
33
+ default: null
34
+ }
35
+ },
36
+ data: function data() {
37
+ var xID = _xeUtils.default.uniqueId();
38
+ var reactData = {};
39
+ var optionConfig = {};
40
+ return {
41
+ xID: xID,
42
+ reactData: reactData,
43
+ optionConfig: optionConfig
44
+ };
45
+ },
46
+ computed: Object.assign({}, {}),
47
+ methods: {
48
+ //
49
+ // Method
50
+ //
51
+ dispatchEvent: function dispatchEvent(type, params, evnt) {
52
+ var $xeOption = this;
53
+ $xeOption.$emit(type, (0, _ui.createEvent)(evnt, {
54
+ $option: $xeOption
55
+ }, params));
56
+ },
57
+ //
58
+ // Render
59
+ //
60
+ renderVN: function renderVN(h) {
61
+ return h('div', {
62
+ ref: 'elem'
63
+ });
64
+ }
65
+ },
66
+ created: function created() {
67
+ var $xeOption = this;
68
+ var props = $xeOption;
69
+ var slots = $xeOption.$scopedSlots;
70
+ var $xeSelect = $xeOption.$xeSelect;
71
+ var optionConfig = (0, _util.createOption)($xeSelect, props);
72
+ optionConfig.slots = slots;
73
+ $xeOption.optionConfig = optionConfig;
74
+ (0, _util.watchOption)($xeOption, optionConfig);
75
+ },
76
+ mounted: function mounted() {
77
+ var $xeOption = this;
78
+ var optionConfig = $xeOption.optionConfig;
79
+ var $xeSelect = $xeOption.$xeSelect;
80
+ var $xeOptgroup = $xeOption.$xeOptgroup;
81
+ var el = $xeOption.$refs.elem;
82
+ (0, _util.assembleOption)($xeSelect, el, optionConfig, $xeOptgroup);
83
+ },
84
+ beforeDestroy: function beforeDestroy() {
85
+ var $xeOption = this;
86
+ var optionConfig = $xeOption.optionConfig;
87
+ var $xeSelect = $xeOption.$xeSelect;
88
+ (0, _util.destroyOption)($xeSelect, optionConfig);
89
+ },
90
+ render: function render(h) {
91
+ return this.renderVN(h);
92
+ }
93
+ });
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_util=require("./util");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeOption",mixins:[_ui.globalMixins.sizeMixin],props:{value:[String,Number,Boolean],label:{type:[String,Number,Boolean],default:""},visible:{type:Boolean,default:null},className:[String,Function],disabled:Boolean},inject:{$xeSelect:{default:null},$xeOptgroup:{default:null}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{},optionConfig:{}}},computed:Object.assign({},{}),methods:{dispatchEvent:function(e,t,i){this.$emit(e,(0,_ui.createEvent)(i,{$option:this},t))},renderVN:function(e){return e("div",{ref:"elem"})}},created:function(){var e=this,t=e.$scopedSlots,i=(0,_util.createOption)(e.$xeSelect,e);i.slots=t,e.optionConfig=i,(0,_util.watchOption)(e,i)},mounted:function(){var e=this,t=e.optionConfig,i=e.$refs.elem;(0,_util.assembleOption)(e.$xeSelect,i,t,e.$xeOptgroup)},beforeDestroy:function(){var e=this.optionConfig,t=this.$xeSelect;(0,_util.destroyOption)(t,e)},render:function(e){return this.renderVN(e)}});