复制粘贴保存等
This commit is contained in:
@@ -1 +1 @@
|
|||||||
{"history":[{"time":"2025-6-2","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi6.soon"},{"time":"2025-4-10","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi7.soon"},{"time":"2025-4-9","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi5.soon"},{"time":"2025-4-9","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi.soon"}]}
|
{"history":[{"time":"2025-6-2","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi6.soon"},{"time":"2025-6-3","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi7.soon"},{"time":"2025-4-9","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi5.soon"},{"time":"2025-4-9","path":"E:\\project\\sideline\\shanghaikashu\\文件\\soon文件\\ceshi.soon"}]}
|
||||||
+24
-5
@@ -460,9 +460,17 @@
|
|||||||
<img src="public/images/open24.png" language="t" zh="打开模板" ozh="打開模闆"
|
<img src="public/images/open24.png" language="t" zh="打开模板" ozh="打開模闆"
|
||||||
en="Open Template" />
|
en="Open Template" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="img-warp" id="copy">
|
||||||
|
<img src="public/images/copy24.png" language="t" zh="复制CTRL+C" ozh="複製CTRL+C"
|
||||||
|
en="Copy CTRL+C" />
|
||||||
|
</div>
|
||||||
|
<div class="img-warp" id="paste">
|
||||||
|
<img src="public/images/paste24.png" language="t" zh="粘贴CTRL+V" ozh="粘貼CTRL+V"
|
||||||
|
en="Paste CTRL+V" />
|
||||||
|
</div>
|
||||||
<div class="img-warp" id="save">
|
<div class="img-warp" id="save">
|
||||||
<img src="public/images/save24.png" language="t" zh="保存模板" ozh="保存模闆"
|
<img src="public/images/save24.png" language="t" zh="保存模板CTRL+S" ozh="保存模闆CTRL+S"
|
||||||
en="Save Template" />
|
en="Save Template CTRL+S" />
|
||||||
</div>
|
</div>
|
||||||
<div class="img-warp" id="output">
|
<div class="img-warp" id="output">
|
||||||
<img src="public/images/output24.png" language="t" zh="另存为" ozh="另存為" en="Save as" />
|
<img src="public/images/output24.png" language="t" zh="另存为" ozh="另存為" en="Save as" />
|
||||||
@@ -585,7 +593,7 @@
|
|||||||
<img id="source_back" src="./public/images/back_bg_1.png" style="display: none" />
|
<img id="source_back" src="./public/images/back_bg_1.png" style="display: none" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="./public/js/fabric.min.js"></script>
|
<script src="./public/js/fabric1.min.js"></script>
|
||||||
<script src="./public/js/guideLines1.js"></script>
|
<script src="./public/js/guideLines1.js"></script>
|
||||||
<script src="./public/js/print.min.js"></script>
|
<script src="./public/js/print.min.js"></script>
|
||||||
<script src="./public/js/crypto-js.min.js"></script>
|
<script src="./public/js/crypto-js.min.js"></script>
|
||||||
@@ -4192,6 +4200,15 @@
|
|||||||
console.log()
|
console.log()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 复制
|
||||||
|
$("#copy").click(function () {
|
||||||
|
copySelection();
|
||||||
|
})
|
||||||
|
// 粘贴
|
||||||
|
$("#paste").click(function () {
|
||||||
|
pasteFromClipboard();
|
||||||
|
})
|
||||||
|
// 保存
|
||||||
$("#save").click(function () {
|
$("#save").click(function () {
|
||||||
output();
|
output();
|
||||||
return;
|
return;
|
||||||
@@ -6218,13 +6235,13 @@
|
|||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
function handleKeyDown(e) {
|
function handleKeyDown(e) {
|
||||||
// 检测 Ctrl+C
|
// 检测 Ctrl+C
|
||||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === 67) {
|
if ((e.ctrlKey || e.metaKey) && e.keyCode === 67 && e.target.nodeName == 'BODY') {
|
||||||
copySelection();
|
copySelection();
|
||||||
e.preventDefault(); // 阻止默认复制行为
|
e.preventDefault(); // 阻止默认复制行为
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检测 Ctrl+V
|
// 检测 Ctrl+V
|
||||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === 86) {
|
if ((e.ctrlKey || e.metaKey) && e.keyCode === 86 && e.target.nodeName == 'BODY') {
|
||||||
pasteFromClipboard();
|
pasteFromClipboard();
|
||||||
e.preventDefault(); // 阻止默认粘贴行为
|
e.preventDefault(); // 阻止默认粘贴行为
|
||||||
}
|
}
|
||||||
@@ -6242,6 +6259,7 @@
|
|||||||
|
|
||||||
if (!activeObjects || activeObjects.length === 0) {
|
if (!activeObjects || activeObjects.length === 0) {
|
||||||
console.log("未选中任何对象");
|
console.log("未选中任何对象");
|
||||||
|
layer.msg("未选中任何对象")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6255,6 +6273,7 @@
|
|||||||
function pasteFromClipboard() {
|
function pasteFromClipboard() {
|
||||||
if (!clipboardData.objects || clipboardData.objects.length === 0) {
|
if (!clipboardData.objects || clipboardData.objects.length === 0) {
|
||||||
console.log("剪贴板为空");
|
console.log("剪贴板为空");
|
||||||
|
layer.msg("剪贴板为空")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+24
-5
@@ -441,9 +441,17 @@
|
|||||||
<img src="public/images/open24.png" language="t" zh="打开模板" ozh="打開模闆"
|
<img src="public/images/open24.png" language="t" zh="打开模板" ozh="打開模闆"
|
||||||
en="Open Template" />
|
en="Open Template" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="img-warp" id="copy">
|
||||||
|
<img src="public/images/copy24.png" language="t" zh="复制CTRL+C" ozh="複製CTRL+C"
|
||||||
|
en="Copy CTRL+C" />
|
||||||
|
</div>
|
||||||
|
<div class="img-warp" id="paste">
|
||||||
|
<img src="public/images/paste24.png" language="t" zh="粘贴CTRL+V" ozh="粘貼CTRL+V"
|
||||||
|
en="Paste CTRL+V" />
|
||||||
|
</div>
|
||||||
<div class="img-warp" id="save">
|
<div class="img-warp" id="save">
|
||||||
<img src="public/images/save24.png" language="t" zh="保存模板" ozh="保存模闆"
|
<img src="public/images/save24.png" language="t" zh="保存模板CTRL+S" ozh="保存模闆CTRL+S"
|
||||||
en="Save Template" />
|
en="Save Template CTRL+S" />
|
||||||
</div>
|
</div>
|
||||||
<div class="img-warp" id="output">
|
<div class="img-warp" id="output">
|
||||||
<img src="public/images/output24.png" language="t" zh="另存为" ozh="另存為" en="Save as" />
|
<img src="public/images/output24.png" language="t" zh="另存为" ozh="另存為" en="Save as" />
|
||||||
@@ -564,7 +572,7 @@
|
|||||||
<img id="source_back" src="./public/images/back_bg_2.png" style="display: none" />
|
<img id="source_back" src="./public/images/back_bg_2.png" style="display: none" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="./public/js/fabric.min.js"></script>
|
<script src="./public/js/fabric2.min.js"></script>
|
||||||
<script src="./public/js/guideLines2.js"></script>
|
<script src="./public/js/guideLines2.js"></script>
|
||||||
<script src="./public/js/print.min.js"></script>
|
<script src="./public/js/print.min.js"></script>
|
||||||
<script src="./public/js/crypto-js.min.js"></script>
|
<script src="./public/js/crypto-js.min.js"></script>
|
||||||
@@ -3614,6 +3622,15 @@
|
|||||||
console.log()
|
console.log()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 复制
|
||||||
|
$("#copy").click(function () {
|
||||||
|
copySelection();
|
||||||
|
})
|
||||||
|
// 粘贴
|
||||||
|
$("#paste").click(function () {
|
||||||
|
pasteFromClipboard();
|
||||||
|
})
|
||||||
|
// 保存
|
||||||
$('#save').click(function () {
|
$('#save').click(function () {
|
||||||
output()
|
output()
|
||||||
return
|
return
|
||||||
@@ -5638,13 +5655,13 @@
|
|||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
function handleKeyDown(e) {
|
function handleKeyDown(e) {
|
||||||
// 检测 Ctrl+C
|
// 检测 Ctrl+C
|
||||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === 67) {
|
if ((e.ctrlKey || e.metaKey) && e.keyCode === 67 && e.target.nodeName == 'BODY') {
|
||||||
copySelection();
|
copySelection();
|
||||||
e.preventDefault(); // 阻止默认复制行为
|
e.preventDefault(); // 阻止默认复制行为
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检测 Ctrl+V
|
// 检测 Ctrl+V
|
||||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === 86) {
|
if ((e.ctrlKey || e.metaKey) && e.keyCode === 86 && e.target.nodeName == 'BODY') {
|
||||||
pasteFromClipboard();
|
pasteFromClipboard();
|
||||||
e.preventDefault(); // 阻止默认粘贴行为
|
e.preventDefault(); // 阻止默认粘贴行为
|
||||||
}
|
}
|
||||||
@@ -5662,6 +5679,7 @@
|
|||||||
|
|
||||||
if (!activeObjects || activeObjects.length === 0) {
|
if (!activeObjects || activeObjects.length === 0) {
|
||||||
console.log("未选中任何对象");
|
console.log("未选中任何对象");
|
||||||
|
layer.msg("未选中任何对象")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5675,6 +5693,7 @@
|
|||||||
function pasteFromClipboard() {
|
function pasteFromClipboard() {
|
||||||
if (!clipboardData.objects || clipboardData.objects.length === 0) {
|
if (!clipboardData.objects || clipboardData.objects.length === 0) {
|
||||||
console.log("剪贴板为空");
|
console.log("剪贴板为空");
|
||||||
|
layer.msg("剪贴板为空")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 424 B |
Binary file not shown.
|
After Width: | Height: | Size: 327 B |
Binary file not shown.
|
After Width: | Height: | Size: 367 B |
+1
-1
@@ -30745,7 +30745,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|||||||
y: -0.5,
|
y: -0.5,
|
||||||
actionHandler: controlsUtils.rotationWithSnapping,
|
actionHandler: controlsUtils.rotationWithSnapping,
|
||||||
cursorStyleHandler: controlsUtils.rotationStyleHandler,
|
cursorStyleHandler: controlsUtils.rotationStyleHandler,
|
||||||
offsetY: -40,
|
offsetY: -120,
|
||||||
withConnection: true,
|
withConnection: true,
|
||||||
actionName: 'rotate',
|
actionName: 'rotate',
|
||||||
});
|
});
|
||||||
Vendored
+30786
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user