mcrm-mobile 1.2.0 → 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.
@@ -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
- text = text.substring(0, n) + star + text.substring(n + digits, length);
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
- currDateDesc = currYear + "-" + CommonUtils.zeroPadding(function (val) {
164
- return val < 10;
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.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.2.0';
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) {
@@ -58,12 +58,7 @@ export default create({
58
58
  }, [_vm._t("title", function () {
59
59
  return [_vm._v(_vm._s(_vm.title))];
60
60
  })], 2), _c('div', {
61
- class: _vm.b('action'),
62
- on: {
63
- "click": function click($event) {
64
- return _vm.$emit('click-right');
65
- }
66
- }
61
+ class: _vm.b('action')
67
62
  }, [_c('div', {
68
63
  class: _vm.b('action-right'),
69
64
  on: {
@@ -13,6 +13,14 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .mm-icon-show-o:before {
17
+ content: "\ec60";
18
+ }
19
+
20
+ .mm-icon-hidden-o:before {
21
+ content: "\ec61";
22
+ }
23
+
16
24
  .mm-icon-nav-close:before {
17
25
  content: "\ec5c";
18
26
  }
Binary file
Binary file
Binary file
@@ -53,21 +53,45 @@ CommonUtils.removeItem = function (list, start, end) {
53
53
  return newList;
54
54
  };
55
55
 
56
- CommonUtils.desensitization = function (text, digits) {
56
+ CommonUtils.desensitization = function (text, digits, position) {
57
57
  if (digits === void 0) {
58
58
  digits = 1;
59
59
  }
60
60
 
61
+ if (position === void 0) {
62
+ position = "center";
63
+ }
64
+
61
65
  digits = typeof digits === "string" ? parseInt(digits) : digits;
62
- var length = text.length;
63
- var n = Math.floor((length - digits) / 2);
64
66
  var star = "";
65
67
 
66
68
  for (var i = 0; i < digits; i++) {
67
69
  star += "*";
68
70
  }
69
71
 
70
- text = text.substring(0, n) + star + text.substring(n + digits, length);
72
+ var length = text.length;
73
+
74
+ switch (position) {
75
+ case "start":
76
+ {
77
+ text = star + text.substring(digits, length);
78
+ }
79
+ break;
80
+
81
+ case "end":
82
+ {
83
+ text = text.substring(0, length - digits) + star;
84
+ }
85
+ break;
86
+
87
+ default:
88
+ {
89
+ var n = Math.floor((length - digits) / 2);
90
+ text = text.substring(0, n) + star + text.substring(n + digits, length);
91
+ }
92
+ break;
93
+ }
94
+
71
95
  return text;
72
96
  };
73
97
 
@@ -132,12 +156,22 @@ CommonUtils.compareDate = function (preDate, lastDate) {
132
156
  return CommonUtils.stringToTime(preDate).getTime() >= CommonUtils.stringToTime(lastDate).getTime();
133
157
  };
134
158
 
135
- CommonUtils.getMonthBefore = function (monthBefore, currDate) {
159
+ CommonUtils.getMonthBefore = function (monthBefore, currDate, format) {
136
160
  if (currDate === void 0) {
137
161
  currDate = new Date();
138
162
  }
139
163
 
164
+ if (format === void 0) {
165
+ format = "yyyy-MM-dd";
166
+ }
167
+
140
168
  return function (theDay) {
169
+ var zeroFn = function zeroFn(data) {
170
+ return CommonUtils.zeroPadding(function (val) {
171
+ return val < 10;
172
+ }, data);
173
+ };
174
+
141
175
  var year, month, day, currYear, currMonth, currDay, currDateDesc, dateDesc;
142
176
  currDate = typeof currDate === "string" ? CommonUtils.stringToTime(currDate) : currDate;
143
177
  currYear = currDate.getFullYear();
@@ -168,16 +202,8 @@ CommonUtils.getMonthBefore = function (monthBefore, currDate) {
168
202
  day = parseInt(theDay);
169
203
  }
170
204
 
171
- currDateDesc = currYear + "-" + CommonUtils.zeroPadding(function (val) {
172
- return val < 10;
173
- }, currMonth) + "-" + CommonUtils.zeroPadding(function (val) {
174
- return val < 10;
175
- }, currDay);
176
- dateDesc = year + "-" + CommonUtils.zeroPadding(function (val) {
177
- return val < 10;
178
- }, month) + "-" + CommonUtils.zeroPadding(function (val) {
179
- return val < 10;
180
- }, day);
205
+ dateDesc = CommonUtils.formattingTime(year + "-" + zeroFn(month) + "-" + zeroFn(day), format).desc;
206
+ currDateDesc = CommonUtils.formattingTime(currYear + "-" + zeroFn(currMonth) + "-" + zeroFn(currDay), format).desc;
181
207
  return {
182
208
  year: year,
183
209
  month: month,
package/lib/index.js CHANGED
@@ -369,7 +369,7 @@ var _uploader = _interopRequireDefault(require("./uploader"));
369
369
 
370
370
  exports.Uploader = _uploader.default;
371
371
  // This file is auto generated by build/build-entry.js
372
- var version = '1.2.0';
372
+ var version = '1.2.1';
373
373
  exports.version = version;
374
374
  var components = [_actionSheet.default, _addressPicker.default, _api.default, _badge.default, _biz.default, _button.default, _calendar.default, _card.default, _cell.default, _cellGroup.default, _checkbox.default, _checkboxGroup.default, _circle.default, _col.default, _collapse.default, _collapseItem.default, _commonUtils.default, _countDown.default, _dataProcess.default, _datePicker.default, _datetimePicker.default, _dialog.default, _directive.default, _divider.default, _drag.default, _dropdownItem.default, _dropdownMenu.default, _empty.default, _field.default, _goodsAction.default, _goodsActionButton.default, _goodsActionIcon.default, _grid.default, _gridItem.default, _http.default, _icon.default, _image.default, _imagePreview.default, _indexAnchor.default, _indexBar.default, _info.default, _list.default, _loading.default, _local.default, _menu.default, _menuIcon.default, _menuJump.default, _menus.default, _navBar.default, _noticeBar.default, _notify.default, _overlay.default, _pagination.default, _panel.default, _passwordInput.default, _picker.default, _popover.default, _popup.default, _progress.default, _pullRefresh.default, _radio.default, _radioGroup.default, _rate.default, _row.default, _safeKeyboard.default, _search.default, _session.default, _shareSheet.default, _sidebar.default, _sidebarItem.default, _slider.default, _step.default, _stepper.default, _steps.default, _sticky.default, _swipe.default, _swipeCell.default, _swipeItem.default, _switch.default, _switchCell.default, _tab.default, _tabbar.default, _tabbarItem.default, _table.default, _tableColumn.default, _tabs.default, _tag.default, _toast.default, _treeSelect.default, _uploader.default];
375
375
 
@@ -23355,21 +23355,45 @@ CommonUtils.removeItem = function (list, start, end) {
23355
23355
  return newList;
23356
23356
  };
23357
23357
 
23358
- CommonUtils.desensitization = function (text, digits) {
23358
+ CommonUtils.desensitization = function (text, digits, position) {
23359
23359
  if (digits === void 0) {
23360
23360
  digits = 1;
23361
23361
  }
23362
23362
 
23363
+ if (position === void 0) {
23364
+ position = "center";
23365
+ }
23366
+
23363
23367
  digits = typeof digits === "string" ? parseInt(digits) : digits;
23364
- var length = text.length;
23365
- var n = Math.floor((length - digits) / 2);
23366
23368
  var star = "";
23367
23369
 
23368
23370
  for (var i = 0; i < digits; i++) {
23369
23371
  star += "*";
23370
23372
  }
23371
23373
 
23372
- text = text.substring(0, n) + star + text.substring(n + digits, length);
23374
+ var length = text.length;
23375
+
23376
+ switch (position) {
23377
+ case "start":
23378
+ {
23379
+ text = star + text.substring(digits, length);
23380
+ }
23381
+ break;
23382
+
23383
+ case "end":
23384
+ {
23385
+ text = text.substring(0, length - digits) + star;
23386
+ }
23387
+ break;
23388
+
23389
+ default:
23390
+ {
23391
+ var n = Math.floor((length - digits) / 2);
23392
+ text = text.substring(0, n) + star + text.substring(n + digits, length);
23393
+ }
23394
+ break;
23395
+ }
23396
+
23373
23397
  return text;
23374
23398
  };
23375
23399
 
@@ -23434,12 +23458,22 @@ CommonUtils.compareDate = function (preDate, lastDate) {
23434
23458
  return CommonUtils.stringToTime(preDate).getTime() >= CommonUtils.stringToTime(lastDate).getTime();
23435
23459
  };
23436
23460
 
23437
- CommonUtils.getMonthBefore = function (monthBefore, currDate) {
23461
+ CommonUtils.getMonthBefore = function (monthBefore, currDate, format) {
23438
23462
  if (currDate === void 0) {
23439
23463
  currDate = new Date();
23440
23464
  }
23441
23465
 
23466
+ if (format === void 0) {
23467
+ format = "yyyy-MM-dd";
23468
+ }
23469
+
23442
23470
  return function (theDay) {
23471
+ var zeroFn = function zeroFn(data) {
23472
+ return CommonUtils.zeroPadding(function (val) {
23473
+ return val < 10;
23474
+ }, data);
23475
+ };
23476
+
23443
23477
  var year, month, day, currYear, currMonth, currDay, currDateDesc, dateDesc;
23444
23478
  currDate = typeof currDate === "string" ? CommonUtils.stringToTime(currDate) : currDate;
23445
23479
  currYear = currDate.getFullYear();
@@ -23470,16 +23504,8 @@ CommonUtils.getMonthBefore = function (monthBefore, currDate) {
23470
23504
  day = parseInt(theDay);
23471
23505
  }
23472
23506
 
23473
- currDateDesc = currYear + "-" + CommonUtils.zeroPadding(function (val) {
23474
- return val < 10;
23475
- }, currMonth) + "-" + CommonUtils.zeroPadding(function (val) {
23476
- return val < 10;
23477
- }, currDay);
23478
- dateDesc = year + "-" + CommonUtils.zeroPadding(function (val) {
23479
- return val < 10;
23480
- }, month) + "-" + CommonUtils.zeroPadding(function (val) {
23481
- return val < 10;
23482
- }, day);
23507
+ dateDesc = CommonUtils.formattingTime(year + "-" + zeroFn(month) + "-" + zeroFn(day), format).desc;
23508
+ currDateDesc = CommonUtils.formattingTime(currYear + "-" + zeroFn(currMonth) + "-" + zeroFn(currDay), format).desc;
23483
23509
  return {
23484
23510
  year: year,
23485
23511
  month: month,
@@ -34760,12 +34786,7 @@ external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a.prototype.$Local
34760
34786
  }, [_vm._t("title", function () {
34761
34787
  return [_vm._v(_vm._s(_vm.title))];
34762
34788
  })], 2), _c('div', {
34763
- class: _vm.b('action'),
34764
- on: {
34765
- "click": function click($event) {
34766
- return _vm.$emit('click-right');
34767
- }
34768
- }
34789
+ class: _vm.b('action')
34769
34790
  }, [_c('div', {
34770
34791
  class: _vm.b('action-right'),
34771
34792
  on: {
@@ -41046,7 +41067,7 @@ function isImageFile(item) {
41046
41067
 
41047
41068
 
41048
41069
 
41049
- var version = '1.2.0';
41070
+ var version = '1.2.1';
41050
41071
  var components = [action_sheet, address_picker, api, badge, biz, es_button, calendar, card, es_cell, cell_group, es_checkbox, checkbox_group, circle, col, collapse, collapse_item, common_utils, count_down, data_process, date_picker, datetime_picker, dialog, directive, divider, drag, dropdown_item, dropdown_menu, empty, field, goods_action, goods_action_button, goods_action_icon, grid, grid_item, http, icon, es_image, image_preview, index_anchor, index_bar, es_info, list, loading, local, es_menu, menu_icon, menu_jump, es_menus, nav_bar, notice_bar, notify, es_overlay, pagination, panel, password_input, es_picker, popover, es_popup, es_progress, pull_refresh, es_radio, radio_group, es_rate, row, safe_keyboard, search, session["a" /* default */], share_sheet, sidebar, sidebar_item, slider, es_step, stepper, steps, sticky, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, table, table_column, tabs, tag, es_toast, tree_select, uploader];
41051
41072
 
41052
41073
  var es_install = function install(Vue) {