|
|
@ -53,7 +53,7 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="是否启用" prop="is_enabled" required>
|
|
|
|
<el-form-item label="是否启用" prop="is_enabled">
|
|
|
|
<el-switch v-model="formData.is_enabled" />
|
|
|
|
<el-switch v-model="formData.is_enabled" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -66,6 +66,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import { throttle } from '@/utils/index'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'UserForm',
|
|
|
|
name: 'UserForm',
|
|
|
|
components: {},
|
|
|
|
components: {},
|
|
|
@ -138,12 +139,13 @@ export default {
|
|
|
|
created() {},
|
|
|
|
created() {},
|
|
|
|
mounted() {},
|
|
|
|
mounted() {},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
submitForm() {
|
|
|
|
submitForm: throttle(function() {
|
|
|
|
this.$refs['elForm'].validate(valid => {
|
|
|
|
this.$refs['elForm'].validate(valid => {
|
|
|
|
if (!valid) return
|
|
|
|
if (!valid) return
|
|
|
|
this.$emit('handlesubmit', this.formData)
|
|
|
|
this.$emit('handlesubmit', this.formData)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}, 2000),
|
|
|
|
|
|
|
|
|
|
|
|
resetForm() {
|
|
|
|
resetForm() {
|
|
|
|
this.$refs['elForm'].resetFields()
|
|
|
|
this.$refs['elForm'].resetFields()
|
|
|
|
},
|
|
|
|
},
|
|
|
|