手机版

Vue渲染渲染时间戳转时间,时间转时间戳及渲染进度条效果

时间:2021-08-30 来源:互联网 编辑:宝哥软件园 浏览:

一。格式化时间

效果图:

time

实现上述界面代码如下:

data(){ return { load : false,demandData: [],demandcount: 0,//总条数skip: 0,//分页页面大小:这个。极限,列: [ { title: '编号,宽度: 60,对齐: '中心,类型: '索引},{ title: '标签名称,key: 'd_title' },{ title: '创建者,key: 'd_create_user' },{ title: '内容描述,key: 'd_content ',width: '20%' },{ title: '创建时间,key: 'd_create_time ',render: (h,params)={ const row=params。划;返回h('div ',[ h('span ',{}),这个。时间戳(行。d _ create _ time)),]);} },{ title: '修改时间,key: 'd_change_times' },{ title: '完成进度,key: 'd_progress ',render: (h,params)={ return h('div ',[ h('Progress ',{ props: { type: 'Progress ',size: 'small ',percent : parent(params。划船。d _ Progress)} },params . row . d _ Progress“%”),]) },title: '操作,key: 'operation ',align: 'center ',render: (h,params)={ return h('div ',[ h('Button ',{ props: { type: 'primary ',size: 'small' },style : {右边距3360 ' 5px ' }, { click :()={ console。日志(参数);//这个$router.push({path: '/xxxx ',查询: { fc _ id :参数。划船。fc _ id } });alert(1) } } },'分配),h('Button ',{ props: { type: 'primary ',size: 'small' },style : {右边距: ' 5px ' }, { click :()={ console。日志(参数);alert(2) } } },'编辑),h('Button ',{ props: { type: 'primary ',size: 'small' },style : {右边距: ' 5px ' }, { click :()={ console。日志(参数);//这个$router.push({path: '/xxxx ',查询: { fc _ id :参数。划船。fc _ id } });alert(3) } } },'备注),h('Button ',{ props: { type: 'primary ',size: 'small' },style : {右边距: ' 0px ' }, { click :()={ console。日志(参数);//这个$router.push({path: '/xxxx ',查询: { fc _ id :参数。划船。fc _ id } });alert(4) } } },'修改') ]);} } ] } },数据表:

data

显示时间具体代码:

{ title: '创建时间,key: 'd_create_time ',render: (h,params)={ const row=params。划;返回h('div ',[ h('span ',{}),这个。时间戳(行。d _ create _ time)),]);} }时间转化工具类:

//时间戳转时间vue . prototype . TiMer=函数(时间){ var Date=new Date(时间* 1000);var Y=日期。get full year()“-”;var M=(日期。getmonth)(1 10?0 '(日期。getmonth()1):日期。getmonth()1)'-';var D=日期。get date()' ';var h=日期。gethours()' : ';var m=日期。getminutes()' : ';var s=日期。getseconds();if(D10){ D=' 0 ' D;}返回Y M D } //时间转时间戳vue。原型。time=function(index){ var strtime=index;var日期=新日期(str time);var time=date。parse(date)/1000;返回时间}二。进度条:

{ title: '完成进度,key: 'd_progress ',render: (h,params)={ return h('div ',[ h('Progress ',{ props: { type: 'Progress ',size: 'small ',percent : parent(params。划船。d _ Progress)} },params . row . d _ Progress“%”),]} }其他具体界面实现请查看:https://www .伊薇薇。com/组件/表格

总结

以上所述是小编给大家介绍的某视频剪辑软件渲染渲染时间戳转时间,时间转时间戳及渲染进度条效果,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对我们网站的支持!

版权声明:Vue渲染渲染时间戳转时间,时间转时间戳及渲染进度条效果是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。