Skip to content

Commit

Permalink
Revert "feat: cell add desc slot(jdf2e#2503)"
Browse files Browse the repository at this point in the history
This reverts commit 9c1205f.
  • Loading branch information
yi-boide committed Sep 11, 2023
1 parent 9c1205f commit 9fa8ee2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 72 deletions.
7 changes: 0 additions & 7 deletions packages/nutui-taro-demo/src/basic/pages/cell/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@
</template>
</nut-cell>

<h2>直接使用插槽(slot desc)</h2>
<nut-cell title="我是标题">
<template #desc>
<span>描述文字 <b style="color: red">2</b></span>
</template>
</nut-cell>

<!-- <nut-cell-group title="链接 | 分组用法">
<nut-cell title="链接" is-link></nut-cell>
<nut-cell
Expand Down
8 changes: 0 additions & 8 deletions src/packages/__VUE/cell/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
</template>
</nut-cell>

<h2>{{ translate('title10') }}</h2>
<nut-cell :title="translate('title')">
<template #desc>
<span>{{ translate('desc') }} <b style="color: red">2</b></span>
</template>
</nut-cell>

<nut-cell-group :title="translate('title5')" :desc="translate('desc1')">
<nut-cell :title="translate('link')" is-link></nut-cell>
<nut-cell :title="translate('urlJump')" desc="https://m.jd.com" is-link url="https://m.jd.com"></nut-cell>
Expand Down Expand Up @@ -99,7 +92,6 @@ const initTranslate = () =>
title7: '垂直居中',
title8: '直接使用插槽(slot title)',
title9: '尺寸设置 large',
title10: '直接使用插槽(slot desc)',
link: '链接',
urlJump: 'URL 跳转',
routerJump: '路由跳转 ’/‘ ',
Expand Down
16 changes: 0 additions & 16 deletions src/packages/__VUE/cell/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,6 @@ const click = () => {

:::

### Use Slots desc

:::demo

```vue
<template>
<nut-cell title="Title">
<template #desc>
<span>Desc <b style="color: red">2</b></span>
</template>
</nut-cell>
</template>
```

:::

### Link | CellGroup Usage

:::demo
Expand Down
16 changes: 0 additions & 16 deletions src/packages/__VUE/cell/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,6 @@ const click = () => {

:::

### 直接使用插槽(slot desc)

:::demo

```vue
<template>
<nut-cell title="我是标题">
<template #desc>
<span>描述文字 <b style="color: red">2</b></span>
</template>
</nut-cell>
</template>
```

:::

### 链接 | 分组用法

:::demo
Expand Down
22 changes: 3 additions & 19 deletions src/packages/__VUE/cell/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,9 @@ const click = () => {

```vue
<template>
<nut-cell title="描述文字">
<template #desc>
<span>描述文字 <b style="color: red">1</b></span>
</template>
</nut-cell>
</template>
```

:::

### 直接使用插槽(slot desc)

:::demo

```vue
<template>
<nut-cell title="我是标题">
<template #desc>
<span>描述文字 <b style="color: red">2</b></span>
<nut-cell desc="描述文字">
<template #title>
<span>Title <b style="color: red">1</b></span>
</template>
</nut-cell>
</template>
Expand Down
8 changes: 2 additions & 6 deletions src/packages/__VUE/cell/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@
</slot>
</template>
</view>
<view v-if="desc || $slots.desc" class="nut-cell__value"
<view v-if="desc" class="nut-cell__value"
:class="{ 'nut-cell__value--alone': (!title && !subTitle && !$slots.title) }"
:style="{ 'text-align': descTextAlign }">
<slot name="desc">
{{ desc }}
</slot>
</view>
:style="{ 'text-align': descTextAlign }">{{ desc }}</view>
<slot name="link">
<Right v-if="isLink || to" class="nut-cell__link"></Right>
</slot>
Expand Down

0 comments on commit 9fa8ee2

Please sign in to comment.