深度画布-平铺设置

This commit is contained in:
lzp
2026-03-16 16:51:12 +08:00
parent 1667d8d3a9
commit dc5d932b11
15 changed files with 539 additions and 59 deletions

View File

@@ -36,9 +36,10 @@
step: { default: 0.1, type: Number }
})
const emit = defineEmits(['export', 'export-local', 'import-local', 'export-close'])
const importLocalImage = inject('importLocalImage') as () => void
const importLocalImage = inject('importLocalImage') as (isRecord?: boolean) => void
const stateManager = inject('stateManager') as any
const toolManager = inject('toolManager') as any
const objectManager = inject('objectManager') as any
const tool = computed(() => toolManager.currentTool.value)
const historyIndex = computed(() => stateManager.historyIndex.value)
const historyList = computed(() => stateManager.historyList.value)
@@ -54,7 +55,7 @@
icon: 'dc-image',
iconSize: 17,
disabled: ref(false),
on: () => importLocalImage()
on: () => onImageClick()
},
{ name: OperationType.SELECTBOX, icon: 'dc-selectbox', iconSize: 16, disabled: ref(false) },
{ name: OperationType.RECTANGLE, icon: 'dc-rectangle', iconSize: 16, disabled: ref(false) },
@@ -82,6 +83,10 @@
toolManager.setTool(tool.name)
}
}
const onImageClick = async () => {
const layer = await importLocalImage(false)
objectManager.setFillRepeat(layer?.info?.id)
}
</script>
<style lang="less" scoped>