mcrm-mobile 1.1.8 → 1.2.1
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/es/common-utils/index.js +41 -15
- package/es/index.css +6 -1
- package/es/index.js +1 -1
- package/es/menu/index.js +6 -4
- package/es/menu-jump/index.js +150 -138
- package/es/nav-bar/index.css +6 -1
- package/es/nav-bar/index.js +1 -6
- package/es/nav-bar/index.less +6 -0
- package/es/style/css/iconfont.css +16 -8
- package/es/style/fonts/iconfont.ttf +0 -0
- package/es/style/fonts/iconfont.woff +0 -0
- package/es/style/fonts/iconfont.woff2 +0 -0
- package/es/style/theme.less +2 -1
- package/es/tabs/index.js +8 -6
- package/es/tabs/title.js +3 -3
- package/es/uploader/index.js +7 -1
- package/lib/common-utils/index.js +41 -15
- package/lib/index.css +6 -1
- package/lib/index.js +1 -1
- package/lib/mcrm-mobile.js +217 -174
- package/lib/mcrm-mobile.min.js +1 -1
- package/lib/menu/index.js +6 -4
- package/lib/menu-jump/index.js +150 -138
- package/lib/nav-bar/index.css +6 -1
- package/lib/nav-bar/index.js +1 -6
- package/lib/nav-bar/index.less +6 -0
- package/lib/style/css/iconfont.css +16 -8
- package/lib/style/fonts/iconfont.ttf +0 -0
- package/lib/style/fonts/iconfont.woff +0 -0
- package/lib/style/fonts/iconfont.woff2 +0 -0
- package/lib/style/theme.less +2 -1
- package/lib/tabs/index.js +8 -6
- package/lib/tabs/title.js +3 -3
- package/lib/uploader/index.js +7 -1
- package/package.json +1 -1
- package/types/common.d.ts +7 -2
- package/vetur/attributes.json +74 -70
- package/vetur/tags.json +22 -21
- package/vetur/web-types.json +159 -149
package/es/common-utils/index.js
CHANGED
|
@@ -45,21 +45,45 @@ CommonUtils.removeItem = function (list, start, end) {
|
|
|
45
45
|
return newList;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
CommonUtils.desensitization = function (text, digits) {
|
|
48
|
+
CommonUtils.desensitization = function (text, digits, position) {
|
|
49
49
|
if (digits === void 0) {
|
|
50
50
|
digits = 1;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
if (position === void 0) {
|
|
54
|
+
position = "center";
|
|
55
|
+
}
|
|
56
|
+
|
|
53
57
|
digits = typeof digits === "string" ? parseInt(digits) : digits;
|
|
54
|
-
var length = text.length;
|
|
55
|
-
var n = Math.floor((length - digits) / 2);
|
|
56
58
|
var star = "";
|
|
57
59
|
|
|
58
60
|
for (var i = 0; i < digits; i++) {
|
|
59
61
|
star += "*";
|
|
60
62
|
}
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
var length = text.length;
|
|
65
|
+
|
|
66
|
+
switch (position) {
|
|
67
|
+
case "start":
|
|
68
|
+
{
|
|
69
|
+
text = star + text.substring(digits, length);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
|
|
73
|
+
case "end":
|
|
74
|
+
{
|
|
75
|
+
text = text.substring(0, length - digits) + star;
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
default:
|
|
80
|
+
{
|
|
81
|
+
var n = Math.floor((length - digits) / 2);
|
|
82
|
+
text = text.substring(0, n) + star + text.substring(n + digits, length);
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
|
|
63
87
|
return text;
|
|
64
88
|
};
|
|
65
89
|
|
|
@@ -124,12 +148,22 @@ CommonUtils.compareDate = function (preDate, lastDate) {
|
|
|
124
148
|
return CommonUtils.stringToTime(preDate).getTime() >= CommonUtils.stringToTime(lastDate).getTime();
|
|
125
149
|
};
|
|
126
150
|
|
|
127
|
-
CommonUtils.getMonthBefore = function (monthBefore, currDate) {
|
|
151
|
+
CommonUtils.getMonthBefore = function (monthBefore, currDate, format) {
|
|
128
152
|
if (currDate === void 0) {
|
|
129
153
|
currDate = new Date();
|
|
130
154
|
}
|
|
131
155
|
|
|
156
|
+
if (format === void 0) {
|
|
157
|
+
format = "yyyy-MM-dd";
|
|
158
|
+
}
|
|
159
|
+
|
|
132
160
|
return function (theDay) {
|
|
161
|
+
var zeroFn = function zeroFn(data) {
|
|
162
|
+
return CommonUtils.zeroPadding(function (val) {
|
|
163
|
+
return val < 10;
|
|
164
|
+
}, data);
|
|
165
|
+
};
|
|
166
|
+
|
|
133
167
|
var year, month, day, currYear, currMonth, currDay, currDateDesc, dateDesc;
|
|
134
168
|
currDate = typeof currDate === "string" ? CommonUtils.stringToTime(currDate) : currDate;
|
|
135
169
|
currYear = currDate.getFullYear();
|
|
@@ -160,16 +194,8 @@ CommonUtils.getMonthBefore = function (monthBefore, currDate) {
|
|
|
160
194
|
day = parseInt(theDay);
|
|
161
195
|
}
|
|
162
196
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}, currMonth) + "-" + CommonUtils.zeroPadding(function (val) {
|
|
166
|
-
return val < 10;
|
|
167
|
-
}, currDay);
|
|
168
|
-
dateDesc = year + "-" + CommonUtils.zeroPadding(function (val) {
|
|
169
|
-
return val < 10;
|
|
170
|
-
}, month) + "-" + CommonUtils.zeroPadding(function (val) {
|
|
171
|
-
return val < 10;
|
|
172
|
-
}, day);
|
|
197
|
+
dateDesc = CommonUtils.formattingTime(year + "-" + zeroFn(month) + "-" + zeroFn(day), format).desc;
|
|
198
|
+
currDateDesc = CommonUtils.formattingTime(currYear + "-" + zeroFn(currMonth) + "-" + zeroFn(currDay), format).desc;
|
|
173
199
|
return {
|
|
174
200
|
year: year,
|
|
175
201
|
month: month,
|
package/es/index.css
CHANGED
|
@@ -3098,8 +3098,13 @@ textarea {
|
|
|
3098
3098
|
.mm-nav-bar-action:last-child {
|
|
3099
3099
|
margin-right: 15px;
|
|
3100
3100
|
}
|
|
3101
|
+
.mm-nav-bar-action-left {
|
|
3102
|
+
color: #0095fd;
|
|
3103
|
+
}
|
|
3101
3104
|
.mm-nav-bar-action-close {
|
|
3102
|
-
margin-left:
|
|
3105
|
+
margin-left: 12px;
|
|
3106
|
+
color: #0095fd;
|
|
3107
|
+
font-size: 22px;
|
|
3103
3108
|
}
|
|
3104
3109
|
.mm-nav-bar-title {
|
|
3105
3110
|
position: absolute;
|
package/es/index.js
CHANGED
|
@@ -90,7 +90,7 @@ import Tag from './tag';
|
|
|
90
90
|
import Toast from './toast';
|
|
91
91
|
import TreeSelect from './tree-select';
|
|
92
92
|
import Uploader from './uploader';
|
|
93
|
-
var version = '1.1
|
|
93
|
+
var version = '1.2.1';
|
|
94
94
|
var components = [ActionSheet, AddressPicker, Api, Badge, Biz, Button, Calendar, Card, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CommonUtils, CountDown, DataProcess, DatePicker, DatetimePicker, Dialog, Directive, Divider, Drag, DropdownItem, DropdownMenu, Empty, Field, GoodsAction, GoodsActionButton, GoodsActionIcon, Grid, GridItem, Http, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, List, Loading, Local, Menu, MenuIcon, MenuJump, Menus, NavBar, NoticeBar, Notify, Overlay, Pagination, Panel, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, SafeKeyboard, Search, Session, ShareSheet, Sidebar, SidebarItem, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, TableColumn, Tabs, Tag, Toast, TreeSelect, Uploader];
|
|
95
95
|
|
|
96
96
|
var install = function install(Vue) {
|
package/es/menu/index.js
CHANGED
|
@@ -121,11 +121,13 @@ export default create({
|
|
|
121
121
|
|
|
122
122
|
if (customEvent || menu.menuType === "7") {
|
|
123
123
|
_this.$emit("click", menu);
|
|
124
|
-
} else if (isRoute) {
|
|
125
|
-
_this.$router.push({
|
|
126
|
-
name: menuPageCode
|
|
127
|
-
});
|
|
128
124
|
} else {
|
|
125
|
+
if (isRoute) {
|
|
126
|
+
_this.$router.push({
|
|
127
|
+
name: menuPageCode
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
129
131
|
_this.$emit("success", {
|
|
130
132
|
data: data,
|
|
131
133
|
menu: menu
|