index.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <cm-construct v-bind:data="data[index]" class="top-search">
  2. <!-- 预览 -->
  3. <template slot="preview">
  4. <div class="preview-box" v-bind:style="{background: nc.backgroundColor}">
  5. <div class="top-search-form">
  6. <input name="d_elem" type="hidden" value="{$shop_info.logo}" ref="d_elem" />
  7. <div class="logo" v-if="nc.searchType == 2" :style="{backgroundImage:'url('+changeImgUrl(nc.searchImg)+')'}">
  8. </div>
  9. <div class="top-search-box" v-bind:class="{'border-circle': nc.borderType == 2}" v-bind:style="{background: nc.bgColor, textAlign: nc.textAlign}">
  10. <span class="top-search-intro" v-bind:style="{color: nc.textColor?nc.textColor:'rgba(0,0,0,0)'}">{{ nc.title }}</span>
  11. <span class="top-search-icon"><i class="iconfont iconsousuo" v-bind:style="{color: nc.textColor?nc.textColor:'rgba(0,0,0,0)'}"></i></span>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <!-- 编辑 -->
  17. <template slot="edit">
  18. <div class="layui-form-item">
  19. <label class="layui-form-label sm">文本名</label>
  20. <div class="layui-input-block">
  21. <input type="text" v-model="nc.title" v-bind:id="'title_'+index" placeholder="请输入搜索内容" class="layui-input">
  22. </div>
  23. </div>
  24. <div class="search_h3">
  25. <h3 class="ns-margin-left">搜索样式</h3>
  26. <span class="layui-nav-more"></span>
  27. </div>
  28. <div class="line"></div>
  29. <color class="ns-margin-top" v-bind:data="{ 'defaultcolor': '#999999' }"></color>
  30. <color v-bind:data="{ field : 'backgroundColor', 'label' : '背景颜色' }"></color>
  31. <color v-bind:data="{ field : 'bgColor', 'label' : '框体颜色' }"></color>
  32. <template v-if="nc.lazyLoad">
  33. <goods-search></goods-search>
  34. <search-border></search-border>
  35. </template>
  36. </template>
  37. <!-- 预览 -->
  38. <template slot="preview">
  39. <div class="search_style" >
  40. <div class="sytle">
  41. <!-- 图一 -->
  42. <div class="text-title" data-index="1" v-if="nc.searchType == 1" :class="{active:nc.searchStyle == 1}">
  43. <img src="{$resourceurl}/search/img/style3.png"/>
  44. </div>
  45. <div class="text-title" data-index="2" v-if="nc.searchType == 1" :class="{active:nc.searchStyle == 2}">
  46. <img src="{$resourceurl}/search/img/style4.png"/>
  47. </div>
  48. <div class="text-title" data-index="1" v-if="nc.searchType == 2" :class="{active:nc.searchStyle == 1}">
  49. <img src="{$resourceurl}/search/img/style1.png"/>
  50. </div>
  51. <div class="text-title" data-index="2" v-if="nc.searchType == 2" :class="{active:nc.searchStyle == 2}">
  52. <img src="{$resourceurl}/search/img/style2.png"/>
  53. </div>
  54. </div>
  55. </div>
  56. </template>
  57. <!-- 资源 -->
  58. <template slot="resource">
  59. <js>
  60. var searchResourcePath = "{$resourceurl}";
  61. </js>
  62. <css src="{$resourceurl}/search/css/style.css"></css>
  63. <css src="{$resourceurl}/search/css/iconfont.css"></css>
  64. <js src="{$resourceurl}/search/js/style.js"></js>
  65. </template>
  66. </cm-construct>