parent
8f77a60bb2
commit
8c0703d20b
|
@ -8,10 +8,11 @@
|
||||||
### 立即体验
|
### 立即体验
|
||||||
[在线Demo](http://120.92.142.115/)
|
[在线Demo](http://120.92.142.115/)
|
||||||
|
|
||||||
|
|
||||||
### 立即体验VForm Pro高级版(提供商业支持)
|
### 立即体验VForm Pro高级版(提供商业支持)
|
||||||
[Pro Demo](https://vform666.com/pages/pro/)
|
[Pro Demo](https://vform666.com/pages/pro/)
|
||||||
|
|
||||||
|
### 视频教程集合:
|
||||||
|
[B站观看](https://space.bilibili.com/626932375)
|
||||||
|
|
||||||
### Vue 3正式版已发布
|
### Vue 3正式版已发布
|
||||||
[立即进入](https://gitee.com/vdpadmin/variant-form3-vite)
|
[立即进入](https://gitee.com/vdpadmin/variant-form3-vite)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<td class="table-cell" :class="[selected ? 'selected' : '', customClass]"
|
<td class="table-cell" :class="[selected ? 'selected' : '', customClass]"
|
||||||
:style="{width: widget.options.cellWidth + '!important' || '', height: widget.options.cellHeight + '!important' || ''}"
|
:style="{width: widget.options.cellWidth + '!important' || '', height: widget.options.cellHeight + '!important' || '', 'word-break': !!widget.options.wordBreak ? 'break-all' : 'normal'}"
|
||||||
:colspan="widget.options.colspan || 1" :rowspan="widget.options.rowspan || 1"
|
:colspan="widget.options.colspan || 1" :rowspan="widget.options.rowspan || 1"
|
||||||
@click.stop="selectWidget(widget)">
|
@click.stop="selectWidget(widget)">
|
||||||
<draggable :list="widget.widgetList" class="draggable-div" v-bind="{group:'dragGroup', ghostClass: 'ghost',animation: 200}"
|
<draggable :list="widget.widgetList" class="draggable-div" v-bind="{group:'dragGroup', ghostClass: 'ghost',animation: 200}"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
:automatic-dropdown="field.options.automaticDropdown"
|
:automatic-dropdown="field.options.automaticDropdown"
|
||||||
:multiple="field.options.multiple" :multiple-limit="field.options.multipleLimit"
|
:multiple="field.options.multiple" :multiple-limit="field.options.multipleLimit"
|
||||||
:placeholder="field.options.placeholder || i18nt('render.hint.selectPlaceholder')"
|
:placeholder="field.options.placeholder || i18nt('render.hint.selectPlaceholder')"
|
||||||
:remote="field.options.remote" :remote-method="remoteQuery"
|
:remote="field.options.remote" :remote-method="remoteMethod"
|
||||||
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
|
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
|
||||||
@change="handleChangeEvent">
|
@change="handleChangeEvent">
|
||||||
<el-option v-for="item in field.options.optionItems" :key="item.value" :label="item.label"
|
<el-option v-for="item in field.options.optionItems" :key="item.value" :label="item.label"
|
||||||
|
@ -74,6 +74,14 @@
|
||||||
return (!!this.field.options.filterable && !!this.field.options.allowCreate)
|
return (!!this.field.options.filterable && !!this.field.options.allowCreate)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
remoteMethod() {
|
||||||
|
if (!!this.field.options.remote && !!this.field.options.onRemoteQuery) {
|
||||||
|
return this.remoteQuery
|
||||||
|
} else {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
/* 这里不能访问方法和属性!! */
|
/* 这里不能访问方法和属性!! */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
||||||
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
||||||
<div ref="fieldEditor" :style="!!field.options.fontSize ? `font-size: ${field.options.fontSize};`: ''">
|
<div ref="fieldEditor" :style="!!field.options.fontSize ? `font-size: ${field.options.fontSize};`: ''">
|
||||||
{{field.options.textContent}}</div>
|
<pre :style="{'white-space': !!field.options.preWrap ? 'pre-wrap' : 'pre', 'text-align': !!field.options.textAlign ? field.options.textAlign : 'left'}">{{field.options.textContent}}</pre></div>
|
||||||
</static-content-wrapper>
|
</static-content-wrapper>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<template>
|
||||||
|
<el-form-item :label="i18nt('designer.setting.wordBreak')">
|
||||||
|
<el-switch v-model="optionModel.wordBreak"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import i18n from "@/utils/i18n"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "table-cell-wordBreak-editor",
|
||||||
|
mixins: [i18n],
|
||||||
|
props: {
|
||||||
|
designer: Object,
|
||||||
|
selectedWidget: Object,
|
||||||
|
optionModel: Object,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<template>
|
||||||
|
<el-form-item :label="i18nt('designer.setting.preWrap')">
|
||||||
|
<el-switch v-model="optionModel.preWrap"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import i18n from "@/utils/i18n"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "static-text-preWrap-editor",
|
||||||
|
mixins: [i18n],
|
||||||
|
props: {
|
||||||
|
designer: Object,
|
||||||
|
selectedWidget: Object,
|
||||||
|
optionModel: Object,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form-item :label="i18nt('designer.setting.textContent')">
|
<el-form-item :label="i18nt('designer.setting.textContent')">
|
||||||
<el-input v-model="optionModel.textContent"></el-input>
|
<el-input v-model="optionModel.textContent" type="textarea" :rows="3"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<template>
|
||||||
|
<el-form-item :label="i18nt('designer.setting.textAlign')" v-if="(selectedWidget.type === 'static-text')">
|
||||||
|
<el-radio-group v-model="optionModel.textAlign" class="radio-group-custom">
|
||||||
|
<el-radio-button label="left">
|
||||||
|
{{i18nt('designer.setting.leftAlign')}}</el-radio-button>
|
||||||
|
<el-radio-button label="center">
|
||||||
|
{{i18nt('designer.setting.centerAlign')}}</el-radio-button>
|
||||||
|
<el-radio-button label="right">
|
||||||
|
{{i18nt('designer.setting.rightAlign')}}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import i18n from "@/utils/i18n"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "textAlign-editor",
|
||||||
|
mixins: [i18n],
|
||||||
|
props: {
|
||||||
|
designer: Object,
|
||||||
|
selectedWidget: Object,
|
||||||
|
optionModel: Object,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.radio-group-custom {
|
||||||
|
::v-deep .el-radio-button__inner {
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -33,7 +33,9 @@ const COMMON_PROPERTIES = {
|
||||||
'editable' : 'editable-editor',
|
'editable' : 'editable-editor',
|
||||||
'showPassword' : 'showPassword-editor',
|
'showPassword' : 'showPassword-editor',
|
||||||
'textContent' : 'textContent-editor',
|
'textContent' : 'textContent-editor',
|
||||||
|
'textAlign' : 'textAlign-editor',
|
||||||
'fontSize' : 'fontSize-editor',
|
'fontSize' : 'fontSize-editor',
|
||||||
|
'preWrap' : 'preWrap-editor',
|
||||||
'htmlContent' : 'htmlContent-editor',
|
'htmlContent' : 'htmlContent-editor',
|
||||||
'format' : 'format-editor',
|
'format' : 'format-editor',
|
||||||
'valueFormat' : 'valueFormat-editor',
|
'valueFormat' : 'valueFormat-editor',
|
||||||
|
@ -62,6 +64,7 @@ const COMMON_PROPERTIES = {
|
||||||
'cellWidth' : 'cellWidth-editor',
|
'cellWidth' : 'cellWidth-editor',
|
||||||
'cellHeight' : 'cellHeight-editor',
|
'cellHeight' : 'cellHeight-editor',
|
||||||
'colHeight' : 'colHeight-editor',
|
'colHeight' : 'colHeight-editor',
|
||||||
|
'wordBreak' : 'wordBreak-editor',
|
||||||
'gutter' : 'gutter-editor',
|
'gutter' : 'gutter-editor',
|
||||||
'responsive' : 'responsive-editor',
|
'responsive' : 'responsive-editor',
|
||||||
'span' : 'span-editor',
|
'span' : 'span-editor',
|
||||||
|
|
|
@ -73,6 +73,7 @@ export const containers = [
|
||||||
cellHeight: '',
|
cellHeight: '',
|
||||||
colspan: 1,
|
colspan: 1,
|
||||||
rowspan: 1,
|
rowspan: 1,
|
||||||
|
wordBreak: false, //是否自动换行
|
||||||
customClass: '', //自定义css类名
|
customClass: '', //自定义css类名
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -665,7 +666,9 @@ export const basicFields = [
|
||||||
columnWidth: '200px',
|
columnWidth: '200px',
|
||||||
hidden: false,
|
hidden: false,
|
||||||
textContent: 'static text',
|
textContent: 'static text',
|
||||||
|
textAlign: 'left',
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
|
preWrap: false, //是否自动换行
|
||||||
//-------------------
|
//-------------------
|
||||||
customClass: '', //自定义css类名
|
customClass: '', //自定义css类名
|
||||||
//-------------------
|
//-------------------
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<td class="table-cell" :class="[customClass]"
|
<td class="table-cell" :class="[customClass]"
|
||||||
:colspan="widget.options.colspan || 1" :rowspan="widget.options.rowspan || 1"
|
:colspan="widget.options.colspan || 1" :rowspan="widget.options.rowspan || 1"
|
||||||
:style="{width: widget.options.cellWidth + ' !important' || '', height: widget.options.cellHeight + ' !important' || ''}">
|
:style="{width: widget.options.cellWidth + ' !important' || '', height: widget.options.cellHeight + ' !important' || '', 'word-break': !!widget.options.wordBreak ? 'break-all' : 'normal'}">
|
||||||
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
<template v-for="(subWidget, swIdx) in widget.widgetList">
|
||||||
<template v-if="'container' === subWidget.category">
|
<template v-if="'container' === subWidget.category">
|
||||||
<component :is="getComponentByContainer(subWidget)" :widget="subWidget" :key="swIdx" :parent-list="widget.widgetList"
|
<component :is="getComponentByContainer(subWidget)" :widget="subWidget" :key="swIdx" :parent-list="widget.widgetList"
|
||||||
|
|
|
@ -178,6 +178,7 @@ export default {
|
||||||
widgetColumnWidth: 'Width',
|
widgetColumnWidth: 'Width',
|
||||||
widgetSize: 'Size',
|
widgetSize: 'Size',
|
||||||
fontSize: 'Font Size',
|
fontSize: 'Font Size',
|
||||||
|
textAlign: 'Text Align',
|
||||||
showStops: 'Show Stops',
|
showStops: 'Show Stops',
|
||||||
displayStyle: 'Display Style',
|
displayStyle: 'Display Style',
|
||||||
inlineLayout: 'inline',
|
inlineLayout: 'inline',
|
||||||
|
@ -196,6 +197,7 @@ export default {
|
||||||
disabled: 'Disabled',
|
disabled: 'Disabled',
|
||||||
hidden: 'Hidden',
|
hidden: 'Hidden',
|
||||||
textContent: 'Text',
|
textContent: 'Text',
|
||||||
|
preWrap: 'Line Wrap',
|
||||||
htmlContent: 'HTML',
|
htmlContent: 'HTML',
|
||||||
clearable: 'Clearable',
|
clearable: 'Clearable',
|
||||||
editable: 'Editable',
|
editable: 'Editable',
|
||||||
|
@ -233,6 +235,7 @@ export default {
|
||||||
|
|
||||||
cellWidth: 'Width',
|
cellWidth: 'Width',
|
||||||
cellHeight: 'Height',
|
cellHeight: 'Height',
|
||||||
|
wordBreak: 'Line Wrap',
|
||||||
gridColHeight: 'Height Of Col(px)',
|
gridColHeight: 'Height Of Col(px)',
|
||||||
gutter: 'Gutter(px)',
|
gutter: 'Gutter(px)',
|
||||||
columnSetting: 'Cols Setting',
|
columnSetting: 'Cols Setting',
|
||||||
|
|
|
@ -178,6 +178,7 @@ export default {
|
||||||
widgetColumnWidth: '组件列宽',
|
widgetColumnWidth: '组件列宽',
|
||||||
widgetSize: '组件大小',
|
widgetSize: '组件大小',
|
||||||
fontSize: '字体大小',
|
fontSize: '字体大小',
|
||||||
|
textAlign: '文字对齐',
|
||||||
showStops: '显示间断点',
|
showStops: '显示间断点',
|
||||||
displayStyle: '显示样式',
|
displayStyle: '显示样式',
|
||||||
inlineLayout: '行内',
|
inlineLayout: '行内',
|
||||||
|
@ -196,6 +197,7 @@ export default {
|
||||||
disabled: '禁用',
|
disabled: '禁用',
|
||||||
hidden: '隐藏',
|
hidden: '隐藏',
|
||||||
textContent: '静态文字',
|
textContent: '静态文字',
|
||||||
|
preWrap: '自动换行',
|
||||||
htmlContent: 'HTML',
|
htmlContent: 'HTML',
|
||||||
clearable: '可清除',
|
clearable: '可清除',
|
||||||
editable: '可输入',
|
editable: '可输入',
|
||||||
|
@ -233,6 +235,7 @@ export default {
|
||||||
|
|
||||||
cellWidth: '宽度',
|
cellWidth: '宽度',
|
||||||
cellHeight: '高度',
|
cellHeight: '高度',
|
||||||
|
wordBreak: '文字自动换行',
|
||||||
gridColHeight: '栅格列统一高度(px)',
|
gridColHeight: '栅格列统一高度(px)',
|
||||||
gutter: '栅格间隔(px)',
|
gutter: '栅格间隔(px)',
|
||||||
columnSetting: '栅格属性设置',
|
columnSetting: '栅格属性设置',
|
||||||
|
|
Loading…
Reference in New Issue