xs-common-plugins 1.0.6 → 1.0.10
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/README.md +19 -1
- package/package.json +1 -1
- package/src/App.vue +11 -11
- package/src/common/createMenuId.js +7 -7
- package/src/common/uploadImgToBase64.js +12 -12
- package/src/common/utils.js +95 -95
- package/src/components/Breadcrumb/index.vue +81 -81
- package/src/components/Col_TableCell/data.js +4 -4
- package/src/components/Col_TableCell/index.scss +77 -77
- package/src/components/Col_TableCell/index.vue +43 -43
- package/src/components/Col_TableCell/methods.js +19 -19
- package/src/components/Hamburger/index.vue +44 -44
- package/src/components/ReportCmp/data.js +3 -3
- package/src/components/ReportCmp/index.scss +29 -29
- package/src/components/ReportCmp/index.vue +76 -76
- package/src/components/ReportCmp/methods.js +30 -30
- package/src/components/Search/cascader/data.js +3 -3
- package/src/components/Search/cascader/index.scss +17 -17
- package/src/components/Search/cascader/index.vue +96 -96
- package/src/components/Search/cascader/methods.js +41 -41
- package/src/components/Search/data.js +5 -5
- package/src/components/Search/hk_cascader/index.vue +104 -104
- package/src/components/Search/hk_cascader_qudao/index.vue +94 -94
- package/src/components/Search/index.vue +406 -404
- package/src/components/Search/methods.js +86 -86
- package/src/components/Search/product_option/data.js +3 -3
- package/src/components/Search/product_option/index.scss +68 -68
- package/src/components/Search/product_option/index.vue +419 -419
- package/src/components/Search/product_option/methods.js +46 -46
- package/src/components/Search/select/data.js +3 -3
- package/src/components/Search/select/index.scss +2 -2
- package/src/components/Search/select/index.vue +114 -114
- package/src/components/Search/select/methods.js +51 -51
- package/src/components/Search_filter/data.js +5 -5
- package/src/components/Search_filter/index.vue +88 -88
- package/src/components/Search_filter/methods.js +43 -43
- package/src/components/TableCmp/data.js +3 -3
- package/src/components/TableCmp/index.scss +22 -22
- package/src/components/TableCmp/index.vue +98 -98
- package/src/components/TableCmp/methods.js +35 -35
- package/src/components/home/BarChart.vue +118 -118
- package/src/components/home/LineChart.vue +146 -146
- package/src/components/home/Panel.vue +135 -135
- package/src/components/home/PanelGroup.vue +146 -146
- package/src/components/home/PieChart.vue +81 -81
- package/src/components/home/RaddarChart.vue +119 -119
- package/src/components/home/TabLayout.vue +88 -88
- package/src/components/home/TableList.vue +158 -158
- package/src/components/home/Teng.vue +248 -248
- package/src/components/home/TransactionTable.vue +49 -49
- package/src/components/home/mixins/resize.js +55 -55
- package/src/components/im/index.vue +155 -156
- package/src/components/im/methods.js +25 -25
- package/src/components/image-singleUpload/data.js +3 -3
- package/src/components/image-singleUpload/index.scss +26 -26
- package/src/components/image-singleUpload/index.vue +56 -56
- package/src/components/image-singleUpload/methods.js +30 -30
- package/src/components/image-upload/data.js +7 -7
- package/src/components/image-upload/index.vue +41 -41
- package/src/components/image-upload/methods.js +80 -80
- package/src/components/multiple-image-upload/data.js +11 -11
- package/src/components/multiple-image-upload/index.scss +8 -8
- package/src/components/multiple-image-upload/index.vue +63 -63
- package/src/components/multiple-image-upload/methods.js +45 -45
- package/src/components/pro-upload/data.js +3 -3
- package/src/components/pro-upload/index.scss +4 -4
- package/src/components/pro-upload/index.vue +89 -89
- package/src/components/pro-upload/methods.js +86 -86
- package/src/components/report_set/index.scss +44 -44
- package/src/components/report_set/index.vue +153 -153
- package/src/components/search-page/src/index.scss +5 -5
- package/src/components/search-page/src/index.vue +76 -76
- package/src/components/search-page/src/methods.js +36 -36
- package/src/mixin/dialog.js +31 -31
- package/src/mixin/dlg.js +46 -46
- package/src/mixin/newDialog.js +19 -19
- package/src/mixin/report.js +82 -82
- package/src/mixin/table.js +93 -93
- package/src/mixin/tableCell/colTableCell_analysis.js +103 -103
- package/src/mixin/upload.js +22 -22
- package/src/mixin/vmodel.js +26 -26
- package/src/plugins/im/components/chat/index.vue +1 -0
- package/src/plugins/im/components/chat/methods.js +1 -1
- package/src/plugins/im/components/conversation-list/index.css +91 -91
- package/src/plugins/im/components/conversation-list/index.json +3 -3
- package/src/plugins/im/components/conversation-list/index.vue +89 -89
- package/src/plugins/im/components/loading/loading.css +69 -69
- package/src/plugins/im/components/loading/loading.json +3 -3
- package/src/plugins/im/components/loading/loading.vue +14 -14
- package/src/plugins/im/components/msg-image/index.json +3 -3
- package/src/plugins/im/components/msg-text/index.json +3 -3
- package/src/plugins/im/components/msg-text/index.vue +24 -24
- package/src/plugins/im/im-plug-in/Protobuf-2.3.7.min.js +1 -1
- package/src/plugins/im/im-plug-in/RongCallLib-3.1.5.min.js +74 -74
- package/src/plugins/im/im-plug-in/RongIMLib-4.1.0.js +17420 -17420
- package/src/plugins/im/im-plug-in/init.js +216 -216
- package/src/plugins/im/im-plug-in/qiniu.js +266 -266
- package/src/plugins/im/im-plug-in/send-data.js +431 -431
- package/src/plugins/im/im-plug-in/upload.js +232 -232
- package/src/plugins/im/lib/RongIMEmoji-2.2.6.js +332 -332
- package/src/plugins/im/lib/RongIMLib-3.0.7.2-dev.js +11635 -11635
- package/src/plugins/im/lib/RongIMLib-3.0.7.2-dev.min.js +6 -6
- package/src/plugins/im/utils/underscore-1.8.3.js +1531 -1531
- package/src/plugins/im/utils/utils.js +149 -149
- package/src/plugins/row-col-cmp/colCmp/data.js +3 -3
- package/src/plugins/row-col-cmp/colCmp/index.scss +50 -50
- package/src/plugins/row-col-cmp/colCmp/index.vue +53 -53
- package/src/plugins/row-col-cmp/colCmp/methods.js +25 -25
- package/src/plugins/row-col-cmp/rowCmp/data.js +3 -3
- package/src/plugins/row-col-cmp/rowCmp/index.scss +3 -3
- package/src/plugins/row-col-cmp/rowCmp/index.vue +43 -43
- package/src/plugins/row-col-cmp/rowCmp/methods.js +29 -29
- package/src/router/index.js +43 -43
- package/src/store/getters.js +13 -13
- package/src/store/index.js +58 -58
- package/src/store/modules/app.js +55 -55
- package/src/store/modules/settings.js +28 -28
- package/src/store/modules/user.js +94 -94
- package/src/store/modules/widgetdata.js +42 -42
- package/src/styles/element-ui.scss +49 -49
- package/src/styles/index.scss +0 -1
- package/src/styles/mixin.scss +28 -28
- package/src/styles/sidebar.scss +210 -210
- package/src/styles/table.scss +7 -8
- package/src/styles/transition.scss +48 -48
- package/src/styles/variables.scss +25 -25
- package/src/utils/get-page-title.js +10 -10
- package/src/utils/global-config.js +15 -15
- package/src/utils/index.js +332 -332
- package/src/utils/localStorage.js +21 -21
- package/src/utils/validate.js +20 -20
- package/src/views/layout/components/AllSearch/index.vue +44 -44
- package/src/views/layout/components/AppMain.vue +50 -50
- package/src/views/layout/components/Sidebar/FixiOSBug.js +26 -26
- package/src/views/layout/components/Sidebar/Item.vue +28 -28
- package/src/views/layout/components/Sidebar/Link.vue +34 -34
- package/src/views/layout/components/Sidebar/Logo.vue +79 -79
- package/src/views/layout/components/Sidebar/SidebarItem.vue +67 -67
- package/src/views/layout/components/Sidebar/index.vue +114 -114
- package/src/views/layout/components/index.js +3 -3
- package/src/views/layout/index.vue +105 -105
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
let underscore = require('./underscore-1.8.3.js');
|
|
2
|
-
const left_zero_4 = (str) => {
|
|
3
|
-
if (str != null && str != '' && str != 'undefined') {
|
|
4
|
-
if (str.length == 2) {
|
|
5
|
-
return '00' + str;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return str;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const toUnicode = (str) => {
|
|
12
|
-
var value = '';
|
|
13
|
-
for (var i = 0; i < str.length; i++) {
|
|
14
|
-
value += '\\u' + left_zero_4(parseInt(str.charCodeAt(i)).toString(16));
|
|
15
|
-
}
|
|
16
|
-
return value;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let utils = {
|
|
20
|
-
copy: (val) => {
|
|
21
|
-
return JSON.parse(JSON.stringify(val));
|
|
22
|
-
},
|
|
23
|
-
tplEngine: (temp, data, regexp) => {
|
|
24
|
-
if (!(Object.prototype.toString.call(data) === "[object Array]")) data = [data];
|
|
25
|
-
var ret = [];
|
|
26
|
-
for (var i = 0, j = data.length; i < j; i++) {
|
|
27
|
-
ret.push(replaceAction(data[i]));
|
|
28
|
-
}
|
|
29
|
-
return ret.join("");
|
|
30
|
-
|
|
31
|
-
function replaceAction(object) {
|
|
32
|
-
return temp.replace(regexp || (/\\?\{([^}]+)\}/g), function (match, name) {
|
|
33
|
-
if (match.charAt(0) == '\\') return match.slice(1);
|
|
34
|
-
return (object[name] != undefined) ? object[name] : '{' + name + '}';
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
deepCopy: (obj) => {
|
|
39
|
-
return JSON.parse(JSON.stringify(obj));
|
|
40
|
-
},
|
|
41
|
-
rename: (obj, newNames) => {
|
|
42
|
-
return underscore.reduce(newNames, function (memo, val, index) {
|
|
43
|
-
memo[val] = obj[index];
|
|
44
|
-
return memo;
|
|
45
|
-
}, underscore.omit(obj, underscore.keys(newNames)));
|
|
46
|
-
},
|
|
47
|
-
dateFormat: (date, fmt) => {
|
|
48
|
-
var o = {
|
|
49
|
-
'M+': date.getMonth() + 1, //月份
|
|
50
|
-
'd+': date.getDate(), //日
|
|
51
|
-
'h+': date.getHours(), //小时
|
|
52
|
-
'm+': date.getMinutes(), //分
|
|
53
|
-
's+': date.getSeconds(), //秒
|
|
54
|
-
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
|
|
55
|
-
'S': date.getMilliseconds() //毫秒
|
|
56
|
-
};
|
|
57
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
|
58
|
-
for (var k in o) {
|
|
59
|
-
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
|
|
60
|
-
}
|
|
61
|
-
return fmt;
|
|
62
|
-
},
|
|
63
|
-
formatMessage: (message) => {
|
|
64
|
-
let { messageDirection: direction, sentTime, messageUId: uId, messageType: name } = message;
|
|
65
|
-
direction = direction == 1 ? 'sender' : 'receiver';
|
|
66
|
-
underscore.extend(message, { direction, sentTime, uId, name });
|
|
67
|
-
},
|
|
68
|
-
// getAdapterheight: () => {
|
|
69
|
-
// let adapterHeight = 0;
|
|
70
|
-
|
|
71
|
-
// let { system, model } = my.getSystemInfoSync();
|
|
72
|
-
// let isIOS = () => {
|
|
73
|
-
// return (system.indexOf('iOS') != -1);
|
|
74
|
-
// };
|
|
75
|
-
// let isIPhoneX = () => {
|
|
76
|
-
// return (isIOS() && model.indexOf('X') != -1);
|
|
77
|
-
// };
|
|
78
|
-
|
|
79
|
-
// if (isIPhoneX()) {
|
|
80
|
-
// adapterHeight = 35;
|
|
81
|
-
// }
|
|
82
|
-
// return {
|
|
83
|
-
// adapterHeight
|
|
84
|
-
// };
|
|
85
|
-
// },
|
|
86
|
-
sliceArray: (arrs, options) => {
|
|
87
|
-
let result = [];
|
|
88
|
-
let { size } = options;
|
|
89
|
-
let index = 0;
|
|
90
|
-
let len = arrs.length;
|
|
91
|
-
let group = Math.ceil(len / size);
|
|
92
|
-
for (let i = 0; i < group; i++) {
|
|
93
|
-
result.push(arrs.splice(0, size));
|
|
94
|
-
}
|
|
95
|
-
return result;
|
|
96
|
-
},
|
|
97
|
-
compress: function ({ width, height }) {
|
|
98
|
-
let screenWidth = 200
|
|
99
|
-
let contentWidth = screenWidth * 0.65;
|
|
100
|
-
if (width > contentWidth) {
|
|
101
|
-
height = height * (contentWidth / width);
|
|
102
|
-
width = contentWidth;
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
width,
|
|
106
|
-
height
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
getTime: function (time) {
|
|
110
|
-
var today = new Date(utils.dateFormat(new Date(), 'yyyy/MM/dd'));
|
|
111
|
-
var thisTime = today.getTime();
|
|
112
|
-
if (thisTime - time < 0) {
|
|
113
|
-
return utils.dateFormat(new Date(time), 'hh:mm');
|
|
114
|
-
} else if (thisTime - time < 24 * 60 * 60 * 1000) {
|
|
115
|
-
return '昨天 ' + utils.dateFormat(new Date(time), 'hh:mm');
|
|
116
|
-
} else if (thisTime - time < 6 * 24 * 60 * 60 * 1000) {
|
|
117
|
-
var week = new Date(time).getDay();
|
|
118
|
-
switch (week) {
|
|
119
|
-
case 0:
|
|
120
|
-
week = '星期日';
|
|
121
|
-
break;
|
|
122
|
-
case 1:
|
|
123
|
-
week = '星期一';
|
|
124
|
-
break;
|
|
125
|
-
case 2:
|
|
126
|
-
week = '星期二';
|
|
127
|
-
break;
|
|
128
|
-
case 3:
|
|
129
|
-
week = '星期三';
|
|
130
|
-
break;
|
|
131
|
-
case 4:
|
|
132
|
-
week = '星期四';
|
|
133
|
-
break;
|
|
134
|
-
case 5:
|
|
135
|
-
week = '星期五';
|
|
136
|
-
break;
|
|
137
|
-
case 6:
|
|
138
|
-
week = '星期六';
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
return week + ' ' + utils.dateFormat(new Date(time), 'hh:mm');
|
|
142
|
-
} else {
|
|
143
|
-
return utils.dateFormat(new Date(time), 'yy/MM/dd hh:mm');
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
toUnicode
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
underscore.extend(utils, underscore);
|
|
1
|
+
let underscore = require('./underscore-1.8.3.js');
|
|
2
|
+
const left_zero_4 = (str) => {
|
|
3
|
+
if (str != null && str != '' && str != 'undefined') {
|
|
4
|
+
if (str.length == 2) {
|
|
5
|
+
return '00' + str;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return str;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const toUnicode = (str) => {
|
|
12
|
+
var value = '';
|
|
13
|
+
for (var i = 0; i < str.length; i++) {
|
|
14
|
+
value += '\\u' + left_zero_4(parseInt(str.charCodeAt(i)).toString(16));
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let utils = {
|
|
20
|
+
copy: (val) => {
|
|
21
|
+
return JSON.parse(JSON.stringify(val));
|
|
22
|
+
},
|
|
23
|
+
tplEngine: (temp, data, regexp) => {
|
|
24
|
+
if (!(Object.prototype.toString.call(data) === "[object Array]")) data = [data];
|
|
25
|
+
var ret = [];
|
|
26
|
+
for (var i = 0, j = data.length; i < j; i++) {
|
|
27
|
+
ret.push(replaceAction(data[i]));
|
|
28
|
+
}
|
|
29
|
+
return ret.join("");
|
|
30
|
+
|
|
31
|
+
function replaceAction(object) {
|
|
32
|
+
return temp.replace(regexp || (/\\?\{([^}]+)\}/g), function (match, name) {
|
|
33
|
+
if (match.charAt(0) == '\\') return match.slice(1);
|
|
34
|
+
return (object[name] != undefined) ? object[name] : '{' + name + '}';
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
deepCopy: (obj) => {
|
|
39
|
+
return JSON.parse(JSON.stringify(obj));
|
|
40
|
+
},
|
|
41
|
+
rename: (obj, newNames) => {
|
|
42
|
+
return underscore.reduce(newNames, function (memo, val, index) {
|
|
43
|
+
memo[val] = obj[index];
|
|
44
|
+
return memo;
|
|
45
|
+
}, underscore.omit(obj, underscore.keys(newNames)));
|
|
46
|
+
},
|
|
47
|
+
dateFormat: (date, fmt) => {
|
|
48
|
+
var o = {
|
|
49
|
+
'M+': date.getMonth() + 1, //月份
|
|
50
|
+
'd+': date.getDate(), //日
|
|
51
|
+
'h+': date.getHours(), //小时
|
|
52
|
+
'm+': date.getMinutes(), //分
|
|
53
|
+
's+': date.getSeconds(), //秒
|
|
54
|
+
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
|
|
55
|
+
'S': date.getMilliseconds() //毫秒
|
|
56
|
+
};
|
|
57
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
|
58
|
+
for (var k in o) {
|
|
59
|
+
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
|
|
60
|
+
}
|
|
61
|
+
return fmt;
|
|
62
|
+
},
|
|
63
|
+
formatMessage: (message) => {
|
|
64
|
+
let { messageDirection: direction, sentTime, messageUId: uId, messageType: name } = message;
|
|
65
|
+
direction = direction == 1 ? 'sender' : 'receiver';
|
|
66
|
+
underscore.extend(message, { direction, sentTime, uId, name });
|
|
67
|
+
},
|
|
68
|
+
// getAdapterheight: () => {
|
|
69
|
+
// let adapterHeight = 0;
|
|
70
|
+
|
|
71
|
+
// let { system, model } = my.getSystemInfoSync();
|
|
72
|
+
// let isIOS = () => {
|
|
73
|
+
// return (system.indexOf('iOS') != -1);
|
|
74
|
+
// };
|
|
75
|
+
// let isIPhoneX = () => {
|
|
76
|
+
// return (isIOS() && model.indexOf('X') != -1);
|
|
77
|
+
// };
|
|
78
|
+
|
|
79
|
+
// if (isIPhoneX()) {
|
|
80
|
+
// adapterHeight = 35;
|
|
81
|
+
// }
|
|
82
|
+
// return {
|
|
83
|
+
// adapterHeight
|
|
84
|
+
// };
|
|
85
|
+
// },
|
|
86
|
+
sliceArray: (arrs, options) => {
|
|
87
|
+
let result = [];
|
|
88
|
+
let { size } = options;
|
|
89
|
+
let index = 0;
|
|
90
|
+
let len = arrs.length;
|
|
91
|
+
let group = Math.ceil(len / size);
|
|
92
|
+
for (let i = 0; i < group; i++) {
|
|
93
|
+
result.push(arrs.splice(0, size));
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
},
|
|
97
|
+
compress: function ({ width, height }) {
|
|
98
|
+
let screenWidth = 200
|
|
99
|
+
let contentWidth = screenWidth * 0.65;
|
|
100
|
+
if (width > contentWidth) {
|
|
101
|
+
height = height * (contentWidth / width);
|
|
102
|
+
width = contentWidth;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
width,
|
|
106
|
+
height
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
getTime: function (time) {
|
|
110
|
+
var today = new Date(utils.dateFormat(new Date(), 'yyyy/MM/dd'));
|
|
111
|
+
var thisTime = today.getTime();
|
|
112
|
+
if (thisTime - time < 0) {
|
|
113
|
+
return utils.dateFormat(new Date(time), 'hh:mm');
|
|
114
|
+
} else if (thisTime - time < 24 * 60 * 60 * 1000) {
|
|
115
|
+
return '昨天 ' + utils.dateFormat(new Date(time), 'hh:mm');
|
|
116
|
+
} else if (thisTime - time < 6 * 24 * 60 * 60 * 1000) {
|
|
117
|
+
var week = new Date(time).getDay();
|
|
118
|
+
switch (week) {
|
|
119
|
+
case 0:
|
|
120
|
+
week = '星期日';
|
|
121
|
+
break;
|
|
122
|
+
case 1:
|
|
123
|
+
week = '星期一';
|
|
124
|
+
break;
|
|
125
|
+
case 2:
|
|
126
|
+
week = '星期二';
|
|
127
|
+
break;
|
|
128
|
+
case 3:
|
|
129
|
+
week = '星期三';
|
|
130
|
+
break;
|
|
131
|
+
case 4:
|
|
132
|
+
week = '星期四';
|
|
133
|
+
break;
|
|
134
|
+
case 5:
|
|
135
|
+
week = '星期五';
|
|
136
|
+
break;
|
|
137
|
+
case 6:
|
|
138
|
+
week = '星期六';
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
return week + ' ' + utils.dateFormat(new Date(time), 'hh:mm');
|
|
142
|
+
} else {
|
|
143
|
+
return utils.dateFormat(new Date(time), 'yy/MM/dd hh:mm');
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
toUnicode
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
underscore.extend(utils, underscore);
|
|
150
150
|
module.exports = utils;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default () => {
|
|
2
|
-
return {
|
|
3
|
-
}
|
|
1
|
+
export default () => {
|
|
2
|
+
return {
|
|
3
|
+
}
|
|
4
4
|
};
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
.grid-content {
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
text-align: center;
|
|
5
|
-
|
|
6
|
-
.grid-content-key {
|
|
7
|
-
width: 80px;
|
|
8
|
-
min-width: 50px;
|
|
9
|
-
color: #303133;
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
text-overflow: ellipsis;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
word-break: break-all;
|
|
14
|
-
text-align: right;
|
|
15
|
-
padding-right: 3px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.grid-content-val {
|
|
19
|
-
flex: 1;
|
|
20
|
-
text-align: left;
|
|
21
|
-
line-height: 18px;
|
|
22
|
-
width: 100%;
|
|
23
|
-
}
|
|
24
|
-
.textOverflow {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
white-space: nowrap;
|
|
27
|
-
text-overflow: ellipsis;
|
|
28
|
-
cursor: default;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.ul {
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-wrap: wrap;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.li {
|
|
39
|
-
width: 50%;
|
|
40
|
-
display: inline-block;
|
|
41
|
-
background: #ededee;
|
|
42
|
-
text-align: center;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.ul:after {
|
|
46
|
-
content: "";
|
|
47
|
-
width: 30%;
|
|
48
|
-
height: 0px;
|
|
49
|
-
visibility: hidden;
|
|
50
|
-
}
|
|
1
|
+
.grid-content {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
text-align: center;
|
|
5
|
+
|
|
6
|
+
.grid-content-key {
|
|
7
|
+
width: 80px;
|
|
8
|
+
min-width: 50px;
|
|
9
|
+
color: #303133;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
word-break: break-all;
|
|
14
|
+
text-align: right;
|
|
15
|
+
padding-right: 3px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.grid-content-val {
|
|
19
|
+
flex: 1;
|
|
20
|
+
text-align: left;
|
|
21
|
+
line-height: 18px;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
.textOverflow {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
cursor: default;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ul {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.li {
|
|
39
|
+
width: 50%;
|
|
40
|
+
display: inline-block;
|
|
41
|
+
background: #ededee;
|
|
42
|
+
text-align: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ul:after {
|
|
46
|
+
content: "";
|
|
47
|
+
width: 30%;
|
|
48
|
+
height: 0px;
|
|
49
|
+
visibility: hidden;
|
|
50
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-col :span="24 / column">
|
|
3
|
-
<div class="grid-content">
|
|
4
|
-
<span class="grid-content-key">{{ name }}:</span>
|
|
5
|
-
<span class="grid-content-val" :title="title ? title: null" :class="{textOverflow: title}">
|
|
6
|
-
<slot></slot>
|
|
7
|
-
{{title ? title : ''}}
|
|
8
|
-
</span>
|
|
9
|
-
</div>
|
|
10
|
-
</el-col>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import data from "./data";
|
|
15
|
-
import methods from "./methods";
|
|
16
|
-
export default {
|
|
17
|
-
name: "rowCmp",
|
|
18
|
-
$$route: {
|
|
19
|
-
meta: {
|
|
20
|
-
title: "标题名称",
|
|
21
|
-
icon: "菜单图标",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
props: {
|
|
25
|
-
name: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "",
|
|
28
|
-
},
|
|
29
|
-
column: {
|
|
30
|
-
type: [String, Number],
|
|
31
|
-
default: "2",
|
|
32
|
-
},
|
|
33
|
-
title: {
|
|
34
|
-
type: String
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
data,
|
|
38
|
-
methods,
|
|
39
|
-
mixins: [],
|
|
40
|
-
components: {},
|
|
41
|
-
watch: {},
|
|
42
|
-
computed: {},
|
|
43
|
-
// ------------------------------------------------------------------
|
|
44
|
-
// pragma mark - Life Cycle(生命周期)
|
|
45
|
-
// ------------------------------------------------------------------
|
|
46
|
-
created() {
|
|
47
|
-
this.createdInit();
|
|
48
|
-
},
|
|
49
|
-
mounted() {
|
|
50
|
-
this.mountedInit();
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<el-col :span="24 / column">
|
|
3
|
+
<div class="grid-content">
|
|
4
|
+
<span class="grid-content-key">{{ name }}:</span>
|
|
5
|
+
<span class="grid-content-val" :title="title ? title: null" :class="{textOverflow: title}">
|
|
6
|
+
<slot></slot>
|
|
7
|
+
{{title ? title : ''}}
|
|
8
|
+
</span>
|
|
9
|
+
</div>
|
|
10
|
+
</el-col>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import data from "./data";
|
|
15
|
+
import methods from "./methods";
|
|
16
|
+
export default {
|
|
17
|
+
name: "rowCmp",
|
|
18
|
+
$$route: {
|
|
19
|
+
meta: {
|
|
20
|
+
title: "标题名称",
|
|
21
|
+
icon: "菜单图标",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
name: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "",
|
|
28
|
+
},
|
|
29
|
+
column: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: "2",
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
type: String
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
data,
|
|
38
|
+
methods,
|
|
39
|
+
mixins: [],
|
|
40
|
+
components: {},
|
|
41
|
+
watch: {},
|
|
42
|
+
computed: {},
|
|
43
|
+
// ------------------------------------------------------------------
|
|
44
|
+
// pragma mark - Life Cycle(生命周期)
|
|
45
|
+
// ------------------------------------------------------------------
|
|
46
|
+
created() {
|
|
47
|
+
this.createdInit();
|
|
48
|
+
},
|
|
49
|
+
mounted() {
|
|
50
|
+
this.mountedInit();
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
</script>
|
|
54
54
|
<style lang="scss" src="./index.scss" scoped></style>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
// ------------------------------------------------------------------
|
|
3
|
-
// pragma mark - inti(初始化行为)
|
|
4
|
-
// ------------------------------------------------------------------
|
|
5
|
-
createdInit() {
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
mountedInit() {
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
// ------------------------------------------------------------------
|
|
12
|
-
// pragma mark - Event Response(响应事件)
|
|
13
|
-
// 命名规范: Name + EventHandler
|
|
14
|
-
// ------------------------------------------------------------------
|
|
15
|
-
Demo_handler() {
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// ------------------------------------------------------------------
|
|
20
|
-
// pragma mark - Private Methods(私有方法: )
|
|
21
|
-
// 命名规范: 前缀 __ + name
|
|
22
|
-
// ------------------------------------------------------------------
|
|
23
|
-
__demoFunction() {
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
// ------------------------------------------------------------------
|
|
3
|
+
// pragma mark - inti(初始化行为)
|
|
4
|
+
// ------------------------------------------------------------------
|
|
5
|
+
createdInit() {
|
|
6
|
+
|
|
7
|
+
},
|
|
8
|
+
mountedInit() {
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
// ------------------------------------------------------------------
|
|
12
|
+
// pragma mark - Event Response(响应事件)
|
|
13
|
+
// 命名规范: Name + EventHandler
|
|
14
|
+
// ------------------------------------------------------------------
|
|
15
|
+
Demo_handler() {
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
// ------------------------------------------------------------------
|
|
20
|
+
// pragma mark - Private Methods(私有方法: )
|
|
21
|
+
// 命名规范: 前缀 __ + name
|
|
22
|
+
// ------------------------------------------------------------------
|
|
23
|
+
__demoFunction() {
|
|
24
|
+
|
|
25
|
+
}
|
|
26
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default () => {
|
|
2
|
-
return {
|
|
3
|
-
}
|
|
1
|
+
export default () => {
|
|
2
|
+
return {
|
|
3
|
+
}
|
|
4
4
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.CellCmp-wrapper {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
1
|
+
.CellCmp-wrapper {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="CellCmp-wrapper">
|
|
3
|
-
<slot v-bind:column="column"></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import data from "./data";
|
|
9
|
-
import methods from "./methods";
|
|
10
|
-
export default {
|
|
11
|
-
name:"rowCmp",
|
|
12
|
-
$$route: {
|
|
13
|
-
meta: {
|
|
14
|
-
title: "标题名称",
|
|
15
|
-
icon: "菜单图标",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
column: {
|
|
20
|
-
type: Number,
|
|
21
|
-
default: 2,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
provide: {
|
|
25
|
-
cellgroup: this,
|
|
26
|
-
},
|
|
27
|
-
data,
|
|
28
|
-
methods,
|
|
29
|
-
mixins: [],
|
|
30
|
-
components: {},
|
|
31
|
-
watch: {},
|
|
32
|
-
computed: {},
|
|
33
|
-
// ------------------------------------------------------------------
|
|
34
|
-
// pragma mark - Life Cycle(生命周期)
|
|
35
|
-
// ------------------------------------------------------------------
|
|
36
|
-
created() {
|
|
37
|
-
this.createdInit();
|
|
38
|
-
},
|
|
39
|
-
mounted() {
|
|
40
|
-
this.mountedInit();
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="CellCmp-wrapper">
|
|
3
|
+
<slot v-bind:column="column"></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import data from "./data";
|
|
9
|
+
import methods from "./methods";
|
|
10
|
+
export default {
|
|
11
|
+
name:"rowCmp",
|
|
12
|
+
$$route: {
|
|
13
|
+
meta: {
|
|
14
|
+
title: "标题名称",
|
|
15
|
+
icon: "菜单图标",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
column: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 2,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
provide: {
|
|
25
|
+
cellgroup: this,
|
|
26
|
+
},
|
|
27
|
+
data,
|
|
28
|
+
methods,
|
|
29
|
+
mixins: [],
|
|
30
|
+
components: {},
|
|
31
|
+
watch: {},
|
|
32
|
+
computed: {},
|
|
33
|
+
// ------------------------------------------------------------------
|
|
34
|
+
// pragma mark - Life Cycle(生命周期)
|
|
35
|
+
// ------------------------------------------------------------------
|
|
36
|
+
created() {
|
|
37
|
+
this.createdInit();
|
|
38
|
+
},
|
|
39
|
+
mounted() {
|
|
40
|
+
this.mountedInit();
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
</script>
|
|
44
44
|
<style lang="scss" src="./index.scss" scoped></style>
|