eoss-ui 0.5.45 → 0.5.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/button.js +135 -135
- package/lib/calendar.js +769 -0
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +4 -2
- package/lib/clients.js +2 -2
- package/lib/data-table-form.js +36 -13
- package/lib/data-table.js +17 -6
- package/lib/date-picker.js +2 -2
- package/lib/dialog.js +8 -4
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +1214 -630
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +2 -2
- package/lib/flow-list.js +2 -2
- package/lib/form.js +215 -231
- package/lib/handle-user.js +2 -2
- package/lib/handler.js +2 -2
- package/lib/icons.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input-number.js +2 -2
- package/lib/input.js +2 -2
- package/lib/label.js +2 -2
- package/lib/menu.js +2 -2
- package/lib/nav.js +5 -5
- package/lib/notify.js +2 -2
- package/lib/page.js +2 -2
- package/lib/pagination.js +2 -2
- package/lib/player.js +2 -2
- package/lib/qr-code.js +2 -2
- package/lib/radio-group.js +2 -2
- package/lib/retrial-auth.js +2 -2
- package/lib/select-ganged.js +2 -2
- package/lib/select.js +2 -2
- package/lib/selector.js +2 -2
- package/lib/sizer.js +9 -9
- package/lib/steps.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/table-form.js +2 -2
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +2 -2
- package/lib/theme-chalk/calendar.css +0 -0
- package/lib/theme-chalk/cascader.css +1 -0
- package/lib/theme-chalk/data-table-form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/toolbar.css +1 -1
- package/lib/tips.js +2 -2
- package/lib/toolbar.js +17 -33
- package/lib/tree-group.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/wujie.js +2 -2
- package/lib/wxlogin.js +2 -2
- package/package.json +1 -1
- package/packages/calendar/index.js +5 -0
- package/packages/calendar/src/main.vue +386 -0
- package/packages/data-table/src/main.vue +12 -1
- package/packages/data-table-form/src/main.vue +30 -23
- package/packages/data-table-form/src/table.vue +16 -3
- package/packages/dialog/src/main.vue +3 -0
- package/packages/nav/src/main.vue +1 -1
- package/packages/theme-chalk/lib/calendar.css +0 -0
- package/packages/theme-chalk/lib/cascader.css +1 -0
- package/packages/theme-chalk/lib/data-table-form.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/calendar.scss +0 -0
- package/packages/theme-chalk/src/cascader.scss +93 -0
- package/packages/theme-chalk/src/data-table-form.scss +11 -0
- package/packages/theme-chalk/src/index.scss +2 -1
- package/packages/theme-chalk/src/toolbar.scss +13 -11
- package/packages/toolbar/src/main.vue +34 -48
- package/src/index.js +7 -4
|
@@ -44,9 +44,9 @@ export default {
|
|
|
44
44
|
},
|
|
45
45
|
cols() {
|
|
46
46
|
let col = [];
|
|
47
|
-
this.theads.forEach(items => {
|
|
47
|
+
this.theads.forEach((items) => {
|
|
48
48
|
if (Array.isArray(items)) {
|
|
49
|
-
items.forEach(item => {
|
|
49
|
+
items.forEach((item) => {
|
|
50
50
|
if (!item.rowspan || item.rowspan < 2) {
|
|
51
51
|
col.push(item);
|
|
52
52
|
}
|
|
@@ -64,9 +64,9 @@ export default {
|
|
|
64
64
|
},
|
|
65
65
|
types() {
|
|
66
66
|
let types = [];
|
|
67
|
-
this.theads.forEach(items => {
|
|
67
|
+
this.theads.forEach((items) => {
|
|
68
68
|
if (Array.isArray(items)) {
|
|
69
|
-
items.forEach(item => {
|
|
69
|
+
items.forEach((item) => {
|
|
70
70
|
if (item.type && item.type !== 'text' && item.type !== 'textarea') {
|
|
71
71
|
types.push(item);
|
|
72
72
|
}
|
|
@@ -91,9 +91,9 @@ export default {
|
|
|
91
91
|
deep: true,
|
|
92
92
|
handler(val) {
|
|
93
93
|
if (val) {
|
|
94
|
-
val.forEach(items => {
|
|
94
|
+
val.forEach((items) => {
|
|
95
95
|
if (Array.isArray(items)) {
|
|
96
|
-
items.forEach(item => {
|
|
96
|
+
items.forEach((item) => {
|
|
97
97
|
this.getOptions(item);
|
|
98
98
|
});
|
|
99
99
|
} else {
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
params: params,
|
|
122
122
|
data: params
|
|
123
123
|
})
|
|
124
|
-
.then(res => {
|
|
124
|
+
.then((res) => {
|
|
125
125
|
if (res.rCode === 0) {
|
|
126
126
|
this.option[item.field || item.prop] = JSON.parse(
|
|
127
127
|
JSON.stringify(res.results)
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
this.$message.error(msg);
|
|
138
138
|
}
|
|
139
139
|
})
|
|
140
|
-
.catch(err => {
|
|
140
|
+
.catch((err) => {
|
|
141
141
|
if (err.message && err.message !== 'canceled') {
|
|
142
142
|
this.$message.error(err.message);
|
|
143
143
|
}
|
|
@@ -147,21 +147,28 @@ export default {
|
|
|
147
147
|
},
|
|
148
148
|
render(h) {
|
|
149
149
|
let tag = this.elForm ? 'div' : 'form';
|
|
150
|
-
return h(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
150
|
+
return h(
|
|
151
|
+
tag,
|
|
152
|
+
{
|
|
153
|
+
class: { 'es-data-form-full': this.full, 'es-data-table-form': 1 }
|
|
154
|
+
},
|
|
155
|
+
[
|
|
156
|
+
h('eo-table', {
|
|
157
|
+
props: {
|
|
158
|
+
cols: this.cols,
|
|
159
|
+
thead: this.theads,
|
|
160
|
+
numbers: this.numbers,
|
|
161
|
+
cols: this.cols,
|
|
162
|
+
data: this.models,
|
|
163
|
+
types: this.types,
|
|
164
|
+
options: this.options,
|
|
165
|
+
page: this.page,
|
|
166
|
+
...this.$attrs
|
|
167
|
+
},
|
|
168
|
+
on: this.$listeners
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
);
|
|
165
172
|
}
|
|
166
173
|
};
|
|
167
174
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="es-data-form">
|
|
2
|
+
<div class="es-data-form" :class="{ 'es-data-form-haspage': page }">
|
|
3
3
|
<el-scrollbar class="es-scrollbar" :style="{ height: height }">
|
|
4
4
|
<table
|
|
5
5
|
class="es-data-table-form"
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
<es-select
|
|
50
50
|
v-else-if="item.type === 'select' && selectShow"
|
|
51
51
|
class="es-data-table-form-handle"
|
|
52
|
+
:suffix="false"
|
|
52
53
|
v-bind="exclAttribute({ data: item, attrs: 'width' })"
|
|
53
54
|
v-model="selectValue"
|
|
54
55
|
ref="tableSelect"
|
|
@@ -113,6 +114,11 @@ export default {
|
|
|
113
114
|
eoTable: this
|
|
114
115
|
};
|
|
115
116
|
},
|
|
117
|
+
inject: {
|
|
118
|
+
esDialog: {
|
|
119
|
+
default: ''
|
|
120
|
+
}
|
|
121
|
+
},
|
|
116
122
|
props: {
|
|
117
123
|
height: String,
|
|
118
124
|
readonly: Boolean,
|
|
@@ -186,8 +192,15 @@ export default {
|
|
|
186
192
|
}
|
|
187
193
|
},
|
|
188
194
|
setStyle(res, data, field) {
|
|
189
|
-
|
|
190
|
-
|
|
195
|
+
let left = 0;
|
|
196
|
+
let top = 0;
|
|
197
|
+
if (this.esDialog) {
|
|
198
|
+
let style = this.esDialog.getDialog().getBoundingClientRect();
|
|
199
|
+
left = style.left;
|
|
200
|
+
top = style.top;
|
|
201
|
+
}
|
|
202
|
+
this.style.left = res ? res.left - left + 'px' : '';
|
|
203
|
+
this.style.top = res ? res.top - top + 'px' : '';
|
|
191
204
|
this.style.width = res ? res.width + 'px' : '';
|
|
192
205
|
this.target = data;
|
|
193
206
|
this.field = field;
|
|
@@ -109,7 +109,7 @@ export default {
|
|
|
109
109
|
let active =
|
|
110
110
|
typeof this.defaultActive === 'string'
|
|
111
111
|
? this.defaultActive
|
|
112
|
-
: this.defaultActive.length
|
|
112
|
+
: this.defaultActive && this.defaultActive.length
|
|
113
113
|
? this.defaultActive[this.defaultActive.length - 1]
|
|
114
114
|
: undefined;
|
|
115
115
|
return active;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.es-calendar{background-color:#fff}.es-calendar .es-calendar-title{height:44px;padding:12px 30px;background-color:#fff;font-family:PingFang SC,PingFang SC;font-weight:400;font-size:14px;color:#262626;line-height:20px;text-align:center;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.es-calendar .es-calendar-title .es-calendar-next,.es-calendar .es-calendar-title .es-calendar-prev{cursor:pointer;font-size:14px;color:#8c8c8c;line-height:20px}.es-calendar .es-calendar-title .es-calendar-prev{margin-right:8px}.es-calendar .es-calendar-title .es-calendar-next{margin-left:8px}.es-calendar .es-calendar-title .es-title{width:86px}.es-calendar .es-calendar-weeks{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.es-calendar .es-calendar-weeks .es-week{width:14.28571%;height:20px;text-align:center;line-height:20px;font-weight:400;font-size:12px;color:#8c8c8c}.es-calendar .es-calendar-days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.es-calendar .es-calendar-days .es-day{width:14.28571%;height:44px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.es-calendar .es-calendar-days .es-day .es-day-item{width:28px;height:28px;font-weight:400;font-size:14px;color:#262626;text-align:center;line-height:28px;position:relative;cursor:pointer}.es-calendar .es-calendar-days .es-day .es-day-item.es-disabled-day{color:#bfbfbf}.es-calendar .es-calendar-days .es-day .es-day-item.es-today{color:#2778e5;border:1px solid #2778e5;line-height:26px;border-radius:15px}.es-calendar .es-calendar-days .es-day .es-day-item.es-select{color:#fff;background-color:#2778e5;border-radius:15px}.es-calendar .es-calendar-switch{height:22px;line-height:22px;font-weight:700;text-align:center;color:#8c8c8c}.es-calendar .es-calendar-switch .es-switch-icon{font-size:14px;cursor:pointer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.es-data-form,.es-data-table-form td .es-input-box,.es-data-table-form th .es-input-box{position:relative}.es-data-table-form{min-width:100%;border-color:#e1e1e1;background-color:#fff;font-size:14px;table-layout:fixed}.es-data-table-form td,.es-data-table-form th{padding:6px;line-height:28px}.es-data-table-form td.numbers,.es-data-table-form th.numbers{text-align:center}.es-data-table-form td .cell,.es-data-table-form th .cell{min-height:28px}.es-data-table-form td .cell.is-textarea,.es-data-table-form th .cell.is-textarea{line-height:20px}.es-data-table-form td .cell.es-required::before,.es-data-table-form th .cell.es-required::before{content:'*';color:#f56c6c}.es-data-table-form td .es-input-box .es-select-multiple,.es-data-table-form th .es-input-box .es-select-multiple{height:auto;min-height:40px;line-height:1;padding:4px 6px 4px 0}.es-data-table-form td .es-input-box .es-select-multiple .el-tag,.es-data-table-form th .es-input-box .es-select-multiple .el-tag{margin:2px 0 2px 6px}.es-data-table-form .es-data-form-head{background-color:#f8f8f8}.es-data-form .es-table-page{height:46px;text-align:center;border:1px solid #e1e1e1;padding:8px 12px;margin-top:-1px;background-color:#f8f8f8}.es-data-form .es-data-table-form-handle{position:fixed;opacity:0}
|
|
1
|
+
@charset "UTF-8";.es-data-form,.es-data-table-form td .es-input-box,.es-data-table-form th .es-input-box{position:relative}.es-data-table-form{min-width:100%;border-color:#e1e1e1;background-color:#fff;font-size:14px;table-layout:fixed}.es-data-table-form td,.es-data-table-form th{padding:6px;line-height:28px}.es-data-table-form td.numbers,.es-data-table-form th.numbers{text-align:center}.es-data-table-form td .cell,.es-data-table-form th .cell{min-height:28px}.es-data-table-form td .cell.is-textarea,.es-data-table-form th .cell.is-textarea{line-height:20px}.es-data-table-form td .cell.es-required::before,.es-data-table-form th .cell.es-required::before{content:'*';color:#f56c6c}.es-data-table-form td .es-input-box .es-select-multiple,.es-data-table-form th .es-input-box .es-select-multiple{height:auto;min-height:40px;line-height:1;padding:4px 6px 4px 0}.es-data-table-form td .es-input-box .es-select-multiple .el-tag,.es-data-table-form th .es-input-box .es-select-multiple .el-tag{margin:2px 0 2px 6px}.es-data-table-form .es-data-form-head{background-color:#f8f8f8}.es-data-table-form.es-data-form-full,.es-data-table-form.es-data-form-full .es-data-form{height:100%}.es-data-table-form.es-data-form-full .es-data-form.es-data-form-haspage .es-scrollbar{height:calc(100% - 46px)}.es-data-form .es-table-page{height:46px;text-align:center;border:1px solid #e1e1e1;padding:8px 12px;margin-top:-1px;background-color:#f8f8f8}.es-data-form .es-data-table-form-handle{position:fixed;opacity:0}
|