使用PopupWindow来实现弹出框,并且带有动画效果 首先自定义PopupWindow public class LostPopupWindow extends PopupWindow { public Lost lost; public void onLost(Lost lost){ this.lost = lost; } private View conentView; public View getConentView() { return conentView; } public L…
直接上代码: mounted: function () { let that = this; $(document).on('click', function (e) { let dom = $('.myDiv')[0]; // 自定义div的class if (dom) { // 如果点击的区域不在自定义dom范围 if (!dom.contains((e.target))) { that.showMyDiv = false; } } }); }, beforeDestroy() { $(do…