Skip to content

Commit

Permalink
u--替换为up-
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Apr 9, 2024
1 parent 49eeec1 commit 72a0fab
Show file tree
Hide file tree
Showing 14 changed files with 1,978 additions and 1,978 deletions.
198 changes: 99 additions & 99 deletions src/pages/componentsA/image/image.nvue
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
<template>
<view class="u-page">
<view class="u-demo-block">
<text class="u-demo-block__title">基本案例</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<u--image
:showLoading="true"
:src="src"
width="80px"
height="80px"
@click="click"
></u--image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">自定义形状</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<u--image
shape="circle"
:src="src"
width="80px"
height="80px"
></u--image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">自定义圆角</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<u--image
radius="4"
:src="src"
width="80px"
height="80px"
></u--image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">图片模式(widthFit)</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<u--image
:src="src"
width="80px"
height="80px"
mode="widthFit"
></u--image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">自定义图片加载插槽</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<u--image
:src="src1"
width="80px"
height="80px"
mode="widthFit"
>
<template v-slot:loading>
<u-loading-icon color="red"></u-loading-icon>
</template>
</u--image>
</view>
</view>
</view>
</view>
</template>

<script>
export default {
data() {
return {
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
src1:''
}
},
onLoad() {
setTimeout(()=>{
this.src1 = this.src
},3000)
},
methods: {
click() {
console.log('click');
}
}
}
</script>

<style lang="scss">

</style>
<template>
<view class="u-page">
<view class="u-demo-block">
<text class="u-demo-block__title">基本案例</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<up-image
:showLoading="true"
:src="src"
width="80px"
height="80px"
@click="click"
></up-image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">自定义形状</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<up-image
shape="circle"
:src="src"
width="80px"
height="80px"
></up-image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">自定义圆角</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<up-image
radius="4"
:src="src"
width="80px"
height="80px"
></up-image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">图片模式(widthFit)</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<up-image
:src="src"
width="80px"
height="80px"
mode="widthFit"
></up-image>
</view>
</view>
</view>
<view class="u-demo-block">
<text class="u-demo-block__title">自定义图片加载插槽</text>
<view class="u-demo-block__content">
<view class="u-page__image-item">
<up-image
:src="src1"
width="80px"
height="80px"
mode="widthFit"
>
<template v-slot:loading>
<u-loading-icon color="red"></u-loading-icon>
</template>
</up-image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
src1:''
}
},
onLoad() {
setTimeout(()=>{
this.src1 = this.src
},3000)
},
methods: {
click() {
console.log('click');
}
}
}
</script>
<style lang="scss">
</style>
114 changes: 57 additions & 57 deletions src/pages/componentsA/sticky/sticky.nvue
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
<template>
<view class="u-page">
<!-- <u-navbar
title="吸顶"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
placeholder
></u-navbar> -->
<view class="u-demo-block">
<text class="u-demo-block__title">基础使用</text>
<u--text
type="content"
text="滚动页面,即可看到下方的按钮会吸顶。"
></u--text>
<!-- #ifdef APP-NVUE -->
<u--text
type="warning"
text="目前由于nvue的bug,设置sticky的top值无效。"
></u--text>
<!-- #endif -->
</view>
<u-sticky>
<u-button
text="吸顶按钮"
type="success"
></u-button>
</u-sticky>
<u-gap
bgColor="#fff"
height="1500px"
></u-gap>
<u-divider text="已到底部"></u-divider>
</view>
</template>

<script>
export default {
data() {
return {

}
},
mixins: [uni.$u.mixin],
methods: {
navigateBack() {
uni.navigateBack()
}
}
}
</script>

<style lang="scss">
.u-page {

}
</style>
<template>
<view class="u-page">
<!-- <u-navbar
title="吸顶"
@leftClick="navigateBack"
safeAreaInsetTop
fixed
placeholder
></u-navbar> -->
<view class="u-demo-block">
<text class="u-demo-block__title">基础使用</text>
<up-text
type="content"
text="滚动页面,即可看到下方的按钮会吸顶。"
></up-text>
<!-- #ifdef APP-NVUE -->
<up-text
type="warning"
text="目前由于nvue的bug,设置sticky的top值无效。"
></up-text>
<!-- #endif -->
</view>
<u-sticky>
<u-button
text="吸顶按钮"
type="success"
></u-button>
</u-sticky>
<u-gap
bgColor="#fff"
height="1500px"
></u-gap>
<u-divider text="已到底部"></u-divider>
</view>
</template>
<script>
export default {
data() {
return {
}
},
mixins: [uni.$u.mixin],
methods: {
navigateBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
.u-page {
}
</style>
Loading

0 comments on commit 72a0fab

Please sign in to comment.