mcrm-mobile 1.0.6 → 1.0.9
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/cell-group/index.js +1 -1
- package/es/circle/index.js +9 -5
- package/es/collapse/index.js +1 -1
- package/es/collapse-item/index.js +1 -1
- package/es/data/MenuIcon.json +1 -1
- package/es/dialog/Dialog.js +2 -2
- package/es/grid/index.js +1 -1
- package/es/http/index.js +1 -1
- package/es/index-anchor/index.js +1 -1
- package/es/index.css +84 -1
- package/es/index.js +1 -1
- package/es/menu-icon/index.js +8 -1
- package/es/menu-jump/index.js +265 -215
- package/es/nav-bar/index.css +4 -1
- package/es/nav-bar/index.js +19 -3
- package/es/nav-bar/index.less +5 -1
- package/es/panel/index.js +1 -1
- package/es/password-input/index.js +2 -2
- package/es/picker/index.js +2 -2
- package/es/popover/index.js +1 -1
- package/es/style/base.css +80 -0
- package/es/style/css/iconfont.css +12 -0
- 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 +7 -0
- package/es/tabs/index.css +80 -0
- package/es/tabs/index.js +6 -2
- package/es/tabs/index.less +100 -0
- package/lib/cell-group/index.js +1 -1
- package/lib/circle/index.js +9 -5
- package/lib/collapse/index.js +1 -1
- package/lib/collapse-item/index.js +1 -1
- package/lib/data/MenuIcon.json +1 -1
- package/lib/dialog/Dialog.js +2 -2
- package/lib/grid/index.js +1 -1
- package/lib/http/index.js +1 -1
- package/lib/index-anchor/index.js +1 -1
- package/lib/index.css +84 -1
- package/lib/index.js +1 -1
- package/lib/mcrm-mobile.js +323 -242
- package/lib/mcrm-mobile.min.js +5 -5
- package/lib/menu-icon/index.js +8 -1
- package/lib/menu-jump/index.js +266 -215
- package/lib/nav-bar/index.css +4 -1
- package/lib/nav-bar/index.js +19 -3
- package/lib/nav-bar/index.less +5 -1
- package/lib/panel/index.js +1 -1
- package/lib/password-input/index.js +2 -2
- package/lib/picker/index.js +2 -2
- package/lib/popover/index.js +1 -1
- package/lib/style/base.css +80 -0
- package/lib/style/css/iconfont.css +12 -0
- 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 +7 -0
- package/lib/tabs/index.css +80 -0
- package/lib/tabs/index.js +6 -2
- package/lib/tabs/index.less +100 -0
- package/package.json +2 -1
- package/types/common.d.ts +6 -3
- package/types/index.d.ts +1 -0
- package/vetur/attributes.json +33 -25
- package/vetur/tags.json +13 -11
- package/vetur/web-types.json +66 -46
package/es/cell-group/index.js
CHANGED
package/es/circle/index.js
CHANGED
|
@@ -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),
|
|
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 /
|
|
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);
|
package/es/collapse/index.js
CHANGED