tntd 2.8.23 → 2.8.25

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 (412) hide show
  1. package/CHANGELOG.json +1034 -0
  2. package/CHANGELOG.md +605 -0
  3. package/es/alert/alert.js +71 -0
  4. package/es/alert/alert.js.map +1 -0
  5. package/es/alert/alert.less +128 -0
  6. package/es/cascader/cascader.js +30 -0
  7. package/es/cascader/cascader.js.map +1 -0
  8. package/es/cascader/cascader.less +16 -0
  9. package/es/checkbox/check.png +0 -0
  10. package/es/checkbox/checkbox.js +48 -0
  11. package/es/checkbox/checkbox.js.map +1 -0
  12. package/es/checkbox/checkbox.less +69 -0
  13. package/es/date-picker/DatePicker.js +101 -0
  14. package/es/date-picker/DatePicker.js.map +1 -0
  15. package/es/date-picker/index.less +294 -0
  16. package/es/input-number/inputNumber.js +34 -0
  17. package/es/input-number/inputNumber.js.map +1 -0
  18. package/es/input-number/inputNumber.less +12 -0
  19. package/es/modal/index.less +36 -0
  20. package/es/popconfirm/index.less +32 -0
  21. package/es/popconfirm/popconfirm.js +43 -0
  22. package/es/popconfirm/popconfirm.js.map +1 -0
  23. package/es/popover/index.less +57 -0
  24. package/es/popover/popover.js +34 -0
  25. package/es/popover/popover.js.map +1 -0
  26. package/es/progress/progress.js +132 -0
  27. package/es/progress/progress.js.map +1 -0
  28. package/es/progress/progress.less +82 -0
  29. package/es/query-form/Field/Composition/FieldPopover.js +301 -0
  30. package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
  31. package/es/query-form/Field/Composition/FieldPopover.less +35 -0
  32. package/es/query-form/Field/Composition/Select.js +122 -0
  33. package/es/query-form/Field/Composition/Select.js.map +1 -0
  34. package/es/query-form/Field/Composition/ValueTag.js +123 -0
  35. package/es/query-form/Field/Composition/ValueTag.js.map +1 -0
  36. package/es/query-form/Field/Composition/index.js +242 -0
  37. package/es/query-form/Field/Composition/index.js.map +1 -0
  38. package/es/query-form/Field/Composition/index.less +144 -0
  39. package/es/query-form/Field/Composition/utils.js +152 -0
  40. package/es/query-form/Field/Composition/utils.js.map +1 -0
  41. package/es/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  42. package/es/query-form-backup/Field/Composition/index.less +114 -0
  43. package/es/query-form-backup/index.less +90 -0
  44. package/es/query-form-v2/index.less +133 -0
  45. package/es/radio/radio.js +57 -0
  46. package/es/radio/radio.js.map +1 -0
  47. package/es/radio/radio.less +43 -0
  48. package/es/scroll-bar/Bar.js +56 -0
  49. package/es/scroll-bar/Bar.js.map +1 -0
  50. package/es/scroll-bar/Context.js +6 -0
  51. package/es/scroll-bar/Context.js.map +1 -0
  52. package/es/scroll-bar/ScrollBar.js +86 -0
  53. package/es/scroll-bar/ScrollBar.js.map +1 -0
  54. package/es/scroll-bar/Thumb.js +105 -0
  55. package/es/scroll-bar/Thumb.js.map +1 -0
  56. package/es/scroll-bar/index.js +3 -0
  57. package/es/scroll-bar/index.js.map +1 -0
  58. package/es/scroll-bar/scrollBar.less +59 -0
  59. package/es/scroll-bar/util.js +31 -0
  60. package/es/scroll-bar/util.js.map +1 -0
  61. package/es/spin/spin.js +36 -0
  62. package/es/spin/spin.js.map +1 -0
  63. package/es/spin/spin.less +9 -0
  64. package/es/steps/assets/background_left.svg +12 -0
  65. package/es/steps/assets/background_right.svg +12 -0
  66. package/es/steps/assets/horizontal_line.svg +3 -0
  67. package/es/steps/assets/vertical_line.svg +3 -0
  68. package/es/steps/stepStyle/icon.less +51 -0
  69. package/es/steps/stepStyle/progress-dot.less +10 -0
  70. package/es/steps/stepStyle/variables.less +8 -0
  71. package/es/steps/stepStyle/vertical.less +41 -0
  72. package/es/style/themes/default.less +2 -2
  73. package/es/switch/index.less +45 -0
  74. package/es/table/resizableTable/index.less +1 -1
  75. package/es/tabs/tabs.less +125 -0
  76. package/es/time-picker/TimePicker.js +36 -0
  77. package/es/time-picker/TimePicker.js.map +1 -0
  78. package/es/time-picker/index.less +38 -0
  79. package/es/tntd-action/Action.js +117 -0
  80. package/es/tntd-action/Action.js.map +1 -0
  81. package/es/tntd-action/index.less +61 -0
  82. package/es/tntd-rc-select/style/index.less +27 -19
  83. package/es/tntd-select/index.less +7 -0
  84. package/es/tntd-virtual-tree/index.js +21 -14
  85. package/es/tntd-virtual-tree/index.js.map +1 -1
  86. package/es/tntd-virtual-tree/index.less +10 -7
  87. package/es/tntd-virtual-tree-select/index.js +2 -2
  88. package/es/tntd-virtual-tree-select/index.js.map +1 -1
  89. package/es/tntd-virtual-tree-select/index.less +0 -17
  90. package/es/tntd-virtual-tree-select/utils.js +2 -2
  91. package/es/tntd-virtual-tree-select/utils.js.map +1 -1
  92. package/lib/_util/context.js +1 -1
  93. package/lib/_util/defaultRenderEmpty.js +1 -1
  94. package/lib/_util/hooks/useFlexGapSupport.js +4 -4
  95. package/lib/_util/hooks/useForceUpdate.js +4 -4
  96. package/lib/_util/responsiveObserve.js +1 -1
  97. package/lib/_util/styleChecker.js +1 -1
  98. package/lib/actions/index.js +1 -1
  99. package/lib/alert/alert.d.ts +12 -0
  100. package/lib/alert/alert.d.ts.map +1 -0
  101. package/lib/alert/alert.js +93 -0
  102. package/lib/alert/alert.js.map +1 -0
  103. package/lib/alert/alert.less +128 -0
  104. package/lib/array-input/index.js +9 -9
  105. package/lib/cascader/cascader.d.ts +10 -0
  106. package/lib/cascader/cascader.d.ts.map +1 -0
  107. package/lib/cascader/cascader.js +49 -0
  108. package/lib/cascader/cascader.js.map +1 -0
  109. package/lib/cascader/cascader.less +16 -0
  110. package/lib/check-card/group.js +8 -8
  111. package/lib/check-card/index.js +6 -6
  112. package/lib/checkbox/check.png +0 -0
  113. package/lib/checkbox/checkbox-group.js +1 -1
  114. package/lib/checkbox/checkbox.d.ts +16 -0
  115. package/lib/checkbox/checkbox.d.ts.map +1 -0
  116. package/lib/checkbox/checkbox.js +65 -0
  117. package/lib/checkbox/checkbox.js.map +1 -0
  118. package/lib/checkbox/checkbox.less +69 -0
  119. package/lib/color-picker/ColorPicker.js +6 -6
  120. package/lib/color-picker/index.js +1 -1
  121. package/lib/columns/index.js +1 -1
  122. package/lib/config-provider/config-provider.js +1 -1
  123. package/lib/date-picker/DatePicker.d.ts +21 -0
  124. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  125. package/lib/date-picker/DatePicker.js +128 -0
  126. package/lib/date-picker/DatePicker.js.map +1 -0
  127. package/lib/date-picker/index.less +294 -0
  128. package/lib/descriptions/descriptions.js +5 -5
  129. package/lib/development-login/LoginModal.js +6 -6
  130. package/lib/development-login/index.js +4 -4
  131. package/lib/drawer/drawer.js +2 -2
  132. package/lib/ellipsis/Svg/CopySVG.js +1 -1
  133. package/lib/ellipsis/Svg/TickSVG.js +1 -1
  134. package/lib/ellipsis/index.js +5 -5
  135. package/lib/empty/empty.js +2 -2
  136. package/lib/empty/empty.stories.js +2 -2
  137. package/lib/exception/exception.js +1 -1
  138. package/lib/form/form.js +2 -2
  139. package/lib/grid-v4/col.js +2 -2
  140. package/lib/grid-v4/hooks/useBreakpoint.js +1 -1
  141. package/lib/grid-v4/index.js +1 -1
  142. package/lib/grid-v4/row.js +6 -6
  143. package/lib/handle/index.js +1 -1
  144. package/lib/handle-icon/index.js +11 -11
  145. package/lib/icon/IconFont.js +1 -1
  146. package/lib/icon/components/Icon.js +9 -9
  147. package/lib/icon/components/index.js +1 -1
  148. package/lib/icon/components/utils.js +3 -3
  149. package/lib/icon/index.js +7 -7
  150. package/lib/icon/twoTonePrimaryColor.js +1 -1
  151. package/lib/icon/utils.js +1 -1
  152. package/lib/img/Contain.js +1 -1
  153. package/lib/img/Cover.js +5 -5
  154. package/lib/img/index.js +5 -5
  155. package/lib/index.js +1 -1
  156. package/lib/input/input.js +2 -2
  157. package/lib/input-number/index.js +1 -1
  158. package/lib/input-number/inputNumber.d.ts +10 -0
  159. package/lib/input-number/inputNumber.d.ts.map +1 -0
  160. package/lib/input-number/inputNumber.js +54 -0
  161. package/lib/input-number/inputNumber.js.map +1 -0
  162. package/lib/input-number/inputNumber.less +12 -0
  163. package/lib/label/index.js +2 -2
  164. package/lib/loading-button/index.js +5 -5
  165. package/lib/locale/default.js +1 -1
  166. package/lib/locale/en_US.js +1 -1
  167. package/lib/locale/zh_CN.js +1 -1
  168. package/lib/modal/index.less +36 -0
  169. package/lib/modal/modal.js +1 -1
  170. package/lib/notification/assets/index.js +1 -1
  171. package/lib/notification/index.js +1 -1
  172. package/lib/notification/notification.js +1 -1
  173. package/lib/page/Box.js +1 -1
  174. package/lib/page/index.js +7 -7
  175. package/lib/page-container/index.js +1 -1
  176. package/lib/page-loading/index.js +1 -1
  177. package/lib/popconfirm/index.less +32 -0
  178. package/lib/popconfirm/popconfirm.d.ts +8 -0
  179. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  180. package/lib/popconfirm/popconfirm.js +61 -0
  181. package/lib/popconfirm/popconfirm.js.map +1 -0
  182. package/lib/popover/index.less +57 -0
  183. package/lib/popover/popover.d.ts +14 -0
  184. package/lib/popover/popover.d.ts.map +1 -0
  185. package/lib/popover/popover.js +55 -0
  186. package/lib/popover/popover.js.map +1 -0
  187. package/lib/preview-text/index.js +7 -7
  188. package/lib/progress/progress.d.ts +12 -0
  189. package/lib/progress/progress.d.ts.map +1 -0
  190. package/lib/progress/progress.js +148 -0
  191. package/lib/progress/progress.js.map +1 -0
  192. package/lib/progress/progress.less +82 -0
  193. package/lib/query-form/Field/Checkbox.js +1 -1
  194. package/lib/query-form/Field/Composition/FieldPopover.d.ts +19 -0
  195. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
  196. package/lib/query-form/Field/Composition/FieldPopover.js +340 -0
  197. package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
  198. package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
  199. package/lib/query-form/Field/Composition/Select.d.ts +4 -0
  200. package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
  201. package/lib/query-form/Field/Composition/Select.js +146 -0
  202. package/lib/query-form/Field/Composition/Select.js.map +1 -0
  203. package/lib/query-form/Field/Composition/ValueTag.d.ts +12 -0
  204. package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -0
  205. package/lib/query-form/Field/Composition/ValueTag.js +154 -0
  206. package/lib/query-form/Field/Composition/ValueTag.js.map +1 -0
  207. package/lib/query-form/Field/Composition/index.d.ts +13 -0
  208. package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
  209. package/lib/query-form/Field/Composition/index.js +286 -0
  210. package/lib/query-form/Field/Composition/index.js.map +1 -0
  211. package/lib/query-form/Field/Composition/index.less +144 -0
  212. package/lib/query-form/Field/Composition/utils.d.ts +21 -0
  213. package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
  214. package/lib/query-form/Field/Composition/utils.js +168 -0
  215. package/lib/query-form/Field/Composition/utils.js.map +1 -0
  216. package/lib/query-form/Field/Select.js +6 -6
  217. package/lib/query-form/Field/SelectInput.js +6 -6
  218. package/lib/query-form/Field/fieldsMap.js +1 -1
  219. package/lib/query-form/Field/index.js +10 -10
  220. package/lib/query-form/createActions.js +1 -1
  221. package/lib/query-form/index.js +10 -10
  222. package/lib/query-form/useForm.js +1 -1
  223. package/lib/query-form-backup/Field/Composition/FieldPopover.less +35 -0
  224. package/lib/query-form-backup/Field/Composition/index.less +114 -0
  225. package/lib/query-form-backup/index.less +90 -0
  226. package/lib/query-form-v2/index.less +133 -0
  227. package/lib/query-list-scene/List.js +13 -13
  228. package/lib/query-list-scene/QueryForm.js +10 -10
  229. package/lib/query-list-scene/QueryListScene.js +10 -10
  230. package/lib/query-list-scene/Title.js +1 -1
  231. package/lib/query-list-scene/Toolbar.js +2 -2
  232. package/lib/query-list-scene/createActions.js +1 -1
  233. package/lib/query-list-scene/index.js +1 -1
  234. package/lib/query-list-scene/useActions.js +1 -1
  235. package/lib/radio/index.js +1 -1
  236. package/lib/radio/radio-group.js +1 -1
  237. package/lib/radio/radio.d.ts +17 -0
  238. package/lib/radio/radio.d.ts.map +1 -0
  239. package/lib/radio/radio.js +75 -0
  240. package/lib/radio/radio.js.map +1 -0
  241. package/lib/radio/radio.less +43 -0
  242. package/lib/render-empty/render-empty.js +1 -1
  243. package/lib/scroll-bar/Bar.d.ts +4 -0
  244. package/lib/scroll-bar/Bar.d.ts.map +1 -0
  245. package/lib/scroll-bar/Bar.js +91 -0
  246. package/lib/scroll-bar/Bar.js.map +1 -0
  247. package/lib/scroll-bar/Context.d.ts +7 -0
  248. package/lib/scroll-bar/Context.d.ts.map +1 -0
  249. package/lib/scroll-bar/Context.js +13 -0
  250. package/lib/scroll-bar/Context.js.map +1 -0
  251. package/lib/scroll-bar/ScrollBar.d.ts +4 -0
  252. package/lib/scroll-bar/ScrollBar.d.ts.map +1 -0
  253. package/lib/scroll-bar/ScrollBar.js +97 -0
  254. package/lib/scroll-bar/ScrollBar.js.map +1 -0
  255. package/lib/scroll-bar/Thumb.d.ts +3 -0
  256. package/lib/scroll-bar/Thumb.d.ts.map +1 -0
  257. package/lib/scroll-bar/Thumb.js +125 -0
  258. package/lib/scroll-bar/Thumb.js.map +1 -0
  259. package/lib/scroll-bar/index.d.ts +3 -0
  260. package/lib/scroll-bar/index.d.ts.map +1 -0
  261. package/lib/scroll-bar/index.js +10 -0
  262. package/lib/scroll-bar/index.js.map +1 -0
  263. package/lib/scroll-bar/scrollBar.less +59 -0
  264. package/lib/scroll-bar/util.d.ts +40 -0
  265. package/lib/scroll-bar/util.d.ts.map +1 -0
  266. package/lib/scroll-bar/util.js +39 -0
  267. package/lib/scroll-bar/util.js.map +1 -0
  268. package/lib/segmented/index.js +2 -2
  269. package/lib/select/select.js +2 -2
  270. package/lib/spin/spin.d.ts +9 -0
  271. package/lib/spin/spin.d.ts.map +1 -0
  272. package/lib/spin/spin.js +44 -0
  273. package/lib/spin/spin.js.map +1 -0
  274. package/lib/spin/spin.less +9 -0
  275. package/lib/steps/assets/background_left.svg +12 -0
  276. package/lib/steps/assets/background_right.svg +12 -0
  277. package/lib/steps/assets/horizontal_line.svg +3 -0
  278. package/lib/steps/assets/vertical_line.svg +3 -0
  279. package/lib/steps/stepStyle/icon.less +51 -0
  280. package/lib/steps/stepStyle/progress-dot.less +10 -0
  281. package/lib/steps/stepStyle/variables.less +8 -0
  282. package/lib/steps/stepStyle/vertical.less +41 -0
  283. package/lib/steps/steps.js +2 -2
  284. package/lib/style/themes/default.less +2 -2
  285. package/lib/svg-components/index.js +1 -1
  286. package/lib/switch/index.less +45 -0
  287. package/lib/switch/switch.js +1 -1
  288. package/lib/table/hooks/use-column-setting.js +4 -4
  289. package/lib/table/hooks/use-expand-fixed.js +6 -6
  290. package/lib/table/resizableTable/index.js +6 -6
  291. package/lib/table/resizableTable/index.less +1 -1
  292. package/lib/table/table-hoc.js +1 -1
  293. package/lib/table/table.js +9 -9
  294. package/lib/table/table.stories.js +2 -2
  295. package/lib/table/total-shower.js +1 -1
  296. package/lib/table/utils.js +1 -1
  297. package/lib/table-container/index.js +1 -1
  298. package/lib/tabs/tabs.less +125 -0
  299. package/lib/tabs-container/index.js +1 -1
  300. package/lib/tag/tag.js +2 -2
  301. package/lib/time-picker/TimePicker.d.ts +9 -0
  302. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  303. package/lib/time-picker/TimePicker.js +55 -0
  304. package/lib/time-picker/TimePicker.js.map +1 -0
  305. package/lib/time-picker/index.less +38 -0
  306. package/lib/title/index.js +1 -1
  307. package/lib/tntd-action/Action.d.ts +6 -0
  308. package/lib/tntd-action/Action.d.ts.map +1 -0
  309. package/lib/tntd-action/Action.js +141 -0
  310. package/lib/tntd-action/Action.js.map +1 -0
  311. package/lib/tntd-action/index.less +61 -0
  312. package/lib/tntd-cascader/AntdCascader/component/context.js +1 -1
  313. package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
  314. package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
  315. package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
  316. package/lib/tntd-cascader/AntdCascader/config/utils.js +2 -2
  317. package/lib/tntd-cascader/AntdCascader/index.js +7 -7
  318. package/lib/tntd-cascader/index.js +1 -1
  319. package/lib/tntd-cascader/rc-cascader/Cascader.js +8 -8
  320. package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
  321. package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
  322. package/lib/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
  323. package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
  324. package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
  325. package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
  326. package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
  327. package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
  328. package/lib/tntd-cascader/rc-cascader/index.js +1 -1
  329. package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
  330. package/lib/tntd-form/ErrorList.js +7 -7
  331. package/lib/tntd-form/Form.js +6 -6
  332. package/lib/tntd-form/FormItem/ItemHolder.js +6 -6
  333. package/lib/tntd-form/FormItem/index.js +8 -8
  334. package/lib/tntd-form/FormItemInput.js +1 -1
  335. package/lib/tntd-form/FormItemLabel.js +2 -2
  336. package/lib/tntd-form/FormList.js +1 -1
  337. package/lib/tntd-form/context.js +1 -1
  338. package/lib/tntd-form/hooks/useDebounce.js +4 -4
  339. package/lib/tntd-form/hooks/useForm.js +5 -5
  340. package/lib/tntd-form/hooks/useFormItemStatus.js +1 -1
  341. package/lib/tntd-form/hooks/useFrameState.js +5 -5
  342. package/lib/tntd-form/index.js +1 -1
  343. package/lib/tntd-icon/index.js +1 -1
  344. package/lib/tntd-layout/AppList.js +6 -6
  345. package/lib/tntd-layout/Application.js +6 -6
  346. package/lib/tntd-layout/Avatar.js +2 -2
  347. package/lib/tntd-layout/CompatibleLanguage.js +6 -6
  348. package/lib/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
  349. package/lib/tntd-layout/EnterpriseLayout/Language.js +6 -6
  350. package/lib/tntd-layout/EnterpriseLayout/Theme.js +6 -6
  351. package/lib/tntd-layout/EnterpriseLayout/index.js +1 -1
  352. package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
  353. package/lib/tntd-layout/GlobalNavigation/index.js +9 -9
  354. package/lib/tntd-layout/Header.js +2 -2
  355. package/lib/tntd-layout/HeaderActions.js +2 -2
  356. package/lib/tntd-layout/HeaderNavs.js +6 -6
  357. package/lib/tntd-layout/HeaderTabs.js +7 -7
  358. package/lib/tntd-layout/Iconfont.js +1 -1
  359. package/lib/tntd-layout/Language.js +6 -6
  360. package/lib/tntd-layout/Layout.js +6 -6
  361. package/lib/tntd-layout/Logo.js +2 -2
  362. package/lib/tntd-layout/OrgAppList.js +6 -6
  363. package/lib/tntd-layout/SideMenu.js +6 -6
  364. package/lib/tntd-layout/Theme.js +6 -6
  365. package/lib/tntd-layout/createActions.js +1 -1
  366. package/lib/tntd-layout/images/index.js +1 -1
  367. package/lib/tntd-layout/index.js +1 -1
  368. package/lib/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
  369. package/lib/tntd-layout/paaslayout/Header.js +2 -2
  370. package/lib/tntd-layout/paaslayout/Logo.js +2 -2
  371. package/lib/tntd-layout/paaslayout/SideMenu.js +6 -6
  372. package/lib/tntd-layout/paaslayout/index.js +6 -6
  373. package/lib/tntd-layout/storage.js +1 -1
  374. package/lib/tntd-modal/index.js +6 -6
  375. package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
  376. package/lib/tntd-rc-select/_util/context.js +1 -1
  377. package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
  378. package/lib/tntd-rc-select/_util/getIcons.js +1 -1
  379. package/lib/tntd-rc-select/_util/useCompactItemContext.js +2 -2
  380. package/lib/tntd-rc-select/index.js +2 -2
  381. package/lib/tntd-rc-select/style/index.less +27 -19
  382. package/lib/tntd-reference/AHref/index.js +1 -1
  383. package/lib/tntd-reference/ReferenceBatchCheck/index.js +1 -1
  384. package/lib/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
  385. package/lib/tntd-reference/ReferenceCheck/index.js +1 -1
  386. package/lib/tntd-reference/ReferenceDrawer/index.js +5 -5
  387. package/lib/tntd-reference/ReferenceInfo/index.js +1 -1
  388. package/lib/tntd-reference/index.js +1 -1
  389. package/lib/tntd-second-page/index.js +1 -1
  390. package/lib/tntd-select/DropDownWrap.js +8 -8
  391. package/lib/tntd-select/index.js +10 -9
  392. package/lib/tntd-select/index.less +7 -0
  393. package/lib/tntd-virtual-tree/index.d.ts +1 -1
  394. package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
  395. package/lib/tntd-virtual-tree/index.js +31 -22
  396. package/lib/tntd-virtual-tree/index.js.map +1 -1
  397. package/lib/tntd-virtual-tree/index.less +10 -7
  398. package/lib/tntd-virtual-tree/utils.js +28 -28
  399. package/lib/tntd-virtual-tree-select/index.d.ts +1 -1
  400. package/lib/tntd-virtual-tree-select/index.js +12 -13
  401. package/lib/tntd-virtual-tree-select/index.js.map +1 -1
  402. package/lib/tntd-virtual-tree-select/index.less +0 -17
  403. package/lib/tntd-virtual-tree-select/utils.js +11 -11
  404. package/lib/tntd-virtual-tree-select/utils.js.map +1 -1
  405. package/lib/tooltip/tooltip.js +1 -1
  406. package/lib/upload/index.js +6 -6
  407. package/lib/upload/svg/UploadSVG.js +1 -1
  408. package/lib/utils/checkAuth.js +4 -4
  409. package/lib/utils/index.js +9 -9
  410. package/lib/utils/lang.js +1 -1
  411. package/lib/water-mark/index.js +5 -5
  412. package/package.json +2 -2
@@ -0,0 +1,144 @@
1
+ @import '../../../style/themes/index';
2
+ @import '../../../style/mixins/index';
3
+ @import '../../../input/style/mixin';
4
+
5
+ .tnt-queryform-composition-input {
6
+ // width: 100%;
7
+ max-height: 162px;
8
+ overflow-x: hidden;
9
+ cursor: text;
10
+ padding: 2px @padding-xl;
11
+ position: relative;
12
+ box-sizing: border-box;
13
+ background-color: @select-background;
14
+ border: @border-width-base @border-style-base @select-border-color;
15
+ border-top-width: calc(@border-width-base + 0.02px);
16
+ border-radius: @border-radius-base;
17
+ outline: none;
18
+ transition: all 0.3s @ease-in-out;
19
+ user-select: none;
20
+ margin-bottom: @margin-sm;
21
+
22
+ &-prefix {
23
+ position: absolute;
24
+ left: @padding-sm;
25
+ top: 50%;
26
+ transform: translateY(-50%);
27
+ i.anticon {
28
+ color: #8B919E;
29
+ }
30
+ }
31
+
32
+ &-width {
33
+ height: 0;
34
+ opacity: 0;
35
+ width: auto;
36
+ position: absolute;
37
+ max-width: 100%;
38
+ }
39
+
40
+ &-items {
41
+ display: flex;
42
+ flex-wrap: wrap;
43
+ padding: 0;
44
+ list-style: none;
45
+ margin: 0;
46
+ width: 100%;
47
+ &-item {
48
+ padding: 3px 0;
49
+ }
50
+ li {
51
+ line-height: 1;
52
+ }
53
+ &-input {
54
+ flex: 1;
55
+ min-width: 160px;
56
+ .inputClass {
57
+ background: none;
58
+ border: none !important;
59
+ outline: none;
60
+ box-shadow: none !important;
61
+ width: 100% !important;
62
+ height: 26px;
63
+ line-height: 26px;
64
+ padding: 0;
65
+ input {
66
+ border: none !important;
67
+ outline: none !important;
68
+ box-shadow: none !important;
69
+ height: 26px;
70
+ line-height: 26px;
71
+ padding: 0;
72
+ }
73
+ textarea {
74
+ padding: 0;
75
+ }
76
+ }
77
+ .inputClass-with-placeholder {
78
+ min-width: 398px !important;
79
+ }
80
+ }
81
+ }
82
+ &-clear {
83
+ position: absolute;
84
+ right: @margin-sm;
85
+ top: 50%;
86
+ transform: translateY(-50%);
87
+ display: none;
88
+ i.anticon {
89
+ color: tint(@bg-color-spotilight, 50%);
90
+ }
91
+ &:hover {
92
+ .anticon {
93
+ color: @text-color-secondary !important;
94
+ }
95
+ }
96
+ }
97
+ &-search {
98
+ position: absolute;
99
+ right: 0;
100
+ top: 0;
101
+ height: 100%;
102
+ border-left: @border-width-base @border-style-base @select-border-color;
103
+ background-color: @fill-color-quaternary;
104
+ display: flex;
105
+ width: 30px;
106
+ justify-content: center;
107
+ align-items: center;
108
+ transition: border-color 0.3s @ease-in-out;
109
+ cursor: pointer;
110
+ &:hover {
111
+ background-color: #E6F4FF;
112
+ i.anticon {
113
+ color: @primary-color;
114
+ }
115
+ }
116
+ }
117
+ &:hover,
118
+ &:focus,
119
+ &:active {
120
+ border-color: @primary-color;
121
+ box-shadow: 0px 0px 4px 0px rgba(18, 107, 251, 0.10), 0px 0px 5px 0px rgba(18, 107, 251, 0.30);
122
+ outline: 0;
123
+ .tnt-queryform-composition-input-prefix {
124
+ i.anticon {
125
+ color: @text-color;
126
+ }
127
+ }
128
+ .tnt-queryform-composition-input-clear {
129
+ display: block;
130
+ }
131
+ .tnt-queryform-composition-input-search {
132
+ border-color: @primary-color;
133
+ }
134
+ }
135
+ .ant-tag {
136
+ padding: 0 @padding-xs;
137
+ border: none;
138
+ background: @fill-color-tertiary;
139
+ height: 20px;
140
+ .ant-tag-addon-wrap {
141
+ margin-top: -2px;
142
+ }
143
+ }
144
+ }
@@ -0,0 +1,152 @@
1
+ import _flatten from "lodash/flatten";
2
+ import _isString from "lodash/isString";
3
+ import _isArray from "lodash/isArray";
4
+ import React from 'react';
5
+ import moment from 'moment';
6
+ export function highlightSubstring(str, substring) {
7
+ const highlighted = `<span class="tnt-highlight">${substring}</span>`;
8
+ return str.replace(new RegExp(substring, 'g'), highlighted);
9
+ }
10
+ export function getLabelByValue({
11
+ value,
12
+ options,
13
+ fieldNames = {
14
+ label: 'label',
15
+ value: 'value'
16
+ }
17
+ }) {
18
+ const getLabel = value => {
19
+ const target = options === null || options === void 0 ? void 0 : options.find(item => {
20
+ const valueKey = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value;
21
+ const itemValue = item instanceof Object ? item[valueKey] : item;
22
+ return itemValue === value;
23
+ });
24
+ if (target) {
25
+ return target instanceof Object ? target === null || target === void 0 ? void 0 : target[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label] : target;
26
+ } else {
27
+ return value;
28
+ }
29
+ };
30
+ if (_isArray(value)) {
31
+ return value.map(getLabel).join(' | ');
32
+ } else {
33
+ return getLabel(value);
34
+ }
35
+ }
36
+ export function formatLabel(reactDom) {
37
+ return _flatten(React.Children.map(reactDom.props.children, child => {
38
+ if (React.isValidElement(child)) {
39
+ return formatLabel(child);
40
+ } else if (_isString(child)) {
41
+ return child;
42
+ }
43
+ return '';
44
+ })).join('');
45
+ }
46
+ export function parseObjectToArray(value, data) {
47
+ var _a, _b;
48
+ return (_b = (_a = Object.keys(value || {})) === null || _a === void 0 ? void 0 : _a.map(key => {
49
+ var _a;
50
+ const target = data === null || data === void 0 ? void 0 : data.find(item => {
51
+ var _a;
52
+ return ((_a = item.props) === null || _a === void 0 ? void 0 : _a.name) === key;
53
+ });
54
+ if (!target) return null;
55
+ const dataItem = (target === null || target === void 0 ? void 0 : target.props) || {};
56
+ const {
57
+ type = 'input',
58
+ component,
59
+ setLabel,
60
+ props: fieldProps
61
+ } = dataItem || {};
62
+ const {
63
+ options
64
+ } = fieldProps || {};
65
+ if (!type && component) {
66
+ if (!setLabel) {
67
+ console.error('自定义组件需要传入setLabel()方法');
68
+ }
69
+ } else if (options) {
70
+ if (type === 'selectInput') {
71
+ const selectKey = (_a = Object.keys(value[key] || {})) === null || _a === void 0 ? void 0 : _a[0];
72
+ if (!selectKey) {
73
+ // 17. inputSelect组件,初始值{},展示undefined:undefined
74
+ return false;
75
+ }
76
+ return {
77
+ key,
78
+ value: value[key]
79
+ };
80
+ }
81
+ }
82
+ return {
83
+ key,
84
+ value: value[key]
85
+ };
86
+ })) === null || _b === void 0 ? void 0 : _b.filter(item => !!item);
87
+ }
88
+ export function parseArrayToObject(value) {
89
+ return value === null || value === void 0 ? void 0 : value.reduce((acc, v) => {
90
+ acc[v.key] = v.value;
91
+ return acc;
92
+ }, {});
93
+ }
94
+ export function getLabel({
95
+ key,
96
+ value
97
+ }, data, locale) {
98
+ var _a, _b, _c;
99
+ const target = data === null || data === void 0 ? void 0 : data.find(item => {
100
+ var _a;
101
+ return ((_a = item.props) === null || _a === void 0 ? void 0 : _a.name) === key;
102
+ });
103
+ if (!target) return null;
104
+ const dataItem = (target === null || target === void 0 ? void 0 : target.props) || {};
105
+ const {
106
+ type = 'input',
107
+ setLabel,
108
+ props: fieldProps,
109
+ propsTitle,
110
+ title,
111
+ name
112
+ } = dataItem || {};
113
+ const _propsTitle = propsTitle || title || name;
114
+ const {
115
+ options,
116
+ format
117
+ } = fieldProps || {};
118
+ let labelValue = value;
119
+ if (setLabel) {
120
+ // setLabel: 对于自定义组件,无法控制label的显示,可以通过setLabel方法控制
121
+ labelValue = setLabel(value);
122
+ } else if (options) {
123
+ if (type === 'selectInput') {
124
+ const selectKey = (_a = Object.keys(value || {})) === null || _a === void 0 ? void 0 : _a[0];
125
+ if (!selectKey) {
126
+ // 17. inputSelect组件,初始值{},展示undefined:undefined
127
+ return false;
128
+ }
129
+ const inputValue = value[selectKey];
130
+ const selectLabel = (_b = options === null || options === void 0 ? void 0 : options.find(v => v.value === selectKey)) === null || _b === void 0 ? void 0 : _b.label;
131
+ return selectLabel + ':' + inputValue;
132
+ }
133
+ labelValue = getLabelByValue({
134
+ value,
135
+ options,
136
+ fieldNames: ((_c = dataItem === null || dataItem === void 0 ? void 0 : dataItem.props) === null || _c === void 0 ? void 0 : _c.fieldNames) || {
137
+ label: 'label',
138
+ value: 'value'
139
+ }
140
+ });
141
+ } else if (type === 'checkbox') {
142
+ labelValue = value ? locale.yes : locale.no;
143
+ } else if (type === 'dateRange' && format) {
144
+ if (value === null || value === void 0 ? void 0 : value.length) {
145
+ labelValue = [moment(value === null || value === void 0 ? void 0 : value[0]).format(format), moment(value === null || value === void 0 ? void 0 : value[1]).format(format)].join('~');
146
+ }
147
+ } else if (type === 'date' && format) {
148
+ labelValue = value ? moment(value).format(format) : undefined;
149
+ }
150
+ return _propsTitle + ':' + (labelValue === undefined ? '' : labelValue);
151
+ }
152
+ export const isInput = type => ['input', 'string', 'search', 'aloneSearch', 'number', 'inputNumber'].includes(type);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/utils.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACnD,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,MAAM,UAAU,kBAAkB,CAAC,GAAG,EAAE,SAAS;IAC/C,MAAM,WAAW,GAAG,+BAA+B,SAAS,SAAS,CAAA;IACrE,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,UAAU,GAAG;IACX,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,GACF;IACC,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,EAAE;QACzB,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACpC,MAAM,QAAQ,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAA;YAClC,MAAM,SAAS,GAAG,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;YAChE,OAAO,SAAS,KAAK,KAAK,CAAA;QAC5B,CAAC,CAAC,CAAA;QACF,IAAI,MAAM,EAAE;YACV,OAAO,MAAM,YAAY,MAAM,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;SACvE;aAAM;Y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nimport { isArray, isString, flatten } from 'lodash'\nimport moment from 'moment'\n\nexport function highlightSubstring(str, substring) {\n const highlighted = `<span class=\"tnt-highlight\">${substring}</span>`\n return str.replace(new RegExp(substring, 'g'), highlighted)\n}\n\nexport function getLabelByValue({\n value,\n options,\n fieldNames = {\n label: 'label',\n value: 'value',\n },\n}) {\n const getLabel = (value) => {\n const target = options?.find((item) => {\n const valueKey = fieldNames?.value\n const itemValue = item instanceof Object ? item[valueKey] : item\n return itemValue === value\n })\n if (target) {\n return target instanceof Object ? target?.[fieldNames?.label] : target\n } else {\n return value\n }\n }\n if (isArray(value)) {\n return value.map(getLabel).join(' | ')\n } else {\n return getLabel(value)\n }\n}\n\nexport function formatLabel(reactDom) {\n return flatten(\n React.Children.map(reactDom.props.children, (child) => {\n if (React.isValidElement(child)) {\n return formatLabel(child)\n } else if (isString(child)) {\n return child\n }\n return ''\n })\n ).join('')\n}\n\nexport function parseObjectToArray(value, data) {\n return Object.keys(value || {})\n ?.map((key) => {\n const target = data?.find((item) => item.props?.name === key)\n if (!target) return null\n const dataItem = target?.props || {}\n const { type = 'input', component, setLabel, props: fieldProps } = dataItem || {}\n const { options } = fieldProps || {}\n\n if (!type && component) {\n if (!setLabel) {\n console.error('自定义组件需要传入setLabel()方法')\n }\n } else if (options) {\n if (type === 'selectInput') {\n const selectKey = Object.keys(value[key] || {})?.[0]\n if (!selectKey) {\n // 17. inputSelect组件,初始值{},展示undefined:undefined\n return false\n }\n return {\n key,\n value: value[key],\n }\n }\n }\n return {\n key,\n value: value[key],\n }\n })\n ?.filter((item) => !!item)\n}\n\nexport function parseArrayToObject(value) {\n return value?.reduce((acc, v) => {\n acc[v.key] = v.value\n return acc\n }, {})\n}\n\nexport function getLabel({ key, value }, data, locale) {\n const target = data?.find((item) => item.props?.name === key)\n if (!target) return null\n const dataItem = target?.props || {}\n const { type = 'input', setLabel, props: fieldProps, propsTitle, title, name } = dataItem || {}\n const _propsTitle = propsTitle || title || name\n const { options, format } = fieldProps || {}\n let labelValue = value\n if (setLabel) {\n // setLabel: 对于自定义组件,无法控制label的显示,可以通过setLabel方法控制\n labelValue = setLabel(value)\n } else if (options) {\n if (type === 'selectInput') {\n const selectKey = Object.keys(value || {})?.[0]\n if (!selectKey) {\n // 17. inputSelect组件,初始值{},展示undefined:undefined\n return false\n }\n const inputValue = value[selectKey]\n const selectLabel = options?.find((v) => v.value === selectKey)?.label\n return selectLabel + ':' + inputValue\n }\n labelValue = getLabelByValue({\n value,\n options,\n fieldNames: dataItem?.props?.fieldNames || {\n label: 'label',\n value: 'value',\n },\n })\n } else if (type === 'checkbox') {\n labelValue = value ? locale.yes : locale.no\n } else if (type === 'dateRange' && format) {\n if (value?.length) {\n labelValue = [moment(value?.[0]).format(format), moment(value?.[1]).format(format)].join('~')\n }\n } else if (type === 'date' && format) {\n labelValue = value ? moment(value).format(format) : undefined\n }\n return _propsTitle + ':' + (labelValue === undefined ? '' : labelValue)\n}\n\nexport const isInput = (type) =>\n ['input', 'string', 'search', 'aloneSearch', 'number', 'inputNumber'].includes(type)\n"]}
@@ -0,0 +1,35 @@
1
+ .tnt-queryform-field-popover {
2
+ min-width: 280px;
3
+ .ant-popover-inner-content {
4
+ padding: @padding-sm 0;
5
+ }
6
+ .ant-calendar-picker {
7
+ margin: @margin-xxs 0;
8
+ }
9
+ label {
10
+ color: tint(@text-color, 50%);
11
+ margin-bottom: @margin-xs;
12
+ display: block;
13
+ padding: 0 @padding-sm;
14
+ }
15
+ .ant-select-dropdown-menu {
16
+ &-item {
17
+ padding: @padding-xxs @padding-sm;
18
+ &:hover {
19
+ background-color: @bg-color-quaternary;
20
+ }
21
+ }
22
+ }
23
+ &-content {
24
+ padding: @padding-xxs @padding-sm;
25
+ }
26
+ .ant-select-selected-icon {
27
+ position: absolute;
28
+ right: @margin-base;
29
+ top: @margin-xs;
30
+ color: @blue-6;
31
+ }
32
+ .tnt-highlight {
33
+ color: @blue-6;
34
+ }
35
+ }
@@ -0,0 +1,114 @@
1
+ @import '../../../style/themes/index';
2
+ @import '../../../style/mixins/index';
3
+ @import '../../../input/style/mixin';
4
+
5
+ .tnt-queryform-composition-input {
6
+ // width: 100%;
7
+ max-height: 162px;
8
+ overflow-x: hidden;
9
+ cursor: text;
10
+ padding: 2px @padding-xl;
11
+ position: relative;
12
+ box-sizing: border-box;
13
+ background-color: @select-background;
14
+ border: @border-width-base @border-style-base @select-border-color;
15
+ border-top-width: calc(@border-width-base + 0.02px);
16
+ border-radius: @border-radius-base;
17
+ outline: none;
18
+ transition: all 0.3s @ease-in-out;
19
+ user-select: none;
20
+ margin-bottom: @margin-sm;
21
+
22
+ &-prefix {
23
+ position: absolute;
24
+ left: @padding-sm;
25
+ top: 50%;
26
+ transform: translateY(-50%);
27
+ i.anticon {
28
+ color: tint(@bg-color-spotilight, 50%);
29
+ }
30
+ }
31
+
32
+ &-width {
33
+ height: 0;
34
+ opacity: 0;
35
+ width: auto;
36
+ position: absolute;
37
+ max-width: 100%;
38
+ }
39
+
40
+ &-items {
41
+ float: left;
42
+ padding: 0;
43
+ list-style: none;
44
+ margin: 0;
45
+ width: 100%;
46
+ &-item {
47
+ padding: 3px 0;
48
+ }
49
+ li {
50
+ float: left;
51
+ line-height: 1;
52
+ }
53
+ &-input {
54
+ .inputClass {
55
+ background: none;
56
+ border: none !important;
57
+ outline: none;
58
+ box-shadow: none !important;
59
+ width: 150px !important;
60
+ height: 26px;
61
+ line-height: 26px;
62
+ padding: 0;
63
+ input {
64
+ border: none !important;
65
+ outline: none !important;
66
+ box-shadow: none !important;
67
+ height: 26px;
68
+ line-height: 26px;
69
+ padding: 0;
70
+ }
71
+ textarea {
72
+ padding: 0;
73
+ }
74
+ }
75
+ .inputClass-with-placeholder {
76
+ min-width: 398px !important;
77
+ }
78
+ }
79
+ }
80
+ &-clear {
81
+ position: absolute;
82
+ right: @margin-sm;
83
+ top: 50%;
84
+ transform: translateY(-50%);
85
+ display: none;
86
+ i.anticon {
87
+ color: tint(@bg-color-spotilight, 50%);
88
+ }
89
+ &:hover {
90
+ .anticon {
91
+ color: @text-color-secondary !important;
92
+ }
93
+ }
94
+ }
95
+ &:hover {
96
+ border-color: @blue-6;
97
+ outline: 0;
98
+ .tnt-queryform-composition-input-clear {
99
+ display: block;
100
+ }
101
+ // box-shadow: 0 0 0 2px rgb(18 107 251 / 20%);
102
+ }
103
+ &:focus,
104
+ &:active {
105
+ border-color: @blue-5;
106
+ outline: 0;
107
+ // box-shadow: 0 0 0 2px rgb(18 107 251 / 20%);
108
+ }
109
+ .ant-tag {
110
+ padding: 0 @padding-xs;
111
+ border: none;
112
+ background: @fill-color-tertiary;
113
+ }
114
+ }
@@ -0,0 +1,90 @@
1
+ .tnt-queryform {
2
+ &-top {
3
+ display: flex;
4
+ &-body {
5
+ flex: 1;
6
+ .ant-btn {
7
+ margin-right: 10px;
8
+ }
9
+ }
10
+ }
11
+
12
+ &-extra {
13
+ & > * {
14
+ margin-left: 10px;
15
+ }
16
+ }
17
+
18
+ .ant-form {
19
+ // margin-bottom: @margin-sm;
20
+ &.ant-form-inline {
21
+ flex-wrap: unset;
22
+ position: relative;
23
+ }
24
+
25
+ &.ant-form-inline .ant-form-item {
26
+ margin-right: 10px;
27
+ margin-bottom: @margin-sm;
28
+ display: inline-block;
29
+ }
30
+
31
+ .ant-form-item-control {
32
+ // min-width: 160px;
33
+ line-height: unset;
34
+ .ant-calendar-picker-input {
35
+ padding: 0 @padding-sm;
36
+ }
37
+ .ant-form-item-children {
38
+ & > .ant-input,
39
+ & > .ant-input-affix-wrapper {
40
+ width: 160px;
41
+ // width: 200px;
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ &-drawer {
48
+ margin-top: @margin-xxl;
49
+ &.large-size {
50
+ margin-top: 60px;
51
+ }
52
+
53
+ &.ant-drawer.ant-drawer-open {
54
+ .ant-drawer-mask {
55
+ opacity: 0;
56
+ background: unset;
57
+ }
58
+ }
59
+ .ant-drawer-body {
60
+ .ant-form-item {
61
+ display: block;
62
+ margin-right: 0;
63
+ margin-bottom: @margin-md;
64
+ width: 100%;
65
+ }
66
+ .ant-form-item-label {
67
+ display: block;
68
+ text-align: left;
69
+ line-height: 22px;
70
+ margin-bottom: 10px;
71
+ }
72
+ .ant-form-item-control-wrapper,
73
+ .ant-form-item-control,
74
+ .ant-calendar-picker,
75
+ .ant-input {
76
+ min-width: 100%;
77
+ width: 100%;
78
+ }
79
+
80
+ & > .ant-btn {
81
+ display: block;
82
+ width: 100%;
83
+ margin-bottom: 10px;
84
+ &.ant-btn-primary {
85
+ margin-top: @margin-md;
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,133 @@
1
+ .tnt-queryform {
2
+ display: flex;
3
+
4
+ &-extra {
5
+ line-height: 32px;
6
+ margin-left: 12px;
7
+ & > * {
8
+ margin-left: 8px;
9
+ }
10
+ }
11
+
12
+ &-actions {
13
+ align-items: center;
14
+ display: inline-block;
15
+ height: 32px;
16
+ line-height: 32px;
17
+
18
+ & > *:not(.expand-link) {
19
+ margin-right: 10px;
20
+ }
21
+ & > .expand-link {
22
+ padding: 0;
23
+ margin-right: 0;
24
+ }
25
+ & > .ant-badge {
26
+ .tnt-icon {
27
+ margin-right: 8px;
28
+ }
29
+ }
30
+ }
31
+
32
+ .ant-form {
33
+ display: inline-block;
34
+ margin-bottom: 12px;
35
+ display: flex;
36
+ flex: 1;
37
+ &.ant-form-inline {
38
+ flex-wrap: unset;
39
+ }
40
+
41
+ & > div:nth-child(1) {
42
+ height: 32px;
43
+ overflow: hidden;
44
+ .ant-form-item-label {
45
+ label {
46
+ // bottom: 4px;
47
+ }
48
+ }
49
+ }
50
+
51
+ &.expanded {
52
+ & > div:nth-child(1) {
53
+ height: auto !important;
54
+ }
55
+ }
56
+
57
+ &.showMore {
58
+ & > div:nth-child(1) {
59
+ .ant-form-item {
60
+ margin-bottom: 12px;
61
+ }
62
+ }
63
+ }
64
+
65
+ & > div:nth-child(2) {
66
+ display: flex;
67
+ }
68
+
69
+ &.ant-form-inline .ant-form-item {
70
+ margin-right: 10px;
71
+ display: inline-block;
72
+ }
73
+
74
+ .ant-form-item-control {
75
+ // min-width: 160px;
76
+ line-height: unset;
77
+ .ant-calendar-picker-input {
78
+ padding: 0 11px;
79
+ }
80
+ .ant-form-item-children {
81
+ & > .ant-input,
82
+ & > .ant-input-affix-wrapper {
83
+ width: 160px;
84
+ // width: 200px;
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ &-drawer {
91
+ margin-top: 50px;
92
+ &.large-size {
93
+ margin-top: 60px;
94
+ }
95
+
96
+ &.ant-drawer.ant-drawer-open {
97
+ .ant-drawer-mask {
98
+ opacity: 0;
99
+ background: unset;
100
+ }
101
+ }
102
+ .ant-drawer-body {
103
+ .ant-form-item {
104
+ display: block;
105
+ margin-right: 0;
106
+ margin-bottom: 20px;
107
+ width: 100%;
108
+ }
109
+ .ant-form-item-label {
110
+ display: block;
111
+ text-align: left;
112
+ line-height: 22px;
113
+ margin-bottom: 10px;
114
+ }
115
+ .ant-form-item-control-wrapper,
116
+ .ant-form-item-control,
117
+ .ant-calendar-picker,
118
+ .ant-input {
119
+ min-width: 100%;
120
+ width: 100%;
121
+ }
122
+
123
+ & > .ant-btn {
124
+ display: block;
125
+ width: 100%;
126
+ margin-bottom: 10px;
127
+ &.ant-btn-primary {
128
+ margin-top: 20px;
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }