@jetlinks-web/components 2.6.21 → 2.6.22

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 (142) hide show
  1. package/es/AMap/Map.js +1 -2
  2. package/es/AutoComplete/AutoComplete.js +0 -1
  3. package/es/BadgeStatus/Badge.js +1 -2
  4. package/es/CardSelect/CardSelect.js +1 -2
  5. package/es/CheckButton/CheckButton.js +1 -2
  6. package/es/DragModal/DragModal.js +0 -1
  7. package/es/Echarts/Echarts.js +1 -2
  8. package/es/EditTable/EditTable.js +4 -6
  9. package/es/EditTable/FormItem.js +0 -1
  10. package/es/EditTable/Header.js +5 -3
  11. package/es/EditTable/components/ContextMenu/Menu.js +1 -2
  12. package/es/EditTable/components/Search/search.js +1 -2
  13. package/es/EditTable/components/Search/sort.js +1 -3
  14. package/es/EditTable/group.js +7 -10
  15. package/es/EditTable/hooks/useValidate.js +1 -1
  16. package/es/FlameGraph/FlameGraph.js +2 -2
  17. package/es/FullPage/FullPage.js +1 -2
  18. package/es/LocaleProvider/index.js +1 -2
  19. package/es/PermissionButton/index.js +3 -4
  20. package/es/ProLayout/Basic/BasicLayout.js +34 -39
  21. package/es/ProLayout/Basic/Header.js +3 -7
  22. package/es/ProLayout/PageContainer/index.js +8 -12
  23. package/es/ProLayout/SiderMenu/BaseMenu.js +13 -36
  24. package/es/ProLayout/SiderMenu/SiderMenu.js +14 -34
  25. package/es/ProLayout/TopHeader/index.js +1 -9
  26. package/es/ProLayout/util.js +5 -5
  27. package/es/ProTable/Content.js +34 -18
  28. package/es/RadioButton/RadioButton.js +0 -1
  29. package/es/Search/Advanced/SaveHistory.js +1 -2
  30. package/es/Search/Item.js +1 -2
  31. package/es/Title/title.js +0 -1
  32. package/lib/AMap/Map.js +1 -2
  33. package/lib/AutoComplete/AutoComplete.js +0 -1
  34. package/lib/BadgeStatus/Badge.js +1 -2
  35. package/lib/CardSelect/CardSelect.js +1 -2
  36. package/lib/CheckButton/CheckButton.js +1 -2
  37. package/lib/DragModal/DragModal.js +0 -1
  38. package/lib/Echarts/Echarts.js +1 -2
  39. package/lib/EditTable/EditTable.js +4 -6
  40. package/lib/EditTable/FormItem.js +0 -1
  41. package/lib/EditTable/Header.js +5 -3
  42. package/lib/EditTable/components/ContextMenu/Menu.js +1 -2
  43. package/lib/EditTable/components/Search/search.js +1 -2
  44. package/lib/EditTable/components/Search/sort.js +1 -3
  45. package/lib/EditTable/group.js +7 -10
  46. package/lib/EditTable/hooks/useValidate.js +1 -1
  47. package/lib/FlameGraph/FlameGraph.js +2 -2
  48. package/lib/FullPage/FullPage.js +1 -2
  49. package/lib/LocaleProvider/index.js +1 -2
  50. package/lib/PermissionButton/index.js +3 -4
  51. package/lib/ProLayout/Basic/BasicLayout.js +33 -38
  52. package/lib/ProLayout/Basic/Header.js +2 -6
  53. package/lib/ProLayout/PageContainer/index.js +7 -11
  54. package/lib/ProLayout/SiderMenu/BaseMenu.js +14 -36
  55. package/lib/ProLayout/SiderMenu/SiderMenu.js +13 -33
  56. package/lib/ProLayout/TopHeader/index.js +2 -9
  57. package/lib/ProLayout/util.js +5 -5
  58. package/lib/ProTable/Content.js +34 -18
  59. package/lib/RadioButton/RadioButton.js +0 -1
  60. package/lib/Search/Advanced/SaveHistory.js +1 -2
  61. package/lib/Search/Item.js +1 -2
  62. package/lib/Title/title.js +0 -1
  63. package/package.json +2 -2
  64. package/es/CardSelect/style/index.css +0 -24
  65. package/es/CardSelect/style/index.less +0 -26
  66. package/es/CheckButton/style/index.css +0 -37
  67. package/es/CheckButton/style/index.less +0 -40
  68. package/es/DragModal/style/index.css +0 -82
  69. package/es/DragModal/style/index.less +0 -97
  70. package/es/EditTable/style/body.less +0 -66
  71. package/es/EditTable/style/form.less +0 -33
  72. package/es/EditTable/style/group.less +0 -32
  73. package/es/EditTable/style/header.less +0 -77
  74. package/es/EditTable/style/index.css +0 -267
  75. package/es/EditTable/style/index.less +0 -41
  76. package/es/EditTable/style/menu.less +0 -25
  77. package/es/EditTable/style/table.less +0 -47
  78. package/es/Ellipsis/style/index.css +0 -17
  79. package/es/Ellipsis/style/index.less +0 -20
  80. package/es/FlameGraph/style/index.css +0 -43
  81. package/es/FlameGraph/style/index.less +0 -52
  82. package/es/MonacoEditor/style/index.css +0 -4
  83. package/es/MonacoEditor/style/index.less +0 -4
  84. package/es/ProLayout/Basic/BasicLayout.less +0 -66
  85. package/es/ProLayout/Basic/Header.less +0 -8
  86. package/es/ProLayout/PageContainer/index.less +0 -103
  87. package/es/ProLayout/SiderMenu/index.less +0 -231
  88. package/es/ProLayout/TopHeader/index.less +0 -174
  89. package/es/ProLayout/style/default.less +0 -4
  90. package/es/ProLayout/style/style.less +0 -7
  91. package/es/ProTable/style/ProTable.less +0 -138
  92. package/es/RadioButton/style/index.css +0 -20
  93. package/es/RadioButton/style/index.less +0 -19
  94. package/es/Scrollbar/style/index.css +0 -65
  95. package/es/Scrollbar/style/index.less +0 -83
  96. package/es/Search/style/Item.less +0 -33
  97. package/es/Search/style/Search.less +0 -179
  98. package/es/Title/style/index.css +0 -23
  99. package/es/Title/style/index.less +0 -25
  100. package/es/style/index.css +0 -5237
  101. package/es/style/variable.css +0 -4
  102. package/es/style/variable.less +0 -4
  103. package/lib/CardSelect/style/index.css +0 -24
  104. package/lib/CardSelect/style/index.less +0 -26
  105. package/lib/CheckButton/style/index.css +0 -37
  106. package/lib/CheckButton/style/index.less +0 -40
  107. package/lib/DragModal/style/index.css +0 -82
  108. package/lib/DragModal/style/index.less +0 -97
  109. package/lib/EditTable/style/body.less +0 -66
  110. package/lib/EditTable/style/form.less +0 -33
  111. package/lib/EditTable/style/group.less +0 -32
  112. package/lib/EditTable/style/header.less +0 -77
  113. package/lib/EditTable/style/index.css +0 -267
  114. package/lib/EditTable/style/index.less +0 -41
  115. package/lib/EditTable/style/menu.less +0 -25
  116. package/lib/EditTable/style/table.less +0 -47
  117. package/lib/Ellipsis/style/index.css +0 -17
  118. package/lib/Ellipsis/style/index.less +0 -20
  119. package/lib/FlameGraph/style/index.css +0 -43
  120. package/lib/FlameGraph/style/index.less +0 -52
  121. package/lib/MonacoEditor/style/index.css +0 -4
  122. package/lib/MonacoEditor/style/index.less +0 -4
  123. package/lib/ProLayout/Basic/BasicLayout.less +0 -66
  124. package/lib/ProLayout/Basic/Header.less +0 -8
  125. package/lib/ProLayout/PageContainer/index.less +0 -103
  126. package/lib/ProLayout/SiderMenu/index.less +0 -231
  127. package/lib/ProLayout/TopHeader/index.less +0 -174
  128. package/lib/ProLayout/style/default.less +0 -4
  129. package/lib/ProLayout/style/style.less +0 -7
  130. package/lib/ProTable/style/ProTable.less +0 -138
  131. package/lib/RadioButton/style/index.css +0 -20
  132. package/lib/RadioButton/style/index.less +0 -19
  133. package/lib/Scrollbar/style/index.css +0 -65
  134. package/lib/Scrollbar/style/index.less +0 -83
  135. package/lib/Search/style/Item.less +0 -33
  136. package/lib/Search/style/Search.less +0 -179
  137. package/lib/Title/style/index.css +0 -23
  138. package/lib/Title/style/index.less +0 -25
  139. package/lib/style/components.less +0 -10
  140. package/lib/style/index.css +0 -5237
  141. package/lib/style/variable.css +0 -4
  142. package/lib/style/variable.less +0 -4
@@ -19,9 +19,6 @@ var _RouteContext = require("../RouteContext");
19
19
  require("../typings");
20
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
21
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
- function _isSlot(s) {
23
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
24
- }
25
22
  var siderMenuProps = exports.siderMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), _BaseMenu.baseMenuProps), {}, {
26
23
  logo: {
27
24
  type: [Object, String, Function],
@@ -154,11 +151,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
154
151
  if (layout === 'mix' && renderFunction === false) {
155
152
  return null;
156
153
  }
157
- var titleDom = (0, _vue.createVNode)("h1", null, _isSlot(title) ? title : {
158
- default: function _default() {
159
- return [title];
160
- }
161
- });
154
+ var titleDom = (0, _vue.createVNode)("h1", null, [title]);
162
155
  if (renderKey === 'menuHeaderRender') {
163
156
  return null;
164
157
  }
@@ -168,11 +161,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
168
161
  return renderFunction(logoDom, props.collapsed ? null : titleDom, props);
169
162
  }
170
163
  if (Array.isArray(renderFunction)) {
171
- return (0, _vue.createVNode)(_vue.Fragment, null, _isSlot(renderFunction) ? renderFunction : {
172
- default: function _default() {
173
- return [renderFunction];
174
- }
175
- });
164
+ return (0, _vue.createVNode)(_vue.Fragment, null, [renderFunction]);
176
165
  }
177
166
  return (0, _vue.createVNode)("a", null, [logoDom, props.collapsed ? null : titleDom]);
178
167
  };
@@ -184,7 +173,6 @@ var defaultRenderCollapsedButton = exports.defaultRenderCollapsedButton = functi
184
173
  }, null);
185
174
  };
186
175
  var SiderMenu = function SiderMenu(props) {
187
- var _slot;
188
176
  var collapsed = props.collapsed,
189
177
  siderWidth = props.siderWidth,
190
178
  breakpoint = props.breakpoint,
@@ -285,17 +273,9 @@ var SiderMenu = function SiderMenu(props) {
285
273
  "onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
286
274
  "id": "logo",
287
275
  "style": props === null || props === void 0 ? void 0 : props.logoStyle
288
- }, _isSlot(headerDom) ? headerDom : {
289
- default: function _default() {
290
- return [headerDom];
291
- }
292
- }), extraDom && (0, _vue.createVNode)("div", {
276
+ }, [headerDom]), extraDom && (0, _vue.createVNode)("div", {
293
277
  "class": (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
294
- }, _isSlot(extraDom) ? extraDom : {
295
- default: function _default() {
296
- return [extraDom];
297
- }
298
- }), (0, _vue.createVNode)("div", {
278
+ }, [extraDom]), (0, _vue.createVNode)("div", {
299
279
  "class": "".concat(baseClassName, "-body"),
300
280
  "style": "flex: 1; overflow: hidden auto;"
301
281
  }, [props.layoutType !== _defaultSettings.LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), (0, _vue.createVNode)("div", {
@@ -312,17 +292,17 @@ var SiderMenu = function SiderMenu(props) {
312
292
  props.onCollapse(!props.collapsed);
313
293
  }
314
294
  }
315
- }, _isSlot(_slot = (0, _vue.createVNode)(_lib.Menu.Item, {
316
- "key": 'collapsed-button',
317
- "class": "".concat(baseClassName, "-collapsed-button"),
318
- "title": false
319
295
  }, {
320
296
  default: function _default() {
321
- return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
322
- }
323
- })) ? _slot : {
324
- default: function _default() {
325
- return [_slot];
297
+ return [(0, _vue.createVNode)(_lib.Menu.Item, {
298
+ "key": 'collapsed-button',
299
+ "class": "".concat(baseClassName, "-collapsed-button"),
300
+ "title": false
301
+ }, {
302
+ default: function _default() {
303
+ return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
304
+ }
305
+ })];
326
306
  }
327
307
  }) : null])];
328
308
  }
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.topNavHeaderProps = exports.baseHeaderProps = exports.TopNavHeader = void 0;
8
- var _vue = require("vue");
9
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _vue = require("vue");
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
12
  var _vcResizeObserver = _interopRequireDefault(require("ant-design-vue/lib/vc-resize-observer"));
@@ -17,9 +17,6 @@ var _RouteContext = require("../RouteContext");
17
17
  var _BaseMenu = _interopRequireDefault(require("../SiderMenu/BaseMenu"));
18
18
  var _util = require("../util");
19
19
  var _excluded = ["rightContentRender"];
20
- function _isSlot(s) {
21
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
22
- }
23
20
  var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
24
21
  prefixCls: _vueTypes.default.string.def('ant-pro'),
25
22
  collapsed: _vueTypes.default.looseBool,
@@ -146,11 +143,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
146
143
  "class": "".concat(prefixCls, "-logo"),
147
144
  "key": "logo",
148
145
  "id": "logo"
149
- }, _isSlot(headerDom) ? headerDom : {
150
- default: function _default() {
151
- return [headerDom];
152
- }
153
- })]), (0, _vue.createVNode)("div", {
146
+ }, [headerDom])]), (0, _vue.createVNode)("div", {
154
147
  "style": {
155
148
  flex: 1
156
149
  },
@@ -14,14 +14,14 @@ function clearMenuItem(menusData) {
14
14
  return menusData.map(function (item) {
15
15
  var _finalItem$meta;
16
16
  var finalItem = (0, _objectSpread2.default)({}, item);
17
- if ((_finalItem$meta = finalItem.meta) === null || _finalItem$meta === void 0 ? void 0 : _finalItem$meta.hideInMenu) {
17
+ if ((_finalItem$meta = finalItem.meta) !== null && _finalItem$meta !== void 0 && _finalItem$meta.hideInMenu) {
18
18
  return null;
19
19
  }
20
- if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
20
+ if (finalItem && finalItem !== null && finalItem !== void 0 && finalItem.children) {
21
21
  var _finalItem$meta2;
22
- if (!((_finalItem$meta2 = finalItem.meta) === null || _finalItem$meta2 === void 0 ? void 0 : _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
22
+ if (!((_finalItem$meta2 = finalItem.meta) !== null && _finalItem$meta2 !== void 0 && _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
23
23
  var _child$meta;
24
- return child && child.name && !((_child$meta = child.meta) === null || _child$meta === void 0 ? void 0 : _child$meta.hideInMenu);
24
+ return child && child.name && !((_child$meta = child.meta) !== null && _child$meta !== void 0 && _child$meta.hideInMenu);
25
25
  })) {
26
26
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
27
27
  children: clearMenuItem(finalItem.children)
@@ -38,7 +38,7 @@ function flatMap(menusData) {
38
38
  return menusData.map(function (item) {
39
39
  var _finalItem$meta3;
40
40
  var finalItem = (0, _objectSpread2.default)({}, item);
41
- if (!finalItem.name || ((_finalItem$meta3 = finalItem.meta) === null || _finalItem$meta3 === void 0 ? void 0 : _finalItem$meta3.hideInMenu)) {
41
+ if (!finalItem.name || (_finalItem$meta3 = finalItem.meta) !== null && _finalItem$meta3 !== void 0 && _finalItem$meta3.hideInMenu) {
42
42
  return null;
43
43
  }
44
44
  if (finalItem.children) {
@@ -21,29 +21,36 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
21
21
  "_contentProps": "setup-maybe-ref",
22
22
  "Table": "setup-maybe-ref",
23
23
  "get": "setup-maybe-ref",
24
+ "omit": "setup-maybe-ref",
24
25
  "Empty": "setup-maybe-ref",
26
+ "useTableInject": "setup-maybe-ref",
25
27
  "props": "setup-reactive-const",
26
28
  "slots": "setup-maybe-ref",
29
+ "_rowSelection": "setup-maybe-ref",
27
30
  "_columns": "setup-ref",
31
+ "_slots": "setup-ref",
28
32
  "_scroll": "setup-ref",
29
- "gridTemplateColumns": "setup-ref"
33
+ "gridTemplateColumns": "setup-ref",
34
+ "onClick": "setup-const"
30
35
  } */
31
36
  import { defineComponent as _defineComponent } from 'vue';
32
- import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createVNode as _createVNode, mergeProps as _mergeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createSlots as _createSlots, createBlock as _createBlock } from "vue";
37
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, mergeProps as _mergeProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createVNode as _createVNode, normalizeProps as _normalizeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createSlots as _createSlots, createBlock as _createBlock } from "vue";
33
38
  const _hoisted_1 = { class: "jtable-box" };
34
39
  const _hoisted_2 = {
35
40
  key: 0,
36
41
  class: "jtable-card"
37
42
  };
38
- const _hoisted_3 = {
43
+ const _hoisted_3 = ["onClick"];
44
+ const _hoisted_4 = {
39
45
  key: 1,
40
46
  class: "j-table-empty"
41
47
  };
42
48
  import { useSlots, computed } from 'vue';
43
49
  import { _contentProps } from "./setting";
44
50
  import { Table } from 'ant-design-vue/lib/';
45
- import { get } from 'lodash-es';
51
+ import { get, omit } from 'lodash-es';
46
52
  import Empty from '../Empty';
53
+ import { useTableInject } from './hooks';
47
54
  const __sfc_main__ = _defineComponent({
48
55
  ...{
49
56
  name: 'Content'
@@ -58,7 +65,11 @@ const __sfc_main__ = _defineComponent({
58
65
  setup(__props) {
59
66
  const props = __props;
60
67
  const slots = useSlots();
68
+ const _rowSelection = useTableInject();
61
69
  const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
70
+ const _slots = computed(() => {
71
+ return omit(slots, ['emptyText', 'bodyCell']);
72
+ });
62
73
  const _scroll = computed(() => {
63
74
  if (props.scroll === false) {
64
75
  return {
@@ -74,6 +85,12 @@ const __sfc_main__ = _defineComponent({
74
85
  const gridTemplateColumns = computed(() => {
75
86
  return `repeat(${props.column}, 1fr)`;
76
87
  });
88
+ const onClick = (item) => {
89
+ if (_rowSelection && _rowSelection.value) {
90
+ const _selected = _optionalChain([_rowSelection, 'access', _3 => _3.value, 'access', _4 => _4.selectedRowKeys, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6(item[props.rowKey])]);
91
+ _optionalChain([_rowSelection, 'access', _7 => _7.value, 'access', _8 => _8.onSelect, 'optionalCall', _9 => _9(item, !_selected)]);
92
+ }
93
+ };
77
94
  return (_ctx, _cache) => {
78
95
  return (_openBlock(), _createElementBlock("div", _hoisted_1, [
79
96
  (_ctx.mode === 'CARD')
@@ -87,36 +104,35 @@ const __sfc_main__ = _defineComponent({
87
104
  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dataSource, (item) => {
88
105
  return (_openBlock(), _createElementBlock("div", {
89
106
  class: _normalizeClass(['jtable-card-item', props.cardBodyClass]),
90
- key: item[props.rowKey]
107
+ key: item[props.rowKey],
108
+ onClick: ($event) => (onClick(item))
91
109
  }, [
92
- _renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
93
- ], 2 /* CLASS */));
110
+ _renderSlot(_ctx.$slots, "card", _mergeProps({ ref_for: true }, item))
111
+ ], 10 /* CLASS, PROPS */, _hoisted_3));
94
112
  }), 128 /* KEYED_FRAGMENT */))
95
113
  ], 4 /* STYLE */))
96
- : (_openBlock(), _createElementBlock("div", _hoisted_3, [
114
+ : (_openBlock(), _createElementBlock("div", _hoisted_4, [
97
115
  _renderSlot(_ctx.$slots, "emptyText", {}, () => [
98
116
  _createVNode(_unref(Empty))
99
117
  ])
100
118
  ]))
101
119
  ]))
102
120
  : (_openBlock(), _createBlock(_unref(Table), _mergeProps({ key: 1 }, props, {
121
+ "row-selection": _ctx.rowSelection || _unref(_rowSelection),
103
122
  dataSource: _ctx.dataSource,
104
123
  columns: _columns.value,
105
124
  pagination: false,
106
125
  scroll: _scroll.value,
107
- class: { 'j-table-scroll': !_optionalChain([props, 'access', _3 => _3.scroll, 'optionalAccess', _4 => _4.y]) }
126
+ class: { 'j-table-scroll': !_optionalChain([props, 'access', _10 => _10.scroll, 'optionalAccess', _11 => _11.y]) }
108
127
  }), _createSlots({
109
- headerCell: _withCtx(({ column, title }) => [
110
- _renderSlot(_ctx.$slots, "headerCell", _normalizeProps(_guardReactiveProps({ column, title })))
111
- ]),
112
128
  bodyCell: _withCtx(({ column, record, index }) => [
113
- ((_optionalChain([column, 'optionalAccess', _5 => _5.key]) || _optionalChain([column, 'optionalAccess', _6 => _6.dataIndex])) && _optionalChain([column, 'optionalAccess', _7 => _7.scopedSlots]) && (_optionalChain([_unref, 'call', _8 => _8(slots), 'optionalAccess', _9 => _9[_optionalChain([column, 'optionalAccess', _10 => _10.dataIndex])]]) || _optionalChain([_unref, 'call', _11 => _11(slots), 'optionalAccess', _12 => _12[_optionalChain([column, 'optionalAccess', _13 => _13.key])]])))
114
- ? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _14 => _14.key]) || _optionalChain([column, 'optionalAccess', _15 => _15.dataIndex]), _mergeProps({ key: 0 }, record, {
129
+ ((_optionalChain([column, 'optionalAccess', _12 => _12.key]) || _optionalChain([column, 'optionalAccess', _13 => _13.dataIndex])) && _optionalChain([column, 'optionalAccess', _14 => _14.scopedSlots]) && (_optionalChain([_slots, 'access', _15 => _15.value, 'optionalAccess', _16 => _16[_optionalChain([column, 'optionalAccess', _17 => _17.dataIndex])]]) || _optionalChain([_slots, 'access', _18 => _18.value, 'optionalAccess', _19 => _19[_optionalChain([column, 'optionalAccess', _20 => _20.key])]])))
130
+ ? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _21 => _21.key]) || _optionalChain([column, 'optionalAccess', _22 => _22.dataIndex]), _mergeProps({ key: 0 }, record, {
115
131
  index: index,
116
132
  column: column
117
133
  }))
118
134
  : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
119
- _createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _16 => _16.dataIndex]) || _optionalChain([column, 'optionalAccess', _17 => _17.key])) || '--'), 1 /* TEXT */)
135
+ _createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _23 => _23.dataIndex]) || _optionalChain([column, 'optionalAccess', _24 => _24.key])) || '--'), 1 /* TEXT */)
120
136
  ], 64 /* STABLE_FRAGMENT */))
121
137
  ]),
122
138
  emptyText: _withCtx(() => [
@@ -126,17 +142,17 @@ const __sfc_main__ = _defineComponent({
126
142
  ]),
127
143
  _: 2 /* DYNAMIC */
128
144
  }, [
129
- _renderList(_unref(slots), (_, slotKey) => {
145
+ _renderList(_slots.value, (_, slotKey) => {
130
146
  return {
131
147
  name: slotKey,
132
148
  fn: _withCtx((slotProps) => [
133
- (!['headerCell', 'bodyCell', 'emptyText'].includes(slotKey))
149
+ (!((_optionalChain([__props, 'access', _25 => _25.column, 'optionalAccess', _26 => _26.key]) || _optionalChain([__props, 'access', _27 => _27.column, 'optionalAccess', _28 => _28.dataIndex])) && _optionalChain([__props, 'access', _29 => _29.column, 'optionalAccess', _30 => _30.scopedSlots]) && (_optionalChain([_slots, 'access', _31 => _31.value, 'optionalAccess', _32 => _32[_optionalChain([__props, 'access', _33 => _33.column, 'optionalAccess', _34 => _34.dataIndex])]]) || _optionalChain([_slots, 'access', _35 => _35.value, 'optionalAccess', _36 => _36[_optionalChain([__props, 'access', _37 => _37.column, 'optionalAccess', _38 => _38.key])]]))))
134
150
  ? _renderSlot(_ctx.$slots, slotKey, _normalizeProps(_mergeProps({ key: 0 }, slotProps)))
135
151
  : _createCommentVNode("v-if", true)
136
152
  ])
137
153
  };
138
154
  })
139
- ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["dataSource", "columns", "scroll", "class"]))
155
+ ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["row-selection", "dataSource", "columns", "scroll", "class"]))
140
156
  ]));
141
157
  };
142
158
  }
@@ -2,7 +2,6 @@
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",
@@ -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-1749203558447"), 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" }
@@ -79,8 +79,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
79
79
  "valueChange": "setup-const"
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
- import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
83
- const _withScopeId = n => (_pushScopeId("data-v-1749203557618"), n = n(), _popScopeId(), n);
82
+ import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode } from "vue";
84
83
  const _hoisted_1 = { class: "JSearch-item" };
85
84
  const _hoisted_2 = {
86
85
  key: 0,
@@ -1,7 +1,6 @@
1
1
  /* Analyzed bindings: {
2
2
  "data": "props",
3
3
  "style": "props",
4
- "defineOptions": "setup-const",
5
4
  "props": "setup-reactive-const"
6
5
  } */
7
6
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.6.21",
3
+ "version": "2.6.22",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -44,8 +44,8 @@
44
44
  "monaco-editor": "^0.51.0",
45
45
  "resize-observer-polyfill": "^1.5.1",
46
46
  "sortablejs": "^1.15.2",
47
- "@jetlinks-web/utils": "^1.2.12",
48
47
  "@jetlinks-web/constants": "^1.0.9",
48
+ "@jetlinks-web/utils": "^1.2.12",
49
49
  "@jetlinks-web/hooks": "^1.0.29"
50
50
  },
51
51
  "devDependencies": {
@@ -1,24 +0,0 @@
1
- /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
- /* stylelint-disable no-duplicate-selectors */
3
- /* stylelint-disable */
4
- /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
- .j-card-select {
6
- display: grid;
7
- gap: 12px;
8
- }
9
- .j-card-select .j-card-select-item {
10
- padding: 12px;
11
- border: 1px solid #e6e6e6;
12
- border-radius: 2px;
13
- cursor: pointer;
14
- }
15
- .j-card-select .j-card-select-item.active {
16
- border-color: #1890ff;
17
- }
18
- .j-card-select .j-card-select-item.disabled {
19
- cursor: not-allowed;
20
- opacity: 0.75;
21
- }
22
- .j-card-select .j-card-select-item .j-card-select-describe {
23
- color: #263237;
24
- }
@@ -1,26 +0,0 @@
1
- @import '../../style/variable.less';
2
-
3
- .j-card-select {
4
- display: grid;
5
- gap: 12px;
6
-
7
- .j-card-select-item {
8
- padding: 12px;
9
- border: 1px solid #e6e6e6;
10
- border-radius: @border-radius-base;
11
- cursor: pointer;
12
-
13
- &.active {
14
- border-color: @primary-color;
15
- }
16
-
17
- &.disabled {
18
- cursor: not-allowed;
19
- opacity: 0.75;
20
- }
21
-
22
- .j-card-select-describe {
23
- color: @text-color-subtitle;
24
- }
25
- }
26
- }
@@ -1,37 +0,0 @@
1
- /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
- /* stylelint-disable no-duplicate-selectors */
3
- /* stylelint-disable */
4
- /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
- .j-check-button {
6
- display: flex;
7
- gap: 16px;
8
- width: 100%;
9
- }
10
- .j-check-button .j-check-button-item {
11
- flex: 1;
12
- min-width: 0;
13
- padding: 8px;
14
- border-radius: 2px;
15
- background-color: #f2f3f5;
16
- transition: all 0.3s;
17
- color: #333;
18
- text-align: center;
19
- cursor: pointer;
20
- }
21
- .j-check-button .j-check-button-item:hover {
22
- background-color: #1890ff;
23
- opacity: 0.85;
24
- color: #fff;
25
- }
26
- .j-check-button .j-check-button-item.selected {
27
- background-color: #1890ff;
28
- color: #fff;
29
- }
30
- .j-check-button .j-check-button-item.disabled {
31
- cursor: not-allowed;
32
- color: #00000060;
33
- }
34
- .j-check-button .j-check-button-item.disabled:hover {
35
- background-color: #f2f3f5;
36
- color: #00000060;
37
- }
@@ -1,40 +0,0 @@
1
- @import 'ant-design-vue/es/style/themes/index.less';
2
-
3
- .j-check-button {
4
- display: flex;
5
- gap: 16px;
6
- width: 100%;
7
-
8
- .j-check-button-item {
9
- flex: 1;
10
- min-width: 0;
11
- padding: 8px;
12
- border-radius: @border-radius-base;
13
- background-color: #f2f3f5;
14
- transition: all 0.3s;
15
- color: #333;
16
- text-align: center;
17
- cursor: pointer;
18
-
19
- &:hover {
20
- background-color: @primary-color;
21
- opacity: 0.85;
22
- color: #fff;
23
- }
24
-
25
- &.selected {
26
- background-color: @primary-color;
27
- color: #fff;
28
- }
29
-
30
- &.disabled {
31
- cursor: not-allowed;
32
- color: #00000060;
33
-
34
- &:hover {
35
- background-color: #f2f3f5;
36
- color: #00000060;
37
- }
38
- }
39
- }
40
- }
@@ -1,82 +0,0 @@
1
- /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
- /* stylelint-disable no-duplicate-selectors */
3
- /* stylelint-disable */
4
- /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
- .dialog-enter-active,
6
- .dialog-leave-active {
7
- transition: opacity 0.5s;
8
- }
9
- .dialog-enter,
10
- .dialog-leave-to {
11
- opacity: 0;
12
- }
13
- .jetlinks-drag-modal {
14
- position: fixed;
15
- z-index: 1000;
16
- }
17
- .jetlinks-drag-modal .jetlinks-drag-modal-sprite {
18
- position: absolute;
19
- width: 100%;
20
- height: 100%;
21
- display: flex;
22
- flex-direction: column;
23
- overflow: hidden;
24
- z-index: 23456765435;
25
- background-color: #ffffff;
26
- border-radius: 4px;
27
- border: 1px solid #91CAFF;
28
- box-shadow: 0 3px 8px 0 rgba(22, 119, 255, 0.24);
29
- }
30
- .jetlinks-drag-modal .jetlinks-drag-modal-sprite .header {
31
- padding: 5px 15px;
32
- font-size: 18px;
33
- font-weight: 700;
34
- color: #333;
35
- display: flex;
36
- justify-content: space-between;
37
- align-items: center;
38
- border-bottom: 1px solid #f0f0f0;
39
- cursor: move;
40
- }
41
- .jetlinks-drag-modal .jetlinks-drag-modal-sprite .jetlinks-drag-modal-body {
42
- flex: 1;
43
- min-height: 0;
44
- overflow-y: auto;
45
- padding: 24px 20px;
46
- }
47
- .jetlinks-drag-modal .jetlinks-drag-modal-sprite .jetlinks-drag-modal-footer {
48
- border-top: 1px solid #f0f0f0;
49
- padding: 5px 15px;
50
- text-align: right;
51
- }
52
- .jetlinks-drag-modal .jetlinks-drag-modal-range {
53
- position: absolute;
54
- width: 16px;
55
- height: 16px;
56
- border-radius: 100%;
57
- z-index: 23456765436;
58
- }
59
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-bottom-right:hover,
60
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-top-left:hover {
61
- cursor: nwse-resize;
62
- }
63
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-bottom-left:hover,
64
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-top-right:hover {
65
- cursor: nesw-resize;
66
- }
67
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-top-right {
68
- top: -6px;
69
- right: -6px;
70
- }
71
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-top-left {
72
- top: -6px;
73
- left: -6px;
74
- }
75
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-bottom-right {
76
- bottom: -6px;
77
- right: -6px;
78
- }
79
- .jetlinks-drag-modal .jetlinks-drag-modal-range .drag-bottom-left {
80
- bottom: -6px;
81
- left: -6px;
82
- }
@@ -1,97 +0,0 @@
1
- @import "ant-design-vue/es/style/themes/index.less";
2
- @boxColor: rgb(@primary-color);
3
-
4
- // 弹窗动画
5
- .dialog-enter-active,
6
- .dialog-leave-active {
7
- transition: opacity .5s;
8
- }
9
-
10
- .dialog-enter,
11
- .dialog-leave-to {
12
- opacity: 0;
13
- }
14
-
15
- .jetlinks-drag-modal {
16
- position: fixed;
17
- z-index: 1000;
18
-
19
- .jetlinks-drag-modal-sprite {
20
- position: absolute;
21
- width: 100%;
22
- height: 100%;
23
- display: flex;
24
- flex-direction: column;
25
- overflow: hidden;
26
- z-index: 23456765435;
27
- background-color: #ffffff;
28
- border-radius: 4px;
29
- border: 1px solid #91CAFF;
30
- box-shadow: 0 3px 8px 0 rgba(#1677FF, 0.24);
31
-
32
- .header {
33
- padding: 5px 15px;
34
- font-size: 18px;
35
- font-weight: 700;
36
- color: #333;
37
- display: flex;
38
- justify-content: space-between;
39
- align-items: center;
40
- border-bottom: 1px solid #f0f0f0;
41
- cursor: move;
42
- }
43
-
44
- .jetlinks-drag-modal-body {
45
- flex: 1;
46
- min-height: 0;
47
- overflow-y: auto;
48
- padding: 24px 20px;
49
- }
50
-
51
- .jetlinks-drag-modal-footer {
52
- border-top: 1px solid #f0f0f0;
53
- padding: 5px 15px;
54
- text-align: right;
55
- }
56
- }
57
-
58
- .jetlinks-drag-modal-range {
59
- position: absolute;
60
- width: 16px;
61
- height: 16px;
62
- border-radius: 100%;
63
- z-index: 23456765436;
64
-
65
- .drag-bottom-right, .drag-top-left {
66
- &:hover {
67
- cursor: nwse-resize
68
- }
69
- }
70
-
71
- .drag-bottom-left, .drag-top-right {
72
- &:hover {
73
- cursor: nesw-resize
74
- }
75
- }
76
-
77
- .drag-top-right {
78
- top: -6px;
79
- right: -6px;
80
- }
81
-
82
- .drag-top-left {
83
- top: -6px;
84
- left: -6px;
85
- }
86
-
87
- .drag-bottom-right {
88
- bottom: -6px;
89
- right: -6px;
90
- }
91
-
92
- .drag-bottom-left {
93
- bottom: -6px;
94
- left: -6px;
95
- }
96
- }
97
- }