mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
feat: 更新项目配置与组件使用
- 在入口文件中引入uview-plus的配置,优化字体加载逻辑 - 移除manifest.json中不必要的权限描述 - 更新package.json和package-lock.json,添加开发依赖 - 调整多个组件的样式和结构,提升用户体验 - 修复部分组件的逻辑和样式问题,确保兼容性
This commit is contained in:
86
components/u-time-line/u-time-line-item.vue
Normal file
86
components/u-time-line/u-time-line-item.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<view class="u-time-line-item">
|
||||
<view class="u-time-line-item__node" :style="nodeStyle">
|
||||
<slot name="node">
|
||||
<view class="u-time-line-item__dot" :style="{ backgroundColor: bgColor }"></view>
|
||||
</slot>
|
||||
</view>
|
||||
<view class="u-time-line-item__content">
|
||||
<slot name="content" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'UTimeLineItem',
|
||||
props: {
|
||||
nodeTop: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '#ffffff'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
nodeStyle() {
|
||||
if (this.nodeTop === '' || this.nodeTop === null || this.nodeTop === undefined) {
|
||||
return {}
|
||||
}
|
||||
const top = typeof this.nodeTop === 'number' ? `${this.nodeTop}rpx` : this.nodeTop
|
||||
return { top }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.u-time-line-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
padding-bottom: 32rpx;
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&__node {
|
||||
position: relative;
|
||||
width: 32rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&__dot {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
&__content {
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 15rpx;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
&:last-child::before {
|
||||
bottom: auto;
|
||||
height: 16rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
18
components/u-time-line/u-time-line.vue
Normal file
18
components/u-time-line/u-time-line.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<view class="u-time-line">
|
||||
<slot />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'UTimeLine'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.u-time-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user