bottom_nav_design.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {extend name="base"/}
  2. {block name="resources"}
  3. <link rel="stylesheet" href="STATIC_EXT/colorPicker/css/colorpicker.css" />
  4. <link rel="stylesheet" href="STATIC_EXT/diyview/css/diyview.css" />
  5. <link rel="stylesheet" href="STATIC_EXT/diyview/css/bottom_nav_design.css" />
  6. {/block}
  7. {block name="main"}
  8. <div id="bottomNav" class="layui-form">
  9. <div class="preview">
  10. <div class="preview-head">
  11. <span>底部导航</span>
  12. </div>
  13. <div class="preview-block">
  14. <ul v-show="data.list.length>0" :style="{ backgroundColor : data.backgroundColor }">
  15. <li v-for="(item,index) in data.list" @mouseover="mouseOver(index)" @mouseout="mouseOut()" :key="item.id">
  16. <div v-show="data.type == 1 || data.type == 2">
  17. <template v-if="selected == index">
  18. <img v-if="item.selected_icon_type == 'img'" :src="(selected == index ? (item.selectedIconPath? changeImgUrl(item.selectedIconPath) : changeImgUrl('public/static/img/default_img/square.png')) : (item.iconPath? changeImgUrl(item.iconPath) : changeImgUrl('public/static/img/default_img/square.png')) )"/>
  19. <iconfont v-else :icon="selected == index ? item.selectedIconPath : item.iconPath" :value="selected == index ? (item.selected_style ? item.selected_style : null) :(item.style ? item.style : null)"></iconfont>
  20. </template>
  21. <template v-else>
  22. <img v-if="item.icon_type == 'img'" :src="(selected == index ? (item.selectedIconPath? changeImgUrl(item.selectedIconPath) : changeImgUrl('public/static/img/default_img/square.png')) : (item.iconPath? changeImgUrl(item.iconPath) : changeImgUrl('public/static/img/default_img/square.png')) )"/>
  23. <iconfont v-else :icon="selected == index ? item.selectedIconPath : item.iconPath" :value="selected == index ? (item.selected_style ? item.selected_style : null) :(item.style ? item.style : null)"></iconfont>
  24. </template>
  25. </div>
  26. <span :style="{ fontSize : ( data.fontSize + 'px'), color : (selected == index ? data.textHoverColor : data.textColor ) }" v-show="data.type == 1 || data.type == 3">{{ item.text }}</span>
  27. </li>
  28. </ul>
  29. </div>
  30. <div class="custom-save">
  31. <button class="layui-btn save">保存</button>
  32. </div>
  33. </div>
  34. <div class="edit-attribute">
  35. <bottom-menu></bottom-menu>
  36. </div>
  37. </div>
  38. {if condition="$bottom_nav_info"}
  39. <input type="hidden" id="info" value='{:json_encode($bottom_nav_info)}' />
  40. {/if}
  41. {/block}
  42. {block name="script"}
  43. <script>
  44. {if condition="$bottom_nav_info"}
  45. var bottomNavInfo = JSON.parse($("#info").val().toString());
  46. {else/}
  47. var bottomNavInfo = null;
  48. {/if}
  49. </script>
  50. <script src="STATIC_JS/vue.js"></script>
  51. {include file="diy/iconfont_component"/}
  52. <script src="STATIC_EXT/colorPicker/js/colorpicker.js"></script>
  53. <script src="STATIC_EXT/diyview/js/ddsort.js"></script>
  54. <script src="STATIC_EXT/diyview/js/components.js"></script>
  55. <script src="STATIC_EXT/diyview/js/shop_bottom_nav.js"></script>
  56. {/block}