Skip to content

Commit 9558981

Browse files
committed
打包一个版本
1 parent a84bc29 commit 9558981

File tree

9 files changed

+27
-10
lines changed

9 files changed

+27
-10
lines changed

config/admin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
'loginDesc' => '开箱即用的 Laravel 后台扩展',
99

1010

11-
'logo' => 'https://file.iviewui.com/admin-pro-dist/img/logo.7b8cc895.png',
11+
'logo' => 'https://file.iviewui.com/admin-pro-dist/img/logo-small.4a34a883.png',
1212

13-
'copyright' => 'Copyright © 2020 小土狗',
13+
'copyright' => 'Copyright © 2020 SmallRuralDog',
1414
'footerLinks' => [
1515
[
1616
'href' => 'https://github.com/SmallRuralDog/laravel-vue-admin',

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=306eef14b93586b91686",
2+
"/app.js": "/app.js?id=d8f330d4af66dfc8e804",
33
"/manifest.js": "/manifest.js?id=3c768977c2574a34506e",
44
"/vendor.js": "/vendor.js?id=5a30bc9bc2e005aa1c33"
55
}

resources/js/components/widgets/RadioGroup.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
v-model="vm"
44
:style="attrs.style"
55
:class="attrs.className"
6+
:disabled="attrs.disabled"
67
@change="onChange"
78
>
89
<el-radio

src/Controllers/AdminController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function edit($id, Content $content)
3434
{
3535

3636

37-
$content->body($this->form()->edit($id));
38-
return $this->isGetData() ? $this->form()->edit($id) : $content;
37+
$content->body($this->form(true)->edit($id));
38+
return $this->isGetData() ? $this->form(true)->edit($id) : $content;
3939
}
4040

4141

src/Controllers/AdminResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ interface AdminResource
88
{
99
public function grid();
1010

11-
public function form();
11+
public function form($isEdit = false);
1212

1313
}

src/Form.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class Form extends Component implements JsonSerializable
7272
*/
7373
public $editData = [];
7474

75+
protected $isEdit = false;
76+
7577

7678
protected $addRule = [];
7779
protected $addRuleMessage = [];
@@ -181,6 +183,16 @@ public function isMode($mode): bool
181183
return $this->mode === $mode;
182184
}
183185

186+
/**
187+
* @return bool
188+
*/
189+
public function isEdit(): bool
190+
{
191+
return $this->isEdit;
192+
}
193+
194+
195+
184196
public function setResourceId($id)
185197
{
186198
$this->id = $id;
@@ -272,7 +284,6 @@ protected function validatorData($data)
272284
}
273285

274286

275-
276287
public function input($key, $value = null)
277288
{
278289
if (is_null($value)) {
@@ -414,6 +425,7 @@ public function store()
414425
*/
415426
public function edit($id)
416427
{
428+
$this->isEdit = true;
417429

418430
$this->setMode(self::MODE_EDIT);
419431

@@ -665,6 +677,9 @@ private function updateRelation($relationsData)
665677
*/
666678
public function editData($id)
667679
{
680+
681+
$this->isEdit = true;
682+
668683
if (($result = $this->callEditing($id)) instanceof Response) {
669684
return $result;
670685
}

src/Form/FormAttrs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class FormAttrs
1111
public $rules;
1212
public $inline = false;
1313
public $labelPosition = 'right';
14-
public $labelWidth = "120px";
14+
public $labelWidth = "200px";
1515
public $labelSuffix = "";
1616
public $hideRequiredAsterisk = false;
1717
public $showMessage = true;

src/Form/FormItem.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,11 @@ public function required(bool $required = true)
334334
$this->required = $required;
335335
if (!$this->serveRules) {
336336
$this->serveRules('required');
337+
$this->serveRulesMessage(['required' => '请填写' . $this->label]);
337338
}
338339
if (!$this->rules) {
339340
$this->rules([
340-
['required' => true]
341+
['required' => true, "message" => "请填写" . $this->label]
341342
]);
342343
}
343344

0 commit comments

Comments
 (0)