mounted(){
this.initHandler(this);
this.minuteInterVal();
//获取用户登录信息
let href = window.location.pathname;
if(href !='/' && href.indexOf('login')<0 && href !=process.env.VUE_APP_PUBLICPATH && !window.location.pathname.includes('verification')){
this.getLoginMsg(this)
}
let that = this
that.$nextTick(()=>{
that.$jQuery('.van-tab_pane').eq(0).attr('style','display:none');
that.$jQuery('.van-tab').attr('style','flex-basis:18%')
})
if(this.$store.state.userInfo.userId){this.createWebSocket()}
if(this.$store.state.unApproveNumber.data>0){this.showMsg=true}
let tmpClass = '.wrap-76,.wrap-90,.wrap-100,.wrap-102,.wrap-106,.wrap-120,.wrap-140,.wrap-160,.wrap-200,.wrap-216,.wrap-252';
// 内容超长 显示事件
that.$jQuery("#app")
.on("mouseenter", tmpClass, function (val) {
that.$jQuery(this).removeAttr('title').parent().removeAttr('title');
if (that.$jQuery(this).html() != '' && that.$jQuery(this).html().replace(/\s+/g, "").length > 2) {
that.$jQuery(this).parent().addClass('posi-relative');
that.$jQuery(this).append("<span class='wrap-box'>" + that.$jQuery(this).html() + "</span>");
}
}).on("mouseleave", tmpClass, function (val) {
that.$jQuery(this).children('.wrap-box').remove();
});
}
mounted中写的
最新推荐文章于 2024-11-02 10:09:29 发布