使用的api版本为4.27.6版本。
设置弹窗属性时添加两个属性:
popupTemplate:{
title:`${name}名字`,
content:popupFun, //自定义弹窗内容
disableScrollToSelection: true, //禁用自动缩放 **
overwriteActions: true // 强制覆盖默认动作 **
}
弹窗中时间字段格式化
{
fieldName:'', //字段
label:'', //别名
type:'',//字段的类型
format:{
dateFormat:''//格式化方式
}
}
| dateFormat的值(esriFieldTypeDate) | 显示效果 |
|---|---|
| short-date | 显示:xxxx/x/x |
| long-date | 显示:xxxx年xx月xx日 星期x |
| short-date-time | 显示:xxxx/x/x xx:xx |
| long-date-time | 显示:xxxx/x/x xx:xx |
| iso-date | 显示:xxxx/x/x xx:xx |
最后三种尝试没效果,希望有尝试出效果的小伙伴可以留言给我,咱们随时交流。
1349

被折叠的 条评论
为什么被折叠?



