Skip to content

Commit 874e4dd

Browse files
committed
Merge branch 'dev' of github.com:opentiny/tiny-vue into wyp/tree-menu-xdsign-0910
2 parents 58824be + 37f275f commit 874e4dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+367
-847
lines changed

examples/docs/newsrc/pc.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,14 @@
9696
</div>
9797
</div>
9898
</tiny-floatbar>
99-
<!-- 切换主题 -->
100-
<tiny-dropdown class="!fixed bottom20 right140" :show-icon="false" @item-click="changeTheme" :disabled="isSaasMode">
99+
<!-- 切换主题 暂时先屏蔽,等后续其他主题验收完成再放出此功能 -->
100+
<tiny-dropdown
101+
v-if="false"
102+
class="!fixed bottom20 right140"
103+
:show-icon="false"
104+
@item-click="changeTheme"
105+
:disabled="isSaasMode"
106+
>
101107
<span title="切换主题">
102108
<SvgTheme></SvgTheme>
103109
</span>
@@ -152,7 +158,6 @@ import {
152158
import { iconStarActive, iconSelect } from '@opentiny/vue-icon'
153159
import Loading from '@opentiny/vue-loading'
154160
import designSmbConfig from '@opentiny/vue-design-smb'
155-
import designAuroraConfig from '@opentiny/vue-design-aurora'
156161
import designSaasConfig from '@opentiny/vue-design-saas'
157162
import { menuData, demoStr, demoVue, mds, demos } from './resourcePc.js'
158163
import { useTheme, useModeCtx } from './uses'
@@ -194,7 +199,7 @@ export default {
194199
currMd: hooks.computed(() => mds[`${modeState.pathName}.cn.md`]),
195200
demoLoading: false
196201
})
197-
// hui chart 新增图表类型,新增图表的 api 和原有图表的api 区分开。
202+
// hui chart 新增图表类型,新增图表的 api 和原有图表的api 区分开。
198203
const huiNewChart = ['chart-process']
199204
const fn = {
200205
// 菜单搜索:忽略大小写
@@ -258,9 +263,10 @@ export default {
258263
modeFn.pushToUrl()
259264
}
260265
266+
// 默认全部使用designSmbConfig,后续验收完毕再调整
261267
const designConfigMap = {
262268
'tiny-smb-theme': designSmbConfig,
263-
'tiny-aurora-theme': designAuroraConfig
269+
'tiny-aurora-theme': designSmbConfig
264270
}
265271
266272
const lastThemeKey = localStorage.getItem('tinyThemeToolkey')

examples/docs/newsrc/uses/useTheme.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import TinyThemeTool from '@opentiny/vue-theme/theme-tool'
2-
import { tinyAuroraTheme, tinySmbTheme, tinyInfinityTheme } from '@opentiny/vue-theme/theme'
32
import { hooks } from '@opentiny/vue-common'
43
import { Notify } from '@opentiny/vue'
54

@@ -21,9 +20,9 @@ export function useTheme({ readCacheImmediate = true } = {}) {
2120
const lastThemeKey = localStorage.getItem('tinyThemeToolkey')
2221

2322
const THEME_MAP = {
24-
'tiny-aurora-theme': tinyAuroraTheme,
25-
'tiny-smb-theme': tinySmbTheme,
26-
'tiny-infinity-theme': tinyInfinityTheme
23+
'tiny-aurora-theme': null,
24+
'tiny-smb-theme': null,
25+
'tiny-infinity-theme': null
2726
}
2827

2928
const changeTheme = ({ vm }) => {

examples/docs/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
"type": "module",
44
"version": "1.0.8",
55
"description": "",
6-
"keywords": [],
76
"author": "",
87
"license": "ISC",
8+
"keywords": [],
9+
"files": [
10+
"resources"
11+
],
912
"dependencies": {
1013
"@opentiny/vue": "workspace:~",
1114
"@opentiny/vue-common": "workspace:~",
15+
"@opentiny/vue-design-aurora": "workspace:~",
16+
"@opentiny/vue-design-saas": "workspace:~",
17+
"@opentiny/vue-design-smb": "workspace:~",
1218
"@opentiny/vue-icon": "workspace:~",
1319
"@opentiny/vue-theme-mobile": "workspace:~",
1420
"@opentiny/vue-theme-saas": "workspace:~",
15-
"@opentiny/vue-design-aurora": "workspace:~",
16-
"@opentiny/vue-design-smb": "workspace:~",
17-
"@opentiny/vue-design-saas": "workspace:~",
1821
"sortablejs": "1.15.0"
1922
},
2023
"devDependencies": {
2124
"@playwright/test": "~1.42.0"
22-
},
23-
"files": [
24-
"resources"
25-
]
26-
}
25+
}
26+
}

examples/sites/demos/apis/steps.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,21 @@ export default {
221221
pcDemo: 'slot-item',
222222
mfDemo: ''
223223
},
224+
{
225+
name: 'itemFooter',
226+
type: '',
227+
defaultValue: '',
228+
desc: {
229+
'zh-CN': '步骤条数据项底部插槽,用于条形步骤条',
230+
'en-US': 'Step bar data item bottom slot, used for bar steps'
231+
},
232+
meta: {
233+
stable: '3.19.0'
234+
},
235+
mode: ['pc'],
236+
pcDemo: 'slot-item-footer',
237+
mfDemo: ''
238+
},
224239
{
225240
name: 'prefix',
226241
type: '',

examples/sites/demos/pc/app/badge/basic-usage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ test('测试基本用法', async ({ page }) => {
1010

1111
await expect(textWrapper).toContainText('我的待办')
1212
await expect(badge).toContainText('2')
13-
await expect(badge).toHaveCSS('background-color', 'rgb(246, 111, 106)')
13+
await expect(badge).toHaveCSS('background-color', 'rgb(242, 48, 48)')
1414
await expect(badge).toHaveCSS('color', 'rgb(255, 255, 255)')
1515
})

examples/sites/demos/pc/app/badge/offset-composition-api.vue

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,40 @@
22
<div>
33
<p>使用字符串:</p>
44
<br />
5-
<tiny-badge :value="2" :offset="['0', '-20%']">我的待办</tiny-badge>
5+
<tiny-badge :value="2" :offset="['0', '-50%']">我的待办</tiny-badge>
66
<br /><br />
77
<p>使用数字:</p>
88
<br />
9-
<tiny-badge :value="2" :offset="[0, -6]">我的待办</tiny-badge>
9+
<tiny-badge :value="2" :offset="[0, -8]">我的待办</tiny-badge>
10+
<br /><br />
11+
<p>区域使用:</p>
12+
<br />
13+
<div class="demo-box">
14+
<tiny-badge :value="9" :max="9" :offset="['-50%', '-212%']"><div class="demo-badge-offset"></div></tiny-badge>
15+
<tiny-badge :value="99" :max="99" :offset="['-50%', '-212%']"><div class="demo-badge-offset"></div></tiny-badge>
16+
<tiny-badge :value="100" :max="99" :offset="['-50%', '-212%']"><div class="demo-badge-offset"></div></tiny-badge>
17+
<tiny-badge :value="1000" :max="999" :offset="['-50%', '-212%']"
18+
><div class="demo-badge-offset"></div
19+
></tiny-badge>
20+
</div>
1021
</div>
1122
</template>
1223

1324
<script setup>
1425
import { Badge as TinyBadge } from '@opentiny/vue'
1526
</script>
27+
28+
<style scoped>
29+
.demo-badge-offset {
30+
display: inline-block;
31+
width: 60px;
32+
height: 40px;
33+
background-color: gainsboro;
34+
}
35+
.demo-box {
36+
width: 400px;
37+
height: 60px;
38+
display: flex;
39+
justify-content: space-around;
40+
}
41+
</style>

examples/sites/demos/pc/app/badge/offset.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ test('标记的位置', async ({ page }) => {
55
await page.goto('badge#offset')
66

77
const demo = page.locator('#offset')
8-
const badge = demo.locator('.tiny-badge')
8+
const badge = demo.locator('div').filter({ hasText: /^2$/ }).first()
9+
const badge2 = demo.locator('div').filter({ hasText: /^2$/ }).nth(1)
910

10-
await expect(badge.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -4)')
11-
await expect(badge.nth(1)).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -6)')
11+
await expect(badge).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -8)')
12+
await expect(badge2).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -8)')
1213
})

examples/sites/demos/pc/app/badge/offset.vue

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22
<div>
33
<p>使用字符串:</p>
44
<br />
5-
<tiny-badge :value="2" :offset="['0', '-20%']">我的待办</tiny-badge>
5+
<tiny-badge :value="2" :offset="['0', '-50%']">我的待办</tiny-badge>
66
<br /><br />
77
<p>使用数字:</p>
88
<br />
9-
<tiny-badge :value="2" :offset="[0, -6]">我的待办</tiny-badge>
9+
<tiny-badge :value="2" :offset="[0, -8]">我的待办</tiny-badge>
10+
<br /><br />
11+
<p>区域使用:</p>
12+
<br />
13+
<div class="demo-box">
14+
<tiny-badge :value="9" :max="9" :offset="['-50%', '-212%']"><div class="demo-badge-offset"></div></tiny-badge>
15+
<tiny-badge :value="99" :max="99" :offset="['-50%', '-212%']"><div class="demo-badge-offset"></div></tiny-badge>
16+
<tiny-badge :value="100" :max="99" :offset="['-50%', '-212%']"><div class="demo-badge-offset"></div></tiny-badge>
17+
<tiny-badge :value="1000" :max="999" :offset="['-50%', '-212%']"
18+
><div class="demo-badge-offset"></div
19+
></tiny-badge>
20+
</div>
1021
</div>
1122
</template>
1223

@@ -19,3 +30,18 @@ export default {
1930
}
2031
}
2132
</script>
33+
34+
<style scoped>
35+
.demo-badge-offset {
36+
display: inline-block;
37+
width: 60px;
38+
height: 40px;
39+
background-color: gainsboro;
40+
}
41+
.demo-box {
42+
width: 400px;
43+
height: 60px;
44+
display: flex;
45+
justify-content: space-around;
46+
}
47+
</style>

examples/sites/demos/pc/app/badge/type.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ test('主題样式', async ({ page }) => {
1515
await expect(dangerBadge).toHaveClass(/tiny-badge--danger/)
1616
await expect(dangerBadge).toHaveCSS('background-color', 'rgb(246, 111, 106)')
1717
await expect(primaryBadge).toHaveClass(/tiny-badge--primary/)
18-
await expect(primaryBadge).toHaveCSS('background-color', 'rgb(94, 124, 224)')
18+
await expect(primaryBadge).toHaveCSS('background-color', 'rgb(25, 25, 25)')
1919
await expect(successBadge).toHaveClass(/tiny-badge--success/)
20-
await expect(successBadge).toHaveCSS('background-color', 'rgb(80, 212, 171)')
20+
await expect(successBadge).toHaveCSS('background-color', 'rgb(92, 179, 0)')
2121
await expect(warningBadge).toHaveClass(/tiny-badge--warning/)
22-
await expect(warningBadge).toHaveCSS('background-color', 'rgb(250, 152, 65)')
22+
await expect(warningBadge).toHaveCSS('background-color', 'rgb(255, 136, 0)')
2323
await expect(infoBadge).toHaveClass(/tiny-badge--info/)
24-
await expect(infoBadge).toHaveCSS('background-color', 'rgb(37, 43, 58)')
24+
await expect(infoBadge).toHaveCSS('background-color', 'rgb(25, 25, 25)')
2525
})

examples/sites/demos/pc/app/button/dynamic-disabled.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ test('测试禁用状态是否生效', async ({ page }) => {
1010

1111
await switchBtn.click()
1212
await expect(demo.locator('.tiny-button').first()).toBeDisabled()
13-
await expect(demo.locator('.tiny-button').first()).toHaveCSS('background-color', 'rgb(245, 245, 246)')
14-
await expect(demo.locator('.tiny-button').first()).toHaveCSS('color', 'rgb(173, 176, 184)')
15-
await expect(demo.locator('.tiny-button').first()).toHaveCSS('border-bottom-color', 'rgb(223, 225, 230)')
13+
await expect(demo.locator('.tiny-button').first()).toHaveCSS('background-color', 'rgb(240, 240, 240)')
14+
await expect(demo.locator('.tiny-button').first()).toHaveCSS('color', 'rgb(194, 194, 194)')
15+
await expect(demo.locator('.tiny-button').first()).toHaveCSS('border-bottom-color', 'rgb(240, 240, 240)')
1616
await expect(demo.getByRole('button', { name: '次要按钮' }).first()).toBeDisabled()
1717
await expect(demo.getByRole('button', { name: '主要按钮' }).first()).toBeDisabled()
1818
await expect(demo.getByRole('button', { name: '成功按钮' }).first()).toBeDisabled()
19-
await expect(ghostBtn).toHaveCSS('color', 'rgb(173, 176, 184)')
19+
await expect(ghostBtn).toHaveCSS('color', 'rgb(194, 194, 194)')
2020
await expect(ghostBtn).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
21-
await expect(ghostBtn).toHaveCSS('border-bottom-color', 'rgb(173, 176, 184)')
21+
await expect(ghostBtn).toHaveCSS('border-bottom-color', 'rgb(219, 219, 219)')
2222

2323
await switchBtn.click()
2424
await expect(demo.locator('.tiny-button').first()).not.toBeDisabled()

0 commit comments

Comments
 (0)