mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 23:15:26 +00:00
支持水印排列
御魂2,4,6属性简称 修正截图大小 式神,御魂信息更新
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { onMounted,watch, ref } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
text: {
|
||||
@@ -31,6 +31,8 @@ onMounted(() => {
|
||||
createWatermark();
|
||||
});
|
||||
|
||||
|
||||
|
||||
const createWatermark = () => {
|
||||
const canvas = document.createElement('canvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
@@ -78,6 +80,9 @@ const createWatermark = () => {
|
||||
// });
|
||||
// observer.observe(container);
|
||||
};
|
||||
|
||||
// 响应props变化
|
||||
watch(() => [props.text, props.font, props.color, props.angle], createWatermark);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user