智慧大石
1. 可以通过el.__vfrag__.scope 获取到当前节点上绑定的Vue对象。例如:const clipboard = new Clipboard('.anticons-list li')clipboard.on('success', (e) => {const item = e.trigger.__vfrag__.scope.itemitem.justCopied = truesetTimeout(() => {item.justCopied = false}, 1000)})2. 通过vm.$compile 动态编译模板例如:const template = `<animation:show="visible":on-leave="_onAnimateLeave":transition-name="popupTransitionName"><div>(*^__^*)</div></animation>`compiled () {const div = document.createElement('div')div.innerHTML = templatethis.$compile(div)document.body.appendChild(div)},