mcrm-mobile 1.0.5 → 1.0.8

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.
Files changed (84) hide show
  1. package/es/address-picker/index.css +0 -23
  2. package/es/address-picker/index.js +18 -25
  3. package/es/address-picker/index.less +0 -26
  4. package/es/address-picker/style/index.js +3 -0
  5. package/es/address-picker/style/less.js +3 -0
  6. package/es/cell-group/index.js +1 -1
  7. package/es/circle/index.js +9 -5
  8. package/es/collapse/index.js +1 -1
  9. package/es/collapse-item/index.js +1 -1
  10. package/es/data/MenuIcon.json +1 -1
  11. package/es/date-picker/index.js +1 -1
  12. package/es/dialog/Dialog.js +2 -2
  13. package/es/grid/index.js +1 -1
  14. package/es/http/index.js +1 -1
  15. package/es/index-anchor/index.js +1 -1
  16. package/es/index.css +70 -24
  17. package/es/index.js +1 -1
  18. package/es/menu-jump/index.js +152 -147
  19. package/es/nav-bar/index.css +4 -1
  20. package/es/nav-bar/index.js +19 -3
  21. package/es/nav-bar/index.less +5 -1
  22. package/es/panel/index.js +1 -1
  23. package/es/password-input/index.js +2 -2
  24. package/es/picker/index.js +2 -2
  25. package/es/popover/index.js +1 -1
  26. package/es/style/base.css +193 -0
  27. package/es/style/base.less +1 -0
  28. package/es/style/css/iconfont.css +24 -0
  29. package/es/style/fonts/iconfont.ttf +0 -0
  30. package/es/style/fonts/iconfont.woff +0 -0
  31. package/es/style/fonts/iconfont.woff2 +0 -0
  32. package/es/style/theme.less +6 -0
  33. package/es/tabs/index.css +66 -0
  34. package/es/tabs/index.js +6 -2
  35. package/es/tabs/index.less +81 -0
  36. package/es/utils/api/index.js +1 -1
  37. package/es/utils/{commonUtils.js → common-utils.js} +0 -0
  38. package/es/utils/{createJson.js → create-json.js} +0 -0
  39. package/lib/address-picker/index.css +0 -23
  40. package/lib/address-picker/index.js +18 -24
  41. package/lib/address-picker/index.less +0 -26
  42. package/lib/address-picker/style/index.js +3 -0
  43. package/lib/address-picker/style/less.js +3 -0
  44. package/lib/cell-group/index.js +1 -1
  45. package/lib/circle/index.js +9 -5
  46. package/lib/collapse/index.js +1 -1
  47. package/lib/collapse-item/index.js +1 -1
  48. package/lib/data/MenuIcon.json +1 -1
  49. package/lib/date-picker/index.js +1 -1
  50. package/lib/dialog/Dialog.js +2 -2
  51. package/lib/grid/index.js +1 -1
  52. package/lib/http/index.js +1 -1
  53. package/lib/index-anchor/index.js +1 -1
  54. package/lib/index.css +70 -24
  55. package/lib/index.js +1 -1
  56. package/lib/mcrm-mobile.js +220 -198
  57. package/lib/mcrm-mobile.min.js +4 -4
  58. package/lib/menu-jump/index.js +153 -147
  59. package/lib/nav-bar/index.css +4 -1
  60. package/lib/nav-bar/index.js +19 -3
  61. package/lib/nav-bar/index.less +5 -1
  62. package/lib/panel/index.js +1 -1
  63. package/lib/password-input/index.js +2 -2
  64. package/lib/picker/index.js +2 -2
  65. package/lib/popover/index.js +1 -1
  66. package/lib/style/base.css +193 -0
  67. package/lib/style/base.less +1 -0
  68. package/lib/style/css/iconfont.css +24 -0
  69. package/lib/style/fonts/iconfont.ttf +0 -0
  70. package/lib/style/fonts/iconfont.woff +0 -0
  71. package/lib/style/fonts/iconfont.woff2 +0 -0
  72. package/lib/style/theme.less +6 -0
  73. package/lib/tabs/index.css +66 -0
  74. package/lib/tabs/index.js +6 -2
  75. package/lib/tabs/index.less +81 -0
  76. package/lib/utils/api/index.js +1 -1
  77. package/lib/utils/{commonUtils.js → common-utils.js} +0 -0
  78. package/lib/utils/{createJson.js → create-json.js} +0 -0
  79. package/package.json +2 -1
  80. package/types/common.d.ts +6 -3
  81. package/types/index.d.ts +1 -0
  82. package/vetur/attributes.json +97 -89
  83. package/vetur/tags.json +34 -32
  84. package/vetur/web-types.json +250 -230
@@ -258,32 +258,9 @@
258
258
  color: #fff;
259
259
  border-color: #fff;
260
260
  }
261
- .mm-address-picker-mask {
262
- position: absolute;
263
- top: 0;
264
- left: 0;
265
- z-index: 10000;
266
- width: 100%;
267
- height: 100%;
268
- background: rgba(0, 0, 0, 0.6);
269
- }
270
261
  .mm-address-picker-content {
271
- position: absolute;
272
- bottom: 0;
273
- left: 0;
274
- width: 100%;
275
- z-index: 10001;
276
262
  background-color: #fff;
277
263
  }
278
- .mm-address-picker-content-title {
279
- padding: 10px 15px;
280
- color: #999999;
281
- font-size: 14px;
282
- text-align: center;
283
- }
284
- .mm-address-picker-content-close {
285
- float: right;
286
- }
287
264
  .mm-address-picker-content-tab {
288
265
  border-bottom: 1px solid #999999;
289
266
  }
@@ -1,7 +1,9 @@
1
1
  import province from "../data/province.json";
2
2
  import city from "../data/city.json";
3
3
  import county from "../data/county.json";
4
- import create from "../utils/create";
4
+ import create from "../utils/create"; // Component
5
+
6
+ import ActionSheet from "../action-sheet";
5
7
  export default create({
6
8
  render: function render() {
7
9
  var _vm = this;
@@ -10,38 +12,26 @@ export default create({
10
12
 
11
13
  var _c = _vm._self._c || _h;
12
14
 
13
- return _vm.isShow ? _c('div', {
15
+ return _c('action-sheet', {
14
16
  class: _vm.b(),
15
- on: {
16
- "click": _vm.hide
17
+ attrs: {
18
+ "title": "选择地址"
19
+ },
20
+ model: {
21
+ value: _vm.isShow,
22
+ callback: function callback($$v) {
23
+ _vm.isShow = $$v;
24
+ },
25
+ expression: "isShow"
17
26
  }
18
27
  }, [_c('div', {
19
- class: _vm.b('mask'),
20
- on: {
21
- "touchmove": function touchmove($event) {
22
- $event.preventDefault();
23
- }
24
- }
25
- }), _c('div', {
26
28
  class: _vm.b('content'),
27
29
  on: {
28
30
  "click": function click($event) {
29
31
  $event.stopPropagation();
30
32
  }
31
33
  }
32
- }, [_c('p', {
33
- class: _vm.b('content-title')
34
- }, [_vm._v("\n 请选择\n "), _c('icon', {
35
- class: _vm.b('content-close'),
36
- attrs: {
37
- "name": "close",
38
- "color": "#707070",
39
- "size": "30"
40
- },
41
- on: {
42
- "click": _vm.hide
43
- }
44
- })], 1), _c('ul', {
34
+ }, [_c('ul', {
45
35
  class: _vm.b('content-tab', {
46
36
  landscape: _vm.landscape
47
37
  })
@@ -74,9 +64,12 @@ export default create({
74
64
  selected: item.name === _vm.tabList[_vm.tabIndex].name
75
65
  }
76
66
  }, [_vm._v("\n " + _vm._s(item.name) + "\n ")])]);
77
- }), 0)])]) : _vm._e();
67
+ }), 0)])]);
78
68
  },
79
69
  name: "address-picker",
70
+ components: {
71
+ ActionSheet: ActionSheet
72
+ },
80
73
  props: {
81
74
  value: Boolean,
82
75
  provinceName: {
@@ -1,35 +1,9 @@
1
1
  @import "../style/theme";
2
2
 
3
3
  .mm-address-picker {
4
- &-mask {
5
- position: absolute;
6
- top: 0;
7
- left: 0;
8
- z-index: 10000;
9
- width: 100%;
10
- height: 100%;
11
- background: @cover-background;
12
- }
13
-
14
4
  &-content {
15
- position: absolute;
16
- bottom: 0;
17
- left: 0;
18
- width: 100%;
19
- z-index: 10001;
20
5
  background-color: @address-content-background;
21
6
 
22
- &-title {
23
- padding: @content-padding;
24
- color: @gray-6;
25
- font-size: @font-size-md;
26
- text-align: center;
27
- }
28
-
29
- &-close {
30
- float: right;
31
- }
32
-
33
7
  &-tab {
34
8
  border-bottom: 1px solid @gray-6;
35
9
 
@@ -4,4 +4,7 @@ import '../../info/index.css';
4
4
  import '../../icon/index.css';
5
5
  import '../../cell/index.css';
6
6
  import '../../loading/index.css';
7
+ import '../../popup/index.css';
8
+ import '../../overlay/index.css';
9
+ import '../../action-sheet/index.css';
7
10
  import '../index.css';
@@ -4,4 +4,7 @@ import '../../info/index.less';
4
4
  import '../../icon/index.less';
5
5
  import '../../cell/index.less';
6
6
  import '../../loading/index.less';
7
+ import '../../popup/index.less';
8
+ import '../../overlay/index.less';
9
+ import '../../action-sheet/index.less';
7
10
  import '../index.less';
@@ -9,7 +9,7 @@ export default create({
9
9
 
10
10
  return _c('div', {
11
11
  class: [_vm.b(), {
12
- 'mm-hairline-top-bottom': _vm.border
12
+ 'mm-hairline--top-bottom': _vm.border
13
13
  }]
14
14
  }, [_vm.title ? _c('div', {
15
15
  class: _vm.b('title')
@@ -5,8 +5,8 @@ import { raf, cancel } from "../utils/dom/raf";
5
5
  var PERIMETER = 3140;
6
6
  var uid = 0;
7
7
 
8
- function format(rate) {
9
- return Math.min(Math.max(rate, 0), 100);
8
+ function format(rate, total) {
9
+ return Math.min(Math.max(rate, 0), total);
10
10
  }
11
11
 
12
12
  function getPath(clockwise, viewBoxSize) {
@@ -94,6 +94,10 @@ export default create({
94
94
  clockwise: {
95
95
  type: Boolean,
96
96
  default: true
97
+ },
98
+ total: {
99
+ type: [Number, String],
100
+ default: 100
97
101
  }
98
102
  },
99
103
  beforeCreate: function beforeCreate() {
@@ -126,7 +130,7 @@ export default create({
126
130
  };
127
131
  },
128
132
  hoverStyle: function hoverStyle() {
129
- var offset = PERIMETER * this.value / 100;
133
+ var offset = PERIMETER * this.value / this.total;
130
134
  return {
131
135
  stroke: "" + this.color,
132
136
  strokeWidth: +this.strokeWidth + 1 + "px",
@@ -143,7 +147,7 @@ export default create({
143
147
  handler: function handler(rate) {
144
148
  this.startTime = Date.now();
145
149
  this.startRate = this.value;
146
- this.endRate = format(rate);
150
+ this.endRate = format(rate, this.total);
147
151
  this.increase = this.endRate > this.startRate;
148
152
  this.duration = Math.abs((this.startRate - this.endRate) * 1000 / this.speed);
149
153
 
@@ -162,7 +166,7 @@ export default create({
162
166
  var now = Date.now();
163
167
  var progress = Math.min((now - this.startTime) / this.duration, 1);
164
168
  var rate = progress * (this.endRate - this.startRate) + this.startRate;
165
- this.$emit("input", format(parseFloat(rate.toFixed(1))));
169
+ this.$emit("input", format(parseFloat(rate.toFixed(1)), this.total));
166
170
 
167
171
  if (this.increase ? rate < this.endRate : rate > this.endRate) {
168
172
  this.rafId = raf(this.animate);
@@ -10,7 +10,7 @@ export default create({
10
10
 
11
11
  return _c('div', {
12
12
  class: [_vm.b(), {
13
- 'mm-hairline-top-bottom': _vm.border
13
+ 'mm-hairline--top-bottom': _vm.border
14
14
  }]
15
15
  }, [_vm._t("default")], 2);
16
16
  },
@@ -14,7 +14,7 @@ export default create({
14
14
 
15
15
  return _c('div', {
16
16
  class: [_vm.b(), {
17
- 'mm-hairline-top': _vm.index
17
+ 'mm-hairline--top': _vm.index
18
18
  }]
19
19
  }, [_c('cell', _vm._b({
20
20
  class: _vm.b('title', {