diff --git a/packages/design-core/src/preview/src/preview/srcFiles/lowcode.js b/packages/design-core/src/preview/src/preview/srcFiles/lowcode.js index 22d96c1b60..99491ac237 100644 --- a/packages/design-core/src/preview/src/preview/srcFiles/lowcode.js +++ b/packages/design-core/src/preview/src/preview/srcFiles/lowcode.js @@ -88,5 +88,5 @@ export default () => { const stores = useStores() - return { t: i18n.global.t, stores, lowcodeWrap } + return { t: i18n.global.t, stores, lowcodeWrap, utils } } diff --git a/packages/vue-generator/src/generator/page.js b/packages/vue-generator/src/generator/page.js index 58fedcee67..2bf835f818 100644 --- a/packages/vue-generator/src/generator/page.js +++ b/packages/vue-generator/src/generator/page.js @@ -1,14 +1,14 @@ /** -* Copyright (c) 2023 - present TinyEngine Authors. -* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd. -* -* Use of this source code is governed by an MIT-style license. -* -* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, -* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR -* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. -* -*/ + * Copyright (c) 2023 - present TinyEngine Authors. + * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd. + * + * Use of this source code is governed by an MIT-style license. + * + * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, + * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR + * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + * + */ import { capitalize, hyphenate } from '@vue/shared' import { @@ -397,7 +397,7 @@ ${imports.join('\n')} const props = defineProps({${propsArr.join(',\n')}}) const emit = defineEmits(${JSON.stringify(emitsArr)}) -const { t, lowcodeWrap, stores } = vue.inject(I18nInjectionKey).lowcode() +const { t, lowcodeWrap, stores, utils } = vue.inject(I18nInjectionKey).lowcode() const wrap = lowcodeWrap(props, { emit }, t) ${iconStatement}