深度画布-平铺设置
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user