提交 96aecdbc 编写于 作者: zhujiamin's avatar zhujiamin

update:调整编辑器

上级 67325e68
......@@ -6,9 +6,6 @@
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
......
......@@ -6,8 +6,8 @@
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.maxValue}}
:max="{{item.psEditor.maxValue}}"
{{#if item.psEditor.editorParams.maxValue}}
:max="{{item.psEditor.editorParams.maxValue}}"
{{/if}}
{{#if item.psEditor.editorParams.allowHalf}}
:allowHalf="{{item.psEditor.editorParams.allowHalf}}"
......
......@@ -7,14 +7,14 @@
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.stepValue}}
:step="{{item.psEditor.stepValue}}"
{{#if item.psEditor.editorParams.stepValue}}
:step="{{item.psEditor.editorParams.stepValue}}"
{{/if}}
{{#if item.psEditor.minValue}}
:min="{{item.psEditor.minValue}}"
{{#if item.psEditor.editorParams.minValue}}
:min="{{item.psEditor.editorParams.minValue}}"
{{/if}}
{{#if item.psEditor.maxValue}}
:max="{{item.psEditor.maxValue}}"
{{#if item.psEditor.editorParams.maxValue}}
:max="{{item.psEditor.editorParams.maxValue}}"
{{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
......
......@@ -20,8 +20,8 @@
{{else if (item.psAppDEField.valueFormat)}}
valueFormat="{{item.psAppDEField.valueFormat}}"
{{/if}}
{{#if item.psEditor.precision}}
:precision="{{item.psEditor.precision}}"
{{#if item.psEditor.editorParams.precision}}
:precision="{{item.psEditor.editorParams.precision}}"
{{/if}}
{{#if item.psEditor.psNavigateContexts}}
:localContext="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateContexts}}"
......
......@@ -6,17 +6,17 @@
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.precision}}
:precision="{{item.psEditor.precision}}"
{{#if item.psEditor.editorParams.precision}}
:precision="{{item.psEditor.editorParams.precision}}"
{{/if}}
{{#if item.psEditor.stepValue}}
:step="{{item.psEditor.stepValue}}"
{{#if item.psEditor.editorParams.stepValue}}
:step="{{item.psEditor.editorParams.stepValue}}"
{{/if}}
{{#if item.psEditor.minValue}}
:min="{{item.psEditor.minValue}}"
{{#if item.psEditor.editorParams.minValue}}
:min="{{item.psEditor.editorParams.minValue}}"
{{/if}}
{{#if item.psEditor.maxValue}}
:max="{{item.psEditor.maxValue}}"
{{#if item.psEditor.editorParams.maxValue}}
:max="{{item.psEditor.editorParams.maxValue}}"
{{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
......
......@@ -63,7 +63,12 @@ const props = withDefaults(defineProps<InputProps>(), {
const emit = defineEmits<EditorEmit>()
const onChange = ($event: any) => {
const value = $event.target.value;
let value;
if (props.type == 'number') {
value = $event;
} else {
value = $event.target.value;
}
emit('editorEvent', { tag: props.name, action: "valueChange", data: value});
}
......@@ -93,15 +98,15 @@ const onChange = ($event: any) => {
:disabled="disabled"
:maxlength="maxLength"
@blur="onChange"
:placeholder="showMaxLength ? `最大内容长度为${maxLength}` : placeholder"/>
:placeholder="showMaxLength && maxLength ? `最大内容长度为${maxLength}` : placeholder"/>
<a-input
allowClear
v-else="Object.is('text', type)"
v-else-if="Object.is('text', type)"
v-model:value="value"
:disabled="disabled"
:maxlength="maxLength"
:type="type"
@blur="onChange"
:placeholder="showMaxLength ? `最大内容长度为${maxLength}` : placeholder" />
:placeholder="showMaxLength && maxLength ? `最大内容长度为${maxLength}` : placeholder" />
</div>
</template>
\ No newline at end of file
......@@ -31,3 +31,7 @@ body{
.ant-card-body {
padding: 0;
}
// 去除antd 表单项自带样式
.ant-form-horizontal .ant-form-item-control{
flex: 1;
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册