返回

前端工作总结299-uni-发布详情页样式修改

发布时间:2022-11-18 12:02:01 317
# 前端# php# json# 数据
<template>
<view>
<view style="padding: 24rpx 0 0 30rpx;">
<text style="
font-size: 30rpx;color: #333333;">{{tableData.name}}text>
view>
<text style="margin-left:26rpx;margin-top: 20rpx;color: #666666;">
{{tableData.message}}
text>
<view v-for="(item,index) in plist">
<u-image v-if="tableData[item]!=null" style="display: block;float: left;margin-left: 26rpx;margin-top: 26rpx;" width="120rpx"
height="120rpx" :src="tableData[item]">u-image>
view>
<view style="clear: both;padding: 24rpx 0 0 30rpx;height: 46rpx;">
<view style="float: left;line-height: 46rpx;">
<u-icon name="clock" width="28.4rpx" height="28.4rpx">u-icon>
view>
<view style="float: left;line-height: 46rpx;margin-left: 5rpx;
color: #999999;font-size: 24rpx;">
截至时间: {{tableData.endTime}}
view>
view>
<view style="clear: both;padding: 24rpx 0 0 30rpx;height: 46rpx;">
<view style="float: left;line-height: 46rpx;">
<u-icon name="account" width="28.4rpx" height="28.4rpx">u-icon>
view>
<view style="float: left;line-height: 46rpx;margin-left: 5rpx;color: #999999;font-size: 24rpx;">
创建人:{{tableData.createdBy}}
view> view>
<view style="clear: both;padding: 24rpx 0 0 30rpx;height: 46rpx;">
<view style="float: left;line-height: 46rpx;">
<u-icon name="clock" width="28.4rpx" height="28.4rpx">u-icon>
view>
<view style="float: left;line-height: 46rpx;margin-left: 5rpx;color: #999999;font-size: 24rpx;">
指派给: {{tableData.assignName}}
view>
view>
<view style="clear: both;padding: 24rpx 0 0 30rpx;height: 46rpx;">
<view style="float: left;line-height: 46rpx;">
<u-icon name="reload" width="28.4rpx" height="28.4rpx">u-icon>
view>
<view style="float: left;line-height: 46rpx;margin-left: 5rpx;color: #999999;font-size: 24rpx;">
循环: {{tableData.patrolFor|toChangeLess}}
view>
view>
view>
template><script>
export default {
filters: { toChangeLess(e) {
console.log(e)
/* 过滤数据中的循环请求*/
if (e == 0) {
return "不循环"
} else if (e == 12345) {
return "周一到周五循环"
} else if (e == 12345678) {
return "每日循环"
}
}
},
data() { return {
plist: [],
tableData: {}
}
},
onLoad(e) {
/* JSON.parse() */
let obj = JSON.parse(decodeURIComponent(e.record));
console.log(obj)
this.tableData = obj
this.allPrpos(obj)
},
methods: {
allPrpos(obj) {
// 用来保存所有的属性名称和值
let list = []
var props = "";
// 开始遍历
for (var p in obj) {
// 方法
if (typeof(obj[p]) == "function") {
obj[p]();
} else {
// p 为属性名称,obj[p]为对应属性的值
if (p.indexOf("apic") != -1) {
/* props+= p + "=" + obj[p] + "\t"; */
list.push(p)
this.plist = list
console.log(list)
}
}
}
// 最后显示所有的属性
/* console.log(props); */
},
}
}
script><style>
style>



前端工作总结299-uni-发布详情页样式修改_json

 

 



特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像
精选文章
thumb 中国研究员首次曝光美国国安局顶级后门—“方程式组织”
thumb 俄乌线上战争,网络攻击弥漫着数字硝烟
thumb 从网络安全角度了解俄罗斯入侵乌克兰的相关事件时间线
下一篇
前端工作总结262-理解绑定逻辑 2022-11-18 11:45:11