JavaLionLi / plus-ui

RuoYi-Vue-Plus 5.X 与 RuoYi-Cloud-Plus 2.X 统一 UI 前端代码仓库 问题请到主框架反馈
https://plus-doc.dromara.org
MIT License
58 stars 38 forks source link

打包正式环境会报错 No overload matches this call #2

Closed moonmm closed 11 months ago

moonmm commented 11 months ago

刚拉下来的代码,没有修改,打包正式环境会报错, node 版本v16.20.2:

Errors  Files
     1  src/views/system/oss/config.vue:167  TS2769: No overload matches this call
     1  src/views/system/user/index.vue:564  TS2322: Type XXX is not assignable to type 'string'
src/views/system/oss/config.vue:167:17 - error TS2769: No overload matches this call.
  Overload 2 of 3, '(value: FieldOption[]): Ref<{ key: number; label: string; visible: boolean; children: ...[]; }[]>', gave the following error.
    Property 'children' is missing in type '{ key: number; label: string; visible: true; }' but required in type 'FieldOption'.

167 const columns = ref<FieldOption[]>([
                    ~~~~~~~~~~~~~~~~~~~~
168   { key: 0, label: `主建`, visible: true },
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
176   { key: 8, label: `状态`, visible: true }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177 ]);
    ~~

  src/types/global.d.ts:16:5
    16     children: Array<FieldOption>;

src/views/system/user/index.vue:564:3 - error TS2322: Type '{ [x: number]: string; toString: () => string; charAt: (pos: number) => string; charCodeAt: (index: number) => number; concat: (...strings: string[]) => string; indexOf: (searchString: string, position?: number | undefined) => number; ... 44 more ...; [Symbol.iterator]: () => IterableIterator<...>; }' is not assignable to type 'string'.

564   form.value.password = initPassword.value;
      ~~~~~~~~~~~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  src/views/system/oss/config.vue:167
     1  src/views/system/user/index.vue:564
moonmm commented 11 months ago

新版已修复