picture_edit 2.1.0 → 2.1.2
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/README.md +11 -2
- package/dist/picture-edit.js +1 -1
- package/package.json +2 -1
- package/README_CN.md +0 -45
- package/favicon.ico +0 -0
- package/index.html +0 -44
- package/src/assets/cancel.svg +0 -1
- package/src/assets/delete.svg +0 -1
- package/src/assets/painting.svg +0 -1
- package/src/assets/painting_cancel.svg +0 -1
- package/src/assets/pin_to_top.svg +0 -1
- package/src/assets/return.svg +0 -1
- package/src/assets/rotate.svg +0 -1
- package/src/assets/save.svg +0 -1
- package/src/assets/scale.svg +0 -1
- package/src/assets/test1.jpg +0 -0
- package/src/assets/test2.jpg +0 -0
- package/src/assets/text.svg +0 -1
- package/src/index.js +0 -113
- package/src/lib/GLOBAL.js +0 -76
- package/src/lib/Utils.js +0 -101
- package/src/lib/listeners.js +0 -539
- package/src/lib/vconsole.min.js +0 -10
- package/src/template/frame.html +0 -28
- package/src/template/frame.less +0 -143
- package/webpack.config.js +0 -51
package/src/template/frame.html
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<div class="picture-edit-frame">
|
|
2
|
-
<div class="cancel-btn" operate="cancel">
|
|
3
|
-
<img src="../assets/cancel.svg" class="operate-img" operate="cancel">
|
|
4
|
-
</div>
|
|
5
|
-
<div class="save-btn" operate="save">
|
|
6
|
-
<img src="../assets/save.svg" class="operate-img" operate="save">
|
|
7
|
-
</div>
|
|
8
|
-
<div class="body-content">
|
|
9
|
-
<div class="canvas-box"></div>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="footer-content">
|
|
12
|
-
<div class="operate-item" operate="line">
|
|
13
|
-
<img src="../assets/painting_cancel.svg" class="operate-img" operate="line">
|
|
14
|
-
</div>
|
|
15
|
-
<div class="operate-item" operate="text">
|
|
16
|
-
<img src="../assets/text.svg" class="operate-img" operate="text">
|
|
17
|
-
</div>
|
|
18
|
-
<div class="operate-item" operate="back">
|
|
19
|
-
<img src="../assets/return.svg" class="operate-img" operate="back">
|
|
20
|
-
</div>
|
|
21
|
-
<div class="operate-item" operate="clear">
|
|
22
|
-
<img src="../assets/delete.svg" class="operate-img" operate="clear">
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="text-content">
|
|
26
|
-
<div contenteditable="true" class="text-input"></div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
package/src/template/frame.less
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
.picture-edit-frame {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
width: 100vw;
|
|
6
|
-
z-index: 99999;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
font-size: 16px;
|
|
10
|
-
|
|
11
|
-
.body-content {
|
|
12
|
-
flex: 1;
|
|
13
|
-
background-color: #fff;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
will-change: transform;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.cancel-btn {
|
|
19
|
-
position: fixed;
|
|
20
|
-
left: 15px;
|
|
21
|
-
top: 15px;
|
|
22
|
-
padding: 5px 13px;
|
|
23
|
-
background-color: white;
|
|
24
|
-
color: black;
|
|
25
|
-
z-index: 2;
|
|
26
|
-
border-radius: 3px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.save-btn {
|
|
30
|
-
position: fixed;
|
|
31
|
-
right: 15px;
|
|
32
|
-
top: 15px;
|
|
33
|
-
padding: 5px 13px;
|
|
34
|
-
background-color: white;
|
|
35
|
-
color: white;
|
|
36
|
-
z-index: 2;
|
|
37
|
-
border-radius: 3px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.cancel-test {
|
|
41
|
-
position: fixed;
|
|
42
|
-
right: 125px;
|
|
43
|
-
top: 15px;
|
|
44
|
-
padding: 5px 13px;
|
|
45
|
-
background-color: #67c23a;
|
|
46
|
-
color: white;
|
|
47
|
-
z-index: 2;
|
|
48
|
-
border-radius: 3px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.canvas-box {
|
|
52
|
-
position: relative;
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
align-items: center;
|
|
56
|
-
overflow: hidden;
|
|
57
|
-
}
|
|
58
|
-
.footer-content {
|
|
59
|
-
background-color: #000;
|
|
60
|
-
height: 6em;
|
|
61
|
-
display: flex;
|
|
62
|
-
text-align: center;
|
|
63
|
-
color: #fff;
|
|
64
|
-
align-items: flex-start;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.operate-item {
|
|
68
|
-
display: block;
|
|
69
|
-
margin-top: 25px;
|
|
70
|
-
width: 10px;
|
|
71
|
-
flex: 1;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.operate-img {
|
|
75
|
-
width: 1.3em;
|
|
76
|
-
height: 1.3em;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.text-content {
|
|
80
|
-
position: absolute;
|
|
81
|
-
inset: 0px;
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
z-index: 2;
|
|
84
|
-
display: none;
|
|
85
|
-
background-color: white;
|
|
86
|
-
opacity: 0.93;
|
|
87
|
-
|
|
88
|
-
.text-input {
|
|
89
|
-
min-height: 15%;
|
|
90
|
-
border-radius: 5px;
|
|
91
|
-
border: 2px solid rgb(99, 236, 161);
|
|
92
|
-
outline: none;
|
|
93
|
-
width: 96%;
|
|
94
|
-
box-sizing: border-box;
|
|
95
|
-
position: absolute;
|
|
96
|
-
top: 8%;
|
|
97
|
-
left: 2%;
|
|
98
|
-
right: 2%;
|
|
99
|
-
z-index: 2;
|
|
100
|
-
padding: 3px 5px;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.icon-rotate {
|
|
105
|
-
width: 18px;
|
|
106
|
-
position: absolute;
|
|
107
|
-
right: -5px;
|
|
108
|
-
bottom: -22px;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.icon-remove {
|
|
112
|
-
width: 18px;
|
|
113
|
-
position: absolute;
|
|
114
|
-
left: -5px;
|
|
115
|
-
bottom: -22px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.icon-scale {
|
|
119
|
-
width: 18px;
|
|
120
|
-
position: absolute;
|
|
121
|
-
right: -5px;
|
|
122
|
-
top: -22px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.operate-rotate {
|
|
126
|
-
position: absolute;
|
|
127
|
-
width: 20px;
|
|
128
|
-
bottom: -30px;
|
|
129
|
-
left: 50%;
|
|
130
|
-
transform: translateX(-50%);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.operate-scale {
|
|
134
|
-
position: absolute;
|
|
135
|
-
width: 16px;
|
|
136
|
-
height: 16px;
|
|
137
|
-
background-color: #fff;
|
|
138
|
-
right: -8px;
|
|
139
|
-
top: -8px;
|
|
140
|
-
border-radius: 50%;
|
|
141
|
-
box-sizing: border-box;
|
|
142
|
-
}
|
|
143
|
-
}
|
package/webpack.config.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
entry: './src/index.js',
|
|
6
|
-
output: {
|
|
7
|
-
path: path.resolve(__dirname, 'dist'),
|
|
8
|
-
filename: 'picture-edit.js',
|
|
9
|
-
library: {
|
|
10
|
-
name: 'PED',
|
|
11
|
-
type: 'umd',
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
mode: "production",
|
|
15
|
-
devServer: {
|
|
16
|
-
static: './dist',
|
|
17
|
-
hot: true,
|
|
18
|
-
client: {
|
|
19
|
-
overlay: {
|
|
20
|
-
warnings: false, // 不在页面上显示警告
|
|
21
|
-
errors: true, // 显示错误
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
plugins: [
|
|
26
|
-
new HtmlWebpackPlugin({
|
|
27
|
-
template: './index.html',//指定一个HTML模板文件
|
|
28
|
-
filename: 'index.html'//生成的HTML文件名,默认是index.html
|
|
29
|
-
})
|
|
30
|
-
],
|
|
31
|
-
module: {
|
|
32
|
-
rules: [
|
|
33
|
-
{
|
|
34
|
-
test: /\.html$/,
|
|
35
|
-
use: ['html-loader'], // 使用 html-loader 加载 HTML 文件
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
test: /\.less$/,
|
|
39
|
-
use: [
|
|
40
|
-
"style-loader",
|
|
41
|
-
"css-loader",
|
|
42
|
-
"less-loader"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
test: /\.svg$/,
|
|
47
|
-
type: 'asset/inline',
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
};
|