uniapp【修复】: 调整navbar属性可为空,解决App真机调试出现很多必须属性警告

uniapp【修复】: 调整navbar属性可为空,解决App真机调试出现很多必须属性警告
This commit is contained in:
21世纪小八路
2024-11-03 14:10:30 +08:00
committed by 15093570141
parent d0c5769902
commit 76f07714af
54 changed files with 163 additions and 166 deletions

View File

@@ -16,8 +16,8 @@
import { handleAdvertiseDetail } from '@/core/utils'; import { handleAdvertiseDetail } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
code : string, code ?: string,
height : string height ?: string
}>(), { }>(), {
code: '', code: '',
height: '200rpx' height: '200rpx'

View File

@@ -18,7 +18,7 @@
import { handleStaticResources } from '@/core/utils'; import { handleStaticResources } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -10,11 +10,11 @@
const emits = defineEmits(['onClick']); const emits = defineEmits(['onClick']);
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
title : string; title ?: string;
radius ?: number; radius ?: number;
backgroundColor ?: string; backgroundColor ?: string;
color ?: string; color ?: string;
loading : boolean; loading ?: boolean;
customStyle ?: { [key : string] : any } customStyle ?: { [key : string] : any }
}>(), { }>(), {
title: '保存', title: '保存',

View File

@@ -2,15 +2,15 @@
<uv-empty :mode="props.mode" :text="props.text" :textColor="props.textColor" :icon="computedSrc"></uv-empty> <uv-empty :mode="props.mode" :text="props.text" :textColor="props.textColor" :icon="computedSrc"></uv-empty>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { computed } from 'vue';
import { EmptyEnum } from '@/core/enum'; import { EmptyEnum } from '@/core/enum';
import { cdnFilesUrl } from '@/core/consts'; import { cdnFilesUrl } from '@/core/consts';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
mode : EmptyEnum; mode ?: EmptyEnum;
text : string; text ?: string;
textColor : string; textColor ?: string;
}>(), { }>(), {
mode: EmptyEnum.data, mode: EmptyEnum.data,
text: '数据为空', text: '数据为空',

View File

@@ -1,5 +1,5 @@
<template> <template>
<view :class="props.type == 'horizontal' ? 'horizontal-good-card-box' : 'vertical-good-card-box'"> <view :class="props.type == 'horizontal' ? 'horizontal-good-card-box' : 'vertical-good-card-box'" >
<view class="img-box" :style="{ 'width': props.imgWidth, 'height': props.imgHeight }" @click="hanldeClickGoods"> <view class="img-box" :style="{ 'width': props.imgWidth, 'height': props.imgHeight }" @click="hanldeClickGoods">
<image class="good-img" :src="props.goodsData.image"></image> <image class="good-img" :src="props.goodsData.image"></image>
<view class="recommend" v-if="props.goodsData.isRecommend">推荐</view> <view class="recommend" v-if="props.goodsData.isRecommend">推荐</view>
@@ -38,12 +38,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
type : 'vertical' | 'horizontal', type ?: 'vertical' | 'horizontal',
imgWidth : string, imgWidth ?: string,
imgHeight : string, imgHeight ?: string,
nameOverflow : number, nameOverflow ?: number,
briefOverflow : number, briefOverflow ?: number,
goodsData : any, goodsData ?: any,
}>(), { }>(), {
type: 'horizontal', // vertical 垂直 horizontal 水平 type: 'horizontal', // vertical 垂直 horizontal 水平
imgWidth: '190rpx', imgWidth: '190rpx',

View File

@@ -69,8 +69,8 @@
const userInfoStore = useUserInfoStore(); const userInfoStore = useUserInfoStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
show : boolean, show ?: boolean,
goodsDetailData : any, goodsDetailData ?: any,
}>(), { }>(), {
show: false, show: false,
goodsDetailData: {}, goodsDetailData: {},

View File

@@ -26,13 +26,13 @@
const { menuButtonHeight } = useSystemInfo(); const { menuButtonHeight } = useSystemInfo();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
isBack : boolean, isBack ?: boolean,
bgColor : string, bgColor ?: string,
titleColor : string, titleColor ?: string,
mode : string, mode ?: string,
title : string, title ?: string,
handleCustomRouteJump : () => void | null, handleCustomRouteJump ?: () => void | null,
placeholder : boolean; placeholder ?: boolean;
}>(), { }>(), {
isBack: true, isBack: true,
bgColor: '#eef2f6', bgColor: '#eef2f6',

View File

@@ -19,17 +19,17 @@
const _useLoginStore = useLoginStore(); const _useLoginStore = useLoginStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
isBack : boolean, isBack ?: boolean,
bgColor : string, bgColor ?: string,
titleColor : string, titleColor ?: string,
mode : string, mode ?: "left" | "center",
title : string, title ?: string,
isShowStatusBarHeight : boolean; isShowStatusBarHeight ?: boolean;
customStyle : any; customStyle ?: any;
contentStyle : any; contentStyle ?: any;
handleCustomRouteJump : () => void | null, handleCustomRouteJump ?: () => void | null,
showLoginModalDom : boolean; showLoginModalDom ?: boolean;
placeholder : boolean; placeholder ?: boolean;
}>(), { }>(), {
isBack: true, isBack: true,
bgColor: '#eef2f6', bgColor: '#eef2f6',

View File

@@ -20,26 +20,26 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
isBack : boolean, isBack ?: boolean,
bgColor : string, bgColor ?: string,
titleColor : string, titleColor ?: string,
mode : string, mode ?: "left" | "center",
title : string; title ?: string;
isShowStatusBarHeight : boolean; isShowStatusBarHeight ?: boolean;
customStyle : any; customStyle ?: any;
contentStyle : any; contentStyle ?: any;
handleCustomRouteJump : () => void | null, handleCustomRouteJump ?: () => void | null,
showLoginModalDom : boolean; showLoginModalDom ?: boolean;
needSkeleton : boolean; needSkeleton ?: boolean;
skeleton ?: Array<{ [key : string] : any }>; skeleton ?: Array<{ [key : string] : any }>;
skeletonLoading : boolean; skeletonLoading ?: boolean;
placeholder : boolean; placeholder ?: boolean;
loadingPage : boolean; loadingPage ?: boolean;
needLoadingPage : boolean; needLoadingPage ?: boolean;
loadingText : string; loadingText ?: string;
loadingTextFontSize : string; loadingTextFontSize ?: string;
loadingBgColor : string; loadingBgColor ?: string;
loadingColor : string; loadingColor ?: string;
}>(), { }>(), {
isBack: true, isBack: true,
bgColor: '#eef2f6', bgColor: '#eef2f6',
@@ -67,4 +67,4 @@
.coreshop-skeleton { .coreshop-skeleton {
background-color: #fff; background-color: #fff;
} }
</style> </style>

View File

@@ -8,9 +8,9 @@
import { queryAreas } from '@/core/api'; import { queryAreas } from '@/core/api';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
show : boolean, show ?: boolean,
cityList : Array<CityAddressType>, cityList ?: Array<CityAddressType>,
pickerValue : string, pickerValue ?: string,
}>(), { }>(), {
show: false, show: false,
cityList: () => [], cityList: () => [],

View File

@@ -28,9 +28,9 @@
const sharePpopup = ref(); const sharePpopup = ref();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
goodsDetailData : any, goodsDetailData ?: any,
show : boolean, show ?: boolean,
shareType : number, shareType ?: number,
}>(), { }>(), {
goodsDetailData: {}, goodsDetailData: {},
show: false, show: false,

View File

@@ -17,9 +17,9 @@
const instance = getCurrentInstance(); const instance = getCurrentInstance();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
current : number, current ?: number,
keyNname : string, keyNname ?: string,
list : Array<any>, list ?: Array<any>,
}>(), { }>(), {
current: 0, current: 0,
keyNname: 'name', keyNname: 'name',

View File

@@ -8,8 +8,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
title : string, title ?: string,
color : string, color ?: string,
}>(), { }>(), {
title: '查看更多', title: '查看更多',
color: '#6E737D' color: '#6E737D'

View File

@@ -139,9 +139,9 @@
const _useLoginStore = useLoginStore(); const _useLoginStore = useLoginStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : Array<CategoriesType>, data ?: Array<CategoriesType>,
height : number, height ?: number,
statusBarHeight : number, statusBarHeight ?: number,
}>(), { }>(), {
data: () => [], data: () => [],
height: 0, height: 0,
@@ -225,16 +225,16 @@
}) })
nextTick(async () => { nextTick(async () => {
state.bigClassifyH = ((await getDomInfo('.big-classify', instance.proxy)) as { height : number }).height; state.bigClassifyH = ((await getDomInfo('.big-classify', instance.proxy)) as { height : number }).height;
setTimeout(async () => { setTimeout(async () => {
state.rightTabH = ((await getDomInfo('.right-tab-box', instance.proxy)) as { height : number }).height; state.rightTabH = ((await getDomInfo('.right-tab-box', instance.proxy)) as { height : number }).height;
}, 100) }, 100)
}) })
}) })
// 获取商品列表数据 // 获取商品列表数据
const getGoodsPageList = async () => { const getGoodsPageList = async () => {
const goodsPageList : Response<GoodsListType> = await queryGoodsPageList({ const goodsPageList : Response<GoodsListType> = await queryGoodsPageList({
page: state.page, page: state.page,
limit: 10, limit: 10,

View File

@@ -89,8 +89,8 @@
const _useLoginStore = useLoginStore(); const _useLoginStore = useLoginStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : Array<CategoriesType>, data ?: Array<CategoriesType>,
height : number, height ?: number,
}>(), { }>(), {
data: () => [], data: () => [],
height: 0, height: 0,
@@ -158,7 +158,7 @@
/** 获取商品列表数据 */ /** 获取商品列表数据 */
const getGoodsPageList = async () => { const getGoodsPageList = async () => {
const goodsPageList : Response<GoodsListType> = await queryGoodsPageList({ const goodsPageList : Response<GoodsListType> = await queryGoodsPageList({
page: state.page, page: state.page,
limit: 10, limit: 10,

View File

@@ -12,7 +12,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : Array<CategoriesType>, data ?: Array<CategoriesType>,
}>(), { }>(), {
data: () => [], data: () => [],
}); });

View File

@@ -35,8 +35,8 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : Array<CategoriesType>, data ?: Array<CategoriesType>,
height : number, height ?: number,
}>(), { }>(), {
data: () => [], data: () => [],
height: 0, height: 0,

View File

@@ -12,7 +12,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : Array<CategoriesType>, data ?: Array<CategoriesType>,
}>(), { }>(), {
data: () => [], data: () => [],
}); });

View File

@@ -16,7 +16,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {} data: {}
}); });

View File

@@ -16,7 +16,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {} data: {}
}); });

View File

@@ -5,7 +5,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {} data: {}
}); });

View File

@@ -5,7 +5,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : string, data ?: string,
}>(), { }>(), {
data: '' data: ''
}); });

View File

@@ -39,7 +39,7 @@
const _useLoginStore = useLoginStore(); const _useLoginStore = useLoginStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {} data: {}
}); });

View File

@@ -51,7 +51,7 @@
import { handleRouteNavigateTo, splitArrayByStep } from '@/core/utils'; import { handleRouteNavigateTo, splitArrayByStep } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -81,7 +81,7 @@
import { handleRouteNavigateTo, toDimensionArray, splitArrayByStep } from '@/core/utils'; import { handleRouteNavigateTo, toDimensionArray, splitArrayByStep } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {} data: {}
}); });

View File

@@ -26,9 +26,9 @@
const shopConfigStore = useShopConfigStore(); const shopConfigStore = useShopConfigStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
flex : boolean, flex ?: boolean,
fontSize : string, fontSize ?: string,
}>(), { }>(), {
data: {}, data: {},
flex: false, flex: false,

View File

@@ -51,7 +51,7 @@
import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils'; import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -47,7 +47,7 @@
import { handleStaticResources, handleAdvertiseDetail } from '@/core/utils'; import { handleStaticResources, handleAdvertiseDetail } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -13,7 +13,7 @@
import type { PageConfigItemsImgSlideType } from '@/core/models'; import type { PageConfigItemsImgSlideType } from '@/core/models';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -12,7 +12,7 @@
import { handleAdvertiseDetail } from '@/core/utils'; import { handleAdvertiseDetail } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -11,7 +11,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -33,7 +33,7 @@
import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils'; import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -17,7 +17,7 @@
import { onHomePageShow } from '@/core/consts'; import { onHomePageShow } from '@/core/consts';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -11,7 +11,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -49,7 +49,7 @@
import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils'; import { handleStaticResources, handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -14,11 +14,7 @@
} }
.card-box { .card-box {
margin-top: 35rpx; margin-top: 35rpx;
.goods-card {
width: 100%;
}
.price-tag-box { .price-tag-box {
display: flex; display: flex;

View File

@@ -6,7 +6,7 @@
</view> </view>
<view class="card-box" v-for="item, index in props.data.list" :key="index"> <view class="card-box" v-for="item, index in props.data.list" :key="index">
<coreshop-goods-card class="goods-card" :goodsData="hanldeCombinationGoodsData(item)" <coreshop-goods-card :goodsData="hanldeCombinationGoodsData(item)"
@hanldeClickGoods="hanldeClickGoods"> @hanldeClickGoods="hanldeClickGoods">
<template #goodTag> <template #goodTag>
<view class="price-tag-box" @click="hanldeClickGoods(item)"> <view class="price-tag-box" @click="hanldeClickGoods(item)">
@@ -43,7 +43,7 @@
import { handleRouteNavigateTo } from '@/core/utils'; import { handleRouteNavigateTo } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -12,13 +12,13 @@
import { handleAdvertiseDetail } from '@/core/utils'; import { handleAdvertiseDetail } from '@/core/utils';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
dotsSelect : boolean, dotsSelect ?: boolean,
autoplaySelect : boolean, autoplaySelect ?: boolean,
intervalSelect : number, intervalSelect ?: number,
circularSelect : boolean, circularSelect ?: boolean,
indicatorColor : string, indicatorColor ?: string,
indicatorColorActive : string, indicatorColorActive ?: string,
}>(), { }>(), {
data: {}, data: {},
dotsSelect: true, dotsSelect: true,

View File

@@ -6,7 +6,7 @@
<script setup lang="ts"> <script setup lang="ts">
import HomeContent from '../home-content/home-content.vue'; import HomeContent from '../home-content/home-content.vue';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : string, data ?: string,
}>(), { }>(), {
data: '', data: '',
}); });

View File

@@ -7,7 +7,7 @@
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
data : any, data ?: any,
}>(), { }>(), {
data: {}, data: {},
}); });

View File

@@ -75,7 +75,7 @@
// import HomeAdpop from './components/home-adpop/home-adpop.vue'; // import HomeAdpop from './components/home-adpop/home-adpop.vue';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
coreshopData : Array<PageConfigItemsType>, coreshopData ?: Array<PageConfigItemsType>,
}>(), { }>(), {
coreshopData: () => [] coreshopData: () => []
}); });

View File

@@ -50,8 +50,8 @@
import type { GoodsAgentListType } from "@/core/models"; import type { GoodsAgentListType } from "@/core/models";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
userAgentGrade : any, userAgentGrade ?: any,
agentProductsList : Array<GoodsAgentListType>, agentProductsList ?: Array<GoodsAgentListType>,
}>(), { }>(), {
userAgentGrade: {}, userAgentGrade: {},
agentProductsList: () => [], agentProductsList: () => [],

View File

@@ -41,7 +41,7 @@
import { useCartStore } from '@/core/store'; import { useCartStore } from '@/core/store';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
price : number, price ?: number,
}>(), { }>(), {
price: 0, price: 0,
}); });

View File

@@ -16,7 +16,7 @@
import type { CommonQuestionServiceType } from "@/core/models"; import type { CommonQuestionServiceType } from "@/core/models";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
commonQuestion : Array<CommonQuestionServiceType>, commonQuestion ?: Array<CommonQuestionServiceType>,
}>(), { }>(), {
commonQuestion: () => [], commonQuestion: () => [],
}); });

View File

@@ -12,7 +12,7 @@
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
goodsDetailContent : string, goodsDetailContent ?: string,
}>(), { }>(), {
goodsDetailContent: '', goodsDetailContent: '',
}); });

View File

@@ -32,9 +32,9 @@
import { handleRouteNavigateTo } from "@/core/utils"; import { handleRouteNavigateTo } from "@/core/utils";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
commentsCount : number, commentsCount ?: number,
commentsList : Array<GoodsPictureListType>, commentsList ?: Array<GoodsPictureListType>,
id : number; id ?: number;
}>(), { }>(), {
commentsCount: 0, commentsCount: 0,
commentsList: () => [], commentsList: () => [],

View File

@@ -87,9 +87,9 @@
const _useLoginStore = useLoginStore(); const _useLoginStore = useLoginStore();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
goodsDetailData : any, goodsDetailData ?: any,
isActivityGoods : boolean, isActivityGoods ?: boolean,
shareType : ShareEnum, shareType ?: ShareEnum,
}>(), { }>(), {
goodsDetailData: {}, goodsDetailData: {},
isActivityGoods: false, isActivityGoods: false,

View File

@@ -17,7 +17,7 @@
import type { GoodsParamsType } from "@/core/models"; import type { GoodsParamsType } from "@/core/models";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
goodsParamsList : Array<GoodsParamsType>, goodsParamsList ?: Array<GoodsParamsType>,
}>(), { }>(), {
goodsParamsList: () => [], goodsParamsList: () => [],
}); });

View File

@@ -12,8 +12,8 @@
<script setup lang="ts"> <script setup lang="ts">
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
swiperBanner : Array<string>, swiperBanner ?: Array<string>,
video : string, video ?: string,
}>(), { }>(), {
swiperBanner: () => [], swiperBanner: () => [],
video: '', video: '',

View File

@@ -35,7 +35,7 @@
import Point from '@/pages/components/custom-page/components/home-goods/point.vue'; import Point from '@/pages/components/custom-page/components/home-goods/point.vue';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
queryParams : any, queryParams ?: any,
}>(), { }>(), {
queryParams: { queryParams: {
id: 10, id: 10,

View File

@@ -111,11 +111,11 @@
import type { GoodsPromotionType, CommonQuestionServiceType } from "@/core/models"; import type { GoodsPromotionType, CommonQuestionServiceType } from "@/core/models";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
isCustomService : boolean, isCustomService ?: boolean,
goodsPromotionList : Array<GoodsPromotionType>, goodsPromotionList ?: Array<GoodsPromotionType>,
delivery : Array<CommonQuestionServiceType>, delivery ?: Array<CommonQuestionServiceType>,
service : Array<CommonQuestionServiceType>, service ?: Array<CommonQuestionServiceType>,
spesDesc : string, spesDesc ?: string,
}>(), { }>(), {
isCustomService: false, isCustomService: false,
goodsPromotionList: () => [], goodsPromotionList: () => [],

View File

@@ -32,13 +32,14 @@
<view class="btn-box"> <view class="btn-box">
<!-- <view v-if="props.isShowAddCartBtn" class="btn add-cart" @click="handleAddCart">加入购物车</view> --> <!-- <view v-if="props.isShowAddCartBtn" class="btn add-cart" @click="handleAddCart">加入购物车</view> -->
<view v-if="props.isShowAddCartBtn" class="core-button-confirm add-cart"> <view v-if="props.isShowAddCartBtn" class="core-button-confirm add-cart">
<coreshop-button :loading="props.addCartloading" class="core-button-confirm_" :radius="0" title="加入购物车" <coreshop-button :loading="props.addCartloading" class="core-button-confirm_" :radius="0"
:customStyle="addCartCustomStyle" @onClick="handleAddCart()"></coreshop-button> title="加入购物车" :customStyle="addCartCustomStyle" @onClick="handleAddCart()"></coreshop-button>
</view> </view>
<!-- <view class="btn buy-now" @click="handleBuyNow">{{ props.btnBuyTitlt }}</view> --> <!-- <view class="btn buy-now" @click="handleBuyNow">{{ props.btnBuyTitlt }}</view> -->
<view class="core-button-confirm"> <view class="core-button-confirm">
<coreshop-button :loading="props.buyNowNowloading" class="core-button-confirm_" :radius="0" <coreshop-button :loading="props.buyNowNowloading" class="core-button-confirm_" :radius="0"
:title="props.btnBuyTitlt" :customStyle="buyNowCustomStyle" @onClick="handleBuyNow()"></coreshop-button> :title="props.btnBuyTitlt" :customStyle="buyNowCustomStyle"
@onClick="handleBuyNow()"></coreshop-button>
</view> </view>
</view> </view>
</view> </view>
@@ -69,14 +70,14 @@
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
showSku : boolean, showSku ?: boolean,
goodsDetailData : any, goodsDetailData ?: any,
isShowAddCartBtn : boolean, isShowAddCartBtn ?: boolean,
btnBuyTitlt : string, btnBuyTitlt ?: string,
safeAreaInsetBottom : boolean; safeAreaInsetBottom ?: boolean;
buyNowCustomStyle : { [key : string] : any }, buyNowCustomStyle ?: { [key : string] : any },
buyNowNowloading : boolean, buyNowNowloading ?: boolean,
addCartloading : boolean addCartloading ?: boolean
}>(), { }>(), {
showSku: false, showSku: false,
goodsDetailData: {}, goodsDetailData: {},

View File

@@ -8,7 +8,7 @@
<slot name="tip"></slot> <slot name="tip"></slot>
<!-- 商品信息 价格名字之类的 --> <!-- 商品信息 价格名字之类的 -->
<GoodsDetailInfo :goodsDetailData="props.goodsDetailData" :shareType="props.shareType" <GoodsDetailInfo :goodsDetailData="props.goodsDetailData" :shareType="props.shareType"
:isActivityGoods="props.isActivityGoods" @handleToggleGoodsCollection="handleToggleGoodsCollection"> :isActivityGoods="props.isActivityGoods" @handleToggleGoodsCollection="handleToggleGoodsCollection">
<template #countDown> <template #countDown>
<slot name="countDown"></slot> <slot name="countDown"></slot>
@@ -68,17 +68,17 @@
import type { Response, CommonQuestionServiceType, GoodsPictureType, GoodsPictureListType, GoodsParamsType, GoodsAgentListType, GoodsPromotionType } from "@/core/models"; import type { Response, CommonQuestionServiceType, GoodsPictureType, GoodsPictureListType, GoodsParamsType, GoodsAgentListType, GoodsPromotionType } from "@/core/models";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
isActivityGoods : boolean, isActivityGoods ?: boolean,
goodsId : number, goodsId ?: number,
goodsDetailData : any, goodsDetailData ?: any,
swiperBanner : Array<any>, swiperBanner ?: Array<any>,
goodsDetailContent : string, goodsDetailContent ?: string,
userAgentGrade : any, userAgentGrade ?: any,
agentProductsList : Array<GoodsAgentListType>, agentProductsList ?: Array<GoodsAgentListType>,
goodsPromotionList : Array<GoodsPromotionType>, goodsPromotionList ?: Array<GoodsPromotionType>,
spesDesc : string, spesDesc ?: string,
isCustomService : boolean, isCustomService ?: boolean,
shareType : ShareEnum, shareType ?: ShareEnum,
}>(), { }>(), {
isActivityGoods: false, /** 是否是活动商品 */ isActivityGoods: false, /** 是否是活动商品 */
goodsId: 0, /** 商品id */ goodsId: 0, /** 商品id */
@@ -169,7 +169,7 @@
/** 商品收藏 */ /** 商品收藏 */
const handleToggleGoodsCollection = () => { const handleToggleGoodsCollection = () => {
emits('handleToggleGoodsCollection') emits('handleToggleGoodsCollection')
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

View File

@@ -26,15 +26,15 @@
import { queryPay } from '@/core/api'; import { queryPay } from '@/core/api';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
payMethodList : Array<PayMethodListType>, payMethodList ?: Array<PayMethodListType>,
orderType : PaymentTypeEnum, orderType ?: PaymentTypeEnum,
orderId : number, orderId ?: string,
recharge : number, recharge ?: number,
userInfo : any, userInfo ?: any,
}>(), { }>(), {
payMethodList: () => [], payMethodList: () => [],
orderType: PaymentTypeEnum.common, orderType: PaymentTypeEnum.common,
orderId: 0, /** 如果是商品订单此参数必须 */ orderId: '', /** 如果是商品订单此参数必须 */
recharge: 0, /** 如果是充值订单此参数必须 */ recharge: 0, /** 如果是充值订单此参数必须 */
userInfo: {}, userInfo: {},
}); });