design.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <nc-component v-bind:data="data[index]" class="top-title" v-bind:style="{ backgroundColor : nc.backgroundColor }">
  2. <!-- 预览 -->
  3. <template slot="preview">
  4. <header v-bind:style="{ color : nc.textColor?nc.textColor:'rgba(0,0,0,0)', backgroundColor : nc.backgroundColor }">
  5. <a href="javascript:;" class="go-back">
  6. <svg t="1535096586623" class="icon" v-bind:style="{width: nc.fontSize-4+'px'}" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1036" xmlns:xlink="http://www.w3.org/1999/xlink">
  7. <path d="M352 512l384-384c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0L288 486.4C281.6 492.8 275.2 505.6 275.2 512c0 6.4 0 19.2 6.4 25.6l409.6 409.6c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L352 512z" p-id="1037"></path>
  8. </svg>
  9. </a>
  10. <h4 v-bind:style="{ fontSize : nc.fontSize + 'px' }">{{nc.title}}</h4>
  11. <a v-bind:style="{ fontSize : (nc.fontSize-2 + 'px') }" v-show="nc.isOpenOperation" href="javascript:;" class="operation">{{nc.operationName}}</a>
  12. </header>
  13. </template>
  14. <!-- 编辑 -->
  15. <template slot="edit">
  16. <div class="layui-form-item">
  17. <label class="layui-form-label sm">顶部标题名</label>
  18. <div class="layui-input-block">
  19. <input type="text" v-model="nc.title" v-bind:id="'title_'+index" placeholder="请输入顶部标题" class="layui-input">
  20. </div>
  21. </div>
  22. <nc-link v-bind:data="{ field : nc.leftLink, label : '左侧链接' }"></nc-link>
  23. <font-size v-bind:data="{ value : nc.fontSize }"></font-size>
  24. <color v-bind:data="{ field : 'backgroundColor', label : '背景颜色' }"></color>
  25. <color v-bind:data="{ defaultcolor: '#000000'}"></color>
  26. <div class="layui-form-item">
  27. <label class="layui-form-label sm">右侧功能</label>
  28. <div class="layui-input-block">
  29. <div v-bind:class="{ 'layui-unselect layui-form-switch' : true, 'layui-form-onswitch' : nc.isOpenOperation }" v-on:click="nc.isOpenOperation=!nc.isOpenOperation">
  30. <em></em>
  31. <i></i>
  32. </div>
  33. </div>
  34. </div>
  35. <nc-link v-show="nc.isOpenOperation" v-bind:data="{ field : nc.rightLink }"></nc-link>
  36. <div class="layui-form-item" v-show="nc.isOpenOperation">
  37. <label class="layui-form-label sm">功能名称</label>
  38. <div class="layui-input-block">
  39. <input type="text" v-model="nc.operationName" v-bind:id="'top_operation_'+index" placeholder="请输入右侧功能名称" class="layui-input">
  40. </div>
  41. </div>
  42. <template v-if="nc.lazyLoad">
  43. <title-empty></title-empty>
  44. </template>
  45. </template>
  46. <!-- 资源 -->
  47. <template slot="resource">
  48. <css src="{$resource_path}/title/css/design.css"></css>
  49. <js src="{$resource_path}/title/js/design.js"></js>
  50. </template>
  51. </nc-component>