前端升级报错

利江 错误处理 7

版本号:

前端版本5.1.0

错误信息:

Issues checking in progress...
ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:405:21
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
403 | OioModal,
404 | {
> 405 | title: this.$translate('表头设置'),
| ^^^^^^^^^^
406 | wrapperClassName: `${classNamePrefix}-modal`,
407 | wrapperProps: {
408 | id: modalId

ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:441:52
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
439 | 'onUpdate:checked': onLeftSelectedAll
440 | }),
> 441 | createVNode('span', {}, this.$translate('未展示字段'))
| ^^^^^^^^^^
442 | ])
443 | ];
444 | },

ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:453:52
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
451 | 'onUpdate:checked': onRightSelectedAll
452 | }),
> 453 | createVNode('span', {}, this.$translate('已展示字段'))
| ^^^^^^^^^^
454 | ])
455 | ];
456 | },

ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:473:45
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
471 | createVNode(OioInputSearch, {
472 | class: 'ant-transfer-list-search',
> 473 | placeholder: this.$translate('请输入搜索内容'),
| ^^^^^^^^^^
474 | onSearch
475 | })
476 | ]

ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:492:41
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
490 | OioButton,
491 | { type: ButtonType.link, async: true, icon: 'oinone-zhongzhi2', onClick: onReset },
> 492 | { default: () => this.$translate('恢复默认值') }
| ^^^^^^^^^^
493 | )
494 | ]),
495 | createVNode('div', { class: `${classNamePrefix}-modal-footer-right` }, [

ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:496:85
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
494 | ]),
495 | createVNode('div', { class: `${classNamePrefix}-modal-footer-right` }, [
> 496 | createVNode(OioButton, { onClick: onCancel }, { default: () => this.$translate('取消') }),
| ^^^^^^^^^^
497 | createVNode(
498 | OioButton,
499 | { type: ButtonType.primary, async: true, onClick: onOk },

ERROR in node_modules/@kunlun/vue-admin-base/src/components/user-prefer/StandardUserPreferSetting.vue:500:41
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ visible: { type: BooleanConstructor; }; fields: { type: PropType<DataOption[]>; }; invisibleFields: { type: PropType<DataOption[]>; }; visibleFields: { ...; }; ok: { ...; }; reset: { ...; }; }>> & { ...; }, ... 16 more ..., { ...; }>'.
498 | OioButton,
499 | { type: ButtonType.primary, async: true, onClick: onOk },
> 500 | { default: () => this.$translate('确定') }
| ^^^^^^^^^^
501 | )
502 | ])
503 | ])

ERROR in node_modules/@kunlun/vue-admin-base/src/view/icon-manage/view/search/IconSearch.vue:103:27
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ onSort: { type: PropType<() => void>; }; onUploadIcon: { type: PropType<() => void>; }; onManageGroup: { type: PropType<() => void>; }; widgetGroup: { type: ObjectConstructor; }; ... 52 more ...; validateOnRuleChange: { ...; }; }>> & {}, ... 16 more ..., { .....'.
101 | },
102 | render() {
> 103 | const { onUploadIcon, $translate } = this;
| ^^^^^^^^^^
104 |
105 | const searchContent = () => {
106 | const fieldChildren = PropRecordHelper.collectionSlots(this.$slots, [{ origin: 'default', isNotNull: true }])

ERROR in node_modules/@kunlun/vue-admin-base/src/view/reset-password/layout/ResetPasswordLayout.vue:64:24
TS2339: Property '$translate' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ logo: { type: StringConstructor; required: true; }; copyright: { type: PropType<Copyright>; required: true; }; wrapperClassName: { type: PropType<...>; }; }>> & {}, ... 16 more ..., {}>'.
62 | }
63 | },
> 64 | this.$translate(this.copyright.company)
| ^^^^^^^^^^
65 | )
66 | ]),
67 | createVNode('br'),

你的期望:

前端版本5.1.0升级到5.2.0

如何重现问题:
版本改成v5.2.0

npm run clean;

npm i;

npm run dev;

 

回复

共1条回复 我来回复