@opentiny/vue-renderless 3.18.4 → 3.18.5
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/autocomplete/index.js +9 -4
- package/autocomplete/vue.js +1 -2
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/package.json +1 -1
- package/types/autocomplete.type.d.ts +2 -2
- package/types/{dropdown-item.type-678794c9.d.ts → dropdown-item.type-16d59fd0.d.ts} +4 -0
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
package/autocomplete/index.js
CHANGED
|
@@ -60,9 +60,9 @@ const handleFocus = ({
|
|
|
60
60
|
api.debouncedGetData(props.modelValue);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
const handleBlur = ({ emit, state, dispatch, props }) => (
|
|
63
|
+
const handleBlur = ({ emit, state, dispatch, props }) => () => {
|
|
64
64
|
state.suggestionDisabled = true;
|
|
65
|
-
emit("blur"
|
|
65
|
+
emit("blur");
|
|
66
66
|
if (state.validateEvent) {
|
|
67
67
|
dispatch(FORM_ITEM, FORM_EVENT.blur, [props.modelValue]);
|
|
68
68
|
}
|
|
@@ -99,10 +99,15 @@ const select = ({
|
|
|
99
99
|
emit,
|
|
100
100
|
nextTick,
|
|
101
101
|
props,
|
|
102
|
-
state
|
|
102
|
+
state,
|
|
103
|
+
dispatch
|
|
103
104
|
}) => (item) => {
|
|
104
|
-
|
|
105
|
+
const value = item[props.valueKey];
|
|
106
|
+
emit("update:modelValue", value);
|
|
105
107
|
emit("select", item);
|
|
108
|
+
if (state.validateEvent) {
|
|
109
|
+
dispatch(FORM_ITEM, FORM_EVENT.change, [value]);
|
|
110
|
+
}
|
|
106
111
|
nextTick(() => {
|
|
107
112
|
state.activated = false;
|
|
108
113
|
state.suggestions = [];
|
package/autocomplete/vue.js
CHANGED
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
} from "./index";
|
|
20
20
|
const api = [
|
|
21
21
|
"state",
|
|
22
|
-
"select",
|
|
23
22
|
"suggestionState",
|
|
24
23
|
"getInput",
|
|
25
24
|
"handleChange",
|
|
@@ -95,7 +94,7 @@ const initApi = ({
|
|
|
95
94
|
mounted: mounted({ vm, state, suggestionState }),
|
|
96
95
|
highlight: highlight({ constants, vm, state }),
|
|
97
96
|
handleClear: handleClear({ emit, state }),
|
|
98
|
-
select: select({ emit, nextTick, props, state }),
|
|
97
|
+
select: select({ emit, nextTick, props, state, dispatch }),
|
|
99
98
|
watchVisible: watchVisible({ suggestionState, vm }),
|
|
100
99
|
handleChange: handleChange({ api: api2, emit, state, props, dispatch }),
|
|
101
100
|
handleFocus: handleFocus({ api: api2, emit, props, state }),
|
package/common/index.js
CHANGED
package/common/runtime.js
CHANGED
package/package.json
CHANGED
|
@@ -133,7 +133,7 @@ declare const handleFocus: ({ api, emit, props, state }: {
|
|
|
133
133
|
state: IAutoCompleteState;
|
|
134
134
|
props: IAutoCompleteProps;
|
|
135
135
|
}) => (event: any) => void;
|
|
136
|
-
declare const handleBlur: ({ emit, state, dispatch, props }: Pick<IAutoCompleteRenderlessParams, 'emit' | 'state' | 'dispatch' | 'props'>) => (
|
|
136
|
+
declare const handleBlur: ({ emit, state, dispatch, props }: Pick<IAutoCompleteRenderlessParams, 'emit' | 'state' | 'dispatch' | 'props'>) => () => void;
|
|
137
137
|
declare const handleClear: ({ emit, state }: {
|
|
138
138
|
emit: IAutoCompleteRenderlessParamUtils['emit'];
|
|
139
139
|
state: IAutoCompleteState;
|
|
@@ -146,7 +146,7 @@ declare const handleKeyEnter: ({ api, emit, nextTick, props, state }: {
|
|
|
146
146
|
props: IAutoCompleteProps;
|
|
147
147
|
state: IAutoCompleteState;
|
|
148
148
|
}) => (event: any) => void;
|
|
149
|
-
declare const select: ({ emit, nextTick, props, state }: {
|
|
149
|
+
declare const select: ({ emit, nextTick, props, state, dispatch }: {
|
|
150
150
|
emit: IAutoCompleteRenderlessParamUtils['emit'];
|
|
151
151
|
nextTick: IAutoCompleteRenderlessParamUtils['nextTick'];
|
|
152
152
|
props: IAutoCompleteProps;
|
|
@@ -82,6 +82,10 @@ declare const dropdownItemProps: {
|
|
|
82
82
|
type: StringConstructor;
|
|
83
83
|
default: string;
|
|
84
84
|
};
|
|
85
|
+
effect: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
85
89
|
tiny_mode: StringConstructor;
|
|
86
90
|
tiny_mode_root: BooleanConstructor;
|
|
87
91
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { k as IDropdownItemApi, i as IDropdownItemConstants, q as IDropdownItemMfDataStore, p as IDropdownItemOptionStyle, h as IDropdownItemProps, m as IDropdownItemRenderlessParamUtils, l as IDropdownItemRenderlessParams, j as IDropdownItemState, n as IDropdownItemStyle, o as IDropdownItemTag, g as IDropdownItemVm } from './dropdown-item.type-
|
|
2
|
+
export { k as IDropdownItemApi, i as IDropdownItemConstants, q as IDropdownItemMfDataStore, p as IDropdownItemOptionStyle, h as IDropdownItemProps, m as IDropdownItemRenderlessParamUtils, l as IDropdownItemRenderlessParams, j as IDropdownItemState, n as IDropdownItemStyle, o as IDropdownItemTag, g as IDropdownItemVm } from './dropdown-item.type-16d59fd0.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import './dropdown.type.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { b as IDropdownMenuApi, e as IDropdownMenuPopperParams, I as IDropdownMenuProps, d as IDropdownMenuRenderlessParamUtils, c as IDropdownMenuRenderlessParams, a as IDropdownMenuState, f as IDropdownMenuVm } from './dropdown-item.type-
|
|
2
|
+
export { b as IDropdownMenuApi, e as IDropdownMenuPopperParams, I as IDropdownMenuProps, d as IDropdownMenuRenderlessParamUtils, c as IDropdownMenuRenderlessParams, a as IDropdownMenuState, f as IDropdownMenuVm } from './dropdown-item.type-16d59fd0.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import './dropdown.type.js';
|