页面代码:
<template>
<Layout :titleText="'门头照'" :isOtherPadding="true" :titleStyle="['#1b1b1b','32rpx','500']" :rightType="''">
<text>66666666666666666666666666</text>
</Layout>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue';
import Layout from '@/components/jLayout/Layput.vue';
</script>
组件代码:
<view class="layout" @click="layHandle">
<image :src="props.url" mode="" v-if="isIcon" class="icon" :style="{width: props.size[0] + 'rpx', height: props.size[1] + 'rpx'}" />
<view class="main" :class="{bordernone: props.borderNone, otherPadding: props.isOtherPadding}">
<text class="title" v-if="isTitle" :style{color:props.titleStyle[0],fontSize:props.titleStyle[1],fontWeight:props.titleStyle[2]}">
{{ props.titleText }}</text>
<slot class="content"></slot>
<image src="@/static/indexImg/arrow-right.svg" v-if="props.rightType === 'arrow'" />
<image src="@/static/indexImg/del.svg" v-else-if="props.rightType === 'del'" style="height: 33rpx;width: 33rpx;" @tap="clear" />
<view class="add-des" v-if="props.rightType === 'num'">
<image src="../../static/homeImg/jianhao.svg" style="height: 30rpx;width: 32rpx;margin-right: 30rpx;" @tap="dec"</image
<text class="border"></text>
<image src="../../static/homeImg/jiahao.svg" style="height: 32rpx;width: 32rpx;" @tap="add"></image>
</view>
</view>
</view>
anything_ (作者)
已经试过了,包括加上v-slot:default都编译不出来,之前用的3.8.4版本hbuilderx,那时候试过更新一次,后面直接把小程序的代码编译错乱,就退回版本一直没更新过了,之前还可以编译出来,昨天编译不出来就更新了试试,还是不行
2023-07-26 09:14