1***@qq.com
1***@qq.com
  • 发布:2023-03-02 16:00
  • 更新:2023-03-02 16:48
  • 阅读:442

hbuilderx使用vue3+ts中html v-for出现红色波浪号

分类:HBuilderX
<template>  
  <view class="order_detail">  
      <view class="order_top">  
        <view class="my_address">  
            {{ address }} <text class="iconfont icon-zuji"></text>  
        </view>  
        <view class="draw_mode">  
            <!-- <text class="">自提</text><text>外送</text> -->  
                <text v-for="(item, index) in drawDome" :key="item.id" :class="index === drawIndex ? 'active' : ''">{{ item.label }}</text>  
        </view>  
      </view>  

  </view>  
</template>  

<script lang="ts" setup>  
import { ref, reactive, Ref, onMounted, defineEmits, defineExpose, defineProps, PropType } from "vue";  
import { onLoad } from "@dcloudio/uni-app";  

interface draw {  
    label?: string;  
    id?: number;  
}  
const drawDome = ref<draw[]>([{label: "自提", id: 1}, {label: "外送", id: 2}]);  
const drawIndex = ref(0);  
const address = ref("");  
</script>  

<style lang="scss" scoped>  

</style>
2023-03-02 16:00 负责人:无 分享
已邀请:
DCloud_HB_WDL

DCloud_HB_WDL

使用您提供的示例代码,无法复现。

提供下HBuilderX版本,或发下QQ,我们加您了解下详细情况。

  • 1***@qq.com (作者)

    3.7.3版本

    1071414661

    2023-03-02 17:32

要回复问题请先登录注册