parent
9580057589
commit
2e632e7a96
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "variant-form",
|
"name": "variant-form",
|
||||||
"version": "2.2.3",
|
"version": "2.2.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve --open src/main.js",
|
"serve": "vue-cli-service serve --open src/main.js",
|
||||||
|
|
|
@ -97,6 +97,7 @@
|
||||||
addWindowResizeHandler,
|
addWindowResizeHandler,
|
||||||
} from "@/utils/util";
|
} from "@/utils/util";
|
||||||
import i18n from "@/utils/i18n";
|
import i18n from "@/utils/i18n";
|
||||||
|
import { propertyRegistered } from "@/components/form-designer/setting-panel/propertyRegister";
|
||||||
|
|
||||||
const {COMMON_PROPERTIES, ADVANCED_PROPERTIES, EVENT_PROPERTIES} = WidgetProperties
|
const {COMMON_PROPERTIES, ADVANCED_PROPERTIES, EVENT_PROPERTIES} = WidgetProperties
|
||||||
|
|
||||||
|
@ -222,6 +223,14 @@
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* alert组件注册了两个type属性编辑器,跳过第一个type属性编辑器,只显示第二个alert-type属性编辑器!! */
|
||||||
|
if (propName.indexOf('-') <= -1) {
|
||||||
|
let uniquePropName = this.selectedWidget.type + '-' + propName
|
||||||
|
if (propertyRegistered(uniquePropName)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let originalPropName = propName.replace(this.selectedWidget.type + '-', '') //去掉组件名称前缀-,如果有的话!!
|
let originalPropName = propName.replace(this.selectedWidget.type + '-', '') //去掉组件名称前缀-,如果有的话!!
|
||||||
return this.designer.hasConfig(this.selectedWidget, originalPropName)
|
return this.designer.hasConfig(this.selectedWidget, originalPropName)
|
||||||
},
|
},
|
||||||
|
|
|
@ -160,6 +160,14 @@ export function registerEventProperty(uniquePropName, propEditorName) {
|
||||||
EVENT_PROPERTIES[uniquePropName] = propEditorName
|
EVENT_PROPERTIES[uniquePropName] = propEditorName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断属性是否已注册
|
||||||
|
* @param uniquePropName 属性名称(保证名称唯一,不跟其他组件属性冲突)
|
||||||
|
*/
|
||||||
|
export function propertyRegistered(uniquePropName) {
|
||||||
|
return !!COMMON_PROPERTIES[uniquePropName] || !!ADVANCED_PROPERTIES[uniquePropName] || !!EVENT_PROPERTIES[uniquePropName]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册常见属性对应的属性编辑器
|
* 注册常见属性对应的属性编辑器
|
||||||
* @param uniquePropName
|
* @param uniquePropName
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<el-button type="primary" @click="setFormDisabled">{{i18nt('designer.hint.disableForm')}}</el-button>
|
<el-button type="primary" @click="setFormDisabled">{{i18nt('designer.hint.disableForm')}}</el-button>
|
||||||
<el-button type="primary" @click="setFormEnabled">{{i18nt('designer.hint.enableForm')}}</el-button>
|
<el-button type="primary" @click="setFormEnabled">{{i18nt('designer.hint.enableForm')}}</el-button>
|
||||||
<el-button type="" @click="showPreviewDialogFlag = false">{{i18nt('designer.hint.closePreview')}}</el-button>
|
<el-button type="" @click="showPreviewDialogFlag = false">{{i18nt('designer.hint.closePreview')}}</el-button>
|
||||||
<el-button @click="printFormJson">PrintFormJson</el-button>
|
<el-button v-if="false" @click="printFormJson">PrintFormJson</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ export const loadExtension = function () {
|
||||||
{label: 'info', value: 'info'},
|
{label: 'info', value: 'info'},
|
||||||
{label: 'error', value: 'error'},
|
{label: 'error', value: 'error'},
|
||||||
]
|
]
|
||||||
PERegister.registerCPEditor('type', 'alert-type-editor',
|
PERegister.registerCPEditor('alert-type', 'alert-type-editor',
|
||||||
PEFactory.createSelectEditor('type', 'extension.setting.alertType',
|
PEFactory.createSelectEditor('type', 'extension.setting.alertType',
|
||||||
{optionItems: typeOptions}))
|
{optionItems: typeOptions}))
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,14 @@
|
||||||
outline: 2px solid $--color-primary !important;
|
outline: 2px solid $--color-primary !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-container {
|
||||||
|
margin: 3px;
|
||||||
|
|
||||||
|
.form-widget-list {
|
||||||
|
min-height: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .el-card__header {
|
::v-deep .el-card__header {
|
||||||
padding: 10px 12px;
|
padding: 10px 12px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ export default {
|
||||||
eventSetting: '事件属性',
|
eventSetting: '事件属性',
|
||||||
uniqueName: '唯一名称',
|
uniqueName: '唯一名称',
|
||||||
editNameHelp: '修改名称后需按回车确认',
|
editNameHelp: '修改名称后需按回车确认',
|
||||||
label: '字段标签',
|
label: '标签',
|
||||||
displayType: '显示类型',
|
displayType: '显示类型',
|
||||||
defaultValue: '默认值',
|
defaultValue: '默认值',
|
||||||
placeholder: '占位内容',
|
placeholder: '占位内容',
|
||||||
|
@ -302,7 +302,7 @@ export default {
|
||||||
labelPosition: '字段标签位置',
|
labelPosition: '字段标签位置',
|
||||||
topPosition: '顶部',
|
topPosition: '顶部',
|
||||||
leftPosition: '左边',
|
leftPosition: '左边',
|
||||||
labelAlign: '字段标签对齐',
|
labelAlign: '标签对齐',
|
||||||
leftAlign: '居左',
|
leftAlign: '居左',
|
||||||
centerAlign: '居中',
|
centerAlign: '居中',
|
||||||
rightAlign: '居右',
|
rightAlign: '居右',
|
||||||
|
|
|
@ -54,6 +54,11 @@ $--color-primary: #409EFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-card {
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
input[type="password"]::-ms-reveal { /* 隐藏IE/Edge原生的密码查看按钮 */
|
input[type="password"]::-ms-reveal { /* 隐藏IE/Edge原生的密码查看按钮 */
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const DESIGNER_OPTIONS = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VARIANT_FORM_VERSION = '2.2.3'
|
export const VARIANT_FORM_VERSION = '2.2.4'
|
||||||
|
|
||||||
//export const MOCK_CASE_URL = 'https://www.fastmock.site/mock/2de212e0dc4b8e0885fea44ab9f2e1d0/vform/'
|
//export const MOCK_CASE_URL = 'https://www.fastmock.site/mock/2de212e0dc4b8e0885fea44ab9f2e1d0/vform/'
|
||||||
export const MOCK_CASE_URL = 'https://ks3-cn-beijing.ksyuncs.com/vform-static/vcase/'
|
export const MOCK_CASE_URL = 'https://ks3-cn-beijing.ksyuncs.com/vform-static/vcase/'
|
||||||
|
|
Loading…
Reference in New Issue