<template>
<d2-container class="computer-detail" >
<div slot="header">
</div>
<div class="detail" >
<el-form :inline="false" label-position="right" label-width="auto" class="form-data">
<el-descriptions class="margin-top" title="" :column="3" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
计算机名称
</template>
{{name}}
</el-descriptions-item>
<el-descriptions-item label="内容">
<d2p-wang-editor v-model="congent" :config="{zIndex:100}"></d2p-wang-editor></el-descriptions-item>
</el-descriptions>
</el-form>
</div>
</d2-container>
</template>
<script>
import { request } from '@/api/service'
export default {
name: 'detail',
props: {
},
watch: {
},
data () {
return {
content:'',
}
},
created () {
this._getDetail()
},
methods: {
_getDetail (Detail) {
var that = this
var id = that.$route.params && that.$route.params.id
console.log(id)
const url = '/api/content/'
return request({
url: url + id,
method: 'get'
}).then(res => {
Detail = res.data
this.name = Detail.name
this.content = Detail.content
})
}
}
}
</script>
新建的自定义页面,wang-editor编辑器却无法获取内容。
API已经拿到数据了。其他字段都可以显示,只有wang-editor无法显示
细心点,你变量名写错了
修改了,还是无法显示的。其他内容都显示,编辑器还是空白