Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
591 views
in Technique[技术] by (71.8m points)

weex 中引入moment.js,安卓手机上render失败

const modal = weex.requireModule('modal')
const _=require('lodash');
const moment = require('moment');
// modal.alert({
// message:moment
// });
const startTime='2016-05-05';
const length=30;
const leftTime=2;
// 有效起始时间
const mStartDate = moment(startTime);

lodash和moment以同样的方式npm install安装,lodash正常显示,moment.js导致安卓手机的页面渲染失败


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
let moment = require('moment');
moment().format();
const mStartDate = moment(startTime, 'YYYY-MM-DD');

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...