Skip to content

Commit

Permalink
fix(deps): 修正因锁文件错误导致的编译失败 (#777)
Browse files Browse the repository at this point in the history
* fix(i18n): 修复Vue2遗留的语法

* fix(deps): 修正因锁文件导致编译失败的问题

* chore: update lock

* chore: update lock

---------

Co-authored-by: Uyarn <[email protected]>
  • Loading branch information
timi137137 and uyarn authored Nov 1, 2024
1 parent 867532b commit 93b9d53
Show file tree
Hide file tree
Showing 37 changed files with 3,430 additions and 4,054 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
node_modules
# OS specific files
.DS_Store

# dependencies manager
node_modules/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# build files
es/
lib/
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
6,912 changes: 3,129 additions & 3,783 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"echarts": "5.4.3",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"pinia": "2.1.7",
"pinia-plugin-persistedstate": "^3.2.0",
"qrcode.vue": "^3.4.1",
"qs": "^6.11.2",
Expand All @@ -43,6 +43,7 @@
"@commitlint/config-conventional": "^18.6.0",
"@types/echarts": "^4.9.21",
"@types/lodash": "^4.17.6",
"@types/mockjs": "^1.0.10",
"@types/nprogress": "^0.2.3",
"@types/qs": "^6.9.11",
"@typescript-eslint/eslint-plugin": "^6.21.0",
Expand All @@ -65,7 +66,6 @@
"less": "^4.2.0",
"lint-staged": "^15.2.2",
"mockjs": "^1.1.0",
"@types/mockjs": "^1.0.10",
"postcss-html": "^1.6.0",
"postcss-less": "^6.0.0",
"prettier": "^3.2.5",
Expand Down
44 changes: 22 additions & 22 deletions src/components/common-table/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,45 @@
<t-col :span="10">
<t-row :gutter="[24, 24]">
<t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractName')" name="name">
<t-form-item :label="t('components.commonTable.contractName')" name="name">
<t-input
v-model="formData.name"
class="form-item-content"
type="search"
:placeholder="$t('components.commonTable.contractNamePlaceholder')"
:placeholder="t('components.commonTable.contractNamePlaceholder')"
:style="{ minWidth: '134px' }"
/>
</t-form-item>
</t-col>
<t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractStatus')" name="status">
<t-form-item :label="t('components.commonTable.contractStatus')" name="status">
<t-select
v-model="formData.status"
class="form-item-content"
:options="CONTRACT_STATUS_OPTIONS"
:placeholder="$t('components.commonTable.contractStatusPlaceholder')"
:placeholder="t('components.commonTable.contractStatusPlaceholder')"
clearable
/>
</t-form-item>
</t-col>
<t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractNum')" name="no">
<t-form-item :label="t('components.commonTable.contractNum')" name="no">
<t-input
v-model="formData.no"
class="form-item-content"
:placeholder="$t('components.commonTable.contractNumPlaceholder')"
:placeholder="t('components.commonTable.contractNumPlaceholder')"
:style="{ minWidth: '134px' }"
/>
</t-form-item>
</t-col>
<t-col :span="4">
<t-form-item :label="$t('components.commonTable.contractType')" name="type">
<t-form-item :label="t('components.commonTable.contractType')" name="type">
<t-select
v-model="formData.type"
style="display: inline-block"
class="form-item-content"
:options="CONTRACT_TYPE_OPTIONS"
:placeholder="$t('components.commonTable.contractTypePlaceholder')"
:placeholder="t('components.commonTable.contractTypePlaceholder')"
clearable
/>
</t-form-item>
Expand All @@ -53,9 +53,9 @@

<t-col :span="2" class="operation-container">
<t-button theme="primary" type="submit" :style="{ marginLeft: 'var(--td-comp-margin-s)' }">
{{ $t('components.commonTable.query') }}
{{ t('components.commonTable.query') }}
</t-button>
<t-button type="reset" variant="base" theme="default"> {{ $t('components.commonTable.reset') }} </t-button>
<t-button type="reset" variant="base" theme="default"> {{ t('components.commonTable.reset') }} </t-button>
</t-col>
</t-row>
</t-form>
Expand All @@ -75,40 +75,40 @@
>
<template #status="{ row }">
<t-tag v-if="row.status === CONTRACT_STATUS.FAIL" theme="danger" variant="light">
{{ $t('components.commonTable.contractStatusEnum.fail') }}
{{ t('components.commonTable.contractStatusEnum.fail') }}
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.AUDIT_PENDING" theme="warning" variant="light">
{{ $t('components.commonTable.contractStatusEnum.audit') }}
{{ t('components.commonTable.contractStatusEnum.audit') }}
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.EXEC_PENDING" theme="warning" variant="light">
{{ $t('components.commonTable.contractStatusEnum.pending') }}
{{ t('components.commonTable.contractStatusEnum.pending') }}
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.EXECUTING" theme="success" variant="light">
{{ $t('components.commonTable.contractStatusEnum.executing') }}
{{ t('components.commonTable.contractStatusEnum.executing') }}
</t-tag>
<t-tag v-if="row.status === CONTRACT_STATUS.FINISH" theme="success" variant="light">
{{ $t('components.commonTable.contractStatusEnum.finish') }}
{{ t('components.commonTable.contractStatusEnum.finish') }}
</t-tag>
</template>
<template #contractType="{ row }">
<p v-if="row.contractType === CONTRACT_TYPES.MAIN">{{ $t('pages.listBase.contractStatusEnum.fail') }}</p>
<p v-if="row.contractType === CONTRACT_TYPES.SUB">{{ $t('pages.listBase.contractStatusEnum.audit') }}</p>
<p v-if="row.contractType === CONTRACT_TYPES.MAIN">{{ t('pages.listBase.contractStatusEnum.fail') }}</p>
<p v-if="row.contractType === CONTRACT_TYPES.SUB">{{ t('pages.listBase.contractStatusEnum.audit') }}</p>
<p v-if="row.contractType === CONTRACT_TYPES.SUPPLEMENT">
{{ $t('pages.listBase.contractStatusEnum.pending') }}
{{ t('pages.listBase.contractStatusEnum.pending') }}
</p>
</template>
<template #paymentType="{ row }">
<div v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.PAYMENT" class="payment-col">
{{ $t('pages.listBase.pay') }}<trend class="dashboard-item-trend" type="up" />
{{ t('pages.listBase.pay') }}<trend class="dashboard-item-trend" type="up" />
</div>
<div v-if="row.paymentType === CONTRACT_PAYMENT_TYPES.RECEIPT" class="payment-col">
{{ $t('pages.listBase.receive') }}<trend class="dashboard-item-trend" type="down" />
{{ t('pages.listBase.receive') }}<trend class="dashboard-item-trend" type="down" />
</div>
</template>
<template #op="slotProps">
<t-space>
<t-link theme="primary" @click="handleClickDetail()"> {{ $t('pages.listBase.detail') }}</t-link>
<t-link theme="danger" @click="handleClickDelete(slotProps)"> {{ $t('pages.listBase.delete') }}</t-link>
<t-link theme="primary" @click="handleClickDetail()"> {{ t('pages.listBase.detail') }}</t-link>
<t-link theme="danger" @click="handleClickDelete(slotProps)"> {{ t('pages.listBase.delete') }}</t-link>
</t-space>
</template>
</t-table>
Expand Down
8 changes: 5 additions & 3 deletions src/components/product-card/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>
<template #status>
<t-tag :theme="product.isSetup ? 'success' : 'default'" :disabled="!product.isSetup">{{
product.isSetup ? $t('components.isSetup.on') : $t('components.isSetup.off')
product.isSetup ? t('components.isSetup.on') : t('components.isSetup.off')
}}</t-tag>
</template>
<template #content>
Expand All @@ -36,12 +36,12 @@
trigger="click"
:options="[
{
content: $t('components.manage'),
content: t('components.manage'),
value: 'manage',
onClick: () => handleClickManage(product),
},
{
content: $t('components.delete'),
content: t('components.delete'),
value: 'delete',
onClick: () => handleClickDelete(product),
},
Expand All @@ -66,6 +66,8 @@ import {
} from 'tdesign-icons-vue-next';
import type { PropType } from 'vue';
import { t } from '@/locales';
export interface CardProductType {
type: number;
isSetup: boolean;
Expand Down
12 changes: 6 additions & 6 deletions src/layouts/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<!-- 全局通知 -->
<notice />

<t-tooltip placement="bottom" :content="$t('layout.header.code')">
<t-tooltip placement="bottom" :content="t('layout.header.code')">
<t-button theme="default" shape="square" variant="text" @click="navToGitHub">
<t-icon name="logo-github" />
</t-button>
</t-tooltip>
<t-tooltip placement="bottom" :content="$t('layout.header.help')">
<t-tooltip placement="bottom" :content="t('layout.header.help')">
<t-button theme="default" shape="square" variant="text" @click="navToHelper">
<t-icon name="help-circle" />
</t-button>
Expand All @@ -51,10 +51,10 @@
<template #dropdown>
<t-dropdown-menu>
<t-dropdown-item class="operations-dropdown-container-item" @click="handleNav('/user/index')">
<user-circle-icon />{{ $t('layout.header.user') }}
<user-circle-icon />{{ t('layout.header.user') }}
</t-dropdown-item>
<t-dropdown-item class="operations-dropdown-container-item" @click="handleLogout">
<poweroff-icon />{{ $t('layout.header.signOut') }}
<poweroff-icon />{{ t('layout.header.signOut') }}
</t-dropdown-item>
</t-dropdown-menu>
</template>
Expand All @@ -66,7 +66,7 @@
<template #suffix><chevron-down-icon /></template>
</t-button>
</t-dropdown>
<t-tooltip placement="bottom" :content="$t('layout.header.setting')">
<t-tooltip placement="bottom" :content="t('layout.header.setting')">
<t-button theme="default" shape="square" variant="text" @click="toggleSettingPanel">
<setting-icon />
</t-button>
Expand All @@ -85,7 +85,7 @@ import { useRouter } from 'vue-router';
import LogoFull from '@/assets/assets-logo-full.svg?component';
import { prefix } from '@/config/global';
import { langList } from '@/locales/index';
import { langList, t } from '@/locales';
import { useLocale } from '@/locales/useLocale';
import { getActive } from '@/router';
import { useSettingStore, useUserStore } from '@/store';
Expand Down
9 changes: 5 additions & 4 deletions src/layouts/components/LayoutContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@
<t-dropdown-menu>
<t-dropdown-item @click="() => handleRefresh(routeItem, index)">
<t-icon name="refresh" />
{{ $t('layout.tagTabs.refresh') }}
{{ t('layout.tagTabs.refresh') }}
</t-dropdown-item>
<t-dropdown-item v-if="index > 1" @click="() => handleCloseAhead(routeItem.path, index)">
<t-icon name="arrow-left" />
{{ $t('layout.tagTabs.closeLeft') }}
{{ t('layout.tagTabs.closeLeft') }}
</t-dropdown-item>
<t-dropdown-item
v-if="index < tabRouters.length - 1"
@click="() => handleCloseBehind(routeItem.path, index)"
>
<t-icon name="arrow-right" />
{{ $t('layout.tagTabs.closeRight') }}
{{ t('layout.tagTabs.closeRight') }}
</t-dropdown-item>
<t-dropdown-item v-if="tabRouters.length > 2" @click="() => handleCloseOther(routeItem.path, index)">
<t-icon name="close-circle" />
{{ $t('layout.tagTabs.closeOther') }}
{{ t('layout.tagTabs.closeOther') }}
</t-dropdown-item>
</t-dropdown-menu>
</template>
Expand All @@ -76,6 +76,7 @@ import { computed, nextTick, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { prefix } from '@/config/global';
import { t } from '@/locales';
import { useLocale } from '@/locales/useLocale';
import { useSettingStore, useTabsRouterStore } from '@/store';
import type { TRouterInfo, TTabRemoveOptions } from '@/types/interface';
Expand Down
11 changes: 6 additions & 5 deletions src/layouts/components/Notice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<template #content>
<div class="header-msg">
<div class="header-msg-top">
<p>{{ $t('layout.notice.title') }}</p>
<p>{{ t('layout.notice.title') }}</p>
<t-button
v-if="unreadMsg.length > 0"
class="clear-btn"
variant="text"
theme="primary"
@click="setRead('all')"
>{{ $t('layout.notice.clear') }}</t-button
>{{ t('layout.notice.clear') }}</t-button
>
</div>
<t-list v-if="unreadMsg.length > 0" class="narrow-scrollbar" :split="false">
Expand All @@ -22,19 +22,19 @@
<p class="msg-time">{{ item.date }}</p>
<template #action>
<t-button size="small" variant="outline" @click="setRead('radio', item)">
{{ $t('layout.notice.setRead') }}
{{ t('layout.notice.setRead') }}
</t-button>
</template>
</t-list-item>
</t-list>

<div v-else class="empty-list">
<img src="https://tdesign.gtimg.com/pro-template/personal/nothing.png" alt="" />
<p>{{ $t('layout.notice.empty') }}</p>
<p>{{ t('layout.notice.empty') }}</p>
</div>
<div v-if="unreadMsg.length > 0" class="header-msg-bottom">
<t-button class="header-msg-bottom-link" variant="text" theme="default" block @click="goDetail">{{
$t('layout.notice.viewAll')
t('layout.notice.viewAll')
}}</t-button>
</div>
</div>
Expand All @@ -51,6 +51,7 @@
import { storeToRefs } from 'pinia';
import { useRouter } from 'vue-router';
import { t } from '@/locales';
import { useNotificationStore } from '@/store';
import type { NotificationItem } from '@/types/interface';
Expand Down
4 changes: 3 additions & 1 deletion src/layouts/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div v-if="layout === 'side'" class="header-menu-search">
<t-input
:class="['header-search', { 'hover-active': isSearchFocus }]"
:placeholder="$t('layout.searchPlaceholder')"
:placeholder="t('layout.searchPlaceholder')"
@blur="changeSearchFocus(false)"
@focus="changeSearchFocus(true)"
>
Expand Down Expand Up @@ -39,6 +39,8 @@
<script setup lang="ts">
import { ref } from 'vue';
import { t } from '@/locales';
defineProps({
layout: String,
});
Expand Down
Loading

0 comments on commit 93b9d53

Please sign in to comment.