-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS4082: Default export of the module has or is using private name 'Props'. #5129
Comments
2022年的一个issues #1232 现在又出现了,版本2.1.10是正常的 |
这是 TS 的限制,有的版本没问题是因为用了一些特殊处理把不可以被直接导出的私有接口展开成新的类型了。 寻找该组件所引用的 |
1 楼回复的时候我尝试找定义类型和导入类型的了,但是报错这个组件的 props 定义没有导入外部类型,导入类型的地方也带上了 import { ref, reactive, watchEffect, getCurrentInstance, watch } from 'vue';
import { Search, More, UploadFilled } from '@element-plus/icons-vue';
import type { AiFaqContentVO, AiFaqContentListVO } from '../types';
import { useBroadcastChannel, useFileDialog } from '@vueuse/core';
import ImportDialog from '@/module/ai/components/manager/ImportDialog.vue';
import FaqDetailDialog from '@/module/ai/components/manager/FaqDetailDialog.vue';
import { listToTree } from '@/module/stat/utils/stat-table-utils';
import type { DragEvents } from 'element-plus/es/components/tree/src/model/useDragNode';
import type { AllowDropType, NodeDropType } from 'element-plus/es/components/tree/src/tree.type';
import ContextMenu from './ContextMenu.vue';
import type { ContextMenuItem } from './ContextMenu.vue';
import type { FileInfo } from '@/hooks/form/use-upload/types';
import type { UploadFiles, UploadFile } from 'element-plus';
import { PublicResourceType } from '@/hooks/form/use-upload/types';
const { post } = useBroadcastChannel({ name: 'updateFaqPage' });
const showDrawer = ref(false);
const treeRef = ref();
const selectedArr = ref<any>([]);
const selectedIds = ref<any>([]);
const selectedParentIds = ref<any>([0]);
const faqDialogRef = ref();
const extraParams = ref({ typeId: 0, typeIds: [0] });
const multipleSelection = ref<AiFaqContentVO[]>([]);
const searchParams = reactive({
keyword: '',
});
const props = defineProps<{
id: string;
name: string;
}>();
|
该组件上如果有 |
您指的是报错的这个组件 |
Vue - Official extension or vue-tsc version
2.2.0
VSCode version
1.96.4
Vue version
3.5.13
TypeScript version
5.7.3
System Info
package.json dependencies
Steps to reproduce
报错信息如下:
这个错误是非常诡异的,我的点仅仅有
1133
行,但是报错却是 3090 行。What is expected?
出现了和这个诡异的错误
What is actually happening?
出现了此错误,希望找到错误的原因,这种错误也是极难复现,可有本地获取详细日志的方式?我可以协助获取并提交。
Link to minimal reproduction
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: