roose пре 3 година
родитељ
комит
680245b3eb
2 измењених фајлова са 9 додато и 7 уклоњено
  1. 5 5
      src/components/myform/MyForm.vue
  2. 4 2
      src/pages/login/index.vue

+ 5 - 5
src/components/myform/MyForm.vue

@@ -77,7 +77,7 @@
             v-if="item.type === 'DateTime'"
             type="date"
             v-model="formValue[item.prop]"
-             value-format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
             :disabled="item.disable"
           ></el-date-picker>
 
@@ -90,9 +90,9 @@
           </quill-editor>
         </el-form-item>
       </template>
-      <slot name="handle" :formData="formValue">
-        <!-- <el-button type="primary" @click="submitForm">提交</el-button> -->
-      </slot>
+      <el-form-item>
+        <slot name="handle" :formData="formValue"> </slot>
+      </el-form-item>
     </el-form>
   </div>
 </template>
@@ -161,7 +161,7 @@ export default {
         }
       });
     },
-    disable(data){
+    disable(data) {
       console.log(data);
     },
   },

+ 4 - 2
src/pages/login/index.vue

@@ -11,7 +11,7 @@
         ref="myForm"
       >
         <template slot="handle" slot-scope="scope">
-          <el-button type="primary" @click="login(scope.formData)"
+          <el-button round type="primary" @click="login(scope.formData)"
             >登录</el-button
           >
         </template>
@@ -100,6 +100,8 @@ export default {
 ::v-deep .el-button {
   font-size: 10px;
   float: right;
-  margin-right: 50px;
+  margin-right: 35px;
+  width: 280px;
+ 
 }
 </style>