feat: library-服装-画布添加从library上传
This commit is contained in:
2
components.d.ts
vendored
2
components.d.ts
vendored
@@ -18,6 +18,7 @@ declare module 'vue' {
|
|||||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||||
|
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||||
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
||||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||||
@@ -27,6 +28,7 @@ declare module 'vue' {
|
|||||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||||
ATable: typeof import('ant-design-vue/es')['Table']
|
ATable: typeof import('ant-design-vue/es')['Table']
|
||||||
AUpload: typeof import('ant-design-vue/es')['Upload']
|
AUpload: typeof import('ant-design-vue/es')['Upload']
|
||||||
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ import { RedGreenModeManager } from "./managers/RedGreenModeManager";
|
|||||||
import texturePresetManager from "./managers/brushes/TexturePresetManager";
|
import texturePresetManager from "./managers/brushes/TexturePresetManager";
|
||||||
import { BrushStore } from "./store/BrushStore";
|
import { BrushStore } from "./store/BrushStore";
|
||||||
import cuowuImg from '@/assets/images/homePage/cuowu.svg'
|
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";
|
// import { MinimapManager } from "./managers/minimap/MinimapManager";
|
||||||
@@ -102,6 +105,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false, // 是否显示固定图层
|
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() {
|
function triggerLibrary() {
|
||||||
console.log('打开收藏')
|
console.log('打开收藏')
|
||||||
emit("trigger-library");
|
if (props.isGeneral) {
|
||||||
|
selectImages.value.init()
|
||||||
|
} else {
|
||||||
|
emit("trigger-library");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleAddText() {
|
function handleAddText() {
|
||||||
@@ -1171,6 +1188,14 @@ defineExpose({
|
|||||||
style="display: none"
|
style="display: none"
|
||||||
@change="handleImageUpload"
|
@change="handleImageUpload"
|
||||||
/>
|
/>
|
||||||
|
<SelectImages
|
||||||
|
ref="selectImages"
|
||||||
|
full-data
|
||||||
|
radio
|
||||||
|
@select="handleImageSelect"
|
||||||
|
:api="Https.httpUrls.queryLibraryPage"
|
||||||
|
isLibrary
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<editCanvas v-if="canvasLoad" :config="canvasConfig"
|
<editCanvas v-if="canvasLoad" :config="canvasConfig"
|
||||||
@canvasInit="canvasInit"
|
@canvasInit="canvasInit"
|
||||||
@changeCanvas="changeCanvas"
|
@changeCanvas="changeCanvas"
|
||||||
|
is-general
|
||||||
ref="editCanvas"></editCanvas>
|
ref="editCanvas"></editCanvas>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
|
|||||||
Reference in New Issue
Block a user