本次提交主要包含以下内容: 1. 新增积分申请系统核心功能: - 添加登录页面及API接口 - 实现积分申请记录查看功能 - 集成微信小程序分享功能 - 添加请求管理工具类 2. 引入Tuniao UI组件库: - 添加时间线、折叠面板、表格等UI组件 - 集成头像组、单选框组等交互组件 - 配置全局样式和主题颜色 3. 基础架构搭建: - 配置项目manifest和pages.json路由 - 添加状态管理store - 实现自定义导航栏适配 - 添加工具函数(加解密、数字处理等) 4. 静态资源: - 添加项目logo和背景图片 - 配置uni.scss全局样式变量 本次提交为系统基础功能搭建,后续将进一步完善积分申请流程和审批功能。
185 lines
3.6 KiB
Vue
185 lines
3.6 KiB
Vue
<template>
|
|
<view
|
|
class="tn-list-view-class tn-list-view"
|
|
:class="[
|
|
backgroundColorClass,
|
|
viewClass
|
|
]"
|
|
:style="[viewStyle]"
|
|
>
|
|
<view
|
|
v-if="showTitle"
|
|
class="tn-list-view__title"
|
|
:class="[
|
|
fontColorClass
|
|
]"
|
|
:style="[titleStyle]"
|
|
@tap="handleClickTitle"
|
|
>{{ title }}</view>
|
|
|
|
<view
|
|
v-else
|
|
:class="[{'tn-list-view__title--card': card}]"
|
|
@tap="handleClickTitle"
|
|
>
|
|
<slot name="title"></slot>
|
|
</view>
|
|
|
|
<view
|
|
class="tn-list-view__content tn-border-solid-top tn-border-solid-bottom"
|
|
:class="[contentClass]"
|
|
>
|
|
<slot></slot>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import componentsColorMixin from '../../libs/mixin/components_color.js'
|
|
export default {
|
|
mixins: [ componentsColorMixin ],
|
|
name: 'tn-list-view',
|
|
props: {
|
|
// 标题
|
|
title: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
// 去掉边框 上边框 top, 下边框 bottom, 所有边框 all
|
|
unlined: {
|
|
type: String,
|
|
default: 'all'
|
|
},
|
|
// 上外边距
|
|
marginTop: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
// 内容是否显示为卡片模式
|
|
card: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
// 是否自定义标题
|
|
customTitle: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
computed: {
|
|
showTitle() {
|
|
return !this.customTitle && this.title
|
|
},
|
|
viewClass() {
|
|
let clazz = ''
|
|
|
|
if (this.card) {
|
|
clazz += ' tn-list-view--card'
|
|
}
|
|
|
|
return clazz
|
|
},
|
|
viewStyle() {
|
|
let style = {}
|
|
|
|
if (this.backgroundColorStyle) {
|
|
style.backgroundColor = this.backgroundColorStyle
|
|
}
|
|
|
|
if (this.marginTop) {
|
|
style.marginTop = this.marginTop
|
|
}
|
|
|
|
return style
|
|
},
|
|
titleStyle() {
|
|
let style = {}
|
|
|
|
if (this.fontColorStyle) {
|
|
style.color = this.fontColorStyle
|
|
}
|
|
if (this.fontSize) {
|
|
style.fontSize = this.fontSize + this.fontUnit
|
|
}
|
|
|
|
return style
|
|
},
|
|
contentClass() {
|
|
let clazz = ''
|
|
|
|
if (this.card) {
|
|
clazz += ' tn-list-view__content--card'
|
|
}
|
|
|
|
switch(this.unlined) {
|
|
case 'top':
|
|
clazz += ' tn-none-border-top'
|
|
break
|
|
case 'bottom':
|
|
clazz += ' tn-none-border-bottom'
|
|
break
|
|
case 'all':
|
|
clazz += ' tn-none-border'
|
|
break
|
|
}
|
|
|
|
return clazz
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
kindShowFlag: this.showKind
|
|
}
|
|
},
|
|
methods: {
|
|
// 处理标题点击事件
|
|
handleClickTitle() {
|
|
if (!this.kindList) return
|
|
this.kindShowFlag = !this.kindShowFlag
|
|
this.$emit("clickTitle", {})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.tn-list-view {
|
|
background-color: #FFFFFF;
|
|
|
|
&__title {
|
|
width: 100%;
|
|
padding: 30rpx;
|
|
font-size: 30rpx;
|
|
line-height: 30rpx;
|
|
box-sizing: border-box;
|
|
|
|
&--card {
|
|
// margin: 0rpx 30rpx;
|
|
}
|
|
}
|
|
|
|
&__content {
|
|
width: 100%;
|
|
position: relative;
|
|
border-radius: 0;
|
|
|
|
&--card {
|
|
// width: auto;
|
|
// overflow: hidden;
|
|
// margin-right: 30rpx;
|
|
// margin-left: 30rpx;
|
|
// border-radius: 20rpx
|
|
}
|
|
}
|
|
|
|
&--card {
|
|
// padding-bottom: 30rpx;
|
|
border-radius: 20rpx;
|
|
overflow: hidden;
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|