eoss-ui 0.5.24 → 0.5.26
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/CHANGELOG.md +929 -0
- package/lib/button.js +30 -1
- package/lib/checkbox-group.js +3 -3
- package/lib/data-table.js +73 -29
- package/lib/eoss-ui.common.js +888 -639
- package/lib/flow.js +269 -180
- package/lib/form.js +13 -4
- package/lib/index.js +1 -1
- package/lib/input.js +6 -1
- package/lib/main.js +7 -3
- package/lib/selector.js +424 -380
- package/lib/table-form.js +33 -8
- package/lib/theme-chalk/button.css +1 -0
- package/lib/theme-chalk/flow.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/package.json +2 -2
- package/packages/button/src/main.vue +42 -1
- package/packages/checkbox-group/src/main.vue +3 -1
- package/packages/data-table/src/column.vue +47 -19
- package/packages/data-table/src/main.vue +1 -0
- package/packages/flow/src/main.vue +12 -10
- package/packages/form/src/main.vue +12 -3
- package/packages/form/src/table.vue +21 -2
- package/packages/input/src/main.vue +6 -8
- package/packages/main/src/main.vue +5 -1
- package/packages/selector/src/main.vue +144 -135
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -1
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/button.scss +7 -0
- package/packages/theme-chalk/src/flow.scss +5 -0
- package/packages/theme-chalk/src/form.scss +13 -0
- package/src/index.js +1 -1
package/lib/button.js
CHANGED
|
@@ -3516,7 +3516,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3516
3516
|
stop: Boolean,
|
|
3517
3517
|
syncKeys: Object,
|
|
3518
3518
|
text: String,
|
|
3519
|
-
onClick: Function
|
|
3519
|
+
onClick: Function,
|
|
3520
|
+
badge: [Object, Number]
|
|
3520
3521
|
},
|
|
3521
3522
|
computed: {
|
|
3522
3523
|
_type: function _type() {
|
|
@@ -3708,6 +3709,34 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3708
3709
|
tag = 'a';
|
|
3709
3710
|
clas = clas.concat(['el-button', this._type ? 'el-button--' + this._type : 'el-button--default', this.size ? 'el-button--' + this.size : '']);
|
|
3710
3711
|
}
|
|
3712
|
+
if (this.badge) {
|
|
3713
|
+
var config = {};
|
|
3714
|
+
if (typeof this.badge === 'number') {
|
|
3715
|
+
config = { class: 'es-button-badge', props: { value: this.badge } };
|
|
3716
|
+
} else {
|
|
3717
|
+
var _badge = this.badge,
|
|
3718
|
+
value = _badge.value,
|
|
3719
|
+
max = _badge.max,
|
|
3720
|
+
isDot = _badge.isDot,
|
|
3721
|
+
hidden = _badge.hidden,
|
|
3722
|
+
type = _badge.type;
|
|
3723
|
+
|
|
3724
|
+
config = {
|
|
3725
|
+
class: this.badge.class ? this.badge.class + ' es-button-badge' : 'es-button-badge',
|
|
3726
|
+
props: { value: value, max: max, isDot: isDot, hidden: hidden, type: type }
|
|
3727
|
+
};
|
|
3728
|
+
}
|
|
3729
|
+
return h('el-badge', config, [h(tag, {
|
|
3730
|
+
class: clas,
|
|
3731
|
+
props: _extends({}, this.$attrs, props),
|
|
3732
|
+
attrs: attrs,
|
|
3733
|
+
on: _extends({}, this.$listeners, { click: this.handleClick }),
|
|
3734
|
+
directives: [{
|
|
3735
|
+
name: 'show',
|
|
3736
|
+
value: !this.hide
|
|
3737
|
+
}]
|
|
3738
|
+
}, this.iconPlacement === 'start' ? [this.icon ? h('i', { class: this.icon }) : '', this.$slots.default || this.text] : [this.$slots.default || this.text, this.icon ? h('i', { class: this.icon }) : ''])]);
|
|
3739
|
+
}
|
|
3711
3740
|
return h(tag, {
|
|
3712
3741
|
class: clas,
|
|
3713
3742
|
props: _extends({}, this.$attrs, props),
|
package/lib/checkbox-group.js
CHANGED
|
@@ -3664,7 +3664,7 @@ module.exports = require("vue");
|
|
|
3664
3664
|
// ESM COMPAT FLAG
|
|
3665
3665
|
__webpack_require__.r(__webpack_exports__);
|
|
3666
3666
|
|
|
3667
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox-group/src/main.vue?vue&type=template&id=
|
|
3667
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox-group/src/main.vue?vue&type=template&id=796a733a&
|
|
3668
3668
|
var render = function () {
|
|
3669
3669
|
var _vm = this
|
|
3670
3670
|
var _h = _vm.$createElement
|
|
@@ -3797,7 +3797,7 @@ var staticRenderFns = []
|
|
|
3797
3797
|
render._withStripped = true
|
|
3798
3798
|
|
|
3799
3799
|
|
|
3800
|
-
// CONCATENATED MODULE: ./packages/checkbox-group/src/main.vue?vue&type=template&id=
|
|
3800
|
+
// CONCATENATED MODULE: ./packages/checkbox-group/src/main.vue?vue&type=template&id=796a733a&
|
|
3801
3801
|
|
|
3802
3802
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
3803
3803
|
var api = __webpack_require__(1);
|
|
@@ -3992,7 +3992,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
3992
3992
|
labelVal: function labelVal() {
|
|
3993
3993
|
var _this = this;
|
|
3994
3994
|
|
|
3995
|
-
var model = typeof this.model === 'string' ? this.model.split(',') : this.model;
|
|
3995
|
+
var model = typeof this.model === 'string' ? this.model.split(',') : this.model || [];
|
|
3996
3996
|
var label = model.map(function (item) {
|
|
3997
3997
|
if (util["a" /* default */].isObject(item)) {
|
|
3998
3998
|
return item[_this.label];
|
package/lib/data-table.js
CHANGED
|
@@ -3857,8 +3857,8 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
3857
3857
|
// ESM COMPAT FLAG
|
|
3858
3858
|
__webpack_require__.r(__webpack_exports__);
|
|
3859
3859
|
|
|
3860
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=
|
|
3861
|
-
var
|
|
3860
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=1931d6be&
|
|
3861
|
+
var mainvue_type_template_id_1931d6be_render = function () {
|
|
3862
3862
|
var _vm = this
|
|
3863
3863
|
var _h = _vm.$createElement
|
|
3864
3864
|
var _c = _vm._self._c || _h
|
|
@@ -3988,6 +3988,7 @@ var mainvue_type_template_id_55ef7929_render = function () {
|
|
|
3988
3988
|
name: _vm.name,
|
|
3989
3989
|
indexs: index,
|
|
3990
3990
|
form: _vm.form,
|
|
3991
|
+
readonly: _vm.readonly,
|
|
3991
3992
|
optionData: _vm.optionDatas,
|
|
3992
3993
|
},
|
|
3993
3994
|
item
|
|
@@ -4105,10 +4106,10 @@ var mainvue_type_template_id_55ef7929_render = function () {
|
|
|
4105
4106
|
)
|
|
4106
4107
|
}
|
|
4107
4108
|
var staticRenderFns = []
|
|
4108
|
-
|
|
4109
|
+
mainvue_type_template_id_1931d6be_render._withStripped = true
|
|
4109
4110
|
|
|
4110
4111
|
|
|
4111
|
-
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=
|
|
4112
|
+
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=1931d6be&
|
|
4112
4113
|
|
|
4113
4114
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
4114
4115
|
var api = __webpack_require__(1);
|
|
@@ -4156,8 +4157,8 @@ childrenvue_type_template_id_29bcbc72_render._withStripped = true
|
|
|
4156
4157
|
|
|
4157
4158
|
// CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
|
|
4158
4159
|
|
|
4159
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=
|
|
4160
|
-
var
|
|
4160
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=04b841ca&
|
|
4161
|
+
var columnvue_type_template_id_04b841ca_render = function () {
|
|
4161
4162
|
var _vm = this
|
|
4162
4163
|
var _h = _vm.$createElement
|
|
4163
4164
|
var _c = _vm._self._c || _h
|
|
@@ -4587,11 +4588,14 @@ var columnvue_type_template_id_31b33576_render = function () {
|
|
|
4587
4588
|
})
|
|
4588
4589
|
)
|
|
4589
4590
|
)
|
|
4590
|
-
: _vm.type === "text" ||
|
|
4591
|
+
: _vm.type === "text" ||
|
|
4592
|
+
_vm.type === "input" ||
|
|
4593
|
+
_vm.type === "textarea"
|
|
4591
4594
|
? [
|
|
4592
4595
|
_vm.config.lazy
|
|
4593
4596
|
? [
|
|
4594
|
-
_vm.type === "text"
|
|
4597
|
+
_vm.type === "text" ||
|
|
4598
|
+
_vm.type === "input"
|
|
4595
4599
|
? _c(
|
|
4596
4600
|
"input",
|
|
4597
4601
|
_vm._b(
|
|
@@ -4731,7 +4735,10 @@ var columnvue_type_template_id_31b33576_render = function () {
|
|
|
4731
4735
|
"es-input",
|
|
4732
4736
|
_vm._b(
|
|
4733
4737
|
{
|
|
4734
|
-
attrs: {
|
|
4738
|
+
attrs: {
|
|
4739
|
+
type: _vm.type,
|
|
4740
|
+
scope: scope,
|
|
4741
|
+
},
|
|
4735
4742
|
on: {
|
|
4736
4743
|
blur: function (event) {
|
|
4737
4744
|
_vm.handleBlur({
|
|
@@ -4809,6 +4816,13 @@ var columnvue_type_template_id_31b33576_render = function () {
|
|
|
4809
4816
|
"\n "
|
|
4810
4817
|
),
|
|
4811
4818
|
]
|
|
4819
|
+
: _vm.type === "textarea"
|
|
4820
|
+
? _c("span", {
|
|
4821
|
+
style: _vm.styles ? _vm.styles[scope.row[_vm.prop]] : {},
|
|
4822
|
+
domProps: {
|
|
4823
|
+
innerHTML: _vm._s(_vm.format(scope.row, true)),
|
|
4824
|
+
},
|
|
4825
|
+
})
|
|
4812
4826
|
: _c(
|
|
4813
4827
|
"span",
|
|
4814
4828
|
{
|
|
@@ -4866,11 +4880,11 @@ var columnvue_type_template_id_31b33576_render = function () {
|
|
|
4866
4880
|
2
|
|
4867
4881
|
)
|
|
4868
4882
|
}
|
|
4869
|
-
var
|
|
4870
|
-
|
|
4883
|
+
var columnvue_type_template_id_04b841ca_staticRenderFns = []
|
|
4884
|
+
columnvue_type_template_id_04b841ca_render._withStripped = true
|
|
4871
4885
|
|
|
4872
4886
|
|
|
4873
|
-
// CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=
|
|
4887
|
+
// CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=04b841ca&
|
|
4874
4888
|
|
|
4875
4889
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
4876
4890
|
var regenerator_ = __webpack_require__(12);
|
|
@@ -5295,6 +5309,16 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5295
5309
|
//
|
|
5296
5310
|
//
|
|
5297
5311
|
//
|
|
5312
|
+
//
|
|
5313
|
+
//
|
|
5314
|
+
//
|
|
5315
|
+
//
|
|
5316
|
+
//
|
|
5317
|
+
//
|
|
5318
|
+
//
|
|
5319
|
+
//
|
|
5320
|
+
//
|
|
5321
|
+
//
|
|
5298
5322
|
|
|
5299
5323
|
|
|
5300
5324
|
|
|
@@ -5412,13 +5436,25 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5412
5436
|
config = _extends({ type: this.type }, config, this.$attrs);
|
|
5413
5437
|
return config;
|
|
5414
5438
|
}
|
|
5439
|
+
var required = this.required;
|
|
5440
|
+
if (this.rules && !required) {
|
|
5441
|
+
if (Array.isArray(this.rules)) {
|
|
5442
|
+
this.rules.map(function (item) {
|
|
5443
|
+
if (item.required) {
|
|
5444
|
+
required = item.required;
|
|
5445
|
+
}
|
|
5446
|
+
});
|
|
5447
|
+
} else if (this.rules.required) {
|
|
5448
|
+
required = this.rules.required;
|
|
5449
|
+
}
|
|
5450
|
+
}
|
|
5415
5451
|
var minWidth = this.label || this.title ? (this.label || this.title).length * 14 + 20 : this.width ? '' : '180px';
|
|
5416
5452
|
config = _extends({}, config, {
|
|
5417
5453
|
filterIcon: this.icon,
|
|
5418
5454
|
sortable: this.sortable || this.sort,
|
|
5419
5455
|
minWidth: this.minWidth || this.table.minWidth || minWidth,
|
|
5420
5456
|
className: [this.className ? this.className : '', this.type ? ' es-table-' + this.type + '-box' : '', this.showOverflowTooltip ? ' es-text-ellipsis' : ''].join(' '),
|
|
5421
|
-
labelClassName: [this.labelClassName ? this.labelClassName : '',
|
|
5457
|
+
labelClassName: [this.labelClassName ? this.labelClassName : '', required ? 'es-required' : ''].join(' '),
|
|
5422
5458
|
showOverflowTooltip: this.showOverflowTooltip,
|
|
5423
5459
|
prop: this.field || this.prop,
|
|
5424
5460
|
field: this.field
|
|
@@ -5426,7 +5462,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5426
5462
|
return config;
|
|
5427
5463
|
},
|
|
5428
5464
|
formOption: function formOption() {
|
|
5429
|
-
|
|
5465
|
+
var config = _extends({
|
|
5430
5466
|
labelKey: this.sysCode ? 'shortName' : this.labelKey,
|
|
5431
5467
|
valueKey: this.sysCode ? 'cciValue' : this.valueKey,
|
|
5432
5468
|
rules: this.rules,
|
|
@@ -5434,6 +5470,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5434
5470
|
}, this.$attrs, {
|
|
5435
5471
|
data: this.option
|
|
5436
5472
|
});
|
|
5473
|
+
return config;
|
|
5437
5474
|
},
|
|
5438
5475
|
icon: function icon() {
|
|
5439
5476
|
if (this.filterIcon === true) {
|
|
@@ -5443,7 +5480,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5443
5480
|
},
|
|
5444
5481
|
isForm: function isForm() {
|
|
5445
5482
|
var type = this.type ? this.type.toLowerCase() : '';
|
|
5446
|
-
var flag = this.form && ['text', 'textarea', 'checkbox', 'radio', 'select', 'handle', 'date', 'year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimerange', 'daterange', 'monthrange', 'quarter', 'halfyear', 'switch', 'selector', 'ganged', 'number'].indexOf(type) > -1 || ['space', 'slot'].indexOf(type) > -1;
|
|
5483
|
+
var flag = this.form && ['input', 'text', 'textarea', 'checkbox', 'radio', 'select', 'handle', 'date', 'year', 'month', 'date', 'dates', 'week', 'datetime', 'datetimerange', 'daterange', 'monthrange', 'quarter', 'halfyear', 'switch', 'selector', 'ganged', 'number'].indexOf(type) > -1 || ['space', 'slot'].indexOf(type) > -1;
|
|
5447
5484
|
return flag;
|
|
5448
5485
|
},
|
|
5449
5486
|
option: function option() {
|
|
@@ -5561,41 +5598,47 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5561
5598
|
|
|
5562
5599
|
return util["a" /* default */].exclAttribute({ data: data, attrs: attrs });
|
|
5563
5600
|
},
|
|
5564
|
-
format: function format(rows) {
|
|
5601
|
+
format: function format(rows, flag) {
|
|
5565
5602
|
var _this2 = this;
|
|
5566
5603
|
|
|
5567
5604
|
var field = this.field || this.prop;
|
|
5568
5605
|
var data = this.option;
|
|
5606
|
+
var str = '';
|
|
5569
5607
|
if (util["a" /* default */].isObject(rows[field])) {
|
|
5570
|
-
|
|
5608
|
+
str = rows[field][this.labelKey] || rows[field]['name'] || rows[field]['label'] || rows[field]['shortName'];
|
|
5571
5609
|
} else if (Array.isArray(rows[field])) {
|
|
5572
5610
|
var vals = rows[field].map(function (item) {
|
|
5573
5611
|
if (util["a" /* default */].isObject(item)) {
|
|
5574
|
-
|
|
5612
|
+
str = item[_this2.labelKey] || item['name'] || item['label'] || item['shortName'];
|
|
5575
5613
|
} else {
|
|
5576
5614
|
if (data && data.length && util["a" /* default */].isObject(data[0])) {
|
|
5577
|
-
|
|
5615
|
+
str = _this2.getLabel(data, item);
|
|
5578
5616
|
}
|
|
5579
|
-
|
|
5617
|
+
str = item;
|
|
5580
5618
|
}
|
|
5581
5619
|
});
|
|
5582
|
-
|
|
5620
|
+
str = vals.join(this.symbol ? this.symbol : '-');
|
|
5583
5621
|
} else {
|
|
5584
5622
|
if (this.valueToString) {
|
|
5585
5623
|
var _vals = rows[field].split(',').map(function (item) {
|
|
5586
5624
|
if (data && data.length && util["a" /* default */].isObject(data[0])) {
|
|
5587
|
-
|
|
5625
|
+
str = _this2.getLabel(data, item);
|
|
5588
5626
|
}
|
|
5589
|
-
|
|
5627
|
+
str = item;
|
|
5590
5628
|
});
|
|
5591
|
-
|
|
5629
|
+
str = _vals.join(this.symbol ? this.symbol : '-');
|
|
5592
5630
|
} else {
|
|
5593
5631
|
if (data && data.length && util["a" /* default */].isObject(data[0])) {
|
|
5594
|
-
|
|
5632
|
+
str = this.getLabel(data, rows[field]);
|
|
5595
5633
|
}
|
|
5596
|
-
|
|
5634
|
+
str = rows[field];
|
|
5597
5635
|
}
|
|
5598
5636
|
}
|
|
5637
|
+
if (str && flag) {
|
|
5638
|
+
str = str.replace(RegExp('\\n', 'g'), '<br/>');
|
|
5639
|
+
str = str.replace(RegExp(' ', 'g'), ' ');
|
|
5640
|
+
}
|
|
5641
|
+
return str;
|
|
5599
5642
|
},
|
|
5600
5643
|
getLabel: function getLabel(obj, val) {
|
|
5601
5644
|
for (var i = 0; i < obj.length; i++) {
|
|
@@ -5705,8 +5748,8 @@ var componentNormalizer = __webpack_require__(3);
|
|
|
5705
5748
|
|
|
5706
5749
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
5707
5750
|
src_columnvue_type_script_lang_js_,
|
|
5708
|
-
|
|
5709
|
-
|
|
5751
|
+
columnvue_type_template_id_04b841ca_render,
|
|
5752
|
+
columnvue_type_template_id_04b841ca_staticRenderFns,
|
|
5710
5753
|
false,
|
|
5711
5754
|
null,
|
|
5712
5755
|
null,
|
|
@@ -6161,6 +6204,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6161
6204
|
//
|
|
6162
6205
|
//
|
|
6163
6206
|
//
|
|
6207
|
+
//
|
|
6164
6208
|
|
|
6165
6209
|
|
|
6166
6210
|
|
|
@@ -7304,7 +7348,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7304
7348
|
|
|
7305
7349
|
var main_component = Object(componentNormalizer["a" /* default */])(
|
|
7306
7350
|
src_mainvue_type_script_lang_js_,
|
|
7307
|
-
|
|
7351
|
+
mainvue_type_template_id_1931d6be_render,
|
|
7308
7352
|
staticRenderFns,
|
|
7309
7353
|
false,
|
|
7310
7354
|
null,
|