@ibiz-template/vue3-components 0.7.41-alpha.111 → 0.7.41-alpha.113
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/{index-BP7a4gcG.js → index-CkG9L_La.js} +4 -4
- package/dist/{index.es-Ur-QLCI4.js → index.es-BU8Fy5we.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-nwkjjlMK.js +1 -0
- package/dist/map-chart-user-BqadFpkw.js +1 -0
- package/dist/{wang-editor-lUuJmqAh.js → wang-editor-9zdglekK.js} +1 -1
- package/dist/{xlsx-util-C1ySj_kQ.js → xlsx-util-DrUAhpzt.js} +1 -1
- package/es/common/map-chart/map-chart.mjs +2 -9
- package/es/common/map-chart-user/map-chart-user.mjs +3 -11
- package/es/control/calendar/calendar.mjs +17 -4
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +4 -2
- package/es/control/calendar/components/calendar-user2/calendar-user2.mjs +4 -3
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +1 -0
- package/es/control/grid/grid/grid-control.util.mjs +14 -1
- package/es/control/grid/grid/grid.mjs +5 -2
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/es/control/map/map.mjs +33 -7
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +2 -2
- package/es/editor/check-box-list/checkbox-list-editor.controller.mjs +11 -1
- package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +9 -4
- package/es/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.mjs +5 -3
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +2 -2
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +2 -2
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +2 -2
- package/es/editor/date-range-select/date-range-select-picker/date-range-select.mjs +18 -16
- package/es/editor/dropdown-list/dropdown-list-editor.controller.mjs +15 -5
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +19 -4
- package/es/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.mjs +17 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +19 -4
- package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +24 -7
- package/es/editor/list-box/list-box-editor.controller.mjs +11 -0
- package/es/editor/list-box/list-box-picker-editor.controller.mjs +11 -0
- package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +7 -0
- package/es/editor/radio-button-list/radio-button-list.controller.mjs +11 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/web-app/adaptive-screen-width.mjs +5 -5
- package/lib/common/map-chart/map-chart.cjs +1 -8
- package/lib/common/map-chart-user/map-chart-user.cjs +2 -10
- package/lib/control/calendar/calendar.cjs +16 -3
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +4 -2
- package/lib/control/calendar/components/calendar-user2/calendar-user2.cjs +4 -3
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +1 -0
- package/lib/control/grid/grid/grid-control.util.cjs +14 -1
- package/lib/control/grid/grid/grid.cjs +5 -2
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/lib/control/map/map.cjs +32 -6
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +2 -2
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
- package/lib/editor/check-box-list/checkbox-list-editor.controller.cjs +11 -1
- package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +9 -4
- package/lib/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.cjs +5 -3
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +2 -2
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +2 -2
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +2 -2
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +2 -2
- package/lib/editor/date-range-select/date-range-select-picker/date-range-select.cjs +18 -16
- package/lib/editor/dropdown-list/dropdown-list-editor.controller.cjs +15 -5
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +19 -4
- package/lib/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.cjs +17 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +19 -4
- package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +24 -7
- package/lib/editor/list-box/list-box-editor.controller.cjs +11 -0
- package/lib/editor/list-box/list-box-picker-editor.controller.cjs +11 -0
- package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +7 -0
- package/lib/editor/radio-button-list/radio-button-list.controller.cjs +11 -1
- package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/web-app/adaptive-screen-width.cjs +5 -5
- package/package.json +7 -7
- package/src/common/map-chart/map-chart.tsx +3 -5
- package/src/common/map-chart-user/map-chart-user.tsx +3 -8
- package/src/control/calendar/calendar.tsx +27 -1
- package/src/control/calendar/components/calendar-user/calendar-user.tsx +8 -2
- package/src/control/calendar/components/calendar-user2/calendar-user2.tsx +7 -3
- package/src/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.tsx +1 -0
- package/src/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.tsx +1 -0
- package/src/control/grid/grid/grid-control.util.ts +20 -0
- package/src/control/grid/grid/grid.tsx +3 -0
- package/src/control/grid/grid-column/grid-field-column/grid-field-column.scss +3 -3
- package/src/control/map/map.tsx +44 -4
- package/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.scss +12 -1
- package/src/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.tsx +2 -1
- package/src/editor/check-box-list/checkbox-list-editor.controller.ts +11 -0
- package/src/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.tsx +28 -6
- package/src/editor/color-picker/ibiz-color-mpicker-default/ibiz-color-mpicker-default.tsx +10 -2
- package/src/editor/data-picker/ibiz-mpicker/ibiz-mpicker.tsx +2 -1
- package/src/editor/data-picker/ibiz-picker/ibiz-picker.tsx +2 -1
- package/src/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.tsx +2 -1
- package/src/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.tsx +2 -5
- package/src/editor/date-range-select/date-range-select-picker/date-range-select.tsx +32 -15
- package/src/editor/dropdown-list/dropdown-list-editor.controller.ts +12 -2
- package/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +34 -4
- package/src/editor/dropdown-list/ibiz-tree-picker/ibiz-tree-picker.tsx +28 -1
- package/src/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.tsx +31 -4
- package/src/editor/list-box/ibiz-list-box/ibiz-list-box.tsx +45 -9
- package/src/editor/list-box/list-box-editor.controller.ts +11 -0
- package/src/editor/list-box/list-box-picker-editor.controller.ts +11 -0
- package/src/editor/radio-button-list/ibiz-radio/ibiz-radio.tsx +13 -0
- package/src/editor/radio-button-list/radio-button-list.controller.ts +11 -0
- package/src/panel-component/auth-userinfo/auth-userinfo.scss +1 -1
- package/src/web-app/adaptive-screen-width.ts +12 -6
- package/dist/map-chart-DbBbP4qh.js +0 -1
- package/dist/map-chart-user-CfTAGaU5.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.113_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.117_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.113_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.117_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
package/src/control/map/map.tsx
CHANGED
|
@@ -55,7 +55,45 @@ const MapControl = defineComponent({
|
|
|
55
55
|
|
|
56
56
|
const mapStyle = c.model.mapStyle;
|
|
57
57
|
const { semanticClass, semanticStyle } = useSemanticNode(c);
|
|
58
|
+
// 子类类名透传
|
|
59
|
+
const childClass = [
|
|
60
|
+
{
|
|
61
|
+
class: semanticClass('editor.content'),
|
|
62
|
+
selector: '.ibiz-control-map__map',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
class: semanticClass('editor.goback'),
|
|
66
|
+
selector: '.ibiz-map-chart-user__goback',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
class: semanticClass('editor.goback'),
|
|
70
|
+
selector: '.ibiz-map-chart__goback',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
class: semanticClass('editor.fullscreen'),
|
|
74
|
+
selector: '.ibiz-map-chart-user__fullscreen',
|
|
75
|
+
},
|
|
76
|
+
];
|
|
58
77
|
|
|
78
|
+
// 子类样式透传
|
|
79
|
+
const childStyle = [
|
|
80
|
+
{
|
|
81
|
+
style: semanticStyle('editor.content'),
|
|
82
|
+
selector: '.ibiz-control-map__map',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
style: semanticStyle('editor.goback'),
|
|
86
|
+
selector: '.ibiz-map-chart-user__goback',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
style: semanticStyle('editor.goback'),
|
|
90
|
+
selector: '.ibiz-map-chart__goback',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
style: semanticStyle('editor.fullscreen'),
|
|
94
|
+
selector: '.ibiz-map-chart-user__fullscreen',
|
|
95
|
+
},
|
|
96
|
+
];
|
|
59
97
|
const mapOpts = computed<Partial<MapOptions>>(() => {
|
|
60
98
|
return {
|
|
61
99
|
strAreaCode: c.state.strAreaCode,
|
|
@@ -70,6 +108,8 @@ const MapControl = defineComponent({
|
|
|
70
108
|
mapRef,
|
|
71
109
|
mapOpts,
|
|
72
110
|
mapStyle,
|
|
111
|
+
childClass,
|
|
112
|
+
childStyle,
|
|
73
113
|
semanticClass,
|
|
74
114
|
semanticStyle,
|
|
75
115
|
};
|
|
@@ -87,8 +127,7 @@ const MapControl = defineComponent({
|
|
|
87
127
|
options={this.mapOpts}
|
|
88
128
|
areaData={state.areaData}
|
|
89
129
|
pointData={state.pointData}
|
|
90
|
-
|
|
91
|
-
class={[this.ns.e('map'), this.semanticClass('content')]}
|
|
130
|
+
class={this.ns.e('map')}
|
|
92
131
|
></iBizMapChartUser>
|
|
93
132
|
) : (
|
|
94
133
|
<iBizMapChart
|
|
@@ -97,8 +136,7 @@ const MapControl = defineComponent({
|
|
|
97
136
|
options={this.mapOpts}
|
|
98
137
|
areaData={state.areaData}
|
|
99
138
|
pointData={state.pointData}
|
|
100
|
-
|
|
101
|
-
class={[this.ns.e('map'), this.semanticClass('content')]}
|
|
139
|
+
class={this.ns.e('map')}
|
|
102
140
|
onPointClick={(e: IMapData) => {
|
|
103
141
|
this.c.onPointClick(e);
|
|
104
142
|
}}
|
|
@@ -114,6 +152,8 @@ const MapControl = defineComponent({
|
|
|
114
152
|
controller={this.c}
|
|
115
153
|
class={this.semanticClass('root')}
|
|
116
154
|
style={this.semanticStyle('root')}
|
|
155
|
+
v-child-class={this.childClass}
|
|
156
|
+
v-child-style={this.childStyle}
|
|
117
157
|
>
|
|
118
158
|
{content}
|
|
119
159
|
{this.c.state.enableNavView && this.c.state.showNavIcon ? (
|
|
@@ -5,6 +5,7 @@ $autocomplete: (
|
|
|
5
5
|
line-height: getCssVar(form-item, line-height), // 行高
|
|
6
6
|
empty-bg-color: getCssVar(color, bg, 3), // 空值背景色
|
|
7
7
|
readonly-color: getCssVar(form-item, readonly-color), // 只读字体色
|
|
8
|
+
disabled-color: getCssVar(form-item, disabled-color), // 禁用色
|
|
8
9
|
hover-edit-padding: getCssVar(form-item, hover-edit-padding), // 悬浮编辑态内边距
|
|
9
10
|
);
|
|
10
11
|
|
|
@@ -29,8 +30,17 @@ $autocomplete-action: (
|
|
|
29
30
|
|
|
30
31
|
// 界面行为项
|
|
31
32
|
@include e(action-item) {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
32
36
|
color: getCssVar(autocomplete-action, text-color);
|
|
33
|
-
|
|
37
|
+
@include m(icon) {
|
|
38
|
+
margin-right: getCssVar(spacing, extra-tight);
|
|
39
|
+
}
|
|
40
|
+
@include when(disabled) {
|
|
41
|
+
color: getCssVar(autocomplete, disabled-color);
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
}
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
@include e(empty) {
|
|
@@ -52,6 +62,7 @@ $autocomplete-action: (
|
|
|
52
62
|
|
|
53
63
|
@include e(transfer) {
|
|
54
64
|
@include set-component-css-var('autocomplete', $autocomplete);
|
|
65
|
+
@include set-component-css-var('autocomplete-action', $autocomplete-action);
|
|
55
66
|
@include when(empty) {
|
|
56
67
|
.el-autocomplete-suggestion li {
|
|
57
68
|
padding: 0;
|
|
@@ -302,7 +302,7 @@ export const IBizAutoComplete = defineComponent({
|
|
|
302
302
|
<div
|
|
303
303
|
class={[
|
|
304
304
|
ns.e('action-item'),
|
|
305
|
-
ns.be('popper', '
|
|
305
|
+
ns.be('popper', 'action'),
|
|
306
306
|
semanticClass('editor.popup.action', semanticParams),
|
|
307
307
|
ns.is('disabled', c.groupActionState[detail.id!].disabled),
|
|
308
308
|
]}
|
|
@@ -322,6 +322,7 @@ export const IBizAutoComplete = defineComponent({
|
|
|
322
322
|
)}
|
|
323
323
|
<span
|
|
324
324
|
class={[
|
|
325
|
+
ns.em('action-item', 'label'),
|
|
325
326
|
ns.em('action-item', 'caption'),
|
|
326
327
|
semanticClass('editor.popup.action.label', semanticParams),
|
|
327
328
|
]}
|
|
@@ -24,6 +24,12 @@ export class CheckBoxListEditorController extends CodeListEditorController<IChec
|
|
|
24
24
|
*/
|
|
25
25
|
rowNumber: number | undefined = undefined;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @description 自动选中第一个
|
|
29
|
+
* @memberof CheckBoxListEditorController
|
|
30
|
+
*/
|
|
31
|
+
public autoSelectFirstOption = false;
|
|
32
|
+
|
|
27
33
|
protected async onInit(): Promise<void> {
|
|
28
34
|
super.onInit();
|
|
29
35
|
if (this.model.appCodeListId) {
|
|
@@ -36,5 +42,10 @@ export class CheckBoxListEditorController extends CodeListEditorController<IChec
|
|
|
36
42
|
if (this.editorParams?.rownumber) {
|
|
37
43
|
this.rowNumber = Number(this.editorParams.rownumber);
|
|
38
44
|
}
|
|
45
|
+
if (this.editorParams?.autoselectfirstoption) {
|
|
46
|
+
this.autoSelectFirstOption = this.toBoolean(
|
|
47
|
+
this.editorParams.autoselectfirstoption,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
39
50
|
}
|
|
40
51
|
}
|
|
@@ -29,6 +29,7 @@ import './ibiz-checkbox-list.scss';
|
|
|
29
29
|
* @editorparams {"name":"readonly","parameterType":"boolean","defaultvalue":false,"description":"设置编辑器是否为只读态"}
|
|
30
30
|
* @editorparams {name:rendermode,parameterType:'default' | 'button',defaultvalue:'default',description:默认绘制选项框列表,当值为 'button' 时绘制按钮列表}
|
|
31
31
|
* @editorparams {name:isbtnroundcorner,parameterType:boolean,defaultvalue:false,description:设置按钮是否显示圆角}
|
|
32
|
+
* @editorparams {name:autoselectfirstoption,parameterType:boolean,defaultvalue:false,description:编辑器无值时,自动选中第一个数据}
|
|
32
33
|
* @ignoreprops autoFocus | overflowMode
|
|
33
34
|
* @ignoreemits blur | focus | enter
|
|
34
35
|
*/
|
|
@@ -108,13 +109,40 @@ export const IBizCheckboxList = defineComponent({
|
|
|
108
109
|
return false;
|
|
109
110
|
});
|
|
110
111
|
|
|
112
|
+
// 值分隔符
|
|
113
|
+
const valueSeparator = codeList?.valueSeparator || ',';
|
|
114
|
+
|
|
111
115
|
// 代码表数据
|
|
112
116
|
const items = ref<readonly CodeListItem[]>([]);
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @description 自动选择第一条数据
|
|
120
|
+
* @returns {*} {void}
|
|
121
|
+
*/
|
|
122
|
+
const autoSelectFirstOption = (): void => {
|
|
123
|
+
const item = items.value[0];
|
|
124
|
+
if (!c.autoSelectFirstOption || props.value || !item) return;
|
|
125
|
+
const selections = c.allItems
|
|
126
|
+
? items.value
|
|
127
|
+
.filter(_item => _item.value !== c.allItemsValue)
|
|
128
|
+
.map(_item => _item.value)
|
|
129
|
+
: [item.value];
|
|
130
|
+
emit(
|
|
131
|
+
'change',
|
|
132
|
+
c.model.valueType === 'SIMPLES'
|
|
133
|
+
? selections
|
|
134
|
+
: selections.join(valueSeparator),
|
|
135
|
+
undefined,
|
|
136
|
+
true,
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
113
140
|
watch(
|
|
114
141
|
() => props.data,
|
|
115
142
|
newVal => {
|
|
116
143
|
c.loadCodeList(newVal).then(_codeList => {
|
|
117
144
|
items.value = c.handleCodeListAllItems(_codeList);
|
|
145
|
+
autoSelectFirstOption();
|
|
118
146
|
});
|
|
119
147
|
},
|
|
120
148
|
{
|
|
@@ -146,12 +174,6 @@ export const IBizCheckboxList = defineComponent({
|
|
|
146
174
|
|
|
147
175
|
useCodeListListen(c.model.appCodeListId, c.context.srfappid, fn);
|
|
148
176
|
|
|
149
|
-
// 值分隔符
|
|
150
|
-
let valueSeparator = ',';
|
|
151
|
-
if (codeList && codeList.valueSeparator) {
|
|
152
|
-
valueSeparator = codeList.valueSeparator;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
177
|
const { useInFocusAndBlur, useInValueChange } = useAutoFocusBlur(
|
|
156
178
|
props,
|
|
157
179
|
emit,
|
|
@@ -223,7 +223,11 @@ export const IBizColorMPickerDefault = defineComponent({
|
|
|
223
223
|
<el-select
|
|
224
224
|
v-model={this.curType}
|
|
225
225
|
class={this.ns.b('picker')}
|
|
226
|
-
popper-class={
|
|
226
|
+
popper-class={[
|
|
227
|
+
this.ns.b('popper'),
|
|
228
|
+
this.semanticClass?.('editor.popup'),
|
|
229
|
+
]}
|
|
230
|
+
popper-style={this.semanticStyle?.('editor.popup')}
|
|
227
231
|
onChange={this.handleSchemeChange}
|
|
228
232
|
>
|
|
229
233
|
{{
|
|
@@ -252,7 +256,11 @@ export const IBizColorMPickerDefault = defineComponent({
|
|
|
252
256
|
{this.showTemplateList && (
|
|
253
257
|
<el-select
|
|
254
258
|
class={this.ns.b('template-color-picker')}
|
|
255
|
-
popper-class={
|
|
259
|
+
popper-class={[
|
|
260
|
+
this.ns.b('popper'),
|
|
261
|
+
this.semanticClass?.('editor.popup'),
|
|
262
|
+
]}
|
|
263
|
+
popper-style={this.semanticStyle?.('editor.popup')}
|
|
256
264
|
v-model={this.curTemplateColor}
|
|
257
265
|
onChange={this.handleTemplateColorChange}
|
|
258
266
|
>
|
|
@@ -487,7 +487,7 @@ export const IBizMPicker = defineComponent({
|
|
|
487
487
|
disabled={c.groupActionState[item.id!].disabled}
|
|
488
488
|
title={showTitle(isEllipsis ? item.tooltip : '')}
|
|
489
489
|
class={[
|
|
490
|
-
ns.be('popper', '
|
|
490
|
+
ns.be('popper', 'action'),
|
|
491
491
|
semanticClass('editor.popup.action'),
|
|
492
492
|
]}
|
|
493
493
|
style={semanticStyle('editor.popup.action')}
|
|
@@ -523,6 +523,7 @@ export const IBizMPicker = defineComponent({
|
|
|
523
523
|
<span
|
|
524
524
|
class={[
|
|
525
525
|
ns.em('action-item', 'caption'),
|
|
526
|
+
ns.em('action-item', 'label'),
|
|
526
527
|
semanticClass(
|
|
527
528
|
'editor.popup.action.label',
|
|
528
529
|
semanticParams,
|
|
@@ -492,7 +492,7 @@ export const IBizPicker = defineComponent({
|
|
|
492
492
|
title={showTitle(detail.tooltip)}
|
|
493
493
|
class={[
|
|
494
494
|
ns.e('action-item'),
|
|
495
|
-
ns.be('popper', '
|
|
495
|
+
ns.be('popper', 'action'),
|
|
496
496
|
semanticClass('editor.popup.action', semanticParams),
|
|
497
497
|
ns.is('disabled', c.groupActionState[detail.id!].disabled),
|
|
498
498
|
]}
|
|
@@ -514,6 +514,7 @@ export const IBizPicker = defineComponent({
|
|
|
514
514
|
)}
|
|
515
515
|
<span
|
|
516
516
|
class={[
|
|
517
|
+
ns.em('action-item', 'label'),
|
|
517
518
|
ns.em('action-item', 'caption'),
|
|
518
519
|
semanticClass('editor.popup.action.label', semanticParams),
|
|
519
520
|
]}
|
|
@@ -363,7 +363,7 @@ export const IBizPickerDropDown = defineComponent({
|
|
|
363
363
|
title={showTitle(detail.tooltip)}
|
|
364
364
|
disabled={c.groupActionState[detail.id!].disabled}
|
|
365
365
|
class={[
|
|
366
|
-
ns.be('popper', '
|
|
366
|
+
ns.be('popper', 'action'),
|
|
367
367
|
semanticClass('editor.popup.action', { semanticParams }),
|
|
368
368
|
]}
|
|
369
369
|
style={semanticStyle('editor.popup.action', { semanticParams })}
|
|
@@ -385,6 +385,7 @@ export const IBizPickerDropDown = defineComponent({
|
|
|
385
385
|
<span
|
|
386
386
|
class={[
|
|
387
387
|
ns.em('action-item', 'caption'),
|
|
388
|
+
ns.em('action-item', 'label'),
|
|
388
389
|
semanticClass('editor.popup.action.label', semanticParams),
|
|
389
390
|
]}
|
|
390
391
|
style={semanticStyle('editor.popup.action.label', semanticParams)}
|
|
@@ -596,11 +596,8 @@ export const IBizPickerSelectView = defineComponent({
|
|
|
596
596
|
this.semanticClass('editor.content'),
|
|
597
597
|
]}
|
|
598
598
|
style={this.semanticStyle('editor.content')}
|
|
599
|
-
popper-class={[
|
|
600
|
-
|
|
601
|
-
this.semanticClass('editor.popper'),
|
|
602
|
-
]}
|
|
603
|
-
popper-style={this.semanticStyle('editor.popper')}
|
|
599
|
+
popper-class={[this.ns.b('popper'), this.semanticClass('editor.popup')]}
|
|
600
|
+
popper-style={this.semanticStyle('editor.popup')}
|
|
604
601
|
onVisibleChange={this.onVisibleChange}
|
|
605
602
|
onKeydown={this.handleDropDownKeyDown}
|
|
606
603
|
>
|
|
@@ -51,19 +51,19 @@ export const IBizDateRangeSelect = defineComponent({
|
|
|
51
51
|
selector: `.${ns.e('label')}`,
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
class: semanticClass('editor.
|
|
54
|
+
class: semanticClass('editor.dateType'),
|
|
55
55
|
selector: `.${ns.em('date-range', 'editor')}`,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
class: semanticClass('editor.
|
|
58
|
+
class: semanticClass('editor.dateType.suffix'),
|
|
59
59
|
selector: `.${ns.em('date-range', 'editor-suffix')}`,
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
class: semanticClass('editor.
|
|
62
|
+
class: semanticClass('editor.dateUnit'),
|
|
63
63
|
selector: `.el-input__inner`,
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
class: semanticClass('editor.
|
|
66
|
+
class: semanticClass('editor.dateUnit.suffix'),
|
|
67
67
|
selector: '.el-input__suffix',
|
|
68
68
|
},
|
|
69
69
|
];
|
|
@@ -75,19 +75,19 @@ export const IBizDateRangeSelect = defineComponent({
|
|
|
75
75
|
selector: `.${ns.e('label')}`,
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
style: semanticStyle('editor.
|
|
78
|
+
style: semanticStyle('editor.dateType'),
|
|
79
79
|
selector: `.${ns.em('date-range', 'editor')}`,
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
style: semanticStyle('editor.
|
|
82
|
+
style: semanticStyle('editor.dateType.suffix'),
|
|
83
83
|
selector: `.${ns.em('date-range', 'editor-suffix')}`,
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
style: semanticStyle('editor.
|
|
86
|
+
style: semanticStyle('editor.dateUnit'),
|
|
87
87
|
selector: `.el-input__inner`,
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
style: semanticStyle('editor.
|
|
90
|
+
style: semanticStyle('editor.dateUnit.suffix'),
|
|
91
91
|
selector: '.el-input__suffix',
|
|
92
92
|
},
|
|
93
93
|
];
|
|
@@ -205,14 +205,26 @@ export const IBizDateRangeSelect = defineComponent({
|
|
|
205
205
|
<div class={ns.em('date-unit', 'editor')}>
|
|
206
206
|
<el-select
|
|
207
207
|
v-model={unitValue.value}
|
|
208
|
-
class={ns.em('date-unit', 'editor-select')}
|
|
209
208
|
onChange={unitChange}
|
|
209
|
+
class={ns.em('date-unit', 'editor-select')}
|
|
210
|
+
popper-class={[
|
|
211
|
+
ns.b('date-unit-popper'),
|
|
212
|
+
semanticClass('editor.dateUnit.popup'),
|
|
213
|
+
]}
|
|
214
|
+
popper-style={semanticStyle('editor.dateUnit.popup')}
|
|
210
215
|
>
|
|
211
216
|
{units.map((item: IData) => {
|
|
212
217
|
return (
|
|
213
218
|
<el-option
|
|
214
|
-
class={
|
|
215
|
-
|
|
219
|
+
class={[
|
|
220
|
+
ns.em('date-unit', 'item'),
|
|
221
|
+
semanticClass('editor.dateUnit.popup.item', {
|
|
222
|
+
item,
|
|
223
|
+
}),
|
|
224
|
+
]}
|
|
225
|
+
style={semanticStyle('editor.dateUnit.popup.item', {
|
|
226
|
+
item,
|
|
227
|
+
})}
|
|
216
228
|
key={item.value}
|
|
217
229
|
value={item.value}
|
|
218
230
|
label={item.label}
|
|
@@ -400,10 +412,11 @@ export const IBizDateRangeSelect = defineComponent({
|
|
|
400
412
|
trigger='click'
|
|
401
413
|
width='240px'
|
|
402
414
|
popper-class={[
|
|
415
|
+
ns.b('date-type-popper'),
|
|
403
416
|
ns.b('date-range-select'),
|
|
404
|
-
semanticClass('editor.popup'),
|
|
417
|
+
semanticClass('editor.dateType.popup'),
|
|
405
418
|
]}
|
|
406
|
-
popper-style={semanticStyle('editor.popup')}
|
|
419
|
+
popper-style={semanticStyle('editor.dateType.popup')}
|
|
407
420
|
>
|
|
408
421
|
{{
|
|
409
422
|
reference: () => {
|
|
@@ -430,9 +443,13 @@ export const IBizDateRangeSelect = defineComponent({
|
|
|
430
443
|
<div
|
|
431
444
|
class={[
|
|
432
445
|
ns.em('date-type', 'item'),
|
|
433
|
-
semanticClass('editor.popup.item', {
|
|
446
|
+
semanticClass('editor.dateType.popup.item', {
|
|
447
|
+
item,
|
|
448
|
+
}),
|
|
434
449
|
]}
|
|
435
|
-
style={semanticStyle('editor.popup.item', {
|
|
450
|
+
style={semanticStyle('editor.dateType.popup.item', {
|
|
451
|
+
item,
|
|
452
|
+
})}
|
|
436
453
|
onClick={(event: MouseEvent) =>
|
|
437
454
|
onTypeClick(item.type, event)
|
|
438
455
|
}
|
|
@@ -27,10 +27,16 @@ export class DropDownListEditorController extends CodeListEditorController<IDrop
|
|
|
27
27
|
/**
|
|
28
28
|
* 默认选中第一个
|
|
29
29
|
*
|
|
30
|
-
* @memberof
|
|
30
|
+
* @memberof DropDownListEditorController
|
|
31
31
|
*/
|
|
32
32
|
public defaultFirstOption = false;
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @description 自动选中第一个
|
|
36
|
+
* @memberof DropDownListEditorController
|
|
37
|
+
*/
|
|
38
|
+
public autoSelectFirstOption = false;
|
|
39
|
+
|
|
34
40
|
/**
|
|
35
41
|
* 预置项空白项名称
|
|
36
42
|
*
|
|
@@ -72,7 +78,11 @@ export class DropDownListEditorController extends CodeListEditorController<IDrop
|
|
|
72
78
|
this.editorParams.defaultfirstoption,
|
|
73
79
|
);
|
|
74
80
|
}
|
|
75
|
-
|
|
81
|
+
if (this.editorParams?.autoselectfirstoption) {
|
|
82
|
+
this.autoSelectFirstOption = this.toBoolean(
|
|
83
|
+
this.editorParams.autoselectfirstoption,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
76
86
|
if (this.editorParams?.blankItemName) {
|
|
77
87
|
this.blankItemName = this.editorParams.blankItemName;
|
|
78
88
|
}
|
|
@@ -29,6 +29,7 @@ import './ibiz-dropdown.scss';
|
|
|
29
29
|
* @primary
|
|
30
30
|
* @editorparams {name:forceselection,parameterType:boolean,defaultvalue:true,description:是否禁止用户创建选择项。当参数为false时,可在输入框输入内容,使其显示在下拉选项中呈现,并且可选择}
|
|
31
31
|
* @editorparams {name:defaultfirstoption,parameterType:boolean,defaultvalue:false,description:默认选中第一个,在该属性为 true 的情况下,按下回车就可以选中当前选项列表中的第一个选项,无需使用鼠标或键盘方向键进行定位}
|
|
32
|
+
* @editorparams {name:autoselectfirstoption,parameterType:boolean,defaultvalue:false,description:编辑器无值时,自动选中第一个数据}
|
|
32
33
|
* @editorparams {name:blankitemname,parameterType:string,description:在单选模式下,用于在下拉展示数据顶部添加一条空白项数据,其文本内容为配置的该参数值}
|
|
33
34
|
* @editorparams {name:blankitemvalue,parameterType:string,description:在单选模式下,用于在下拉展示数据顶部添加一条空白项数据,其值内容为配置的该参数值}
|
|
34
35
|
* @editorparams {name:alwaysload,parameterType:boolean,defaultvalue:false,description:当值改变、下拉框出现时,是否重新加载代码表数据。设置为 true 时每次相关事件触发都会重新加载数据}
|
|
@@ -202,6 +203,10 @@ export const IBizDropdown = defineComponent({
|
|
|
202
203
|
// 值分隔符
|
|
203
204
|
const valueSeparator = c.editorParams?.valueseparator || ',';
|
|
204
205
|
|
|
206
|
+
const { getSelection, getSelectionValue } = useCodeListSelection(
|
|
207
|
+
c.allItemsValue,
|
|
208
|
+
);
|
|
209
|
+
|
|
205
210
|
// 是否显示表单默认内容
|
|
206
211
|
const showFormDefaultContent = computed(() => {
|
|
207
212
|
if (
|
|
@@ -258,6 +263,33 @@ export const IBizDropdown = defineComponent({
|
|
|
258
263
|
return list;
|
|
259
264
|
};
|
|
260
265
|
|
|
266
|
+
/**
|
|
267
|
+
* @description 自动选中第一项
|
|
268
|
+
*/
|
|
269
|
+
const autoSelectFirstOption = (): void => {
|
|
270
|
+
const item = items.value[0];
|
|
271
|
+
if (!c.autoSelectFirstOption || props.value || !item) return;
|
|
272
|
+
if (c.multiple) {
|
|
273
|
+
const value =
|
|
274
|
+
c.allItems && !hasChildren.value
|
|
275
|
+
? items.value
|
|
276
|
+
.filter(_item => _item.value !== c.allItemsValue)
|
|
277
|
+
.map(_item => _item.value)
|
|
278
|
+
: [item.value];
|
|
279
|
+
emit(
|
|
280
|
+
'change',
|
|
281
|
+
c.model.valueType === 'SIMPLES' ? value : value.join(valueSeparator),
|
|
282
|
+
undefined,
|
|
283
|
+
true,
|
|
284
|
+
);
|
|
285
|
+
} else if (editorItems && editorItems.length > 0) {
|
|
286
|
+
emit('change', item.value, editorItems[0].id!, true);
|
|
287
|
+
emit('change', item.text, undefined, true);
|
|
288
|
+
} else {
|
|
289
|
+
emit('change', item.value, undefined, true);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
|
|
261
293
|
/**
|
|
262
294
|
* 加载代码表后续处理
|
|
263
295
|
*
|
|
@@ -290,6 +322,7 @@ export const IBizDropdown = defineComponent({
|
|
|
290
322
|
break;
|
|
291
323
|
}
|
|
292
324
|
}
|
|
325
|
+
autoSelectFirstOption();
|
|
293
326
|
};
|
|
294
327
|
|
|
295
328
|
// 加载代码表数据
|
|
@@ -377,10 +410,6 @@ export const IBizDropdown = defineComponent({
|
|
|
377
410
|
return list.find(item => item.value === value);
|
|
378
411
|
};
|
|
379
412
|
|
|
380
|
-
const { getSelection, getSelectionValue } = useCodeListSelection(
|
|
381
|
-
c.allItemsValue,
|
|
382
|
-
);
|
|
383
|
-
|
|
384
413
|
// 当前值
|
|
385
414
|
const curValue = computed({
|
|
386
415
|
get() {
|
|
@@ -517,6 +546,7 @@ export const IBizDropdown = defineComponent({
|
|
|
517
546
|
newVal.focus();
|
|
518
547
|
}
|
|
519
548
|
});
|
|
549
|
+
|
|
520
550
|
const onFocus = (e: IData) => {
|
|
521
551
|
editorState = 'focus';
|
|
522
552
|
emit('focus', e);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref, Ref, defineComponent, watch, onMounted } from 'vue';
|
|
2
|
+
import { recursiveIterate } from '@ibiz-template/core';
|
|
2
3
|
import {
|
|
3
4
|
useNamespace,
|
|
4
5
|
getEditorEmits,
|
|
@@ -18,6 +19,7 @@ import './ibiz-tree-picker.scss';
|
|
|
18
19
|
* @primary
|
|
19
20
|
* @editorparams {"name":"showtoolbar","parameterType":"boolean","defaultvalue":"false","description":"是否显示顶部工具栏。默认不显示,若此值为 true,则会在顶部呈现快捷工具栏,该工具栏可用于执行全选、取消全选、全展开以及全收起操作"}
|
|
20
21
|
* @editorparams {"name":"valuetype","parameterType":"string","description":"编辑器的值类型"}
|
|
22
|
+
* @editorparams {name:autoselectfirstoption,parameterType:boolean,defaultvalue:false,description:编辑器无值时,自动选中第一个数据}
|
|
21
23
|
* @ignoreprops autoFocus | overflowMode
|
|
22
24
|
* @ignoreemits blur | focus | enter | infoTextChange
|
|
23
25
|
*/
|
|
@@ -156,6 +158,30 @@ export const IBizTreePicker = defineComponent({
|
|
|
156
158
|
return list;
|
|
157
159
|
};
|
|
158
160
|
|
|
161
|
+
/**
|
|
162
|
+
* @description 自动选中第一项
|
|
163
|
+
*/
|
|
164
|
+
const autoSelectFirstOption = (): void => {
|
|
165
|
+
const item = items.value[0];
|
|
166
|
+
if (!c.autoSelectFirstOption || props.value || !item) return;
|
|
167
|
+
const selections: string[] = [];
|
|
168
|
+
recursiveIterate(
|
|
169
|
+
{ children: [item] },
|
|
170
|
+
_item => {
|
|
171
|
+
selections.push(_item.value);
|
|
172
|
+
},
|
|
173
|
+
{ childrenFields: ['children'] },
|
|
174
|
+
);
|
|
175
|
+
emit(
|
|
176
|
+
'change',
|
|
177
|
+
c.model.valueType === 'SIMPLES'
|
|
178
|
+
? selections
|
|
179
|
+
: selections.join(valueSeparator),
|
|
180
|
+
undefined,
|
|
181
|
+
true,
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
|
|
159
185
|
/**
|
|
160
186
|
* 加载代码表后续处理
|
|
161
187
|
*
|
|
@@ -179,6 +205,7 @@ export const IBizTreePicker = defineComponent({
|
|
|
179
205
|
break;
|
|
180
206
|
}
|
|
181
207
|
}
|
|
208
|
+
autoSelectFirstOption();
|
|
182
209
|
};
|
|
183
210
|
|
|
184
211
|
/** 加载代码表数据 */
|
|
@@ -214,7 +241,7 @@ export const IBizTreePicker = defineComponent({
|
|
|
214
241
|
}
|
|
215
242
|
defaultCheckedKeys.value = val.filter(_key =>
|
|
216
243
|
codeListItems.value.find(
|
|
217
|
-
(item: IData) => item.value === _key && item.
|
|
244
|
+
(item: IData) => item.value === _key && !item.children,
|
|
218
245
|
),
|
|
219
246
|
);
|
|
220
247
|
}
|
|
@@ -35,6 +35,7 @@ import './ibiz-virtualized-list.scss';
|
|
|
35
35
|
* @editorparams {name:itemstext,parameterType:string,defaultvalue:'全部',description:下拉列表框全部项文本}
|
|
36
36
|
* @editorparams {"name":"valuetype","parameterType":"string","description":"编辑器的值类型"}
|
|
37
37
|
* @editorparams {"name":"readonly","parameterType":"boolean","defaultvalue":false,"description":"设置编辑器是否为只读态"}
|
|
38
|
+
* @editorparams {name:autoselectfirstoption,parameterType:boolean,defaultvalue:false,description:编辑器无值时,自动选中第一个数据}
|
|
38
39
|
* @ignoreprops overflowMode
|
|
39
40
|
*/
|
|
40
41
|
export const IBizVirtualizedList = defineComponent({
|
|
@@ -185,6 +186,10 @@ export const IBizVirtualizedList = defineComponent({
|
|
|
185
186
|
// 代码项值是否为数值
|
|
186
187
|
const codeItemValueNumber = ref(false);
|
|
187
188
|
|
|
189
|
+
const { getSelection, getSelectionValue } = useCodeListSelection(
|
|
190
|
+
c.allItemsValue,
|
|
191
|
+
);
|
|
192
|
+
|
|
188
193
|
// 处理树数据
|
|
189
194
|
const handleTreeNodes = (nodes: readonly IData[]): IData[] => {
|
|
190
195
|
if (nodes.length === 0) {
|
|
@@ -221,6 +226,31 @@ export const IBizVirtualizedList = defineComponent({
|
|
|
221
226
|
return list;
|
|
222
227
|
};
|
|
223
228
|
|
|
229
|
+
/**
|
|
230
|
+
* @description 自动选中第一项
|
|
231
|
+
*/
|
|
232
|
+
const autoSelectFirstOption = (): void => {
|
|
233
|
+
const item = items.value[0];
|
|
234
|
+
if (!c.autoSelectFirstOption || props.value || !item) return;
|
|
235
|
+
if (c.multiple) {
|
|
236
|
+
const value =
|
|
237
|
+
c.allItems && !hasChildren.value
|
|
238
|
+
? getSelectionValue(item.value).map(v => `${v}`)
|
|
239
|
+
: [item.value];
|
|
240
|
+
emit(
|
|
241
|
+
'change',
|
|
242
|
+
c.model.valueType === 'SIMPLES' ? value : value.join(','),
|
|
243
|
+
undefined,
|
|
244
|
+
true,
|
|
245
|
+
);
|
|
246
|
+
} else if (editorItems && editorItems.length > 0) {
|
|
247
|
+
emit('change', item.value, editorItems[0].id!, true);
|
|
248
|
+
emit('change', item.text, undefined, true);
|
|
249
|
+
} else {
|
|
250
|
+
emit('change', item.value, undefined, true);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
224
254
|
/**
|
|
225
255
|
* 加载代码表后续处理
|
|
226
256
|
*
|
|
@@ -253,6 +283,7 @@ export const IBizVirtualizedList = defineComponent({
|
|
|
253
283
|
break;
|
|
254
284
|
}
|
|
255
285
|
}
|
|
286
|
+
autoSelectFirstOption();
|
|
256
287
|
};
|
|
257
288
|
|
|
258
289
|
// 加载代码表数据与后续操作
|
|
@@ -324,10 +355,6 @@ export const IBizVirtualizedList = defineComponent({
|
|
|
324
355
|
return list.find(item => item.value === value);
|
|
325
356
|
};
|
|
326
357
|
|
|
327
|
-
const { getSelection, getSelectionValue } = useCodeListSelection(
|
|
328
|
-
c.allItemsValue,
|
|
329
|
-
);
|
|
330
|
-
|
|
331
358
|
// 当前值
|
|
332
359
|
const curValue = computed({
|
|
333
360
|
get() {
|