index.blade.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @extends('layouts.admin.app')
  2. @section('crumbs')
  3. <ol class="breadcrumb crumbs">
  4. <li><a href="{{ route('admin.index') }}#">后台导航</a></li>
  5. <li class="active">系统配置</li>
  6. </ol>
  7. @endsection
  8. @section('content')
  9. <div id="configs">
  10. <el-form action="{{ route('admin.config.update') }}" method="post" id="configs-edit">
  11. <hr>
  12. {{ csrf_field() }}
  13. <ui-submit></ui-submit>
  14. </el-form>
  15. </div>
  16. @endsection
  17. @section('scripts')
  18. <script type="application/javascript">
  19. $(function () {
  20. // 注意:Vue组件一定放在jQuery.validator前面验证
  21. new Vue({
  22. el: '#configs',
  23. data :function () {
  24. return {
  25. params: {
  26. // 注意:group和attr连个属性都不能省略 就算为空
  27. group: {},
  28. attr: {
  29. name: 'service_type', // 当前checkbox框的name属性 【必填】
  30. radioCheck:{{$configs->get('service_type',0)}}, // 当前选中项 int | string 【必填】
  31. label: 'el-radio-button', // 当前样式 默认 el-radio 样式 【非必填】
  32. radios: [ // 每个checkbox 就是一个json对象 【必填】
  33. {
  34. value:0, // 当前选中时值也就是value属性的值 【必填】
  35. label: '固定金额', // 当前提示文字 【必填】
  36. disable: false // 是否禁止点击 默认:false 不禁止
  37. },
  38. {
  39. value:1, // 当前选中时值也就是value属性的值 【必填】
  40. label: '比例', // 当前提示文字 【必填】
  41. disable: false // 是否禁止点击 默认:false 不禁止
  42. }
  43. ]
  44. }
  45. }
  46. };
  47. },
  48. methods: {}
  49. });
  50. // 编辑保存变量
  51. window.formDatum = $('form').serialize();
  52. });
  53. </script>
  54. @component('layouts.admin.admin_component')@endcomponent
  55. @endsection