Skip to content

Commit

Permalink
fix: taro 端组件根元素统一为 view 标签 (#2467)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Aug 1, 2023
1 parent 3b61a94 commit c692ef9
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/packages/__VUE/addresslist/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="classes">
<view :class="classes">
<general-shell
v-for="(item, index) of dataArray"
:key="index"
Expand Down Expand Up @@ -33,7 +33,7 @@
<div class="nut-address-list__bottom" v-if="showBottomButton" @click="addAddress">
<nut-button block type="danger">{{ translate('addAddress') }}</nut-button>
</div>
</div>
</view>
</template>
<script lang="ts">
import { reactive, onMounted, ref, watch, computed } from 'vue';
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/card/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="nut-card">
<view class="nut-card">
<div class="nut-card__left">
<img :src="imgUrl" alt="" />
</div>
Expand All @@ -25,7 +25,7 @@
<slot name="footer"></slot>
</div>
</div>
</div>
</view>
</template>

<script lang="ts">
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/category/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="nut-category">
<view class="nut-category">
<div class="nut-category__cateList">
<div v-if="type == 'classify' || type == 'text'">
<div class="nut-category__cateListLeft" v-for="(item, index) in category" :key="index">
Expand All @@ -14,7 +14,7 @@

<slot></slot>
</div>
</div>
</view>
</template>
<script lang="ts">
import { PropType, ref } from 'vue';
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/categorypane/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="nut-category-pane">
<view class="nut-category-pane">
<div v-if="type == 'classify'" class="nut-category-pane__cateListRight">
<div v-for="(item, index) in categoryChild" :key="index">
<div class="nut-category-pane__childTitle">{{ item?.catName }}</div>
Expand Down Expand Up @@ -43,7 +43,7 @@
{{ sku?.catName }}
</div>
</div>
</div>
</view>
</template>
<script lang="ts">
import { PropType } from 'vue';
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/circleprogress/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="nut-circle-progress" :style="{ height: Number(radius) * 2 + 'px', width: Number(radius) * 2 + 'px' }">
<view class="nut-circle-progress" :style="{ height: Number(radius) * 2 + 'px', width: Number(radius) * 2 + 'px' }">
<div :style="style"></div>
<div class="nut-circle-progress__text">
<slot>
<span>{{ progress }}%</span>
</slot>
</div>
</div>
</view>
</template>

<script lang="ts">
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/progress/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="nut-progress">
<view class="nut-progress">
<div
class="nut-progress-outer"
:class="[showText && !textInside ? 'nut-progress-outer-part' : '', size ? 'nut-progress-' + size : '']"
Expand Down Expand Up @@ -41,7 +41,7 @@
</slot>
</template>
</div>
</div>
</view>
</template>

<script lang="ts">
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/signature/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="classes">
<view :class="classes">
<div :class="['nut-signature-inner', 'spcanvas_WEAPP']">
<canvas
ref="spcanvas"
Expand All @@ -16,7 +16,7 @@
</div>
<nut-button class="nut-signature-btn" type="default" @click="clear()">{{ translate('reSign') }}</nut-button>
<nut-button class="nut-signature-btn" type="primary" @click="confirm()">{{ translate('confirm') }}</nut-button>
</div>
</view>
</template>
<script lang="ts">
import Taro from '@tarojs/taro';
Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/sticky/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="nut-sticky" ref="rootRef" :style="rootStyle" :id="'rootRef-' + refRandomId">
<div class="nut-sticky__box" :style="stickyStyle">
<view class="nut-sticky" ref="rootRef" :style="rootStyle" :id="'rootRef-' + refRandomId">
<view class="nut-sticky__box" :style="stickyStyle">
<slot></slot>
</div>
</div>
</view>
</view>
</template>
<script lang="ts">
import { computed, ref, watch, CSSProperties, onMounted, reactive } from 'vue';
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/swipegroup/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="nut-swipe-group" ref="swipeGroupRef">
<view class="nut-swipe-group" ref="swipeGroupRef">
<slot></slot>
</div>
</view>
</template>
<script lang="ts">
import { provide, ref } from 'vue';
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/tabbar/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div :class="{ 'nut-tabbar__placeholder': bottom && placeholder }" :style="{ height: height + 'px' }">
<view :class="{ 'nut-tabbar__placeholder': bottom && placeholder }" :style="{ height: height + 'px' }">
<view
ref="nutTabbar"
class="nut-tabbar"
:class="{ 'nut-tabbar-bottom': bottom, 'nut-tabbar-safebottom': safeAreaInsetBottom }"
>
<slot></slot>
</view>
</div>
</view>
</template>

<script lang="ts">
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/tabbaritem/index.taro.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div
<view
class="nut-tabbar-item"
:class="{ 'nut-tabbar-item__icon--unactive': !active }"
:style="{
Expand Down Expand Up @@ -28,7 +28,7 @@
</view>
</view>
</nut-badge>
</div>
</view>
</template>
<script lang="ts">
import { createComponent, renderIcon } from '@/packages/utils/create';
Expand Down

0 comments on commit c692ef9

Please sign in to comment.