提交 85348837 编写于 作者: 邱定凯's avatar 邱定凯

update:更新编辑器发布逻辑

上级 366b75a1
......@@ -22,7 +22,7 @@
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
:readOnly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
......
......@@ -25,16 +25,20 @@
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
:readOnly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.maxValue}}
:max="{{item.psEditor.maxValue}}"
{{/if}}
{{#if item.psEditor.minValue}}
:min="{{item.psEditor.minValue}}"
{{/if}}
{{#if item.psEditor.precision}}
:precision="{{item.psEditor.precision}}"
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
{{#if max}}
:max="{{max}}"
{{/if}}
{{#if min}}
:min="{{min}}"
{{/if}}
{{#if precision}}
:precision="{{precision}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#if item.psEditor.maxLength}}
:maxLength="{{item.psEditor.maxLength}}"
......
......@@ -22,13 +22,17 @@
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
:readOnly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.editorParams.maxValue}}
:max="{{item.psEditor.editorParams.maxValue}}"
{{/if}}
{{#if item.psEditor.editorParams.allowHalf}}
:allowHalf="{{item.psEditor.editorParams.allowHalf}}"
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
{{#if max}}
:max="{{max}}"
{{/if}}
{{#if allowHalf}}
:allowHalf="{{allowHalf}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
......
......@@ -23,16 +23,20 @@
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
:readOnly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.editorParams.stepValue}}
:step="{{item.psEditor.editorParams.stepValue}}"
{{/if}}
{{#if item.psEditor.editorParams.minValue}}
:min="{{item.psEditor.editorParams.minValue}}"
{{/if}}
{{#if item.psEditor.editorParams.maxValue}}
:max="{{item.psEditor.editorParams.maxValue}}"
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
{{#if step}}
:step="{{step}}"
{{/if}}
{{#if min}}
:min="{{min}}"
{{/if}}
{{#if max}}
:max="{{max}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
......
......@@ -28,19 +28,21 @@
{{#if item.dataType}}
:dataType="{{item.dataType}}"
{{/if}}
{{#if item.psEditor.editorParams.unitName}}
unitName="{{item.psEditor.editorParams.unitName}}"
{{/if}}
{{#if item.psEditor.editorParams.valueFormat}}
valueFormat="{{item.psEditor.editorParams.valueFormat}}"
{{else if item.valueFormat}}
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
{{#if unitName}}
unitName="{{unitName}}"
{{/if}}
{{#if precision}}
:precision="{{precision}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#if item.valueFormat}}
valueFormat="{{item.valueFormat}}"
{{else if item.psAppDEField.valueFormat}}
valueFormat="{{item.psAppDEField.valueFormat}}"
{{/if}}
{{#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}}"
{{/if}}
......
......@@ -22,7 +22,7 @@
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
:readOnly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
......
......@@ -21,11 +21,15 @@
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{#if}}
{{#jsonParse item.psEditor.editorParams}}
{{#if size}}
:size="{{size}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#if (and item.psEditor.editorParams item.psEditor.editorParams.size)}}
size="{{item.psEditor.editorParams.size}}"
{{#if item.psEditor.readOnly}}
:readOnly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if (or (eq ctrlType 'form') (eq ctrlType 'panel'))}}
:value="state.data.{{item.psEditor.name}}"
......
......@@ -8,17 +8,18 @@
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/eq}}
{{#if item.psEditor.editorParams.method}}
method="{{item.psEditor.editorParams.method}}"
{{/if}}
{{#if item.psEditor.editorParams.multiple}}
multiple="{{item.psEditor.editorParams.multiple}}"
{{/if}}
{{#if item.psEditor.editorParams.showUploadList}}
:showUploadList="{{item.psEditor.editorParams.showUploadList}}"
{{/if}}
{{#if item.psEditor.editorParams.tooltip}}
tooltip="{{item.psEditor.editorParams.tooltip}}"
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
{{#if method}}
method="{{method}}"
{{/if}}
{{#if multiple}}
multiple="{{multiple}}"
{{/if}}
{{#if showUploadList}}
:showUploadList="{{showUploadList}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
......@@ -36,8 +37,13 @@
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.maxFileCount}}
:limit="{{item.psEditor.maxFileCount}}"
{{!-- TODO maxFileContent识别 --}}
{{#if item.psEditor.editorParams}}
{{#jsonParse item.psEditor.editorParams}}
{{#if limit}}
:limit="{{limit}}"
{{/if}}
{{/jsonParse}}
{{/if}}
{{#eq item.psEditor.editorType "PICTURE"}}
accept='image/*'
......
......@@ -26,7 +26,7 @@ interface CheckboxProps {
*
* @type {boolean}
*/
readonly?: boolean;
readOnly?: boolean;
}
interface EditorEmit {
......@@ -35,7 +35,7 @@ interface EditorEmit {
const props = withDefaults(defineProps<CheckboxProps>(), {
disabled: false,
readonly: false,
readOnly: false,
});
const emit = defineEmits<EditorEmit>();
const curValue: Ref<boolean> = computed(() => {
......@@ -61,7 +61,7 @@ const onChange = ($event: any) => {
<a-checkbox
@change="onChange"
:checked="curValue"
:disabled="disabled || readonly"
:disabled="disabled || readOnly"
></a-checkbox>
</div>
</template>
......
......@@ -27,7 +27,7 @@ interface RatingProps {
*
* @type {boolean}
*/
readonly?: boolean;
readOnly?: boolean;
/**
* 下发数据
......@@ -59,7 +59,7 @@ const props = withDefaults(defineProps<RatingProps>(), {
max: 5,
allowHalf: false,
disabled: false,
readonly: false,
readOnly: false,
});
const emit = defineEmits<EditorEmit>();
......@@ -78,7 +78,7 @@ const onChange = (value: number) => {
:value="value"
:allowHalf="allowHalf"
:count="max"
:disabled="disabled || readonly"
:disabled="disabled || readOnly"
@change="onChange"
/>
</div>
......
......@@ -42,7 +42,7 @@ interface sliderProps {
*
* @type {boolean}
*/
readonly?: boolean;
readOnly?: boolean;
/**
* 是否禁用
......@@ -61,7 +61,7 @@ const props = withDefaults(defineProps<sliderProps>(), {
max: 100,
step: 1,
disabled: false,
readonly: false,
readOnly: false,
});
const emit = defineEmits<EditorEmit>();
......@@ -81,7 +81,7 @@ const onChange = (value: number) => {
:min="min"
:max="max"
:step="step"
:disabled="disabled || readonly"
:disabled="disabled || readOnly"
@afterChange="onChange"
/>
</div>
......
<template>
<div class="app-stepper">
<a-input-number v-model:value="result" :min="min" :max="max" :step="step" :precision="precision" :disabled="disabled || readonly" :controls="false">
<a-input-number v-model:value="result" :min="min" :max="max" :step="step" :precision="precision" :disabled="disabled || readOnly" :controls="false">
<template #addonBefore>
<a-button type="text" :disabled="disabled || readonly || result <= min" @click="btnReduce">-</a-button>
<a-button type="text" :disabled="disabled || readOnly || result <= min" @click="btnReduce">-</a-button>
</template>
<template #addonAfter>
<a-button type="text" :disabled="disabled || readonly || result >= max" @click="btnIcrease">+</a-button>
<a-button type="text" :disabled="disabled || readOnly || result >= max" @click="btnIcrease">+</a-button>
</template>
</a-input-number>
</div>
......
......@@ -31,7 +31,7 @@ interface SwitchProps {
*
* @type {boolean}
*/
readonly?: boolean;
readOnly?: boolean;
/**
* 大小
......@@ -47,7 +47,7 @@ interface EditorEmit {
const props = withDefaults(defineProps<SwitchProps>(), {
disabled: false,
readonly: false,
readOnly: false,
size: 'default',
});
const emit = defineEmits<EditorEmit>();
......@@ -72,7 +72,7 @@ const onChange = (value: number) => {
<a-switch
:checked="curValue"
:size="size"
:disabled="disabled || readonly"
:disabled="disabled || readOnly"
@change="onChange"
/>
</div>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册