Skip to content

Commit 4b0610d

Browse files
shenjunjianzzcr
authored andcommitted
fix(tree): [button,tree] update tree demos and the plain button's border color (#2470)
* fix(tree): fix tree's demo, modify delete popover's button to mini * fix(button): fix the plain button's border color
1 parent bdf1d7c commit 4b0610d

File tree

10 files changed

+17
-37
lines changed

10 files changed

+17
-37
lines changed

examples/sites/demos/pc/app/tree/basic-usage-composition-api.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,4 @@ function nodeClick(data, node, vm) {
7676
margin-top: 16px;
7777
margin-bottom: 16px;
7878
}
79-
.option-row > span {
80-
font-size: 18px;
81-
}
8279
</style>

examples/sites/demos/pc/app/tree/basic-usage.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,4 @@ export default {
8888
margin-top: 16px;
8989
margin-bottom: 16px;
9090
}
91-
.option-row > span {
92-
font-size: 18px;
93-
}
9491
</style>

examples/sites/demos/pc/app/tree/edit-composition-api.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@
88
<tiny-button @click="editNode">编辑节点</tiny-button>
99
<tiny-button @click="saveNode">5s后保存节点</tiny-button> <br />
1010
<br />
11-
<tiny-tree
12-
ref="treeRef"
13-
show-checkbox
14-
node-key="id"
15-
:data="data"
16-
current-node-key="1"
17-
default-expand-all
18-
></tiny-tree>
11+
<tiny-tree ref="treeRef" node-key="id" :data="data" current-node-key="1" default-expand-all></tiny-tree>
1912
</div>
2013
</template>
2114

examples/sites/demos/pc/app/tree/edit.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@
88
<tiny-button @click="editNode">编辑节点</tiny-button>
99
<tiny-button @click="saveNode">5s后保存节点</tiny-button> <br />
1010
<br />
11-
<tiny-tree
12-
ref="treeRef"
13-
show-checkbox
14-
node-key="id"
15-
:data="data"
16-
current-node-key="1"
17-
default-expand-all
18-
></tiny-tree>
11+
<tiny-tree ref="treeRef" node-key="id" :data="data" current-node-key="1" default-expand-all></tiny-tree>
1912
</div>
2013
</template>
2114

examples/sites/demos/pc/app/tree/other-composition-api.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</tiny-tree>
66
<br />
77
<div class="tips">提示:非手风琴模式,自定义自动勾选的内容</div>
8-
<tiny-tree :data="data" accordion show-checkbox check-strictly show-check-easily :icon-trigger-click-node="false">
8+
<tiny-tree :data="data" show-checkbox check-strictly show-check-easily :icon-trigger-click-node="false">
99
<template #switchText>
1010
<span>自定义开关的内容</span>
1111
</template>

examples/sites/demos/pc/app/tree/other.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</tiny-tree>
66
<br />
77
<div class="tips">提示:非手风琴模式,自定义自动勾选的内容</div>
8-
<tiny-tree :data="data" accordion show-checkbox check-strictly show-check-easily :icon-trigger-click-node="false">
8+
<tiny-tree :data="data" show-checkbox check-strictly show-check-easily :icon-trigger-click-node="false">
99
<template #switchText>
1010
<span>自定义开关的内容</span>
1111
</template>

examples/sites/demos/pc/app/tree/slot-composition-api.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</template>
1414
<!-- 默认插槽 -->
1515
<template #default="node">
16-
<div style="color: red">{{ node.data.label }}</div>
16+
<div style="margin: 0 8px">{{ node.data.label }}</div>
1717
</template>
1818
<!-- 后缀插槽 -->
1919
<template #suffix="{ node }">
@@ -22,7 +22,7 @@
2222
<!-- 操作插槽 -->
2323
<template #operation="{ node }">
2424
<div style="width: 80px; text-align: right">
25-
<tiny-link :underline="true" title="一些功能操作" type="primary"> 新增 </tiny-link> &nbsp;
25+
<tiny-link :underline="true" title="一些功能操作"> 新增 </tiny-link> &nbsp;
2626
<tiny-link :underline="true" title="一些功能操作" type="danger"> 删除 </tiny-link>
2727
</div>
2828
</template>
@@ -78,7 +78,7 @@ function clearData() {
7878
function renderContent(h, { node, data }) {
7979
return (
8080
<span>
81-
{node.label} <TinyIconPlusSquare fill="red" />
81+
{node.label} <TinyIconPlusSquare fill="#666" />
8282
</span>
8383
)
8484
}

examples/sites/demos/pc/app/tree/slot.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</template>
1414
<!-- 默认插槽 -->
1515
<template #default="node">
16-
<div style="color: red">{{ node.data.label }}</div>
16+
<div style="margin: 0 8px">{{ node.data.label }}</div>
1717
</template>
1818
<!-- 后缀插槽 -->
1919
<template #suffix="{ node }">
@@ -22,7 +22,7 @@
2222
<!-- 操作插槽 -->
2323
<template #operation="{ node }">
2424
<div style="width: 80px; text-align: right">
25-
<tiny-link :underline="true" title="一些功能操作" type="primary"> 新增 </tiny-link> &nbsp;
25+
<tiny-link :underline="true" title="一些功能操作"> 新增 </tiny-link> &nbsp;
2626
<tiny-link :underline="true" title="一些功能操作" type="danger"> 删除 </tiny-link>
2727
</div>
2828
</template>
@@ -87,7 +87,7 @@ export default {
8787
renderContent(h, { node, data }) {
8888
return (
8989
<span>
90-
{node.label} <TinyIconPlusSquare fill="red" />
90+
{node.label} <TinyIconPlusSquare fill="#666" />
9191
</span>
9292
)
9393
}

packages/theme/src/button/vars.less

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,35 +150,35 @@
150150
// primary 主题时按钮朴素背景色
151151
--tv-Button-bg-color-plain-primary: var(--tv-color-act-primary-bg-white);
152152
// primary 主题时按钮朴素边框色
153-
--tv-Button-border-color-plain-primary: var(--tv-color-act-primary-border-active);
153+
--tv-Button-border-color-plain-primary: var(--tv-color-act-primary-border-light);
154154

155155
// success 主题时按钮朴素文本色
156156
--tv-Button-text-color-plain-success: var(--tv-color-act-success-text);
157157
// success 主题时按钮朴素背景色
158158
--tv-Button-bg-color-plain-success: var(--tv-color-act-success-bg-light);
159159
// success 主题时按钮朴素边框色
160-
--tv-Button-border-color-plain-success: var(--tv-color-act-success-border-active-1);
160+
--tv-Button-border-color-plain-success: var(--tv-color-act-success-border-light);
161161

162162
// warning 主题时按钮朴素文本色
163163
--tv-Button-text-color-plain-warning: var(--tv-color-act-warning-text);
164164
// warning 主题时按钮朴素背景色
165165
--tv-Button-bg-color-plain-warning: var(--tv-color-act-warning-bg-light);
166166
// warning 主题时按钮朴素边框色
167-
--tv-Button-border-color-plain-warning: var(--tv-color-act-warning-border-active-1);
167+
--tv-Button-border-color-plain-warning: var(--tv-color-act-warning-border-light);
168168

169169
// danger 主题时按钮朴素文本色
170170
--tv-Button-text-color-plain-danger: var(--tv-color-act-danger-text);
171171
// danger 主题时按钮朴素背景色
172172
--tv-Button-bg-color-plain-danger: var(--tv-color-act-danger-bg-light);
173173
// danger 主题时按钮朴素边框色
174-
--tv-Button-border-color-plain-danger: var(--tv-color-act-danger-border-active-1);
174+
--tv-Button-border-color-plain-danger: var(--tv-color-act-danger-border-light);
175175

176176
// info 主题时按钮朴素文本色
177177
--tv-Button-text-color-plain-info: var(--tv-color-act-info-text);
178178
// info 主题时按钮朴素背景色
179179
--tv-Button-bg-color-plain-info: var(--tv-color-act-info-bg-light);
180180
// info 主题时按钮朴素边框色
181-
--tv-Button-border-color-plain-info: var(--tv-color-act-info-border-active-1);
181+
--tv-Button-border-color-plain-info: var(--tv-color-act-info-border-light);
182182

183183
// 幽灵态和plain是平级的关系. 如果同时存在,优先级不能保证稳定。
184184

packages/vue/src/tree/src/pc.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@
146146
</div>
147147
</div>
148148
<div class="tiny-tree__del-footer">
149-
<tiny-button @click="cancelDelete">{{ t('ui.base.cancel') }}</tiny-button>
150-
<tiny-button type="primary" @click="deleteAction">{{ t('ui.base.confirm') }}</tiny-button>
149+
<tiny-button @click="cancelDelete" size="mini">{{ t('ui.base.cancel') }}</tiny-button>
150+
<tiny-button type="primary" @click="deleteAction" size="mini">{{ t('ui.base.confirm') }}</tiny-button>
151151
</div>
152152
</tiny-popover>
153153
</div>

0 commit comments

Comments
 (0)