diff --git a/src/common/app-rawitem/app-rawitem.tsx b/src/common/app-rawitem/app-rawitem.tsx deleted file mode 100644 index f7e311dd79839b1d7ee45f95f2445e54afe56d7d..0000000000000000000000000000000000000000 --- a/src/common/app-rawitem/app-rawitem.tsx +++ /dev/null @@ -1,181 +0,0 @@ -import { useNamespace } from '@ibiz-template/vue3-util'; -import { defineComponent, ref } from 'vue'; -import { createUUID } from 'qx-util'; - -export const AppRawItem = defineComponent({ - name: 'AppRawItem', - props: { - type: { - type: String, - required: true, - }, - content: { - type: [String, Object], - }, - }, - setup(props) { - const ns = useNamespace('rawitem'); - - // 视频类型内容参数 - const playerParams = ref({ - id: createUUID(), - path: '', - mute: true, - autoplay: true, - replay: false, - showcontrols: true, - }); - - // 分割线类型参数 - const dividerParams = ref({ - contentPosition: 'center', - html: '', - }); - - // 类型参数 - const alertParams = ref({ - type: 'info', - title: '', - closeabled: true, - showIcon: false, - }); - - // 文本类型显示值 - const rawItemText = ref(''); - - if ( - [ - 'TEXT', - 'HEADING1', - 'HEADING2', - 'HEADING3', - 'HEADING4', - 'HEADING5', - 'HEADING6', - 'PARAGRAPH', - 'HTML', - ].includes(props.type) - ) { - if (props.content && typeof props.content === 'string') { - rawItemText.value = props.content; - rawItemText.value = rawItemText.value.replaceAll('<', '<'); - rawItemText.value = rawItemText.value.replaceAll('>', '>'); - rawItemText.value = rawItemText.value.replaceAll('&nbsp;', ' '); - rawItemText.value = rawItemText.value.replaceAll(' ', ' '); - } - } - - if (['VIDEO', 'DIVIDER', 'INFO', 'WARNING', 'ERROR'].includes(props.type)) { - if (props.content) { - let rawConfig = {}; - try { - if (typeof props.content === 'string') { - // eslint-disable-next-line no-new-func - const func = new Function(`return (${props.content});`); - rawConfig = func(); - switch (props.type) { - case 'VIDEO': - Object.assign(playerParams.value, rawConfig); - break; - case 'DIVIDER': - Object.assign(dividerParams.value, rawConfig); - break; - case 'INFO': - case 'WARNING': - case 'ERROR': - alertParams.value.type = props.type.toLocaleLowerCase(); - Object.assign(alertParams.value, rawConfig); - break; - default: - break; - } - } - } catch { - ibiz.log.error(`${props.type}类型自定义参数配置错误`); - } - } - } - - return { ns, rawItemText, playerParams, dividerParams, alertParams }; - }, - render() { - if (this.type === 'IMAGE') { - return ( - - ); - } - if (this.type === 'TEXT') { - return {this.rawItemText}; - } - if (this.type === 'HEADING1') { - return

{this.rawItemText}

; - } - if (this.type === 'HEADING2') { - return

{this.rawItemText}

; - } - if (this.type === 'HEADING3') { - return

{this.rawItemText}

; - } - if (this.type === 'HEADING4') { - return

{this.rawItemText}

; - } - if (this.type === 'HEADING5') { - return
{this.rawItemText}
; - } - if (this.type === 'HEADING6') { - return
{this.rawItemText}
; - } - if (this.type === 'PARAGRAPH') { - return

{this.rawItemText}

; - } - if (this.type === 'HTML') { - return ( -
- ); - } - if (this.type === 'VIDEO') { - return ( -
- -
- ); - } - if (this.type === 'DIVIDER') { - return ( - - - - ); - } - if ( - this.type === 'INFO' || - this.type === 'WARNING' || - this.type === 'ERROR' - ) { - return ( - - ); - } - if (['MARKDOWN', 'PLACEHOLDER'].includes(this.type)) { - return
{this.type}类型暂未支持
; - } - return null; - }, -}); diff --git a/src/control/form/form-detail/form-item/form-item-container/form-item-container.scss b/src/control/form/form-detail/form-item/form-item-container/form-item-container.scss index 3ddbf9fc8859db9c25f43460a4142d82c0ccd965..fbd76afa8f72ff18dfb3e768f1ee4dd824ce5aee 100644 --- a/src/control/form/form-detail/form-item/form-item-container/form-item-container.scss +++ b/src/control/form/form-detail/form-item/form-item-container/form-item-container.scss @@ -10,18 +10,14 @@ padding-top: calc( ( - getCssVar('form-item-container', 'line-height') - getCssVar( - 'form-item', - 'font-size' - ) + getCssVar('form-item-container', 'line-height') - + getCssVar('form-item', 'font-size') ) / 2 ); padding-bottom: calc( ( - getCssVar('form-item-container', 'line-height') - getCssVar( - 'form-item', - 'font-size' - ) + getCssVar('form-item-container', 'line-height') - + getCssVar('form-item', 'font-size') ) / 2 ); line-height: getCssVar('form-item', 'font-size'); @@ -40,6 +36,7 @@ } @include e(editor) { + position: relative; flex-grow: 1; } } @@ -78,6 +75,8 @@ .#{bem('form-item-container', '', 'right')} { .#{bem('form-item-container-content')} { @include flex; + + height: 100%; } } diff --git a/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.scss b/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.scss index 94bb482abcfe7e8ab44de6fff1262527a2110398..f283e9308503cb1db33e202fe57271f9ea45a989 100644 --- a/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.scss +++ b/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.scss @@ -1,3 +1,7 @@ @include b(autocomplete) { width: 100%; + + @include e(transfer) { + width: 100%; + } } diff --git a/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.tsx b/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.tsx index ec77c44af00197c3be0af0b9b69da82e7fc27b2a..e838f048225979bda47c74fc474705161f1edaed 100644 --- a/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.tsx +++ b/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.tsx @@ -192,6 +192,7 @@ export const IBizAutoComplete = defineComponent({ placement='bottom' clearable={this.autoCompleteClearable} popper-class={this.ns.e('transfer')} + teleported={false} fetch-suggestions={this.onSearch} onClear={this.onClear} disabled={this.disabled || this.readonly} diff --git a/src/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.tsx b/src/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.tsx index af2c0bb15f75d1befe32848fc90274d98c4db207..1f08b7c4caac5d1cb65b43698f023e5649eb5e19 100644 --- a/src/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.tsx +++ b/src/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.tsx @@ -75,7 +75,7 @@ export const IBizPickerEmbedView = defineComponent({ const viewShell = resolveComponent('ViewShell'); return (
- {this.c.pickupView ? ( + {this.c.model.pickupAppViewId ? ( [
{h(viewShell, { diff --git a/src/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.tsx b/src/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.tsx index a84fb2c6b276133deb63ee3120765ac9804bdb6d..6e4f91900208e04dd940a1a629ee194455cbeddb 100644 --- a/src/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.tsx +++ b/src/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.tsx @@ -305,7 +305,7 @@ export const IBizPickerSelectView = defineComponent({ name='clear' > ), - this.c.linkView && ( + this.c.model.linkAppViewId && ( ) : null, - this.c.linkView ? ( + this.c.model.linkAppViewId ? ( {{ @@ -242,13 +241,13 @@ export const IBizPicker = defineComponent({ return; } return [ - this.c.pickupView ? ( + this.c.model.pickupAppViewId ? ( ) : null, - this.c.linkView ? ( + this.c.model.linkAppViewId ? ( { this.sort = this.getAcSort(); } } - await this.initPickupViewParams(); - await this.initLinkViewParams(); } /** @@ -231,6 +229,7 @@ export class PickerEditorController extends EditorController { data: IData, selectedData?: string, ): Promise { + await this.initPickupViewParams(); const { context, params } = this.handlePublicParams( data, this.context, diff --git a/src/editor/list-box/ibiz-list-box/ibiz-list-box.scss b/src/editor/list-box/ibiz-list-box/ibiz-list-box.scss index 050f0af531abb65f1444cc242500652cae560f39..7cef0d32d82eada036489b33f54556681683c366 100644 --- a/src/editor/list-box/ibiz-list-box/ibiz-list-box.scss +++ b/src/editor/list-box/ibiz-list-box/ibiz-list-box.scss @@ -1,4 +1,6 @@ @include b(list-box) { + height: 100%; + overflow: auto; @include b(list-box-radio) { @include flex(column, flex-start, flex-start); } diff --git a/src/editor/slider/ibiz-slider/ibiz-slider.tsx b/src/editor/slider/ibiz-slider/ibiz-slider.tsx index 834a411d410b8bde549d75dbd51336023a42beb0..73432686ceaba7c0ee438d42de83e7d4f360be70 100644 --- a/src/editor/slider/ibiz-slider/ibiz-slider.tsx +++ b/src/editor/slider/ibiz-slider/ibiz-slider.tsx @@ -18,9 +18,9 @@ export const IBizSlider = defineComponent({ // 步长 let step = 1; // 设置滑动输入条允许的最大值 - let max = Infinity; + let max = 100; // 设置滑动输入条允许的最小值 - let min = -Infinity; + let min = 0; // 是否显示间断点 let showStops = false; // 是否开启选择范围 @@ -54,7 +54,7 @@ export const IBizSlider = defineComponent({ () => props.value, (newVal, oldVal) => { if (newVal !== oldVal) { - if (!newVal) { + if (newVal === null || newVal === undefined) { // 如果是范围给数组 if (range) { currentVal.value = [0, 1]; @@ -67,7 +67,7 @@ export const IBizSlider = defineComponent({ if (range) { currentVal.value = JSON.parse(newVal as string); } else { - currentVal.value = newVal as number; + currentVal.value = Number(newVal) as number; } } }