fix: 文章更新保存前判断修正
This commit is contained in:
parent
f66fc76c01
commit
d4ceb97260
|
|
@ -97,8 +97,8 @@ export default OakComponent({
|
|||
async check() {
|
||||
if (this.state.name &&
|
||||
this.state.name.length > 0 &&
|
||||
this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>') {
|
||||
const id = this.getId();
|
||||
await this.execute(undefined, {
|
||||
|
|
@ -116,8 +116,8 @@ export default OakComponent({
|
|||
type: 'warning',
|
||||
});
|
||||
}
|
||||
else if (this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
else if (this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>') {
|
||||
this.setMessage({
|
||||
content: this.t('check.no name'),
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ export default OakComponent({
|
|||
async check() {
|
||||
if (this.state.name &&
|
||||
this.state.name.length > 0 &&
|
||||
this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>') {
|
||||
await this.execute();
|
||||
if (this.props.changeIsEdit) {
|
||||
|
|
@ -105,8 +105,8 @@ export default OakComponent({
|
|||
type: 'warning',
|
||||
});
|
||||
}
|
||||
else if (this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
else if (this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>') {
|
||||
this.setMessage({
|
||||
content: '请填写文章标题!',
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ export default OakComponent({
|
|||
if (
|
||||
this.state.name &&
|
||||
this.state.name.length > 0 &&
|
||||
this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>'
|
||||
) {
|
||||
const id = this.getId()!;
|
||||
|
|
@ -126,8 +126,8 @@ export default OakComponent({
|
|||
type: 'warning',
|
||||
});
|
||||
} else if (
|
||||
this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>'
|
||||
) {
|
||||
this.setMessage({
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ export default OakComponent({
|
|||
if (
|
||||
this.state.name &&
|
||||
this.state.name.length > 0 &&
|
||||
this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>'
|
||||
) {
|
||||
await this.execute();
|
||||
|
|
@ -114,8 +114,8 @@ export default OakComponent({
|
|||
type: 'warning',
|
||||
});
|
||||
} else if (
|
||||
this.state.content &&
|
||||
this.state.content.length > 0 &&
|
||||
this.state.html &&
|
||||
this.state.html.length > 0 &&
|
||||
this.state.html !== '<p><br></p>'
|
||||
) {
|
||||
this.setMessage({
|
||||
|
|
|
|||
Loading…
Reference in New Issue