From 5669126b9c3c72e546a4daedad4f3399a4ba9a13 Mon Sep 17 00:00:00 2001 From: ajaxzheng <894103554@qq.com> Date: Wed, 4 Dec 2024 17:34:10 +0800 Subject: [PATCH] fix: fix problems found during verification (#2610) --- packages/renderless/package.json | 2 +- packages/renderless/src/color-select-panel/vue.ts | 3 +-- packages/vue-common/package.json | 2 +- packages/vue-common/src/index.ts | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/renderless/package.json b/packages/renderless/package.json index ba0afee708..3e7ff745e4 100644 --- a/packages/renderless/package.json +++ b/packages/renderless/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-renderless", - "version": "3.20.0", + "version": "3.20.1", "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", diff --git a/packages/renderless/src/color-select-panel/vue.ts b/packages/renderless/src/color-select-panel/vue.ts index da54a4afe7..537df2ba18 100644 --- a/packages/renderless/src/color-select-panel/vue.ts +++ b/packages/renderless/src/color-select-panel/vue.ts @@ -1,6 +1,5 @@ import type { IColorSelectPanelProps, ISharedRenderlessParamHooks, ISharedRenderlessParamUtils } from '@/types' import { initApi, initState, initWatch } from './index' -import { onMounted } from 'vue' export const api = [ 'state', @@ -59,7 +58,7 @@ export const renderless = ( onClickOutside } initWatch(state, props, hooks, utils) - onMounted(() => { + hooks.onMounted(() => { if (props.modelValue) { state.input = state.currentColor } diff --git a/packages/vue-common/package.json b/packages/vue-common/package.json index 57bec9bd56..4c621fa8a0 100644 --- a/packages/vue-common/package.json +++ b/packages/vue-common/package.json @@ -1,7 +1,7 @@ { "name": "@opentiny/vue-common", "private": true, - "version": "3.20.0", + "version": "3.20.1", "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.", "homepage": "https://opentiny.design/tiny-vue", "keywords": [ diff --git a/packages/vue-common/src/index.ts b/packages/vue-common/src/index.ts index 26d9e61735..a6a8722c74 100644 --- a/packages/vue-common/src/index.ts +++ b/packages/vue-common/src/index.ts @@ -176,7 +176,7 @@ export const setup = ({ props, context, renderless, api, extendOptions = {}, mon // 获取组件级配置和全局配置(inject需要带有默认值,否则控制台会报警告) let globalDesignConfig: DesignConfig = customDesignConfig.designConfig || hooks.inject(design.configKey, {}) // globalDesignConfig 可能是响应式对象,比如 computed - globalDesignConfig = globalDesignConfig.value || globalDesignConfig + globalDesignConfig = globalDesignConfig?.value || globalDesignConfig || {} const designConfig = globalDesignConfig?.components?.[getComponentName().replace($prefix, '')] const utils = {