feat:更新查看原图图片格式
This commit is contained in:
@@ -57,7 +57,7 @@ import { useAwardStore } from '@/store/award.ts'
|
|||||||
import { defineProps, PropType } from 'vue'
|
import { defineProps, PropType } from 'vue'
|
||||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ThumbImageQuery } from '@/utils'
|
import { RawImageQuery, ThumbImageQuery } from '@/utils'
|
||||||
import { showImagePreview } from 'vant'
|
import { showImagePreview } from 'vant'
|
||||||
import { IAward } from '@/types/award.ts'
|
import { IAward } from '@/types/award.ts'
|
||||||
|
|
||||||
@@ -72,7 +72,8 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const viewImageClick = () => {
|
const viewImageClick = () => {
|
||||||
showImagePreview({ images: props.item?.imageList, closeable: true })
|
const imageList = props.item.imageList.map((item) => `${item}${RawImageQuery}`)
|
||||||
|
showImagePreview({ images: imageList, closeable: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
const editClick = async () => {
|
const editClick = async () => {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ import { useRouter } from 'vue-router'
|
|||||||
import { formatDate } from 'vue3-common/utils/dateUtil'
|
import { formatDate } from 'vue3-common/utils/dateUtil'
|
||||||
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
import { commonElMessageBox } from 'vue3-common/utils/elUtil'
|
||||||
import { showImagePreview } from 'vant'
|
import { showImagePreview } from 'vant'
|
||||||
import { ThumbImageQuery } from '@/utils'
|
import { RawImageQuery, ThumbImageQuery } from '@/utils'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const foodStore = useFoodStore()
|
const foodStore = useFoodStore()
|
||||||
@@ -87,7 +87,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const viewImageClick = () => {
|
const viewImageClick = () => {
|
||||||
const imageList = props.foodItem?.recordList.map((item) => `${item.imageUrl}`)
|
const imageList = props.foodItem?.recordList.map((item) => `${item.imageUrl}${RawImageQuery}`)
|
||||||
showImagePreview({ images: imageList, closeable: true })
|
showImagePreview({ images: imageList, closeable: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ import { formatDate } from 'vue3-common/utils/dateUtil'
|
|||||||
import { useJournalStore } from '@/store/journal.ts'
|
import { useJournalStore } from '@/store/journal.ts'
|
||||||
import { useAppStore } from '@/store/app.ts'
|
import { useAppStore } from '@/store/app.ts'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { AListUrl, ThumbImageQuery } from '@/utils'
|
import { AListUrl, RawImageQuery, ThumbImageQuery } from '@/utils'
|
||||||
import { showImagePreview } from 'vant'
|
import { showImagePreview } from 'vant'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -107,7 +107,7 @@ const showToggle = computed(() => overflowLines.value > 0)
|
|||||||
const toggleExpand = () => expanded.value = !expanded.value
|
const toggleExpand = () => expanded.value = !expanded.value
|
||||||
|
|
||||||
const viewImageClick = () => {
|
const viewImageClick = () => {
|
||||||
showImagePreview({ images: [props.item?.imageUrl], closeable: true })
|
showImagePreview({ images: [props.item?.imageUrl + RawImageQuery], closeable: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
const editClick = async () => {
|
const editClick = async () => {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const AListPath = import.meta.env.VITE_API_ALIST_PATH
|
|||||||
|
|
||||||
export const ThumbImageQuery = '?q=70'
|
export const ThumbImageQuery = '?q=70'
|
||||||
|
|
||||||
export const RawImageQuery = '?w=2560&h=1440&q=90'
|
export const RawImageQuery = '?w=2560&h=1440&q=70'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取assets静态资源
|
* 获取assets静态资源
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ const appStore = useAppStore()
|
|||||||
|
|
||||||
const dailyInfo = reactive({
|
const dailyInfo = reactive({
|
||||||
calendarDate: '',
|
calendarDate: '',
|
||||||
menstruateDateList: [],
|
menstruateDateList: [] as string[],
|
||||||
sexDateList: [],
|
sexDateList: [] as string[],
|
||||||
attrs: [] as any[]
|
attrs: [] as any[]
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ const calculatePeriodDay = (date: string, cycleLength = 28, duration = 5) => {
|
|||||||
const fertileStart = ovulationDate.subtract(5, 'day') // 易孕期为排卵日前5天
|
const fertileStart = ovulationDate.subtract(5, 'day') // 易孕期为排卵日前5天
|
||||||
const fertileEnd = ovulationDate.add(4, 'day') // 易孕期为排卵日后4天
|
const fertileEnd = ovulationDate.add(4, 'day') // 易孕期为排卵日后4天
|
||||||
|
|
||||||
const allDates = getAllDatesInMonth(date)
|
const allDates = getAllDatesInMonth(date) as string[]
|
||||||
|
|
||||||
for (const dateStr of allDates) {
|
for (const dateStr of allDates) {
|
||||||
const currentDate = dayjs(dateStr)
|
const currentDate = dayjs(dateStr)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import path from 'path'
|
|||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
import { viteMockServe } from 'vite-plugin-mock'
|
import { viteMockServe } from 'vite-plugin-mock'
|
||||||
|
|
||||||
// const API_HOST = '14.103.235.151'
|
const API_HOST = '192.168.1.7'
|
||||||
const API_HOST = '127.0.0.1'
|
// const API_HOST = '127.0.0.1'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
Reference in New Issue
Block a user