@opentiny/vue-renderless 3.25.0 → 3.27.0
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/calendar-view/index.js +6 -3
- package/calendar-view/vue.js +9 -5
- package/color-picker/vue.js +4 -0
- package/color-select-panel/alpha-select/index.js +17 -12
- package/color-select-panel/alpha-select/vue.js +4 -2
- package/color-select-panel/hue-select/index.js +47 -16
- package/color-select-panel/hue-select/vue.js +32 -6
- package/color-select-panel/index.js +236 -8
- package/color-select-panel/linear-gradient/index.js +131 -0
- package/color-select-panel/linear-gradient/vue.js +21 -0
- package/color-select-panel/sv-select/index.js +12 -9
- package/color-select-panel/sv-select/vue.js +4 -2
- package/color-select-panel/utils/color-map.js +154 -0
- package/color-select-panel/utils/color-points.js +86 -0
- package/color-select-panel/utils/color.js +1 -1
- package/color-select-panel/utils/context.js +14 -0
- package/color-select-panel/vue.js +9 -4
- package/common/deps/infinite-scroll.js +1 -1
- package/dialog-box/index.js +3 -3
- package/dialog-box/vue.js +1 -0
- package/dropdown/vue.js +3 -1
- package/file-upload/index.js +3 -2
- package/file-upload/vue.js +1 -1
- package/fluent-editor/index.js +1 -1
- package/form-item/vue.js +1 -1
- package/guide/index.js +3 -3
- package/input/index.js +2 -1
- package/input/vue.js +2 -1
- package/package.json +3 -3
- package/pager/vue.js +1 -1
- package/picker/vue.js +10 -0
- package/popeditor/index.js +3 -3
- package/search/index.js +6 -2
- package/search/vue.js +1 -1
- package/select/index.js +30 -13
- package/select/vue.js +34 -10
- package/slider/vue.js +7 -0
- package/slider-button/vue.js +1 -0
- package/slider-button-group/vue.js +1 -0
- package/space/index.js +30 -0
- package/space/vue.js +39 -0
- package/tab-nav/index.js +2 -2
- package/tabs/vue.js +2 -1
- package/tabs-mf/index.js +4 -1
- package/tabs-mf/vue-nav.js +9 -18
- package/tabs-mf/vue-slider-bar.js +24 -0
- package/tabs-mf/vue.js +3 -1
- package/tag/index.js +1 -1
- package/tree-menu/index.js +4 -0
- package/tree-menu/vue.js +3 -0
- package/types/button-group.type.d.ts +2 -1
- package/types/button.type.d.ts +2 -1
- package/types/color-select-panel.type.d.ts +197 -1
- package/types/dialog-box.type.d.ts +4 -11
- package/types/numeric.type.d.ts +1 -1
- package/types/pager.type.d.ts +2 -1
- package/types/picker.type.d.ts +4 -0
- package/types/radio-button.type.d.ts +1 -0
- package/types/radio-group.type.d.ts +2 -1
- package/types/radio.type.d.ts +2 -1
- package/types/slider.type.d.ts +2 -1
- package/types/space.type.d.ts +31 -0
- package/types/switch.type.d.ts +1 -1
- package/types/tabs.type.d.ts +2 -0
- package/types/user-contact.type.d.ts +1 -11
- package/user/index.js +6 -5
- package/user/vue.js +1 -1
package/types/button.type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComputedRef, ExtractPropTypes } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
3
4
|
|
|
4
5
|
declare const buttonProps: {
|
|
@@ -80,7 +81,7 @@ declare const buttonProps: {
|
|
|
80
81
|
type: PropType<(ev: MouseEvent) => void>;
|
|
81
82
|
};
|
|
82
83
|
tiny_mode: StringConstructor;
|
|
83
|
-
tiny_mode_root: BooleanConstructor;
|
|
84
|
+
tiny_mode_root: BooleanConstructor;
|
|
84
85
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
85
86
|
tiny_renderless: FunctionConstructor;
|
|
86
87
|
tiny_theme: StringConstructor;
|
|
@@ -1,3 +1,78 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
interface LinearGradientState {
|
|
4
|
+
linearGradientBarBackground: string;
|
|
5
|
+
}
|
|
6
|
+
interface ColorOptions {
|
|
7
|
+
enableAlpha: boolean;
|
|
8
|
+
format: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
}
|
|
11
|
+
interface HSVColor {
|
|
12
|
+
h: number;
|
|
13
|
+
s: number;
|
|
14
|
+
v: number;
|
|
15
|
+
}
|
|
16
|
+
interface RGBColor {
|
|
17
|
+
r: number;
|
|
18
|
+
g: number;
|
|
19
|
+
b: number;
|
|
20
|
+
}
|
|
21
|
+
interface HSLColor {
|
|
22
|
+
hue: number;
|
|
23
|
+
sat: number;
|
|
24
|
+
light: number;
|
|
25
|
+
}
|
|
26
|
+
interface IColor {
|
|
27
|
+
enableAlpha: boolean;
|
|
28
|
+
format: string;
|
|
29
|
+
value: string;
|
|
30
|
+
selected?: boolean;
|
|
31
|
+
get(prop: string): number;
|
|
32
|
+
set(props: {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}): void;
|
|
35
|
+
set(prop: string, value: number): void;
|
|
36
|
+
compare(color: IColor): boolean;
|
|
37
|
+
isHSL(value: string): boolean;
|
|
38
|
+
isHsv(value: string): boolean;
|
|
39
|
+
isRgb(value: string): boolean;
|
|
40
|
+
isHex(value: string): boolean;
|
|
41
|
+
onHsv(value: string): void;
|
|
42
|
+
onRgb(value: string): void;
|
|
43
|
+
onHex(value: string): void;
|
|
44
|
+
onHsl(value: string): void;
|
|
45
|
+
fromHSV(hsv: HSVColor): void;
|
|
46
|
+
fromString(value: string): void;
|
|
47
|
+
toRgb(): RGBColor;
|
|
48
|
+
onChange(): void;
|
|
49
|
+
}
|
|
50
|
+
interface ColorUtils {
|
|
51
|
+
rgb2hsv(rgb: RGBColor): HSVColor;
|
|
52
|
+
hsv2rgb(hsv: HSVColor): RGBColor;
|
|
53
|
+
hsv2hsl(hsv: {
|
|
54
|
+
hue: number;
|
|
55
|
+
sat: number;
|
|
56
|
+
val: number;
|
|
57
|
+
}): [number, number, number];
|
|
58
|
+
hsl2hsv(hsl: HSLColor): HSVColor;
|
|
59
|
+
toHex(rgb: RGBColor): string;
|
|
60
|
+
parseHex(hex: string): number;
|
|
61
|
+
hexOne(value: number): string;
|
|
62
|
+
}
|
|
63
|
+
interface IColorPoint {
|
|
64
|
+
color: IColor;
|
|
65
|
+
cursorLeft: number;
|
|
66
|
+
}
|
|
67
|
+
interface ColorPanelContext {
|
|
68
|
+
colorMode: ComputedRef<IColorSelectPanelProps['colorMode']>;
|
|
69
|
+
activeColor: Ref<IColorPoint>;
|
|
70
|
+
bar: Ref<HTMLElement | null>;
|
|
71
|
+
colorPoints: Ref<IColorPoint[]>;
|
|
72
|
+
linearGardientValue: Ref<string>;
|
|
73
|
+
deg: Ref<number>;
|
|
74
|
+
}
|
|
75
|
+
type IColorSelectPanelMaybeRef<T> = IColorSelectPanelRef<T> | T;
|
|
1
76
|
interface IColorSelectPanelRef<T> {
|
|
2
77
|
value: T;
|
|
3
78
|
}
|
|
@@ -7,6 +82,7 @@ interface IColorSelectPanelProps {
|
|
|
7
82
|
history: string[];
|
|
8
83
|
predefine: string[];
|
|
9
84
|
format: ('hsl' | 'hsv' | 'hex' | 'rgb')[];
|
|
85
|
+
colorMode: 'linear-gradient' | 'monochrome';
|
|
10
86
|
modelValue: string;
|
|
11
87
|
enableHistory: boolean;
|
|
12
88
|
enablePredefineColor: boolean;
|
|
@@ -23,5 +99,125 @@ interface IColorSelectPanelHueProps<C> {
|
|
|
23
99
|
interface IColorSelectPanelAlphaPanel<C> {
|
|
24
100
|
color: C;
|
|
25
101
|
}
|
|
102
|
+
interface UseColorPointsRet {
|
|
103
|
+
onClick: (element: Element, point: IColorPoint) => void;
|
|
104
|
+
linearGradientValue: Readonly<Ref<string>>;
|
|
105
|
+
updateDeg: (_deg: number) => void;
|
|
106
|
+
removePoint: (point: IColorPoint) => void;
|
|
107
|
+
addPoint: (point: IColorPoint) => void;
|
|
108
|
+
setActivePoint: (point: IColorPoint) => void;
|
|
109
|
+
getActviePoint: () => Ref<IColorPoint>;
|
|
110
|
+
}
|
|
111
|
+
interface ColorSelectPanelExtends {
|
|
112
|
+
parse: parse;
|
|
113
|
+
}
|
|
114
|
+
interface LinearGradientNode {
|
|
115
|
+
type: 'linear-gradient';
|
|
116
|
+
orientation?: DirectionalNode | AngularNode | undefined;
|
|
117
|
+
colorStops: ColorStop[];
|
|
118
|
+
}
|
|
119
|
+
interface RepeatingLinearGradientNode {
|
|
120
|
+
type: 'repeating-linear-gradient';
|
|
121
|
+
orientation?: DirectionalNode | AngularNode | undefined;
|
|
122
|
+
colorStops: ColorStop[];
|
|
123
|
+
}
|
|
124
|
+
interface RadialGradientNode {
|
|
125
|
+
type: 'radial-gradient';
|
|
126
|
+
orientation?: Array<ShapeNode | DefaultRadialNode | ExtentKeywordNode> | undefined;
|
|
127
|
+
colorStops: ColorStop[];
|
|
128
|
+
}
|
|
129
|
+
interface RepeatingRadialGradientNode {
|
|
130
|
+
type: 'repeating-radial-gradient';
|
|
131
|
+
orientation?: Array<ShapeNode | DefaultRadialNode | ExtentKeywordNode> | undefined;
|
|
132
|
+
colorStops: ColorStop[];
|
|
133
|
+
}
|
|
134
|
+
interface DirectionalNode {
|
|
135
|
+
type: 'directional';
|
|
136
|
+
value: 'left' | 'top' | 'bottom' | 'right' | 'left top' | 'top left' | 'left bottom' | 'bottom left' | 'right top' | 'top right' | 'right bottom' | 'bottom right';
|
|
137
|
+
}
|
|
138
|
+
interface AngularNode {
|
|
139
|
+
type: 'angular';
|
|
140
|
+
value: string;
|
|
141
|
+
}
|
|
142
|
+
interface LiteralNode {
|
|
143
|
+
type: 'literal';
|
|
144
|
+
value: string;
|
|
145
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
146
|
+
}
|
|
147
|
+
interface HexNode {
|
|
148
|
+
type: 'hex';
|
|
149
|
+
value: string;
|
|
150
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
151
|
+
}
|
|
152
|
+
interface RgbNode {
|
|
153
|
+
type: 'rgb';
|
|
154
|
+
value: [string, string, string];
|
|
155
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
156
|
+
}
|
|
157
|
+
interface RgbaNode {
|
|
158
|
+
type: 'rgba';
|
|
159
|
+
value: [string, string, string, string?];
|
|
160
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
161
|
+
}
|
|
162
|
+
interface HslNode {
|
|
163
|
+
type: 'hsl';
|
|
164
|
+
value: [string, string, string];
|
|
165
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
166
|
+
}
|
|
167
|
+
interface HslaNode {
|
|
168
|
+
type: 'hsla';
|
|
169
|
+
value: [string, string, string, string?];
|
|
170
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
171
|
+
}
|
|
172
|
+
interface VarNode {
|
|
173
|
+
type: 'var';
|
|
174
|
+
value: string;
|
|
175
|
+
length?: PxNode | EmNode | PercentNode | CalcNode | undefined;
|
|
176
|
+
}
|
|
177
|
+
interface ShapeNode {
|
|
178
|
+
type: 'shape';
|
|
179
|
+
style?: ExtentKeywordNode | PxNode | EmNode | PercentNode | PositionKeywordNode | CalcNode | undefined;
|
|
180
|
+
value: 'ellipse' | 'circle';
|
|
181
|
+
at?: PositionNode | undefined;
|
|
182
|
+
}
|
|
183
|
+
interface DefaultRadialNode {
|
|
184
|
+
type: 'default-radial';
|
|
185
|
+
at: PositionNode;
|
|
186
|
+
}
|
|
187
|
+
interface PositionKeywordNode {
|
|
188
|
+
type: 'position-keyword';
|
|
189
|
+
value: 'center' | 'left' | 'top' | 'bottom' | 'right';
|
|
190
|
+
}
|
|
191
|
+
interface PositionNode {
|
|
192
|
+
type: 'position';
|
|
193
|
+
value: {
|
|
194
|
+
x: ExtentKeywordNode | PxNode | EmNode | PercentNode | PositionKeywordNode | CalcNode;
|
|
195
|
+
y: ExtentKeywordNode | PxNode | EmNode | PercentNode | PositionKeywordNode | CalcNode;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
interface ExtentKeywordNode {
|
|
199
|
+
type: 'extent-keyword';
|
|
200
|
+
value: 'closest-side' | 'closest-corner' | 'farthest-side' | 'farthest-corner' | 'contain' | 'cover';
|
|
201
|
+
at?: PositionNode | undefined;
|
|
202
|
+
}
|
|
203
|
+
interface PxNode {
|
|
204
|
+
type: 'px';
|
|
205
|
+
value: string;
|
|
206
|
+
}
|
|
207
|
+
interface EmNode {
|
|
208
|
+
type: 'em';
|
|
209
|
+
value: string;
|
|
210
|
+
}
|
|
211
|
+
interface PercentNode {
|
|
212
|
+
type: '%';
|
|
213
|
+
value: string;
|
|
214
|
+
}
|
|
215
|
+
interface CalcNode {
|
|
216
|
+
type: 'calc';
|
|
217
|
+
value: string;
|
|
218
|
+
}
|
|
219
|
+
type ColorStop = LiteralNode | HexNode | RgbNode | RgbaNode | HslNode | HslaNode | VarNode;
|
|
220
|
+
type GradientNode = LinearGradientNode | RepeatingLinearGradientNode | RadialGradientNode | RepeatingRadialGradientNode;
|
|
221
|
+
type parse = (value: string) => GradientNode[];
|
|
26
222
|
|
|
27
|
-
export { IColorSelectPanelAlphProps, IColorSelectPanelAlphaPanel, IColorSelectPanelHueProps, IColorSelectPanelProps, IColorSelectPanelRef, IColorSelectPanelSVProps };
|
|
223
|
+
export { AngularNode, CalcNode, ColorOptions, ColorPanelContext, ColorSelectPanelExtends, ColorStop, ColorUtils, DefaultRadialNode, DirectionalNode, EmNode, ExtentKeywordNode, GradientNode, HSLColor, HSVColor, HexNode, HslNode, HslaNode, IColor, IColorPoint, IColorSelectPanelAlphProps, IColorSelectPanelAlphaPanel, IColorSelectPanelHueProps, IColorSelectPanelMaybeRef, IColorSelectPanelProps, IColorSelectPanelRef, IColorSelectPanelSVProps, LinearGradientNode, LinearGradientState, LiteralNode, PercentNode, PositionKeywordNode, PositionNode, PxNode, RGBColor, RadialGradientNode, RepeatingLinearGradientNode, RepeatingRadialGradientNode, RgbNode, RgbaNode, ShapeNode, UseColorPointsRet, VarNode, parse };
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams, ISharedRenderlessParamHooks } from './shared.type.js';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* Copyright (c) 2022 - present TinyVue Authors.
|
|
6
|
-
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
7
|
-
*
|
|
8
|
-
* Use of this source code is governed by an MIT-style license.
|
|
9
|
-
*
|
|
10
|
-
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
|
11
|
-
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
|
12
|
-
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
5
|
declare const $constants: {
|
|
16
6
|
DIALOG_SLIDER_RIGHT: string;
|
|
17
7
|
DIALOG_FADE: string;
|
|
@@ -138,6 +128,9 @@ declare const dialogBoxProps: {
|
|
|
138
128
|
type: ObjectConstructor;
|
|
139
129
|
default: () => {};
|
|
140
130
|
};
|
|
131
|
+
onClose: {
|
|
132
|
+
type: PropType<() => void>;
|
|
133
|
+
};
|
|
141
134
|
tiny_mode: StringConstructor;
|
|
142
135
|
tiny_mode_root: BooleanConstructor;
|
|
143
136
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
package/types/numeric.type.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ declare const numericProps: {
|
|
|
74
74
|
type: BooleanConstructor;
|
|
75
75
|
default: boolean;
|
|
76
76
|
};
|
|
77
|
-
modelValue: (StringConstructor | NumberConstructor
|
|
77
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
78
78
|
mouseWheel: BooleanConstructor;
|
|
79
79
|
name: StringConstructor;
|
|
80
80
|
placeholder: StringConstructor;
|
package/types/pager.type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
3
4
|
|
|
4
5
|
declare const pagerProps: {
|
package/types/picker.type.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StyleValue, ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
3
3
|
import { IRadioGroupProps } from './radio-group.type.js';
|
|
4
|
+
import '@opentiny/vue-common';
|
|
4
5
|
|
|
5
6
|
declare const $constants: {
|
|
6
7
|
RADIO_GROUP: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
3
4
|
|
|
4
5
|
declare const radioGroupProps: {
|
package/types/radio.type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
3
4
|
|
|
4
5
|
declare const $constants: {
|
package/types/slider.type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtractPropTypes, CSSProperties, ComputedRef } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
3
4
|
|
|
4
5
|
declare const $constants: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** 支持的 size 类型定义:预设值或 px 数字,或水平/垂直间距数组 */
|
|
2
|
+
type SpaceSize = 'small' | 'medium' | 'large' | string | number | Array<string | number>;
|
|
3
|
+
/** 交叉轴对齐方式 */
|
|
4
|
+
type SpaceAlign = 'stretch' | 'start' | 'center' | 'end' | 'baseline';
|
|
5
|
+
/** 主轴对齐方式 */
|
|
6
|
+
type SpaceJustify = 'start' | 'center' | 'end' | 'space-around' | 'space-between' | 'space-evenly';
|
|
7
|
+
/** 布局方向:横向还是纵向 */
|
|
8
|
+
type SpaceDirection = 'row' | 'column';
|
|
9
|
+
/** Space 组件 props 接口定义 */
|
|
10
|
+
interface ISpaceProps {
|
|
11
|
+
size?: SpaceSize;
|
|
12
|
+
align?: SpaceAlign;
|
|
13
|
+
justify?: SpaceJustify;
|
|
14
|
+
direction?: SpaceDirection;
|
|
15
|
+
wrap?: boolean;
|
|
16
|
+
order?: any[];
|
|
17
|
+
customClass?: string;
|
|
18
|
+
customStyle?: string | Record<string, any>;
|
|
19
|
+
}
|
|
20
|
+
/** renderless 返回的响应式数据结构 */
|
|
21
|
+
interface ISpaceApi {
|
|
22
|
+
state: {
|
|
23
|
+
direction: SpaceDirection;
|
|
24
|
+
align: SpaceAlign;
|
|
25
|
+
justify: SpaceJustify;
|
|
26
|
+
wrap: boolean;
|
|
27
|
+
gapStyle: Record<string, string>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { ISpaceApi, ISpaceProps, SpaceAlign, SpaceDirection, SpaceJustify, SpaceSize };
|
package/types/switch.type.d.ts
CHANGED
package/types/tabs.type.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare const tabsProps: {
|
|
|
57
57
|
moreShowAll: BooleanConstructor;
|
|
58
58
|
panelMaxHeight: StringConstructor;
|
|
59
59
|
panelWidth: StringConstructor;
|
|
60
|
+
headerOnly: BooleanConstructor;
|
|
60
61
|
tiny_mode: StringConstructor;
|
|
61
62
|
tiny_mode_root: BooleanConstructor;
|
|
62
63
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -108,6 +109,7 @@ interface ITabsState {
|
|
|
108
109
|
activeIndex: number;
|
|
109
110
|
morePanes?: ITabsPaneVm[];
|
|
110
111
|
separator?: boolean;
|
|
112
|
+
headerOnly?: boolean;
|
|
111
113
|
}
|
|
112
114
|
/**
|
|
113
115
|
*tab根元素实例对象
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { ExtractPropTypes, ref } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
2
3
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* Copyright (c) 2022 - present TinyVue Authors.
|
|
6
|
-
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
7
|
-
*
|
|
8
|
-
* Use of this source code is governed by an MIT-style license.
|
|
9
|
-
*
|
|
10
|
-
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
|
11
|
-
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
|
12
|
-
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
5
|
declare const userContactProps: {
|
|
16
6
|
showName: {
|
|
17
7
|
type: BooleanConstructor;
|
package/user/index.js
CHANGED
|
@@ -91,7 +91,7 @@ const request = {
|
|
|
91
91
|
cb({ error: e });
|
|
92
92
|
});
|
|
93
93
|
},
|
|
94
|
-
batchRequest(api) {
|
|
94
|
+
batchRequest(api, emit) {
|
|
95
95
|
const me = this;
|
|
96
96
|
const reqParamsSeq = me.getParams();
|
|
97
97
|
let reqLen = reqParamsSeq.length;
|
|
@@ -112,6 +112,7 @@ const request = {
|
|
|
112
112
|
});
|
|
113
113
|
});
|
|
114
114
|
errors.length && logger.warn(`user [${errors.join(",")}] not found`);
|
|
115
|
+
emit("error", errors);
|
|
115
116
|
this.clearRequest();
|
|
116
117
|
}
|
|
117
118
|
}
|
|
@@ -142,12 +143,12 @@ const request = {
|
|
|
142
143
|
this.batch = batch;
|
|
143
144
|
}
|
|
144
145
|
},
|
|
145
|
-
getusers({ param, api, batch, cb }) {
|
|
146
|
+
getusers({ param, api, batch, cb, emit }) {
|
|
146
147
|
if (batch !== false) {
|
|
147
148
|
this.setBatch(batch);
|
|
148
149
|
clearTimeout(this.timmer);
|
|
149
150
|
this.addRequest({ param, cb });
|
|
150
|
-
this.timmer = setTimeout(() => this.batchRequest(api), 100);
|
|
151
|
+
this.timmer = setTimeout(() => this.batchRequest(api, emit), 100);
|
|
151
152
|
} else {
|
|
152
153
|
this.singleRequest(param, api, cb);
|
|
153
154
|
}
|
|
@@ -316,7 +317,7 @@ const syncCacheIds = ({ props, state }) => (ids, queryIds, cacheData) => {
|
|
|
316
317
|
}
|
|
317
318
|
});
|
|
318
319
|
};
|
|
319
|
-
const getUsers = ({ api, props, state }) => (value) => {
|
|
320
|
+
const getUsers = ({ api, props, state, emit }) => (value) => {
|
|
320
321
|
const { cache } = props;
|
|
321
322
|
const { valueField } = state;
|
|
322
323
|
const ids = Array.isArray(value) ? value : value.split(props.valueSplit);
|
|
@@ -339,7 +340,7 @@ const getUsers = ({ api, props, state }) => (value) => {
|
|
|
339
340
|
resolve(data.concat(filterData));
|
|
340
341
|
}
|
|
341
342
|
};
|
|
342
|
-
request.getusers({ param, api, batch: state.batch, cb });
|
|
343
|
+
request.getusers({ param, api, batch: state.batch, cb, emit });
|
|
343
344
|
});
|
|
344
345
|
};
|
|
345
346
|
const updateCache = ({ props, state }) => () => {
|
package/user/vue.js
CHANGED
|
@@ -57,7 +57,7 @@ const renderless = (props, { reactive, watch, computed, provide }, { emit, nextT
|
|
|
57
57
|
suggestUser: suggestUser(api2),
|
|
58
58
|
cacheUser: cacheUser({ api: api2, props, service: $service, state }),
|
|
59
59
|
initUser: initUser({ api: api2, props, state }),
|
|
60
|
-
getUsers: getUsers({ api: api2, props, state }),
|
|
60
|
+
getUsers: getUsers({ api: api2, props, state, emit }),
|
|
61
61
|
setSelected: setSelected({ api: api2, props, state }),
|
|
62
62
|
searchMethod: searchMethod({ api: api2, props, state, emit }),
|
|
63
63
|
userChange: userChange({ api: api2, emit, props, state, dispatch, constants }),
|