Skip to content

Commit

Permalink
更新 TimePicker 组件
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallRuralDog committed Mar 18, 2020
1 parent 65a6bd0 commit f5b64c6
Show file tree
Hide file tree
Showing 5 changed files with 41,417 additions and 11 deletions.
41,410 changes: 41,409 additions & 1 deletion public/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/app.js": "/app.js?id=5f7d23d3c659492560b2",
"/app.js": "/app.js?id=ba2dae2a5507cab7b802",
"/manifest.js": "/manifest.js?id=d9708e48a6c10ccee4bb",
"/vendor.js": "/vendor.js?id=736997e66e11f6db997a"
}
8 changes: 5 additions & 3 deletions resources/js/components/form/BaseForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<div class="form-page">
<el-card shadow="never" class="form-card" v-loading="loading">
<el-form

v-if="formData"
ref="ruleForm"
:model="formData"
Expand Down Expand Up @@ -125,7 +124,7 @@ export default {
};
},
mounted() {
this.formData = this.attrs.defaultValues;
this.formData = this._.cloneDeep(this.attrs.defaultValues);
this.isEdit && this.getEditData();
},
methods: {
Expand Down Expand Up @@ -159,7 +158,10 @@ export default {
this.$http
.put(this.attrs.action, this.formData)
.then(({ data, code, message }) => {
code == 200 && this.$router.go(-1);
if (code == 200) {
this.formData = this._.cloneDeep(this.attrs.defaultValues);
this.$router.go(-1);
}
})
.finally(() => {
this.loading = false;
Expand Down
4 changes: 2 additions & 2 deletions src/Components/TimePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class TimePicker extends Component
protected $startPlaceholder;
protected $endPlaceholder;
protected $isRange = false;
protected $arrowControl = true;
protected $arrowControl = false;
protected $align = "left";
protected $popperClass;
protected $pickerOptions;
protected $rangeSeparator = '-';
protected $valueFormat;
protected $valueFormat = "HH:mm:ss";
protected $defaultValue;
protected $name;
protected $prefixIcon;
Expand Down
4 changes: 0 additions & 4 deletions src/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ public function index(Content $content)

public function create(Content $content)
{


$content->body($this->form())->className("m-10");
return $this->isGetData() ? $this->form() : $content;
}

public function edit($id, Content $content)
{


$content->body($this->form(true)->edit($id))->className("m-10");
return $this->isGetData() ? $this->form(true)->edit($id) : $content;
}
Expand Down

0 comments on commit f5b64c6

Please sign in to comment.