diff --git a/components.d.ts b/components.d.ts
index 1796a907..27d9abac 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -18,6 +18,7 @@ declare module 'vue' {
AMenu: typeof import('ant-design-vue/es')['Menu']
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
AModal: typeof import('ant-design-vue/es')['Modal']
+ APagination: typeof import('ant-design-vue/es')['Pagination']
APopover: typeof import('ant-design-vue/es')['Popover']
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
ASelect: typeof import('ant-design-vue/es')['Select']
@@ -27,6 +28,7 @@ declare module 'vue' {
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
AUpload: typeof import('ant-design-vue/es')['Upload']
+ ElCascader: typeof import('element-plus/es')['ElCascader']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
diff --git a/src/component/Canvas/CanvasEditor/index.vue b/src/component/Canvas/CanvasEditor/index.vue
index 503e83dd..8893b257 100644
--- a/src/component/Canvas/CanvasEditor/index.vue
+++ b/src/component/Canvas/CanvasEditor/index.vue
@@ -21,6 +21,9 @@ import { RedGreenModeManager } from "./managers/RedGreenModeManager";
import texturePresetManager from "./managers/brushes/TexturePresetManager";
import { BrushStore } from "./store/BrushStore";
import cuowuImg from '@/assets/images/homePage/cuowu.svg'
+import { Https } from "@/tool/https";
+import SelectImages from '@/component/common/SelectImages.vue'
+import { UrlToFile } from '@/tool/util'
// import { MinimapManager } from "./managers/minimap/MinimapManager";
@@ -102,6 +105,10 @@ const props = defineProps({
type: Boolean,
default: false, // 是否显示固定图层
},
+ isGeneral: { // 从generalMiniCanvas来的
+ type: Boolean,
+ default:false
+ }
});
// 引用和状态
@@ -706,9 +713,19 @@ function handleImageUpload(event) {
});
}
+const selectImages = ref(null);
+const handleImageSelect = (data) => {
+ UrlToFile(data.url,data.name).then((file)=>{
+ handleImageUpload({ target: { files: [file] } })
+ })
+}
function triggerLibrary() {
console.log('打开收藏')
- emit("trigger-library");
+ if (props.isGeneral) {
+ selectImages.value.init()
+ } else {
+ emit("trigger-library");
+ }
}
function handleAddText() {
@@ -1171,6 +1188,14 @@ defineExpose({
style="display: none"
@change="handleImageUpload"
/>
+