ソースを参照

日志显示换行问题

LD 5 年 前
コミット
3ec2477d05
2 ファイル変更9 行追加2 行削除
  1. 4 0
      app/Log.php
  2. 5 2
      resources/views/maintenance/log/show.blade.php

+ 4 - 0
app/Log.php

@@ -26,4 +26,8 @@ class Log extends Model
             return 'Y';
         return 'N';
     }
+//    function getDetailAttribute(): string
+//    {
+//        return 'abc';
+//    }
 }

+ 5 - 2
resources/views/maintenance/log/show.blade.php

@@ -35,7 +35,9 @@
                         <td>详细</td>
                         <td style="word-break: break-all;">
                             {{--<button v-if="mark == 'Y'" class="btn btn-sm btn-success ml-2" data-toggle="modal" data-target="#task">重新分发</button>--}}
-                            <div {{--v-else--}} v-html="detail"></div>
+                            <div {{--v-else--}} v-html="detail">
+                                @{{a}}
+                            </div>
                         </td>
                     </tr>
                     <tr>
@@ -57,8 +59,9 @@
     new Vue({
         el:"#container",
         data:{
+            a:333,
             mark:"{{$log['exception_mark']}}",
-            detail:"{{$log['description']}}".split('|'),
+            detail:"{{$log['description']}}",
         },
     });
 </script>