edit.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. {include file="public/head"}
  5. <title>{$title}</title>
  6. </head>
  7. <body>
  8. <div id="form-add" class="mp-form" v-cloak="">
  9. <form-builder></form-builder>
  10. </div>
  11. <style>
  12. #eb-field-icon input{width: 80%}
  13. </style>
  14. <script>
  15. var _vm ;
  16. _mpApi = parent._mpApi;
  17. function openicon() {
  18. layer.open({
  19. type: 2,
  20. content: '/admin/system.system_menus/icon.html',
  21. area: ['600px', '600px'],
  22. maxmin: true
  23. });
  24. // $eb.createModalFrame(this.innerText,"/admin/system.system_menus/icon.html");
  25. }
  26. mpFrame.start(function(Vue){
  27. require(['axios','system/util/mpFormBuilder'],function(axios,mpFormBuilder){
  28. axios.post('{$read}').then((result)=>{
  29. Vue.use(mpFormBuilder,_mpApi,result.data,{
  30. action:'{$update}'
  31. });
  32. new Vue({
  33. el:"#form-add",
  34. mounted:function(){
  35. window._$setIcon = (icon)=>{
  36. this.$formBuilder.set('icon',icon);
  37. };
  38. $('#eb-field-icon').find('input').after('<button type="button" class="ivu-btn" onclick="openicon()")>选择图标</button>');
  39. }
  40. })
  41. })
  42. });
  43. });
  44. </script>
  45. </body>