index.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <cm-construct v-bind:data="data[index]" v-bind:class="['auxiliary-line',nc.padding]">
  2. <!-- 预览 -->
  3. <template slot="preview">
  4. <div class="preview-box" :style="{paddingLeft: nc.padding+ 'px', paddingRight: nc.padding+'px'}">
  5. <div v-bind:style="{ borderTop: '1px ' + nc.borderStyle + ' ' + nc.color, margin : (nc.margin + 'px 0') }"></div>
  6. </div>
  7. </template>
  8. <!-- 编辑 -->
  9. <template slot="edit">
  10. <color v-bind:data="{ field : 'color', label : '线条颜色', defaultcolor: '#000000' }"></color>
  11. <div class="layui-form-item ns-icon-radio">
  12. <label class="layui-form-label sm">线条样式</label>
  13. <div class="layui-input-block">
  14. <span :class="{'layui-hide': nc.borderStyle!='solid'}">实线</span>
  15. <span :class="{'layui-hide': nc.borderStyle!='dashed'}">虚线</span>
  16. <ul class="ns-icon">
  17. <li :class="{'ns-text-color ns-border-color ns-bg-color-diaphaneity': nc.borderStyle=='solid'}" @click="nc.borderStyle='solid'">
  18. <img v-if="nc.borderStyle=='solid'" src="{$resourceurl}/horz_line/img/solid_1.png" />
  19. <img v-else src="{$resourceurl}/horz_line/img/solid.png" />
  20. </li>
  21. <li :class="{'ns-text-color ns-border-color ns-bg-color-diaphaneity': nc.borderStyle=='dashed'}" @click="nc.borderStyle='dashed'">
  22. <img v-if="nc.borderStyle=='dashed'" src="{$resourceurl}/horz_line/img/dash_1.png" />
  23. <img v-else src="{$resourceurl}/horz_line/img/dash.png" />
  24. </li>
  25. </ul>
  26. </div>
  27. </div>
  28. <slide v-bind:data="{ field : 'margin', label : '页面间距' }"></slide>
  29. <slide v-bind:data="{ field : 'padding', label : '左右边距' }"></slide>
  30. </template>
  31. <!-- 资源 -->
  32. <template slot="resource">
  33. <css src="{$resourceurl}/horz_line/css/style.css"></css>
  34. </template>
  35. </cm-construct>