@jetlinks-web/components 3.0.1-rc → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/es/AutoComplete/AutoComplete.js +13 -9
  2. package/es/BadgeStatus/Badge.js +1 -2
  3. package/es/BadgeStatus/color.js +3 -3
  4. package/es/CardSelect/CardSelect.js +23 -13
  5. package/es/CardSelect/style/index.js +25 -1
  6. package/es/CheckButton/CheckButton.js +12 -4
  7. package/es/CheckButton/style/index.js +41 -1
  8. package/es/DragModal/DragModal.js +14 -8
  9. package/es/DragModal/style/index.js +64 -1
  10. package/es/EditTable/Body.js +10 -3
  11. package/es/EditTable/EditTable.js +13 -7
  12. package/es/EditTable/FormItem.js +18 -19
  13. package/es/EditTable/Header.js +16 -6
  14. package/es/EditTable/components/ContextMenu/Menu.js +11 -5
  15. package/es/EditTable/components/Search/search.js +1 -2
  16. package/es/EditTable/components/Search/sort.js +1 -3
  17. package/es/EditTable/group.js +23 -18
  18. package/es/EditTable/hooks/useValidate.js +1 -1
  19. package/es/EditTable/style/body.js +53 -0
  20. package/es/EditTable/style/form.js +24 -0
  21. package/es/EditTable/style/group.js +25 -0
  22. package/es/EditTable/style/header.js +58 -0
  23. package/es/EditTable/style/index.js +42 -1
  24. package/es/EditTable/style/menu.js +27 -0
  25. package/es/EditTable/style/table.js +46 -0
  26. package/es/EditTable/utils.js +30 -3
  27. package/es/Ellipsis/Ellipsis.js +10 -2
  28. package/es/Ellipsis/style/index.js +24 -1
  29. package/es/FullPage/FullPage.js +1 -2
  30. package/es/LocaleProvider/index.js +1 -2
  31. package/es/PermissionButton/index.js +6 -7
  32. package/es/ProLayout/Basic/BasicLayout.js +45 -41
  33. package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
  34. package/es/ProLayout/Basic/Header.js +3 -7
  35. package/es/ProLayout/Basic/HeaderStyle.js +10 -0
  36. package/es/ProLayout/PageContainer/index.js +21 -17
  37. package/es/ProLayout/PageContainer/style.js +46 -0
  38. package/es/ProLayout/SiderMenu/BaseMenu.js +18 -42
  39. package/es/ProLayout/SiderMenu/SiderMenu.js +24 -36
  40. package/es/ProLayout/SiderMenu/style.js +166 -0
  41. package/es/ProLayout/TopHeader/index.js +13 -12
  42. package/es/ProLayout/TopHeader/style.js +126 -0
  43. package/es/ProLayout/style/index.js +7 -1
  44. package/es/ProLayout/util.js +5 -5
  45. package/es/ProTable/Alert.js +12 -4
  46. package/es/ProTable/Content.js +108 -28
  47. package/es/ProTable/Header.js +21 -11
  48. package/es/ProTable/Pagination.js +12 -4
  49. package/es/ProTable/ProTable.js +46 -34
  50. package/es/ProTable/hooks/index.js +2 -0
  51. package/es/ProTable/hooks/useTableInject.js +5 -0
  52. package/es/ProTable/hooks/useTableSelection.js +95 -0
  53. package/es/ProTable/setting.js +1 -1
  54. package/es/ProTable/style/index.js +109 -1
  55. package/es/RadioButton/RadioButton.js +10 -4
  56. package/es/RadioButton/style/index.js +23 -1
  57. package/es/Scrollbar/Scrollbar.js +10 -3
  58. package/es/Scrollbar/Thumb.js +36 -25
  59. package/es/Scrollbar/style/index.js +63 -1
  60. package/es/Search/Advanced/History.js +23 -16
  61. package/es/Search/Advanced/SaveHistory.js +1 -2
  62. package/es/Search/Advanced/index.js +212 -292
  63. package/es/Search/Item.js +175 -415
  64. package/es/Search/Search.js +78 -172
  65. package/es/Search/hooks/index.js +108 -1
  66. package/es/Search/hooks/useRouteQuery.js +57 -0
  67. package/es/Search/setting.js +132 -14
  68. package/es/Search/style/index.js +4 -2
  69. package/es/Search/style/item.js +28 -0
  70. package/es/Search/style/search.js +133 -0
  71. package/es/Search/util.js +116 -124
  72. package/es/Skeleton/components/DashBoardCard.js +19 -12
  73. package/es/Skeleton/components/DashBoardChart.js +48 -45
  74. package/es/Skeleton/components/Detail.js +27 -21
  75. package/es/Skeleton/components/Drawer.js +23 -14
  76. package/es/Skeleton/components/Item.js +9 -1
  77. package/es/Skeleton/components/List.js +0 -1
  78. package/es/Skeleton/components/ListCard.js +20 -13
  79. package/es/Skeleton/components/ListCardItem.js +12 -13
  80. package/es/Skeleton/components/ListTable.js +19 -10
  81. package/es/Skeleton/components/Page.js +0 -1
  82. package/es/Skeleton/components/Tree.js +21 -14
  83. package/es/Skeleton/skeleton.js +17 -8
  84. package/es/Skeleton/style/index.js +132 -1
  85. package/es/Title/style/index.js +29 -1
  86. package/es/Title/title.js +13 -5
  87. package/es/ValueItem/ValueItem.js +44 -39
  88. package/es/components.js +1 -5
  89. package/es/locale/en-US.js +3 -7
  90. package/es/locale/zh-CN.js +3 -7
  91. package/es/style/index.js +0 -3
  92. package/es/style/styleRegister.js +21 -0
  93. package/es/style/variable.js +4 -0
  94. package/es/style.js +0 -13
  95. package/lib/AutoComplete/AutoComplete.js +13 -9
  96. package/lib/BadgeStatus/Badge.js +1 -2
  97. package/lib/BadgeStatus/color.js +3 -3
  98. package/lib/CardSelect/CardSelect.js +23 -13
  99. package/lib/CardSelect/style/index.js +30 -1
  100. package/lib/CheckButton/CheckButton.js +12 -4
  101. package/lib/CheckButton/style/index.js +46 -1
  102. package/lib/DragModal/DragModal.js +14 -8
  103. package/lib/DragModal/style/index.js +69 -1
  104. package/lib/EditTable/Body.js +10 -3
  105. package/lib/EditTable/EditTable.js +13 -7
  106. package/lib/EditTable/FormItem.js +18 -19
  107. package/lib/EditTable/Header.js +16 -6
  108. package/lib/EditTable/components/ContextMenu/Menu.js +11 -5
  109. package/lib/EditTable/components/Search/search.js +1 -2
  110. package/lib/EditTable/components/Search/sort.js +1 -3
  111. package/lib/EditTable/group.js +23 -18
  112. package/lib/EditTable/hooks/useValidate.js +1 -1
  113. package/lib/EditTable/style/body.js +60 -0
  114. package/lib/EditTable/style/form.js +31 -0
  115. package/lib/EditTable/style/group.js +32 -0
  116. package/lib/EditTable/style/header.js +65 -0
  117. package/lib/EditTable/style/index.js +47 -1
  118. package/lib/EditTable/style/menu.js +33 -0
  119. package/lib/EditTable/style/table.js +52 -0
  120. package/lib/EditTable/utils.js +31 -3
  121. package/lib/Ellipsis/Ellipsis.js +10 -2
  122. package/lib/Ellipsis/style/index.js +29 -1
  123. package/lib/FullPage/FullPage.js +1 -2
  124. package/lib/Icon/icon.js +1 -2
  125. package/lib/LocaleProvider/index.js +1 -2
  126. package/lib/PermissionButton/index.js +6 -7
  127. package/lib/ProLayout/Basic/BasicLayout.js +45 -42
  128. package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
  129. package/lib/ProLayout/Basic/Header.js +2 -6
  130. package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
  131. package/lib/ProLayout/PageContainer/index.js +19 -15
  132. package/lib/ProLayout/PageContainer/style.js +53 -0
  133. package/lib/ProLayout/SiderMenu/BaseMenu.js +19 -42
  134. package/lib/ProLayout/SiderMenu/SiderMenu.js +24 -37
  135. package/lib/ProLayout/SiderMenu/style.js +173 -0
  136. package/lib/ProLayout/TopHeader/index.js +14 -12
  137. package/lib/ProLayout/TopHeader/style.js +133 -0
  138. package/lib/ProLayout/style/index.js +12 -1
  139. package/lib/ProLayout/util.js +5 -5
  140. package/lib/ProTable/Alert.js +12 -4
  141. package/lib/ProTable/Content.js +108 -28
  142. package/lib/ProTable/Header.js +21 -11
  143. package/lib/ProTable/Pagination.js +12 -4
  144. package/lib/ProTable/ProTable.js +46 -34
  145. package/lib/ProTable/hooks/index.js +27 -0
  146. package/lib/ProTable/hooks/useTableInject.js +11 -0
  147. package/lib/ProTable/hooks/useTableSelection.js +102 -0
  148. package/lib/ProTable/setting.js +1 -1
  149. package/lib/ProTable/style/index.js +114 -1
  150. package/lib/RadioButton/RadioButton.js +10 -4
  151. package/lib/RadioButton/style/index.js +28 -1
  152. package/lib/Scrollbar/Scrollbar.js +10 -3
  153. package/lib/Scrollbar/Thumb.js +36 -25
  154. package/lib/Scrollbar/style/index.js +68 -1
  155. package/lib/Search/Advanced/History.js +23 -16
  156. package/lib/Search/Advanced/SaveHistory.js +1 -2
  157. package/lib/Search/Advanced/index.js +212 -292
  158. package/lib/Search/Item.js +175 -415
  159. package/lib/Search/Search.js +78 -172
  160. package/lib/Search/hooks/index.js +130 -1
  161. package/lib/Search/hooks/useRouteQuery.js +64 -0
  162. package/lib/Search/setting.js +133 -15
  163. package/lib/Search/style/index.js +9 -2
  164. package/lib/Search/style/item.js +35 -0
  165. package/lib/Search/style/search.js +140 -0
  166. package/lib/Search/util.js +116 -124
  167. package/lib/Skeleton/components/DashBoardCard.js +19 -12
  168. package/lib/Skeleton/components/DashBoardChart.js +48 -45
  169. package/lib/Skeleton/components/Detail.js +27 -21
  170. package/lib/Skeleton/components/Drawer.js +23 -14
  171. package/lib/Skeleton/components/Item.js +9 -1
  172. package/lib/Skeleton/components/List.js +0 -1
  173. package/lib/Skeleton/components/ListCard.js +20 -13
  174. package/lib/Skeleton/components/ListCardItem.js +12 -13
  175. package/lib/Skeleton/components/ListTable.js +19 -10
  176. package/lib/Skeleton/components/Page.js +0 -1
  177. package/lib/Skeleton/components/Tree.js +21 -14
  178. package/lib/Skeleton/skeleton.js +17 -8
  179. package/lib/Skeleton/style/index.js +137 -1
  180. package/lib/Title/style/index.js +34 -1
  181. package/lib/Title/title.js +13 -5
  182. package/lib/ValueItem/ValueItem.js +44 -39
  183. package/lib/components.js +1 -30
  184. package/lib/index.js +1 -2
  185. package/lib/locale/en-US.js +3 -7
  186. package/lib/locale/zh-CN.js +3 -7
  187. package/lib/style/components.less +0 -1
  188. package/lib/style/index.js +1 -4
  189. package/lib/style/styleRegister.js +28 -0
  190. package/lib/style/variable.js +10 -0
  191. package/lib/style.js +1 -15
  192. package/package.json +170 -173
  193. package/es/AMap/Map.js +0 -133
  194. package/es/AMap/index.js +0 -5
  195. package/es/AMap/util.js +0 -56
  196. package/es/CardSelect/style/index.css +0 -24
  197. package/es/CardSelect/style/index.less +0 -26
  198. package/es/CheckButton/style/index.css +0 -37
  199. package/es/CheckButton/style/index.less +0 -40
  200. package/es/DragModal/style/index.css +0 -82
  201. package/es/DragModal/style/index.less +0 -97
  202. package/es/Echarts/Echarts.js +0 -48
  203. package/es/Echarts/index.js +0 -5
  204. package/es/EditTable/style/body.less +0 -66
  205. package/es/EditTable/style/form.less +0 -33
  206. package/es/EditTable/style/group.less +0 -32
  207. package/es/EditTable/style/header.less +0 -77
  208. package/es/EditTable/style/index.css +0 -267
  209. package/es/EditTable/style/index.less +0 -41
  210. package/es/EditTable/style/menu.less +0 -25
  211. package/es/EditTable/style/table.less +0 -47
  212. package/es/Ellipsis/style/index.css +0 -17
  213. package/es/Ellipsis/style/index.less +0 -20
  214. package/es/FlameGraph/FlameGraph.js +0 -136
  215. package/es/FlameGraph/index.js +0 -5
  216. package/es/FlameGraph/style/index.css +0 -43
  217. package/es/FlameGraph/style/index.js +0 -1
  218. package/es/FlameGraph/style/index.less +0 -52
  219. package/es/ProLayout/Basic/BasicLayout.less +0 -66
  220. package/es/ProLayout/Basic/Header.less +0 -8
  221. package/es/ProLayout/PageContainer/index.less +0 -103
  222. package/es/ProLayout/SiderMenu/index.less +0 -231
  223. package/es/ProLayout/TopHeader/index.less +0 -174
  224. package/es/ProLayout/style/default.less +0 -4
  225. package/es/ProLayout/style/style.less +0 -7
  226. package/es/ProTable/style/ProTable.less +0 -139
  227. package/es/RadioButton/style/index.css +0 -20
  228. package/es/RadioButton/style/index.less +0 -19
  229. package/es/Scrollbar/style/index.css +0 -65
  230. package/es/Scrollbar/style/index.less +0 -83
  231. package/es/Search/style/Item.less +0 -33
  232. package/es/Search/style/Search.less +0 -179
  233. package/es/Skeleton/style/Skeleton.less +0 -166
  234. package/es/Title/style/index.css +0 -27
  235. package/es/Title/style/index.less +0 -27
  236. package/es/style/index.css +0 -5375
  237. package/es/style/index.less +0 -14
  238. package/es/style/variable.css +0 -4
  239. package/es/style/variable.less +0 -4
  240. package/lib/AMap/Map.js +0 -133
  241. package/lib/AMap/index.js +0 -12
  242. package/lib/AMap/util.js +0 -62
  243. package/lib/CardSelect/style/index.css +0 -24
  244. package/lib/CardSelect/style/index.less +0 -26
  245. package/lib/CheckButton/style/index.css +0 -37
  246. package/lib/CheckButton/style/index.less +0 -40
  247. package/lib/DragModal/style/index.css +0 -82
  248. package/lib/DragModal/style/index.less +0 -97
  249. package/lib/Echarts/Echarts.js +0 -48
  250. package/lib/Echarts/index.js +0 -12
  251. package/lib/EditTable/style/body.less +0 -66
  252. package/lib/EditTable/style/form.less +0 -33
  253. package/lib/EditTable/style/group.less +0 -32
  254. package/lib/EditTable/style/header.less +0 -77
  255. package/lib/EditTable/style/index.css +0 -267
  256. package/lib/EditTable/style/index.less +0 -41
  257. package/lib/EditTable/style/menu.less +0 -25
  258. package/lib/EditTable/style/table.less +0 -47
  259. package/lib/Ellipsis/style/index.css +0 -17
  260. package/lib/Ellipsis/style/index.less +0 -20
  261. package/lib/FlameGraph/FlameGraph.js +0 -136
  262. package/lib/FlameGraph/index.js +0 -12
  263. package/lib/FlameGraph/style/index.css +0 -43
  264. package/lib/FlameGraph/style/index.js +0 -3
  265. package/lib/FlameGraph/style/index.less +0 -52
  266. package/lib/ProLayout/Basic/BasicLayout.less +0 -66
  267. package/lib/ProLayout/Basic/Header.less +0 -8
  268. package/lib/ProLayout/PageContainer/index.less +0 -103
  269. package/lib/ProLayout/SiderMenu/index.less +0 -231
  270. package/lib/ProLayout/TopHeader/index.less +0 -174
  271. package/lib/ProLayout/style/default.less +0 -4
  272. package/lib/ProLayout/style/style.less +0 -7
  273. package/lib/ProTable/style/ProTable.less +0 -139
  274. package/lib/RadioButton/style/index.css +0 -20
  275. package/lib/RadioButton/style/index.less +0 -19
  276. package/lib/Scrollbar/style/index.css +0 -65
  277. package/lib/Scrollbar/style/index.less +0 -83
  278. package/lib/Search/style/Item.less +0 -33
  279. package/lib/Search/style/Search.less +0 -179
  280. package/lib/Skeleton/style/Skeleton.less +0 -166
  281. package/lib/Title/style/index.css +0 -27
  282. package/lib/Title/style/index.less +0 -27
  283. package/lib/style/index.css +0 -5375
  284. package/lib/style/index.less +0 -14
  285. package/lib/style/variable.css +0 -4
  286. package/lib/style/variable.less +0 -4
@@ -0,0 +1,95 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import { ref, provide, watch, unref, computed } from "vue";
4
+ import { omit } from "lodash-es";
5
+ export var PROTABLE_ROW_SELECTION_KEY = Symbol('protable-row-selection-key');
6
+ export var useTableSelection = function useTableSelection() {
7
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
8
+ type: 'checkbox',
9
+ rowKey: "id",
10
+ isCheck: true
11
+ };
12
+ var _options$type = options.type,
13
+ type = _options$type === void 0 ? 'checkbox' : _options$type,
14
+ _options$rowKey = options.rowKey,
15
+ rowKey = _options$rowKey === void 0 ? 'id' : _options$rowKey;
16
+ var selectedRowKeys = ref([]);
17
+ var selectedRows = ref([]);
18
+ var selectionObj = ref(null);
19
+ var isCheckRef = computed(function () {
20
+ return unref(options.isCheck);
21
+ });
22
+ var onSelect = function onSelect(record, selected) {
23
+ if (type === 'checkbox') {
24
+ if (selected) {
25
+ selectedRows.value.push(record);
26
+ } else {
27
+ selectedRows.value = selectedRows.value.filter(function (i) {
28
+ return i[rowKey] !== record[rowKey];
29
+ });
30
+ }
31
+ selectedRowKeys.value = selectedRows.value.map(function (i) {
32
+ return i[rowKey];
33
+ });
34
+ }
35
+ };
36
+ // 单选
37
+ var onChange = function onChange(_selectedRowKeys, _selectedRows) {
38
+ if (type === 'radio') {
39
+ selectedRowKeys.value = _selectedRowKeys;
40
+ selectedRows.value = _selectedRows;
41
+ }
42
+ };
43
+ var onSelectAll = function onSelectAll(selected, _selectedRows, changeRows) {
44
+ if (selected) {
45
+ var _selectedRows$value;
46
+ (_selectedRows$value = selectedRows.value).push.apply(_selectedRows$value, _toConsumableArray(changeRows));
47
+ } else {
48
+ var arr = changeRows.map(function (item) {
49
+ return item[rowKey];
50
+ });
51
+ selectedRows.value = selectedRows.value.filter(function (i) {
52
+ return !arr.includes(i[rowKey]);
53
+ });
54
+ }
55
+ selectedRowKeys.value = selectedRows.value.map(function (i) {
56
+ return i[rowKey];
57
+ });
58
+ };
59
+ var onSelectNone = function onSelectNone() {
60
+ selectedRowKeys.value = [];
61
+ selectedRows.value = [];
62
+ };
63
+ var updateSelection = function updateSelection() {
64
+ if (isCheckRef.value) {
65
+ // 提供选择上下文
66
+ selectionObj.value = type === 'checkbox' ? _objectSpread(_objectSpread({}, omit(options, ['isCheck'])), {}, {
67
+ selectedRowKeys: selectedRowKeys,
68
+ onSelect: onSelect,
69
+ onSelectAll: onSelectAll,
70
+ onSelectNone: onSelectNone
71
+ }) : _objectSpread(_objectSpread({}, omit(options, ['isCheck'])), {}, {
72
+ selectedRowKeys: selectedRowKeys,
73
+ onChange: onChange,
74
+ onSelectNone: onSelectNone
75
+ });
76
+ } else {
77
+ // 清空选择状态
78
+ onSelectNone();
79
+ selectionObj.value = null;
80
+ }
81
+ };
82
+ watch(isCheckRef, function () {
83
+ updateSelection();
84
+ }, {
85
+ immediate: true,
86
+ deep: false
87
+ } // 注意:deep 设为 false
88
+ );
89
+ provide(PROTABLE_ROW_SELECTION_KEY, selectionObj);
90
+ return {
91
+ selectedRowKeys: selectedRowKeys,
92
+ selectedRows: selectedRows,
93
+ onSelectNone: onSelectNone
94
+ };
95
+ };
@@ -48,7 +48,7 @@ export var _contentProps = _objectSpread(_objectSpread(_objectSpread({}, tablePr
48
48
  }
49
49
  },
50
50
  scroll: {
51
- type: Object,
51
+ type: [Object, Boolean],
52
52
  default: function _default() {
53
53
  return {};
54
54
  } // x: 1366
@@ -1 +1,109 @@
1
- import './ProTable.less';
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import genCompoentStyle from "../../style/styleRegister";
3
+ var genProTableStyle = function genProTableStyle(config) {
4
+ var token = config.token;
5
+ return {
6
+ '.jtable-body-spin': {
7
+ height: '100%',
8
+ width: '100%',
9
+ backgroundColor: '#fff',
10
+ '.ant-spin-nested-loading': {
11
+ height: '100%',
12
+ '.ant-spin-container': {
13
+ height: '100%'
14
+ }
15
+ },
16
+ '.jtable-body': {
17
+ width: '100%',
18
+ boxSizing: 'border-box',
19
+ height: '100%',
20
+ display: 'flex',
21
+ flexDirection: 'column'
22
+ }
23
+ },
24
+ '.jtable-body-header': {
25
+ display: 'flex',
26
+ justifyContent: 'space-between',
27
+ alignItems: 'center',
28
+ marginBottom: '16px',
29
+ width: '100%',
30
+ gap: '8px',
31
+ '.jtable-body-header-left': {
32
+ flex: 1,
33
+ minWidth: 0
34
+ },
35
+ '.jtable-body-header-right': {
36
+ display: 'flex',
37
+ gap: '8px',
38
+ alignItems: 'center',
39
+ '.jtable-body-header-right-button': {
40
+ width: '62px',
41
+ '.right-button-icon': {
42
+ fontSize: '16px',
43
+ color: '#d9d9d9'
44
+ },
45
+ '.ant-radio-button-wrapper': {
46
+ padding: '0 8px'
47
+ },
48
+ '.ant-radio-button-wrapper-checked': {
49
+ color: token.colorPrimary
50
+ }
51
+ }
52
+ }
53
+ },
54
+ '.jtable-box': {
55
+ flex: 1,
56
+ minHeight: 0,
57
+ '.jtable-card': _defineProperty({
58
+ height: '100%',
59
+ overflowY: 'auto',
60
+ '.jtable-card-items': {
61
+ display: 'grid',
62
+ gridGap: '26px',
63
+ '.jtable-card-item': {
64
+ display: 'flex',
65
+ minWidth: 0
66
+ }
67
+ }
68
+ }, "j-table-empty", {
69
+ marginTop: '100px'
70
+ }),
71
+ '.ant-table-wrapper': {
72
+ height: '100%',
73
+ '.ant-table': {
74
+ height: '100%',
75
+ '.ant-table-container': {
76
+ height: '100%',
77
+ '.ant-table-content': {
78
+ height: '100%'
79
+ }
80
+ }
81
+ }
82
+ },
83
+ '.j-table-scroll': {
84
+ '.ant-table-container': {
85
+ display: 'flex',
86
+ flexDirection: 'column'
87
+ },
88
+ '.ant-table-body': {
89
+ flex: 1,
90
+ minHeight: 0,
91
+ overflowY: 'auto'
92
+ }
93
+ }
94
+ },
95
+ '.jtable-alert': {
96
+ marginBottom: '16px'
97
+ },
98
+ '.jtable-pagination': {
99
+ width: '100%',
100
+ display: 'flex',
101
+ justifyContent: 'flex-end',
102
+ marginTop: '16px',
103
+ '.hide-content': _defineProperty({}, "".concat(token.antCls, "-pagination-item,& ").concat(token.antCls, "-pagination-jump-prev, & ").concat(token.antCls, "-pagination-jump-next"), {
104
+ display: 'none'
105
+ })
106
+ }
107
+ };
108
+ };
109
+ export default genCompoentStyle([genProTableStyle]);
@@ -2,19 +2,23 @@
2
2
  "value": "props",
3
3
  "options": "props",
4
4
  "columns": "props",
5
- "defineOptions": "setup-const",
6
5
  "ref": "setup-const",
7
6
  "computed": "setup-const",
8
7
  "watch": "setup-const",
8
+ "useRadioButtonStyle": "setup-maybe-ref",
9
9
  "props": "setup-reactive-const",
10
10
  "emit": "setup-const",
11
+ "prefixCls": "setup-ref",
12
+ "wrapSSR": "setup-maybe-ref",
13
+ "hashId": "setup-maybe-ref",
11
14
  "myValue": "setup-ref",
12
15
  "styles": "setup-ref",
13
16
  "onClick": "setup-const"
14
17
  } */
15
- import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
18
+ import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
16
19
  const _hoisted_1 = ["onClick"];
17
20
  import { ref, computed, watch } from 'vue';
21
+ import useRadioButtonStyle from './style';
18
22
  const __sfc_main__ = Object.assign({
19
23
  name: 'JRadioButton',
20
24
  }, {
@@ -36,6 +40,8 @@ const __sfc_main__ = Object.assign({
36
40
  setup(__props, { emit: __emit }) {
37
41
  const props = __props;
38
42
  const emit = __emit;
43
+ const prefixCls = computed(() => 'j-radio-button');
44
+ const [wrapSSR, hashId] = useRadioButtonStyle(prefixCls);
39
45
  const myValue = ref(props.value);
40
46
  const styles = computed(() => {
41
47
  return {
@@ -54,7 +60,7 @@ const __sfc_main__ = Object.assign({
54
60
  });
55
61
  return (_ctx, _cache) => {
56
62
  return (_openBlock(), _createElementBlock("div", {
57
- class: "j-radio-button",
63
+ class: _normalizeClass(['j-radio-button', _unref(hashId)]),
58
64
  style: _normalizeStyle(styles.value)
59
65
  }, [
60
66
  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.options, (item) => {
@@ -63,7 +69,7 @@ const __sfc_main__ = Object.assign({
63
69
  class: _normalizeClass(["j-radio-button-item", { 'active': myValue.value === item.value }])
64
70
  }, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1));
65
71
  }), 256 /* UNKEYED_FRAGMENT */))
66
- ], 4 /* STYLE */));
72
+ ], 6 /* CLASS, STYLE */));
67
73
  };
68
74
  }
69
75
  });
@@ -1 +1,23 @@
1
- import './index.less';
1
+ import genCompoentStyle from '../../style/styleRegister';
2
+ var genRadioButtonStyle = function genRadioButtonStyle(config) {
3
+ var token = config.token;
4
+ return {
5
+ '.j-radio-button': {
6
+ display: 'grid',
7
+ gap: '16px',
8
+ '.j-radio-button-item': {
9
+ padding: '6px 12px',
10
+ textAlign: 'center',
11
+ height: '100%',
12
+ borderRadius: '2px',
13
+ backgroundColor: '#f5f5f5',
14
+ cursor: 'pointer',
15
+ '&.active': {
16
+ color: '#fff',
17
+ backgroundColor: token.colorPrimary
18
+ }
19
+ }
20
+ }
21
+ };
22
+ };
23
+ export default genCompoentStyle([genRadioButtonStyle]);
@@ -32,9 +32,13 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
32
32
  "scrollbarEmits": "setup-maybe-ref",
33
33
  "scrollbarProps": "setup-maybe-ref",
34
34
  "BarInstance": "setup-maybe-ref",
35
+ "useScrollbarStyle": "setup-maybe-ref",
35
36
  "COMPONENT_NAME": "literal-const",
36
37
  "props": "setup-reactive-const",
37
38
  "emit": "setup-const",
39
+ "prefixCls": "setup-ref",
40
+ "wrapSSR": "setup-maybe-ref",
41
+ "hashId": "setup-maybe-ref",
38
42
  "stopResizeObserver": "setup-let",
39
43
  "stopResizeListener": "setup-let",
40
44
  "scrollbarRef": "setup-ref",
@@ -51,13 +55,14 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
51
55
  "update": "setup-const"
52
56
  } */
53
57
  import { defineComponent as _defineComponent } from 'vue';
54
- import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from "vue";
58
+ import { unref as _unref, renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from "vue";
55
59
  import { computed, nextTick, onMounted, onUpdated, provide, reactive, ref, watch, } from 'vue';
56
60
  import { useEventListener, useResizeObserver } from '@vueuse/core';
57
61
  import { isNumber, isObject } from '@jetlinks-web/utils';
58
62
  import Bar from './Bar.js';
59
63
  import { scrollbarContextKey } from './constants';
60
64
  import { scrollbarEmits, scrollbarProps, } from './scrollbarProps';
65
+ import useScrollbarStyle from './style';
61
66
  const COMPONENT_NAME = 'JScrollbar';
62
67
  const __sfc_main__ = _defineComponent({
63
68
  ...{
@@ -68,6 +73,8 @@ const __sfc_main__ = _defineComponent({
68
73
  setup(__props, { expose: __expose, emit: __emit }) {
69
74
  const props = __props;
70
75
  const emit = __emit;
76
+ const prefixCls = computed(() => 'j-scrollbar');
77
+ const [wrapSSR, hashId] = useScrollbarStyle(prefixCls);
71
78
  let stopResizeObserver = undefined;
72
79
  let stopResizeListener = undefined;
73
80
  const scrollbarRef = ref();
@@ -172,7 +179,7 @@ const __sfc_main__ = _defineComponent({
172
179
  return (_openBlock(), _createElementBlock("div", {
173
180
  ref_key: "scrollbarRef",
174
181
  ref: scrollbarRef,
175
- class: "j-scrollbar"
182
+ class: _normalizeClass(['j-scrollbar', _unref(hashId)])
176
183
  }, [
177
184
  _createElementVNode("div", {
178
185
  ref_key: "wrapRef",
@@ -205,7 +212,7 @@ const __sfc_main__ = _defineComponent({
205
212
  "min-size": _ctx.minSize
206
213
  }, null, 8 /* PROPS */, ["always", "min-size"]))
207
214
  : _createCommentVNode("v-if", true)
208
- ], 512 /* NEED_PATCH */));
215
+ ], 2 /* CLASS */));
209
216
  };
210
217
  }
211
218
  });
@@ -26,12 +26,16 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
26
26
  "BAR_MAP": "setup-maybe-ref",
27
27
  "renderThumbStyle": "setup-maybe-ref",
28
28
  "thumbProps": "setup-maybe-ref",
29
+ "useScrollbarStyle": "setup-maybe-ref",
29
30
  "props": "setup-reactive-const",
30
31
  "scrollbar": "setup-maybe-ref",
31
32
  "instance": "setup-ref",
32
33
  "thumb": "setup-ref",
33
34
  "thumbState": "setup-ref",
34
35
  "visible": "setup-ref",
36
+ "prefixCls": "setup-ref",
37
+ "wrapSSR": "setup-maybe-ref",
38
+ "hashId": "setup-maybe-ref",
35
39
  "cursorDown": "setup-let",
36
40
  "cursorLeave": "setup-let",
37
41
  "originalOnSelectStart": "setup-let",
@@ -48,13 +52,14 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
52
  "restoreOnselectstart": "setup-const"
49
53
  } */
50
54
  import { defineComponent as _defineComponent } from 'vue';
51
- import { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, vShow as _vShow, normalizeClass as _normalizeClass, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
55
+ import { unref as _unref, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, vShow as _vShow, normalizeClass as _normalizeClass, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
52
56
  import { computed, inject, onBeforeUnmount, ref, toRef } from 'vue';
53
57
  import { useEventListener } from '@vueuse/core';
54
58
  import { isClient } from '@jetlinks-web/utils';
55
59
  import { scrollbarContextKey } from './constants';
56
60
  import { BAR_MAP, renderThumbStyle } from './util';
57
61
  import { thumbProps } from './thumbProps';
62
+ import useScrollbarStyle from './style';
58
63
  const __sfc_main__ = _defineComponent({
59
64
  props: thumbProps,
60
65
  setup(__props) {
@@ -66,6 +71,8 @@ const __sfc_main__ = _defineComponent({
66
71
  const thumb = ref();
67
72
  const thumbState = ref({});
68
73
  const visible = ref(false);
74
+ const prefixCls = computed(() => 'j-scrollbar');
75
+ const [wrapSSR, hashId] = useScrollbarStyle(prefixCls);
69
76
  let cursorDown = false;
70
77
  let cursorLeave = false;
71
78
  let originalOnSelectStart = isClient ? document.onselectstart : null;
@@ -159,30 +166,34 @@ const __sfc_main__ = _defineComponent({
159
166
  useEventListener(toRef(scrollbar, 'scrollbarElement'), 'mousemove', mouseMoveScrollbarHandler);
160
167
  useEventListener(toRef(scrollbar, 'scrollbarElement'), 'mouseleave', mouseLeaveScrollbarHandler);
161
168
  return (_ctx, _cache) => {
162
- return (_openBlock(), _createBlock(_Transition, {
163
- name: "j-scrollbar-fade",
164
- persisted: ""
165
- }, {
166
- default: _withCtx(() => [
167
- _withDirectives(_createElementVNode("div", {
168
- ref_key: "instance",
169
- ref: instance,
170
- class: _normalizeClass(['j-scrollbar__bar', props.vertical ? 'is-vertical' : 'is-horizontal']),
171
- onMousedown: clickTrackHandler
172
- }, [
173
- _createElementVNode("div", {
174
- ref_key: "thumb",
175
- ref: thumb,
176
- class: "j-scrollbar__thumb",
177
- style: _normalizeStyle(thumbStyle.value),
178
- onMousedown: clickThumbHandler
179
- }, null, 36 /* STYLE, NEED_HYDRATION */)
180
- ], 34 /* CLASS, NEED_HYDRATION */), [
181
- [_vShow, _ctx.always || visible.value]
182
- ])
183
- ]),
184
- _: 1 /* STABLE */
185
- }));
169
+ return (_openBlock(), _createElementBlock("div", {
170
+ class: _normalizeClass([_unref(hashId)])
171
+ }, [
172
+ _createVNode(_Transition, {
173
+ name: "j-scrollbar-fade",
174
+ persisted: ""
175
+ }, {
176
+ default: _withCtx(() => [
177
+ _withDirectives(_createElementVNode("div", {
178
+ ref_key: "instance",
179
+ ref: instance,
180
+ class: _normalizeClass(['j-scrollbar__bar', props.vertical ? 'is-vertical' : 'is-horizontal']),
181
+ onMousedown: clickTrackHandler
182
+ }, [
183
+ _createElementVNode("div", {
184
+ ref_key: "thumb",
185
+ ref: thumb,
186
+ class: "j-scrollbar__thumb",
187
+ style: _normalizeStyle(thumbStyle.value),
188
+ onMousedown: clickThumbHandler
189
+ }, null, 36 /* STYLE, NEED_HYDRATION */)
190
+ ], 34 /* CLASS, NEED_HYDRATION */), [
191
+ [_vShow, _ctx.always || visible.value]
192
+ ])
193
+ ]),
194
+ _: 1 /* STABLE */
195
+ })
196
+ ], 2 /* CLASS */));
186
197
  };
187
198
  }
188
199
  });
@@ -1 +1,63 @@
1
- import './index.less';
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import genCompoentStyle from "../../style/styleRegister";
3
+ var scrollbarBgColor = '#909399';
4
+ var scrollbarHoverBgColor = '#909399';
5
+ var scrollbarHoverOpacity = 0.5;
6
+ var scrollbarOpacity = 0.3;
7
+ var transitionDuration = '0.3s';
8
+ var genScrollbarStyle = function genScrollbarStyle(config) {
9
+ var componentCls = config.componentCls,
10
+ token = config.token;
11
+ return _defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty({
12
+ overflow: 'hidden',
13
+ position: 'relative',
14
+ height: '100%'
15
+ }, "".concat(componentCls, "__wrap"), _defineProperty({
16
+ overflow: 'auto',
17
+ height: '100%'
18
+ }, "".concat(componentCls, "--hidden-default"), {
19
+ scrollbarWidth: 'none',
20
+ '&::-webkit-scrollbar': {
21
+ display: 'none'
22
+ }
23
+ })), "".concat(componentCls, "__thumb"), {
24
+ position: 'relative',
25
+ display: 'block',
26
+ width: 0,
27
+ height: 0,
28
+ cursor: 'pointer',
29
+ borderRadius: 'inherit',
30
+ backgroundColor: scrollbarBgColor,
31
+ transition: "".concat(transitionDuration, " background-color"),
32
+ opacity: scrollbarOpacity,
33
+ '&:hover': {
34
+ backgroundColor: scrollbarHoverBgColor,
35
+ opacity: scrollbarOpacity
36
+ }
37
+ }), "".concat(componentCls, "__bar"), _defineProperty(_defineProperty({
38
+ position: 'absolute',
39
+ right: '2px',
40
+ bottom: '2px',
41
+ zIndex: 1,
42
+ borderRadius: '4px'
43
+ }, "".concat(componentCls, "--vertical"), {
44
+ width: '6px',
45
+ top: '2px',
46
+ '> div': {
47
+ width: '100%'
48
+ }
49
+ }), "".concat(componentCls, "--horizontal"), {
50
+ height: '6px',
51
+ left: '2px',
52
+ '> div': {
53
+ height: '100%'
54
+ }
55
+ }))), "".concat(componentCls, "-fade"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-fade-enter-active"), {
56
+ transition: 'opacity 340ms ease-out'
57
+ }), "".concat(componentCls, "-fade-leave-active"), {
58
+ transition: 'opacity 120ms ease-out'
59
+ }), "".concat(componentCls, "-fade-enter-from,").concat(componentCls, "-fade-leave-active"), {
60
+ opacity: 0
61
+ }));
62
+ };
63
+ export default genCompoentStyle([genScrollbarStyle]);
@@ -15,8 +15,12 @@
15
15
  "Popover": "setup-maybe-ref",
16
16
  "message": "setup-maybe-ref",
17
17
  "useLocaleReceiver": "setup-maybe-ref",
18
+ "useSearchStyle": "setup-maybe-ref",
18
19
  "emit": "setup-const",
19
20
  "props": "setup-reactive-const",
21
+ "prefixCls": "setup-ref",
22
+ "wrapSSR": "setup-maybe-ref",
23
+ "hashId": "setup-maybe-ref",
20
24
  "contextLocale": "setup-maybe-ref",
21
25
  "historyList": "setup-ref",
22
26
  "historyVisible": "setup-ref",
@@ -28,15 +32,10 @@
28
32
  "deleteHistory": "setup-const"
29
33
  } */
30
34
  import { defineComponent as _defineComponent } from 'vue';
31
- import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, withModifiers as _withModifiers } from "vue";
32
- const _hoisted_1 = { class: "search-history-warp" };
33
- const _hoisted_2 = {
34
- key: 0,
35
- class: "search-history-items"
36
- };
37
- const _hoisted_3 = ["onClick"];
38
- const _hoisted_4 = { class: "delete" };
39
- const _hoisted_5 = {
35
+ import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, withModifiers as _withModifiers } from "vue";
36
+ const _hoisted_1 = ["onClick"];
37
+ const _hoisted_2 = { class: "delete" };
38
+ const _hoisted_3 = {
40
39
  key: 1,
41
40
  class: "search-history-empty"
42
41
  };
@@ -45,6 +44,7 @@ import { isFunction } from 'lodash-es';
45
44
  import { AIcon, Empty, Ellipsis } from '../../../';
46
45
  import { Popconfirm, Button, FormItemRest, Popover, message } from 'ant-design-vue';
47
46
  import { useLocaleReceiver } from "../../LocaleReciver";
47
+ import useSearchStyle from '../style';
48
48
  const __sfc_main__ = _defineComponent({
49
49
  props: {
50
50
  target: {
@@ -69,6 +69,8 @@ const __sfc_main__ = _defineComponent({
69
69
  setup(__props, { emit: __emit }) {
70
70
  const emit = __emit;
71
71
  const props = __props;
72
+ const prefixCls = computed(() => 'JSearch');
73
+ const [wrapSSR, hashId] = useSearchStyle(prefixCls);
72
74
  const [contextLocale] = useLocaleReceiver('Search');
73
75
  const historyList = ref([]);
74
76
  const historyVisible = ref(false);
@@ -109,7 +111,9 @@ const __sfc_main__ = _defineComponent({
109
111
  }
110
112
  };
111
113
  return (_ctx, _cache) => {
112
- return (_openBlock(), _createElementBlock("div", _hoisted_1, [
114
+ return (_openBlock(), _createElementBlock("div", {
115
+ class: _normalizeClass(['search-history-warp', _unref(hashId)])
116
+ }, [
113
117
  _createVNode(_unref(FormItemRest), null, {
114
118
  default: _withCtx(() => [
115
119
  _createVNode(_unref(Button), {
@@ -134,7 +138,10 @@ const __sfc_main__ = _defineComponent({
134
138
  }, {
135
139
  content: _withCtx(() => [
136
140
  (!showEmpty.value)
137
- ? (_openBlock(), _createElementBlock("div", _hoisted_2, [
141
+ ? (_openBlock(), _createElementBlock("div", {
142
+ key: 0,
143
+ class: _normalizeClass(['search-history-items', _unref(hashId)])
144
+ }, [
138
145
  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(historyList.value, (item) => {
139
146
  return (_openBlock(), _createElementBlock("div", {
140
147
  key: item.id,
@@ -150,14 +157,14 @@ const __sfc_main__ = _defineComponent({
150
157
  ]),
151
158
  _: 2 /* DYNAMIC */
152
159
  }, 1024 /* DYNAMIC_SLOTS */)
153
- ], 8 /* PROPS */, _hoisted_3),
160
+ ], 8 /* PROPS */, _hoisted_1),
154
161
  _createVNode(_unref(Popconfirm), {
155
162
  title: _unref(contextLocale).advanced.history.confirmDelete,
156
163
  placement: "top",
157
164
  onConfirm: ($event) => (deleteHistory(item))
158
165
  }, {
159
166
  default: _withCtx(() => [
160
- _createElementVNode("span", _hoisted_4, [
167
+ _createElementVNode("span", _hoisted_2, [
161
168
  _createVNode(_unref(AIcon), { type: "DeleteOutlined" })
162
169
  ])
163
170
  ]),
@@ -165,8 +172,8 @@ const __sfc_main__ = _defineComponent({
165
172
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "onConfirm"])
166
173
  ]));
167
174
  }), 128 /* KEYED_FRAGMENT */))
168
- ]))
169
- : (_openBlock(), _createElementBlock("div", _hoisted_5, [
175
+ ], 2 /* CLASS */))
176
+ : (_openBlock(), _createElementBlock("div", _hoisted_3, [
170
177
  _createVNode(_unref(Empty))
171
178
  ]))
172
179
  ]),
@@ -180,7 +187,7 @@ const __sfc_main__ = _defineComponent({
180
187
  ]),
181
188
  _: 1 /* STABLE */
182
189
  }, 8 /* PROPS */, ["visible"])
183
- ]));
190
+ ], 2 /* CLASS */));
184
191
  };
185
192
  }
186
193
  });
@@ -22,8 +22,7 @@
22
22
  "saveHistory": "setup-const"
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
- import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
- const _withScopeId = n => (_pushScopeId("data-v-1747107045907"), n = n(), _popScopeId(), n);
25
+ import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock } from "vue";
27
26
  const _hoisted_1 = {
28
27
  key: 0,
29
28
  style: { "width": "240px" }