Skip to content

Commit 93b9d53

Browse files
timi137137uyarn
andauthored
fix(deps): 修正因锁文件错误导致的编译失败 (#777)
* fix(i18n): 修复Vue2遗留的语法 * fix(deps): 修正因锁文件导致编译失败的问题 * chore: update lock * chore: update lock --------- Co-authored-by: Uyarn <[email protected]>
1 parent 867532b commit 93b9d53

File tree

37 files changed

+3430
-4054
lines changed

37 files changed

+3430
-4054
lines changed

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
node_modules
1+
# OS specific files
22
.DS_Store
33

4+
# dependencies manager
5+
node_modules/
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/sdks
12+
!.yarn/versions
13+
414
# build files
515
es/
616
lib/

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package-lock.json

Lines changed: 3129 additions & 3783 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"echarts": "5.4.3",
2828
"lodash": "^4.17.21",
2929
"nprogress": "^0.2.0",
30-
"pinia": "^2.1.7",
30+
"pinia": "2.1.7",
3131
"pinia-plugin-persistedstate": "^3.2.0",
3232
"qrcode.vue": "^3.4.1",
3333
"qs": "^6.11.2",
@@ -43,6 +43,7 @@
4343
"@commitlint/config-conventional": "^18.6.0",
4444
"@types/echarts": "^4.9.21",
4545
"@types/lodash": "^4.17.6",
46+
"@types/mockjs": "^1.0.10",
4647
"@types/nprogress": "^0.2.3",
4748
"@types/qs": "^6.9.11",
4849
"@typescript-eslint/eslint-plugin": "^6.21.0",
@@ -65,7 +66,6 @@
6566
"less": "^4.2.0",
6667
"lint-staged": "^15.2.2",
6768
"mockjs": "^1.1.0",
68-
"@types/mockjs": "^1.0.10",
6969
"postcss-html": "^1.6.0",
7070
"postcss-less": "^6.0.0",
7171
"prettier": "^3.2.5",

src/components/common-table/index.vue

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,45 @@
55
<t-col :span="10">
66
<t-row :gutter="[24, 24]">
77
<t-col :span="4">
8-
<t-form-item :label="$t('components.commonTable.contractName')" name="name">
8+
<t-form-item :label="t('components.commonTable.contractName')" name="name">
99
<t-input
1010
v-model="formData.name"
1111
class="form-item-content"
1212
type="search"
13-
:placeholder="$t('components.commonTable.contractNamePlaceholder')"
13+
:placeholder="t('components.commonTable.contractNamePlaceholder')"
1414
:style="{ minWidth: '134px' }"
1515
/>
1616
</t-form-item>
1717
</t-col>
1818
<t-col :span="4">
19-
<t-form-item :label="$t('components.commonTable.contractStatus')" name="status">
19+
<t-form-item :label="t('components.commonTable.contractStatus')" name="status">
2020
<t-select
2121
v-model="formData.status"
2222
class="form-item-content"
2323
:options="CONTRACT_STATUS_OPTIONS"
24-
:placeholder="$t('components.commonTable.contractStatusPlaceholder')"
24+
:placeholder="t('components.commonTable.contractStatusPlaceholder')"
2525
clearable
2626
/>
2727
</t-form-item>
2828
</t-col>
2929
<t-col :span="4">
30-
<t-form-item :label="$t('components.commonTable.contractNum')" name="no">
30+
<t-form-item :label="t('components.commonTable.contractNum')" name="no">
3131
<t-input
3232
v-model="formData.no"
3333
class="form-item-content"
34-
:placeholder="$t('components.commonTable.contractNumPlaceholder')"
34+
:placeholder="t('components.commonTable.contractNumPlaceholder')"
3535
:style="{ minWidth: '134px' }"
3636
/>
3737
</t-form-item>
3838
</t-col>
3939
<t-col :span="4">
40-
<t-form-item :label="$t('components.commonTable.contractType')" name="type">
40+
<t-form-item :label="t('components.commonTable.contractType')" name="type">
4141
<t-select
4242
v-model="formData.type"
4343
style="display: inline-block"
4444
class="form-item-content"
4545
:options="CONTRACT_TYPE_OPTIONS"
46-
:placeholder="$t('components.commonTable.contractTypePlaceholder')"
46+
:placeholder="t('components.commonTable.contractTypePlaceholder')"
4747
clearable
4848
/>
4949
</t-form-item>
@@ -53,9 +53,9 @@
5353

5454
<t-col :span="2" class="operation-container">
5555
<t-button theme="primary" type="submit" :style="{ marginLeft: 'var(--td-comp-margin-s)' }">
56-
{{ $t('components.commonTable.query') }}
56+
{{ t('components.commonTable.query') }}
5757
</t-button>
58-
<t-button type="reset" variant="base" theme="default"> {{ $t('components.commonTable.reset') }} </t-button>
58+
<t-button type="reset" variant="base" theme="default"> {{ t('components.commonTable.reset') }} </t-button>
5959
</t-col>
6060
</t-row>
6161
</t-form>
@@ -75,40 +75,40 @@
7575
>
7676
<template #status="{ row }">
7777
<t-tag v-if="row.status === CONTRACT_STATUS.FAIL" theme="danger" variant="light">
78-
{{ $t('components.commonTable.contractStatusEnum.fail') }}
78+
{{ t('components.commonTable.contractStatusEnum.fail') }}
7979
</t-tag>
8080
<t-tag v-if="row.status === CONTRACT_STATUS.AUDIT_PENDING" theme="warning" variant="light">
81-
{{ $t('components.commonTable.contractStatusEnum.audit') }}
81+
{{ t('components.commonTable.contractStatusEnum.audit') }}
8282
</t-tag>
8383
<t-tag v-if="row.status === CONTRACT_STATUS.EXEC_PENDING" theme="warning" variant="light">
84-
{{ $t('components.commonTable.contractStatusEnum.pending') }}
84+
{{ t('components.commonTable.contractStatusEnum.pending') }}
8585
</t-tag>
8686
<t-tag v-if="row.status === CONTRACT_STATUS.EXECUTING" theme="success" variant="light">
87-
{{ $t('components.commonTable.contractStatusEnum.executing') }}
87+
{{ t('components.commonTable.contractStatusEnum.executing') }}
8888
</t-tag>
8989
<t-tag v-if="row.status === CONTRACT_STATUS.FINISH" theme="success" variant="light">
90-
{{ $t('components.commonTable.contractStatusEnum.finish') }}
90+
{{ t('components.commonTable.contractStatusEnum.finish') }}
9191
</t-tag>
9292
</template>
9393
<template #contractType="{ row }">
94-
<p v-if="row.contractType === CONTRACT_TYPES.MAIN">{{ $t('pages.listBase.contractStatusEnum.fail') }}</p>
95-
<p v-if="row.contractType === CONTRACT_TYPES.SUB">{{ $t('pages.listBase.contractStatusEnum.audit') }}</p>
94+
<p v-if="row.contractType === CONTRACT_TYPES.MAIN">{{ t('pages.listBase.contractStatusEnum.fail') }}</p>
95+
<p v-if="row.contractType === CONTRACT_TYPES.SUB">{{ t('pages.listBase.contractStatusEnum.audit') }}</p>
9696
<p v-if="row.contractType === CONTRACT_TYPES.SUPPLEMENT">
97-
{{ $t('pages.listBase.contractStatusEnum.pending') }}
97+
{{ t('pages.listBase.contractStatusEnum.pending') }}
9898
</p>
9999
</template>
100100
<template #paymentType="{ row }">
101101
<div v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.PAYMENT" class="payment-col">
102-
{{ $t('pages.listBase.pay') }}<trend class="dashboard-item-trend" type="up" />
102+
{{ t('pages.listBase.pay') }}<trend class="dashboard-item-trend" type="up" />
103103
</div>
104104
<div v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.RECEIPT" class="payment-col">
105-
{{ $t('pages.listBase.receive') }}<trend class="dashboard-item-trend" type="down" />
105+
{{ t('pages.listBase.receive') }}<trend class="dashboard-item-trend" type="down" />
106106
</div>
107107
</template>
108108
<template #op="slotProps">
109109
<t-space>
110-
<t-link theme="primary" @click="handleClickDetail()"> {{ $t('pages.listBase.detail') }}</t-link>
111-
<t-link theme="danger" @click="handleClickDelete(slotProps)"> {{ $t('pages.listBase.delete') }}</t-link>
110+
<t-link theme="primary" @click="handleClickDetail()"> {{ t('pages.listBase.detail') }}</t-link>
111+
<t-link theme="danger" @click="handleClickDelete(slotProps)"> {{ t('pages.listBase.delete') }}</t-link>
112112
</t-space>
113113
</template>
114114
</t-table>

src/components/product-card/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</template>
1414
<template #status>
1515
<t-tag :theme="product.isSetup ? 'success' : 'default'" :disabled="!product.isSetup">{{
16-
product.isSetup ? $t('components.isSetup.on') : $t('components.isSetup.off')
16+
product.isSetup ? t('components.isSetup.on') : t('components.isSetup.off')
1717
}}</t-tag>
1818
</template>
1919
<template #content>
@@ -36,12 +36,12 @@
3636
trigger="click"
3737
:options="[
3838
{
39-
content: $t('components.manage'),
39+
content: t('components.manage'),
4040
value: 'manage',
4141
onClick: () => handleClickManage(product),
4242
},
4343
{
44-
content: $t('components.delete'),
44+
content: t('components.delete'),
4545
value: 'delete',
4646
onClick: () => handleClickDelete(product),
4747
},
@@ -66,6 +66,8 @@ import {
6666
} from 'tdesign-icons-vue-next';
6767
import type { PropType } from 'vue';
6868
69+
import { t } from '@/locales';
70+
6971
export interface CardProductType {
7072
type: number;
7173
isSetup: boolean;

src/layouts/components/Header.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
<!-- 全局通知 -->
2424
<notice />
2525

26-
<t-tooltip placement="bottom" :content="$t('layout.header.code')">
26+
<t-tooltip placement="bottom" :content="t('layout.header.code')">
2727
<t-button theme="default" shape="square" variant="text" @click="navToGitHub">
2828
<t-icon name="logo-github" />
2929
</t-button>
3030
</t-tooltip>
31-
<t-tooltip placement="bottom" :content="$t('layout.header.help')">
31+
<t-tooltip placement="bottom" :content="t('layout.header.help')">
3232
<t-button theme="default" shape="square" variant="text" @click="navToHelper">
3333
<t-icon name="help-circle" />
3434
</t-button>
@@ -51,10 +51,10 @@
5151
<template #dropdown>
5252
<t-dropdown-menu>
5353
<t-dropdown-item class="operations-dropdown-container-item" @click="handleNav('/user/index')">
54-
<user-circle-icon />{{ $t('layout.header.user') }}
54+
<user-circle-icon />{{ t('layout.header.user') }}
5555
</t-dropdown-item>
5656
<t-dropdown-item class="operations-dropdown-container-item" @click="handleLogout">
57-
<poweroff-icon />{{ $t('layout.header.signOut') }}
57+
<poweroff-icon />{{ t('layout.header.signOut') }}
5858
</t-dropdown-item>
5959
</t-dropdown-menu>
6060
</template>
@@ -66,7 +66,7 @@
6666
<template #suffix><chevron-down-icon /></template>
6767
</t-button>
6868
</t-dropdown>
69-
<t-tooltip placement="bottom" :content="$t('layout.header.setting')">
69+
<t-tooltip placement="bottom" :content="t('layout.header.setting')">
7070
<t-button theme="default" shape="square" variant="text" @click="toggleSettingPanel">
7171
<setting-icon />
7272
</t-button>
@@ -85,7 +85,7 @@ import { useRouter } from 'vue-router';
8585
8686
import LogoFull from '@/assets/assets-logo-full.svg?component';
8787
import { prefix } from '@/config/global';
88-
import { langList } from '@/locales/index';
88+
import { langList, t } from '@/locales';
8989
import { useLocale } from '@/locales/useLocale';
9090
import { getActive } from '@/router';
9191
import { useSettingStore, useUserStore } from '@/store';

src/layouts/components/LayoutContent.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@
3737
<t-dropdown-menu>
3838
<t-dropdown-item @click="() => handleRefresh(routeItem, index)">
3939
<t-icon name="refresh" />
40-
{{ $t('layout.tagTabs.refresh') }}
40+
{{ t('layout.tagTabs.refresh') }}
4141
</t-dropdown-item>
4242
<t-dropdown-item v-if="index > 1" @click="() => handleCloseAhead(routeItem.path, index)">
4343
<t-icon name="arrow-left" />
44-
{{ $t('layout.tagTabs.closeLeft') }}
44+
{{ t('layout.tagTabs.closeLeft') }}
4545
</t-dropdown-item>
4646
<t-dropdown-item
4747
v-if="index < tabRouters.length - 1"
4848
@click="() => handleCloseBehind(routeItem.path, index)"
4949
>
5050
<t-icon name="arrow-right" />
51-
{{ $t('layout.tagTabs.closeRight') }}
51+
{{ t('layout.tagTabs.closeRight') }}
5252
</t-dropdown-item>
5353
<t-dropdown-item v-if="tabRouters.length > 2" @click="() => handleCloseOther(routeItem.path, index)">
5454
<t-icon name="close-circle" />
55-
{{ $t('layout.tagTabs.closeOther') }}
55+
{{ t('layout.tagTabs.closeOther') }}
5656
</t-dropdown-item>
5757
</t-dropdown-menu>
5858
</template>
@@ -76,6 +76,7 @@ import { computed, nextTick, ref } from 'vue';
7676
import { useRoute, useRouter } from 'vue-router';
7777
7878
import { prefix } from '@/config/global';
79+
import { t } from '@/locales';
7980
import { useLocale } from '@/locales/useLocale';
8081
import { useSettingStore, useTabsRouterStore } from '@/store';
8182
import type { TRouterInfo, TTabRemoveOptions } from '@/types/interface';

src/layouts/components/Notice.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<template #content>
44
<div class="header-msg">
55
<div class="header-msg-top">
6-
<p>{{ $t('layout.notice.title') }}</p>
6+
<p>{{ t('layout.notice.title') }}</p>
77
<t-button
88
v-if="unreadMsg.length > 0"
99
class="clear-btn"
1010
variant="text"
1111
theme="primary"
1212
@click="setRead('all')"
13-
>{{ $t('layout.notice.clear') }}</t-button
13+
>{{ t('layout.notice.clear') }}</t-button
1414
>
1515
</div>
1616
<t-list v-if="unreadMsg.length > 0" class="narrow-scrollbar" :split="false">
@@ -22,19 +22,19 @@
2222
<p class="msg-time">{{ item.date }}</p>
2323
<template #action>
2424
<t-button size="small" variant="outline" @click="setRead('radio', item)">
25-
{{ $t('layout.notice.setRead') }}
25+
{{ t('layout.notice.setRead') }}
2626
</t-button>
2727
</template>
2828
</t-list-item>
2929
</t-list>
3030

3131
<div v-else class="empty-list">
3232
<img src="https://tdesign.gtimg.com/pro-template/personal/nothing.png" alt="" />
33-
<p>{{ $t('layout.notice.empty') }}</p>
33+
<p>{{ t('layout.notice.empty') }}</p>
3434
</div>
3535
<div v-if="unreadMsg.length > 0" class="header-msg-bottom">
3636
<t-button class="header-msg-bottom-link" variant="text" theme="default" block @click="goDetail">{{
37-
$t('layout.notice.viewAll')
37+
t('layout.notice.viewAll')
3838
}}</t-button>
3939
</div>
4040
</div>
@@ -51,6 +51,7 @@
5151
import { storeToRefs } from 'pinia';
5252
import { useRouter } from 'vue-router';
5353
54+
import { t } from '@/locales';
5455
import { useNotificationStore } from '@/store';
5556
import type { NotificationItem } from '@/types/interface';
5657

src/layouts/components/Search.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div v-if="layout === 'side'" class="header-menu-search">
33
<t-input
44
:class="['header-search', { 'hover-active': isSearchFocus }]"
5-
:placeholder="$t('layout.searchPlaceholder')"
5+
:placeholder="t('layout.searchPlaceholder')"
66
@blur="changeSearchFocus(false)"
77
@focus="changeSearchFocus(true)"
88
>
@@ -39,6 +39,8 @@
3939
<script setup lang="ts">
4040
import { ref } from 'vue';
4141
42+
import { t } from '@/locales';
43+
4244
defineProps({
4345
layout: String,
4446
});

0 commit comments

Comments
 (0)