vxe-pc-ui 4.20.34 → 4.20.35

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 (367) hide show
  1. package/dist/all.esm.js +45718 -45038
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +307 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/alert/src/alert.js +117 -114
  6. package/es/anchor/src/anchor-link.js +110 -107
  7. package/es/anchor/src/anchor.js +212 -209
  8. package/es/avatar/src/avatar.js +132 -129
  9. package/es/backtop/src/backtop.js +267 -264
  10. package/es/badge/src/badge.js +102 -99
  11. package/es/breadcrumb/src/breadcrumb-item.js +104 -101
  12. package/es/breadcrumb/src/breadcrumb.js +70 -67
  13. package/es/button/src/button-group.js +88 -85
  14. package/es/calendar/src/calendar.js +1371 -1368
  15. package/es/card/src/card.js +235 -232
  16. package/es/carousel/src/carousel-item.js +78 -75
  17. package/es/carousel/src/carousel.js +392 -389
  18. package/es/cascader/src/cascader.js +1667 -1664
  19. package/es/checkbox/src/button.js +198 -195
  20. package/es/checkbox/src/checkbox.js +181 -178
  21. package/es/checkbox/src/group.js +210 -207
  22. package/es/collapse/src/collapse-pane.js +98 -95
  23. package/es/collapse/src/collapse.js +340 -337
  24. package/es/color-picker/src/color-picker.js +1116 -1113
  25. package/es/components.d.ts +1 -0
  26. package/es/components.js +3 -0
  27. package/es/context-menu/src/context-menu.js +601 -598
  28. package/es/countdown/src/countdown.js +224 -221
  29. package/es/date-panel/src/date-panel.js +1905 -1902
  30. package/es/date-picker/src/date-picker.js +1537 -1534
  31. package/es/date-range-picker/src/date-range-picker.js +1412 -1409
  32. package/es/divider/src/divider.js +80 -77
  33. package/es/drawer/src/drawer.js +778 -775
  34. package/es/empty/src/empty.js +100 -97
  35. package/es/form/src/form-group.js +74 -71
  36. package/es/form/src/form-item.js +76 -73
  37. package/es/form/src/form.js +789 -786
  38. package/es/icon/src/icon.js +59 -56
  39. package/es/icon/style.css +1 -1
  40. package/es/icon/style.mini.css +1 -1
  41. package/es/icon-picker/src/icon-picker.js +719 -716
  42. package/es/image/src/group.js +130 -127
  43. package/es/image/src/image.js +243 -240
  44. package/es/image/src/preview.js +627 -624
  45. package/es/index.esm.js +2 -0
  46. package/es/index.js +2 -0
  47. package/es/input/src/input.js +2700 -2697
  48. package/es/layout-aside/src/layout-aside.js +138 -135
  49. package/es/layout-body/src/layout-body.js +145 -142
  50. package/es/layout-container/src/layout-container.js +71 -68
  51. package/es/layout-footer/src/layout-footer.js +60 -57
  52. package/es/layout-header/src/layout-header.js +58 -55
  53. package/es/link/src/link.js +131 -128
  54. package/es/list/src/list.js +2174 -2171
  55. package/es/loading/src/loading.js +141 -138
  56. package/es/mention/src/mention.js +49 -46
  57. package/es/menu/src/menu.js +799 -796
  58. package/es/modal/src/modal.js +1519 -1527
  59. package/es/notice-bar/src/notice-bar.js +168 -165
  60. package/es/number-input/src/number-input.js +1094 -1091
  61. package/es/pager/src/pager.js +767 -764
  62. package/es/password-input/src/password-input.js +431 -428
  63. package/es/print/src/page-break.js +63 -60
  64. package/es/print/src/print.js +303 -300
  65. package/es/pulldown/src/pulldown.js +403 -400
  66. package/es/radio/src/button.js +214 -211
  67. package/es/radio/src/group.js +195 -192
  68. package/es/radio/src/radio.js +194 -191
  69. package/es/rate/src/rate.js +164 -161
  70. package/es/result/src/result.js +116 -113
  71. package/es/row/src/col.js +133 -130
  72. package/es/row/src/row.js +111 -108
  73. package/es/scrollbar/src/scrollbar.js +518 -515
  74. package/es/segmented/src/segmented.js +240 -237
  75. package/es/select/src/optgroup.js +44 -41
  76. package/es/select/src/option.js +39 -36
  77. package/es/select/src/select.js +1914 -1896
  78. package/es/slider/src/slider.js +419 -416
  79. package/es/space/src/space.js +190 -187
  80. package/es/splitter/src/splitter-panel.js +146 -143
  81. package/es/splitter/src/splitter.js +917 -914
  82. package/es/step-item/index.d.ts +76 -0
  83. package/es/step-item/index.js +17 -0
  84. package/es/steps/index.d.ts +288 -34
  85. package/es/steps/src/step-info.d.ts +6 -0
  86. package/es/steps/src/step-info.js +20 -0
  87. package/es/steps/src/step-item.d.ts +14 -0
  88. package/es/steps/src/step-item.js +39 -0
  89. package/es/steps/src/steps.d.ts +68 -8
  90. package/es/steps/src/steps.js +299 -47
  91. package/es/steps/src/util.d.ts +7 -0
  92. package/es/steps/src/util.js +44 -0
  93. package/es/steps/style.css +297 -0
  94. package/es/steps/style.mini.css +1 -0
  95. package/es/style.css +307 -1
  96. package/es/style.mini.css +1 -1
  97. package/es/switch/src/switch.js +228 -225
  98. package/es/table-select/src/table-select.js +865 -862
  99. package/es/table-transfer/src/table-transfer.js +61 -58
  100. package/es/tabs/src/tab-pane.js +102 -99
  101. package/es/tabs/src/tabs.js +936 -933
  102. package/es/tag/src/tag.js +163 -160
  103. package/es/text/src/text.js +232 -229
  104. package/es/text-ellipsis/src/text-ellipsis.js +252 -249
  105. package/es/textarea/src/textarea.js +434 -431
  106. package/es/timeline/src/timeline.js +74 -36
  107. package/es/timeline/src/util.js +7 -4
  108. package/es/tip/src/tip.js +117 -114
  109. package/es/tooltip/src/tooltip.js +552 -549
  110. package/es/tour/src/tour.js +49 -46
  111. package/es/transfer/src/transfer.js +95 -92
  112. package/es/tree/src/tree.js +3379 -3376
  113. package/es/tree-select/src/tree-select.js +969 -966
  114. package/es/ui/index.js +8 -2
  115. package/es/ui/src/log.js +1 -1
  116. package/es/upload/src/upload.js +1791 -1788
  117. package/es/vxe-icon/style.css +1 -1
  118. package/es/vxe-icon/style.mini.css +1 -1
  119. package/es/vxe-steps/style.css +297 -0
  120. package/es/vxe-steps/style.mini.css +1 -0
  121. package/es/watermark/src/watermark.js +158 -155
  122. package/lib/alert/src/alert.js +117 -114
  123. package/lib/anchor/src/anchor-link.js +110 -107
  124. package/lib/anchor/src/anchor.js +212 -209
  125. package/lib/avatar/src/avatar.js +132 -129
  126. package/lib/backtop/src/backtop.js +267 -264
  127. package/lib/badge/src/badge.js +102 -99
  128. package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
  129. package/lib/breadcrumb/src/breadcrumb.js +70 -67
  130. package/lib/button/src/button-group.js +88 -85
  131. package/lib/calendar/src/calendar.js +1371 -1368
  132. package/lib/card/src/card.js +235 -232
  133. package/lib/carousel/src/carousel-item.js +78 -75
  134. package/lib/carousel/src/carousel.js +392 -389
  135. package/lib/cascader/src/cascader.js +1665 -1662
  136. package/lib/checkbox/src/button.js +198 -195
  137. package/lib/checkbox/src/checkbox.js +181 -178
  138. package/lib/checkbox/src/group.js +210 -207
  139. package/lib/collapse/src/collapse-pane.js +98 -95
  140. package/lib/collapse/src/collapse.js +340 -337
  141. package/lib/color-picker/src/color-picker.js +1116 -1113
  142. package/lib/components.js +3 -0
  143. package/lib/context-menu/src/context-menu.js +601 -598
  144. package/lib/countdown/src/countdown.js +224 -221
  145. package/lib/date-panel/src/date-panel.js +1905 -1902
  146. package/lib/date-picker/src/date-picker.js +1537 -1534
  147. package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
  148. package/lib/divider/src/divider.js +80 -77
  149. package/lib/drawer/src/drawer.js +778 -775
  150. package/lib/empty/src/empty.js +100 -97
  151. package/lib/form/src/form-group.js +74 -71
  152. package/lib/form/src/form-item.js +76 -73
  153. package/lib/form/src/form.js +789 -786
  154. package/lib/icon/src/icon.js +59 -56
  155. package/lib/icon/style/style.css +1 -1
  156. package/lib/icon/style/style.mini.css +1 -1
  157. package/lib/icon-picker/src/icon-picker.js +719 -716
  158. package/lib/image/src/group.js +130 -127
  159. package/lib/image/src/image.js +243 -240
  160. package/lib/image/src/preview.js +627 -624
  161. package/lib/index.common.js +2 -0
  162. package/lib/index.js +2 -0
  163. package/lib/index.umd.js +47411 -46732
  164. package/lib/index.umd.min.js +3 -3
  165. package/lib/input/src/input.js +2700 -2697
  166. package/lib/layout-aside/src/layout-aside.js +138 -135
  167. package/lib/layout-body/src/layout-body.js +145 -142
  168. package/lib/layout-container/src/layout-container.js +71 -68
  169. package/lib/layout-footer/src/layout-footer.js +60 -57
  170. package/lib/layout-header/src/layout-header.js +58 -55
  171. package/lib/link/src/link.js +131 -128
  172. package/lib/list/src/list.js +2173 -2170
  173. package/lib/loading/src/loading.js +141 -138
  174. package/lib/mention/src/mention.js +49 -46
  175. package/lib/menu/src/menu.js +799 -796
  176. package/lib/modal/src/modal.js +1519 -1527
  177. package/lib/notice-bar/src/notice-bar.js +168 -165
  178. package/lib/number-input/src/number-input.js +1094 -1091
  179. package/lib/pager/src/pager.js +767 -764
  180. package/lib/password-input/src/password-input.js +431 -428
  181. package/lib/print/src/page-break.js +63 -60
  182. package/lib/print/src/print.js +303 -300
  183. package/lib/pulldown/src/pulldown.js +403 -400
  184. package/lib/radio/src/button.js +214 -211
  185. package/lib/radio/src/group.js +195 -192
  186. package/lib/radio/src/radio.js +194 -191
  187. package/lib/rate/src/rate.js +164 -161
  188. package/lib/result/src/result.js +116 -113
  189. package/lib/row/src/col.js +133 -130
  190. package/lib/row/src/row.js +111 -108
  191. package/lib/scrollbar/src/scrollbar.js +518 -515
  192. package/lib/segmented/src/segmented.js +240 -237
  193. package/lib/select/src/optgroup.js +44 -41
  194. package/lib/select/src/option.js +39 -36
  195. package/lib/select/src/select.js +1915 -1897
  196. package/lib/slider/src/slider.js +419 -416
  197. package/lib/space/src/space.js +190 -187
  198. package/lib/splitter/src/splitter-panel.js +146 -143
  199. package/lib/splitter/src/splitter.js +917 -914
  200. package/lib/step-item/index.js +47 -0
  201. package/lib/steps/src/step-info.js +49 -0
  202. package/lib/steps/src/step-item.js +59 -0
  203. package/lib/steps/src/steps.js +298 -46
  204. package/lib/steps/src/util.js +74 -0
  205. package/lib/steps/style/style.css +297 -0
  206. package/lib/steps/style/style.mini.css +1 -0
  207. package/lib/style.css +307 -1
  208. package/lib/style.mini.css +1 -1
  209. package/lib/switch/src/switch.js +228 -225
  210. package/lib/table-select/src/table-select.js +865 -862
  211. package/lib/table-transfer/src/table-transfer.js +61 -58
  212. package/lib/tabs/src/tab-pane.js +102 -99
  213. package/lib/tabs/src/tabs.js +936 -933
  214. package/lib/tag/src/tag.js +163 -160
  215. package/lib/text/src/text.js +232 -229
  216. package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
  217. package/lib/textarea/src/textarea.js +434 -431
  218. package/lib/timeline/src/timeline.js +74 -36
  219. package/lib/timeline/src/util.js +7 -4
  220. package/lib/tip/src/tip.js +117 -114
  221. package/lib/tooltip/src/tooltip.js +552 -549
  222. package/lib/tour/src/tour.js +49 -46
  223. package/lib/transfer/src/transfer.js +95 -92
  224. package/lib/tree/src/tree.js +3379 -3376
  225. package/lib/tree-select/src/tree-select.js +969 -966
  226. package/lib/ui/index.js +8 -2
  227. package/lib/ui/src/log.js +1 -1
  228. package/lib/upload/src/upload.js +1788 -1785
  229. package/lib/vxe-icon/style/style.css +1 -1
  230. package/lib/vxe-icon/style/style.mini.css +1 -1
  231. package/lib/vxe-steps/style/style.css +297 -0
  232. package/lib/vxe-steps/style/style.mini.css +1 -0
  233. package/lib/watermark/src/watermark.js +158 -155
  234. package/package.json +1 -1
  235. package/packages/alert/src/alert.ts +2 -2
  236. package/packages/anchor/src/anchor-link.ts +2 -2
  237. package/packages/anchor/src/anchor.ts +2 -2
  238. package/packages/avatar/src/avatar.ts +2 -2
  239. package/packages/backtop/src/backtop.ts +2 -2
  240. package/packages/badge/src/badge.ts +2 -2
  241. package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
  242. package/packages/breadcrumb/src/breadcrumb.ts +2 -2
  243. package/packages/button/src/button-group.ts +2 -2
  244. package/packages/calendar/src/calendar.ts +2 -2
  245. package/packages/card/src/card.ts +2 -2
  246. package/packages/carousel/src/carousel-item.ts +2 -2
  247. package/packages/carousel/src/carousel.ts +2 -2
  248. package/packages/cascader/src/cascader.ts +2 -2
  249. package/packages/checkbox/src/button.ts +3 -15
  250. package/packages/checkbox/src/checkbox.ts +2 -2
  251. package/packages/checkbox/src/group.ts +2 -2
  252. package/packages/collapse/src/collapse-pane.ts +2 -2
  253. package/packages/collapse/src/collapse.ts +2 -2
  254. package/packages/color-picker/src/color-picker.ts +2 -2
  255. package/packages/components.ts +3 -0
  256. package/packages/context-menu/src/context-menu.ts +3 -16
  257. package/packages/countdown/src/countdown.ts +2 -2
  258. package/packages/date-panel/src/date-panel.ts +2 -2
  259. package/packages/date-picker/src/date-picker.ts +2 -2
  260. package/packages/date-range-picker/src/date-range-picker.ts +2 -2
  261. package/packages/divider/src/divider.ts +2 -2
  262. package/packages/drawer/src/drawer.ts +2 -2
  263. package/packages/empty/src/empty.ts +2 -2
  264. package/packages/form/src/form-group.ts +2 -2
  265. package/packages/form/src/form-item.ts +2 -2
  266. package/packages/form/src/form.ts +2 -2
  267. package/packages/icon/src/icon.ts +2 -2
  268. package/packages/icon-picker/src/icon-picker.ts +2 -2
  269. package/packages/image/src/group.ts +2 -2
  270. package/packages/image/src/image.ts +2 -2
  271. package/packages/image/src/preview.ts +3 -16
  272. package/packages/index.ts +2 -2
  273. package/packages/input/src/input.ts +2 -2
  274. package/packages/layout-aside/src/layout-aside.ts +2 -2
  275. package/packages/layout-body/src/layout-body.ts +2 -2
  276. package/packages/layout-container/src/layout-container.ts +3 -14
  277. package/packages/layout-footer/src/layout-footer.ts +2 -2
  278. package/packages/layout-header/src/layout-header.ts +2 -2
  279. package/packages/link/src/link.ts +2 -2
  280. package/packages/list/src/list.ts +2 -2
  281. package/packages/loading/src/loading.ts +2 -2
  282. package/packages/mention/src/mention.ts +2 -2
  283. package/packages/menu/src/menu.ts +2 -2
  284. package/packages/modal/src/modal.ts +5 -20
  285. package/packages/notice-bar/src/notice-bar.ts +2 -2
  286. package/packages/number-input/src/number-input.ts +3 -17
  287. package/packages/pager/src/pager.ts +2 -2
  288. package/packages/password-input/src/password-input.ts +2 -2
  289. package/packages/print/src/page-break.ts +2 -2
  290. package/packages/print/src/print.ts +2 -2
  291. package/packages/pulldown/src/pulldown.ts +2 -2
  292. package/packages/radio/src/button.ts +3 -16
  293. package/packages/radio/src/group.ts +3 -17
  294. package/packages/radio/src/radio.ts +2 -2
  295. package/packages/rate/src/rate.ts +2 -2
  296. package/packages/result/src/result.ts +2 -2
  297. package/packages/row/src/col.ts +2 -2
  298. package/packages/row/src/row.ts +2 -2
  299. package/packages/scrollbar/src/scrollbar.ts +3 -4
  300. package/packages/segmented/src/segmented.ts +2 -2
  301. package/packages/select/src/optgroup.ts +2 -2
  302. package/packages/select/src/option.ts +2 -2
  303. package/packages/select/src/select.ts +33 -19
  304. package/packages/slider/src/slider.ts +2 -2
  305. package/packages/space/src/space.ts +2 -2
  306. package/packages/splitter/src/splitter-panel.ts +2 -2
  307. package/packages/splitter/src/splitter.ts +2 -2
  308. package/packages/step-item/index.ts +16 -0
  309. package/packages/steps/src/step-info.ts +18 -0
  310. package/packages/steps/src/step-item.ts +41 -0
  311. package/packages/steps/src/steps.ts +273 -13
  312. package/packages/steps/src/util.ts +44 -0
  313. package/packages/switch/src/switch.ts +2 -2
  314. package/packages/table-select/src/table-select.ts +2 -2
  315. package/packages/table-transfer/src/table-transfer.ts +3 -15
  316. package/packages/tabs/src/tab-pane.ts +2 -2
  317. package/packages/tabs/src/tabs.ts +2 -2
  318. package/packages/tag/src/tag.ts +2 -2
  319. package/packages/text/src/text.ts +2 -2
  320. package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
  321. package/packages/textarea/src/textarea.ts +2 -2
  322. package/packages/timeline/src/timeline-info.ts +17 -17
  323. package/packages/timeline/src/timeline.ts +93 -49
  324. package/packages/timeline/src/util.ts +44 -41
  325. package/packages/tip/src/tip.ts +2 -2
  326. package/packages/tooltip/src/tooltip.ts +2 -2
  327. package/packages/tour/src/tour.ts +2 -2
  328. package/packages/transfer/src/transfer.ts +2 -2
  329. package/packages/tree/src/tree.ts +2 -2
  330. package/packages/tree-select/src/tree-select.ts +2 -2
  331. package/packages/ui/index.ts +8 -1
  332. package/packages/upload/src/upload.ts +2 -2
  333. package/packages/watermark/src/watermark.ts +2 -2
  334. package/styles/all.scss +1 -0
  335. package/styles/components/step-item.scss +0 -0
  336. package/styles/components/steps.scss +354 -0
  337. package/styles/theme/base.scss +9 -0
  338. package/types/all.d.ts +3 -0
  339. package/types/components/gantt.d.ts +1 -3
  340. package/types/components/select.d.ts +1 -13
  341. package/types/components/step-item.d.ts +72 -0
  342. package/types/components/steps.d.ts +67 -8
  343. package/types/components/table.d.ts +7 -66
  344. package/types/handles/form-design.d.ts +1 -4
  345. package/types/ui/global-config.d.ts +2 -0
  346. package/types/ui/global-icon.d.ts +7 -0
  347. /package/dist/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  348. /package/dist/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  349. /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  350. /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  351. /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  352. /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  353. /package/es/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  354. /package/es/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  355. /package/es/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  356. /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  357. /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  358. /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  359. /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  360. /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  361. /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  362. /package/lib/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  363. /package/lib/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  364. /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
  365. /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
  366. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
  367. /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
@@ -40,469 +40,472 @@ var import_log = require("../../ui/src/log");
40
40
  const { getConfig, getIcon, getI18n, createEvent, useFns, renderEmptyElement } = import_core.VxeUI;
41
41
  const { warnLog } = (0, import_log.createComponentLog)("textarea");
42
42
  let autoTxtElem;
43
- var textarea_default = (0, import_comp.defineVxeComponent)({
44
- name: "VxeTextarea",
45
- props: {
46
- modelValue: [String, Number],
47
- className: String,
48
- inputClassName: {
49
- type: String,
50
- default: () => getConfig().textarea.inputClassName
51
- },
52
- immediate: {
53
- type: Boolean,
54
- default: true
55
- },
56
- name: String,
57
- readonly: {
58
- type: Boolean,
59
- default: null
60
- },
61
- editable: {
62
- type: Boolean,
63
- default: true
64
- },
65
- disabled: {
66
- type: Boolean,
67
- default: null
68
- },
69
- clearable: {
70
- type: Boolean,
71
- default: () => getConfig().textarea.clearable
72
- },
73
- placeholder: String,
74
- maxLength: [String, Number],
75
- trim: {
76
- type: Boolean,
77
- default: () => getConfig().textarea.trim
78
- },
79
- rows: {
80
- type: [String, Number],
81
- default: null
82
- },
83
- cols: {
84
- type: [String, Number],
85
- default: null
86
- },
87
- showWordCount: Boolean,
88
- countMethod: Function,
89
- autoFocus: {
90
- type: Boolean,
91
- default: null
92
- },
93
- /**
94
- * 已废弃,被 auto-size 替换
95
- * @deprecated
96
- */
97
- autosize: {
98
- type: [Boolean, Object],
99
- default: null
100
- },
101
- autoSize: {
102
- type: [Boolean, Object],
103
- default: null
104
- },
105
- form: String,
106
- resize: {
107
- type: String,
108
- default: () => getConfig().textarea.resize
109
- },
110
- size: {
111
- type: String,
112
- default: () => getConfig().textarea.size || getConfig().size
43
+ var textarea_default = (
44
+ /* define-vxe-component start */
45
+ (0, import_comp.defineVxeComponent)({
46
+ name: "VxeTextarea",
47
+ props: {
48
+ modelValue: [String, Number],
49
+ className: String,
50
+ inputClassName: {
51
+ type: String,
52
+ default: () => getConfig().textarea.inputClassName
53
+ },
54
+ immediate: {
55
+ type: Boolean,
56
+ default: true
57
+ },
58
+ name: String,
59
+ readonly: {
60
+ type: Boolean,
61
+ default: null
62
+ },
63
+ editable: {
64
+ type: Boolean,
65
+ default: true
66
+ },
67
+ disabled: {
68
+ type: Boolean,
69
+ default: null
70
+ },
71
+ clearable: {
72
+ type: Boolean,
73
+ default: () => getConfig().textarea.clearable
74
+ },
75
+ placeholder: String,
76
+ maxLength: [String, Number],
77
+ trim: {
78
+ type: Boolean,
79
+ default: () => getConfig().textarea.trim
80
+ },
81
+ rows: {
82
+ type: [String, Number],
83
+ default: null
84
+ },
85
+ cols: {
86
+ type: [String, Number],
87
+ default: null
88
+ },
89
+ showWordCount: Boolean,
90
+ countMethod: Function,
91
+ autoFocus: {
92
+ type: Boolean,
93
+ default: null
94
+ },
95
+ /**
96
+ * 已废弃,被 auto-size 替换
97
+ * @deprecated
98
+ */
99
+ autosize: {
100
+ type: [Boolean, Object],
101
+ default: null
102
+ },
103
+ autoSize: {
104
+ type: [Boolean, Object],
105
+ default: null
106
+ },
107
+ form: String,
108
+ resize: {
109
+ type: String,
110
+ default: () => getConfig().textarea.resize
111
+ },
112
+ size: {
113
+ type: String,
114
+ default: () => getConfig().textarea.size || getConfig().size
115
+ },
116
+ // 已废弃
117
+ maxlength: [String, Number]
113
118
  },
114
- // 已废弃
115
- maxlength: [String, Number]
116
- },
117
- emits: ["update:modelValue", "input", "keydown", "keyup", "click", "change", "focus", "blur", "clear", "lazy-change"],
118
- setup(props, context) {
119
- const { emit } = context;
120
- const $xeForm = (0, import_vue.inject)("$xeForm", null);
121
- const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
122
- const xID = import_xe_utils.default.uniqueId();
123
- const { computeSize } = useFns.useSize(props);
124
- const reactData = (0, import_vue.reactive)({
125
- inputValue: props.modelValue
126
- });
127
- const refElem = (0, import_vue.ref)();
128
- const refTextarea = (0, import_vue.ref)();
129
- const refContent = (0, import_vue.ref)();
130
- const refMaps = {
131
- refElem,
132
- refTextarea
133
- };
134
- const $xeTextarea = {
135
- xID,
136
- props,
137
- context,
138
- reactData,
139
- getRefMaps: () => refMaps
140
- };
141
- const computeFormReadonly = (0, import_vue.computed)(() => {
142
- const { readonly } = props;
143
- if (readonly === null) {
144
- if ($xeForm) {
145
- return $xeForm.props.readonly;
119
+ emits: ["update:modelValue", "input", "keydown", "keyup", "click", "change", "focus", "blur", "clear", "lazy-change"],
120
+ setup(props, context) {
121
+ const { emit } = context;
122
+ const $xeForm = (0, import_vue.inject)("$xeForm", null);
123
+ const formItemInfo = (0, import_vue.inject)("xeFormItemInfo", null);
124
+ const xID = import_xe_utils.default.uniqueId();
125
+ const { computeSize } = useFns.useSize(props);
126
+ const reactData = (0, import_vue.reactive)({
127
+ inputValue: props.modelValue
128
+ });
129
+ const refElem = (0, import_vue.ref)();
130
+ const refTextarea = (0, import_vue.ref)();
131
+ const refContent = (0, import_vue.ref)();
132
+ const refMaps = {
133
+ refElem,
134
+ refTextarea
135
+ };
136
+ const $xeTextarea = {
137
+ xID,
138
+ props,
139
+ context,
140
+ reactData,
141
+ getRefMaps: () => refMaps
142
+ };
143
+ const computeFormReadonly = (0, import_vue.computed)(() => {
144
+ const { readonly } = props;
145
+ if (readonly === null) {
146
+ if ($xeForm) {
147
+ return $xeForm.props.readonly;
148
+ }
149
+ return false;
146
150
  }
147
- return false;
148
- }
149
- return readonly;
150
- });
151
- const computeIsDisabled = (0, import_vue.computed)(() => {
152
- const { disabled } = props;
153
- if (disabled === null) {
154
- if ($xeForm) {
155
- return $xeForm.props.disabled;
151
+ return readonly;
152
+ });
153
+ const computeIsDisabled = (0, import_vue.computed)(() => {
154
+ const { disabled } = props;
155
+ if (disabled === null) {
156
+ if ($xeForm) {
157
+ return $xeForm.props.disabled;
158
+ }
159
+ return false;
156
160
  }
157
- return false;
158
- }
159
- return disabled;
160
- });
161
- const computeInputReadonly = (0, import_vue.computed)(() => {
162
- const { editable, readonly } = props;
163
- return readonly || !editable;
164
- });
165
- const computeInpPlaceholder = (0, import_vue.computed)(() => {
166
- const { placeholder } = props;
167
- if (placeholder) {
168
- return (0, import_utils.getFuncText)(placeholder);
169
- }
170
- const globalPlaceholder = getConfig().textarea.placeholder;
171
- if (globalPlaceholder) {
172
- return (0, import_utils.getFuncText)(globalPlaceholder);
173
- }
174
- return getI18n("vxe.base.pleaseInput");
175
- });
176
- const computeInpMaxLength = (0, import_vue.computed)(() => {
177
- const { maxLength, maxlength } = props;
178
- return maxLength || maxlength;
179
- });
180
- const computeInputCount = (0, import_vue.computed)(() => {
181
- return import_xe_utils.default.getSize(reactData.inputValue);
182
- });
183
- const computeIsCountError = (0, import_vue.computed)(() => {
184
- const inputCount = computeInputCount.value;
185
- const inpMaxLength = computeInpMaxLength.value;
186
- return inpMaxLength && inputCount > import_xe_utils.default.toNumber(inpMaxLength);
187
- });
188
- const computeSizeOpts = (0, import_vue.computed)(() => {
189
- const { autosize, autoSize } = props;
190
- if (autosize || getConfig().textarea.autosize) {
191
- return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autosize, autosize);
192
- }
193
- return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autoSize, autoSize);
194
- });
195
- const computeDomValue = (0, import_vue.computed)(() => {
196
- const { inputValue } = reactData;
197
- return inputValue;
198
- });
199
- const dispatchEvent = (type, params, evnt) => {
200
- emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
201
- };
202
- const updateDomValue = () => {
203
- const domValue = computeDomValue.value;
204
- const taElem = refTextarea.value;
205
- if (taElem) {
206
- taElem.value = import_xe_utils.default.eqNull(domValue) ? "" : "" + domValue;
207
- }
208
- };
209
- const updateAutoTxt = () => {
210
- const { size, autosize, autoSize } = props;
211
- const { inputValue } = reactData;
212
- if (autosize || autoSize) {
213
- const formReadonly = computeFormReadonly.value;
214
- if (!autoTxtElem) {
215
- autoTxtElem = document.createElement("div");
161
+ return disabled;
162
+ });
163
+ const computeInputReadonly = (0, import_vue.computed)(() => {
164
+ const { editable, readonly } = props;
165
+ return readonly || !editable;
166
+ });
167
+ const computeInpPlaceholder = (0, import_vue.computed)(() => {
168
+ const { placeholder } = props;
169
+ if (placeholder) {
170
+ return (0, import_utils.getFuncText)(placeholder);
171
+ }
172
+ const globalPlaceholder = getConfig().textarea.placeholder;
173
+ if (globalPlaceholder) {
174
+ return (0, import_utils.getFuncText)(globalPlaceholder);
216
175
  }
217
- if (!autoTxtElem.parentNode) {
218
- document.body.appendChild(autoTxtElem);
176
+ return getI18n("vxe.base.pleaseInput");
177
+ });
178
+ const computeInpMaxLength = (0, import_vue.computed)(() => {
179
+ const { maxLength, maxlength } = props;
180
+ return maxLength || maxlength;
181
+ });
182
+ const computeInputCount = (0, import_vue.computed)(() => {
183
+ return import_xe_utils.default.getSize(reactData.inputValue);
184
+ });
185
+ const computeIsCountError = (0, import_vue.computed)(() => {
186
+ const inputCount = computeInputCount.value;
187
+ const inpMaxLength = computeInpMaxLength.value;
188
+ return inpMaxLength && inputCount > import_xe_utils.default.toNumber(inpMaxLength);
189
+ });
190
+ const computeSizeOpts = (0, import_vue.computed)(() => {
191
+ const { autosize, autoSize } = props;
192
+ if (autosize || getConfig().textarea.autosize) {
193
+ return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autosize, autosize);
219
194
  }
195
+ return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autoSize, autoSize);
196
+ });
197
+ const computeDomValue = (0, import_vue.computed)(() => {
198
+ const { inputValue } = reactData;
199
+ return inputValue;
200
+ });
201
+ const dispatchEvent = (type, params, evnt) => {
202
+ emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
203
+ };
204
+ const updateDomValue = () => {
205
+ const domValue = computeDomValue.value;
220
206
  const taElem = refTextarea.value;
221
- const ctElem = refContent.value;
222
- const textElem = formReadonly ? ctElem : taElem;
223
- if (!textElem) {
224
- return;
207
+ if (taElem) {
208
+ taElem.value = import_xe_utils.default.eqNull(domValue) ? "" : "" + domValue;
225
209
  }
226
- const textStyle = getComputedStyle(textElem);
227
- autoTxtElem.className = ["vxe-textarea--autosize", size ? `size--${size}` : ""].join(" ");
228
- autoTxtElem.style.width = `${textElem.clientWidth}px`;
229
- autoTxtElem.style.padding = textStyle.padding;
230
- autoTxtElem.innerText = ("" + (inputValue || " ")).replace(/\n$/, "\n ");
231
- }
232
- };
233
- const handleResize = () => {
234
- const { autosize, autoSize } = props;
235
- if (autosize || autoSize) {
236
- (0, import_vue.nextTick)(() => {
237
- const sizeOpts = computeSizeOpts.value;
210
+ };
211
+ const updateAutoTxt = () => {
212
+ const { size, autosize, autoSize } = props;
213
+ const { inputValue } = reactData;
214
+ if (autosize || autoSize) {
238
215
  const formReadonly = computeFormReadonly.value;
239
- const { minRows, maxRows } = sizeOpts;
216
+ if (!autoTxtElem) {
217
+ autoTxtElem = document.createElement("div");
218
+ }
219
+ if (!autoTxtElem.parentNode) {
220
+ document.body.appendChild(autoTxtElem);
221
+ }
240
222
  const taElem = refTextarea.value;
241
223
  const ctElem = refContent.value;
242
224
  const textElem = formReadonly ? ctElem : taElem;
243
225
  if (!textElem) {
244
226
  return;
245
227
  }
246
- const sizeHeight = autoTxtElem.clientHeight;
247
228
  const textStyle = getComputedStyle(textElem);
248
- const lineHeight = import_xe_utils.default.toNumber(textStyle.lineHeight);
249
- const paddingTop = import_xe_utils.default.toNumber(textStyle.paddingTop);
250
- const paddingBottom = import_xe_utils.default.toNumber(textStyle.paddingBottom);
251
- const borderTopWidth = import_xe_utils.default.toNumber(textStyle.borderTopWidth);
252
- const borderBottomWidth = import_xe_utils.default.toNumber(textStyle.borderBottomWidth);
253
- const intervalHeight = paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;
254
- const rowNum = (sizeHeight - intervalHeight) / lineHeight;
255
- const textRows = rowNum && /[0-9]/.test("" + rowNum) ? rowNum : Math.floor(rowNum) + 1;
256
- let vaildRows = textRows;
257
- if (textRows < minRows) {
258
- vaildRows = minRows;
259
- } else if (textRows > maxRows) {
260
- vaildRows = maxRows;
229
+ autoTxtElem.className = ["vxe-textarea--autosize", size ? `size--${size}` : ""].join(" ");
230
+ autoTxtElem.style.width = `${textElem.clientWidth}px`;
231
+ autoTxtElem.style.padding = textStyle.padding;
232
+ autoTxtElem.innerText = ("" + (inputValue || " ")).replace(/\n$/, "\n ");
233
+ }
234
+ };
235
+ const handleResize = () => {
236
+ const { autosize, autoSize } = props;
237
+ if (autosize || autoSize) {
238
+ (0, import_vue.nextTick)(() => {
239
+ const sizeOpts = computeSizeOpts.value;
240
+ const formReadonly = computeFormReadonly.value;
241
+ const { minRows, maxRows } = sizeOpts;
242
+ const taElem = refTextarea.value;
243
+ const ctElem = refContent.value;
244
+ const textElem = formReadonly ? ctElem : taElem;
245
+ if (!textElem) {
246
+ return;
247
+ }
248
+ const sizeHeight = autoTxtElem.clientHeight;
249
+ const textStyle = getComputedStyle(textElem);
250
+ const lineHeight = import_xe_utils.default.toNumber(textStyle.lineHeight);
251
+ const paddingTop = import_xe_utils.default.toNumber(textStyle.paddingTop);
252
+ const paddingBottom = import_xe_utils.default.toNumber(textStyle.paddingBottom);
253
+ const borderTopWidth = import_xe_utils.default.toNumber(textStyle.borderTopWidth);
254
+ const borderBottomWidth = import_xe_utils.default.toNumber(textStyle.borderBottomWidth);
255
+ const intervalHeight = paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;
256
+ const rowNum = (sizeHeight - intervalHeight) / lineHeight;
257
+ const textRows = rowNum && /[0-9]/.test("" + rowNum) ? rowNum : Math.floor(rowNum) + 1;
258
+ let vaildRows = textRows;
259
+ if (textRows < minRows) {
260
+ vaildRows = minRows;
261
+ } else if (textRows > maxRows) {
262
+ vaildRows = maxRows;
263
+ }
264
+ textElem.style.height = `${vaildRows * lineHeight + intervalHeight}px`;
265
+ });
266
+ }
267
+ };
268
+ const triggerEvent = (evnt) => {
269
+ const value = reactData.inputValue;
270
+ dispatchEvent(evnt.type, { value }, evnt);
271
+ };
272
+ const handleChange = (value, evnt) => {
273
+ if (props.trim) {
274
+ value = `${value || ""}`.trim();
275
+ }
276
+ reactData.inputValue = value;
277
+ emit("update:modelValue", value);
278
+ if (import_xe_utils.default.toValueString(props.modelValue) !== value) {
279
+ dispatchEvent("change", { value }, evnt);
280
+ if ($xeForm && formItemInfo) {
281
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
261
282
  }
262
- textElem.style.height = `${vaildRows * lineHeight + intervalHeight}px`;
263
- });
264
- }
265
- };
266
- const triggerEvent = (evnt) => {
267
- const value = reactData.inputValue;
268
- dispatchEvent(evnt.type, { value }, evnt);
269
- };
270
- const handleChange = (value, evnt) => {
271
- if (props.trim) {
272
- value = `${value || ""}`.trim();
273
- }
274
- reactData.inputValue = value;
275
- emit("update:modelValue", value);
276
- if (import_xe_utils.default.toValueString(props.modelValue) !== value) {
277
- dispatchEvent("change", { value }, evnt);
278
- if ($xeForm && formItemInfo) {
279
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
280
283
  }
281
- }
282
- };
283
- const clearValueEvent = (evnt, value) => {
284
- const { autoFocus } = props;
285
- if (autoFocus || autoFocus === null) {
286
- focus();
287
- }
288
- handleChange("", evnt);
289
- dispatchEvent("clear", { value }, evnt);
290
- };
291
- const inputEvent = (evnt) => {
292
- const { immediate } = props;
293
- const textElem = evnt.target;
294
- const value = textElem.value;
295
- reactData.inputValue = value;
296
- if (immediate) {
297
- handleChange(value, evnt);
298
- } else {
299
- if ($xeForm && formItemInfo) {
300
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
284
+ };
285
+ const clearValueEvent = (evnt, value) => {
286
+ const { autoFocus } = props;
287
+ if (autoFocus || autoFocus === null) {
288
+ focus();
289
+ }
290
+ handleChange("", evnt);
291
+ dispatchEvent("clear", { value }, evnt);
292
+ };
293
+ const inputEvent = (evnt) => {
294
+ const { immediate } = props;
295
+ const textElem = evnt.target;
296
+ const value = textElem.value;
297
+ reactData.inputValue = value;
298
+ if (immediate) {
299
+ handleChange(value, evnt);
300
+ } else {
301
+ if ($xeForm && formItemInfo) {
302
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
303
+ }
304
+ }
305
+ dispatchEvent("input", { value }, evnt);
306
+ handleResize();
307
+ };
308
+ const changeEvent = (evnt) => {
309
+ const { immediate } = props;
310
+ if (immediate) {
311
+ triggerEvent(evnt);
312
+ } else {
313
+ handleChange(reactData.inputValue, evnt);
314
+ }
315
+ dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
316
+ };
317
+ const blurEvent = (evnt) => {
318
+ const { immediate } = props;
319
+ const { inputValue } = reactData;
320
+ if (!immediate) {
321
+ handleChange(inputValue, evnt);
322
+ } else {
323
+ updateDomValue();
324
+ }
325
+ dispatchEvent("blur", { value: inputValue }, evnt);
326
+ };
327
+ const textareaMethods = {
328
+ dispatchEvent,
329
+ focus() {
330
+ const textElem = refTextarea.value;
331
+ textElem.focus();
332
+ return (0, import_vue.nextTick)();
333
+ },
334
+ blur() {
335
+ const textElem = refTextarea.value;
336
+ textElem.blur();
337
+ return (0, import_vue.nextTick)();
338
+ }
339
+ };
340
+ Object.assign($xeTextarea, textareaMethods);
341
+ const renderVN = () => {
342
+ const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols, clearable } = props;
343
+ const { inputValue } = reactData;
344
+ const vSize = computeSize.value;
345
+ const isDisabled = computeIsDisabled.value;
346
+ const isCountError = computeIsCountError.value;
347
+ const inputCount = computeInputCount.value;
348
+ const inputReadonly = computeInputReadonly.value;
349
+ const formReadonly = computeFormReadonly.value;
350
+ const inpPlaceholder = computeInpPlaceholder.value;
351
+ const inpMaxLength = computeInpMaxLength.value;
352
+ if (formReadonly) {
353
+ return (0, import_vue.h)(
354
+ "div",
355
+ {
356
+ ref: refElem,
357
+ class: ["vxe-textarea--readonly", className]
358
+ },
359
+ [
360
+ (0, import_vue.h)(
361
+ "div",
362
+ {
363
+ ref: refContent,
364
+ class: "vxe-textarea--content"
365
+ },
366
+ inputValue
367
+ )
368
+ ]
369
+ );
301
370
  }
302
- }
303
- dispatchEvent("input", { value }, evnt);
304
- handleResize();
305
- };
306
- const changeEvent = (evnt) => {
307
- const { immediate } = props;
308
- if (immediate) {
309
- triggerEvent(evnt);
310
- } else {
311
- handleChange(reactData.inputValue, evnt);
312
- }
313
- dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
314
- };
315
- const blurEvent = (evnt) => {
316
- const { immediate } = props;
317
- const { inputValue } = reactData;
318
- if (!immediate) {
319
- handleChange(inputValue, evnt);
320
- } else {
321
- updateDomValue();
322
- }
323
- dispatchEvent("blur", { value: inputValue }, evnt);
324
- };
325
- const textareaMethods = {
326
- dispatchEvent,
327
- focus() {
328
- const textElem = refTextarea.value;
329
- textElem.focus();
330
- return (0, import_vue.nextTick)();
331
- },
332
- blur() {
333
- const textElem = refTextarea.value;
334
- textElem.blur();
335
- return (0, import_vue.nextTick)();
336
- }
337
- };
338
- Object.assign($xeTextarea, textareaMethods);
339
- const renderVN = () => {
340
- const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols, clearable } = props;
341
- const { inputValue } = reactData;
342
- const vSize = computeSize.value;
343
- const isDisabled = computeIsDisabled.value;
344
- const isCountError = computeIsCountError.value;
345
- const inputCount = computeInputCount.value;
346
- const inputReadonly = computeInputReadonly.value;
347
- const formReadonly = computeFormReadonly.value;
348
- const inpPlaceholder = computeInpPlaceholder.value;
349
- const inpMaxLength = computeInpMaxLength.value;
350
- if (formReadonly) {
351
371
  return (0, import_vue.h)(
352
372
  "div",
353
373
  {
354
374
  ref: refElem,
355
- class: ["vxe-textarea--readonly", className]
375
+ class: [
376
+ "vxe-textarea",
377
+ className,
378
+ {
379
+ [`size--${vSize}`]: vSize,
380
+ "is--autosize": autosize || autoSize,
381
+ "is--count": showWordCount,
382
+ "is--disabled": isDisabled,
383
+ "is-clear": clearable,
384
+ "is--rows": !import_xe_utils.default.eqNull(rows),
385
+ "is--cols": !import_xe_utils.default.eqNull(cols),
386
+ "show--clear": clearable && !isDisabled && !(inputValue === "" || import_xe_utils.default.eqNull(inputValue))
387
+ }
388
+ ],
389
+ spellcheck: false
356
390
  },
357
391
  [
358
- (0, import_vue.h)(
392
+ (0, import_vue.h)("textarea", {
393
+ ref: refTextarea,
394
+ class: ["vxe-textarea--inner", inputClassName || ""],
395
+ name: props.name,
396
+ placeholder: inpPlaceholder,
397
+ maxlength: inpMaxLength,
398
+ readonly: inputReadonly,
399
+ disabled: isDisabled,
400
+ rows,
401
+ cols,
402
+ style: resize ? {
403
+ resize
404
+ } : null,
405
+ onInput: inputEvent,
406
+ onChange: changeEvent,
407
+ onKeydown: triggerEvent,
408
+ onKeyup: triggerEvent,
409
+ onClick: triggerEvent,
410
+ onFocus: triggerEvent,
411
+ onBlur: blurEvent
412
+ }),
413
+ clearable || showWordCount ? (0, import_vue.h)(
359
414
  "div",
360
415
  {
361
- ref: refContent,
362
- class: "vxe-textarea--content"
416
+ class: "vxe-textarea--suffix"
363
417
  },
364
- inputValue
365
- )
418
+ [
419
+ clearable ? (0, import_vue.h)(
420
+ "div",
421
+ {
422
+ class: "vxe-textarea--clear-icon",
423
+ onClick: clearValueEvent
424
+ },
425
+ [
426
+ (0, import_vue.h)("i", {
427
+ class: getIcon().TEXTAREA_CLEAR
428
+ })
429
+ ]
430
+ ) : renderEmptyElement($xeTextarea),
431
+ showWordCount ? (0, import_vue.h)(
432
+ "span",
433
+ {
434
+ class: [
435
+ "vxe-textarea--count",
436
+ {
437
+ "is--error": isCountError
438
+ }
439
+ ]
440
+ },
441
+ countMethod ? `${countMethod({ value: inputValue })}` : `${inputCount}${inpMaxLength ? `/${inpMaxLength}` : ""}`
442
+ ) : renderEmptyElement($xeTextarea)
443
+ ]
444
+ ) : renderEmptyElement($xeTextarea)
366
445
  ]
367
446
  );
368
- }
369
- return (0, import_vue.h)(
370
- "div",
371
- {
372
- ref: refElem,
373
- class: [
374
- "vxe-textarea",
375
- className,
376
- {
377
- [`size--${vSize}`]: vSize,
378
- "is--autosize": autosize || autoSize,
379
- "is--count": showWordCount,
380
- "is--disabled": isDisabled,
381
- "is-clear": clearable,
382
- "is--rows": !import_xe_utils.default.eqNull(rows),
383
- "is--cols": !import_xe_utils.default.eqNull(cols),
384
- "show--clear": clearable && !isDisabled && !(inputValue === "" || import_xe_utils.default.eqNull(inputValue))
385
- }
386
- ],
387
- spellcheck: false
388
- },
389
- [
390
- (0, import_vue.h)("textarea", {
391
- ref: refTextarea,
392
- class: ["vxe-textarea--inner", inputClassName || ""],
393
- name: props.name,
394
- placeholder: inpPlaceholder,
395
- maxlength: inpMaxLength,
396
- readonly: inputReadonly,
397
- disabled: isDisabled,
398
- rows,
399
- cols,
400
- style: resize ? {
401
- resize
402
- } : null,
403
- onInput: inputEvent,
404
- onChange: changeEvent,
405
- onKeydown: triggerEvent,
406
- onKeyup: triggerEvent,
407
- onClick: triggerEvent,
408
- onFocus: triggerEvent,
409
- onBlur: blurEvent
410
- }),
411
- clearable || showWordCount ? (0, import_vue.h)(
412
- "div",
413
- {
414
- class: "vxe-textarea--suffix"
415
- },
416
- [
417
- clearable ? (0, import_vue.h)(
418
- "div",
419
- {
420
- class: "vxe-textarea--clear-icon",
421
- onClick: clearValueEvent
422
- },
423
- [
424
- (0, import_vue.h)("i", {
425
- class: getIcon().TEXTAREA_CLEAR
426
- })
427
- ]
428
- ) : renderEmptyElement($xeTextarea),
429
- showWordCount ? (0, import_vue.h)(
430
- "span",
431
- {
432
- class: [
433
- "vxe-textarea--count",
434
- {
435
- "is--error": isCountError
436
- }
437
- ]
438
- },
439
- countMethod ? `${countMethod({ value: inputValue })}` : `${inputCount}${inpMaxLength ? `/${inpMaxLength}` : ""}`
440
- ) : renderEmptyElement($xeTextarea)
441
- ]
442
- ) : renderEmptyElement($xeTextarea)
443
- ]
447
+ };
448
+ (0, import_vue.watch)(
449
+ () => props.modelValue,
450
+ (val) => {
451
+ reactData.inputValue = val;
452
+ updateAutoTxt();
453
+ }
444
454
  );
445
- };
446
- (0, import_vue.watch)(
447
- () => props.modelValue,
448
- (val) => {
449
- reactData.inputValue = val;
450
- updateAutoTxt();
451
- }
452
- );
453
- const reFlag = (0, import_vue.ref)(0);
454
- (0, import_vue.watch)(computeFormReadonly, () => {
455
- reFlag.value++;
456
- });
457
- (0, import_vue.watch)(computeSizeOpts, () => {
458
- reFlag.value++;
459
- });
460
- (0, import_vue.watch)(
461
- () => props.autoSize,
462
- () => {
455
+ const reFlag = (0, import_vue.ref)(0);
456
+ (0, import_vue.watch)(computeFormReadonly, () => {
463
457
  reFlag.value++;
464
- }
465
- );
466
- (0, import_vue.watch)(
467
- () => props.autosize,
468
- () => {
458
+ });
459
+ (0, import_vue.watch)(computeSizeOpts, () => {
469
460
  reFlag.value++;
470
- }
471
- );
472
- (0, import_vue.watch)(reFlag, () => {
473
- updateAutoTxt();
474
- handleResize();
475
- });
476
- const rDvFlag = (0, import_vue.ref)(0);
477
- (0, import_vue.watch)(computeFormReadonly, () => {
478
- rDvFlag.value++;
479
- });
480
- (0, import_vue.watch)(computeDomValue, () => {
481
- rDvFlag.value++;
482
- });
483
- (0, import_vue.watch)(rDvFlag, () => {
484
- updateDomValue();
485
- });
486
- (0, import_vue.onMounted)(() => {
487
- updateDomValue();
488
- (0, import_vue.nextTick)(() => {
489
- updateDomValue();
490
461
  });
491
- });
492
- (0, import_vue.nextTick)(() => {
493
- const { autosize, autoSize } = props;
494
- if (autosize) {
495
- warnLog("vxe.error.delProp", ["autosize", "auto-size"]);
496
- }
497
- if (autosize || autoSize) {
462
+ (0, import_vue.watch)(
463
+ () => props.autoSize,
464
+ () => {
465
+ reFlag.value++;
466
+ }
467
+ );
468
+ (0, import_vue.watch)(
469
+ () => props.autosize,
470
+ () => {
471
+ reFlag.value++;
472
+ }
473
+ );
474
+ (0, import_vue.watch)(reFlag, () => {
498
475
  updateAutoTxt();
499
476
  handleResize();
500
- }
501
- });
502
- $xeTextarea.renderVN = renderVN;
503
- return $xeTextarea;
504
- },
505
- render() {
506
- return this.renderVN();
507
- }
508
- });
477
+ });
478
+ const rDvFlag = (0, import_vue.ref)(0);
479
+ (0, import_vue.watch)(computeFormReadonly, () => {
480
+ rDvFlag.value++;
481
+ });
482
+ (0, import_vue.watch)(computeDomValue, () => {
483
+ rDvFlag.value++;
484
+ });
485
+ (0, import_vue.watch)(rDvFlag, () => {
486
+ updateDomValue();
487
+ });
488
+ (0, import_vue.onMounted)(() => {
489
+ updateDomValue();
490
+ (0, import_vue.nextTick)(() => {
491
+ updateDomValue();
492
+ });
493
+ });
494
+ (0, import_vue.nextTick)(() => {
495
+ const { autosize, autoSize } = props;
496
+ if (autosize) {
497
+ warnLog("vxe.error.delProp", ["autosize", "auto-size"]);
498
+ }
499
+ if (autosize || autoSize) {
500
+ updateAutoTxt();
501
+ handleResize();
502
+ }
503
+ });
504
+ $xeTextarea.renderVN = renderVN;
505
+ return $xeTextarea;
506
+ },
507
+ render() {
508
+ return this.renderVN();
509
+ }
510
+ })
511
+ );