123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <div style="margin-top: 10px;" id="menuUrls-app">
- <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
- 编辑地址信息
- </div>
- <el-form action="{{route('admin.menuUrl.update',array('id'=>$model->id))}}" method="post" id="form-create">
- <ui-input-text label="链接名称" name="url_name" value="{{$model->url_name}}" maxlength="255" autofocus="true"></ui-input-text>
- <ui-input-text label="链接地址" disabled="disabled " value="{{$model->url}}" maxlength="255" autofocus="true"></ui-input-text>
- <input type="hidden" name="id" value="{{$model->id}}"></input>
- <ui-linkage label="关联菜单" :options="menu_list"></ui-linkage>
- <ui-submit></ui-submit>
- </el-form>
- </div>
- <script type="application/javascript">
- $(function () {
- // 注意:Vue组件一定放在jQuery.validator前面验证
- new Vue({
- el: '#menuUrls-app',
- data :function () {
- return {
- menu_list:{
- 'tier':3,
- 'one_id':'{{$model->parent_id}}',
- 'two_id':'{{$model->menu_id}}',
- 'three_id':'{{$model->child_id}}',
- 'send_url':'{{route('admin.menu.parentMenu')}}',
- 'one_name':'parent_id',
- 'two_name':'menu_id',
- 'three_name':'child_id',
- }
- };
- }
- });
- jQuery.validator.setDefaults({
- debug: false, // 调试模式true不会提交,false允许提交
- success: "success", // 匹配成功的class样式名称
- errorElement: 'div' // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
- });
- // 前台数据验证 验证需要设置window.form全局变量
- window.form = $('#form-create').validate({
- rules: {
- image: {
- required: true,
- maxlength: 255,
- normalizer: function ( value ) {
- return $.trim(value);
- }
- },
- // link: {
- // required: true,
- // maxlength: 255,
- // normalizer: function ( value ) {
- // return $.trim(value);
- // }
- // },
- show: {
- required: true
- },
- sort: {
- required: true,
- normalizer: function ( value ) {
- return $.trim(value);
- }
- }
- }
- });
- // 编辑保存变量
- window.formDatum = $('form').serialize();
- });
- </script>
- @include('layouts.admin.form_script')
|