design.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <nc-component :data="data[index]" class="rich-text">
  2. <!-- 预览 -->
  3. <template slot="preview">
  4. <div :style="{backgroundColor: nc.componentBgColor ,
  5. borderTopLeftRadius: (nc.componentAngle == 'round' ? nc.topAroundRadius + 'px' : 0),
  6. borderTopRightRadius: (nc.componentAngle == 'round' ? nc.topAroundRadius + 'px' : 0),
  7. borderBottomLeftRadius: (nc.componentAngle == 'round' ? nc.bottomAroundRadius + 'px' : 0),
  8. borderBottomRightRadius: (nc.componentAngle == 'round' ? nc.bottomAroundRadius + 'px' : 0)
  9. }">
  10. <div v-if="nc.html" v-html="nc.html"></div>
  11. <template v-else>
  12. <p>点此编辑『富文本』内容 ——&gt;</p>
  13. <p>你可以对文字进行<strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline;">下划线</span>、<span style="text-decoration: line-through;">删除线</span>、文字<span style="color: rgb(0, 176, 240);">颜色</span>、<span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255);">背景色</span>、以及字号<span style="font-size: 20px;">大</span><span style="font-size: 14px;">小</span>等简单排版操作。</p>
  14. <p style="text-align: left;">
  15. <span style="text-align: left;">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span>
  16. </p>
  17. </template>
  18. </div>
  19. </template>
  20. <!-- 内容编辑 -->
  21. <template slot="edit-content">
  22. <template v-if="nc.lazyLoad">
  23. <div class="template-edit-title">
  24. <h3>内容设置</h3>
  25. <rich-text></rich-text>
  26. </div>
  27. </template>
  28. </template>
  29. <!-- 样式编辑 -->
  30. <template slot="edit-style"></template>
  31. <!-- 资源 -->
  32. <template slot="resource">
  33. <css src="{$resource_path}/css/design.css"></css>
  34. <js src="{$resource_path}/js/design.js"></js>
  35. </template>
  36. </nc-component>