1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 13:39:48 +08:00

#141 Add text long editor to Markdown. (#160)

This commit is contained in:
EdwinBetanc0urt 2019-11-20 17:49:37 -04:00 committed by Yamel Senih
parent 4a4872e11e
commit dafa8c56c6
6 changed files with 10 additions and 14 deletions

View File

@ -11,7 +11,6 @@
:precision="precision" :precision="precision"
controls-position="right" controls-position="right"
:class="'display-type-' + cssClass" :class="'display-type-' + cssClass"
@blur="validateInput"
@change="preHandleChange" @change="preHandleChange"
/> />
</template> </template>
@ -22,12 +21,6 @@ import { fieldMixin } from '@/components/ADempiere/Field/FieldMixin'
export default { export default {
name: 'FieldNumber', name: 'FieldNumber',
mixins: [fieldMixin], mixins: [fieldMixin],
props: {
validateInput: {
type: Function,
default: () => undefined
}
},
data() { data() {
return { return {
pattern: undefined, pattern: undefined,

View File

@ -43,7 +43,7 @@ export default {
typeTextBox() { typeTextBox() {
// String, Url, FileName... // String, Url, FileName...
var typeInput = 'text' var typeInput = 'text'
if (['Memo', 'Text', 'TextLong'].includes(this.metadata.referenceType)) { if (['Memo', 'Text'].includes(this.metadata.referenceType)) {
typeInput = 'textarea' typeInput = 'textarea'
} }
if (this.metadata.isEncrypted) { if (this.metadata.isEncrypted) {

View File

@ -81,13 +81,13 @@ export const FIELD_DISPLAY_SIZES = [
} }
}, },
{ {
type: 'FieldTextArea', type: 'FieldTextLong',
size: { size: {
xs: 24, xs: 24,
sm: 12, sm: 24,
md: 8, md: 24,
lg: 6, lg: 24,
xl: 6 xl: 24
} }
}, },
{ {

View File

@ -162,6 +162,9 @@ export default {
} }
if (this.panelType === 'window') { if (this.panelType === 'window') {
if (this.field.componentPath === 'FieldTextLong') {
return sizeField
}
// two columns if is mobile or desktop and show record navigation // two columns if is mobile or desktop and show record navigation
if (this.getWidth <= 768 || (this.getWidth >= 768 && this.getterIsShowedRecordNavigation)) { if (this.getWidth <= 768 || (this.getWidth >= 768 && this.getterIsShowedRecordNavigation)) {
newSizes.xs = 12 newSizes.xs = 12

View File

@ -206,7 +206,7 @@ const REFERENCES = [
}, },
{ {
id: 36, id: 36,
type: 'FieldText', type: 'FieldTextLong',
support: true, support: true,
description: 'Text (Long) - Text > 2000 characters', description: 'Text (Long) - Text > 2000 characters',
alias: ['TextLong', 'Text Long'] alias: ['TextLong', 'Text Long']