@jetlinks-web/components 2.4.25 → 2.5.0

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 (65) hide show
  1. package/es/EditTable/Body.js +91 -181
  2. package/es/EditTable/EditTable.js +178 -105
  3. package/es/EditTable/FormItem.js +3 -4
  4. package/es/EditTable/Header.js +56 -164
  5. package/es/EditTable/components/ContextMenu/Menu.js +11 -7
  6. package/es/EditTable/components/Search/index.js +2 -1
  7. package/es/EditTable/components/Search/{Search.js → search.js} +94 -66
  8. package/es/EditTable/components/Search/sort.js +214 -0
  9. package/es/EditTable/consts.js +6 -1
  10. package/es/EditTable/context.js +50 -0
  11. package/es/EditTable/group.js +355 -0
  12. package/es/EditTable/hooks/index.js +1 -0
  13. package/es/EditTable/hooks/useGroup.js +44 -0
  14. package/es/EditTable/props.js +14 -4
  15. package/es/EditTable/style/body.less +17 -27
  16. package/es/EditTable/style/form.less +33 -0
  17. package/es/EditTable/style/group.less +32 -0
  18. package/es/EditTable/style/header.less +16 -21
  19. package/es/EditTable/style/index.css +103 -66
  20. package/es/EditTable/style/index.less +3 -0
  21. package/es/EditTable/style/menu.less +25 -0
  22. package/es/EditTable/style/table.less +2 -11
  23. package/es/EditTable/utils.js +22 -50
  24. package/es/FullPage/FullPage.js +1 -1
  25. package/es/PermissionButton/index.js +40 -20
  26. package/es/RadioButton/RadioButton.js +1 -1
  27. package/es/Search/Advanced/SaveHistory.js +1 -1
  28. package/es/Search/Item.js +1 -1
  29. package/es/Search/Search.js +1 -1
  30. package/es/locale/en-US.js +39 -3
  31. package/es/locale/zh-CN.js +36 -0
  32. package/es/style/index.css +103 -66
  33. package/lib/EditTable/Body.js +91 -181
  34. package/lib/EditTable/EditTable.js +178 -105
  35. package/lib/EditTable/FormItem.js +3 -4
  36. package/lib/EditTable/Header.js +56 -164
  37. package/lib/EditTable/components/ContextMenu/Menu.js +11 -7
  38. package/lib/EditTable/components/Search/index.js +10 -3
  39. package/lib/EditTable/components/Search/{Search.js → search.js} +94 -66
  40. package/lib/EditTable/components/Search/sort.js +214 -0
  41. package/lib/EditTable/consts.js +7 -2
  42. package/lib/EditTable/context.js +56 -0
  43. package/lib/EditTable/group.js +355 -0
  44. package/lib/EditTable/hooks/index.js +12 -0
  45. package/lib/EditTable/hooks/useGroup.js +50 -0
  46. package/lib/EditTable/props.js +14 -4
  47. package/lib/EditTable/style/body.less +17 -27
  48. package/lib/EditTable/style/form.less +33 -0
  49. package/lib/EditTable/style/group.less +32 -0
  50. package/lib/EditTable/style/header.less +16 -21
  51. package/lib/EditTable/style/index.css +103 -66
  52. package/lib/EditTable/style/index.less +3 -0
  53. package/lib/EditTable/style/menu.less +25 -0
  54. package/lib/EditTable/style/table.less +2 -11
  55. package/lib/EditTable/utils.js +23 -51
  56. package/lib/FullPage/FullPage.js +1 -1
  57. package/lib/PermissionButton/index.js +40 -20
  58. package/lib/RadioButton/RadioButton.js +1 -1
  59. package/lib/Search/Advanced/SaveHistory.js +1 -1
  60. package/lib/Search/Item.js +1 -1
  61. package/lib/Search/Search.js +1 -1
  62. package/lib/locale/en-US.js +39 -3
  63. package/lib/locale/zh-CN.js +36 -0
  64. package/lib/style/index.css +103 -66
  65. package/package.json +2 -2
@@ -15,19 +15,12 @@
15
15
  flex-direction: column;
16
16
  flex-grow: 0;
17
17
  flex-shrink: 0;
18
+ background: #fafafa;
19
+ transition: background-color 0.3s ease;
18
20
  }
19
21
  .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header {
20
22
  overflow: hidden;
21
23
  width: 100%;
22
- position: relative;
23
- }
24
- .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header .jetlinks-edit-table-header-scroll-hidden {
25
- position: absolute;
26
- top: 0;
27
- right: 0;
28
- bottom: 0;
29
- z-index: 5;
30
- background: #fafafa;
31
24
  }
32
25
  .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-body {
33
26
  background-color: #fff;
@@ -52,62 +45,43 @@
52
45
  z-index: -1;
53
46
  }
54
47
  .jetlinks-edit-table-body-viewport .jetlinks-edit-table-body-container {
55
- display: flex;
48
+ overflow: hidden;
49
+ height: 100%;
56
50
  }
57
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center,
58
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left,
59
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right {
51
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center {
60
52
  position: relative;
53
+ flex: 1 1 auto;
61
54
  min-width: 0;
62
55
  height: 100%;
63
- z-index: 5;
64
- flex-shrink: 0;
65
- flex-grow: 0;
66
56
  }
67
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row,
68
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left .jetlinks-edit-table-row,
69
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right .jetlinks-edit-table-row {
57
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row {
70
58
  width: 100%;
71
59
  display: flex;
72
60
  align-items: center;
73
61
  transition: top 0.2s, height 0.2s, background-color 0.1s;
74
62
  border-bottom: 1px solid #ebebeb;
75
- background-color: #fff;
76
63
  }
77
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row.jetlinks-edit-table-row-hover,
78
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left .jetlinks-edit-table-row.jetlinks-edit-table-row-hover,
79
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right .jetlinks-edit-table-row.jetlinks-edit-table-row-hover {
64
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .jetlinks-edit-table-cell {
65
+ position: absolute;
66
+ min-width: 0;
67
+ }
68
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row:hover {
80
69
  background-color: #f8f8f8;
81
70
  }
82
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row.jetlinks-edit-table-row-selected,
83
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left .jetlinks-edit-table-row.jetlinks-edit-table-row-selected,
84
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right .jetlinks-edit-table-row.jetlinks-edit-table-row-selected {
71
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row.jetlinks-edit-table-row-selected {
85
72
  background-color: var(--ant-primary-1);
86
73
  }
87
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .jetlinks-edit-table-cell,
88
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left .jetlinks-edit-table-row .jetlinks-edit-table-cell,
89
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right .jetlinks-edit-table-row .jetlinks-edit-table-cell {
90
- min-width: 0;
91
- }
92
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .body-cell-box,
93
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left .jetlinks-edit-table-row .body-cell-box,
94
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right .jetlinks-edit-table-row .body-cell-box {
74
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .body-cell-box {
95
75
  padding: 0 12px;
96
76
  position: relative;
97
77
  }
98
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-left {
99
- position: sticky;
78
+ .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .readonly-mask {
79
+ position: absolute;
80
+ top: 0;
100
81
  left: 0;
101
- }
102
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-right {
103
- position: sticky;
104
82
  right: 0;
105
- }
106
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center {
107
- z-index: 1;
108
- }
109
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center > div {
110
- position: relative;
83
+ bottom: 0;
84
+ z-index: 4;
111
85
  }
112
86
  .jetlinks-edit-table-body-empty {
113
87
  display: flex;
@@ -118,25 +92,6 @@
118
92
  .jetlinks-edit-table-header-container {
119
93
  height: 100%;
120
94
  position: relative;
121
- display: flex;
122
- width: 100%;
123
- }
124
- .jetlinks-edit-table-header-container .jetlinks-header-left,
125
- .jetlinks-edit-table-header-container .jetlinks-header-center,
126
- .jetlinks-edit-table-header-container .jetlinks-header-right {
127
- position: relative;
128
- z-index: 5;
129
- min-width: 0;
130
- height: 100%;
131
- width: 100%;
132
- background: #fafafa;
133
- }
134
- .jetlinks-edit-table-header-container .jetlinks-header-center {
135
- z-index: 2;
136
- }
137
- .jetlinks-edit-table-header-container .jetlinks-header-center > div {
138
- position: relative;
139
- height: 100%;
140
95
  }
141
96
  .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell {
142
97
  height: 100%;
@@ -144,12 +99,12 @@
144
99
  align-items: center;
145
100
  float: left;
146
101
  overflow: visible;
147
- background: #fafafa;
102
+ position: absolute;
103
+ top: 0;
148
104
  }
149
105
  .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box {
150
106
  padding: 0 12px;
151
107
  width: 100%;
152
- position: relative;
153
108
  }
154
109
  .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box.header-cell-box-tool {
155
110
  display: flex;
@@ -183,6 +138,88 @@
183
138
  .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box:not(:last-child)::before {
184
139
  background-color: transparent;
185
140
  }
141
+ .jetlinks-table-search .jetlinks-table-search-header {
142
+ display: flex;
143
+ justify-content: space-between;
144
+ }
145
+ .jetlinks-table-search .jetlinks-table-search-header .jetlinks-drag-modal-footer {
146
+ display: none;
147
+ }
148
+ .jetlinks-table-search .jetlinks-table-search-header .jetlinks-table-search-result-total {
149
+ color: #1890ff;
150
+ }
151
+ .jetlinks-table-group-warp .ant-tabs-nav {
152
+ margin-bottom: 0;
153
+ }
154
+ .jetlinks-table-group-warp .ant-tabs-nav .ant-tabs-tab {
155
+ overflow: hidden;
156
+ position: relative;
157
+ }
158
+ .jetlinks-table-group-warp .ant-tabs-nav .ant-tabs-tab-active {
159
+ background-color: #BAE0FF !important;
160
+ border-color: #91CAFF !important;
161
+ }
162
+ .jetlinks-table-group-warp .ant-tabs-nav .ant-tabs-nav-add {
163
+ border: none;
164
+ }
165
+ .jetlinks-table-group-error-warp {
166
+ color: #1a1a1a !important;
167
+ }
168
+ .jetlinks-table-group-error-warp .table-group-error-target {
169
+ position: absolute;
170
+ right: 0;
171
+ top: 0;
172
+ border: 16px solid transparent;
173
+ border-top-color: #ff4d4f;
174
+ border-right-width: 0;
175
+ border-bottom-width: 0;
176
+ }
177
+ .jetlinks-table-form-error-target {
178
+ position: absolute;
179
+ right: 2px;
180
+ top: -9px;
181
+ border: 16px solid transparent;
182
+ border-top-color: #ff4d4f;
183
+ border-right-width: 0;
184
+ border-bottom-width: 0;
185
+ }
186
+ .jetlinks-edit-table-form-has-error .select-no-value .ant-select-selector {
187
+ border-color: #ff4d4f !important;
188
+ }
189
+ .jetlinks-edit-table-form-has-error .select-no-value .ant-select-selector:focus {
190
+ box-shadow: 0 0 0 2px var(--ant-error-color-outline) !important;
191
+ }
192
+ .jetlinks-edit-table-form-has-error > input {
193
+ border-color: #ff4d4f !important;
194
+ }
195
+ .jetlinks-edit-table-form-has-error > input:focus {
196
+ box-shadow: 0 0 0 2px var(--ant-error-color-outline) !important;
197
+ }
198
+ .jetlinks-edit-table-form-has-error .jetlinks-table-form-required-aicon {
199
+ color: #ff4d4f;
200
+ }
201
+ .jetlinks-edit-table-context-menu {
202
+ position: fixed;
203
+ box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
204
+ border-radius: 4px;
205
+ overflow: hidden;
206
+ width: 192px;
207
+ padding: 4px;
208
+ background-color: #fff;
209
+ }
210
+ .jetlinks-edit-table-context-menu .ant-menu {
211
+ border-right: none;
212
+ }
213
+ .jetlinks-edit-table-context-menu .ant-menu .ant-menu-item {
214
+ margin: 0;
215
+ height: 32px;
216
+ }
217
+ .jetlinks-edit-table-context-menu .ant-menu .ant-menu-item.danger {
218
+ color: #ff4d4f;
219
+ }
220
+ .jetlinks-edit-table-context-menu .ant-menu-item-active {
221
+ background-color: var(--ant-primary-1);
222
+ }
186
223
  .edit-table-search-header {
187
224
  display: flex;
188
225
  justify-content: space-between;
@@ -2,6 +2,9 @@
2
2
  @import "./table.less";
3
3
  @import "./body.less";
4
4
  @import "./header.less";
5
+ @import "./group.less";
6
+ @import "./form.less";
7
+ @import "./menu.less";
5
8
 
6
9
  .edit-table-search-header {
7
10
  display: flex;
@@ -0,0 +1,25 @@
1
+ .jetlinks-edit-table-context-menu{
2
+ position: fixed;
3
+ box-shadow: 0 0 12px rgba(0, 0, 0 ,.2);
4
+ border-radius: 4px;
5
+ overflow: hidden;
6
+ width: 192px;
7
+ padding: 4px;
8
+ background-color: #fff;
9
+ .ant-menu {
10
+ border-right: none;
11
+
12
+ .ant-menu-item {
13
+ margin: 0;
14
+ height: 32px;
15
+
16
+ &.danger {
17
+ color: @error-color;
18
+ }
19
+ }
20
+ }
21
+
22
+ .ant-menu-item-active {
23
+ background-color: var(--ant-primary-1);;
24
+ }
25
+ }
@@ -12,23 +12,14 @@
12
12
  flex-direction: column;
13
13
  flex-grow: 0;
14
14
  flex-shrink: 0;
15
+ background: #fafafa;
16
+ transition: background-color .3s ease;
15
17
 
16
18
  .jetlinks-edit-table-header {
17
19
  overflow: hidden;
18
20
  width: 100%;
19
- position: relative;
20
-
21
- .jetlinks-edit-table-header-scroll-hidden {
22
- position: absolute;
23
- top: 0;
24
- right: 0;
25
- bottom: 0;
26
- z-index: 5;
27
- background: #fafafa;
28
- }
29
21
  }
30
22
 
31
-
32
23
  .jetlinks-edit-table-body {
33
24
  background-color: #fff;
34
25
  overflow-y: hidden;
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.handlePureRecord = exports.handleColumnsWidth = exports.handleColumnFixed = exports.collectValidateRules = void 0;
7
+ exports.isFullScreen = exports.handlePureRecord = exports.handleColumnsWidth = exports.collectValidateRules = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _lodashEs = require("lodash");
10
10
  /**
@@ -22,21 +22,14 @@ var collectValidateRules = exports.collectValidateRules = function collectValida
22
22
  });
23
23
  return rules;
24
24
  };
25
- /**
26
- * 清除内部属性
27
- * @param record
28
- */
29
25
  var handlePureRecord = exports.handlePureRecord = function handlePureRecord(record) {
30
26
  if (!record) return {};
31
- return (0, _lodashEs.omit)(record, ['__serial', '__index', '__top', '__selected', '__key', '__dataIndex', '__oldSerial']);
27
+ // if (record.expands) {
28
+ // record.expands = omit(record.expands, ['isProduct'])
29
+ // }
30
+ return (0, _lodashEs.omit)(record, ['__serial', '__index', '__top', '__selected', '__key', '__dataIndex']);
32
31
  };
33
- /**
34
- * 计算每个column的宽度和位置
35
- * @param columns
36
- * @param warpWidth
37
- * @param scrollX
38
- */
39
- var handleColumnsWidth = exports.handleColumnsWidth = function handleColumnsWidth(columns, warpWidth, scrollX) {
32
+ var handleColumnsWidth = exports.handleColumnsWidth = function handleColumnsWidth(columns, warpWidth) {
40
33
  var newColumns = (0, _toConsumableArray2.default)(columns);
41
34
  var noWidthLen = 0; // 没有width属性的长度
42
35
  var hasWidthCount = 0; // 有width属性的合计
@@ -44,61 +37,40 @@ var handleColumnsWidth = exports.handleColumnsWidth = function handleColumnsWidt
44
37
  var parseAverage = 0; // 取整宽度
45
38
  var decimalCount = 0; // 收集每个取整后的小数
46
39
  var lastNoWidthIndex = undefined; // 最后一个没有width属性的位置
47
- newColumns.forEach(function (item, index) {
40
+ newColumns.forEach(function (item) {
48
41
  if (item.width) {
49
- // 是否有设置width属性
50
42
  hasWidthCount += item.width;
51
43
  } else {
52
44
  noWidthLen += 1;
53
- lastNoWidthIndex = index;
54
45
  }
55
46
  });
56
47
  if (noWidthLen) {
57
- average = ((scrollX !== null && scrollX !== void 0 ? scrollX : warpWidth) - hasWidthCount) / noWidthLen; // 剩余平分分配宽度
58
- parseAverage = scrollX ? 150 : Math.trunc(average);
48
+ average = (warpWidth - hasWidthCount) / noWidthLen; // 剩余平分分配宽度
49
+ parseAverage = Math.trunc(average);
59
50
  decimalCount = (average - parseAverage) * noWidthLen;
60
51
  }
52
+ newColumns.forEach(function (item, index) {
53
+ if (!item.width) {
54
+ lastNoWidthIndex = index;
55
+ }
56
+ });
61
57
  return newColumns.map(function (item, index) {
62
58
  var _width = item.width;
59
+ var left = 0;
63
60
  if (!item.width) {
64
61
  _width = parseAverage;
65
62
  }
66
63
  if (index === lastNoWidthIndex) {
67
- _width = decimalCount < 0 ? parseAverage : Math.trunc(decimalCount) + parseAverage;
64
+ _width = Math.trunc(decimalCount) + parseAverage;
65
+ }
66
+ if (index !== 0) {
67
+ left = newColumns[index - 1].width + newColumns[index - 1].left;
68
68
  }
69
- item._width = _width;
70
- // item.left = left
69
+ item.width = _width;
70
+ item.left = left;
71
71
  return item;
72
72
  }, []);
73
73
  };
74
- var handleColumnFixed = exports.handleColumnFixed = function handleColumnFixed(columns) {
75
- var left = {
76
- keys: [],
77
- width: 0
78
- };
79
- var center = {
80
- keys: [],
81
- width: 0
82
- };
83
- var right = {
84
- keys: [],
85
- width: 0
86
- };
87
- columns.forEach(function (item) {
88
- if (item.fixed === 'left') {
89
- left.keys.push(item);
90
- left.width += item._width;
91
- } else if (item.fixed === 'right') {
92
- right.keys.push(item);
93
- right.width += item._width;
94
- } else {
95
- center.keys.push(item);
96
- center.width += item._width;
97
- }
98
- });
99
- return {
100
- left: left,
101
- center: center,
102
- right: right
103
- };
74
+ var isFullScreen = exports.isFullScreen = function isFullScreen() {
75
+ return !!(document.fullscreen || document.mozFullScreen || document.webkitIsFullScreen || document.webkitFullScreen || document.msFullScreen);
104
76
  };
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
- const _withScopeId = n => (_pushScopeId("data-v-1741691310352"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1742373120767"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.destroyFns = exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
9
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
12
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
13
  var _vue = require("vue");
@@ -17,6 +19,7 @@ var _hooks = require("@jetlinks-web/hooks");
17
19
  var _confirm = _interopRequireDefault(require("./confirm"));
18
20
  var _constants = require("../utils/constants");
19
21
  var _excluded = ["popConfirm", "tooltip", "hasPermission", "noPermissionTitle"];
22
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
20
23
  var definedProps = (0, _objectSpread2.default)({
21
24
  tooltip: {
22
25
  type: Object
@@ -33,6 +36,9 @@ var definedProps = (0, _objectSpread2.default)({
33
36
  },
34
37
  noPermissionTitle: {
35
38
  type: String
39
+ },
40
+ popConfirmBefore: {
41
+ type: Function
36
42
  }
37
43
  }, (0, _lodashEs.omit)((0, _button.buttonProps)(), 'icon'));
38
44
  var destroyFns = exports.destroyFns = [];
@@ -71,26 +77,40 @@ var PermissionButton = (0, _vue.defineComponent)({
71
77
  noPermissionTitle = props.noPermissionTitle,
72
78
  buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
73
79
  if (popConfirm) {
74
- buttonProps.onClick = function () {
75
- if (context.components) {
76
- (0, _confirm.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, popConfirm), {}, {
77
- danger: buttonProps.danger
78
- }), context.components);
79
- } else {
80
- _antDesignVue.Modal.confirm({
81
- title: popConfirm.title,
82
- content: popConfirm.content,
83
- onOk: function onOk() {
84
- var _popConfirm$onConfirm;
85
- return (_popConfirm$onConfirm = popConfirm.onConfirm) === null || _popConfirm$onConfirm === void 0 ? void 0 : _popConfirm$onConfirm.call(popConfirm);
86
- },
87
- onCancel: function onCancel() {
88
- var _popConfirm$onCancel;
89
- (_popConfirm$onCancel = popConfirm.onCancel) === null || _popConfirm$onCancel === void 0 ? void 0 : _popConfirm$onCancel.call(popConfirm);
90
- }
91
- });
92
- }
93
- };
80
+ buttonProps.onClick = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
81
+ var _props$popConfirmBefo;
82
+ var _popConfirm;
83
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
84
+ while (1) switch (_context.prev = _context.next) {
85
+ case 0:
86
+ _context.next = 2;
87
+ return ((_props$popConfirmBefo = props.popConfirmBefore) === null || _props$popConfirmBefo === void 0 ? void 0 : _props$popConfirmBefo.call(props)) || popConfirm;
88
+ case 2:
89
+ _popConfirm = _context.sent;
90
+ if (context.components) {
91
+ (0, _confirm.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _popConfirm), {}, {
92
+ danger: buttonProps.danger
93
+ }), context.components);
94
+ } else {
95
+ _antDesignVue.Modal.confirm({
96
+ title: _popConfirm.title,
97
+ content: _popConfirm.content,
98
+ onOk: function onOk() {
99
+ var _popConfirm$onConfirm;
100
+ return (_popConfirm$onConfirm = _popConfirm.onConfirm) === null || _popConfirm$onConfirm === void 0 ? void 0 : _popConfirm$onConfirm.call(_popConfirm);
101
+ },
102
+ onCancel: function onCancel() {
103
+ var _popConfirm$onCancel;
104
+ (_popConfirm$onCancel = _popConfirm.onCancel) === null || _popConfirm$onCancel === void 0 ? void 0 : _popConfirm$onCancel.call(_popConfirm);
105
+ }
106
+ });
107
+ }
108
+ case 4:
109
+ case "end":
110
+ return _context.stop();
111
+ }
112
+ }, _callee);
113
+ }));
94
114
  }
95
115
  var button = !slots.button ? (0, _vue.h)(_antDesignVue.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, buttonProps), {}, {
96
116
  disabled: isPermission.value
@@ -10,7 +10,7 @@
10
10
  "onClick": "setup-const"
11
11
  } */
12
12
  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, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
13
- const _withScopeId = n => (_pushScopeId("data-v-1741691311826"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1742373122248"), n = n(), _popScopeId(), n);
14
14
  const _hoisted_1 = ["onClick"];
15
15
  const __sfc_main__ = Object.assign({
16
16
  name: 'JRadioButton',
@@ -23,7 +23,7 @@
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
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-1741691312483"), n = n(), _popScopeId(), n);
26
+ const _withScopeId = n => (_pushScopeId("data-v-1742373122830"), n = n(), _popScopeId(), n);
27
27
  const _hoisted_1 = {
28
28
  key: 0,
29
29
  style: { "width": "240px" }
@@ -80,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
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-1741691311856"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1742373122023"), n = n(), _popScopeId(), n);
84
84
  const _hoisted_1 = { class: "JSearch-item" };
85
85
  const _hoisted_2 = {
86
86
  key: 0,
@@ -45,7 +45,7 @@
45
45
  } */
46
46
  import { defineComponent as _defineComponent } from 'vue';
47
47
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
48
- const _withScopeId = n => (_pushScopeId("data-v-1741691311995"), n = n(), _popScopeId(), n);
48
+ const _withScopeId = n => (_pushScopeId("data-v-1742373122166"), n = n(), _popScopeId(), n);
49
49
  const _hoisted_1 = { class: "JSearch-content simple" };
50
50
  const _hoisted_2 = { class: "JSearch-items" };
51
51
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -68,12 +68,48 @@ var _default = exports.default = {
68
68
  description: 'Please configure the Amap key for Gaode'
69
69
  },
70
70
  EditTable: {
71
+ serial: 'Serial',
72
+ columns: {
73
+ sign: 'Sign',
74
+ name: 'Name',
75
+ count: 'count'
76
+ },
71
77
  contextMenu: {
72
- add: 'Add new row',
73
- copy: 'Copy row',
74
- paste: 'Paste row',
78
+ add: 'Add',
79
+ copy: 'Copy',
80
+ paste: 'Paste',
75
81
  detail: 'View details',
76
82
  delete: 'Delete'
83
+ },
84
+ Search: {
85
+ find: 'Find',
86
+ placeholder: 'Please enter the search content',
87
+ all: 'Find all',
88
+ prev: 'Previous',
89
+ next: 'Next',
90
+ close: 'Close',
91
+ rows: 'Rows',
92
+ row: 'Line',
93
+ rd: '',
94
+ found: 'Found',
95
+ related: 'Related'
96
+ },
97
+ Sort: {
98
+ sort: 'Sort',
99
+ clean: 'Clear conditions',
100
+ up: 'Ascending order',
101
+ down: 'Descending order'
102
+ },
103
+ Group: {
104
+ one: 'Grouping_',
105
+ edit: 'Edit',
106
+ delete: 'Delete',
107
+ validate: 'Verify non-compliance',
108
+ editGroup: 'Edit Group',
109
+ addGroup: 'Add Group',
110
+ placeholder: 'Please enter the group name',
111
+ max: 'Up to 16 characters can be entered',
112
+ deleteMessage: 'Will the data within the group be synchronously deleted? Are you sure about deletion?'
77
113
  }
78
114
  },
79
115
  ValueItem: {