Skip to content

Commit f5b64c6

Browse files
committed
更新 TimePicker 组件
1 parent 65a6bd0 commit f5b64c6

File tree

5 files changed

+41417
-11
lines changed

5 files changed

+41417
-11
lines changed

public/app.js

Lines changed: 41409 additions & 1 deletion
Large diffs are not rendered by default.

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=5f7d23d3c659492560b2",
2+
"/app.js": "/app.js?id=ba2dae2a5507cab7b802",
33
"/manifest.js": "/manifest.js?id=d9708e48a6c10ccee4bb",
44
"/vendor.js": "/vendor.js?id=736997e66e11f6db997a"
55
}

resources/js/components/form/BaseForm.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<div class="form-page">
33
<el-card shadow="never" class="form-card" v-loading="loading">
44
<el-form
5-
65
v-if="formData"
76
ref="ruleForm"
87
:model="formData"
@@ -125,7 +124,7 @@ export default {
125124
};
126125
},
127126
mounted() {
128-
this.formData = this.attrs.defaultValues;
127+
this.formData = this._.cloneDeep(this.attrs.defaultValues);
129128
this.isEdit && this.getEditData();
130129
},
131130
methods: {
@@ -159,7 +158,10 @@ export default {
159158
this.$http
160159
.put(this.attrs.action, this.formData)
161160
.then(({ data, code, message }) => {
162-
code == 200 && this.$router.go(-1);
161+
if (code == 200) {
162+
this.formData = this._.cloneDeep(this.attrs.defaultValues);
163+
this.$router.go(-1);
164+
}
163165
})
164166
.finally(() => {
165167
this.loading = false;

src/Components/TimePicker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class TimePicker extends Component
1717
protected $startPlaceholder;
1818
protected $endPlaceholder;
1919
protected $isRange = false;
20-
protected $arrowControl = true;
20+
protected $arrowControl = false;
2121
protected $align = "left";
2222
protected $popperClass;
2323
protected $pickerOptions;
2424
protected $rangeSeparator = '-';
25-
protected $valueFormat;
25+
protected $valueFormat = "HH:mm:ss";
2626
protected $defaultValue;
2727
protected $name;
2828
protected $prefixIcon;

src/Controllers/AdminController.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@ public function index(Content $content)
2424

2525
public function create(Content $content)
2626
{
27-
28-
2927
$content->body($this->form())->className("m-10");
3028
return $this->isGetData() ? $this->form() : $content;
3129
}
3230

3331
public function edit($id, Content $content)
3432
{
35-
36-
3733
$content->body($this->form(true)->edit($id))->className("m-10");
3834
return $this->isGetData() ? $this->form(true)->edit($id) : $content;
3935
}

0 commit comments

Comments
 (0)