Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: t-link hover color #565

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/dashboard/base/components/RankList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</span>
</template>
<template #operation="slotProps">
<a class="t-button-link" @click="rehandleClickOp(slotProps)">详情</a>
<t-link theme="primary" @click="rehandleClickOp(slotProps)">详情</t-link>
</template>
</t-table>
</t-card>
Expand All @@ -43,7 +43,7 @@
<trend :type="row.growUp > 0 ? 'up' : 'down'" :describe="Math.abs(row.growUp)" />
</template>
<template #operation="slotProps">
<a class="t-button-link" @click="rehandleClickOp(slotProps)">详情</a>
<t-link theme="primary" @click="rehandleClickOp(slotProps)">详情</t-link>
</template>
</t-table>
</t-card>
Expand Down
9 changes: 5 additions & 4 deletions src/pages/detail/advanced/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@
</template>

<template #op="slotProps">
<a :class="prefix + '-link'" @click="listClick()">管理</a>
<a :class="prefix + '-link'" @click="deleteClickOp(slotProps)">删除</a>
<t-space>
<t-link theme="primary" @click="listClick()">管理</t-link>
<t-link theme="danger" @click="deleteClickOp(slotProps)">删除</t-link>
</t-space>
</template>

<template #op-column>
Expand Down Expand Up @@ -128,7 +130,6 @@ export default {
import { onMounted, ref } from 'vue';

import { getPurchaseList } from '@/api/detail';
import { prefix } from '@/config/global';

import Product from './components/Product.vue';
import { BASE_INFO_DATA, PRODUCT_LIST, TABLE_COLUMNS_DATA as columns } from './constants';
Expand Down Expand Up @@ -188,5 +189,5 @@ const onConfirm = () => {
</script>

<style lang="less" scoped>
@import url('./index.less');
@import './index.less';
</style>
9 changes: 5 additions & 4 deletions src/pages/detail/deploy/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
</span>
</template>
<template #op="slotProps">
<a :class="prefix + '-link'" @click="listClick()">管理</a>
<a :class="prefix + '-link'" @click="deleteClickOp(slotProps)">删除</a>
<t-space>
<t-link theme="primary" @click="listClick()">管理</t-link>
<t-link theme="danger" @click="deleteClickOp(slotProps)">删除</t-link>
</t-space>
</template>
<template #op-column>
<t-icon name="descending-order" />
Expand Down Expand Up @@ -84,7 +86,6 @@ import { CanvasRenderer } from 'echarts/renderers';
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';

import { getProjectList } from '@/api/detail';
import { prefix } from '@/config/global';
import { useSettingStore } from '@/store';
import { changeChartsTheme } from '@/utils/color';

Expand Down Expand Up @@ -197,7 +198,7 @@ const deleteClickOp = (e: { rowIndex: number }) => {
</script>

<style lang="less" scoped>
@import url('../base/index.less');
@import '../base/index.less';

.detail-deploy {
:deep(.t-card) {
Expand Down
6 changes: 4 additions & 2 deletions src/pages/list/base/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@
</template>

<template #op="slotProps">
<a class="t-button-link" @click="handleClickDetail()">详情</a>
<a class="t-button-link" @click="handleClickDelete(slotProps)">删除</a>
<t-space>
<t-link theme="primary" @click="handleClickDetail()">详情</t-link>
<t-link theme="danger" @click="handleClickDelete(slotProps)">删除</t-link>
</t-space>
</template>
</t-table>
</t-card>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/list/components/CommonTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@
</p>
</template>
<template #op="slotProps">
<a class="t-button-link" @click="rehandleClickOp(slotProps)">管理</a>
<a class="t-button-link" @click="handleClickDelete(slotProps)">删除</a>
<t-space>
<t-link theme="primary" @click="rehandleClickOp(slotProps)">管理</t-link>
<t-link theme="danger" @click="handleClickDelete(slotProps)">删除</t-link>
</t-space>
</template>
</t-table>
<t-dialog
Expand Down
31 changes: 0 additions & 31 deletions src/style/reset.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,3 @@ p {
box-sizing: border-box;
}

.t-button-link,
a {
color: var(--td-brand-color);
text-decoration: none;
cursor: pointer;
transition: color @anim-duration-base @anim-time-fn-easing;

&:hover {
color: var(--td-brand-color-hover);
}

&:active {
color: var(--td-brand-color-active);
}

&--active {
color: var(--td-brand-color-active);
}

&:focus {
text-decoration: none;
}
}

.t-button-link {
margin-right: var(--td-comp-margin-xxl);

&:last-child {
margin-right: 0;
}
}
6 changes: 6 additions & 0 deletions stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ module.exports = {
'value-keyword-case': null,
'property-no-unknown': [true, { checkPrefixed: true }],
'import-notation': 'string',
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['deep'],
},
],
},
overrides: [
{
Expand Down