|
|
|
@ -1,16 +1,32 @@ |
|
|
|
<template> |
|
|
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
|
|
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
|
|
|
<el-form-item label="标签名" prop="tagName"> |
|
|
|
<el-input v-model="dataForm.tagName" placeholder="标签名"></el-input> |
|
|
|
<el-dialog :visible.sync="visible" |
|
|
|
:title="!dataForm.id ? $t('add') : $t('update')" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false"> |
|
|
|
<el-form :model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
ref="dataForm" |
|
|
|
@keyup.enter.native="dataFormSubmitHandle()" |
|
|
|
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
|
|
|
<el-form-item label="标签名" |
|
|
|
prop="tagName"> |
|
|
|
<el-input v-model="dataForm.tagName" |
|
|
|
maxlength="20" |
|
|
|
show-word-limit |
|
|
|
placeholder="标签名"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="标签描述" prop="tagDesc"> |
|
|
|
<el-input v-model="dataForm.tagDesc" placeholder="标签描述"></el-input> |
|
|
|
<el-form-item label="标签描述" |
|
|
|
prop="tagDesc"> |
|
|
|
<el-input v-model="dataForm.tagDesc" |
|
|
|
maxlength="100" |
|
|
|
show-word-limit |
|
|
|
placeholder="标签描述"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|
|
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
@click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
|
@ -60,7 +76,7 @@ export default { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
@ -81,7 +97,7 @@ export default { |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}) |
|
|
|
}, 1000, { 'leading': true, 'trailing': false }) |
|
|
|
} |
|
|
|
|