eoss-ui 0.5.25 → 0.5.27
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/button.js +30 -1
- package/lib/checkbox-group.js +3 -3
- package/lib/data-table.js +80 -35
- package/lib/eoss-ui.common.js +410 -241
- package/lib/flow.js +269 -180
- package/lib/form.js +4 -3
- package/lib/index.js +1 -1
- package/lib/input.js +6 -1
- package/lib/theme-chalk/button.css +1 -0
- package/lib/theme-chalk/flow.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/toolbar.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 +45 -21
- package/packages/data-table/src/main.vue +9 -4
- package/packages/flow/src/main.vue +12 -10
- package/packages/form/src/main.vue +3 -2
- package/packages/input/src/main.vue +6 -8
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/toolbar.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/toolbar.scss +12 -1
- 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=05f3b637&
|
|
3861
|
+
var mainvue_type_template_id_05f3b637_render = function () {
|
|
3862
3862
|
var _vm = this
|
|
3863
3863
|
var _h = _vm.$createElement
|
|
3864
3864
|
var _c = _vm._self._c || _h
|
|
@@ -3873,6 +3873,7 @@ var mainvue_type_template_id_55ef7929_render = function () {
|
|
|
3873
3873
|
expression: "tableLoading",
|
|
3874
3874
|
},
|
|
3875
3875
|
],
|
|
3876
|
+
ref: "component",
|
|
3876
3877
|
tag: "component",
|
|
3877
3878
|
staticClass: "es-data-table",
|
|
3878
3879
|
attrs: {
|
|
@@ -3988,6 +3989,7 @@ var mainvue_type_template_id_55ef7929_render = function () {
|
|
|
3988
3989
|
name: _vm.name,
|
|
3989
3990
|
indexs: index,
|
|
3990
3991
|
form: _vm.form,
|
|
3992
|
+
readonly: _vm.readonly,
|
|
3991
3993
|
optionData: _vm.optionDatas,
|
|
3992
3994
|
},
|
|
3993
3995
|
item
|
|
@@ -4105,10 +4107,10 @@ var mainvue_type_template_id_55ef7929_render = function () {
|
|
|
4105
4107
|
)
|
|
4106
4108
|
}
|
|
4107
4109
|
var staticRenderFns = []
|
|
4108
|
-
|
|
4110
|
+
mainvue_type_template_id_05f3b637_render._withStripped = true
|
|
4109
4111
|
|
|
4110
4112
|
|
|
4111
|
-
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=
|
|
4113
|
+
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=05f3b637&
|
|
4112
4114
|
|
|
4113
4115
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
4114
4116
|
var api = __webpack_require__(1);
|
|
@@ -4156,8 +4158,8 @@ childrenvue_type_template_id_29bcbc72_render._withStripped = true
|
|
|
4156
4158
|
|
|
4157
4159
|
// CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
|
|
4158
4160
|
|
|
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
|
|
4161
|
+
// 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&
|
|
4162
|
+
var columnvue_type_template_id_04b841ca_render = function () {
|
|
4161
4163
|
var _vm = this
|
|
4162
4164
|
var _h = _vm.$createElement
|
|
4163
4165
|
var _c = _vm._self._c || _h
|
|
@@ -4587,11 +4589,14 @@ var columnvue_type_template_id_5798afd2_render = function () {
|
|
|
4587
4589
|
})
|
|
4588
4590
|
)
|
|
4589
4591
|
)
|
|
4590
|
-
: _vm.type === "text" ||
|
|
4592
|
+
: _vm.type === "text" ||
|
|
4593
|
+
_vm.type === "input" ||
|
|
4594
|
+
_vm.type === "textarea"
|
|
4591
4595
|
? [
|
|
4592
4596
|
_vm.config.lazy
|
|
4593
4597
|
? [
|
|
4594
|
-
_vm.type === "text"
|
|
4598
|
+
_vm.type === "text" ||
|
|
4599
|
+
_vm.type === "input"
|
|
4595
4600
|
? _c(
|
|
4596
4601
|
"input",
|
|
4597
4602
|
_vm._b(
|
|
@@ -4731,7 +4736,10 @@ var columnvue_type_template_id_5798afd2_render = function () {
|
|
|
4731
4736
|
"es-input",
|
|
4732
4737
|
_vm._b(
|
|
4733
4738
|
{
|
|
4734
|
-
attrs: {
|
|
4739
|
+
attrs: {
|
|
4740
|
+
type: _vm.type,
|
|
4741
|
+
scope: scope,
|
|
4742
|
+
},
|
|
4735
4743
|
on: {
|
|
4736
4744
|
blur: function (event) {
|
|
4737
4745
|
_vm.handleBlur({
|
|
@@ -4809,6 +4817,13 @@ var columnvue_type_template_id_5798afd2_render = function () {
|
|
|
4809
4817
|
"\n "
|
|
4810
4818
|
),
|
|
4811
4819
|
]
|
|
4820
|
+
: _vm.type === "textarea"
|
|
4821
|
+
? _c("span", {
|
|
4822
|
+
style: _vm.styles ? _vm.styles[scope.row[_vm.prop]] : {},
|
|
4823
|
+
domProps: {
|
|
4824
|
+
innerHTML: _vm._s(_vm.format(scope.row, true)),
|
|
4825
|
+
},
|
|
4826
|
+
})
|
|
4812
4827
|
: _c(
|
|
4813
4828
|
"span",
|
|
4814
4829
|
{
|
|
@@ -4866,11 +4881,11 @@ var columnvue_type_template_id_5798afd2_render = function () {
|
|
|
4866
4881
|
2
|
|
4867
4882
|
)
|
|
4868
4883
|
}
|
|
4869
|
-
var
|
|
4870
|
-
|
|
4884
|
+
var columnvue_type_template_id_04b841ca_staticRenderFns = []
|
|
4885
|
+
columnvue_type_template_id_04b841ca_render._withStripped = true
|
|
4871
4886
|
|
|
4872
4887
|
|
|
4873
|
-
// CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=
|
|
4888
|
+
// CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=04b841ca&
|
|
4874
4889
|
|
|
4875
4890
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
4876
4891
|
var regenerator_ = __webpack_require__(12);
|
|
@@ -5295,6 +5310,16 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5295
5310
|
//
|
|
5296
5311
|
//
|
|
5297
5312
|
//
|
|
5313
|
+
//
|
|
5314
|
+
//
|
|
5315
|
+
//
|
|
5316
|
+
//
|
|
5317
|
+
//
|
|
5318
|
+
//
|
|
5319
|
+
//
|
|
5320
|
+
//
|
|
5321
|
+
//
|
|
5322
|
+
//
|
|
5298
5323
|
|
|
5299
5324
|
|
|
5300
5325
|
|
|
@@ -5412,13 +5437,25 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5412
5437
|
config = _extends({ type: this.type }, config, this.$attrs);
|
|
5413
5438
|
return config;
|
|
5414
5439
|
}
|
|
5440
|
+
var required = this.required;
|
|
5441
|
+
if (this.rules && !required) {
|
|
5442
|
+
if (Array.isArray(this.rules)) {
|
|
5443
|
+
this.rules.map(function (item) {
|
|
5444
|
+
if (item.required) {
|
|
5445
|
+
required = item.required;
|
|
5446
|
+
}
|
|
5447
|
+
});
|
|
5448
|
+
} else if (this.rules.required) {
|
|
5449
|
+
required = this.rules.required;
|
|
5450
|
+
}
|
|
5451
|
+
}
|
|
5415
5452
|
var minWidth = this.label || this.title ? (this.label || this.title).length * 14 + 20 : this.width ? '' : '180px';
|
|
5416
5453
|
config = _extends({}, config, {
|
|
5417
5454
|
filterIcon: this.icon,
|
|
5418
5455
|
sortable: this.sortable || this.sort,
|
|
5419
5456
|
minWidth: this.minWidth || this.table.minWidth || minWidth,
|
|
5420
5457
|
className: [this.className ? this.className : '', this.type ? ' es-table-' + this.type + '-box' : '', this.showOverflowTooltip ? ' es-text-ellipsis' : ''].join(' '),
|
|
5421
|
-
labelClassName: [this.labelClassName ? this.labelClassName : '',
|
|
5458
|
+
labelClassName: [this.labelClassName ? this.labelClassName : '', required ? 'es-required' : ''].join(' '),
|
|
5422
5459
|
showOverflowTooltip: this.showOverflowTooltip,
|
|
5423
5460
|
prop: this.field || this.prop,
|
|
5424
5461
|
field: this.field
|
|
@@ -5434,9 +5471,6 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5434
5471
|
}, this.$attrs, {
|
|
5435
5472
|
data: this.option
|
|
5436
5473
|
});
|
|
5437
|
-
if (this.type === 'textarea') {
|
|
5438
|
-
config.type = 'textarea';
|
|
5439
|
-
}
|
|
5440
5474
|
return config;
|
|
5441
5475
|
},
|
|
5442
5476
|
icon: function icon() {
|
|
@@ -5447,7 +5481,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5447
5481
|
},
|
|
5448
5482
|
isForm: function isForm() {
|
|
5449
5483
|
var type = this.type ? this.type.toLowerCase() : '';
|
|
5450
|
-
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;
|
|
5484
|
+
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;
|
|
5451
5485
|
return flag;
|
|
5452
5486
|
},
|
|
5453
5487
|
option: function option() {
|
|
@@ -5565,41 +5599,47 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
5565
5599
|
|
|
5566
5600
|
return util["a" /* default */].exclAttribute({ data: data, attrs: attrs });
|
|
5567
5601
|
},
|
|
5568
|
-
format: function format(rows) {
|
|
5602
|
+
format: function format(rows, flag) {
|
|
5569
5603
|
var _this2 = this;
|
|
5570
5604
|
|
|
5571
5605
|
var field = this.field || this.prop;
|
|
5572
5606
|
var data = this.option;
|
|
5607
|
+
var str = '';
|
|
5573
5608
|
if (util["a" /* default */].isObject(rows[field])) {
|
|
5574
|
-
|
|
5609
|
+
str = rows[field][this.labelKey] || rows[field]['name'] || rows[field]['label'] || rows[field]['shortName'];
|
|
5575
5610
|
} else if (Array.isArray(rows[field])) {
|
|
5576
5611
|
var vals = rows[field].map(function (item) {
|
|
5577
5612
|
if (util["a" /* default */].isObject(item)) {
|
|
5578
|
-
|
|
5613
|
+
str = item[_this2.labelKey] || item['name'] || item['label'] || item['shortName'];
|
|
5579
5614
|
} else {
|
|
5580
5615
|
if (data && data.length && util["a" /* default */].isObject(data[0])) {
|
|
5581
|
-
|
|
5616
|
+
str = _this2.getLabel(data, item);
|
|
5582
5617
|
}
|
|
5583
|
-
|
|
5618
|
+
str = item;
|
|
5584
5619
|
}
|
|
5585
5620
|
});
|
|
5586
|
-
|
|
5621
|
+
str = vals.join(this.symbol ? this.symbol : '-');
|
|
5587
5622
|
} else {
|
|
5588
5623
|
if (this.valueToString) {
|
|
5589
5624
|
var _vals = rows[field].split(',').map(function (item) {
|
|
5590
5625
|
if (data && data.length && util["a" /* default */].isObject(data[0])) {
|
|
5591
|
-
|
|
5626
|
+
str = _this2.getLabel(data, item);
|
|
5592
5627
|
}
|
|
5593
|
-
|
|
5628
|
+
str = item;
|
|
5594
5629
|
});
|
|
5595
|
-
|
|
5630
|
+
str = _vals.join(this.symbol ? this.symbol : '-');
|
|
5596
5631
|
} else {
|
|
5597
5632
|
if (data && data.length && util["a" /* default */].isObject(data[0])) {
|
|
5598
|
-
|
|
5633
|
+
str = this.getLabel(data, rows[field]);
|
|
5599
5634
|
}
|
|
5600
|
-
|
|
5635
|
+
str = rows[field];
|
|
5601
5636
|
}
|
|
5602
5637
|
}
|
|
5638
|
+
if (str && flag) {
|
|
5639
|
+
str = str.replace(RegExp('\\n', 'g'), '<br/>');
|
|
5640
|
+
str = str.replace(RegExp(' ', 'g'), ' ');
|
|
5641
|
+
}
|
|
5642
|
+
return str;
|
|
5603
5643
|
},
|
|
5604
5644
|
getLabel: function getLabel(obj, val) {
|
|
5605
5645
|
for (var i = 0; i < obj.length; i++) {
|
|
@@ -5709,8 +5749,8 @@ var componentNormalizer = __webpack_require__(3);
|
|
|
5709
5749
|
|
|
5710
5750
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
5711
5751
|
src_columnvue_type_script_lang_js_,
|
|
5712
|
-
|
|
5713
|
-
|
|
5752
|
+
columnvue_type_template_id_04b841ca_render,
|
|
5753
|
+
columnvue_type_template_id_04b841ca_staticRenderFns,
|
|
5714
5754
|
false,
|
|
5715
5755
|
null,
|
|
5716
5756
|
null,
|
|
@@ -6165,6 +6205,8 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6165
6205
|
//
|
|
6166
6206
|
//
|
|
6167
6207
|
//
|
|
6208
|
+
//
|
|
6209
|
+
//
|
|
6168
6210
|
|
|
6169
6211
|
|
|
6170
6212
|
|
|
@@ -7246,10 +7288,13 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7246
7288
|
});
|
|
7247
7289
|
},
|
|
7248
7290
|
validate: function validate(callback) {
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7291
|
+
console.log(this);
|
|
7292
|
+
if (this.form) {
|
|
7293
|
+
var form = this.elForm || this.$children[0];
|
|
7294
|
+
form.validate(function (valid) {
|
|
7295
|
+
callback(valid);
|
|
7296
|
+
});
|
|
7297
|
+
}
|
|
7253
7298
|
},
|
|
7254
7299
|
changeLoading: function changeLoading(show, text) {
|
|
7255
7300
|
this.tableLoading = show;
|
|
@@ -7308,7 +7353,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7308
7353
|
|
|
7309
7354
|
var main_component = Object(componentNormalizer["a" /* default */])(
|
|
7310
7355
|
src_mainvue_type_script_lang_js_,
|
|
7311
|
-
|
|
7356
|
+
mainvue_type_template_id_05f3b637_render,
|
|
7312
7357
|
staticRenderFns,
|
|
7313
7358
|
false,
|
|
7314
7359
|
null,
|