Przeglądaj źródła

feat: 更新默认主题变量,添加输入框高度和图标大小属性;优化首页轮播图为自动播放;修改商品详情页数量变量名称以提高可读性

EvilDragon 5 miesięcy temu
rodzic
commit
9942303153

+ 2 - 0
packages/app/src/core/themes/default.ts

@@ -18,4 +18,6 @@ export const defaultThemeVars: ConfigProviderThemeVars = {
   tabsNavBg: 'red',
   inputNumberBorderColor: 'transparent',
   inputNumberBtnWidth: '44rpx',
+  inputNumberHeight: '44rpx',
+  inputNumberIconSize: '20rpx',
 }

+ 1 - 1
packages/app/src/pages/home/index.vue

@@ -129,7 +129,7 @@ onShareAppMessage(async ({ from, target }) => {
 <template>
   <view class="">
     <view class="bg-black w-full relative aspect-[1.26/1]">
-      <swiper @change="handleSwiperChange">
+      <swiper autoplay @change="handleSwiperChange">
         <template
           v-for="{ data: { id, coverVideoImage, indexPromotionalVideoImage } } of swiperData"
           :key="id"

+ 4 - 3
packages/app/src/pages/home/mall/detail/index.vue

@@ -27,7 +27,7 @@ const router = useRouter()
 const { userInfo } = storeToRefs(userStore)
 const id = ref()
 const show = ref(false)
-const a = ref(1)
+const nums = ref(1)
 const type = ref<'add2Cart' | 'orderNow'>()
 const { data, run: setData } = useRequest(() => getProduct(id.value))
 
@@ -41,7 +41,7 @@ const handleConfirm = async () => {
           {
             productId: id.value,
             points: data.value.points,
-            nums: 1,
+            nums: nums.value,
             productName: data.value.prodcutName,
             orderImgUrl: data.value.productCoverImgUrl,
             vendorId: data.value.vendorId,
@@ -62,7 +62,7 @@ const handleConfirm = async () => {
               userId: userInfo.value.userId,
               productId: data.value?.productId || '',
               points: data.value?.points,
-              nums: 1,
+              nums: nums.value,
             },
           ],
         }),
@@ -188,6 +188,7 @@ onLoad(async (query: { id: string }) => {
               </div>
               <div class="flex-1"></div>
               <!-- <wd-input-number v-model="a" /> -->
+              <wd-input-number v-model="nums" />
             </div>
           </div>
         </div>