Skip to content

自动引入,引入出现错误 #505

Closed
@PDB6912

Description

@PDB6912
//types.ts
export const enum Flow {
  'START_NODE' = 'START_NODE', 
}

//test.vue
impor {Flow} from './types;
import { reactive } from 'vue';
const data = reactive({
  kind : Flow.START_NODE
})

run的时候,auto-imports.d会自动添加 const TART_NODE: typeof import('tdesign-vue-next')['ART_NODE']

终端就会报Internal server error: Failed to resolve import "tdesign-vue-next/es/a-r-t_-n-o-d-e/style" from "src\models\flownodedesigner\flownodedesigner.ts". Does the file exist

看了下https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/tdesign.ts,也没明白为什么出现这样的问题,name.match(/^T[A-Z]/  name是怎么获取的

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions