@alu008/test_yuanqikaixiang 1.0.0
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/App.vue +294 -0
- package/Local/en.json +3 -0
- package/Local/indian.json +3 -0
- package/Local/zh-Hans.json +3 -0
- package/Local/zh-Hant.json +3 -0
- package/README.md +1 -0
- package/androidPrivacy.json +28 -0
- package/components/ball/ball.vue +230 -0
- package/components/cardDetails/cardDetails.vue +273 -0
- package/components/confirmModal/confirmModal.vue +125 -0
- package/components/fillInfo/fillInfo.vue +255 -0
- package/components/header/header.vue +92 -0
- package/components/selectAddress/selectAddress.vue +156 -0
- package/components/signDetail/signDetail.vue +33 -0
- package/components/skeleton/skeleton.vue +62 -0
- package/index.html +20 -0
- package/index.template.html +35 -0
- package/jsconfig.json +9 -0
- package/main.js +48 -0
- package/manifest.json +159 -0
- package/package.json +14 -0
- package/pages/index/index.vue +5421 -0
- package/pages.json +173 -0
- package/project.config.json +25 -0
- package/project.private.config.json +14 -0
- package/static/fonts/Alibaba-PuHuiTi-Bold.ttf +0 -0
- package/static/fonts/Alibaba-PuHuiTi-Medium.ttf +0 -0
- package/static/fonts/Alibaba-PuHuiTi-Regular.ttf +0 -0
- package/static/fonts/fxlh.ttf +0 -0
- package/static/img/R.png +0 -0
- package/static/img/SR.png +0 -0
- package/static/img/SSR.png +0 -0
- package/static/img/bottomBgc1.png +0 -0
- package/static/img/centerBgc.png +0 -0
- package/static/img/goldBgc.png +0 -0
- package/static/img/goldText.png +0 -0
- package/static/img/home/calendar/bgc0.png +0 -0
- package/static/img/home/calendar/bgc1.png +0 -0
- package/static/img/home/calendar/bgc2.png +0 -0
- package/static/img/home/calendar/bgc3.png +0 -0
- package/static/img/home/calendar/progress0.png +0 -0
- package/static/img/home/calendar/progress1.png +0 -0
- package/static/img/home/calendar/progress2.png +0 -0
- package/static/img/home/calendar/progress3.png +0 -0
- package/static/img/kuang.gif +0 -0
- package/static/img/luckyBgc.png +0 -0
- package/static/img/lucyText.png +0 -0
- package/static/img/top_Bgc.png +0 -0
- package/subpackages/article/article.vue +64 -0
- package/subpackages/confirmSendLogistics/confirmSendLogistics.vue +1035 -0
- package/subpackages/coupon/coupon.vue +276 -0
- package/subpackages/fragment/fragment.vue +1592 -0
- package/subpackages/myAddress/myAddress.vue +656 -0
- package/subpackages/myCards/myCards.vue +1250 -0
- package/subpackages/myOrder/myOrder.vue +779 -0
- package/subpackages/myOrderDetail/myOrderDetail.vue +659 -0
- package/subpackages/poster/poster.vue +130 -0
- package/subpackages/selectCoupon/selectCoupon.vue +251 -0
- package/subpackages/sendLogistics/sendLogistics.vue +1097 -0
- package/subpackages/vote/vote.vue +877 -0
- package/uni.promisify.adaptor.js +10 -0
- package/uni.scss +114 -0
- package/uni_modules/qf-image-cropper/changelog.md +72 -0
- package/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.render.js +855 -0
- package/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue +749 -0
- package/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxs +727 -0
- package/uni_modules/qf-image-cropper/package.json +81 -0
- package/uni_modules/qf-image-cropper/readme.md +97 -0
- package/uni_modules/uni-data-select/changelog.md +51 -0
- package/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue +837 -0
- package/uni_modules/uni-data-select/package.json +106 -0
- package/uni_modules/uni-data-select/readme.md +8 -0
- package/uni_modules/uni-icons/changelog.md +44 -0
- package/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue +91 -0
- package/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +110 -0
- package/uni_modules/uni-icons/components/uni-icons/uniicons.css +664 -0
- package/uni_modules/uni-icons/components/uni-icons/uniicons.ttf +0 -0
- package/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts +664 -0
- package/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js +649 -0
- package/uni_modules/uni-icons/package.json +111 -0
- package/uni_modules/uni-icons/readme.md +8 -0
- package/uni_modules/uni-load-more/changelog.md +23 -0
- package/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json +5 -0
- package/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js +8 -0
- package/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json +5 -0
- package/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json +5 -0
- package/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue +404 -0
- package/uni_modules/uni-load-more/package.json +105 -0
- package/uni_modules/uni-load-more/readme.md +14 -0
- package/uni_modules/uni-scss/changelog.md +8 -0
- package/uni_modules/uni-scss/index.scss +1 -0
- package/uni_modules/uni-scss/package.json +82 -0
- package/uni_modules/uni-scss/readme.md +4 -0
- package/uni_modules/uni-scss/styles/index.scss +7 -0
- package/uni_modules/uni-scss/styles/setting/_border.scss +3 -0
- package/uni_modules/uni-scss/styles/setting/_color.scss +66 -0
- package/uni_modules/uni-scss/styles/setting/_radius.scss +55 -0
- package/uni_modules/uni-scss/styles/setting/_space.scss +56 -0
- package/uni_modules/uni-scss/styles/setting/_styles.scss +167 -0
- package/uni_modules/uni-scss/styles/setting/_text.scss +24 -0
- package/uni_modules/uni-scss/styles/setting/_variables.scss +146 -0
- package/uni_modules/uni-scss/styles/tools/functions.scss +19 -0
- package/uni_modules/uni-scss/theme.scss +31 -0
- package/uni_modules/uni-scss/variables.scss +62 -0
- package/utils/addressData.js +6042 -0
- package/utils/api.js +160 -0
- package/utils/fetch.js +548 -0
- package/utils/index.js +994 -0
- package/utils/navigator.js +17 -0
- package/utils/request.js +162 -0
|
@@ -0,0 +1,727 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 图片编辑器-手势监听
|
|
3
|
+
* 1. wxs 暂不支持 es6 语法
|
|
4
|
+
* 2. 支持编译到微信小程序、QQ小程序、app-vue、H5上(uni-app 2.2.5及以上版本)
|
|
5
|
+
*/
|
|
6
|
+
/** 图片偏移量 */
|
|
7
|
+
var offset = { x: 0, y: 0 };
|
|
8
|
+
/** 图片缩放比例 */
|
|
9
|
+
var scale = 1;
|
|
10
|
+
/** 图片最小缩放比例 */
|
|
11
|
+
var minScale = 1;
|
|
12
|
+
/** 图片旋转角度 */
|
|
13
|
+
var rotate = 0;
|
|
14
|
+
/** 触摸点 */
|
|
15
|
+
var touches = [];
|
|
16
|
+
/** 图片布局信息 */
|
|
17
|
+
var img = {};
|
|
18
|
+
/** 系统信息 */
|
|
19
|
+
var sys = {};
|
|
20
|
+
/** 裁剪区域布局信息 */
|
|
21
|
+
var area = {};
|
|
22
|
+
/** 触摸行为类型 */
|
|
23
|
+
var touchType = '';
|
|
24
|
+
/** 操作角的位置 */
|
|
25
|
+
var activeAngle = 0;
|
|
26
|
+
/** 裁剪区域布局信息偏移量 */
|
|
27
|
+
var areaOffset = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
28
|
+
/** 容错值 */
|
|
29
|
+
var fault = 0.000001;
|
|
30
|
+
/**
|
|
31
|
+
* 获取a、b两数中的最小正数
|
|
32
|
+
* @param a
|
|
33
|
+
* @param b
|
|
34
|
+
*/
|
|
35
|
+
function minimum(a, b) {
|
|
36
|
+
if (a > 0 && b < 0) return a;
|
|
37
|
+
if (a < 0 && b > 0) return b;
|
|
38
|
+
if (a > 0 && b > 0) return Math.min(a, b);
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 在容错访问内获取n近似值
|
|
43
|
+
* @param n
|
|
44
|
+
*/
|
|
45
|
+
function num(n) {
|
|
46
|
+
var m = parseFloat((n).toFixed(6));
|
|
47
|
+
return m === fault || m === -fault ? 0 : m;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 比较a值在容错值范围内是否等于b值
|
|
51
|
+
* @param a
|
|
52
|
+
* @param b
|
|
53
|
+
*/
|
|
54
|
+
function equalsByFault(a, b) {
|
|
55
|
+
return Math.abs(a - b) <= fault;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 比较a值在容错值范围内是否小于b值
|
|
59
|
+
* @param a
|
|
60
|
+
* @param b
|
|
61
|
+
*/
|
|
62
|
+
function lessThanByFault(a, b) {
|
|
63
|
+
var c = a - b;
|
|
64
|
+
return c < 0 ? c < -fault : c < fault;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 验证并获取有效最大值
|
|
68
|
+
* @param v
|
|
69
|
+
* @param max
|
|
70
|
+
* @param isInclude
|
|
71
|
+
* @param x
|
|
72
|
+
* @param y
|
|
73
|
+
* @param rate
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
function validMax(v, max, isInclude, x, y, rate) {
|
|
77
|
+
if(typeof max === 'number') {
|
|
78
|
+
if(isInclude && equalsByFault(max, y)) { // 宽高不等时,x轴用y轴值要做等比例转换
|
|
79
|
+
var n = num(max * rate);
|
|
80
|
+
if (n <= x) return n; // 转化后值在x轴最大值范围内
|
|
81
|
+
return x; // 转化后值超出x轴最大值范围则用最大值
|
|
82
|
+
}
|
|
83
|
+
return max;
|
|
84
|
+
}
|
|
85
|
+
return v;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 计算两点间距
|
|
89
|
+
* @param {Object} touches 触摸点信息
|
|
90
|
+
*/
|
|
91
|
+
function getDistanceByTouches(touches) {
|
|
92
|
+
// 根据勾股定理求两点间距离
|
|
93
|
+
var a = touches[1].pageX - touches[0].pageX;
|
|
94
|
+
var b = touches[1].pageY - touches[0].pageY;
|
|
95
|
+
var c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));
|
|
96
|
+
// 求两点间的中点坐标
|
|
97
|
+
// 1. a、b可能为负值
|
|
98
|
+
// 2. 在求a、b时,如用touches[1]减touches[0],则求中点坐标也得用touches[1]减a/2、b/2
|
|
99
|
+
// 3. 同理,在求a、b时,也可用touches[0]减touches[1],则求中点坐标也得用touches[0]减a/2、b/2
|
|
100
|
+
var x = touches[1].pageX - a / 2;
|
|
101
|
+
var y = touches[1].pageY - b / 2;
|
|
102
|
+
return { c, x, y };
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* 修正取值
|
|
106
|
+
* @param {Object} a
|
|
107
|
+
* @param {Object} b
|
|
108
|
+
* @param {Object} c
|
|
109
|
+
* @param {Object} reverse 是否反向
|
|
110
|
+
*/
|
|
111
|
+
function correctValue(a, b, c, reverse) {
|
|
112
|
+
return num(reverse ? Math.max(Math.min(a, b), c) : Math.min(Math.max(a, b), c));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 旋转90°或270°时检查边界:限制 x、y 拖动范围,禁止滑出边界
|
|
117
|
+
* @param {Object} e 点坐标
|
|
118
|
+
* @param {Object} xReverse x是否反向
|
|
119
|
+
* @param {Object} yReverse y是否反向
|
|
120
|
+
*/
|
|
121
|
+
function checkRotateRange(e, xReverse, yReverse) {
|
|
122
|
+
var o = num((img.height - img.width) / 2); // 宽高差值一半
|
|
123
|
+
return {
|
|
124
|
+
x: correctValue(e.x, -img.height + o + area.width + area.left, area.left + o, xReverse),
|
|
125
|
+
y: correctValue(e.y, -img.width - o + area.height + area.top, area.top - o, yReverse)
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 检查边界:限制 x、y 拖动范围,禁止滑出边界
|
|
131
|
+
* @param {Object} e 点坐标
|
|
132
|
+
*/
|
|
133
|
+
function checkRange(e) {
|
|
134
|
+
var r = rotate / 90 % 2;
|
|
135
|
+
if(r === 1) { // 因图片宽高可能不等,翻转 90° 或 270° 后图片宽高需反着计算,且左右和上下边界要根据差值做偏移
|
|
136
|
+
if (area.width === area.height) {
|
|
137
|
+
return checkRotateRange(e, img.height < area.height, img.width < area.width);
|
|
138
|
+
}
|
|
139
|
+
var isInclude = img.height < area.width && img.width < area.height; // 图片是否包含在裁剪区域内
|
|
140
|
+
if (img.width < area.height || img.height < area.width) {
|
|
141
|
+
if (area.width < area.height && img.width < img.height) {
|
|
142
|
+
return isInclude
|
|
143
|
+
? checkRotateRange(e, area.width < area.height, area.width < area.height)
|
|
144
|
+
: checkRotateRange(e, false, true);
|
|
145
|
+
}
|
|
146
|
+
if (area.height < area.width && img.height < img.width) {
|
|
147
|
+
return isInclude
|
|
148
|
+
? checkRotateRange(e, area.height < area.width, area.height < area.width)
|
|
149
|
+
: checkRotateRange(e, true, false);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (img.height >= area.width && img.width >= area.height) {
|
|
153
|
+
return checkRotateRange(e, false, false);
|
|
154
|
+
}
|
|
155
|
+
if (isInclude) {
|
|
156
|
+
return area.height < area.width
|
|
157
|
+
? checkRotateRange(e, true, true)
|
|
158
|
+
: checkRotateRange(e, area.width < area.height, area.width < area.height);
|
|
159
|
+
}
|
|
160
|
+
if (img.height < area.width && !img.width < area.height) {
|
|
161
|
+
return checkRotateRange(e, true, false);
|
|
162
|
+
}
|
|
163
|
+
if (!img.height < area.width && img.width < area.height) {
|
|
164
|
+
return checkRotateRange(e, false, true);
|
|
165
|
+
}
|
|
166
|
+
return checkRotateRange(e, img.height < area.height, img.width < area.width);
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
x: correctValue(e.x, -img.width + area.width + area.left, area.left, img.width < area.width),
|
|
170
|
+
y: correctValue(e.y, -img.height + area.height + area.top, area.top, img.height < area.height)
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* 变更图片布局信息
|
|
175
|
+
* @param {Object} e 布局信息
|
|
176
|
+
*/
|
|
177
|
+
function changeImageRect(e) {
|
|
178
|
+
offset.x += e.x || 0;
|
|
179
|
+
offset.y += e.y || 0;
|
|
180
|
+
var image = e.instance.selectComponent('.crop-image');
|
|
181
|
+
if(e.check && area.checkRange) { // 检查边界
|
|
182
|
+
var point = checkRange(offset);
|
|
183
|
+
if(offset.x !== point.x || offset.y !== point.y) {
|
|
184
|
+
offset = point;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// image.setStyle({
|
|
188
|
+
// width: img.width + 'px',
|
|
189
|
+
// height: img.height + 'px',
|
|
190
|
+
// transform: 'translate(' + offset.x + 'px, ' + offset.y + 'px) rotate(' + rotate +'deg)'
|
|
191
|
+
// });
|
|
192
|
+
var ox = (img.width - img.oldWidth) / 2;
|
|
193
|
+
var oy = (img.height - img.oldHeight) / 2;
|
|
194
|
+
image.setStyle({
|
|
195
|
+
width: img.oldWidth + 'px',
|
|
196
|
+
height: img.oldHeight + 'px',
|
|
197
|
+
transform: (img.gpu ? 'translateZ(0) ' : '') + 'translate(' + (offset.x + ox) + 'px, ' + (offset.y + oy) + 'px) rotate(' + rotate +'deg) scale(' + scale + ')'
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
e.instance.callMethod('dataChange', {
|
|
201
|
+
width: img.width,
|
|
202
|
+
height: img.height,
|
|
203
|
+
x: offset.x,
|
|
204
|
+
y: offset.y,
|
|
205
|
+
rotate: rotate
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* 变更裁剪区域布局信息
|
|
210
|
+
* @param {Object} e 布局信息
|
|
211
|
+
*/
|
|
212
|
+
function changeAreaRect(e) {
|
|
213
|
+
// 变更蒙版样式
|
|
214
|
+
var masks = e.instance.selectAllComponents('.crop-mask-block');
|
|
215
|
+
var maskStyles = [
|
|
216
|
+
{
|
|
217
|
+
left: 0,
|
|
218
|
+
width: (area.left + areaOffset.left) + 'px',
|
|
219
|
+
top: 0,
|
|
220
|
+
bottom: 0,
|
|
221
|
+
'z-index': area.zIndex + 2
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
left: (area.right + areaOffset.right) + 'px',
|
|
225
|
+
right: 0,
|
|
226
|
+
top: 0,
|
|
227
|
+
bottom: 0,
|
|
228
|
+
'z-index': area.zIndex + 2
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
left: (area.left + areaOffset.left) + 'px',
|
|
232
|
+
width: (area.width + areaOffset.right - areaOffset.left) + 'px',
|
|
233
|
+
top: 0,
|
|
234
|
+
height: (area.top + areaOffset.top) + 'px',
|
|
235
|
+
'z-index': area.zIndex + 2
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
left: (area.left + areaOffset.left) + 'px',
|
|
239
|
+
width: (area.width + areaOffset.right - areaOffset.left) + 'px',
|
|
240
|
+
top: (area.bottom + areaOffset.bottom) + 'px',
|
|
241
|
+
// height: (area.top - areaOffset.bottom + sys.offsetBottom) + 'px',
|
|
242
|
+
bottom: 0,
|
|
243
|
+
'z-index': area.zIndex + 2
|
|
244
|
+
}
|
|
245
|
+
];
|
|
246
|
+
var len = masks.length;
|
|
247
|
+
for (var i = 0; i < len; i++) {
|
|
248
|
+
masks[i].setStyle(maskStyles[i]);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 变更边框样式
|
|
252
|
+
if(area.showBorder) {
|
|
253
|
+
var border = e.instance.selectComponent('.crop-border');
|
|
254
|
+
border.setStyle({
|
|
255
|
+
left: (area.left + areaOffset.left) + 'px',
|
|
256
|
+
top: (area.top + areaOffset.top) + 'px',
|
|
257
|
+
width: (area.width + areaOffset.right - areaOffset.left) + 'px',
|
|
258
|
+
height: (area.height + areaOffset.bottom - areaOffset.top) + 'px',
|
|
259
|
+
'z-index': area.zIndex + 3
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// 变更参考线样式
|
|
264
|
+
if(area.showGrid) {
|
|
265
|
+
var grids = e.instance.selectAllComponents('.crop-grid');
|
|
266
|
+
var gridStyles = [
|
|
267
|
+
{
|
|
268
|
+
'border-width': '1px 0 0 0',
|
|
269
|
+
left: (area.left + areaOffset.left) + 'px',
|
|
270
|
+
right: (area.right + areaOffset.right) + 'px',
|
|
271
|
+
top: (area.top + areaOffset.top + (area.height + areaOffset.bottom - areaOffset.top) / 3 - 0.5) + 'px',
|
|
272
|
+
width: (area.width + areaOffset.right - areaOffset.left) + 'px',
|
|
273
|
+
'z-index': area.zIndex + 3
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
'border-width': '1px 0 0 0',
|
|
277
|
+
left: (area.left + areaOffset.left) + 'px',
|
|
278
|
+
right: (area.right + areaOffset.right) + 'px',
|
|
279
|
+
top: (area.top + areaOffset.top + (area.height + areaOffset.bottom - areaOffset.top) * 2 / 3 - 0.5) + 'px',
|
|
280
|
+
width: (area.width + areaOffset.right - areaOffset.left) + 'px',
|
|
281
|
+
'z-index': area.zIndex + 3
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
'border-width': '0 1px 0 0',
|
|
285
|
+
top: (area.top + areaOffset.top) + 'px',
|
|
286
|
+
bottom: (area.bottom + areaOffset.bottom) + 'px',
|
|
287
|
+
left: (area.left + areaOffset.left + (area.width + areaOffset.right - areaOffset.left) / 3 - 0.5) + 'px',
|
|
288
|
+
height: (area.height + areaOffset.bottom - areaOffset.top) + 'px',
|
|
289
|
+
'z-index': area.zIndex + 3
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
'border-width': '0 1px 0 0',
|
|
293
|
+
top: (area.top + areaOffset.top) + 'px',
|
|
294
|
+
bottom: (area.bottom + areaOffset.bottom) + 'px',
|
|
295
|
+
left: (area.left + areaOffset.left + (area.width + areaOffset.right - areaOffset.left) * 2 / 3 - 0.5) + 'px',
|
|
296
|
+
height: (area.height + areaOffset.bottom - areaOffset.top) + 'px',
|
|
297
|
+
'z-index': area.zIndex + 3
|
|
298
|
+
}
|
|
299
|
+
];
|
|
300
|
+
var len = grids.length;
|
|
301
|
+
for (var i = 0; i < len; i++) {
|
|
302
|
+
grids[i].setStyle(gridStyles[i]);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// 变更四个伸缩角样式
|
|
307
|
+
if(area.showAngle) {
|
|
308
|
+
var angles = e.instance.selectAllComponents('.crop-angle');
|
|
309
|
+
var angleStyles = [
|
|
310
|
+
{
|
|
311
|
+
'border-width': area.angleBorderWidth + 'px 0 0 ' + area.angleBorderWidth + 'px',
|
|
312
|
+
left: (area.left + areaOffset.left - area.angleBorderWidth) + 'px',
|
|
313
|
+
top: (area.top + areaOffset.top - area.angleBorderWidth) + 'px',
|
|
314
|
+
'z-index': area.zIndex + 3
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
'border-width': area.angleBorderWidth + 'px ' + area.angleBorderWidth + 'px 0 0',
|
|
318
|
+
left: (area.right + areaOffset.right - area.angleSize) + 'px',
|
|
319
|
+
top: (area.top + areaOffset.top - area.angleBorderWidth) + 'px',
|
|
320
|
+
'z-index': area.zIndex + 3
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
'border-width': '0 0 ' + area.angleBorderWidth + 'px ' + area.angleBorderWidth + 'px',
|
|
324
|
+
left: (area.left + areaOffset.left - area.angleBorderWidth) + 'px',
|
|
325
|
+
top: (area.bottom + areaOffset.bottom - area.angleSize) + 'px',
|
|
326
|
+
'z-index': area.zIndex + 3
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
'border-width': '0 ' + area.angleBorderWidth + 'px ' + area.angleBorderWidth + 'px 0',
|
|
330
|
+
left: (area.right + areaOffset.right - area.angleSize) + 'px',
|
|
331
|
+
top: (area.bottom + areaOffset.bottom - area.angleSize) + 'px',
|
|
332
|
+
'z-index': area.zIndex + 3
|
|
333
|
+
}
|
|
334
|
+
];
|
|
335
|
+
var len = angles.length;
|
|
336
|
+
for (var i = 0; i < len; i++) {
|
|
337
|
+
angles[i].setStyle(angleStyles[i]);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// 变更圆角样式
|
|
342
|
+
if(area.radius > 0) {
|
|
343
|
+
var circleBox = e.instance.selectComponent('.crop-circle-box');
|
|
344
|
+
var circle = e.instance.selectComponent('.crop-circle');
|
|
345
|
+
var radius = area.radius;
|
|
346
|
+
if(area.width === area.height && area.radius >= area.width / 2) { // 圆形
|
|
347
|
+
radius = (area.width / 2);
|
|
348
|
+
} else { // 圆角矩形
|
|
349
|
+
if(area.width !== area.height) { // 限制圆角半径不能超过短边的一半
|
|
350
|
+
radius = Math.min(area.width / 2, area.height / 2, radius);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
circleBox.setStyle({
|
|
354
|
+
left: (area.left + areaOffset.left) + 'px',
|
|
355
|
+
top: (area.top + areaOffset.top) + 'px',
|
|
356
|
+
width: (area.width + areaOffset.right - areaOffset.left) + 'px',
|
|
357
|
+
height: (area.height + areaOffset.bottom - areaOffset.top) + 'px',
|
|
358
|
+
'z-index': area.zIndex + 2
|
|
359
|
+
});
|
|
360
|
+
circle.setStyle({
|
|
361
|
+
'box-shadow': '0 0 0 ' + Math.max(area.width, area.height) + 'px rgba(51, 51, 51, 0.8)',
|
|
362
|
+
'border-radius': radius + 'px'
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* 缩放图片
|
|
368
|
+
* @param {Object} e 布局信息
|
|
369
|
+
*/
|
|
370
|
+
function scaleImage(e) {
|
|
371
|
+
var last = scale;
|
|
372
|
+
scale = Math.min(Math.max(e.scale + scale, minScale), img.maxScale);
|
|
373
|
+
if(last !== scale) {
|
|
374
|
+
img.width = num(img.oldWidth * scale);
|
|
375
|
+
img.height = num(img.oldHeight * scale);
|
|
376
|
+
// 参考问题:有一个长4000px、宽4000px的四方形ABCD,A点的坐标固定在(-2000,-2000),
|
|
377
|
+
// 该四边形上有一个点E,坐标为(-100,-300),将该四方形复制一份并缩小到90%后,
|
|
378
|
+
// 新四边形的A点坐标为多少时可使新四边形的E点与原四边形的E点重合?
|
|
379
|
+
// 预期效果:从图中选取某点(参照物)为中心点进行缩放,缩放时无论图像怎么变化,该点位置始终固定不变
|
|
380
|
+
// 计算方法:以相同起点先计算缩放前后两点间的距离,再加上原图像偏移量即可
|
|
381
|
+
e.x = num((e.x - offset.x) * (1 - scale / last));
|
|
382
|
+
e.y = num((e.y - offset.y) * (1 - scale / last));
|
|
383
|
+
changeImageRect(e);
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
386
|
+
return false;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* 获取触摸点在哪个角
|
|
390
|
+
* @param {number} x 触摸点x轴坐标
|
|
391
|
+
* @param {number} y 触摸点y轴坐标
|
|
392
|
+
* @return {number} 角的位置:0=无;1=左上;2=右上;3=左下;4=右下;
|
|
393
|
+
*/
|
|
394
|
+
function getToucheAngle(x, y) {
|
|
395
|
+
// console.log('getToucheAngle', x, y, JSON.stringify(area))
|
|
396
|
+
var o = area.angleBorderWidth; // 需扩大触发范围则把 o 值加大即可
|
|
397
|
+
if(y >= area.top - o && y <= area.top + area.angleSize + o) {
|
|
398
|
+
if(x >= area.left - o && x <= area.left + area.angleSize + o) {
|
|
399
|
+
return 1; // 左上角
|
|
400
|
+
} else if(x >= area.right - area.angleSize - o && x <= area.right + o) {
|
|
401
|
+
return 2; // 右上角
|
|
402
|
+
}
|
|
403
|
+
} else if(y >= area.bottom - area.angleSize - o && y <= area.bottom + o) {
|
|
404
|
+
if(x >= area.left - o && x <= area.left + area.angleSize + o) {
|
|
405
|
+
return 3; // 左下角
|
|
406
|
+
} else if(x >= area.right - area.angleSize - o && x <= area.right + o) {
|
|
407
|
+
return 4; // 右下角
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return 0; // 无触摸到角
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* 重置数据
|
|
414
|
+
*/
|
|
415
|
+
function resetData() {
|
|
416
|
+
offset = { x: 0, y: 0 };
|
|
417
|
+
scale = 1;
|
|
418
|
+
minScale = img.minScale;
|
|
419
|
+
rotate = 0;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* 顺时针翻转图片90°
|
|
423
|
+
* @param {Object} e 事件对象
|
|
424
|
+
* @param {Object} o 组件实例对象
|
|
425
|
+
*/
|
|
426
|
+
function rotateImage(e, o, r) {
|
|
427
|
+
rotate = (rotate + r) % 360;
|
|
428
|
+
if(img.minScale >= 1 && area.checkRange) {
|
|
429
|
+
// 因图片宽高可能不等,翻转后图片宽高需足够填满裁剪区域
|
|
430
|
+
minScale = 1;
|
|
431
|
+
if(img.width < area.height) {
|
|
432
|
+
minScale = area.height / img.oldWidth;
|
|
433
|
+
} else if(img.height < area.width) {
|
|
434
|
+
minScale = area.width / img.oldHeight;
|
|
435
|
+
}
|
|
436
|
+
if(minScale !== 1) {
|
|
437
|
+
scaleImage({
|
|
438
|
+
instance: o,
|
|
439
|
+
scale: minScale - scale,
|
|
440
|
+
x: sys.windowWidth / 2,
|
|
441
|
+
y: (sys.windowHeight - sys.offsetBottom) / 2
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// 由于拖动画布后会导致图片位置偏移,翻转时的旋转中心点需是图片区域+偏移区域的中心点
|
|
447
|
+
// 翻转x轴中心点 = (超出裁剪区域右侧的图片宽度 - 超出裁剪区域左侧的图片宽度) / 2
|
|
448
|
+
// 翻转y轴中心点 = (超出裁剪区域下方的图片宽度 - 超出裁剪区域上方的图片宽度) / 2
|
|
449
|
+
var ox = ((offset.x + img.width - area.right) - (area.left - offset.x)) / 2;
|
|
450
|
+
var oy = ((offset.y + img.height - area.bottom) - (area.top - offset.y)) / 2;
|
|
451
|
+
changeImageRect({
|
|
452
|
+
instance: o,
|
|
453
|
+
check: true,
|
|
454
|
+
x: -ox - oy,
|
|
455
|
+
y: -oy + ox
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
module.exports = {
|
|
459
|
+
/**
|
|
460
|
+
* 初始化:观察数据变更
|
|
461
|
+
* @param {Object} newVal 新数据
|
|
462
|
+
* @param {Object} oldVal 旧数据
|
|
463
|
+
* @param {Object} o 组件实例对象
|
|
464
|
+
*/
|
|
465
|
+
initObserver: function(newVal, oldVal, o, i) {
|
|
466
|
+
if(newVal) {
|
|
467
|
+
img = newVal.img;
|
|
468
|
+
sys = newVal.sys;
|
|
469
|
+
area = newVal.area;
|
|
470
|
+
minScale = img.minScale;
|
|
471
|
+
resetData();
|
|
472
|
+
img.src && changeImageRect({
|
|
473
|
+
instance: o,
|
|
474
|
+
x: (sys.windowWidth - img.width) / 2,
|
|
475
|
+
y: (sys.windowHeight - sys.offsetBottom - img.height) / 2
|
|
476
|
+
});
|
|
477
|
+
changeAreaRect({
|
|
478
|
+
instance: o
|
|
479
|
+
});
|
|
480
|
+
// console.log('initRect', JSON.stringify(newVal))
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
/**
|
|
484
|
+
* 鼠标滚轮滚动
|
|
485
|
+
* @param {Object} e 事件对象
|
|
486
|
+
* @param {Object} o 组件实例对象
|
|
487
|
+
*/
|
|
488
|
+
mousewheel: function(e, o) {
|
|
489
|
+
if(!img.src) return;
|
|
490
|
+
scaleImage({
|
|
491
|
+
instance: o,
|
|
492
|
+
check: true,
|
|
493
|
+
// 鼠标向上滚动时,deltaY 固定 -100,鼠标向下滚动时,deltaY 固定 100
|
|
494
|
+
scale: e.detail.deltaY > 0 ? -0.05 : 0.05,
|
|
495
|
+
x: e.touches[0].pageX,
|
|
496
|
+
y: e.touches[0].pageY
|
|
497
|
+
});
|
|
498
|
+
},
|
|
499
|
+
/**
|
|
500
|
+
* 触摸开始
|
|
501
|
+
* @param {Object} e 事件对象
|
|
502
|
+
* @param {Object} o 组件实例对象
|
|
503
|
+
*/
|
|
504
|
+
touchstart: function(e, o) {
|
|
505
|
+
if(!img.src) return;
|
|
506
|
+
touches = e.touches;
|
|
507
|
+
activeAngle = area.showAngle ? getToucheAngle(touches[0].pageX, touches[0].pageY) : 0;
|
|
508
|
+
if(touches.length === 1 && activeAngle !== 0) {
|
|
509
|
+
touchType = 'stretch'; // 伸缩裁剪区域
|
|
510
|
+
} else {
|
|
511
|
+
touchType = '';
|
|
512
|
+
}
|
|
513
|
+
// console.log('touchstart', JSON.stringify(e), activeAngle)
|
|
514
|
+
},
|
|
515
|
+
/**
|
|
516
|
+
* 触摸移动
|
|
517
|
+
* @param {Object} e 事件对象
|
|
518
|
+
* @param {Object} o 组件实例对象
|
|
519
|
+
*/
|
|
520
|
+
touchmove: function(e, o) {
|
|
521
|
+
if(!img.src) return;
|
|
522
|
+
// console.log('touchmove', JSON.stringify(e), JSON.stringify(o))
|
|
523
|
+
if(touchType === 'stretch') { // 触摸四个角进行拉伸
|
|
524
|
+
var point = e.touches[0];
|
|
525
|
+
var start = touches[0];
|
|
526
|
+
var x = point.pageX - start.pageX;
|
|
527
|
+
var y = point.pageY - start.pageY;
|
|
528
|
+
if(x !== 0 || y !== 0) {
|
|
529
|
+
var maxX = num(area.width * (1 - area.minScale));
|
|
530
|
+
var maxY = num(area.height * (1 - area.minScale));
|
|
531
|
+
// console.log(x, y, maxX, maxY, offset, area)
|
|
532
|
+
touches[0] = point;
|
|
533
|
+
var r = rotate / 90 % 2;
|
|
534
|
+
var m = r === 1 ? num((img.height - img.width) / 2) : 0; // 宽高差值一半
|
|
535
|
+
var xCompare = r === 1 ? lessThanByFault(img.height, area.width) : lessThanByFault(img.width, area.width);
|
|
536
|
+
var yCompare = r === 1 ? lessThanByFault(img.width, area.height) : lessThanByFault(img.height, area.height)
|
|
537
|
+
var isInclude = xCompare && yCompare;
|
|
538
|
+
var isIntersect = area.checkRange && (xCompare || yCompare); // 图片是否包含在裁剪区域内
|
|
539
|
+
var isReverse = !isInclude || num((offset.x - area.left) / area.width) <= num((offset.y - area.top) / area.height) || (area.width > area.height && img.width < img.height && r === 1);
|
|
540
|
+
switch(activeAngle) {
|
|
541
|
+
case 1: // 左上角
|
|
542
|
+
x = num(x + areaOffset.left);
|
|
543
|
+
y = num(y + areaOffset.top);
|
|
544
|
+
if(x >= 0 && y >= 0) { // 有效滑动
|
|
545
|
+
var t = num(offset.y + m - area.top);
|
|
546
|
+
var l = num(offset.x - m - area.left);
|
|
547
|
+
// && (offset.x + img.width < area.right || offset.y + img.height < area.bottom)
|
|
548
|
+
var max = isIntersect && ((l >= 0) || (t >= 0))
|
|
549
|
+
? minimum(t, l)
|
|
550
|
+
: false;
|
|
551
|
+
if(x > y && isReverse) { // 以x轴滑动距离为缩放基准
|
|
552
|
+
maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height);
|
|
553
|
+
if(x > maxX) x = maxX;
|
|
554
|
+
y = num(x * area.height / area.width);
|
|
555
|
+
} else { // 以y轴滑动距离为缩放基准
|
|
556
|
+
maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width);
|
|
557
|
+
if(y > maxY) y = maxY;
|
|
558
|
+
x = num(y * area.width / area.height);
|
|
559
|
+
}
|
|
560
|
+
areaOffset.left = x;
|
|
561
|
+
areaOffset.top = y;
|
|
562
|
+
}
|
|
563
|
+
break;
|
|
564
|
+
case 2: // 右上角
|
|
565
|
+
x = num(x + areaOffset.right);
|
|
566
|
+
y = num(y + areaOffset.top);
|
|
567
|
+
if(x <= 0 && y >= 0) { // 有效滑动
|
|
568
|
+
var w = (r === 1 ? img.height : img.width);
|
|
569
|
+
var t = num(offset.y + m - area.top);
|
|
570
|
+
var l = num(area.right + m - offset.x - w);
|
|
571
|
+
var max = isIntersect && ((t >= 0) || (l >= 0))
|
|
572
|
+
? minimum(t, l)
|
|
573
|
+
: false;
|
|
574
|
+
// var max = isInclude && ((offset.x > 0 && offset.x + img.width <= area.right) || (offset.y > 0 && offset.y >= area.top))
|
|
575
|
+
// ? minimum(offset.y - area.top, area.right - offset.x - img.width)
|
|
576
|
+
// : false;
|
|
577
|
+
// console.log(offset.x, offset.y, img.width, img.height, area.top, area.right, m, max)
|
|
578
|
+
// console.log(offset.y + m - area.top, area.right + m - offset.x - w)
|
|
579
|
+
if(-x > y && isReverse) { // 以x轴滑动距离为缩放基准
|
|
580
|
+
maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height);
|
|
581
|
+
if(-x > maxX) x = -maxX;
|
|
582
|
+
y = num(-x * area.height / area.width);
|
|
583
|
+
} else { // 以y轴滑动距离为缩放基准
|
|
584
|
+
maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width);
|
|
585
|
+
if(y > maxY) y = maxY;
|
|
586
|
+
x = num(-y * area.width / area.height);
|
|
587
|
+
}
|
|
588
|
+
areaOffset.right = x;
|
|
589
|
+
areaOffset.top = y;
|
|
590
|
+
}
|
|
591
|
+
break;
|
|
592
|
+
case 3: // 左下角
|
|
593
|
+
x += num(x + areaOffset.left);
|
|
594
|
+
y += num(y + areaOffset.bottom);
|
|
595
|
+
if(x >= 0 && y <= 0) { // 有效滑动
|
|
596
|
+
var w = (r === 1 ? img.width : img.height);
|
|
597
|
+
var t = num(area.bottom - m - offset.y - w);
|
|
598
|
+
var l = num(offset.x - m - area.left);
|
|
599
|
+
var max = isIntersect && ((l >= 0) || (t >= 0))
|
|
600
|
+
? minimum(t, l)
|
|
601
|
+
: false;
|
|
602
|
+
if(x > -y && isReverse) { // 以x轴滑动距离为缩放基准
|
|
603
|
+
maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height);
|
|
604
|
+
if(x > maxX) x = maxX;
|
|
605
|
+
y = num(-x * area.height / area.width);
|
|
606
|
+
} else { // 以y轴滑动距离为缩放基准
|
|
607
|
+
maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width);
|
|
608
|
+
if(-y > maxY) y = -maxY;
|
|
609
|
+
x = num(-y * area.width / area.height);
|
|
610
|
+
}
|
|
611
|
+
areaOffset.left = x;
|
|
612
|
+
areaOffset.bottom = y;
|
|
613
|
+
}
|
|
614
|
+
break;
|
|
615
|
+
case 4: // 右下角
|
|
616
|
+
x = num(x + areaOffset.right);
|
|
617
|
+
y = num(y + areaOffset.bottom);
|
|
618
|
+
if(x <= 0 && y <= 0) { // 有效滑动
|
|
619
|
+
var w = (r === 1 ? img.height : img.width);
|
|
620
|
+
var h = (r === 1 ? img.width : img.height);
|
|
621
|
+
var t = num(area.bottom - offset.y - h - m);
|
|
622
|
+
var l = num(area.right + m - offset.x - w);
|
|
623
|
+
var max = isIntersect && ((l >= 0) || (t >= 0))
|
|
624
|
+
? minimum(t, l)
|
|
625
|
+
: false;
|
|
626
|
+
if(-x > -y && isReverse) { // 以x轴滑动距离为缩放基准
|
|
627
|
+
maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height);
|
|
628
|
+
if(-x > maxX) x = -maxX;
|
|
629
|
+
y = num(x * area.height / area.width);
|
|
630
|
+
} else { // 以y轴滑动距离为缩放基准
|
|
631
|
+
maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width);
|
|
632
|
+
if(-y > maxY) y = -maxY;
|
|
633
|
+
x = num(y * area.width / area.height);
|
|
634
|
+
}
|
|
635
|
+
areaOffset.right = x;
|
|
636
|
+
areaOffset.bottom = y;
|
|
637
|
+
}
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
// console.log(x, y, JSON.stringify(areaOffset))
|
|
641
|
+
changeAreaRect({
|
|
642
|
+
instance: o,
|
|
643
|
+
});
|
|
644
|
+
// this.draw();
|
|
645
|
+
}
|
|
646
|
+
} else if (e.touches.length == 2) { // 双点触摸缩放
|
|
647
|
+
var start = getDistanceByTouches(touches);
|
|
648
|
+
var end = getDistanceByTouches(e.touches);
|
|
649
|
+
scaleImage({
|
|
650
|
+
instance: o,
|
|
651
|
+
check: !area.bounce,
|
|
652
|
+
scale: (end.c - start.c) / 100,
|
|
653
|
+
x: end.x,
|
|
654
|
+
y: end.y
|
|
655
|
+
});
|
|
656
|
+
touchType = 'scale';
|
|
657
|
+
} else if(touchType === 'scale') {// 从双点触摸变成单点触摸 / 从缩放变成拖动
|
|
658
|
+
touchType = 'move';
|
|
659
|
+
} else {
|
|
660
|
+
changeImageRect({
|
|
661
|
+
instance: o,
|
|
662
|
+
check: !area.bounce,
|
|
663
|
+
x: e.touches[0].pageX - touches[0].pageX,
|
|
664
|
+
y: e.touches[0].pageY - touches[0].pageY
|
|
665
|
+
});
|
|
666
|
+
touchType = 'move';
|
|
667
|
+
}
|
|
668
|
+
touches = e.touches;
|
|
669
|
+
},
|
|
670
|
+
/**
|
|
671
|
+
* 触摸结束
|
|
672
|
+
* @param {Object} e 事件对象
|
|
673
|
+
* @param {Object} o 组件实例对象
|
|
674
|
+
*/
|
|
675
|
+
touchend: function(e, o) {
|
|
676
|
+
if(!img.src) return;
|
|
677
|
+
if(touchType === 'stretch') { // 拉伸裁剪区域的四个角缩放
|
|
678
|
+
// 裁剪区域宽度被缩放到多少
|
|
679
|
+
var left = areaOffset.left;
|
|
680
|
+
var right = areaOffset.right;
|
|
681
|
+
var top = areaOffset.top;
|
|
682
|
+
var bottom = areaOffset.bottom;
|
|
683
|
+
var w = area.width + right - left;
|
|
684
|
+
var h = area.height + bottom - top;
|
|
685
|
+
// 图像放大倍数
|
|
686
|
+
var p = scale * (area.width / w) - scale;
|
|
687
|
+
// 复原裁剪区域
|
|
688
|
+
areaOffset = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
689
|
+
changeAreaRect({
|
|
690
|
+
instance: o,
|
|
691
|
+
});
|
|
692
|
+
scaleImage({
|
|
693
|
+
instance: o,
|
|
694
|
+
scale: p,
|
|
695
|
+
x: area.left + left + (1 === activeAngle || 3 === activeAngle ? w : 0),
|
|
696
|
+
y: area.top + top + (1 === activeAngle || 2 === activeAngle ? h : 0)
|
|
697
|
+
});
|
|
698
|
+
} else if (area.bounce) { // 检查边界并矫正,实现拖动到边界时有回弹效果
|
|
699
|
+
changeImageRect({
|
|
700
|
+
instance: o,
|
|
701
|
+
check: true
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
/**
|
|
706
|
+
* 顺时针翻转图片90°
|
|
707
|
+
* @param {Object} e 事件对象
|
|
708
|
+
* @param {Object} o 组件实例对象
|
|
709
|
+
*/
|
|
710
|
+
rotateImage: function(e, o) {
|
|
711
|
+
rotateImage(e, o, 90);
|
|
712
|
+
},
|
|
713
|
+
rotateImage90: function(e, o) {
|
|
714
|
+
rotateImage(e, o, 90)
|
|
715
|
+
},
|
|
716
|
+
rotateImage270: function(e, o) {
|
|
717
|
+
rotateImage(e, o, 270)
|
|
718
|
+
},
|
|
719
|
+
// 此处只用于对齐其他平台端的样式参数,防止异常,无作用
|
|
720
|
+
imageStyles: '',
|
|
721
|
+
maskStylesList: ['', '', '', ''],
|
|
722
|
+
borderStyles: '',
|
|
723
|
+
gridStylesList: ['', '', '', ''],
|
|
724
|
+
angleStylesList: ['', '', '', ''],
|
|
725
|
+
circleBoxStyles: '',
|
|
726
|
+
circleStyles: '',
|
|
727
|
+
}
|