-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMessageDialog.php
More file actions
112 lines (92 loc) · 2.13 KB
/
Copy pathMessageDialog.php
File metadata and controls
112 lines (92 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
namespace Andruby\DeepAdmin\Components\widgets;
use SmallRuralDog\Admin\Components\Component;
class MessageDialog extends Component
{
protected $componentName = "MessageDialog";
protected $data;
protected $is_title;
protected $columns;
protected $style = 'width:80%';
protected $show_index;
protected $index_prefix;
protected $index_after;
protected $index_width;
protected $min_num = 1;
protected $max_num = 999;
/**
* 1、阿拉伯数字
* 2、汉字
*
* @var int
*/
protected $index_model = 1;
public static function make()
{
return new MessageDialog();
}
public function is_title($is_title = true)
{
$this->is_title = $is_title;
return $this;
}
public function add_column(Column $column)
{
$this->columns[] = $column;
return $this;
}
public function columns(array $column)
{
$this->columns = $column;
return $this;
}
public function style($style)
{
$this->style = $style;
return $this;
}
public function data($data)
{
if ($data instanceof \Closure) {
$this->data = call_user_func($data);
} else {
$this->data = $data;
}
return $this;
}
public function show_index($show_index = true)
{
$this->show_index = $show_index;
return $this;
}
public function index_prefix($index_prefix)
{
$this->index_prefix = $index_prefix;
return $this;
}
public function index_after($index_after)
{
$this->index_after = $index_after;
return $this;
}
public function index_width($index_width)
{
$this->index_width = $index_width;
return $this;
}
public function min_num($min_num)
{
$this->min_num = $min_num;
return $this;
}
public function max_num($max_num)
{
$this->max_num = $max_num;
return $this;
}
public function index_model($index_model)
{
$this->index_model = $index_model;
return $this;
}
}