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

update:调整编辑器

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