Skip to content

Commit

Permalink
Merge branch 'dev' into dev-update-cascader-x
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjunjian authored Oct 14, 2024
2 parents c7a5cd3 + dfa22ae commit 14e92ed
Show file tree
Hide file tree
Showing 1,256 changed files with 9,427 additions and 25,631 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "--",
"color": "#FFFFFF",
"strikethrough": false,
"underline": false,
"backgroundColor": "#5CB300",
"bold": false,
"italic": false
}
],
"vue.codeActions.enabled": false
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/apis/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export default {
type: '',
defaultValue: '',
desc: {
'zh-CN': '组件默认插槽,当 size 设置为 large 后有效',
'zh-CN': '组件默认插槽,当 size 设置为 large 时有效,显示在 <code>description</code>下方 ',
'en-US': 'The default slot for the component is valid when size is set to large'
},
mode: ['pc', 'mobile', 'mobile-first'],
Expand All @@ -261,7 +261,7 @@ export default {
type: '',
defaultValue: '',
desc: {
'zh-CN': '提示内容',
'zh-CN': '提示内容插槽',
'en-US': 'Prompt Content'
},
mode: ['pc', 'mobile-first'],
Expand Down
24 changes: 0 additions & 24 deletions examples/sites/demos/apis/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ export default {
name: 'checkbox',
type: 'component',
props: [
{
name: 'border',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否显示边框',
'en-US': 'Display border'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'border',
mfDemo: ''
},
{
name: 'checked',
type: 'boolean',
Expand Down Expand Up @@ -140,18 +128,6 @@ export default {
mode: ['pc'],
pcDemo: 'shape'
},
{
name: 'size',
type: "'medium' | 'small' | 'mini'",
defaultValue: '',
desc: {
'zh-CN': 'checkbox 的尺寸,仅在 border 为true时有效',
'en-US': 'Checkbox size. This parameter is valid only when border is set to true'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'size',
mfDemo: ''
},
{
name: 'text',
type: 'string',
Expand Down
15 changes: 15 additions & 0 deletions examples/sites/demos/apis/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,21 @@ export default {
pcDemo: 'width',
mfDemo: ''
},
{
name: 'height',
type: 'string',
defaultValue: "'500px'",
desc: {
'zh-CN': '设置抽屉的高度',
'en-US': 'Set the height of the drawer'
},
mode: ['pc'],
pcDemo: 'placement',
mfDemo: '',
meta: {
stable: '3.19.0'
}
},
{
name: 'z-index',
type: 'number',
Expand Down
15 changes: 7 additions & 8 deletions examples/sites/demos/apis/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ export default {
{
name: 'hide-required-asterisk',
type: 'boolean',
defaultValue: 'false',
defaultValue: 'true',
desc: {
'zh-CN': '是否隐藏必填字段的标签旁边的红色星号,SMB 主题下默认值为true',
'en-US':
'Whether to hide the red asterisk next to the label of mandatory fields, The default value for SMB theme is true'
'zh-CN': '是否隐藏必填字段的标签旁边的红色星号',
'en-US': 'Whether to hide the red asterisk next to the label of mandatory fields'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'smb-required',
Expand Down Expand Up @@ -120,7 +119,7 @@ export default {
{
name: 'label-width',
type: 'string',
defaultValue: "'80px'",
defaultValue: "'84px'",
desc: {
'zh-CN': '表单中标签占位宽度',
'en-US': 'Label placeholder width in the form'
Expand All @@ -132,11 +131,11 @@ export default {
},
{
name: 'message-type',
type: "'inline' | 'block'",
defaultValue: '',
type: "'inline' | 'block' | 'absolute'",
defaultValue: "'block'",
desc: {
'zh-CN':
'当 validate-type 设置为 text 时,配置文本类型错误类型,可配置行内或者块级,不设置则为 absolute 定位',
'当 validate-type 设置为 text 时,配置文本类型错误类型,可配置行内或者块级,其他值都为 absolute 定位',
'en-US':
'Configure the text type error type, which can be configured at the inline or block level when validate-type is set to text. The default is absolute positioning'
},
Expand Down
56 changes: 56 additions & 0 deletions examples/sites/demos/apis/link-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,62 @@ export default {
mode: ['pc'],
pcDemo: 'custom-icon'
},
{
name: 'expand-icon',
type: 'Component',
defaultValue: '',
meta: {
stable: '3.19.0'
},
desc: {
'zh-CN': '指示展开的图标',
'en-US': 'Indicates the expanded icon'
},
mode: ['pc'],
pcDemo: 'data-resource'
},
{
name: 'expand-icon-color',
type: 'string',
defaultValue: '',
meta: {
stable: '3.19.0'
},
desc: {
'zh-CN': '指示展开的图标色',
'en-US': 'Indicates the expanded icon color'
},
mode: ['pc'],
pcDemo: 'data-resource'
},
{
name: 'shrink-icon',
type: 'Component',
defaultValue: '',
meta: {
stable: '3.19.0'
},
desc: {
'zh-CN': '指示收缩的图标',
'en-US': 'Icon indicating shrink'
},
mode: ['pc'],
pcDemo: 'data-resource'
},
{
name: 'shrink-icon-color',
type: 'string',
defaultValue: '',
meta: {
stable: '3.19.0'
},
desc: {
'zh-CN': '指示收缩的图标色',
'en-US': 'Icon indicating shrink color'
},
mode: ['pc'],
pcDemo: 'data-resource'
},
{
name: 'keep-selected-nodes',
type: 'boolean',
Expand Down
24 changes: 0 additions & 24 deletions examples/sites/demos/apis/radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ export default {
name: 'radio',
type: 'component',
props: [
{
name: 'border',
type: 'boolean',
defaultValue: 'false',
desc: {
'zh-CN': '是否显示边框',
'en-US': 'Display Border'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'with-border',
mfDemo: ''
},
{
name: 'disabled',
type: 'boolean',
Expand Down Expand Up @@ -79,18 +67,6 @@ export default {
mobileDemo: 'base',
mfDemo: ''
},
{
name: 'size',
type: "'medium' | small' | 'mini'",
defaultValue: '',
desc: {
'zh-CN': 'radio 的尺寸,仅在 border 为真时有效',
'en-US': 'radio size. This parameter is valid only when border is set to true'
},
mode: ['pc', 'mobile-first'],
pcDemo: 'radio-size',
mfDemo: ''
},
{
name: 'tabindex',
type: 'String',
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/mobile-first/app/tabs/show-echarts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
</template>

<script>
import { Tabs, TabItem, ChartBar, ChartGauge } from '@opentiny/vue'
import { Tabs, TabItem, HuichartsBar, HuichartsGauge } from '@opentiny/vue'
export default {
components: {
TinyTabs: Tabs,
TinyTabItem: TabItem,
TinyBar: ChartBar,
TinyGauge: ChartGauge
TinyBar: HuichartsBar,
TinyGauge: HuichartsGauge
},
data() {
return {
Expand Down
5 changes: 4 additions & 1 deletion examples/sites/demos/pc/app/action-menu/basic-usage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ test('基本用法', async ({ page }) => {
// 更多按钮
await expect(moreItem).toHaveText(//)
// 图标显示
await expect(moreItem.locator('svg > path').nth(0)).toHaveAttribute('d', 'M2 6h20L12 19z')
await expect(moreItem.locator('svg > path').nth(0)).toHaveAttribute(
'd',
'M8 11.43c-.15 0-.31-.06-.42-.18L1.92 5.6c-.23-.23-.23-.61 0-.85s.61-.23.85 0L8 9.98l5.23-5.23a.61.61 0 0 1 .85 0c.23.23.23.61 0 .85l-5.66 5.66c-.11.11-.27.17-.42.17z'
)
// 分割线
await expect(actionMenu.locator('.tiny-action-menu__item-line')).toHaveCount(2)
// 图标旋转
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<template>
<tiny-action-menu :options="options"> </tiny-action-menu>
<div>
<tiny-action-menu :options="options"> </tiny-action-menu>
<br />
<tiny-action-menu :options="options1"> </tiny-action-menu>
<br />
<tiny-action-menu :options="options1" mode="card"> </tiny-action-menu>
</div>
</template>

<script setup>
import { ref } from 'vue'
import { ActionMenu as TinyActionMenu } from '@opentiny/vue'
import { iconWebPlus, iconSuccessful, iconCloseSquare } from '@opentiny/vue-icon'
const options = ref([
{
Expand All @@ -28,4 +35,27 @@ const options = ref([
]
}
])
const options1 = ref([
{
label: '远程登陆',
icon: iconWebPlus()
},
{
label: '开机',
icon: iconSuccessful(),
disabled: true
},
{
label: '关机',
icon: iconCloseSquare()
},
{
label: '重启'
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
}
])
</script>
5 changes: 4 additions & 1 deletion examples/sites/demos/pc/app/action-menu/disabled.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ test('禁用', async ({ page }) => {

const wrap = page.locator('#disabled')
const actionMenu = wrap.locator('.tiny-action-menu')
const disabledItem = actionMenu.locator('.tiny-dropdown-item.tiny-dropdown-menu__item').filter({ hasText: '开机' })
const disabledItem = actionMenu
.nth(0)
.locator('.tiny-dropdown-item.tiny-dropdown-menu__item')
.filter({ hasText: '开机' })

await expect(disabledItem).toHaveClass(/is-disabled/)
await expect(disabledItem).toHaveCSS('cursor', 'not-allowed')
Expand Down
31 changes: 30 additions & 1 deletion examples/sites/demos/pc/app/action-menu/disabled.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<template>
<tiny-action-menu :options="options"> </tiny-action-menu>
<div>
<tiny-action-menu :options="options"> </tiny-action-menu>
<br />
<tiny-action-menu :options="options1"> </tiny-action-menu>
<br />
<tiny-action-menu :options="options1" mode="card"> </tiny-action-menu>
</div>
</template>

<script>
import { ActionMenu } from '@opentiny/vue'
import { iconWebPlus, iconSuccessful, iconCloseSquare } from '@opentiny/vue-icon'
export default {
components: {
Expand Down Expand Up @@ -33,6 +40,28 @@ export default {
{ label: '切换VPC', divided: true }
]
}
],
options1: [
{
label: '远程登陆',
icon: iconWebPlus()
},
{
label: '开机',
icon: iconSuccessful(),
disabled: true
},
{
label: '关机',
icon: iconCloseSquare()
},
{
label: '重启'
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
}
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const options = ref([
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换VPC' }]
}
])
Expand Down
5 changes: 2 additions & 3 deletions examples/sites/demos/pc/app/action-menu/icon.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ test('只显示图标', async ({ page }) => {
await page.waitForTimeout(1500)
await expect(actionMenuItem.nth(0).locator('.tiny-svg')).toBeVisible()
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg')).toBeVisible()
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg')).toHaveCSS('width', '20px')
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg')).toHaveCSS('height', '20px')
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg')).toHaveCSS('margin', '2px')
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg')).toHaveCSS('width', '24px')
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg')).toHaveCSS('height', '24px')
await expect(actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-dropdown__title')).toBeHidden()

await actionMenuItem.nth(3).locator('.tiny-dropdown__trigger .tiny-svg').hover()
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/action-menu/icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
},
{
label: '网络设置',
children: [{ label: '更改安全组' }, { label: '切换VPC', divided: true }]
children: [{ label: '更改安全组' }, { label: '切换VPC' }]
}
],
options1: [
Expand Down
Loading

0 comments on commit 14e92ed

Please sign in to comment.