Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/renderless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-renderless",
"version": "3.18.4",
"version": "3.18.6",
"private": true,
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
Expand Down
13 changes: 9 additions & 4 deletions packages/renderless/src/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ export const handleFocus =

export const handleBlur =
({ emit, state, dispatch, props }: Pick<IAutoCompleteRenderlessParams, 'emit' | 'state' | 'dispatch' | 'props'>) =>
(event) => {
() => {
state.suggestionDisabled = true
emit('blur', event)
emit('blur')
if (state.validateEvent) {
dispatch(FORM_ITEM, FORM_EVENT.blur, [props.modelValue])
}
Expand Down Expand Up @@ -165,17 +165,22 @@ export const select =
emit,
nextTick,
props,
state
state,
dispatch
}: {
emit: IAutoCompleteRenderlessParamUtils['emit']
nextTick: IAutoCompleteRenderlessParamUtils['nextTick']
props: IAutoCompleteProps
state: IAutoCompleteState
}) =>
(item) => {
emit('update:modelValue', item[props.valueKey])
const value = item[props.valueKey]
emit('update:modelValue', value)
emit('select', item)

if (state.validateEvent) {
dispatch(FORM_ITEM, FORM_EVENT.change, [value])
}
nextTick(() => {
state.activated = false
state.suggestions = []
Expand Down
3 changes: 1 addition & 2 deletions packages/renderless/src/autocomplete/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import type {

export const api = [
'state',
'select',
'suggestionState',
'getInput',
'handleChange',
Expand Down Expand Up @@ -125,7 +124,7 @@ const initApi = ({
mounted: mounted({ vm, state, suggestionState }),
highlight: highlight({ constants, vm, state }),
handleClear: handleClear({ emit, state }),
select: select({ emit, nextTick, props, state }),
select: select({ emit, nextTick, props, state, dispatch }),
watchVisible: watchVisible({ suggestionState, vm }),
handleChange: handleChange({ api, emit, state, props, dispatch }),
handleFocus: handleFocus({ api, emit, props, state }),
Expand Down
24 changes: 12 additions & 12 deletions packages/vue/src/autocomplete/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "@opentiny/vue-autocomplete",
"version": "3.18.0",
"type": "module",
"version": "3.18.1",
"description": "",
"license": "MIT",
"sideEffects": false,
"main": "lib/index.js",
"module": "index.ts",
"sideEffects": false,
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
},
"dependencies": {
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-input": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-scrollbar": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-theme": "workspace:~"
},
"license": "MIT"
}
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}
2 changes: 1 addition & 1 deletion packages/vue/src/autocomplete/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
ref="input"
v-bind="f($props, $attrs)"
front-clear-icon
v-clickoutside="handleBlur"
@update:modelValue="handleChange"
:validate-event="false"
@focus="handleFocus"
@blur="handleBlur"
@clear="handleClear"
@keydown.up.prevent="highlight(state.highlightedIndex - 1)"
@keydown.down.prevent="highlight(state.highlightedIndex + 1)"
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/fluent-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-fluent-editor",
"version": "3.18.0",
"version": "3.18.3",
"description": "",
"license": "MIT",
"sideEffects": false,
Expand All @@ -11,7 +11,7 @@
"//postversion": "pnpm build"
},
"dependencies": {
"@opentiny/fluent-editor": "~3.19.0",
"@opentiny/fluent-editor": "~3.20.0",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-image-viewer": "workspace:~",
Expand Down
Loading