@cloudbase/weda-ui 3.26.0 → 3.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/components/wd-drawer.d.ts +2 -2
- package/dist/configs/components/wd-drawer.js +4 -4
- package/dist/configs/index.d.ts +4 -4
- package/dist/configs/type-utils/type-form.js +2 -2
- package/dist/style/weda-ui.min.css +1 -1
- package/dist/web/components/wd-drawer/wd-drawer.js +0 -24
- package/dist/web/components/wd-modal/wd-modal.js +2 -4
- package/dist/web/components/wd-select/hooks/useChooseList.js +0 -1
- package/dist/web/components/wd-select/relationSelect/relationSelect.js +28 -8
- package/dist/web/components/wd-table/components/FieldRender/Form/Enum.js +3 -2
- package/package.json +1 -1
|
@@ -116,8 +116,8 @@ declare const config: {
|
|
|
116
116
|
readonly title: "抽屉";
|
|
117
117
|
readonly description: "屏幕边缘滑出的浮层面板。";
|
|
118
118
|
readonly propertyPanelTips: "在小程序中使用时,不建议嵌套在其他容器/组件中,以免抽屉被遮盖";
|
|
119
|
-
readonly figureIcon: "../figureIcons/
|
|
120
|
-
readonly icon: "../icons/
|
|
119
|
+
readonly figureIcon: "../figureIcons/WdDrawer.svg";
|
|
120
|
+
readonly icon: "../icons/WdDrawer.svg";
|
|
121
121
|
readonly category: "布局";
|
|
122
122
|
readonly categoryOrder: 200;
|
|
123
123
|
readonly componentOrder: 150;
|
|
@@ -85,7 +85,7 @@ const data = Type.Object({
|
|
|
85
85
|
closeType: Type.Array(Type.String(), {
|
|
86
86
|
title: '关闭方式',
|
|
87
87
|
default: ['outerClick'],
|
|
88
|
-
description: '多选模式,outerClick
|
|
88
|
+
description: '多选模式,outerClick-点击蒙层关闭,esc-点击键盘ESC关闭(仅在PC端生效)',
|
|
89
89
|
'x-index': 30,
|
|
90
90
|
'x-category': '高级属性',
|
|
91
91
|
'x-helper-text': '点击键盘ESC键关闭抽屉仅在PC端生效',
|
|
@@ -94,7 +94,7 @@ const data = Type.Object({
|
|
|
94
94
|
defaultValue: ['outerClick'],
|
|
95
95
|
options: Tuple([
|
|
96
96
|
{
|
|
97
|
-
label: '
|
|
97
|
+
label: '点击蒙层关闭',
|
|
98
98
|
value: 'outerClick',
|
|
99
99
|
},
|
|
100
100
|
{
|
|
@@ -324,8 +324,8 @@ const config = defineConfig({
|
|
|
324
324
|
title: '抽屉',
|
|
325
325
|
description: '屏幕边缘滑出的浮层面板。',
|
|
326
326
|
propertyPanelTips: '在小程序中使用时,不建议嵌套在其他容器/组件中,以免抽屉被遮盖',
|
|
327
|
-
figureIcon: '../figureIcons/
|
|
328
|
-
icon: '../icons/
|
|
327
|
+
figureIcon: '../figureIcons/WdDrawer.svg',
|
|
328
|
+
icon: '../icons/WdDrawer.svg',
|
|
329
329
|
category: '布局',
|
|
330
330
|
categoryOrder: 200,
|
|
331
331
|
componentOrder: 150,
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -2061,8 +2061,8 @@ export declare const components: {
|
|
|
2061
2061
|
readonly title: "抽屉";
|
|
2062
2062
|
readonly description: "屏幕边缘滑出的浮层面板。";
|
|
2063
2063
|
readonly propertyPanelTips: "在小程序中使用时,不建议嵌套在其他容器/组件中,以免抽屉被遮盖";
|
|
2064
|
-
readonly figureIcon: "../figureIcons/
|
|
2065
|
-
readonly icon: "../icons/
|
|
2064
|
+
readonly figureIcon: "../figureIcons/WdDrawer.svg";
|
|
2065
|
+
readonly icon: "../icons/WdDrawer.svg";
|
|
2066
2066
|
readonly category: "布局";
|
|
2067
2067
|
readonly categoryOrder: 200;
|
|
2068
2068
|
readonly componentOrder: 150;
|
|
@@ -21675,8 +21675,8 @@ declare const _default: {
|
|
|
21675
21675
|
readonly title: "抽屉";
|
|
21676
21676
|
readonly description: "屏幕边缘滑出的浮层面板。";
|
|
21677
21677
|
readonly propertyPanelTips: "在小程序中使用时,不建议嵌套在其他容器/组件中,以免抽屉被遮盖";
|
|
21678
|
-
readonly figureIcon: "../figureIcons/
|
|
21679
|
-
readonly icon: "../icons/
|
|
21678
|
+
readonly figureIcon: "../figureIcons/WdDrawer.svg";
|
|
21679
|
+
readonly icon: "../icons/WdDrawer.svg";
|
|
21680
21680
|
readonly category: "布局";
|
|
21681
21681
|
readonly categoryOrder: 200;
|
|
21682
21682
|
readonly componentOrder: 150;
|
|
@@ -404,7 +404,7 @@ export const FORM_ITEM_DATA = {
|
|
|
404
404
|
'x-category': X_CATEGORY.COMMON,
|
|
405
405
|
required: true,
|
|
406
406
|
description: '关联腾讯地图的APIs,小程序会调用微信官方接口实现定位,请确保已通过相关接口申请,详细说明可查看该组件说明文档',
|
|
407
|
-
'x-helper-text': '如需小程序端使用,请务必参考 [配置指引](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/
|
|
407
|
+
'x-helper-text': '如需小程序端使用,请务必参考 [配置指引](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/WdLocation#%E9%85%8D%E7%BD%AE%E6%8C%87%E5%BC%95) 完成微信接口权限申请,并调整appJson内容',
|
|
408
408
|
'x-component': 'data-source-select',
|
|
409
409
|
'x-component-props': {
|
|
410
410
|
dsType: 'cloud-integration',
|
|
@@ -1864,7 +1864,7 @@ export const FORM_ITEM_DATA = {
|
|
|
1864
1864
|
target: 'selectFieldLabel',
|
|
1865
1865
|
condition: '{{ Boolean($value) }}',
|
|
1866
1866
|
schema: {
|
|
1867
|
-
enum: '{{getDataSourceValueOptions($form?.values?.dataSourceName, true, true).filter(i=>i.type==="string")}}',
|
|
1867
|
+
enum: '{{getDataSourceValueOptions($form?.values?.dataSourceName, true, true).filter(i=>i.type==="string"&&"x-enum"!==i.format)}}',
|
|
1868
1868
|
},
|
|
1869
1869
|
},
|
|
1870
1870
|
],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
@cloudbase/weda-ui v3.26.
|
|
2
|
+
@cloudbase/weda-ui v3.26.2
|
|
3
3
|
*/
|
|
4
4
|
@charset "UTF-8";@media (min-width:1024px){.weda-ui .weui-cells{font-size:1em}.weui .weui-cell_active:active{background-color:unset!important}}@font-face{font-family:lcap-icon;font-weight:400;font-style:normal;src:url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAkMAA0AAAAAFZgAAAi1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCXhEICpxYlmoLTgABNgIkA1gEIAWDMweDBRtzEVGUTVKf7GdCpjLGY/HIYGvbDpn6q7Qdj3xvUaZJUNFads3M7geYVSSiCgsZJYFkhEfn2DjU9//jpn8D1QTqVBQqSrtAVZAq1bwkpTOo0Hbz2tnYfkP3ZzAxpv6ZiSFf3OHh8/b+/oqzxIt4QmFX5ImmIe0SWAOEOJL2n9ZSO5PcCwErnTjzLxOYud0Az24IS8AOXSWgBtyL2lbFtkKxMAhSoPNdlrMFakJqTjuamX+3E3teqiTm6/UpPkH213oLGNahKuAtpQ0wbERrXcnzO1bBpK388B4D6I5fCT9kh69EbSy65RKsi/26+7qKtJv2oREq98FIbnbJO3TaMjBjPcwtqFDG9qp0XxcX/7ndSrUHxotP16TcVrHOGHgIM0PwK6JIMvN/BgpiRTDc/CFwhO+x7ZDYI/ONMoO4NDIX3PYHqpDAWg0a1byp4P4j3ft6fX2jqrvbO6bLU5gtI53w8U4ueG4vS7h0Ze7t9hJUld5xMnwpJp2X5O8KxChB4KG0IQ8pBk+JUXq17qFT7cTN1G17zf2SrGdNz1yMi7Agh0PzRINR0otFF515Z3Fzzml7wfmCrEvFl1zV9wiL6o6j8ELh5LgzjkKpbVTilkw1XLvyYxiCxZHZhpkOEZY3gDto5Ci7PcrBzbTTOYWZGNeqCfoBN0loREx3AceICXbDYFPHIUNaFz37kj0Ei2vbd+MI4fpcJncQ7UiqZzDbycj160Ox7c5YRB0pveJQ3YE71D9yKW5lF9orrq/YQX3XWXa1DDNuc8TQbUcr6ezQQEfN/bEOsmgp7+bEmaOZvxxKsTdORFitIiMxPsBbiIQUJqBxjw7Wv8OPnY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.weda-formcells__pc.horizontal,.wd-form--vertical-right .wedatea2td-form .weda-formcells__pc.horizontal,.wedatea2td-form--vertical .wd-form--horizontal-left .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form--horizontal-right .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form-item.wd-form-item--horizontal-left .wd-form-item-wrap,.wedatea2td-form--vertical .wd-form-item.wd-form-item--horizontal-right .wd-form-item-wrap,.wedatea2td-form--vertical .wedatea2td-form .weda-formcells__pc.horizontal{flex-direction:column}.g-swiper-item>div>*{max-width:100%;max-height:100%;object-fit:cover;max-width:100%;object-fit:cover;max-width:100%;max-height:100%;object-fit:cover;width:100%;height:auto;max-width:100%;object-fit:cover}.form-detail-wrap .form-detail-content-wrap .form-detail-group-header-container{display:flex;align-items:center;justify-content:space-between}.weda-graphic-card .weda-graphic-card__col .weda-graphic-card__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weda-graphic-card .weda-graphic-card__col .weda-graphic-card__desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weda-menu .wedatea2td-menu--light .wedatea2td-menu__list li.is-selected>.wedatea2td-menu__item:hover,.wedatea2td-drawer .wedatea2td-menu--light .wedatea2td-menu__list li .wedatea2td-menu__item:hover{background-color:var(--weda-navigation-menu-hover-color)}.weda-menu-mobile .weda-menu__wrapper{display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 2px rgba(0,0,0,.05)}.weda-menu .wedatea2td-menu__text .menu-text,.weda-menu__drawer .wedatea2td-menu__text .menu-text{display:flex;justify-content:center;align-items:center}.ExEditor-basic{box-sizing:border-box;min-height:var(--exeditor-editor-min-height,100px);background:var(--exeditor-editor-background,#fff);padding:var(--exeditor-editor-padding,20px);white-space:pre-wrap;--exeditor-hr-color:var(--exeditor-basic-hr-color, #e7e7e7);--exeditor-link-color:var(--exeditor-basic-link-color, #0052ff);--exeditor-selected-outline:var(--exeditor-basic-selected-outline, 2px solid #68cef8);--exeditor-selected-background:var(--exeditor-basic-selected-background, rgba(24, 144, 255, 0.3));--exeditor-selected-cell-background:var(--exeditor-basic-selected-cell-background, rgba(24, 144, 255, 0.15));--exeditor-formula-vertical-align:var(--exeditor-basic-formula-vertical-align, middle)}@media (max-width:1024px){.g-swiper .g-swiper__turn-next,.g-swiper .g-swiper__turn-pre{display:none}.modal-table-delete .wedatea2td-dialog__inner,.model-relation-selector-modal .wedatea2td-dialog__inner,.wedatea2td-dialog__inner{min-width:0;width:90%;margin:10px 0}.wedatea2td-form.model-form{width:100%}}.markdown-body .octicon{fill:currentColor}.markdown-body pre{word-wrap:normal}.wd-form-item.wd-pc-rich-text-root .ExEditor-basic,.wd-form-item.wd-pc-rich-text-root .exeditor-toolbar{background-color:inherit}.wd-add-relation-button-wrap{display:flex;align-items:center;color:var(--wd-color-brand,#0052d9);white-space:pre-wrap}.weda-import-csv-file-modal .file-json-map-wrap{display:flex;flex-direction:column;box-sizing:border-box}.weda-import-csv-file-modal .import-file-result-wrap .error-container{display:flex;flex-direction:column}.weda-import-csv-file-modal .import-file-result-wrap .error-content{flex:1}.wd-table-wrap-filter .wedatea2td-input:focus,.wd-table-wrap-filter .wedatea2td-input:hover,.wd-table-wrap-filter .wedatea2td-textarea-group:focus,.wd-table-wrap-filter .wedatea2td-textarea-group:hover,.wd-table-wrap-filter .wedatea2td-textarea:focus,.wd-table-wrap-filter .wedatea2td-textarea:hover,.wedatea2td-overlay .wedatea2td-checkbox:focus,.wedatea2td-overlay .wedatea2td-checkbox:hover,.wedatea2td-overlay input[type=checkbox]:focus,.wedatea2td-overlay input[type=checkbox]:hover{border-color:var(--wd-color-brand,#0052d9)}.weda-ui_mapChoose_search_input_clear{display:flex;justify-content:center}.form-select-map .wedatea2td-dialog__inner{box-shadow:none;min-width:100vw!important}.weda-ui-custom-calendar-op__end,.weda-ui-custom-calendar-op__start{display:flex;align-items:center}.weui-tag span{word-wrap:break-word;word-break:break-word}.weda-ui-user-select-container-list__start .depart-tree .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content,.weda-ui-user-select-container-list__start .depart-tree .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content .wedatea2td-tree__label,.weda-ui-user-select-container-list__start .wedatea2td-tree.wedatea2td-tree--checkbox-separate .wedatea2td-tree__node.is-selected>.wedatea2td-tree__node-content .wedatea2td-tree__label .wedatea2td-tree__label-title{background-color:var(--wd-color-brand-light,#d4e3fc)}.weda-select-user-dept-breadcrumb{display:flex;align-items:center}.form-location-con_disabled{opacity:.4}body{font-size:var(--wd-font-base)}@font-face{font-family:wd-lcap-icon;font-weight:400;font-style:normal;src:url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAkMAA0AAAAAFZgAAAi1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCXhEICpxYlmoLTgABNgIkA1gEIAWDMweDBRtzEVGUTVKf7GdCpjLGY/HIYGvbDpn6q7Qdj3xvUaZJUNFads3M7geYVSSiCgsZJYFkhEfn2DjU9//jpn8D1QTqVBQqSrtAVZAq1bwkpTOo0Hbz2tnYfkP3ZzAxpv6ZiSFf3OHh8/b+/oqzxIt4QmFX5ImmIe0SWAOEOJL2n9ZSO5PcCwErnTjzLxOYud0Az24IS8AOXSWgBtyL2lbFtkKxMAhSoPNdlrMFakJqTjuamX+3E3teqiTm6/UpPkH213oLGNahKuAtpQ0wbERrXcnzO1bBpK388B4D6I5fCT9kh69EbSy65RKsi/26+7qKtJv2oREq98FIbnbJO3TaMjBjPcwtqFDG9qp0XxcX/7ndSrUHxotP16TcVrHOGHgIM0PwK6JIMvN/BgpiRTDc/CFwhO+x7ZDYI/ONMoO4NDIX3PYHqpDAWg0a1byp4P4j3ft6fX2jqrvbO6bLU5gtI53w8U4ueG4vS7h0Ze7t9hJUld5xMnwpJp2X5O8KxChB4KG0IQ8pBk+JUXq17qFT7cTN1G17zf2SrGdNz1yMi7Agh0PzRINR0otFF515Z3Fzzml7wfmCrEvFl1zV9wiL6o6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CR46/+MZFkk2djoLT1IzKCbi3WV1hnUrcvSm+MZtRSpiYWanQU+67DN62G7tnPGP8h5DgBGvMgjgCILl0eQyJQoo5wKKqmimhpqqSOQIIIJQUQoYYQTQSRRRBNDLHGIkRBPAonZMHXOzF6Z99D0PpIk80xVIUlCBjmykYNc5CEfBShEJaqggBIqjzpSRkIGObKRg1zkIR8FKEQlqqCAEiqPulNOAgAA) format("woff2")}.t-icon{speak:none;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wd-space-align-items--flex-start{align-items:flex-start;align-items:center;align-items:flex-end}.wd-space-justify-content--flex-start{justify-content:flex-start;justify-content:center;justify-content:flex-end}.wd-btn{--wd-btn-sm-padding:0.0625rem calc(var(--wd-space-base) * 2);--wd-btn-md-padding:0.25rem calc(var(--wd-space-base) * 4);--wd-btn-lg-padding:0.4375rem calc(var(--wd-space-base) * 6);--wd-btn-margin-top:0;--wd-btn-margin-top:0;--wd-btn-font-size-sm:var(--wd-font-size-2);--wd-btn-line-height-sm:1.5;--wd-btn-min-height-sm:24px;--wd-btn-font-size-md:var(--wd-font-size-3);--wd-btn-line-height-md:1.5;--wd-btn-min-height-md:32px;--wd-btn-font-size-lg:var(--wd-font-size-4);--wd-btn-line-height-lg:1.5;--wd-btn-min-height-lg:40px;--wd-btn-icon-space-sm:var(--wd-space-base);--wd-btn-icon-space-md:calc(var(--wd-space-base) * 2);--wd-btn-icon-space-lg:calc(var(--wd-space-base) * 3);--wd-btn-icon-size-sm:calc(var(--wd-btn-font-size-sm) + 0.125rem);--wd-btn-icon-size-md:calc(var(--wd-btn-font-size-md) + 0.125rem);--wd-btn-icon-size-lg:calc(var(--wd-btn-font-size-lg) + 0.25rem);--wd-btn-border-radius:var(--wd-border-radius);--wd-btn-color-text:var(--wd-color-text-default);--wd-btn-color-text-inverse:var(--wd-color-text-inverse);--wd-btn-color-text-hover:var(--wd-color-text-default);--wd-btn-color-text-active:var(--wd-color-text-default);--wd-btn-color-text-focus:var(--wd-color-text-default);--wd-btn-color-text-disabled:var(--wd-color-text-disabled);--wd-btn-color-brand:var(--wd-color-brand);--wd-btn-color-brand-hover:var(--wd-color-brand-hover);--wd-btn-color-brand-active:var(--wd-color-brand-active);--wd-btn-color-brand-focus:var(--wd-color-brand-focus);--wd-btn-color-brand-disabled:var(--wd-color-brand-disabled);--wd-btn-color-warning:var(--wd-color-warning);--wd-btn-color-warning-hover:var(--wd-color-warning-hover);--wd-btn-color-warning-active:var(--wd-color-warning-active);--wd-btn-color-warning-focus:var(--wd-color-warning-focus);--wd-btn-color-warning-disabled:var(--wd-color-warning-disabled);--wd-btn-color-error:var(--wd-color-error);--wd-btn-color-error-hover:var(--wd-color-error-hover);--wd-btn-color-error-active:var(--wd-color-error-active);--wd-btn-color-error-focus:var(--wd-color-error-focus);--wd-btn-color-error-disabled:var(--wd-color-error-disabled);--wd-btn-color-gray:var(
|
|
5
5
|
--wd-color-gray-1
|
|
@@ -12,7 +12,6 @@ import { WD_DRAWER_PLACEMENT } from '../../../enum';
|
|
|
12
12
|
const DEFAULT_DURATION = 300;
|
|
13
13
|
const DEFAULT_Z_INDEX = 1000;
|
|
14
14
|
const MASK_Z_INDEX_OFFSET = 1;
|
|
15
|
-
const DEFAULT_DELAY = 100;
|
|
16
15
|
// 默认样式对象
|
|
17
16
|
const DEFAULT_STYLE = {};
|
|
18
17
|
const WdDrawer = forwardRef(function WdDrawer(props, ref) {
|
|
@@ -60,29 +59,6 @@ const WdDrawer = forwardRef(function WdDrawer(props, ref) {
|
|
|
60
59
|
document.removeEventListener('keydown', handleKeyDown);
|
|
61
60
|
};
|
|
62
61
|
}, [close, escClosable, platform, visible]);
|
|
63
|
-
// 点击外部关闭
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
const handleDocumentClick = (e) => {
|
|
66
|
-
// 只有在允许点击关闭时才处理
|
|
67
|
-
if (maskClosable && visible && drawerRef.current) {
|
|
68
|
-
// 检查点击目标是否在抽屉内部
|
|
69
|
-
if (!drawerRef.current.contains(e.target)) {
|
|
70
|
-
close();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
if (visible && maskClosable) {
|
|
75
|
-
// 延迟添加事件监听器,避免立即触发
|
|
76
|
-
// eslint-disable-next-line rulesdir/no-timer
|
|
77
|
-
const timer = setTimeout(() => {
|
|
78
|
-
document.addEventListener('click', handleDocumentClick);
|
|
79
|
-
}, DEFAULT_DELAY);
|
|
80
|
-
return () => {
|
|
81
|
-
clearTimeout(timer);
|
|
82
|
-
document.removeEventListener('click', handleDocumentClick);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}, [close, maskClosable, visible]);
|
|
86
62
|
// 遮罩层点击关闭
|
|
87
63
|
const handleMaskClick = (e) => {
|
|
88
64
|
if (maskClosable && e.target === maskRef.current) {
|
|
@@ -138,11 +138,9 @@ export const WdModal = forwardRef(function WdModal(props, ref) {
|
|
|
138
138
|
}
|
|
139
139
|
}, children: _jsxs("div", { style: { ...styleList, ...style }, className: classNames(modalBdClasses), onClick: (e) => {
|
|
140
140
|
e.stopPropagation();
|
|
141
|
-
}, children: [
|
|
141
|
+
}, children: [_jsx("div", { className: `${classPrefix}-modal-bd__hd`, style: headerFooterStlye, children: props.headerSlot }), _jsx("div", { className: `${classPrefix}-modal-bd__main`, children: props.contentSlot }), _jsx("div", { className: `${classPrefix}-modal-bd__ft ${['confirm', 'notice'].includes(props.template) && platform === 'h5'
|
|
142
142
|
? `${classPrefix}-modal-bd__ft-text-btn`
|
|
143
|
-
: ''} ${props.template === 'notice' && platform === 'h5'
|
|
144
|
-
? `${classPrefix}-modal-bd__ft-text-btn--vertical`
|
|
145
|
-
: ''}`, style: headerFooterStlye, children: props.footerSlot }))] }) })] }));
|
|
143
|
+
: ''} ${props.template === 'notice' && platform === 'h5' ? `${classPrefix}-modal-bd__ft-text-btn--vertical` : ''}`, style: headerFooterStlye, children: props.footerSlot })] }) })] }));
|
|
146
144
|
};
|
|
147
145
|
return (_jsx("div", { id: id, className: classNames(classes, className), style: { display: (style === null || style === void 0 ? void 0 : style.display) || 'block' }, "data-testid": "wd-modal-test", children: maskPreToShow && renderNode() }));
|
|
148
146
|
});
|
|
@@ -6,8 +6,9 @@ import { LoadingTip } from 'tea-component';
|
|
|
6
6
|
import { SelectUI as Select } from '../select/selectUI';
|
|
7
7
|
import { WdIcon } from '../../wd-icon';
|
|
8
8
|
import { getTableColumns } from '../../wd-table/components/FieldRender';
|
|
9
|
+
import { EnumView } from '../../wd-table/components/FieldRender/Form/Enum';
|
|
9
10
|
import { useAuthFields } from '../../wd-table/hooks/useAuthFields';
|
|
10
|
-
import { usePlatform } from '../../../utils/platform';
|
|
11
|
+
import { usePlatform, textToString } from '../../../utils/platform';
|
|
11
12
|
import { DataSource } from '../../../utils/datasource';
|
|
12
13
|
import { useSyncValue } from '../../../utils/hooks/useSyncValue';
|
|
13
14
|
import isObjectEqual from '../../../utils/isObjectEqual';
|
|
@@ -15,7 +16,14 @@ import { deepClone } from '../../../utils/tool';
|
|
|
15
16
|
import { useChooseList } from '../hooks/useChooseList';
|
|
16
17
|
import { getDefaultQuery } from './queryParams';
|
|
17
18
|
import { EnumHoc } from '../../../utils/hooks/EnumHoc';
|
|
18
|
-
const
|
|
19
|
+
const OptionTextTitle = ({ field, values }) => {
|
|
20
|
+
if (field.format === 'x-enum') {
|
|
21
|
+
return _jsx(EnumView, { field: field, values: values, showRelationWithTag: false });
|
|
22
|
+
}
|
|
23
|
+
return _jsx("span", { title: textToString(values), children: textToString(values) });
|
|
24
|
+
};
|
|
25
|
+
const OptionText = ({ mode, option, selectFields, authFields, onChange, onRelationOptionJump, enableRelationOptionJump, showLabelField, }) => {
|
|
26
|
+
var _a;
|
|
19
27
|
const platform = usePlatform();
|
|
20
28
|
const columns = useMemo(() => {
|
|
21
29
|
return getTableColumns({
|
|
@@ -44,7 +52,7 @@ const OptionText = ({ mode, option, selectFields, authFields, onChange, onRelati
|
|
|
44
52
|
option,
|
|
45
53
|
});
|
|
46
54
|
}
|
|
47
|
-
}, children: [_jsxs("div", { className: "wd-relation-select-header", children: [_jsx("p", { className: "wd-relation-select-header-text", title: (option === null || option === void 0 ? void 0 : option.label) || (option === null || option === void 0 ? void 0 : option.value), children: (option === null || option === void 0 ? void 0 : option.label)
|
|
55
|
+
}, children: [_jsxs("div", { className: "wd-relation-select-header", children: [_jsx("p", { className: "wd-relation-select-header-text", title: (option === null || option === void 0 ? void 0 : option.label) || (option === null || option === void 0 ? void 0 : option.value), children: _jsx(OptionTextTitle, { field: showLabelField, values: (_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.value }) }), enableRelationOptionJump && (_jsx("span", { onClick: () => {
|
|
48
56
|
onRelationOptionJump({ item: option });
|
|
49
57
|
}, children: _jsx(WdIcon, { name: "td:jump", size: "s", type: "inner" }) }))] }), _jsxs("div", { className: "wd-relation-select-option-group", children: [_jsx("div", { className: "wd-relation-select-option-header", children: columns === null || columns === void 0 ? void 0 : columns.map((i) => (_jsx("div", { className: "wd-relation-select-option-text", style: { width: columns.length > 1 ? i.width : 'auto' }, children: i.header }, i.key))) }), _jsx("div", { className: "wd-relation-select-option-content", children: columns === null || columns === void 0 ? void 0 : columns.map((i) => (_jsx("div", { className: "wd-relation-select-option-text", style: { width: columns.length > 1 ? i.width : 'auto' }, children: i.render(option === null || option === void 0 ? void 0 : option.extra) }, i.key))) })] })] }));
|
|
50
58
|
};
|
|
@@ -99,12 +107,23 @@ export function RelationSelect(props) {
|
|
|
99
107
|
const [isLoading, setIsLoading] = useSyncValue(isValidating, isObjectEqual);
|
|
100
108
|
// 下拉选项数据
|
|
101
109
|
const customOptions = useMemo(() => {
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
const showLabelField = authFields.find((i) => i.name === showLabel);
|
|
111
|
+
if (isRelationSelectOption) {
|
|
112
|
+
return options === null || options === void 0 ? void 0 : options.map((i) => ({
|
|
104
113
|
...i,
|
|
105
|
-
text: (_jsx(OptionText, { mode: mode, option: i, selectFields: selectFields, authFields: authFields, onChange: onChange, onRelationOptionJump: onRelationOptionJump, enableRelationOptionJump: enableRelationOptionJump })),
|
|
106
|
-
}))
|
|
107
|
-
|
|
114
|
+
text: (_jsx(OptionText, { mode: mode, option: i, selectFields: selectFields, authFields: authFields, onChange: onChange, onRelationOptionJump: onRelationOptionJump, enableRelationOptionJump: enableRelationOptionJump, showLabelField: showLabelField })),
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
else if ((showLabelField === null || showLabelField === void 0 ? void 0 : showLabelField.format) === 'x-enum') {
|
|
118
|
+
return options === null || options === void 0 ? void 0 : options.map((i) => {
|
|
119
|
+
var _a;
|
|
120
|
+
return ({
|
|
121
|
+
...i,
|
|
122
|
+
text: _jsx(OptionTextTitle, { field: showLabelField, values: (_a = i.label) !== null && _a !== void 0 ? _a : i.value }),
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
return options;
|
|
108
127
|
}, [
|
|
109
128
|
authFields,
|
|
110
129
|
enableRelationOptionJump,
|
|
@@ -114,6 +133,7 @@ export function RelationSelect(props) {
|
|
|
114
133
|
onRelationOptionJump,
|
|
115
134
|
options,
|
|
116
135
|
selectFields,
|
|
136
|
+
showLabel,
|
|
117
137
|
]);
|
|
118
138
|
const searchOptionListWithWhere = useDebouncedCallback((filter = defaultQuery === null || defaultQuery === void 0 ? void 0 : defaultQuery.filter) => {
|
|
119
139
|
empty();
|
|
@@ -37,8 +37,9 @@ export const formatEnum = (value, field, enumOptions, showRelationWithTag = true
|
|
|
37
37
|
const optionName = field['x-option-name'];
|
|
38
38
|
const isMulti = field['x-multi-select'];
|
|
39
39
|
const options = (enumOptions === null || enumOptions === void 0 ? void 0 : enumOptions[optionName]) || [];
|
|
40
|
+
const optionsMap = new Map(options.map((item) => [item.value, item.text]));
|
|
40
41
|
let val = '-';
|
|
41
|
-
const getTextByValue = (value) =>
|
|
42
|
+
const getTextByValue = (value) => optionsMap.get(value) || value;
|
|
42
43
|
if (isMulti) {
|
|
43
44
|
val = (_a = []
|
|
44
45
|
.concat(value)
|
|
@@ -48,7 +49,7 @@ export const formatEnum = (value, field, enumOptions, showRelationWithTag = true
|
|
|
48
49
|
val = getTextByValue(value);
|
|
49
50
|
}
|
|
50
51
|
if (!showRelationWithTag) {
|
|
51
|
-
return _jsx("span", { title: val, children: val });
|
|
52
|
+
return (_jsx("span", { style: { display: 'inline-block' }, title: val, children: val }));
|
|
52
53
|
}
|
|
53
54
|
return (_jsx(WdTag, { range: val === null || val === void 0 ? void 0 : val.split(',').map((i) => ({
|
|
54
55
|
label: i,
|