yh-hiprint 2.6.20 → 2.6.22
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/HiprintDesigner.vue +10 -0
- package/package.json +1 -1
package/HiprintDesigner.vue
CHANGED
|
@@ -455,6 +455,13 @@
|
|
|
455
455
|
|
|
456
456
|
const {paperType, paperTypeName, paperTypesObj, paperWidth, paperHeight, setPaper} = usePaper();
|
|
457
457
|
|
|
458
|
+
function setPaperHandler(type) {
|
|
459
|
+
setPaper(type, () => {
|
|
460
|
+
if (!hiprintTemplate.value) return;
|
|
461
|
+
hiprintTemplate.value.setPaper(paperWidth.value, paperHeight.value);
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
|
|
458
465
|
const canvasRef = ref();
|
|
459
466
|
const {scaleValue, scalePercentage, canZoomIn, canZoomOut, zoomIn, zoomOut} = useScale(() => {
|
|
460
467
|
hiprintTemplate.value?.zoom(scaleValue.value);
|
|
@@ -963,6 +970,9 @@
|
|
|
963
970
|
|
|
964
971
|
onMounted(async () => {
|
|
965
972
|
await getDataSourceList();
|
|
973
|
+
if (route.query.code) {
|
|
974
|
+
updateTemplate(route.query.code);
|
|
975
|
+
}
|
|
966
976
|
});
|
|
967
977
|
</script>
|
|
968
978
|
<style lang="scss">
|