test
This commit is contained in:
parent
7f0964c627
commit
7925080ea2
|
|
@ -113,11 +113,6 @@ const disabled = computed(() => {
|
|||
});
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
console.log(111)
|
||||
}
|
||||
});
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
|
|
@ -134,6 +129,11 @@ function edit(record) {
|
|||
resetFields();
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
if (formData.id) {
|
||||
getContent()
|
||||
}else{
|
||||
articleContent.value = ''
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -161,6 +161,7 @@ async function submitForm() {
|
|||
}
|
||||
}
|
||||
}
|
||||
model.content = articleContent.value
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
|
@ -175,25 +176,22 @@ async function submitForm() {
|
|||
});
|
||||
}
|
||||
|
||||
getContent()
|
||||
|
||||
onMounted(() => {
|
||||
console.log(`the component is now mounted.`)
|
||||
})
|
||||
function getContent() {
|
||||
let params = {id: formData.id}
|
||||
defHttp.get<Object>({url: '/yx/yxArticle/queryById', params}).then((res) => {
|
||||
defHttp.get({url: '/yx/yxArticle/queryById', params})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
if (Array.isArray(res)) {
|
||||
resolve(res);
|
||||
} else {
|
||||
resolve(res['menu']);
|
||||
}
|
||||
articleContent.value = res.content
|
||||
});
|
||||
console.log('11')
|
||||
}
|
||||
|
||||
const articleContent = ref('hello world!');
|
||||
const articleContent = ref('');
|
||||
|
||||
function handleTinymceChange(value: string) {
|
||||
formData.ArticleContent = value
|
||||
formData.articleContent = value
|
||||
console.log(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue