标签:vue lse window callback cal UNC javascrip win this
(function () {
var onPlusReady = function (callback, context = this) {
if (window.plus) {
callback.call(context);
} else {
document.addEventListener(‘plusready‘, callback.bind(context));
}
};
Vue.mixin({
beforeCreate: function () {
onPlusReady(function () {
this.plusReady = true;
}, this);
},
methods: {
onPlusReady: onPlusReady
}
});
}());
标签:vue lse window callback cal UNC javascrip win this
原文地址:https://www.cnblogs.com/xiaoyucoding/p/9510628.html