From 26643854e4a7407982a277b16efed4d8bbcebe7c Mon Sep 17 00:00:00 2001 From: zhf <1204297681@qq.com> Date: Thu, 17 Jul 2025 22:31:09 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=BC=96=E8=BE=91=E5=99=A8=E3=80=81Markdown?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E5=92=8C=E6=95=B0=E7=BB=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=8F=AA=E8=AF=BB=E6=80=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor/array/ibiz-array/ibiz-array.scss | 6 ++++++ src/editor/array/ibiz-array/ibiz-array.tsx | 8 +++++++- .../ibiz-markdown-editor/ibiz-markdown-editor.tsx | 2 +- src/editor/upload/ibiz-file-upload/ibiz-file-upload.tsx | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/editor/array/ibiz-array/ibiz-array.scss b/src/editor/array/ibiz-array/ibiz-array.scss index e6623774b..24d57f7f8 100644 --- a/src/editor/array/ibiz-array/ibiz-array.scss +++ b/src/editor/array/ibiz-array/ibiz-array.scss @@ -5,4 +5,10 @@ ion-icon { cursor: pointer; } +} + +@include b(array-tooltip) { + .el-link { + --el-link-text-color: inherit; + } } \ No newline at end of file diff --git a/src/editor/array/ibiz-array/ibiz-array.tsx b/src/editor/array/ibiz-array/ibiz-array.tsx index 513d60f8b..73982341f 100644 --- a/src/editor/array/ibiz-array/ibiz-array.tsx +++ b/src/editor/array/ibiz-array/ibiz-array.tsx @@ -249,6 +249,7 @@ export const IBizArray = defineComponent({ v-model={item.value} placeholder={this.c.placeHolder} disabled={this.disabled} + readonly={this.readonly} onBlur={this.onBlur} onFocus={this.onFocus} onKeyup={this.handleKeyUp} @@ -261,7 +262,11 @@ export const IBizArray = defineComponent({ {...this.$attrs} > ) : ( - + {{ default: (): VNode => { return ( @@ -271,6 +276,7 @@ export const IBizArray = defineComponent({ v-model={item.value} placeholder={this.c.placeHolder} disabled={this.disabled} + readonly={this.readonly} maxlength={ Object.is(this.editorStyle, 'url') ? this.maxLength diff --git a/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx b/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx index 55c2b42fd..30002d172 100644 --- a/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx +++ b/src/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.tsx @@ -258,7 +258,7 @@ const IBizMarkDown: any = defineComponent({ }; const editorInit = () => { - if (props.disabled) { + if (props.disabled || props.readonly) { defaultModel.value = 'previewOnly'; } nextTick(() => { diff --git a/src/editor/upload/ibiz-file-upload/ibiz-file-upload.tsx b/src/editor/upload/ibiz-file-upload/ibiz-file-upload.tsx index 126bdd5dd..6c7d92e72 100644 --- a/src/editor/upload/ibiz-file-upload/ibiz-file-upload.tsx +++ b/src/editor/upload/ibiz-file-upload/ibiz-file-upload.tsx @@ -119,7 +119,7 @@ export const IBizFileUpload = defineComponent({ file-list={this.files} action={this.uploadUrl} headers={this.headers} - disabled={this.disabled} + disabled={this.disabled || this.readonly} multiple={this.c.multiple} limit={this.limit} drag={!!this.c.isDrag} -- Gitee From e5de558976f7288e6f3d56b5ed040bab2525d654 Mon Sep 17 00:00:00 2001 From: zhf <1204297681@qq.com> Date: Thu, 17 Jul 2025 22:31:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E5=8C=96=E9=80=89=E6=8B=A9=E5=99=A8=E5=91=88=E7=8E=B0=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ibiz-virtualized-list.scss | 45 +++++++++++++++++++ .../ibiz-virtualized-list.tsx | 6 ++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.scss b/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.scss index d459a5e9a..f98f4115a 100644 --- a/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.scss +++ b/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.scss @@ -213,6 +213,28 @@ $dropdown-readonly-text-item: ( @include b(dropdown) { @include m(round) { + &.#{bem('dropdown-virtualized-list')} { + @include when(has-value) { + .el-select-v2__placeholder { + display: none; + } + } + + @include b(dropdown-select) { + .el-select-v2__wrapper { + line-height: 28px; + } + + .el-select-v2__selected-item { + display: none; + } + } + + @include b(dropdown-select-option-text){ + margin: 2px 0 2px 6px; + } + } + @include b(dropdown-readonly-text-item){ display: inline-flex; align-items: center; @@ -267,6 +289,29 @@ $dropdown-readonly-text-item: ( @include b(dropdown-popper) { @include m(round) { + &.#{bem('dropdown-virtualized-list-popper')} { + @include b(dropdown-select-option-content){ + flex: 0 1 auto; + + > span { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + .el-select-dropdown__option-item { + display: flex; + align-items: center; + } + + .select-v2-option-item { + display: flex; + align-items: center; + width: 100%; + } + } + .el-select-dropdown__item { display: flex; align-items: center; diff --git a/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.tsx b/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.tsx index 96c376a93..cc361cd25 100644 --- a/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.tsx +++ b/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.tsx @@ -525,7 +525,9 @@ export const IBizVirtualizedList = defineComponent({ this.c.editorParams.type === 'round' ? this.ns.bm('popper', 'round') : '' - } ${this.ns.bm('popper', `${this.c.model.id}`)}`} + } ${this.ns.bm('popper', `${this.c.model.id}`)} ${this.ns.b( + 'virtualized-list-popper', + )}`} onFocus={this.onFocus} onClear={this.handleClear} onKeyup={this.handleKeyUp} @@ -615,9 +617,11 @@ export const IBizVirtualizedList = defineComponent({
{this.readonly ? readonlyContent : editContent} -- Gitee From a7324d084790e177ec07773c312f4d03ebf107ac Mon Sep 17 00:00:00 2001 From: zhf <1204297681@qq.com> Date: Thu, 17 Jul 2025 22:31:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96ip=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E8=BE=93=E5=85=A5=E6=A1=86=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E5=91=88=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../text-box/ibiz-input-ip/ibiz-input-ip.scss | 76 +++- .../text-box/ibiz-input-ip/ibiz-input-ip.tsx | 400 ++++++++++++------ 2 files changed, 341 insertions(+), 135 deletions(-) diff --git a/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.scss b/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.scss index df4f30666..00526b740 100644 --- a/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.scss +++ b/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.scss @@ -3,7 +3,54 @@ flex-wrap: nowrap; height: 100%; + font-size: getCssVar(form-item, font-size); line-height: getCssVar(form-item, line-height); + color: getCssVar(form-item, text-color); + + .el-input .el-input__wrapper { + background-color: transparent; + box-shadow: none; + } + + .el-input.is-disabled .el-input__wrapper { + background-color: transparent; + } + + &:hover:not(.#{bem('input-ip', '', 'disabled')}) { + @include b(input-ip-content) { + box-shadow: 0 0 0 1px getCssVar(editor, hover, border-color) inset; + } + } + + @include m(disabled) { + @include b(input-ip-content) { + color: var(--el-disabled-text-color); + cursor: not-allowed; + background-color: var(--el-disabled-bg-color); + box-shadow: 0 0 0 1px var(--el-disabled-border-color) inset; + } + } + + @include m(readonly) { + color: getCssVar(form-item, readonly-color); + } + + @include when(focus) { + @include b(input-ip-content) { + box-shadow: 0 0 0 1px getCssVar(color, primary) inset; + } + } +} + +@include b(input-ip-content) { + display: flex; + flex-wrap: nowrap; + align-items: center; + width: 100%; + height: 100%; + color: getCssVar(editor, default, text-color); + border-radius: getCssVar(border, radius, small); + box-shadow: 0 0 0 1px getCssVar(editor, default, border-color) inset; } @@ -11,7 +58,34 @@ @include b(input-ip) { @include when(show-default){ - padding: getCssVar(form-item, hover-edit-padding); + @include b(input-ip-form-default-content) { + display: block; + padding: getCssVar(form-item, hover-edit-padding); + } + + @include b(input-ip-content) { + display: none; + } + + &:hover { + @include b(input-ip-form-default-content) { + display: none; + } + + @include b(input-ip-content) { + display: flex; + } + } + + @include when(focus) { + @include b(input-ip-form-default-content) { + display: none; + } + + @include b(input-ip-content) { + display: flex; + } + } } } } \ No newline at end of file diff --git a/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.tsx b/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.tsx index 6d473eda1..fef89b047 100644 --- a/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.tsx +++ b/src/editor/text-box/ibiz-input-ip/ibiz-input-ip.tsx @@ -1,23 +1,24 @@ /* eslint-disable no-param-reassign */ -import { computed, defineComponent, Ref, ref, watch } from 'vue'; +import { computed, defineComponent, ref, watch } from 'vue'; import { getEditorEmits, getInputIpProps, useNamespace, } from '@ibiz-template/vue3-util'; +import { ElInput } from 'element-plus'; import './ibiz-input-ip.scss'; import { TextBoxEditorController } from '../text-box-editor.controller'; /** * IP地址输入框 * - * @description 使用多个el-input组件用于 IP 地址数据的录入,呈现样式为 4 个输入框。支持编辑器类型包含:`IP地址输入框` + * @description 由多个el-input组件组合而成,用于IP地址数据的录入。支持编辑器类型包含:`IP地址输入框` * @primary * @editorparams {"name":"readonly","parameterType":"boolean","defaultvalue":false,"description":"设置编辑器是否为只读态"} * @ignoreprops overflowMode * @ignoreemits infoTextChange */ -export const IBizInputIP = defineComponent({ +export const IBizInputIP: ReturnType = defineComponent({ name: 'IBizInputIP', props: getInputIpProps(), emits: getEditorEmits(), @@ -26,9 +27,6 @@ export const IBizInputIP = defineComponent({ const c = props.controller; - // 编辑器Ref - const editorRef = ref(); - // 是否显示表单默认内容 const showFormDefaultContent = computed(() => { if ( @@ -41,83 +39,205 @@ export const IBizInputIP = defineComponent({ return false; }); - // 获取当前值 - const currentVal = ref([]); - // 当前组件是否已获取到焦点 const activeElement = ref(false); // 当前组件输入框是否全部失焦 const isAllBlur = ref(false); - // 四段ip - const firstIp = ref(''); - const secIp = ref(''); - const thirdIp = ref(''); - const forIp = ref(''); - - // 初始赋值 - if (props.value) { - const ipArr = props.value.split('.'); - currentVal.value = ipArr; - firstIp.value = currentVal.value[0]; - secIp.value = currentVal.value[1]; - thirdIp.value = currentVal.value[2]; - forIp.value = currentVal.value[3]; - } + // 分割ip地址 + const splitIp = (ip: string): string[] => { + const parts = ip.split('.'); + return [parts[0] || '', parts[1] || '', parts[2] || '', parts[3] || '']; + }; + + // 拼接ip地址 + const joinIp = (parts: string[]): string => { + return parts.join('.'); + }; + + // 验证ip地址 + const isValidIp = (parts: string[]): boolean => { + return parts.every(part => { + if (!part) { + return false; + } + return /^(0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])$/.test(part); + }); + }; + + // ip段 + const ipSegments = ref(splitIp(props.value || '')); + + // ip输入框 + const ipInputs = ref<(InstanceType | undefined)[]>([]); + + // 处理输入 + const handleInput = (value: string, index: number) => { + value = value.replace(/[^0-9]/g, '').slice(0, 3); + + if (value) { + const num = parseInt(value, 10); + if (num > 255) { + value = '255'; + } else { + value = `${num}`; + } + } + + ipSegments.value[index] = value; + + const target = ipInputs.value[index]; + const input = target?.input; - // 验证格式 - const checkIpVal = ( - newVal: string, - oldVal: string, - ip: Ref, - index: number, - ) => { - if (newVal === '') return; - const reg = /^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/g; - if (reg.test(newVal)) { - currentVal.value[index] = newVal; - } else if (ip) { - ibiz.message.warning( - ibiz.i18n.t('editor.textBox.warningMessage', { - num: index + 1, - }), - ); - ip.value = oldVal; - currentVal.value[index] = oldVal; + if ( + ipSegments.value[index].length === 3 && + index < 3 && + input && + input.selectionStart === ipSegments.value[index].length && + input.selectionEnd === ipSegments.value[index].length + ) { + const ipInput = ipInputs.value[index + 1]; + if (ipInput) { + ipInput.focus(); + ipInput.input?.setSelectionRange( + 0, + ipSegments.value[index + 1].length, + ); + } } - if (firstIp.value && secIp.value && thirdIp.value && forIp.value) { - emit( - 'change', - `${firstIp.value}.${secIp.value}.${thirdIp.value}.${forIp.value}`, - ); + + if (isValidIp(ipSegments.value)) { + emit('change', joinIp(ipSegments.value)); } }; - // 监听每段IP变化 - watch(firstIp, (newVal: string, oldVal: string) => { - checkIpVal(newVal, oldVal, firstIp, 0); - }); - watch(secIp, (newVal: string, oldVal: string) => { - checkIpVal(newVal, oldVal, secIp, 1); - }); - watch(thirdIp, (newVal: string, oldVal: string) => { - checkIpVal(newVal, oldVal, thirdIp, 2); - }); - watch(forIp, (newVal: string, oldVal: string) => { - checkIpVal(newVal, oldVal, forIp, 3); - }); + // 处理键盘事件 + const handleKeydown = (event: KeyboardEvent, index: number) => { + if (event.key === 'Enter') { + emit('enter', event); + return; + } - // 自动聚焦 - watch(editorRef, newVal => { - if (props.autoFocus && newVal) { - const input = newVal.$el.getElementsByTagName('input')[0]; - input.focus(); + if (/^[0-9]$/.test(event.key)) { + const input = event.target as HTMLInputElement | null; + if ( + input && + ipSegments.value[index].length === 3 && + input.selectionStart === input.selectionEnd + ) { + event.preventDefault(); + if ( + index < 3 && + input.selectionEnd === ipSegments.value[index].length + ) { + const nextIndex = index + 1; + const nextInput = ipInputs.value[nextIndex]; + if (nextInput) { + nextInput.focus(); + nextInput.input?.setSelectionRange( + 0, + ipSegments.value[nextIndex].length, + ); + } + } + } + return; } - }); - // 输入框获取到焦点时设置该组件已获取到焦点 - const getFocus = () => { + if (event.key === '.') { + event.preventDefault(); + const input = event.target as HTMLInputElement | null; + if ( + input && + index < 3 && + input.selectionStart === input.selectionEnd && + input.selectionEnd !== 0 && + ipSegments.value[index].length + ) { + const nextIndex = index + 1; + const nextInput = ipInputs.value[nextIndex]; + if (nextInput) { + nextInput.focus(); + nextInput.input?.setSelectionRange( + 0, + ipSegments.value[nextIndex].length, + ); + } + } + return; + } + + // 处理退格键 + if (event.key === 'Backspace') { + const input = event.target as HTMLInputElement | null; + if ( + input && + index > 0 && + input.selectionStart === 0 && + input.selectionEnd === 0 + ) { + event.preventDefault(); + const prevIndex = index - 1; + const prevValue = ipSegments.value[prevIndex]; + const prevInput = ipInputs.value[prevIndex]; + if (prevValue.length > 0) { + ipSegments.value[prevIndex] = prevValue.slice(0, -1); + } + if (prevInput) { + prevInput.focus(); + prevInput.input?.setSelectionRange( + ipSegments.value[prevIndex].length, + ipSegments.value[prevIndex].length, + ); + } + } + } + + // 处理方向键:左箭头切换到前一个输入框 + if (event.key === 'ArrowLeft') { + const input = event.target as HTMLInputElement | null; + if ( + input && + index > 0 && + input.selectionStart === 0 && + input.selectionEnd === 0 + ) { + event.preventDefault(); + const prevIndex = index - 1; + const prevInput = ipInputs.value[prevIndex]; + if (prevInput) { + prevInput.focus(); + prevInput.input?.setSelectionRange( + ipSegments.value[prevIndex].length, + ipSegments.value[prevIndex].length, + ); + } + } + } + + // 处理方向键:右箭头切换到后一个输入框 + if (event.key === 'ArrowRight') { + const input = event.target as HTMLInputElement | null; + if ( + input && + index < 3 && + input.selectionStart === ipSegments.value[index].length && + input.selectionEnd === ipSegments.value[index].length + ) { + event.preventDefault(); + const nextIndex = index + 1; + const nextInput = ipInputs.value[nextIndex]; + if (nextInput) { + nextInput.focus(); + nextInput.input?.setSelectionRange(0, 0); + } + } + } + }; + + // 处理聚焦 + const handleFocus = () => { activeElement.value = true; if (isAllBlur.value) { isAllBlur.value = false; @@ -125,8 +245,8 @@ export const IBizInputIP = defineComponent({ } }; - // 失焦事件 - const blur = () => { + // 处理失焦 + const handleBlur = () => { activeElement.value = false; setTimeout(() => { if (!activeElement.value) { @@ -136,29 +256,83 @@ export const IBizInputIP = defineComponent({ }, 0); }; - // 处理点击键盘 - const handleKeyUp = (e: KeyboardEvent) => { - if (e && e.code === 'Enter') { - emit('enter', e); - } - }; + watch( + () => props.value, + newVal => { + ipSegments.value = splitIp(newVal || ''); + }, + ); + + watch( + () => ipInputs.value[0], + input => { + if (props.autoFocus && input) { + input.focus(); + } + }, + ); return { ns, c, - editorRef, - currentVal, - getFocus, - blur, - firstIp, - secIp, - thirdIp, - forIp, showFormDefaultContent, - handleKeyUp, + activeElement, + ipSegments, + ipInputs, + joinIp, + handleInput, + handleKeydown, + handleFocus, + handleBlur, }; }, render() { + let content = null; + if (this.readonly) { + content = this.value; + } else { + content = ( +
+ {this.ipSegments.map((segment, index) => { + return [ + ) => { + if (el) { + this.ipInputs[index] = el; + } else { + this.ipInputs[index] = undefined; + } + }} + onInput={(value: string) => this.handleInput(value, index)} + onKeydown={(e: KeyboardEvent) => this.handleKeydown(e, index)} + onFocus={this.handleFocus} + onBlur={this.handleBlur} + >, + index < 3 && ., + ]; + })} +
+ ); + } + + // 表单默认内容 + const formDefaultContent = ( +
+ {this.ipSegments.some(segment => segment) ? ( + this.joinIp(this.ipSegments) + ) : ( + + )} +
+ ); + return (
- - . - - . - - . - + {this.showFormDefaultContent && formDefaultContent} + {content}
); }, -- Gitee From 07e04ffc3247163ccbcbf024b5f78c6a9d444ea3 Mon Sep 17 00:00:00 2001 From: zhf <1204297681@qq.com> Date: Thu, 17 Jul 2025 22:39:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=8F=82=E6=95=B0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ .../ibiz-checkbox-list/ibiz-checkbox-list.tsx | 2 +- src/editor/slider/ibiz-slider/ibiz-slider.tsx | 6 +++--- src/editor/span/span/span.tsx | 2 +- src/editor/text-box/input/input.tsx | 8 ++++---- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e94e6b2..02d8667a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,11 +16,14 @@ ### Changed - 优化表格属性列 +- 优化ip地址输入框编辑器的呈现 ### Fixed - 修复日历用户自定义模式头部和内容区未对齐问题 - 修复列表分组样式2父容器有高度时未出滚动条 +- 修复文件上传编辑器、Markdown编辑器和数组编辑器只读态显示异常 +- 修复虚拟化选择器呈现样式异常 ## [0.7.41-alpha.12] - 2025-07-15 diff --git a/src/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.tsx b/src/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.tsx index c1310b858..d3b866ffd 100644 --- a/src/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.tsx +++ b/src/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.tsx @@ -22,7 +22,7 @@ import './ibiz-checkbox-list.scss'; * * @description 使用el-checkbox-group组件,通过选项框组选择多项数据,该组件通常用于绘制代码表。支持编辑器类型包含:`选项框列表` * @primary - * @editorparams {name:rownumber,parameterType:number,description:设置每行呈现的多选框个数} + * @editorparams {name:rownumber,parameterType:number,description:设置每行呈现的选项框个数} * @editorparams {name:allitems,parameterType:boolean,defaultvalue:false,description:选项框列表是否启用全部项} * @editorparams {name:itemstext,parameterType:string,defaultvalue:'全部',description:选项框列表全部项文本} * @editorparams {"name":"readonly","parameterType":"boolean","defaultvalue":false,"description":"设置编辑器是否为只读态"} diff --git a/src/editor/slider/ibiz-slider/ibiz-slider.tsx b/src/editor/slider/ibiz-slider/ibiz-slider.tsx index f4e3ddc09..84af19f51 100644 --- a/src/editor/slider/ibiz-slider/ibiz-slider.tsx +++ b/src/editor/slider/ibiz-slider/ibiz-slider.tsx @@ -31,9 +31,9 @@ import './ibiz-slider.scss'; * @editorparams {name:showstops,parameterType:boolean,defaultvalue:false,description:当 `type` 为 'line' 时,是否显示间断点,el-slider组件的show-stops属性} * @editorparams {name:range,parameterType:boolean,defaultvalue:false,description:当 `type` 为 'line' 时,是否开启选择范围,el-slider组件的range属性} * @editorparams {name:showinput,parameterType:boolean,defaultvalue:false,description:当 `type` 为 'line' 时,是否显示输入框,仅在非范围选择时有效,el-slider组件的show-input属性} - * @editorparams {name:showtext,parameterType:boolean,defaultvalue:false,description:当 `type` 为 'line' 或为 'circle' 时,是否显示文本} - * @editorparams {name:format,parameterType:string,defaultvalue:'0%',description:当 `type` 为 'line' 或为 'circle' 时,设置显示文本的格式} - * @editorparams {name:textitem,parameterType:string,description:当 `type` 为 'line' 或为 'circle' 时,设置显示文本属性。设置后,环形进度条的显示文本将优先获取主数据内对应属性的数据进行展示} + * @editorparams {name:showtext,parameterType:boolean,defaultvalue:false,description:当 `type` 为 'line' 或 'circle' 时,是否显示文本} + * @editorparams {name:format,parameterType:string,defaultvalue:'0%',description:当 `type` 为 'line' 或 'circle' 时,设置显示文本的格式} + * @editorparams {name:textitem,parameterType:string,description:当 `type` 为 'line' 或 'circle' 时,设置显示文本属性。设置后,环形进度条的显示文本将优先获取主数据内对应属性的数据进行展示} * @editorparams {name:piebg,parameterType:string,description:当 `type` 为 'pie' 时,设置饼图进度条背景色,可配置十六进制颜色、rgb颜色} * @editorparams {name:piepercentbg,parameterType:string,description:当 `type` 为 'pie' 时,设置饼图进度条占比背景色,可配置十六进制颜色、rgb颜色} * @editorparams {"name":"readonly","parameterType":"boolean","defaultvalue":false,"description":"设置编辑器是否为只读态"} diff --git a/src/editor/span/span/span.tsx b/src/editor/span/span/span.tsx index bc5ece256..734de108a 100644 --- a/src/editor/span/span/span.tsx +++ b/src/editor/span/span/span.tsx @@ -33,7 +33,7 @@ function isValidDateFormat(dateStr: string, format: string): boolean { * @description 直接呈现文本内容,可配置单位,无值时显示全局配置的emptyText,支持编辑器类型包含:`标签` * @primary * @editorparams {"name":"textseparator","parameterType":"string","defaultvalue":"','","description":"文本分隔符。如果是数组数据,在呈现时会使用文本分隔符拼接为字符串显示"} - * @editorparams {name:overflowmode,parameterType:'auto' | 'ellipsis',defaultvalue:'auto',description:文本换行模式。当参数为 'auto' 时,若内容超出宽度则会换行显示;当参数为 'ellipsis' 时,若内容超出宽度则会显示省略号} + * @editorparams {name:overflowmode,parameterType:'auto' | 'ellipsis',description:文本换行模式。当参数为 'auto' 时,若内容超出宽度则会换行显示;当参数为 'ellipsis' 时,若内容超出宽度则会显示省略号} * @editorparams {"name":"valuetype","parameterType":"string","description":"编辑器的值类型"} * @editorparams {"name":"objectnamefield","parameterType":"string","defaultvalue":"'srfmajortext'","description":"值类型为OBJECT、OBJECTS时显示的对象属性"} * @ignoreprops autoFocus | overflowMode diff --git a/src/editor/text-box/input/input.tsx b/src/editor/text-box/input/input.tsx index 53f9d3877..f2f108a2b 100644 --- a/src/editor/text-box/input/input.tsx +++ b/src/editor/text-box/input/input.tsx @@ -33,13 +33,13 @@ import './input.scss'; /** * 文本框 * - * @description 使用el-input组件,用于数据录入,通过鼠标或键盘输入字符。支持编辑器类型包含:`文本框`、`多行输入框`、`多行输入(10行)`、`密码框` + * @description 使用el-input组件,用于数据录入,通过鼠标或键盘输入字符。支持编辑器类型包含:`文本框`、`多行输入框`、`多行输入框(10行)`、`密码框` * @primary - * @editorparams {name:showlimit,parameterType:boolean,defaultvalue:true,description:el-input组件的show-word-limit属性,控制文本域是否显示字数限制,当编辑器类型为多行输入框、多行输入(10行)时生效} - * @editorparams {name:isauto,parameterType:boolean,defaultvalue:false,description:el-input组件的autosize属性,控制文本域高度是否自适应,当编辑器类型为多行输入框、多行输入(10行)时生效} + * @editorparams {name:showlimit,parameterType:boolean,defaultvalue:true,description:el-input组件的show-word-limit属性,控制文本域是否显示字数限制,当编辑器类型为多行输入框、多行输入框(10行)时生效} + * @editorparams {name:isauto,parameterType:boolean,defaultvalue:false,description:el-input组件的autosize属性,控制文本域高度是否自适应,当编辑器类型为多行输入框、多行输入框(10行)时生效} * @editorparams {name:autocomplete,parameterType:boolean,defaultvalue:false,description:el-input组件的autocomplete属性,是否允许自动填充} * @editorparams {name:ac,parameterType:boolean,defaultvalue:false,description:是否启用ac自填模式} - * @editorparams {name:srfaiappendcurdata,parameterType:boolean,defaultvalue:false,description:在打开AI功能时,该参数用于判断是否传入对象参数,主要用于在请求历史记录时,附加当前参数} + * @editorparams {name:srfaiappendcurdata,parameterType:boolean,defaultvalue:false,description:在打开AI功能时,该参数用于判断是否传入对象参数,主要用于在请求历史记录时,附加当前数据对象} * @editorparams {name:srfaiappendcurcontent,parameterType:string,description:在打开AI功能时,如果该参数存在值,会将其传入编辑内容作为用户消息,主要用于在请求历史记录后,附加当前编辑内容作为用户消息} * @editorparams {"name":"triggermode","parameterType":"'blur' | 'input'","defaultvalue":"'blur'","description":"指定编辑器触发 `change` 值变更事件的模式,input: 输入框输入时触发事件,blur:输入框blur时触发事件"} * @editorparams {name:minlength,parameterType:number,description:指定编辑器输入内容的最小字数} -- Gitee