Vue Js:如何根据下拉列表动态加载 tinymce select

Vue Js : How to load tinymce dynamically base on dropdown select

我正在尝试根据下拉菜单动态加载 tinymce select,但我认为它可以工作。

这是我的 fiddle

Vue.directive('tinymce', {
bind(el) {
tinymce.init({
  target: el,
  theme: 'modern'
 })
}
})

new Vue({
   el: '#timeline_selections',
   data: {
    timeline_type: ''
  }
})

找到我自己的解决方案

Vue.directive('tinymce', {
 inserted: function (el) {
   tinymce.remove();
   tinymce.init({
   target: el,
   theme: 'modern'
  })
 }
})