-
Notifications
You must be signed in to change notification settings - Fork 834
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
136 additions
and
249 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/nutui-taro-demo/src/feedback/pages/backtop/basic.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<template> | ||
<view class="backtop-demo"> | ||
<nut-backtop height="calc(100vh - 100px)" @click="click"> | ||
<template #content> | ||
<view v-for="index in 24" :key="index" class="item">{{ index }}</view> | ||
</template> | ||
</nut-backtop> | ||
</view> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const click = () => { | ||
console.log('click'); | ||
}; | ||
</script> | ||
|
||
<style> | ||
.backtop-demo .item { | ||
height: 46px; | ||
background: #efefef; | ||
line-height: 46px; | ||
padding: 0px 20px; | ||
margin-bottom: 20px; | ||
} | ||
</style> |
59 changes: 5 additions & 54 deletions
59
packages/nutui-taro-demo/src/feedback/pages/backtop/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,10 @@ | ||
<template> | ||
<Demo> | ||
<nut-backtop @click="click"> | ||
<template #content> | ||
<div class="text-data">我是测试数据1</div> | ||
<div class="text-data">我是测试数据2</div> | ||
<div class="text-data">我是测试数据3</div> | ||
<div class="text-data">我是测试数据4</div> | ||
<div class="text-data">我是测试数据5</div> | ||
<div class="text-data">我是测试数据6</div> | ||
<div class="text-data">我是测试数据7</div> | ||
<div class="text-data">我是测试数据8</div> | ||
<div class="text-data">我是测试数据9</div> | ||
<div class="text-data">我是测试数据10</div> | ||
<div class="text-data">我是测试数据11</div> | ||
<div class="text-data">我是测试数据12</div> | ||
<div class="text-data">我是测试数据13</div> | ||
<div class="text-data">我是测试数据14</div> | ||
<div class="text-data">我是测试数据15</div> | ||
<div class="text-data">我是测试数据16</div> | ||
<div class="text-data">我是测试数据17</div> | ||
<div class="text-data">我是测试数据18</div> | ||
<div class="text-data">我是测试数据19</div> | ||
<div class="text-data">我是测试数据20</div> | ||
<div class="text-data">我是测试数据21</div> | ||
<div class="text-data">我是测试数据22</div> | ||
<div class="text-data">我是测试数据23</div> | ||
<div class="text-data">我是测试数据24</div> | ||
</template> | ||
</nut-backtop> | ||
<Demo class="bg-w"> | ||
<view style="height: 20px"></view> | ||
<Basic /> | ||
</Demo> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const click = () => { | ||
console.log('click'); | ||
}; | ||
<script lang="ts" setup> | ||
import Basic from './basic.vue'; | ||
</script> | ||
|
||
<style lang="scss"> | ||
.demo { | ||
.text-data { | ||
margin: 0 auto; | ||
margin-top: 15px; | ||
margin-bottom: 20px; | ||
padding-left: 16px; | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
height: 46px; | ||
background: rgba(255, 255, 255, 1); | ||
border-radius: 7px; | ||
box-shadow: 0px 1px 7px 0px rgba(237, 238, 241, 1); | ||
line-height: 19px; | ||
font-size: 13px; | ||
color: rgba(102, 102, 102, 1); | ||
} | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<div id="elId1" class="backtop-demo" style="height: 100%; overflow: auto"> | ||
<div v-for="index in 24" :key="index" class="item">{{ index }}</div> | ||
<nut-backtop el-id="elId1" @click="handleClick"></nut-backtop> | ||
</div> | ||
</template> | ||
<script setup> | ||
const handleClick = () => { | ||
console.log('back to top'); | ||
}; | ||
</script> | ||
|
||
<style> | ||
.backtop-demo .item { | ||
height: 46px; | ||
background: #efefef; | ||
line-height: 46px; | ||
padding: 0px 20px; | ||
margin-bottom: 20px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div id="elId3" class="backtop-demo" style="height: 100%; overflow: auto"> | ||
<div v-for="index in 24" :key="index" class="item">{{ index }}</div> | ||
<nut-backtop el-id="elId3" :distance="200" :bottom="90"><div>Top</div></nut-backtop> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
.backtop-demo .item { | ||
height: 46px; | ||
background: #efefef; | ||
line-height: 46px; | ||
padding: 0px 20px; | ||
margin-bottom: 20px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div id="elId2" class="backtop-demo" style="height: 100%; overflow: auto"> | ||
<div v-for="index in 24" :key="index" class="item">{{ index }}</div> | ||
<nut-backtop el-id="elId2" :distance="100" :bottom="90"></nut-backtop> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
.backtop-demo .item { | ||
height: 46px; | ||
background: #efefef; | ||
line-height: 46px; | ||
padding: 0px 20px; | ||
margin-bottom: 20px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<template> | ||
<Demo class="full custom-demo"> | ||
<nut-tabs v-model="value" :animated-time="0"> | ||
<nut-tab-pane :title="t('basic')" pane-key="1"> | ||
<Basic /> | ||
</nut-tab-pane> | ||
<nut-tab-pane :title="t('distance')" pane-key="2"> | ||
<Distance /> | ||
</nut-tab-pane> | ||
<nut-tab-pane :title="t('custom')" pane-key="3"> | ||
<Custom /> | ||
</nut-tab-pane> | ||
</nut-tabs> | ||
</Demo> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ref } from 'vue'; | ||
import { useTranslate } from '@/sites/utils'; | ||
import Basic from './basic.vue'; | ||
import Distance from './distance.vue'; | ||
import Custom from './custom.vue'; | ||
const value = ref('1'); | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
distance: '设置出现位置', | ||
custom: '自定义样式' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
distance: 'Distance', | ||
custom: 'Custom Style' | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.custom-demo { | ||
:deep(.nut-tabs) { | ||
.nut-tabs__content { | ||
height: calc(100vh - 57px - 46px); | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.