查看富文本编辑

fat
祝言孟 9 months ago
parent 812c0086a9
commit d578496e52
  1. 41
      src/views/content/richText/modules/ViewForm.vue

@ -5,27 +5,18 @@
:visible="visible"
:confirmLoading="confirmLoading"
:maskClosable="false"
@ok="handleSubmit"
@cancel="handleCancel"
:footer="null"
>
<div class="content">
<p v-html="record.content" class="recordContent"></p>
<p v-html="record.content" class="recordContent" v-decorator="['content']"></p>
</div>
<div class="kong"></div>
<!-- <a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="协议内容" :labelCol="labelCol" :wrapperCol="wrapperCol">
<p v-html="record.content"></p>
</a-form-item>
</a-form>
</a-spin> -->
</a-modal>
</template>
<script>
import pick from 'lodash.pick'
import * as Api from '@/api/content/richText'
import { SelectRegion } from '@/components'
export default {
@ -54,7 +45,6 @@ export default {
//
edit (record) {
console.log(record)
//
this.visible = true
//
@ -71,36 +61,10 @@ export default {
})
},
//
handleSubmit (e) {
e.preventDefault()
//
const { form: { validateFields } } = this
validateFields((errors, values) => {
// api
!errors && this.onFormSubmit(values)
})
},
//
handleCancel () {
this.visible = false
this.form.resetFields()
},
// api
onFormSubmit (values) {
this.confirmLoading = true
Api.edit({ agreementId: this.record.id, form: values })
.then(result => {
//
this.$message.success(result.message, 1.5)
//
this.handleCancel()
//
this.$emit('handleSubmit', values)
})
.finally(() => this.confirmLoading = false)
}
}
@ -108,9 +72,6 @@ export default {
</script>
<style lang="less" scoped>
.ant-modal-body{
// margin-bottom: 20px;
}
.content {
min-height: 400px;
overflow: auto;

Loading…
Cancel
Save