自定义uView中步骤条的内容

效果图
在这里插入图片描述

html

<template>
	<u-steps dot direction="column" current="2" class="stepbox">
					<u-steps-item v-for="item in opinions" :key="item.id" class="content">
						<view class="topbox" slot="desc">
							<view class="stepTitle">
								<view>{{item.examTime}}</view>
							</view>
							<uni-card class="content-card" style="margin: 7px;">
								<view style="font-weight: 600;">
									{{item.mark == 1 ? '已发起申请' : item.mark == 2 ? '原使用部门审核'
										 : item.mark == 3 ? '新部门审核' : item.mark == 4 ? '实物管理部门审核'
										  : item.mark == 5 ? '价值部门审核' : ''}}
								</view>
								<view v-if="item.mark == 1">{{item.deptName + ' - '+ item.leader}}</view>
								<view v-if="item.mark !== 1">{{item.deptName + ' - '+ item.reviewerNick}}</view>
								<view v-if="item.mark !== 1">审核状态:
									<view class="halert">
										<u-button v-if="item.status == 0" style="border: 0;" size="mini" center
											type="info">未审核</u-button>
										<u-button v-else style="border: 0;" size="mini" center
											type="success">已审核</u-button>
									</view>
								</view>
								<view v-if="item.mark !== 1">审核结果:<view style="font-weight:700">{{item.examResult}}
									</view>
								</view>
								<view v-if="item.mark !== 1">审核意见:<view style="font-weight:700">{{item.examOpinion}}
									</view>
								</view>
								<view v-if="item.mark !== 1">是否上传附件:
									<button type="text" size="mini" v-if="item.examIsAtt == 1"></button>
									<view v-else></view>
								</view>
								<view>操作时间:<view style="font-weight:700">{{item.startTime}}</view>
								</view>
							</uni-card>
						</view>
					</u-steps-item>
				</u-steps>
</template>

javascript 数据是调接口返回的

<script>
	import {
		getInfo
	} from '@/api/subpkg/index.js'
	export default {
		data() {
			return {
				form: {
					processCode: ''
				},
				opinions: [],
				allocate: {},
			}
		},
		created() {
			this.getDetail()
		},
		methods: {
			async getDetail() {
				console.log(11);
				const res = await getInfo(this.form.id)
				console.log(res);
				this.allocate = res.data.allocate
				this.opinions = res.data.opinions
			},
		}
	}
</script>

css样式

.stepbox {
	margin-left: 15px;
		.content-card view {
			display: flex;
			justify-content: start;
			padding: 1px 0;
	
		}
	}

简单例子
自定义步骤条内容

	<u-steps current="1" direction="column">
		<u-steps-item title="已下单">
				<view slot="desc">自定义内容</view>
				<view slot="desc">自定义内容</view>
				<view slot="desc">自定义内容</view>
			</u-steps-item>
			<u-steps-item title="已出库" desc="10:35">
			</u-steps-item>
			<u-steps-item title="运输中" desc="11:40"></u-steps-item>
		</u-steps>

在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值