|
@ -2,7 +2,7 @@ |
|
|
import { getPhoto, savePhoto } from 'apis/home' |
|
|
import { getPhoto, savePhoto } from 'apis/home' |
|
|
import { getOreList } from 'apis/ore' |
|
|
import { getOreList } from 'apis/ore' |
|
|
import { FtMessage } from 'libs/message' |
|
|
import { FtMessage } from 'libs/message' |
|
|
import { ImageViewer as TImageViewer } from 'tdesign-mobile-vue' |
|
|
|
|
|
|
|
|
import { useHomeStore } from 'stores/homeStore' |
|
|
import { onMounted, ref } from 'vue' |
|
|
import { onMounted, ref } from 'vue' |
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
@ -73,14 +73,13 @@ const mousedownHandle = async (e: Event) => { |
|
|
|
|
|
|
|
|
const activeTube = ref(Array.from({ length: 16 }).fill(false)) |
|
|
const activeTube = ref(Array.from({ length: 16 }).fill(false)) |
|
|
|
|
|
|
|
|
const previewVisible = ref(false) |
|
|
|
|
|
const photos = ref<string[]>([]) |
|
|
|
|
|
const previewHandle = () => { |
|
|
const previewHandle = () => { |
|
|
|
|
|
const homeStore = useHomeStore() |
|
|
if (!form.value.url) { |
|
|
if (!form.value.url) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
photos.value = [form.value.url] |
|
|
|
|
|
previewVisible.value = true |
|
|
|
|
|
|
|
|
homeStore.photos = [form.value.url] |
|
|
|
|
|
homeStore.previewVisible = true |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
@ -118,7 +117,6 @@ const previewHandle = () => { |
|
|
</el-input> |
|
|
</el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<TImageViewer v-model:images="photos" v-model:visible="previewVisible" /> |
|
|
|
|
|
</FtDialog> |
|
|
</FtDialog> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|