eoss-ui 0.4.65 → 0.4.66
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-group.js +17 -8
- package/lib/button.js +17 -8
- package/lib/checkbox-group.js +17 -8
- package/lib/data-table-form.js +17 -8
- package/lib/data-table.js +17 -8
- package/lib/date-picker.js +17 -8
- package/lib/dialog.js +17 -8
- package/lib/eoss-ui.common.js +6646 -6148
- package/lib/flow-group.js +17 -8
- package/lib/flow-list.js +17 -8
- package/lib/flow.js +22 -12
- package/lib/form.js +8648 -8278
- package/lib/handle-user.js +17 -8
- package/lib/handler.js +17 -8
- package/lib/index.js +1 -1
- package/lib/input-number.js +17 -8
- package/lib/input.js +37 -15
- package/lib/login.js +22 -15
- package/lib/main.js +78 -60
- package/lib/nav.js +20 -11
- package/lib/page.js +17 -8
- package/lib/player.js +17 -8
- package/lib/qr-code.js +17 -8
- package/lib/radio-group.js +17 -8
- package/lib/retrial-auth.js +17 -8
- package/lib/select-ganged.js +17 -8
- package/lib/select.js +17 -8
- package/lib/selector-panel.js +17 -8
- package/lib/selector.js +17 -8
- package/lib/sizer.js +17 -8
- package/lib/steps.js +17 -8
- package/lib/switch.js +17 -8
- package/lib/table-form.js +1320 -1204
- package/lib/tabs.js +17 -8
- package/lib/tips.js +17 -8
- package/lib/tree-group.js +17 -8
- package/lib/tree.js +17 -8
- package/lib/upload.js +17 -8
- package/lib/utils/util.js +17 -8
- package/lib/wujie.js +17 -8
- package/lib/wxlogin.js +17 -8
- package/package.json +2 -2
- package/packages/flow/src/main.vue +6 -5
- package/packages/form/src/main.vue +1435 -1313
- package/packages/form/src/table.vue +375 -318
- package/packages/input/src/main.vue +20 -7
- package/packages/login/src/main.vue +3 -5
- package/packages/main/src/main.vue +60 -54
- package/packages/nav/src/main.vue +1 -1
- package/src/index.js +1 -1
- package/src/utils/util.js +18 -8
|
@@ -48,9 +48,18 @@ export default {
|
|
|
48
48
|
scope: {},
|
|
49
49
|
exclude: Boolean
|
|
50
50
|
},
|
|
51
|
+
watch: {
|
|
52
|
+
data: {
|
|
53
|
+
immediate: true,
|
|
54
|
+
deep: true,
|
|
55
|
+
handler(val) {
|
|
56
|
+
this.results = val;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
51
60
|
data() {
|
|
52
61
|
return {
|
|
53
|
-
results:
|
|
62
|
+
results: []
|
|
54
63
|
};
|
|
55
64
|
},
|
|
56
65
|
computed: {
|
|
@@ -120,7 +129,7 @@ export default {
|
|
|
120
129
|
},
|
|
121
130
|
mounted() {},
|
|
122
131
|
methods: {
|
|
123
|
-
getData(query, callback) {
|
|
132
|
+
getData(query, callback, isChange) {
|
|
124
133
|
if (typeof this.url && this.results.length === 0) {
|
|
125
134
|
util
|
|
126
135
|
.ajax({
|
|
@@ -145,17 +154,21 @@ export default {
|
|
|
145
154
|
});
|
|
146
155
|
} else {
|
|
147
156
|
let results = query
|
|
148
|
-
? this.results.filter(this.searchFilter(query))
|
|
157
|
+
? this.results.filter(this.searchFilter(query, isChange))
|
|
149
158
|
: this.results;
|
|
150
159
|
callback(results);
|
|
151
160
|
}
|
|
152
161
|
},
|
|
153
|
-
searchFilter(query) {
|
|
162
|
+
searchFilter(query, isChange) {
|
|
154
163
|
return (state) => {
|
|
155
|
-
if (
|
|
156
|
-
return state.value.
|
|
164
|
+
if (isChange) {
|
|
165
|
+
return state.value.indexOf(query) > -1;
|
|
157
166
|
} else {
|
|
158
|
-
|
|
167
|
+
if (this.exclude) {
|
|
168
|
+
return state.value !== query;
|
|
169
|
+
} else {
|
|
170
|
+
return state.value === query;
|
|
171
|
+
}
|
|
159
172
|
}
|
|
160
173
|
};
|
|
161
174
|
},
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
:focusShow="focusShow"
|
|
66
66
|
:data="users"
|
|
67
67
|
@select="handleBlur"
|
|
68
|
-
autocomplete="
|
|
68
|
+
:autocomplete="true"
|
|
69
69
|
>
|
|
70
70
|
<template slot="prefix">
|
|
71
71
|
<i class="es-icon-zhanghao es-label-user"></i>
|
|
@@ -849,10 +849,8 @@ export default {
|
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
},
|
|
852
|
-
handleBlur() {
|
|
853
|
-
|
|
854
|
-
this.getRemember(this.formData.username);
|
|
855
|
-
}
|
|
852
|
+
handleBlur(res) {
|
|
853
|
+
this.getRemember(res.value);
|
|
856
854
|
},
|
|
857
855
|
handleRemember() {
|
|
858
856
|
let values = localStorage.getItem('unpd');
|
|
@@ -707,13 +707,16 @@ export default {
|
|
|
707
707
|
}
|
|
708
708
|
},
|
|
709
709
|
setTitle(id) {
|
|
710
|
+
let node;
|
|
710
711
|
for (let i = 0; i < this.menus.length; i++) {
|
|
711
712
|
let item = this.menus[i];
|
|
712
713
|
if (item.id == id) {
|
|
713
714
|
this.title = item.text;
|
|
714
|
-
|
|
715
|
+
node = item;
|
|
716
|
+
break;
|
|
715
717
|
}
|
|
716
718
|
}
|
|
719
|
+
return node;
|
|
717
720
|
},
|
|
718
721
|
renderMenu() {
|
|
719
722
|
if (this.data !== undefined && this.data.length) {
|
|
@@ -1224,6 +1227,7 @@ export default {
|
|
|
1224
1227
|
},
|
|
1225
1228
|
//设置默认导航页面
|
|
1226
1229
|
setDefault(res, active) {
|
|
1230
|
+
this.navIds = JSON.parse(JSON.stringify(active));
|
|
1227
1231
|
this.sysId = '';
|
|
1228
1232
|
this.tabsId = '';
|
|
1229
1233
|
this.active = '';
|
|
@@ -1335,18 +1339,7 @@ export default {
|
|
|
1335
1339
|
},
|
|
1336
1340
|
//应用导航交互
|
|
1337
1341
|
handleSelect(res, type, open) {
|
|
1338
|
-
console.log(type, 11);
|
|
1339
1342
|
const { node, fourthTabs } = res;
|
|
1340
|
-
let openIdex = 0;
|
|
1341
|
-
if (
|
|
1342
|
-
node.extendData &&
|
|
1343
|
-
(node.extendData.subDefOpenIndex || node.extendData.subDefOpen)
|
|
1344
|
-
) {
|
|
1345
|
-
openIdex = parseInt(
|
|
1346
|
-
node.extendData.subDefOpenIndex || node.extendData.subDefOpen,
|
|
1347
|
-
10
|
|
1348
|
-
);
|
|
1349
|
-
}
|
|
1350
1343
|
if (!open) {
|
|
1351
1344
|
if (
|
|
1352
1345
|
node.extendData &&
|
|
@@ -1370,7 +1363,7 @@ export default {
|
|
|
1370
1363
|
this.menu = node.children;
|
|
1371
1364
|
this.title = node.text;
|
|
1372
1365
|
if (this.setFirstAsDefault) {
|
|
1373
|
-
let subNode = this.getFirst(node
|
|
1366
|
+
let subNode = this.getFirst(node);
|
|
1374
1367
|
if (subNode) {
|
|
1375
1368
|
this.active = subNode.id;
|
|
1376
1369
|
this.navIds = [
|
|
@@ -1392,7 +1385,14 @@ export default {
|
|
|
1392
1385
|
this.menu = node.children;
|
|
1393
1386
|
this.title = node.text;
|
|
1394
1387
|
if (this.setFirstAsDefault) {
|
|
1395
|
-
|
|
1388
|
+
let subNode = this.getFirst(node);
|
|
1389
|
+
if (subNode) {
|
|
1390
|
+
this.active = subNode.id;
|
|
1391
|
+
this.navIds = [
|
|
1392
|
+
node.id,
|
|
1393
|
+
...this.getId(node.children, subNode.url, true)
|
|
1394
|
+
];
|
|
1395
|
+
}
|
|
1396
1396
|
}
|
|
1397
1397
|
this.isSide = true;
|
|
1398
1398
|
}
|
|
@@ -1414,48 +1414,59 @@ export default {
|
|
|
1414
1414
|
case 'menu':
|
|
1415
1415
|
if (!open) {
|
|
1416
1416
|
this.tabs = [];
|
|
1417
|
-
if (this.
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
this.active = node.id;
|
|
1422
|
-
}
|
|
1417
|
+
if (this.biserial) {
|
|
1418
|
+
this.$set(this.active, 1, node.id);
|
|
1419
|
+
} else {
|
|
1420
|
+
this.active = node.id;
|
|
1423
1421
|
}
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1422
|
+
if (node.url) {
|
|
1423
|
+
if (node.children && node.children.length) {
|
|
1424
|
+
let tab = node.children.filter((item) => {
|
|
1425
|
+
return item.url === node.url;
|
|
1426
|
+
})[0];
|
|
1427
|
+
if (tab) {
|
|
1428
|
+
if (this.biserial) {
|
|
1429
|
+
this.$set(this.active, 1, tab.id);
|
|
1430
|
+
} else {
|
|
1431
|
+
this.active = tab.id;
|
|
1432
|
+
}
|
|
1433
|
+
this.navIds = this.getId(this.menus, tab.url, true);
|
|
1434
|
+
}
|
|
1435
|
+
} else {
|
|
1436
|
+
let tab = (node.fourthTabs || []).filter((item) => {
|
|
1437
|
+
return item.url === node.url;
|
|
1438
|
+
})[0];
|
|
1439
|
+
if (tab) {
|
|
1440
|
+
this.tabs = node.fourthTabs;
|
|
1441
|
+
this.tabsId = tab.id;
|
|
1442
|
+
this.navIds = this.getId(this.menus, tab.url, true);
|
|
1433
1443
|
} else {
|
|
1434
|
-
this.
|
|
1444
|
+
this.navIds = this.getId(this.menus, node.url, true);
|
|
1435
1445
|
}
|
|
1436
|
-
this.navIds = this.getId(this.menus, tab.url, true);
|
|
1437
1446
|
}
|
|
1438
1447
|
} else {
|
|
1439
|
-
|
|
1440
|
-
return item.url === node.url;
|
|
1441
|
-
})[0];
|
|
1442
|
-
if (tab) {
|
|
1448
|
+
if (node.fourthTabs.length) {
|
|
1443
1449
|
this.tabs = node.fourthTabs;
|
|
1444
|
-
this.tabsId =
|
|
1445
|
-
this.
|
|
1450
|
+
this.tabsId = this.tabs[0].id;
|
|
1451
|
+
this.handleJump(
|
|
1452
|
+
this.tabs[0].url,
|
|
1453
|
+
this.tabs[0].urlopenmode,
|
|
1454
|
+
this.tabs[0]
|
|
1455
|
+
);
|
|
1456
|
+
this.navIds = this.getId(this.menus, this.tabs[0].url, true);
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
} else if (this.setFirstAsDefault) {
|
|
1460
|
+
this.tabs = [];
|
|
1461
|
+
let subNode = this.getFirst(node);
|
|
1462
|
+
if (subNode) {
|
|
1463
|
+
if (this.biserial) {
|
|
1464
|
+
this.$set(this.active, 1, subNode.id);
|
|
1446
1465
|
} else {
|
|
1447
|
-
this.
|
|
1466
|
+
this.active = subNode.id;
|
|
1448
1467
|
}
|
|
1468
|
+
this.navIds = this.getId(this.menus, subNode.url, true);
|
|
1449
1469
|
}
|
|
1450
|
-
} else if (node.fourthTabs.length) {
|
|
1451
|
-
this.tabs = node.fourthTabs;
|
|
1452
|
-
this.tabsId = this.tabs[0].id;
|
|
1453
|
-
this.handleJump(
|
|
1454
|
-
this.tabs[0].url,
|
|
1455
|
-
this.tabs[0].urlopenmode,
|
|
1456
|
-
this.tabs[0]
|
|
1457
|
-
);
|
|
1458
|
-
this.navIds = this.getId(this.menus, this.tabs[0].url, true);
|
|
1459
1470
|
}
|
|
1460
1471
|
break;
|
|
1461
1472
|
case 'tabs':
|
|
@@ -1671,13 +1682,8 @@ export default {
|
|
|
1671
1682
|
}
|
|
1672
1683
|
}
|
|
1673
1684
|
} else {
|
|
1674
|
-
if (menus.fourthTabs && menus.fourthTabs.length) {
|
|
1675
|
-
|
|
1676
|
-
let item = menus.fourthTabs[i];
|
|
1677
|
-
if (item.id === id) {
|
|
1678
|
-
return item;
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1685
|
+
if (menus.fourthTabs && menus.fourthTabs.length && menus.id === id) {
|
|
1686
|
+
return menus;
|
|
1681
1687
|
}
|
|
1682
1688
|
if (menus.children && menus.children.length) {
|
|
1683
1689
|
for (let i = 0; i < menus.children.length; i++) {
|
package/src/index.js
CHANGED
package/src/utils/util.js
CHANGED
|
@@ -2249,16 +2249,19 @@ const uuid = function (len) {
|
|
|
2249
2249
|
**/
|
|
2250
2250
|
const watermark = function (option) {
|
|
2251
2251
|
// 默认设置
|
|
2252
|
+
let _width = parseInt(option.width || 480, 10) ;
|
|
2253
|
+
let _height = parseInt(option.width || 180, 10);
|
|
2254
|
+
let _rows = Math.round(document.body.clientHeight / _height);
|
|
2255
|
+
let _cols = Math.round(document.body.clientWidth / _width);
|
|
2252
2256
|
let config = {
|
|
2253
|
-
rows:
|
|
2254
|
-
cols:
|
|
2257
|
+
rows: _rows, // 水印行数
|
|
2258
|
+
cols: _cols,
|
|
2255
2259
|
html: '水印示例', // 水印文本内容
|
|
2256
2260
|
angle: -15, // 旋转角度
|
|
2257
2261
|
color: '#000', // 水印文字颜色
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
lineHeight: 120, // 水印行高
|
|
2262
|
+
minWidth: _width, // 水印最小宽度
|
|
2263
|
+
height: _height, // 水印高度
|
|
2264
|
+
lineHeight: 20, // 水印行高
|
|
2262
2265
|
opacity: 0.1, // 水印透明度
|
|
2263
2266
|
fontSize: 14, // 水印文字字体大小
|
|
2264
2267
|
fontWeight: 400, // 水印字体粗细
|
|
@@ -2279,18 +2282,25 @@ const watermark = function (option) {
|
|
|
2279
2282
|
return false;
|
|
2280
2283
|
};
|
|
2281
2284
|
let docFrag = document.createDocumentFragment();
|
|
2282
|
-
let { rows, cols, html, angle, color,
|
|
2285
|
+
let { rows, cols, html, angle, color, minWidth, height, lineHeight, opacity, fontSize, fontWeight, fontFamily, textAlign, zIndex } = options;
|
|
2283
2286
|
|
|
2284
2287
|
wrap.style.cssText = 'display: flex;align-items: center;justify-content: flex-start;flex-wrap: wrap;align-content: space-between;position: fixed;left: 50%;top: 50%;transform: translate(-50%, -50%);height: 100vh;width: 100vw;pointer-events: none;overflow: hidden;background: transparent;z-index: ' + zIndex + ';';
|
|
2285
2288
|
let num = rows * cols;
|
|
2286
2289
|
for (let i = 0; i < num; i++) {
|
|
2287
2290
|
let item = document.createElement('div');
|
|
2288
2291
|
item.innerHTML = html;
|
|
2289
|
-
item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (
|
|
2292
|
+
item.style.cssText = 'flex-grow: 1;flex-shrink: 0;color: ' + color + ';text-align: ' + textAlign + ';width: ' + (100 / cols) + '%;min-width: ' + (minWidth ? parseInt(minWidth, 10) + 'px' : '') + ';height: ' + height + 'px;line-height: ' + lineHeight + 'px;font-size:' + fontSize + 'px;font-weight: ' + fontWeight + ';font-family: ' + fontFamily + ';text-align: ' + textAlign + ';transform: rotate(' + angle + 'deg);opacity: ' + opacity + ';';
|
|
2290
2293
|
docFrag.appendChild(item);
|
|
2291
2294
|
}
|
|
2292
2295
|
wrap.appendChild(docFrag);
|
|
2293
2296
|
document.body.appendChild(wrap);
|
|
2297
|
+
let _timeout;
|
|
2298
|
+
window.onresize = function () {
|
|
2299
|
+
clearTimeout(_timeout);
|
|
2300
|
+
_timeout = setTimeout(function () {
|
|
2301
|
+
watermark(options);
|
|
2302
|
+
}, 1000);
|
|
2303
|
+
};
|
|
2294
2304
|
};
|
|
2295
2305
|
|
|
2296
2306
|
export default {
|