123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- // component/fileItem/fileItem.ts
- import { TimeUtil } from '../../utils/TimeUtil'
- import { httpUtil } from "../../utils/restful";
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- itemData: null
- },
- /**
- * 组件的初始数据
- */
- data: {
- fileUploadTime: ''
- },
- lifetimes: {
- attached: function () {
- // 在组件实例被从页面节点树添加时执行
- console.log("fileItem:", this.properties.itemData.uploadTime)
- this.setData({
- fileUploadTime: TimeUtil.dateFormat(parseInt(this.properties.itemData.uploadTime), "yyyy-MM-dd HH:mm"),
- })
- },
- detached: function () {
- // 在组件实例被从页面节点树移除时执行
- },
- },
- /**
- * 组件的方法列表
- */
- methods: {
- clickFileItem: function (event: any) {
- wx.navigateTo({
- url: '../../../pages/document/document?lessId=' + event.currentTarget.id+'&pageTitle='+this.data.itemData.title
- })
- },
- clickMore: function (event: any) {
- this.triggerEvent("showWindow", { item: this.data.itemData })
- }
- }
- })
|