链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.4 KiB

5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Actions\Tools;
  3. use App\Admin\Common\LinkUrl;
  4. use Dcat\Admin\Admin;
  5. use Dcat\Admin\Grid\Tools\AbstractTool;
  6. class DataReportOption extends AbstractTool
  7. {
  8. protected $route;
  9. public function __construct($route)
  10. {
  11. $this->route = $route;
  12. parent::__construct();
  13. }
  14. protected function script()
  15. {
  16. return <<<JS
  17. var app= new Vue({
  18. el:"#option",
  19. data:{
  20. options: [{
  21. value: '选项1',
  22. label: '黄金糕'
  23. }, {
  24. value: '选项2',
  25. label: '双皮奶'
  26. }, {
  27. value: '选项3',
  28. label: '蚵仔煎'
  29. }, {
  30. value: '选项4',
  31. label: '龙须面'
  32. }, {
  33. value: '选项5',
  34. label: '北京烤鸭'
  35. }],
  36. value: ''
  37. },
  38. });
  39. JS;
  40. }
  41. public function render()
  42. {
  43. Admin::js(LinkUrl::VUE_JS);
  44. Admin::js(LinkUrl::ELEMENT_UI_JS);
  45. Admin::css(LinkUrl::ELEMENT_UI_CSS);
  46. Admin::css('css/data_report.css');
  47. Admin::script($this->script());
  48. return view('admin.tools.data_report_option');
  49. }
  50. }