提交 9782cb6b 编写于 作者: RedPig97's avatar RedPig97

update: 更新

上级 bab2d04e
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
{{#if item.valueItemName}} {{#if item.valueItemName}}
valueItem="{{item.valueItemName}}" valueItem="{{item.valueItemName}}"
{{/if}} {{/if}}
{{#if item.psEditor.getPlaceHolder}} {{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}" placeholder="{{item.psEditor.placeHolder}}"
{{/if}} {{/if}}
:contextProp="state.context" :contextProp="state.context"
:viewParamsProp="state.viewParams" :viewParamsProp="state.viewParams"
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
{{#if item.valueItemName}} {{#if item.valueItemName}}
valueItem="{{item.valueItemName}}" valueItem="{{item.valueItemName}}"
{{/if}} {{/if}}
{{#if item.psEditor.getPlaceHolder}} {{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}" placeholder="{{item.psEditor.placeHolder}}"
{{/if}} {{/if}}
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}" disabled="{{item.psEditor.disabled}}"
......
<IbizDatePicker <IbizDatePicker
name="{{item.codeName}}" name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.getPlaceHolder}} {{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}" placeholder="{{item.psEditor.placeHolder}}"
{{/if}} {{/if}}
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}" :disabled="{{item.psEditor.disabled}}"
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
codeListType="{{item.psEditor.codeList.codeListType}}" codeListType="{{item.psEditor.codeList.codeListType}}"
valueSeparator="{{item.psEditor.codeList.valueSeparator}}" valueSeparator="{{item.psEditor.codeList.valueSeparator}}"
{{/if}} {{/if}}
{{#if item.psEditor.getPlaceHolder}} {{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}" placeholder="{{item.psEditor.placeHolder}}"
{{/if}} {{/if}}
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}" disabled="{{item.psEditor.disabled}}"
......
<IbizInput <IbizInput
name="{{item.codeName}}" name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.getPlaceHolder}} {{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}" placeholder="{{item.psEditor.placeHolder}}"
{{/if}} {{/if}}
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}" :disabled="{{item.psEditor.disabled}}"
...@@ -19,9 +19,12 @@ ...@@ -19,9 +19,12 @@
{{#if item.psEditor.editorParams.precision}} {{#if item.psEditor.editorParams.precision}}
:precision="{{item.psEditor.editorParams.precision}}" :precision="{{item.psEditor.editorParams.precision}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.maxLength}} {{#if item.psEditor.maxLength}}
:maxLength="{{item.psEditor.maxLength}}" :maxLength="{{item.psEditor.maxLength}}"
{{/if}} {{/if}}
{{#if item.psEditor.showMaxLength}}
:showMaxLength="{{item.psEditor.showMaxLength}}"
{{/if}}
{{#eq item.psEditor.editorType "TEXTBOX"}} {{#eq item.psEditor.editorType "TEXTBOX"}}
type="text" type="text"
{{/eq}} {{/eq}}
......
<IbizRating <IbizRating
name="{{item.codeName}}" name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
:date="state.data"
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}" :disabled="{{item.psEditor.disabled}}"
{{/if}} {{/if}}
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
{{#if item.psEditor.readOnly}} {{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}" :readonly="{{item.psEditor.readOnly}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.step}} {{#if item.psEditor.stepValue}}
:step="{{item.psEditor.editorParams.step}}" :step="{{item.psEditor.stepValue}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.min}} {{#if item.psEditor.editorParams.min}}
:min="{{item.psEditor.editorParams.min}}" :min="{{item.psEditor.editorParams.min}}"
......
<IbizStepper <IbizStepper
name="{{item.codeName}}" name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
:date="state.data"
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}" :disabled="{{item.psEditor.disabled}}"
{{/if}} {{/if}}
...@@ -11,8 +10,8 @@ ...@@ -11,8 +10,8 @@
{{#if item.psEditor.editorParams.precision}} {{#if item.psEditor.editorParams.precision}}
:precision="{{item.psEditor.editorParams.precision}}" :precision="{{item.psEditor.editorParams.precision}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.step}} {{#if item.psEditor.stepValue}}
:step="{{item.psEditor.editorParams.step}}" :step="{{item.psEditor.stepValue}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.min}} {{#if item.psEditor.editorParams.min}}
:min="{{item.psEditor.editorParams.min}}" :min="{{item.psEditor.editorParams.min}}"
......
<IbizUpload <IbizUpload
name="{{item.codeName}}" name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}" :value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.editorParams.accept}}
accept="{{item.psEditor.editorParams.accept}}"
{{/if}}
{{#if item.psEditor.editorParams.method}} {{#if item.psEditor.editorParams.method}}
method="{{item.psEditor.editorParams.method}}" method="{{item.psEditor.editorParams.method}}"
{{/if}} {{/if}}
...@@ -11,10 +8,10 @@ ...@@ -11,10 +8,10 @@
multiple="{{item.psEditor.editorParams.multiple}}" multiple="{{item.psEditor.editorParams.multiple}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.showUploadList}} {{#if item.psEditor.editorParams.showUploadList}}
showUploadList="{{item.psEditor.editorParams.showUploadList}}" :showUploadList="{{item.psEditor.editorParams.showUploadList}}"
{{/if}} {{/if}}
{{#if item.psEditor.editorParams.Tooltip}} {{#if item.psEditor.editorParams.tooltip}}
Tooltip="{{item.psEditor.editorParams.Tooltip}}" tooltip="{{item.psEditor.editorParams.tooltip}}"
{{/if}} {{/if}}
{{#if item.psEditor.disabled}} {{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}" :disabled="{{item.psEditor.disabled}}"
...@@ -22,4 +19,13 @@ ...@@ -22,4 +19,13 @@
{{#if item.psEditor.readOnly}} {{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}" :readonly="{{item.psEditor.readOnly}}"
{{/if}} {{/if}}
{{#if item.psEditor.maxFileCount}}
:limit="{{item.psEditor.maxFileCount}}"
{{/if}}
{{#eq item.psEditor.editorType "PICTURE"}}
accept='image/*'
{{/eq}}
{{#eq item.psEditor.editorType "PICTURE_ONE"}}
accept='image/*'
{{/eq}}
@editorEvent="handleEditorEvent"/> @editorEvent="handleEditorEvent"/>
...@@ -73,10 +73,11 @@ const onChange = ($event: any) => { ...@@ -73,10 +73,11 @@ const onChange = ($event: any) => {
<div :class="['app-editor-container',`app-input-${name}`]"> <div :class="['app-editor-container',`app-input-${name}`]">
<a-input <a-input
allowClear allowClear
v-if="Object.is('text', type)" v-if="Object.is('text', type) || Object.is('number', type)"
v-model:value="value" v-model:value="value"
:disabled="disabled" :disabled="disabled"
:maxlength="maxLength" :maxlength="maxLength"
:type="type"
@blur="onChange" @blur="onChange"
:placeholder="showMaxLength ? `最大内容长度为${maxLength}` : placeholder" /> :placeholder="showMaxLength ? `最大内容长度为${maxLength}` : placeholder" />
<a-input-password <a-input-password
...@@ -87,22 +88,12 @@ const onChange = ($event: any) => { ...@@ -87,22 +88,12 @@ const onChange = ($event: any) => {
:placeholder="placeholder"/> :placeholder="placeholder"/>
<a-textarea <a-textarea
showCount showCount
allowClear
v-if="Object.is('textarea', type)" v-if="Object.is('textarea', type)"
v-model:value="value" v-model:value="value"
:disabled="disabled" :disabled="disabled"
:maxlength="maxLength" :maxlength="maxLength"
@blur="onChange" @blur="onChange"
:placeholder="placeholder"/> :placeholder="placeholder"/>
<a-input-number
v-if="Object.is('number', type)"
v-model:value="value"
:max="max"
:min="min"
:disabled="disabled"
:precision="precision"
@blur="onChange"
:placeholder="placeholder"/>
</div> </div>
</template> </template>
......
...@@ -133,7 +133,7 @@ onBeforeMount(() => { ...@@ -133,7 +133,7 @@ onBeforeMount(() => {
<template> <template>
<div :class="['app-editor-container', `app-span-${name}`]"> <div :class="['app-editor-container', `app-span-${name}`]">
<span></span> <span>{{text}}</span>
</div> </div>
</template> </template>
......
...@@ -45,12 +45,19 @@ interface UploadProps { ...@@ -45,12 +45,19 @@ interface UploadProps {
*/ */
showUploadList: boolean; showUploadList: boolean;
/**
* 最大文件数
*
* @type {boolean}
*/
limit: number;
/** /**
* 按钮提示信息 * 按钮提示信息
* *
* @type {boolean} * @type {boolean}
*/ */
Tooltip: string; tooltip: string;
/** /**
* 只读模式 * 只读模式
...@@ -77,7 +84,9 @@ const props = withDefaults(defineProps<UploadProps>(), { ...@@ -77,7 +84,9 @@ const props = withDefaults(defineProps<UploadProps>(), {
method: 'post', method: 'post',
multiple: true, multiple: true,
showUploadList: true, showUploadList: true,
Tooltip: '点击上传' tooltip: '点击上传',
accept:"*",
limit: 999,
}); });
const emit = defineEmits<EditorEmit>(); const emit = defineEmits<EditorEmit>();
const uploadUrl = getUploadUrl(); const uploadUrl = getUploadUrl();
...@@ -101,6 +110,7 @@ const onChange = (value: number) => { ...@@ -101,6 +110,7 @@ const onChange = (value: number) => {
<a-upload <a-upload
:action="uploadUrl" :action="uploadUrl"
:method="method" :method="method"
:accept="accept"
v-model:fileList="fileList" v-model:fileList="fileList"
:headers="headers" :headers="headers"
:multiple="multiple" :multiple="multiple"
...@@ -110,7 +120,7 @@ const onChange = (value: number) => { ...@@ -110,7 +120,7 @@ const onChange = (value: number) => {
@change="onChange"> @change="onChange">
<a-button> <a-button>
<upload-outlined></upload-outlined> <upload-outlined></upload-outlined>
{{Tooltip}} {{tooltip}}
</a-button> </a-button>
</a-upload> </a-upload>
</div> </div>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册