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
@@ -7,472 +7,475 @@ import { createComponentLog } from "../../ui/src/log";
7
7
  const { getConfig, getIcon, getI18n, createEvent, useFns, renderEmptyElement } = VxeUI;
8
8
  const { warnLog } = createComponentLog("textarea");
9
9
  let autoTxtElem;
10
- var textarea_default = defineVxeComponent({
11
- name: "VxeTextarea",
12
- props: {
13
- modelValue: [String, Number],
14
- className: String,
15
- inputClassName: {
16
- type: String,
17
- default: () => getConfig().textarea.inputClassName
18
- },
19
- immediate: {
20
- type: Boolean,
21
- default: true
22
- },
23
- name: String,
24
- readonly: {
25
- type: Boolean,
26
- default: null
27
- },
28
- editable: {
29
- type: Boolean,
30
- default: true
31
- },
32
- disabled: {
33
- type: Boolean,
34
- default: null
35
- },
36
- clearable: {
37
- type: Boolean,
38
- default: () => getConfig().textarea.clearable
39
- },
40
- placeholder: String,
41
- maxLength: [String, Number],
42
- trim: {
43
- type: Boolean,
44
- default: () => getConfig().textarea.trim
45
- },
46
- rows: {
47
- type: [String, Number],
48
- default: null
49
- },
50
- cols: {
51
- type: [String, Number],
52
- default: null
53
- },
54
- showWordCount: Boolean,
55
- countMethod: Function,
56
- autoFocus: {
57
- type: Boolean,
58
- default: null
59
- },
60
- /**
61
- * 已废弃,被 auto-size 替换
62
- * @deprecated
63
- */
64
- autosize: {
65
- type: [Boolean, Object],
66
- default: null
67
- },
68
- autoSize: {
69
- type: [Boolean, Object],
70
- default: null
71
- },
72
- form: String,
73
- resize: {
74
- type: String,
75
- default: () => getConfig().textarea.resize
76
- },
77
- size: {
78
- type: String,
79
- default: () => getConfig().textarea.size || getConfig().size
10
+ var textarea_default = (
11
+ /* define-vxe-component start */
12
+ defineVxeComponent({
13
+ name: "VxeTextarea",
14
+ props: {
15
+ modelValue: [String, Number],
16
+ className: String,
17
+ inputClassName: {
18
+ type: String,
19
+ default: () => getConfig().textarea.inputClassName
20
+ },
21
+ immediate: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ name: String,
26
+ readonly: {
27
+ type: Boolean,
28
+ default: null
29
+ },
30
+ editable: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ disabled: {
35
+ type: Boolean,
36
+ default: null
37
+ },
38
+ clearable: {
39
+ type: Boolean,
40
+ default: () => getConfig().textarea.clearable
41
+ },
42
+ placeholder: String,
43
+ maxLength: [String, Number],
44
+ trim: {
45
+ type: Boolean,
46
+ default: () => getConfig().textarea.trim
47
+ },
48
+ rows: {
49
+ type: [String, Number],
50
+ default: null
51
+ },
52
+ cols: {
53
+ type: [String, Number],
54
+ default: null
55
+ },
56
+ showWordCount: Boolean,
57
+ countMethod: Function,
58
+ autoFocus: {
59
+ type: Boolean,
60
+ default: null
61
+ },
62
+ /**
63
+ * 已废弃,被 auto-size 替换
64
+ * @deprecated
65
+ */
66
+ autosize: {
67
+ type: [Boolean, Object],
68
+ default: null
69
+ },
70
+ autoSize: {
71
+ type: [Boolean, Object],
72
+ default: null
73
+ },
74
+ form: String,
75
+ resize: {
76
+ type: String,
77
+ default: () => getConfig().textarea.resize
78
+ },
79
+ size: {
80
+ type: String,
81
+ default: () => getConfig().textarea.size || getConfig().size
82
+ },
83
+ // 已废弃
84
+ maxlength: [String, Number]
80
85
  },
81
- // 已废弃
82
- maxlength: [String, Number]
83
- },
84
- emits: ["update:modelValue", "input", "keydown", "keyup", "click", "change", "focus", "blur", "clear", "lazy-change"],
85
- setup(props, context) {
86
- const { emit } = context;
87
- const $xeForm = inject("$xeForm", null);
88
- const formItemInfo = inject("xeFormItemInfo", null);
89
- const xID = XEUtils.uniqueId();
90
- const { computeSize } = useFns.useSize(props);
91
- const reactData = reactive({
92
- inputValue: props.modelValue
93
- });
94
- const refElem = ref();
95
- const refTextarea = ref();
96
- const refContent = ref();
97
- const refMaps = {
98
- refElem,
99
- refTextarea
100
- };
101
- const $xeTextarea = {
102
- xID,
103
- props,
104
- context,
105
- reactData,
106
- getRefMaps: () => refMaps
107
- };
108
- const computeFormReadonly = computed(() => {
109
- const { readonly } = props;
110
- if (readonly === null) {
111
- if ($xeForm) {
112
- return $xeForm.props.readonly;
86
+ emits: ["update:modelValue", "input", "keydown", "keyup", "click", "change", "focus", "blur", "clear", "lazy-change"],
87
+ setup(props, context) {
88
+ const { emit } = context;
89
+ const $xeForm = inject("$xeForm", null);
90
+ const formItemInfo = inject("xeFormItemInfo", null);
91
+ const xID = XEUtils.uniqueId();
92
+ const { computeSize } = useFns.useSize(props);
93
+ const reactData = reactive({
94
+ inputValue: props.modelValue
95
+ });
96
+ const refElem = ref();
97
+ const refTextarea = ref();
98
+ const refContent = ref();
99
+ const refMaps = {
100
+ refElem,
101
+ refTextarea
102
+ };
103
+ const $xeTextarea = {
104
+ xID,
105
+ props,
106
+ context,
107
+ reactData,
108
+ getRefMaps: () => refMaps
109
+ };
110
+ const computeFormReadonly = computed(() => {
111
+ const { readonly } = props;
112
+ if (readonly === null) {
113
+ if ($xeForm) {
114
+ return $xeForm.props.readonly;
115
+ }
116
+ return false;
113
117
  }
114
- return false;
115
- }
116
- return readonly;
117
- });
118
- const computeIsDisabled = computed(() => {
119
- const { disabled } = props;
120
- if (disabled === null) {
121
- if ($xeForm) {
122
- return $xeForm.props.disabled;
118
+ return readonly;
119
+ });
120
+ const computeIsDisabled = computed(() => {
121
+ const { disabled } = props;
122
+ if (disabled === null) {
123
+ if ($xeForm) {
124
+ return $xeForm.props.disabled;
125
+ }
126
+ return false;
123
127
  }
124
- return false;
125
- }
126
- return disabled;
127
- });
128
- const computeInputReadonly = computed(() => {
129
- const { editable, readonly } = props;
130
- return readonly || !editable;
131
- });
132
- const computeInpPlaceholder = computed(() => {
133
- const { placeholder } = props;
134
- if (placeholder) {
135
- return getFuncText(placeholder);
136
- }
137
- const globalPlaceholder = getConfig().textarea.placeholder;
138
- if (globalPlaceholder) {
139
- return getFuncText(globalPlaceholder);
140
- }
141
- return getI18n("vxe.base.pleaseInput");
142
- });
143
- const computeInpMaxLength = computed(() => {
144
- const { maxLength, maxlength } = props;
145
- return maxLength || maxlength;
146
- });
147
- const computeInputCount = computed(() => {
148
- return XEUtils.getSize(reactData.inputValue);
149
- });
150
- const computeIsCountError = computed(() => {
151
- const inputCount = computeInputCount.value;
152
- const inpMaxLength = computeInpMaxLength.value;
153
- return inpMaxLength && inputCount > XEUtils.toNumber(inpMaxLength);
154
- });
155
- const computeSizeOpts = computed(() => {
156
- const { autosize, autoSize } = props;
157
- if (autosize || getConfig().textarea.autosize) {
158
- return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autosize, autosize);
159
- }
160
- return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autoSize, autoSize);
161
- });
162
- const computeDomValue = computed(() => {
163
- const { inputValue } = reactData;
164
- return inputValue;
165
- });
166
- const dispatchEvent = (type, params, evnt) => {
167
- emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
168
- };
169
- const updateDomValue = () => {
170
- const domValue = computeDomValue.value;
171
- const taElem = refTextarea.value;
172
- if (taElem) {
173
- taElem.value = XEUtils.eqNull(domValue) ? "" : "" + domValue;
174
- }
175
- };
176
- const updateAutoTxt = () => {
177
- const { size, autosize, autoSize } = props;
178
- const { inputValue } = reactData;
179
- if (autosize || autoSize) {
180
- const formReadonly = computeFormReadonly.value;
181
- if (!autoTxtElem) {
182
- autoTxtElem = document.createElement("div");
128
+ return disabled;
129
+ });
130
+ const computeInputReadonly = computed(() => {
131
+ const { editable, readonly } = props;
132
+ return readonly || !editable;
133
+ });
134
+ const computeInpPlaceholder = computed(() => {
135
+ const { placeholder } = props;
136
+ if (placeholder) {
137
+ return getFuncText(placeholder);
183
138
  }
184
- if (!autoTxtElem.parentNode) {
185
- document.body.appendChild(autoTxtElem);
139
+ const globalPlaceholder = getConfig().textarea.placeholder;
140
+ if (globalPlaceholder) {
141
+ return getFuncText(globalPlaceholder);
186
142
  }
143
+ return getI18n("vxe.base.pleaseInput");
144
+ });
145
+ const computeInpMaxLength = computed(() => {
146
+ const { maxLength, maxlength } = props;
147
+ return maxLength || maxlength;
148
+ });
149
+ const computeInputCount = computed(() => {
150
+ return XEUtils.getSize(reactData.inputValue);
151
+ });
152
+ const computeIsCountError = computed(() => {
153
+ const inputCount = computeInputCount.value;
154
+ const inpMaxLength = computeInpMaxLength.value;
155
+ return inpMaxLength && inputCount > XEUtils.toNumber(inpMaxLength);
156
+ });
157
+ const computeSizeOpts = computed(() => {
158
+ const { autosize, autoSize } = props;
159
+ if (autosize || getConfig().textarea.autosize) {
160
+ return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autosize, autosize);
161
+ }
162
+ return Object.assign({ minRows: 1, maxRows: 10 }, getConfig().textarea.autoSize, autoSize);
163
+ });
164
+ const computeDomValue = computed(() => {
165
+ const { inputValue } = reactData;
166
+ return inputValue;
167
+ });
168
+ const dispatchEvent = (type, params, evnt) => {
169
+ emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
170
+ };
171
+ const updateDomValue = () => {
172
+ const domValue = computeDomValue.value;
187
173
  const taElem = refTextarea.value;
188
- const ctElem = refContent.value;
189
- const textElem = formReadonly ? ctElem : taElem;
190
- if (!textElem) {
191
- return;
174
+ if (taElem) {
175
+ taElem.value = XEUtils.eqNull(domValue) ? "" : "" + domValue;
192
176
  }
193
- const textStyle = getComputedStyle(textElem);
194
- autoTxtElem.className = ["vxe-textarea--autosize", size ? `size--${size}` : ""].join(" ");
195
- autoTxtElem.style.width = `${textElem.clientWidth}px`;
196
- autoTxtElem.style.padding = textStyle.padding;
197
- autoTxtElem.innerText = ("" + (inputValue || " ")).replace(/\n$/, "\n ");
198
- }
199
- };
200
- const handleResize = () => {
201
- const { autosize, autoSize } = props;
202
- if (autosize || autoSize) {
203
- nextTick(() => {
204
- const sizeOpts = computeSizeOpts.value;
177
+ };
178
+ const updateAutoTxt = () => {
179
+ const { size, autosize, autoSize } = props;
180
+ const { inputValue } = reactData;
181
+ if (autosize || autoSize) {
205
182
  const formReadonly = computeFormReadonly.value;
206
- const { minRows, maxRows } = sizeOpts;
183
+ if (!autoTxtElem) {
184
+ autoTxtElem = document.createElement("div");
185
+ }
186
+ if (!autoTxtElem.parentNode) {
187
+ document.body.appendChild(autoTxtElem);
188
+ }
207
189
  const taElem = refTextarea.value;
208
190
  const ctElem = refContent.value;
209
191
  const textElem = formReadonly ? ctElem : taElem;
210
192
  if (!textElem) {
211
193
  return;
212
194
  }
213
- const sizeHeight = autoTxtElem.clientHeight;
214
195
  const textStyle = getComputedStyle(textElem);
215
- const lineHeight = XEUtils.toNumber(textStyle.lineHeight);
216
- const paddingTop = XEUtils.toNumber(textStyle.paddingTop);
217
- const paddingBottom = XEUtils.toNumber(textStyle.paddingBottom);
218
- const borderTopWidth = XEUtils.toNumber(textStyle.borderTopWidth);
219
- const borderBottomWidth = XEUtils.toNumber(textStyle.borderBottomWidth);
220
- const intervalHeight = paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;
221
- const rowNum = (sizeHeight - intervalHeight) / lineHeight;
222
- const textRows = rowNum && /[0-9]/.test("" + rowNum) ? rowNum : Math.floor(rowNum) + 1;
223
- let vaildRows = textRows;
224
- if (textRows < minRows) {
225
- vaildRows = minRows;
226
- } else if (textRows > maxRows) {
227
- vaildRows = maxRows;
196
+ autoTxtElem.className = ["vxe-textarea--autosize", size ? `size--${size}` : ""].join(" ");
197
+ autoTxtElem.style.width = `${textElem.clientWidth}px`;
198
+ autoTxtElem.style.padding = textStyle.padding;
199
+ autoTxtElem.innerText = ("" + (inputValue || " ")).replace(/\n$/, "\n ");
200
+ }
201
+ };
202
+ const handleResize = () => {
203
+ const { autosize, autoSize } = props;
204
+ if (autosize || autoSize) {
205
+ nextTick(() => {
206
+ const sizeOpts = computeSizeOpts.value;
207
+ const formReadonly = computeFormReadonly.value;
208
+ const { minRows, maxRows } = sizeOpts;
209
+ const taElem = refTextarea.value;
210
+ const ctElem = refContent.value;
211
+ const textElem = formReadonly ? ctElem : taElem;
212
+ if (!textElem) {
213
+ return;
214
+ }
215
+ const sizeHeight = autoTxtElem.clientHeight;
216
+ const textStyle = getComputedStyle(textElem);
217
+ const lineHeight = XEUtils.toNumber(textStyle.lineHeight);
218
+ const paddingTop = XEUtils.toNumber(textStyle.paddingTop);
219
+ const paddingBottom = XEUtils.toNumber(textStyle.paddingBottom);
220
+ const borderTopWidth = XEUtils.toNumber(textStyle.borderTopWidth);
221
+ const borderBottomWidth = XEUtils.toNumber(textStyle.borderBottomWidth);
222
+ const intervalHeight = paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;
223
+ const rowNum = (sizeHeight - intervalHeight) / lineHeight;
224
+ const textRows = rowNum && /[0-9]/.test("" + rowNum) ? rowNum : Math.floor(rowNum) + 1;
225
+ let vaildRows = textRows;
226
+ if (textRows < minRows) {
227
+ vaildRows = minRows;
228
+ } else if (textRows > maxRows) {
229
+ vaildRows = maxRows;
230
+ }
231
+ textElem.style.height = `${vaildRows * lineHeight + intervalHeight}px`;
232
+ });
233
+ }
234
+ };
235
+ const triggerEvent = (evnt) => {
236
+ const value = reactData.inputValue;
237
+ dispatchEvent(evnt.type, { value }, evnt);
238
+ };
239
+ const handleChange = (value, evnt) => {
240
+ if (props.trim) {
241
+ value = `${value || ""}`.trim();
242
+ }
243
+ reactData.inputValue = value;
244
+ emit("update:modelValue", value);
245
+ if (XEUtils.toValueString(props.modelValue) !== value) {
246
+ dispatchEvent("change", { value }, evnt);
247
+ if ($xeForm && formItemInfo) {
248
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
228
249
  }
229
- textElem.style.height = `${vaildRows * lineHeight + intervalHeight}px`;
230
- });
231
- }
232
- };
233
- const triggerEvent = (evnt) => {
234
- const value = reactData.inputValue;
235
- dispatchEvent(evnt.type, { value }, evnt);
236
- };
237
- const handleChange = (value, evnt) => {
238
- if (props.trim) {
239
- value = `${value || ""}`.trim();
240
- }
241
- reactData.inputValue = value;
242
- emit("update:modelValue", value);
243
- if (XEUtils.toValueString(props.modelValue) !== value) {
244
- dispatchEvent("change", { value }, evnt);
245
- if ($xeForm && formItemInfo) {
246
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
247
250
  }
248
- }
249
- };
250
- const clearValueEvent = (evnt, value) => {
251
- const { autoFocus } = props;
252
- if (autoFocus || autoFocus === null) {
253
- focus();
254
- }
255
- handleChange("", evnt);
256
- dispatchEvent("clear", { value }, evnt);
257
- };
258
- const inputEvent = (evnt) => {
259
- const { immediate } = props;
260
- const textElem = evnt.target;
261
- const value = textElem.value;
262
- reactData.inputValue = value;
263
- if (immediate) {
264
- handleChange(value, evnt);
265
- } else {
266
- if ($xeForm && formItemInfo) {
267
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
251
+ };
252
+ const clearValueEvent = (evnt, value) => {
253
+ const { autoFocus } = props;
254
+ if (autoFocus || autoFocus === null) {
255
+ focus();
256
+ }
257
+ handleChange("", evnt);
258
+ dispatchEvent("clear", { value }, evnt);
259
+ };
260
+ const inputEvent = (evnt) => {
261
+ const { immediate } = props;
262
+ const textElem = evnt.target;
263
+ const value = textElem.value;
264
+ reactData.inputValue = value;
265
+ if (immediate) {
266
+ handleChange(value, evnt);
267
+ } else {
268
+ if ($xeForm && formItemInfo) {
269
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
270
+ }
271
+ }
272
+ dispatchEvent("input", { value }, evnt);
273
+ handleResize();
274
+ };
275
+ const changeEvent = (evnt) => {
276
+ const { immediate } = props;
277
+ if (immediate) {
278
+ triggerEvent(evnt);
279
+ } else {
280
+ handleChange(reactData.inputValue, evnt);
281
+ }
282
+ dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
283
+ };
284
+ const blurEvent = (evnt) => {
285
+ const { immediate } = props;
286
+ const { inputValue } = reactData;
287
+ if (!immediate) {
288
+ handleChange(inputValue, evnt);
289
+ } else {
290
+ updateDomValue();
291
+ }
292
+ dispatchEvent("blur", { value: inputValue }, evnt);
293
+ };
294
+ const textareaMethods = {
295
+ dispatchEvent,
296
+ focus() {
297
+ const textElem = refTextarea.value;
298
+ textElem.focus();
299
+ return nextTick();
300
+ },
301
+ blur() {
302
+ const textElem = refTextarea.value;
303
+ textElem.blur();
304
+ return nextTick();
305
+ }
306
+ };
307
+ Object.assign($xeTextarea, textareaMethods);
308
+ const renderVN = () => {
309
+ const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols, clearable } = props;
310
+ const { inputValue } = reactData;
311
+ const vSize = computeSize.value;
312
+ const isDisabled = computeIsDisabled.value;
313
+ const isCountError = computeIsCountError.value;
314
+ const inputCount = computeInputCount.value;
315
+ const inputReadonly = computeInputReadonly.value;
316
+ const formReadonly = computeFormReadonly.value;
317
+ const inpPlaceholder = computeInpPlaceholder.value;
318
+ const inpMaxLength = computeInpMaxLength.value;
319
+ if (formReadonly) {
320
+ return h(
321
+ "div",
322
+ {
323
+ ref: refElem,
324
+ class: ["vxe-textarea--readonly", className]
325
+ },
326
+ [
327
+ h(
328
+ "div",
329
+ {
330
+ ref: refContent,
331
+ class: "vxe-textarea--content"
332
+ },
333
+ inputValue
334
+ )
335
+ ]
336
+ );
268
337
  }
269
- }
270
- dispatchEvent("input", { value }, evnt);
271
- handleResize();
272
- };
273
- const changeEvent = (evnt) => {
274
- const { immediate } = props;
275
- if (immediate) {
276
- triggerEvent(evnt);
277
- } else {
278
- handleChange(reactData.inputValue, evnt);
279
- }
280
- dispatchEvent("lazy-change", { value: reactData.inputValue }, evnt);
281
- };
282
- const blurEvent = (evnt) => {
283
- const { immediate } = props;
284
- const { inputValue } = reactData;
285
- if (!immediate) {
286
- handleChange(inputValue, evnt);
287
- } else {
288
- updateDomValue();
289
- }
290
- dispatchEvent("blur", { value: inputValue }, evnt);
291
- };
292
- const textareaMethods = {
293
- dispatchEvent,
294
- focus() {
295
- const textElem = refTextarea.value;
296
- textElem.focus();
297
- return nextTick();
298
- },
299
- blur() {
300
- const textElem = refTextarea.value;
301
- textElem.blur();
302
- return nextTick();
303
- }
304
- };
305
- Object.assign($xeTextarea, textareaMethods);
306
- const renderVN = () => {
307
- const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols, clearable } = props;
308
- const { inputValue } = reactData;
309
- const vSize = computeSize.value;
310
- const isDisabled = computeIsDisabled.value;
311
- const isCountError = computeIsCountError.value;
312
- const inputCount = computeInputCount.value;
313
- const inputReadonly = computeInputReadonly.value;
314
- const formReadonly = computeFormReadonly.value;
315
- const inpPlaceholder = computeInpPlaceholder.value;
316
- const inpMaxLength = computeInpMaxLength.value;
317
- if (formReadonly) {
318
338
  return h(
319
339
  "div",
320
340
  {
321
341
  ref: refElem,
322
- class: ["vxe-textarea--readonly", className]
342
+ class: [
343
+ "vxe-textarea",
344
+ className,
345
+ {
346
+ [`size--${vSize}`]: vSize,
347
+ "is--autosize": autosize || autoSize,
348
+ "is--count": showWordCount,
349
+ "is--disabled": isDisabled,
350
+ "is-clear": clearable,
351
+ "is--rows": !XEUtils.eqNull(rows),
352
+ "is--cols": !XEUtils.eqNull(cols),
353
+ "show--clear": clearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
354
+ }
355
+ ],
356
+ spellcheck: false
323
357
  },
324
358
  [
325
- h(
359
+ h("textarea", {
360
+ ref: refTextarea,
361
+ class: ["vxe-textarea--inner", inputClassName || ""],
362
+ name: props.name,
363
+ placeholder: inpPlaceholder,
364
+ maxlength: inpMaxLength,
365
+ readonly: inputReadonly,
366
+ disabled: isDisabled,
367
+ rows,
368
+ cols,
369
+ style: resize ? {
370
+ resize
371
+ } : null,
372
+ onInput: inputEvent,
373
+ onChange: changeEvent,
374
+ onKeydown: triggerEvent,
375
+ onKeyup: triggerEvent,
376
+ onClick: triggerEvent,
377
+ onFocus: triggerEvent,
378
+ onBlur: blurEvent
379
+ }),
380
+ clearable || showWordCount ? h(
326
381
  "div",
327
382
  {
328
- ref: refContent,
329
- class: "vxe-textarea--content"
383
+ class: "vxe-textarea--suffix"
330
384
  },
331
- inputValue
332
- )
385
+ [
386
+ clearable ? h(
387
+ "div",
388
+ {
389
+ class: "vxe-textarea--clear-icon",
390
+ onClick: clearValueEvent
391
+ },
392
+ [
393
+ h("i", {
394
+ class: getIcon().TEXTAREA_CLEAR
395
+ })
396
+ ]
397
+ ) : renderEmptyElement($xeTextarea),
398
+ showWordCount ? h(
399
+ "span",
400
+ {
401
+ class: [
402
+ "vxe-textarea--count",
403
+ {
404
+ "is--error": isCountError
405
+ }
406
+ ]
407
+ },
408
+ countMethod ? `${countMethod({ value: inputValue })}` : `${inputCount}${inpMaxLength ? `/${inpMaxLength}` : ""}`
409
+ ) : renderEmptyElement($xeTextarea)
410
+ ]
411
+ ) : renderEmptyElement($xeTextarea)
333
412
  ]
334
413
  );
335
- }
336
- return h(
337
- "div",
338
- {
339
- ref: refElem,
340
- class: [
341
- "vxe-textarea",
342
- className,
343
- {
344
- [`size--${vSize}`]: vSize,
345
- "is--autosize": autosize || autoSize,
346
- "is--count": showWordCount,
347
- "is--disabled": isDisabled,
348
- "is-clear": clearable,
349
- "is--rows": !XEUtils.eqNull(rows),
350
- "is--cols": !XEUtils.eqNull(cols),
351
- "show--clear": clearable && !isDisabled && !(inputValue === "" || XEUtils.eqNull(inputValue))
352
- }
353
- ],
354
- spellcheck: false
355
- },
356
- [
357
- h("textarea", {
358
- ref: refTextarea,
359
- class: ["vxe-textarea--inner", inputClassName || ""],
360
- name: props.name,
361
- placeholder: inpPlaceholder,
362
- maxlength: inpMaxLength,
363
- readonly: inputReadonly,
364
- disabled: isDisabled,
365
- rows,
366
- cols,
367
- style: resize ? {
368
- resize
369
- } : null,
370
- onInput: inputEvent,
371
- onChange: changeEvent,
372
- onKeydown: triggerEvent,
373
- onKeyup: triggerEvent,
374
- onClick: triggerEvent,
375
- onFocus: triggerEvent,
376
- onBlur: blurEvent
377
- }),
378
- clearable || showWordCount ? h(
379
- "div",
380
- {
381
- class: "vxe-textarea--suffix"
382
- },
383
- [
384
- clearable ? h(
385
- "div",
386
- {
387
- class: "vxe-textarea--clear-icon",
388
- onClick: clearValueEvent
389
- },
390
- [
391
- h("i", {
392
- class: getIcon().TEXTAREA_CLEAR
393
- })
394
- ]
395
- ) : renderEmptyElement($xeTextarea),
396
- showWordCount ? h(
397
- "span",
398
- {
399
- class: [
400
- "vxe-textarea--count",
401
- {
402
- "is--error": isCountError
403
- }
404
- ]
405
- },
406
- countMethod ? `${countMethod({ value: inputValue })}` : `${inputCount}${inpMaxLength ? `/${inpMaxLength}` : ""}`
407
- ) : renderEmptyElement($xeTextarea)
408
- ]
409
- ) : renderEmptyElement($xeTextarea)
410
- ]
414
+ };
415
+ watch(
416
+ () => props.modelValue,
417
+ (val) => {
418
+ reactData.inputValue = val;
419
+ updateAutoTxt();
420
+ }
411
421
  );
412
- };
413
- watch(
414
- () => props.modelValue,
415
- (val) => {
416
- reactData.inputValue = val;
417
- updateAutoTxt();
418
- }
419
- );
420
- const reFlag = ref(0);
421
- watch(computeFormReadonly, () => {
422
- reFlag.value++;
423
- });
424
- watch(computeSizeOpts, () => {
425
- reFlag.value++;
426
- });
427
- watch(
428
- () => props.autoSize,
429
- () => {
422
+ const reFlag = ref(0);
423
+ watch(computeFormReadonly, () => {
430
424
  reFlag.value++;
431
- }
432
- );
433
- watch(
434
- () => props.autosize,
435
- () => {
425
+ });
426
+ watch(computeSizeOpts, () => {
436
427
  reFlag.value++;
437
- }
438
- );
439
- watch(reFlag, () => {
440
- updateAutoTxt();
441
- handleResize();
442
- });
443
- const rDvFlag = ref(0);
444
- watch(computeFormReadonly, () => {
445
- rDvFlag.value++;
446
- });
447
- watch(computeDomValue, () => {
448
- rDvFlag.value++;
449
- });
450
- watch(rDvFlag, () => {
451
- updateDomValue();
452
- });
453
- onMounted(() => {
454
- updateDomValue();
455
- nextTick(() => {
456
- updateDomValue();
457
428
  });
458
- });
459
- nextTick(() => {
460
- const { autosize, autoSize } = props;
461
- if (autosize) {
462
- warnLog("vxe.error.delProp", ["autosize", "auto-size"]);
463
- }
464
- if (autosize || autoSize) {
429
+ watch(
430
+ () => props.autoSize,
431
+ () => {
432
+ reFlag.value++;
433
+ }
434
+ );
435
+ watch(
436
+ () => props.autosize,
437
+ () => {
438
+ reFlag.value++;
439
+ }
440
+ );
441
+ watch(reFlag, () => {
465
442
  updateAutoTxt();
466
443
  handleResize();
467
- }
468
- });
469
- $xeTextarea.renderVN = renderVN;
470
- return $xeTextarea;
471
- },
472
- render() {
473
- return this.renderVN();
474
- }
475
- });
444
+ });
445
+ const rDvFlag = ref(0);
446
+ watch(computeFormReadonly, () => {
447
+ rDvFlag.value++;
448
+ });
449
+ watch(computeDomValue, () => {
450
+ rDvFlag.value++;
451
+ });
452
+ watch(rDvFlag, () => {
453
+ updateDomValue();
454
+ });
455
+ onMounted(() => {
456
+ updateDomValue();
457
+ nextTick(() => {
458
+ updateDomValue();
459
+ });
460
+ });
461
+ nextTick(() => {
462
+ const { autosize, autoSize } = props;
463
+ if (autosize) {
464
+ warnLog("vxe.error.delProp", ["autosize", "auto-size"]);
465
+ }
466
+ if (autosize || autoSize) {
467
+ updateAutoTxt();
468
+ handleResize();
469
+ }
470
+ });
471
+ $xeTextarea.renderVN = renderVN;
472
+ return $xeTextarea;
473
+ },
474
+ render() {
475
+ return this.renderVN();
476
+ }
477
+ })
478
+ );
476
479
  export {
477
480
  textarea_default as default
478
481
  };