eoss 0.1.0-alpha.45 → 0.1.0-alpha.46
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/data-table.js +60 -23
- package/lib/eoss.common.js +251 -163
- package/lib/flow.js +7 -9
- package/lib/form-editor.js +2 -3
- package/lib/index.js +1 -1
- package/lib/select.js +37 -16
- package/lib/selector.js +16 -4
- package/lib/table-column.js +40 -68
- package/lib/table.js +48 -69
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/tree.js +17 -7
- package/lib/upload.js +85 -8
- package/package.json +1 -1
- package/packages/data-table/src/data-table.vue +32 -7
- package/packages/flow/src/selectUser.vue +12 -18
- package/packages/form-editor/src/form-editor.vue +0 -1
- package/packages/select/src/select.vue +37 -12
- package/packages/selector/src/selector.vue +10 -1
- package/packages/table/src/store/index.js +10 -1
- package/packages/table/src/util.js +33 -61
- package/packages/theme-chalk/src/table.scss +6 -0
- package/packages/tree/src/tree.vue +13 -3
- package/packages/upload/src/index.vue +43 -8
- package/src/index.js +1 -1
- package/packages/flowOld/index.js +0 -7
- package/packages/flowOld/src/component/Circulate.vue +0 -464
- package/packages/flowOld/src/component/CustomPreset.vue +0 -343
- package/packages/flowOld/src/component/FileList.vue +0 -117
- package/packages/flowOld/src/component/FreeCirculation.vue +0 -278
- package/packages/flowOld/src/component/Preset.vue +0 -283
- package/packages/flowOld/src/component/SendMsg.vue +0 -309
- package/packages/flowOld/src/component/TimeLimit.vue +0 -223
- package/packages/flowOld/src/component/opinions-file.vue +0 -126
- package/packages/flowOld/src/component/opinions.vue +0 -429
- package/packages/flowOld/src/component/taskUnionExamine.vue +0 -832
- package/packages/flowOld/src/form.vue +0 -134
- package/packages/flowOld/src/freeStartFlow.vue +0 -2945
- package/packages/flowOld/src/main.vue +0 -4141
- package/packages/flowOld/src/processForm.vue +0 -1431
- package/packages/flowOld/src/processReject.vue +0 -338
- package/packages/flowOld/src/reset.vue +0 -964
- package/packages/flowOld/src/selectUser.vue +0 -520
- package/packages/flowOld/src/startTaskRead.vue +0 -737
- package/packages/flowOld/src/supervise.vue +0 -197
- package/packages/flowOld/src/table.vue +0 -71
package/lib/table.js
CHANGED
|
@@ -6922,6 +6922,11 @@ watcher.prototype.mutations = {
|
|
|
6922
6922
|
var _label = label || title;
|
|
6923
6923
|
var _labelKey = labelKey || (sysCode ? 'shortName' : 'name');
|
|
6924
6924
|
var _valueKey = valueKey || (sysCode ? 'cciValue' : 'value');
|
|
6925
|
+
// 必填列:显式 required 配置或 rules 含 required 规则(与 es-form-item isRequired 判定一致),
|
|
6926
|
+
// 用于表头渲染红色星号
|
|
6927
|
+
var _required = configs.required === true || !!rules && (Array.isArray(rules) ? rules : [rules]).some(function (rule) {
|
|
6928
|
+
return !!rule && rule.required === true;
|
|
6929
|
+
});
|
|
6925
6930
|
// 归一化列配置:兼容文档中的 kebab-case 写法(如 min-width / show-overflow-tooltip)
|
|
6926
6931
|
var normalized = {};
|
|
6927
6932
|
Object.keys(configs).forEach(function (key) {
|
|
@@ -6964,7 +6969,9 @@ watcher.prototype.mutations = {
|
|
|
6964
6969
|
prop: _field,
|
|
6965
6970
|
property: _field,
|
|
6966
6971
|
formatter: formatter
|
|
6967
|
-
}, normalized
|
|
6972
|
+
}, normalized, {
|
|
6973
|
+
required: _required
|
|
6974
|
+
});
|
|
6968
6975
|
}
|
|
6969
6976
|
var childrens = null;
|
|
6970
6977
|
// 处理特殊类型列的渲染
|
|
@@ -14332,8 +14339,10 @@ var scrollBarWidth = void 0;
|
|
|
14332
14339
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return setColumnForcedProps; });
|
|
14333
14340
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return setColumnRenders; });
|
|
14334
14341
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return renderDom; });
|
|
14335
|
-
/* harmony import */ var
|
|
14336
|
-
/* harmony import */ var
|
|
14342
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
14343
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
14344
|
+
/* harmony import */ var eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
|
14345
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
|
|
14337
14346
|
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
14338
14347
|
|
|
14339
14348
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
@@ -14342,6 +14351,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
14342
14351
|
|
|
14343
14352
|
|
|
14344
14353
|
|
|
14354
|
+
|
|
14345
14355
|
var getCell = function getCell(event) {
|
|
14346
14356
|
var cell = event.target;
|
|
14347
14357
|
|
|
@@ -14375,7 +14385,7 @@ var orderBy = function orderBy(array, sortKey, reverse, sortMethod, sortBy) {
|
|
|
14375
14385
|
}
|
|
14376
14386
|
return sortBy.map(function (by) {
|
|
14377
14387
|
if (typeof by === 'string') {
|
|
14378
|
-
return Object(
|
|
14388
|
+
return Object(eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_1__[/* getValueByPath */ "w"])(value, by);
|
|
14379
14389
|
} else {
|
|
14380
14390
|
return by(value, index, array);
|
|
14381
14391
|
}
|
|
@@ -14384,7 +14394,7 @@ var orderBy = function orderBy(array, sortKey, reverse, sortMethod, sortBy) {
|
|
|
14384
14394
|
if (sortKey !== '$key') {
|
|
14385
14395
|
if (isObject(value) && '$value' in value) value = value.$value;
|
|
14386
14396
|
}
|
|
14387
|
-
return [isObject(value) ? Object(
|
|
14397
|
+
return [isObject(value) ? Object(eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_1__[/* getValueByPath */ "w"])(value, sortKey) : value];
|
|
14388
14398
|
};
|
|
14389
14399
|
var compare = function compare(a, b) {
|
|
14390
14400
|
if (sortMethod) {
|
|
@@ -14830,7 +14840,7 @@ function defaultRenderCell(h, _ref2) {
|
|
|
14830
14840
|
if (property && row) {
|
|
14831
14841
|
try {
|
|
14832
14842
|
// 假设getPropByPath是一个外部函数,需要确保它存在
|
|
14833
|
-
var result = typeof
|
|
14843
|
+
var result = typeof eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_1__[/* getPropByPath */ "u"] === 'function' ? Object(eoss_src_utils_util__WEBPACK_IMPORTED_MODULE_1__[/* getPropByPath */ "u"])(row, property) : { v: undefined };
|
|
14834
14844
|
value = result && result.v;
|
|
14835
14845
|
} catch (error) {
|
|
14836
14846
|
console.error('Error getting property value:', error);
|
|
@@ -14980,7 +14990,7 @@ function setColumnForcedProps(column) {
|
|
|
14980
14990
|
|
|
14981
14991
|
// 对于特定类型的 column,某些属性不允许设置
|
|
14982
14992
|
var type = column.type;
|
|
14983
|
-
var source =
|
|
14993
|
+
var source = _config__WEBPACK_IMPORTED_MODULE_2__[/* cellForced */ "a"][type] || {};
|
|
14984
14994
|
|
|
14985
14995
|
Object.keys(source).forEach(function (prop) {
|
|
14986
14996
|
var value = source[prop];
|
|
@@ -15002,7 +15012,7 @@ function setColumnRenders(column) {
|
|
|
15002
15012
|
|
|
15003
15013
|
// 对于特殊类型列(selection/index/expand),使用config中定义的渲染函数
|
|
15004
15014
|
var type = column.type;
|
|
15005
|
-
var forcedConfig =
|
|
15015
|
+
var forcedConfig = _config__WEBPACK_IMPORTED_MODULE_2__[/* cellForced */ "a"][type];
|
|
15006
15016
|
|
|
15007
15017
|
if (forcedConfig) {
|
|
15008
15018
|
// 特殊类型列使用config中定义的渲染函数
|
|
@@ -15027,6 +15037,10 @@ function setColumnRenders(column) {
|
|
|
15027
15037
|
column.renderHeader = function (h, _ref4) {
|
|
15028
15038
|
var column = _ref4.column;
|
|
15029
15039
|
|
|
15040
|
+
// 必填列:标题前渲染红色星号,与 es-form-item 必填星号样式一致
|
|
15041
|
+
if (column.required) {
|
|
15042
|
+
return h('span', [h('span', { class: 'es-table__required-star' }, '*'), column.label]);
|
|
15043
|
+
}
|
|
15030
15044
|
return h('span', column.label);
|
|
15031
15045
|
};
|
|
15032
15046
|
}
|
|
@@ -15075,7 +15089,13 @@ function renderDom(h, _ref5) {
|
|
|
15075
15089
|
|
|
15076
15090
|
var className = config.className,
|
|
15077
15091
|
configs = _objectWithoutProperties(config, ['className']);
|
|
15092
|
+
// 回写统一入口:行对象可能初始不含该列键(如新增空行),直接赋值会新增非响应式键,
|
|
15093
|
+
// 控件 value 与外部数据都感知不到回写,需用 Vue.set 补键
|
|
15094
|
+
|
|
15078
15095
|
|
|
15096
|
+
var setValue = function setValue(val) {
|
|
15097
|
+
vue__WEBPACK_IMPORTED_MODULE_0___default.a.set(data.row, data.column.prop, val);
|
|
15098
|
+
};
|
|
15079
15099
|
switch (type) {
|
|
15080
15100
|
case 'input':
|
|
15081
15101
|
return h('es-input', {
|
|
@@ -15086,9 +15106,7 @@ function renderDom(h, _ref5) {
|
|
|
15086
15106
|
value: data.row[data.column.prop]
|
|
15087
15107
|
}),
|
|
15088
15108
|
on: _extends({}, events, {
|
|
15089
|
-
input:
|
|
15090
|
-
data.row[data.column.prop] = val;
|
|
15091
|
-
}
|
|
15109
|
+
input: setValue
|
|
15092
15110
|
})
|
|
15093
15111
|
});
|
|
15094
15112
|
case 'textarea':
|
|
@@ -15101,9 +15119,7 @@ function renderDom(h, _ref5) {
|
|
|
15101
15119
|
value: data.row[data.column.prop]
|
|
15102
15120
|
}),
|
|
15103
15121
|
on: _extends({}, events, {
|
|
15104
|
-
input:
|
|
15105
|
-
data.row[data.column.prop] = val;
|
|
15106
|
-
}
|
|
15122
|
+
input: setValue
|
|
15107
15123
|
})
|
|
15108
15124
|
});
|
|
15109
15125
|
case 'radio':
|
|
@@ -15116,9 +15132,7 @@ function renderDom(h, _ref5) {
|
|
|
15116
15132
|
value: data.row[data.column.prop]
|
|
15117
15133
|
}),
|
|
15118
15134
|
on: _extends({}, events, {
|
|
15119
|
-
input:
|
|
15120
|
-
data.row[data.column.prop] = val;
|
|
15121
|
-
}
|
|
15135
|
+
input: setValue
|
|
15122
15136
|
})
|
|
15123
15137
|
});
|
|
15124
15138
|
case 'checkbox':
|
|
@@ -15131,9 +15145,7 @@ function renderDom(h, _ref5) {
|
|
|
15131
15145
|
value: data.row[data.column.prop]
|
|
15132
15146
|
}),
|
|
15133
15147
|
on: _extends({}, events, {
|
|
15134
|
-
input:
|
|
15135
|
-
data.row[data.column.prop] = val;
|
|
15136
|
-
}
|
|
15148
|
+
input: setValue
|
|
15137
15149
|
})
|
|
15138
15150
|
});
|
|
15139
15151
|
case 'inputNumber':
|
|
@@ -15145,9 +15157,7 @@ function renderDom(h, _ref5) {
|
|
|
15145
15157
|
value: data.row[data.column.prop]
|
|
15146
15158
|
}),
|
|
15147
15159
|
on: _extends({}, events, {
|
|
15148
|
-
input:
|
|
15149
|
-
data.row[data.column.prop] = val;
|
|
15150
|
-
}
|
|
15160
|
+
input: setValue
|
|
15151
15161
|
})
|
|
15152
15162
|
});
|
|
15153
15163
|
case 'select':
|
|
@@ -15160,9 +15170,7 @@ function renderDom(h, _ref5) {
|
|
|
15160
15170
|
value: data.row[data.column.prop]
|
|
15161
15171
|
}),
|
|
15162
15172
|
on: _extends({}, events, {
|
|
15163
|
-
input:
|
|
15164
|
-
data.row[data.column.prop] = val;
|
|
15165
|
-
}
|
|
15173
|
+
input: setValue
|
|
15166
15174
|
})
|
|
15167
15175
|
});
|
|
15168
15176
|
case 'cascader':
|
|
@@ -15175,9 +15183,7 @@ function renderDom(h, _ref5) {
|
|
|
15175
15183
|
value: data.row[data.column.prop]
|
|
15176
15184
|
}),
|
|
15177
15185
|
on: _extends({}, events, {
|
|
15178
|
-
input:
|
|
15179
|
-
data.row[data.column.prop] = val;
|
|
15180
|
-
}
|
|
15186
|
+
input: setValue
|
|
15181
15187
|
})
|
|
15182
15188
|
});
|
|
15183
15189
|
case 'switch':
|
|
@@ -15190,9 +15196,7 @@ function renderDom(h, _ref5) {
|
|
|
15190
15196
|
value: data.row[data.column.prop]
|
|
15191
15197
|
}),
|
|
15192
15198
|
on: _extends({}, events, {
|
|
15193
|
-
input:
|
|
15194
|
-
data.row[data.column.prop] = val;
|
|
15195
|
-
}
|
|
15199
|
+
input: setValue
|
|
15196
15200
|
})
|
|
15197
15201
|
});
|
|
15198
15202
|
case 'slider':
|
|
@@ -15204,9 +15208,7 @@ function renderDom(h, _ref5) {
|
|
|
15204
15208
|
value: data.row[data.column.prop]
|
|
15205
15209
|
}),
|
|
15206
15210
|
on: _extends({}, events, {
|
|
15207
|
-
input:
|
|
15208
|
-
data.row[data.column.prop] = val;
|
|
15209
|
-
}
|
|
15211
|
+
input: setValue
|
|
15210
15212
|
})
|
|
15211
15213
|
});
|
|
15212
15214
|
case 'year':
|
|
@@ -15219,9 +15221,7 @@ function renderDom(h, _ref5) {
|
|
|
15219
15221
|
value: data.row[data.column.prop]
|
|
15220
15222
|
}),
|
|
15221
15223
|
on: _extends({}, events, {
|
|
15222
|
-
input:
|
|
15223
|
-
data.row[data.column.prop] = val;
|
|
15224
|
-
}
|
|
15224
|
+
input: setValue
|
|
15225
15225
|
})
|
|
15226
15226
|
});
|
|
15227
15227
|
case 'month':
|
|
@@ -15234,9 +15234,7 @@ function renderDom(h, _ref5) {
|
|
|
15234
15234
|
value: data.row[data.column.prop]
|
|
15235
15235
|
}),
|
|
15236
15236
|
on: _extends({}, events, {
|
|
15237
|
-
input:
|
|
15238
|
-
data.row[data.column.prop] = val;
|
|
15239
|
-
}
|
|
15237
|
+
input: setValue
|
|
15240
15238
|
})
|
|
15241
15239
|
});
|
|
15242
15240
|
case 'date':
|
|
@@ -15249,9 +15247,7 @@ function renderDom(h, _ref5) {
|
|
|
15249
15247
|
value: data.row[data.column.prop]
|
|
15250
15248
|
}),
|
|
15251
15249
|
on: _extends({}, events, {
|
|
15252
|
-
input:
|
|
15253
|
-
data.row[data.column.prop] = val;
|
|
15254
|
-
}
|
|
15250
|
+
input: setValue
|
|
15255
15251
|
})
|
|
15256
15252
|
});
|
|
15257
15253
|
case 'week':
|
|
@@ -15264,9 +15260,7 @@ function renderDom(h, _ref5) {
|
|
|
15264
15260
|
value: data.row[data.column.prop]
|
|
15265
15261
|
}),
|
|
15266
15262
|
on: _extends({}, events, {
|
|
15267
|
-
input:
|
|
15268
|
-
data.row[data.column.prop] = val;
|
|
15269
|
-
}
|
|
15263
|
+
input: setValue
|
|
15270
15264
|
})
|
|
15271
15265
|
});
|
|
15272
15266
|
case 'datetime':
|
|
@@ -15279,9 +15273,7 @@ function renderDom(h, _ref5) {
|
|
|
15279
15273
|
value: data.row[data.column.prop]
|
|
15280
15274
|
}),
|
|
15281
15275
|
on: _extends({}, events, {
|
|
15282
|
-
input:
|
|
15283
|
-
data.row[data.column.prop] = val;
|
|
15284
|
-
}
|
|
15276
|
+
input: setValue
|
|
15285
15277
|
})
|
|
15286
15278
|
});
|
|
15287
15279
|
case 'datetimerange':
|
|
@@ -15294,9 +15286,7 @@ function renderDom(h, _ref5) {
|
|
|
15294
15286
|
value: data.row[data.column.prop]
|
|
15295
15287
|
}),
|
|
15296
15288
|
on: _extends({}, events, {
|
|
15297
|
-
input:
|
|
15298
|
-
data.row[data.column.prop] = val;
|
|
15299
|
-
}
|
|
15289
|
+
input: setValue
|
|
15300
15290
|
})
|
|
15301
15291
|
});
|
|
15302
15292
|
case 'daterange':
|
|
@@ -15309,9 +15299,7 @@ function renderDom(h, _ref5) {
|
|
|
15309
15299
|
value: data.row[data.column.prop]
|
|
15310
15300
|
}),
|
|
15311
15301
|
on: _extends({}, events, {
|
|
15312
|
-
input:
|
|
15313
|
-
data.row[data.column.prop] = val;
|
|
15314
|
-
}
|
|
15302
|
+
input: setValue
|
|
15315
15303
|
})
|
|
15316
15304
|
});
|
|
15317
15305
|
case 'quarter':
|
|
@@ -15324,9 +15312,7 @@ function renderDom(h, _ref5) {
|
|
|
15324
15312
|
value: data.row[data.column.prop]
|
|
15325
15313
|
}),
|
|
15326
15314
|
on: _extends({}, events, {
|
|
15327
|
-
input:
|
|
15328
|
-
data.row[data.column.prop] = val;
|
|
15329
|
-
}
|
|
15315
|
+
input: setValue
|
|
15330
15316
|
})
|
|
15331
15317
|
});
|
|
15332
15318
|
case 'halfyear':
|
|
@@ -15339,9 +15325,7 @@ function renderDom(h, _ref5) {
|
|
|
15339
15325
|
value: data.row[data.column.prop]
|
|
15340
15326
|
}),
|
|
15341
15327
|
on: _extends({}, events, {
|
|
15342
|
-
input:
|
|
15343
|
-
data.row[data.column.prop] = val;
|
|
15344
|
-
}
|
|
15328
|
+
input: setValue
|
|
15345
15329
|
})
|
|
15346
15330
|
});
|
|
15347
15331
|
case 'time':
|
|
@@ -15354,9 +15338,7 @@ function renderDom(h, _ref5) {
|
|
|
15354
15338
|
value: data.row[data.column.prop]
|
|
15355
15339
|
}),
|
|
15356
15340
|
on: _extends({}, events, {
|
|
15357
|
-
input:
|
|
15358
|
-
data.row[data.column.prop] = val;
|
|
15359
|
-
}
|
|
15341
|
+
input: setValue
|
|
15360
15342
|
})
|
|
15361
15343
|
});
|
|
15362
15344
|
case 'selector':
|
|
@@ -15368,13 +15350,10 @@ function renderDom(h, _ref5) {
|
|
|
15368
15350
|
value: data.row[data.column.prop]
|
|
15369
15351
|
}),
|
|
15370
15352
|
on: _extends({}, events, {
|
|
15371
|
-
input:
|
|
15372
|
-
data.row[data.column.prop] = val;
|
|
15373
|
-
}
|
|
15353
|
+
input: setValue
|
|
15374
15354
|
})
|
|
15375
15355
|
});
|
|
15376
15356
|
case 'handle':
|
|
15377
|
-
console.log('handle', data);
|
|
15378
15357
|
// const contents = events.filter((item) => item.rules && typeof item.rules === 'function' ? item.rules(data.row) : true);
|
|
15379
15358
|
return h('es-button-group', {
|
|
15380
15359
|
class: className,
|