vue-html5-editor icon indicating copy to clipboard operation
vue-html5-editor copied to clipboard

0.5.1版本的两个问题

Open gaoyujoy opened this issue 8 years ago • 0 comments

因为部分原因,公司使用了1.x版本的vue,并且没有升级,所以只能使用0.5.1的editor,在使用过程中,对文字进行设置行高时,发现了两个问题:

  1. 点击设置行高后报错,提示: Failed to resolve component: font (found in component: ),查看源码发现在modules/font.dashboard.vue中的setLineHeight方法中在设置完样式后,最后一行代码: this.$parent.toggleDashboard("font") 传回去的参数为font,然后再editor.vue中的该方法的实现为: toggleDashboard(dashboard){ this.dashboard == dashboard ? this.dashboard = null : this.dashboard = dashboard } 但是在绑定modules组件的时候,所有的组件的命名规则为: if (module.dashboard) { //$options.module module.dashboard.module = module components['dashboard-' + module.name] = module.dashboard } 也就是说所有的组件的名称在前面会加上"dashboard-",所以当这个地方传回“font”时,不能关闭dashboard-font层,并且会报错。
  2. 设置好行高后,content并没有更新,导致,最后提交的时候,并没有行高的样式,具体可以看第一个问题提到的方法中,没有对content的值得修改的代码。

如果是我有什么设置不对的地方,望提出,如果确实有问题,但是已经放弃了低版本editor的更新,请忽略。

gaoyujoy avatar Jul 03 '17 08:07 gaoyujoy