eoss 0.1.0-alpha.43 → 0.1.0-alpha.44
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.
- package/lib/eoss.common.js +117 -76
- package/lib/form.js +11 -12
- package/lib/index.js +1 -1
- package/lib/radio-group.js +10 -6
- package/lib/radio.js +5 -3
- package/lib/selector-panel.js +10 -6
- package/lib/table.js +72 -34
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/upload.js +3 -3
- package/package.json +1 -4
- package/packages/form/src/form-item-render.vue +0 -1
- package/packages/form/src/form.vue +1 -1
- package/packages/radio/src/radio-group.vue +1 -1
- package/packages/radio/src/radio.vue +1 -1
- package/packages/table/src/store/index.js +257 -71
- package/packages/theme-chalk/src/cascader.scss +16 -1
- package/packages/theme-chalk/src/form.scss +3 -0
- package/packages/upload/src/index.vue +1 -1
- package/src/index.js +1 -1
package/lib/upload.js
CHANGED
|
@@ -4775,7 +4775,7 @@ module.exports = require("lodash");
|
|
|
4775
4775
|
// ESM COMPAT FLAG
|
|
4776
4776
|
__webpack_require__.r(__webpack_exports__);
|
|
4777
4777
|
|
|
4778
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/index.vue?vue&type=template&id=
|
|
4778
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/index.vue?vue&type=template&id=344437a6&
|
|
4779
4779
|
var render = function () {
|
|
4780
4780
|
var _obj
|
|
4781
4781
|
var _vm = this
|
|
@@ -5008,7 +5008,7 @@ var staticRenderFns = []
|
|
|
5008
5008
|
render._withStripped = true
|
|
5009
5009
|
|
|
5010
5010
|
|
|
5011
|
-
// CONCATENATED MODULE: ./packages/upload/src/index.vue?vue&type=template&id=
|
|
5011
|
+
// CONCATENATED MODULE: ./packages/upload/src/index.vue?vue&type=template&id=344437a6&
|
|
5012
5012
|
|
|
5013
5013
|
// EXTERNAL MODULE: external "lodash"
|
|
5014
5014
|
var external_lodash_ = __webpack_require__(191);
|
|
@@ -8136,7 +8136,7 @@ function noop() {}
|
|
|
8136
8136
|
return this.action;
|
|
8137
8137
|
}
|
|
8138
8138
|
var url = this.avatar || this.documentId ? this.dochubConfig.reuploadDocumentUrl || api["nd" /* uploadOnlyOne */] : this.dochubConfig.uploadDocumentUrl || api["od" /* uploads */];
|
|
8139
|
-
return
|
|
8139
|
+
return url;
|
|
8140
8140
|
},
|
|
8141
8141
|
|
|
8142
8142
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eoss",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.44",
|
|
4
4
|
"description": "eoss内部业务组件",
|
|
5
5
|
"main": "lib/eoss.common.js",
|
|
6
6
|
"files": [
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
"packages",
|
|
10
10
|
"types"
|
|
11
11
|
],
|
|
12
|
-
"resolutions": {
|
|
13
|
-
"node-releases": "2.0.14"
|
|
14
|
-
},
|
|
15
12
|
"scripts": {
|
|
16
13
|
"bootstrap": "yarn || npm i",
|
|
17
14
|
"build:file": "node build/bin/iconInit.js & node build/bin/build-entry.js",
|
|
@@ -7,7 +7,14 @@ import Watcher from './watcher';
|
|
|
7
7
|
import { cellStarts } from '../config';
|
|
8
8
|
import { arrayFind } from 'eoss/src/utils/util';
|
|
9
9
|
import { getSysCodeList } from 'eoss/src/utils/ajax';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
compose,
|
|
12
|
+
setColumnWidth,
|
|
13
|
+
setColumnForcedProps,
|
|
14
|
+
setColumnRenders,
|
|
15
|
+
setupOverflowTooltip,
|
|
16
|
+
renderDom
|
|
17
|
+
} from '../util';
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* 扩展 Watcher 原型的 mutations 对象,包含各种状态变更方法
|
|
@@ -55,40 +62,111 @@ Watcher.prototype.mutations = {
|
|
|
55
62
|
const sysCodes = states.sysCodes || {};
|
|
56
63
|
// 创建列配置的函数
|
|
57
64
|
const createColumns = (items) => {
|
|
58
|
-
return items.map(item => {
|
|
59
|
-
const {
|
|
65
|
+
return items.map((item) => {
|
|
66
|
+
const {
|
|
67
|
+
type,
|
|
68
|
+
events = {},
|
|
69
|
+
rules,
|
|
70
|
+
optionData,
|
|
71
|
+
labelKey,
|
|
72
|
+
valueKey,
|
|
73
|
+
sysCode,
|
|
74
|
+
config = {},
|
|
75
|
+
inline,
|
|
76
|
+
render,
|
|
77
|
+
children,
|
|
78
|
+
separator = ',',
|
|
79
|
+
prop,
|
|
80
|
+
field,
|
|
81
|
+
label,
|
|
82
|
+
title,
|
|
83
|
+
formatter,
|
|
84
|
+
...configs
|
|
85
|
+
} = item;
|
|
60
86
|
const _field = field || prop;
|
|
61
87
|
const _label = label || title;
|
|
62
88
|
const _labelKey = labelKey || (sysCode ? 'shortName' : 'name');
|
|
63
89
|
const _valueKey = valueKey || (sysCode ? 'cciValue' : 'value');
|
|
90
|
+
// 归一化列配置:兼容文档中的 kebab-case 写法(如 min-width / show-overflow-tooltip)
|
|
91
|
+
const normalized = {};
|
|
92
|
+
Object.keys(configs).forEach((key) => {
|
|
93
|
+
normalized[key.replace(/-([a-z])/g, (m, c) => c.toUpperCase())] =
|
|
94
|
+
configs[key];
|
|
95
|
+
});
|
|
96
|
+
// align / headerAlign 转为 is-* 类名,与模板列(table-column realAlign)保持一致
|
|
97
|
+
normalized.align = normalized.align ? 'is-' + normalized.align : null;
|
|
98
|
+
normalized.headerAlign = normalized.headerAlign
|
|
99
|
+
? 'is-' + normalized.headerAlign
|
|
100
|
+
: normalized.align;
|
|
101
|
+
// sortable 传空字符串视为 true,与模板列一致
|
|
102
|
+
if (normalized.sortable === '') {
|
|
103
|
+
normalized.sortable = true;
|
|
104
|
+
}
|
|
105
|
+
// 传入筛选项或筛选方法时自动开启该列筛选
|
|
106
|
+
if (normalized.filters || normalized.filterMethod) {
|
|
107
|
+
normalized.filterable = true;
|
|
108
|
+
}
|
|
64
109
|
if (sysCode && !sysCodes[sysCode]) {
|
|
65
|
-
getSysCodeList({ sysCode })
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
110
|
+
getSysCodeList({ sysCode })
|
|
111
|
+
.then((res) => {
|
|
112
|
+
// 使用Vue.set确保响应式更新
|
|
113
|
+
Vue.set(sysCodes, sysCode, res);
|
|
114
|
+
})
|
|
115
|
+
.catch(() => {});
|
|
116
|
+
}
|
|
117
|
+
// 特殊类型列不设置默认 renderHeader,交由 setColumnRenders 应用 cellForced 的强制渲染(如 selection 复选框)
|
|
118
|
+
const columnId =
|
|
119
|
+
'es-table_1_column_' + Math.floor(Math.random() * 10000);
|
|
120
|
+
let column = null;
|
|
121
|
+
if (type === 'selection' || type === 'index' || type === 'expand') {
|
|
122
|
+
column = {
|
|
123
|
+
id: columnId,
|
|
124
|
+
type: type,
|
|
125
|
+
label: _label,
|
|
126
|
+
prop: _field,
|
|
127
|
+
property: _field,
|
|
128
|
+
...cellStarts[type],
|
|
129
|
+
...normalized,
|
|
130
|
+
...config
|
|
131
|
+
};
|
|
132
|
+
} else {
|
|
133
|
+
column = {
|
|
134
|
+
id: columnId,
|
|
135
|
+
label: _label,
|
|
136
|
+
prop: _field,
|
|
137
|
+
property: _field,
|
|
138
|
+
formatter,
|
|
139
|
+
...normalized
|
|
140
|
+
};
|
|
70
141
|
}
|
|
71
|
-
const column = type === 'selection' || type === 'index' || type === 'expand' ? {
|
|
72
|
-
id: 'es-table_1_column_' + Math.floor(Math.random() * 10000),
|
|
73
|
-
type: type,
|
|
74
|
-
label: _label,
|
|
75
|
-
...cellStarts[type],
|
|
76
|
-
...config,
|
|
77
|
-
renderHeader: (h, { column }) => {
|
|
78
|
-
return h('span', column.label);
|
|
79
|
-
}
|
|
80
|
-
} : {
|
|
81
|
-
id: 'es-table_1_column_' + Math.floor(Math.random() * 10000),
|
|
82
|
-
label: _label,
|
|
83
|
-
prop: _field,
|
|
84
|
-
...configs,
|
|
85
|
-
renderHeader: (h, { column }) => {
|
|
86
|
-
return h('span', column.label);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
142
|
let childrens = null;
|
|
90
143
|
// 处理特殊类型列的渲染
|
|
91
|
-
if (
|
|
144
|
+
if (
|
|
145
|
+
!readonly &&
|
|
146
|
+
[
|
|
147
|
+
'input',
|
|
148
|
+
'textarea',
|
|
149
|
+
'radio',
|
|
150
|
+
'checkbox',
|
|
151
|
+
'inputNumber',
|
|
152
|
+
'select',
|
|
153
|
+
'cascader',
|
|
154
|
+
'switch',
|
|
155
|
+
'slider',
|
|
156
|
+
'year',
|
|
157
|
+
'month',
|
|
158
|
+
'date',
|
|
159
|
+
'week',
|
|
160
|
+
'datetime',
|
|
161
|
+
'datetimerange',
|
|
162
|
+
'daterange',
|
|
163
|
+
'quarter',
|
|
164
|
+
'halfyear',
|
|
165
|
+
'time',
|
|
166
|
+
'selector',
|
|
167
|
+
'button'
|
|
168
|
+
].includes(type)
|
|
169
|
+
) {
|
|
92
170
|
column.renderCell = function (h, data) {
|
|
93
171
|
let canEdit = data.row.canEdit;
|
|
94
172
|
let cantEditKey = data.row.cantEditKey;
|
|
@@ -100,25 +178,51 @@ Watcher.prototype.mutations = {
|
|
|
100
178
|
const props = { class: 'cell', style: {} };
|
|
101
179
|
let _cellContnet = data.row[data.column.prop];
|
|
102
180
|
// 直接从sysCodes中获取最新数据,确保响应式更新
|
|
103
|
-
const currentOptionData =
|
|
104
|
-
|
|
181
|
+
const currentOptionData =
|
|
182
|
+
optionData ||
|
|
183
|
+
config.optionData ||
|
|
184
|
+
(sysCode ? sysCodes[sysCode] : undefined);
|
|
185
|
+
if (formatter && typeof formatter === 'function') {
|
|
186
|
+
// formatter 优先于字典翻译展示
|
|
187
|
+
_cellContnet = formatter(
|
|
188
|
+
data.row,
|
|
189
|
+
data.column,
|
|
190
|
+
_cellContnet,
|
|
191
|
+
data.$index
|
|
192
|
+
);
|
|
193
|
+
} else if (currentOptionData) {
|
|
105
194
|
let cellValue = data.row[data.column.prop];
|
|
106
195
|
// 当multiple为true时,将值按指定分隔符拆成数组
|
|
107
196
|
if (config.multiple && typeof cellValue === 'string') {
|
|
108
197
|
cellValue = cellValue.split(separator).filter(Boolean);
|
|
109
198
|
}
|
|
110
199
|
if (Array.isArray(cellValue)) {
|
|
111
|
-
const matchedLabels = cellValue
|
|
112
|
-
(
|
|
113
|
-
|
|
200
|
+
const matchedLabels = cellValue
|
|
201
|
+
.map(
|
|
202
|
+
(v) =>
|
|
203
|
+
(arrayFind(
|
|
204
|
+
currentOptionData,
|
|
205
|
+
(item) => item[_valueKey] === v
|
|
206
|
+
) || {})[_labelKey]
|
|
207
|
+
)
|
|
208
|
+
.filter(Boolean);
|
|
114
209
|
_cellContnet = matchedLabels || _cellContnet;
|
|
115
210
|
} else {
|
|
116
|
-
const matchedItem = arrayFind(
|
|
117
|
-
|
|
211
|
+
const matchedItem = arrayFind(
|
|
212
|
+
currentOptionData,
|
|
213
|
+
(item) => item[_valueKey] === cellValue
|
|
214
|
+
);
|
|
215
|
+
_cellContnet = matchedItem
|
|
216
|
+
? matchedItem[_labelKey]
|
|
217
|
+
: _cellContnet;
|
|
118
218
|
}
|
|
119
219
|
}
|
|
120
220
|
if (_cellContnet && Array.isArray(_cellContnet)) {
|
|
121
|
-
_cellContnet = _cellContnet
|
|
221
|
+
_cellContnet = _cellContnet
|
|
222
|
+
.map((item) =>
|
|
223
|
+
typeof item === 'string' ? item : item[_labelKey]
|
|
224
|
+
)
|
|
225
|
+
.join(separator);
|
|
122
226
|
}
|
|
123
227
|
// 处理溢出提示
|
|
124
228
|
if (data.column.showOverflowTooltip) {
|
|
@@ -139,26 +243,35 @@ Watcher.prototype.mutations = {
|
|
|
139
243
|
let _events = {};
|
|
140
244
|
if (inline) {
|
|
141
245
|
if (Array.isArray(inline)) {
|
|
142
|
-
children = inline.map(ele => {
|
|
246
|
+
children = inline.map((ele) => {
|
|
143
247
|
_events = {
|
|
144
248
|
change: (val, index) => {
|
|
145
249
|
index = index === undefined ? data.$index : index;
|
|
146
|
-
ele.events &&
|
|
250
|
+
ele.events &&
|
|
251
|
+
ele.events.change &&
|
|
252
|
+
ele.events.change(val, index);
|
|
147
253
|
this.$emit('change', val, index);
|
|
148
254
|
},
|
|
149
255
|
blur: (e, index, val) => {
|
|
150
256
|
index = index === undefined ? data.$index : index;
|
|
151
|
-
ele.events &&
|
|
257
|
+
ele.events &&
|
|
258
|
+
ele.events.blur &&
|
|
259
|
+
ele.events.blur(e, index, val);
|
|
152
260
|
this.$emit('blur', e, val, index);
|
|
153
261
|
},
|
|
154
262
|
focus: (e, index, val) => {
|
|
155
263
|
index = index === undefined ? data.$index : index;
|
|
156
|
-
ele.events &&
|
|
264
|
+
ele.events &&
|
|
265
|
+
ele.events.focus &&
|
|
266
|
+
ele.events.focus(e, index, val);
|
|
157
267
|
this.$emit('focus', e, val, index);
|
|
158
268
|
}
|
|
159
269
|
};
|
|
160
270
|
// 直接从sysCodes中获取最新数据,确保响应式更新
|
|
161
|
-
const currentInlineOptionData =
|
|
271
|
+
const currentInlineOptionData =
|
|
272
|
+
ele.optionData ||
|
|
273
|
+
ele.config.optionData ||
|
|
274
|
+
(ele.sysCode ? sysCodes[ele.sysCode] : undefined);
|
|
162
275
|
return renderDom(h, {
|
|
163
276
|
type: ele.type,
|
|
164
277
|
data: data,
|
|
@@ -173,31 +286,42 @@ Watcher.prototype.mutations = {
|
|
|
173
286
|
_events = {
|
|
174
287
|
change: (val, index) => {
|
|
175
288
|
index = index === undefined ? data.$index : index;
|
|
176
|
-
inline.events &&
|
|
289
|
+
inline.events &&
|
|
290
|
+
inline.events.change &&
|
|
291
|
+
inline.events.change(val, index);
|
|
177
292
|
this.$emit('change', val, index);
|
|
178
293
|
},
|
|
179
294
|
blur: (e, index, val) => {
|
|
180
295
|
index = index === undefined ? data.$index : index;
|
|
181
|
-
inline.events &&
|
|
296
|
+
inline.events &&
|
|
297
|
+
inline.events.blur &&
|
|
298
|
+
inline.events.blur(e, index, val);
|
|
182
299
|
this.$emit('blur', e, val, index);
|
|
183
300
|
},
|
|
184
301
|
focus: (e, index, val) => {
|
|
185
302
|
index = index === undefined ? data.$index : index;
|
|
186
|
-
inline.events &&
|
|
303
|
+
inline.events &&
|
|
304
|
+
inline.events.focus &&
|
|
305
|
+
inline.events.focus(e, index, val);
|
|
187
306
|
this.$emit('focus', e, val, index);
|
|
188
307
|
}
|
|
189
308
|
};
|
|
190
309
|
// 直接从sysCodes中获取最新数据,确保响应式更新
|
|
191
|
-
const currentInlineOptionData =
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
310
|
+
const currentInlineOptionData =
|
|
311
|
+
inline.optionData ||
|
|
312
|
+
inline.config.optionData ||
|
|
313
|
+
(inline.sysCode ? sysCodes[inline.sysCode] : undefined);
|
|
314
|
+
children = [
|
|
315
|
+
renderDom(h, {
|
|
316
|
+
type: inline.type,
|
|
317
|
+
data: data,
|
|
318
|
+
optionData: currentInlineOptionData,
|
|
319
|
+
events: _events,
|
|
320
|
+
config: inline.config,
|
|
321
|
+
prop: inline.field,
|
|
322
|
+
index: data.$index
|
|
323
|
+
})
|
|
324
|
+
];
|
|
201
325
|
}
|
|
202
326
|
}
|
|
203
327
|
|
|
@@ -221,8 +345,31 @@ Watcher.prototype.mutations = {
|
|
|
221
345
|
}
|
|
222
346
|
};
|
|
223
347
|
// 直接从sysCodes中获取最新数据,确保响应式更新
|
|
224
|
-
const currentOptionData =
|
|
225
|
-
|
|
348
|
+
const currentOptionData =
|
|
349
|
+
optionData ||
|
|
350
|
+
config.optionData ||
|
|
351
|
+
(sysCode ? sysCodes[sysCode] : undefined);
|
|
352
|
+
return h(
|
|
353
|
+
'es-form-item',
|
|
354
|
+
{
|
|
355
|
+
props: {
|
|
356
|
+
rules,
|
|
357
|
+
size: 'medium',
|
|
358
|
+
prop: field,
|
|
359
|
+
index: data.$index
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
[
|
|
363
|
+
renderDom(h, {
|
|
364
|
+
type,
|
|
365
|
+
data,
|
|
366
|
+
optionData: currentOptionData,
|
|
367
|
+
events: _events,
|
|
368
|
+
config
|
|
369
|
+
}),
|
|
370
|
+
...children
|
|
371
|
+
]
|
|
372
|
+
);
|
|
226
373
|
}
|
|
227
374
|
};
|
|
228
375
|
} else if (type === 'handle') {
|
|
@@ -232,6 +379,12 @@ Watcher.prototype.mutations = {
|
|
|
232
379
|
};
|
|
233
380
|
} else if (children) {
|
|
234
381
|
column.children = createColumns(children);
|
|
382
|
+
} else if (
|
|
383
|
+
type === 'selection' ||
|
|
384
|
+
type === 'index' ||
|
|
385
|
+
type === 'expand'
|
|
386
|
+
) {
|
|
387
|
+
// 特殊类型列不设置默认 renderCell,由 setColumnRenders 套用 cellForced 中的强制渲染函数
|
|
235
388
|
} else {
|
|
236
389
|
// 如果用户配置了render函数,则使用用户的render函数
|
|
237
390
|
if (render && typeof render === 'function') {
|
|
@@ -250,30 +403,55 @@ Watcher.prototype.mutations = {
|
|
|
250
403
|
} else {
|
|
251
404
|
// 默认的renderCell函数
|
|
252
405
|
column.renderCell = function (h, data) {
|
|
253
|
-
|
|
254
406
|
// 设置单元格属性,包括处理showOverflowTooltip
|
|
255
407
|
const props = { class: 'cell', style: {} };
|
|
256
408
|
let _cellContnet = data.row[data.column.prop];
|
|
257
409
|
// 直接从sysCodes中获取最新数据,确保响应式更新
|
|
258
|
-
const currentOptionData =
|
|
259
|
-
|
|
410
|
+
const currentOptionData =
|
|
411
|
+
optionData ||
|
|
412
|
+
config.optionData ||
|
|
413
|
+
(sysCode ? sysCodes[sysCode] : undefined);
|
|
414
|
+
if (formatter && typeof formatter === 'function') {
|
|
415
|
+
// formatter 优先于字典翻译展示
|
|
416
|
+
_cellContnet = formatter(
|
|
417
|
+
data.row,
|
|
418
|
+
data.column,
|
|
419
|
+
_cellContnet,
|
|
420
|
+
data.$index
|
|
421
|
+
);
|
|
422
|
+
} else if (currentOptionData) {
|
|
260
423
|
let cellValue = data.row[data.column.prop];
|
|
261
424
|
// 当multiple为true时,将值按指定分隔符拆成数组
|
|
262
425
|
if (config.multiple && typeof cellValue === 'string') {
|
|
263
426
|
cellValue = cellValue.split(separator).filter(Boolean);
|
|
264
427
|
}
|
|
265
428
|
if (Array.isArray(cellValue)) {
|
|
266
|
-
const matchedLabels = cellValue
|
|
267
|
-
(
|
|
268
|
-
|
|
429
|
+
const matchedLabels = cellValue
|
|
430
|
+
.map(
|
|
431
|
+
(v) =>
|
|
432
|
+
(arrayFind(
|
|
433
|
+
currentOptionData,
|
|
434
|
+
(item) => item[_valueKey] === v
|
|
435
|
+
) || {})[_labelKey]
|
|
436
|
+
)
|
|
437
|
+
.filter(Boolean);
|
|
269
438
|
_cellContnet = matchedLabels || _cellContnet;
|
|
270
439
|
} else {
|
|
271
|
-
const matchedItem = arrayFind(
|
|
272
|
-
|
|
440
|
+
const matchedItem = arrayFind(
|
|
441
|
+
currentOptionData,
|
|
442
|
+
(item) => item[_valueKey] === cellValue
|
|
443
|
+
);
|
|
444
|
+
_cellContnet = matchedItem
|
|
445
|
+
? matchedItem[_labelKey]
|
|
446
|
+
: _cellContnet;
|
|
273
447
|
}
|
|
274
448
|
}
|
|
275
449
|
if (_cellContnet && Array.isArray(_cellContnet)) {
|
|
276
|
-
_cellContnet = _cellContnet
|
|
450
|
+
_cellContnet = _cellContnet
|
|
451
|
+
.map((item) =>
|
|
452
|
+
typeof item === 'string' ? item : item[_labelKey]
|
|
453
|
+
)
|
|
454
|
+
.join(separator);
|
|
277
455
|
}
|
|
278
456
|
// 处理溢出提示
|
|
279
457
|
if (data.column.showOverflowTooltip) {
|
|
@@ -296,7 +474,11 @@ Watcher.prototype.mutations = {
|
|
|
296
474
|
// 不直接修改column对象,而是先创建处理过的列配置
|
|
297
475
|
// 使用函数链处理列配置,使用从util.js导入的函数
|
|
298
476
|
// 注意:函数执行顺序是从右到左
|
|
299
|
-
const chains = compose(
|
|
477
|
+
const chains = compose(
|
|
478
|
+
setColumnRenders,
|
|
479
|
+
setColumnForcedProps,
|
|
480
|
+
setColumnWidth
|
|
481
|
+
);
|
|
300
482
|
const processedColumn = chains(Object.assign({}, column));
|
|
301
483
|
|
|
302
484
|
return processedColumn;
|
|
@@ -384,7 +566,10 @@ Watcher.prototype.mutations = {
|
|
|
384
566
|
|
|
385
567
|
// 确保排序属性存在
|
|
386
568
|
if (prop && states.columns && Array.isArray(states.columns)) {
|
|
387
|
-
const column = arrayFind(
|
|
569
|
+
const column = arrayFind(
|
|
570
|
+
states.columns,
|
|
571
|
+
(item) => item.property === prop
|
|
572
|
+
);
|
|
388
573
|
|
|
389
574
|
if (column) {
|
|
390
575
|
column.order = order;
|
|
@@ -415,11 +600,12 @@ Watcher.prototype.mutations = {
|
|
|
415
600
|
|
|
416
601
|
// 非静默模式且非初始化时触发排序变更事件
|
|
417
602
|
if (!options || !(options.silent || options.init)) {
|
|
418
|
-
this.table &&
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
603
|
+
this.table &&
|
|
604
|
+
this.table.$emit('sort-change', {
|
|
605
|
+
column,
|
|
606
|
+
prop,
|
|
607
|
+
order
|
|
608
|
+
});
|
|
423
609
|
}
|
|
424
610
|
|
|
425
611
|
this.updateTableScrollY();
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
.es-input__inner {
|
|
26
26
|
text-overflow: ellipsis;
|
|
27
27
|
height: 100%;
|
|
28
|
-
min-height:
|
|
28
|
+
min-height: $--input-height;
|
|
29
29
|
|
|
30
30
|
&:focus {
|
|
31
31
|
border-color: $--input-focus-border;
|
|
@@ -55,16 +55,31 @@
|
|
|
55
55
|
@include m(medium) {
|
|
56
56
|
font-size: $--input-medium-font-size;
|
|
57
57
|
line-height: $--input-medium-height;
|
|
58
|
+
.es-input {
|
|
59
|
+
.es-input__inner {
|
|
60
|
+
min-height: $--input-medium-height;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
@include m(small) {
|
|
61
66
|
font-size: $--input-small-font-size;
|
|
62
67
|
line-height: $--input-small-height;
|
|
68
|
+
.es-input {
|
|
69
|
+
.es-input__inner {
|
|
70
|
+
min-height: $--input-small-height;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
63
73
|
}
|
|
64
74
|
|
|
65
75
|
@include m(mini) {
|
|
66
76
|
font-size: $--input-mini-font-size;
|
|
67
77
|
line-height: $--input-mini-height;
|
|
78
|
+
.es-input {
|
|
79
|
+
.es-input__inner {
|
|
80
|
+
min-height: $--input-mini-height;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
@include when(disabled) {
|