Skip to content

Commit 6496e5d

Browse files
authored
feat: adpting to OpenTinyDesign Themes (#2422)
1 parent e7aa4a7 commit 6496e5d

File tree

295 files changed

+4365
-1069
lines changed

Some content is hidden

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

295 files changed

+4365
-1069
lines changed

examples/sites/demos/apis/dialog-select.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,21 @@ export default {
377377
}
378378
],
379379
methods: [
380+
{
381+
name: 'getSelection',
382+
type: '() => IData[]',
383+
typeAnchorName: 'IData',
384+
meta: {
385+
stable: '3.19.0'
386+
},
387+
defaultValue: '',
388+
desc: {
389+
'zh-CN': '获取多选选中数据',
390+
'en-US': 'Get multi-select selected data'
391+
},
392+
mode: ['pc'],
393+
pcDemo: 'set-selection'
394+
},
380395
{
381396
name: 'queryGridData',
382397
type: '() => void',
@@ -387,6 +402,21 @@ export default {
387402
},
388403
mode: ['pc'],
389404
pcDemo: 'nest-grid-multi'
405+
},
406+
{
407+
name: 'setSelection',
408+
type: '(data: IData | IData[], checked: boolean) => void',
409+
typeAnchorName: 'IData',
410+
meta: {
411+
stable: '3.19.0'
412+
},
413+
defaultValue: '',
414+
desc: {
415+
'zh-CN': '设置数据的多选选中状态,需要在弹窗初始化后调用,否则调用无效',
416+
'en-US': 'Set the multi-select selected state of data'
417+
},
418+
mode: ['pc'],
419+
pcDemo: 'set-selection'
390420
}
391421
],
392422
slots: [
@@ -674,6 +704,16 @@ interface IResizeEvent {
674704
fullscreen: boolean
675705
// 弹窗的元素
676706
dialog: HTMLElement
707+
}
708+
`
709+
},
710+
{
711+
name: 'IData',
712+
type: 'interface',
713+
code: `
714+
interface IData {
715+
// 表格或者tree行数据
716+
[prop: string]: any
677717
}
678718
`
679719
}

examples/sites/demos/apis/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ type IFormTrigger = 'change' | 'blur'
631631
632632
interface IFormRules {
633633
required?: boolean // 是否必填
634-
message?: number // 校验错误的提示
634+
message?: string // 校验错误的提示
635635
// 内置的类型校验
636636
type?: 'date' | 'dateTime' | 'float' | 'array' | 'string' | 'number' | 'url' | 'time' | 'email' | 'object' | 'boolean' | 'enum'
637637
// 校验触发时机, 默认为 ['change', 'blur'] 两种场景都触发,如果仅在主动调用校验方式时触发,可设置为空数组 []。

examples/sites/demos/apis/grid.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4415,6 +4415,8 @@ interface IEditConfig {
44154415
showStatus?: boolean
44164416
// 自定义编辑规则,返回true可以编辑返回false则禁止编辑
44174417
activeMethod?: ({row: IRow, column: IColumnConfig})=> boolean
4418+
// (3.19新增)当mode为'row'时,行编辑激活状态下默认会忽略activeMethod,配置为true使其生效
4419+
activeStrictly?: boolean
44184420
}
44194421
`
44204422
},
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
mode: ['pc'],
3+
apis: []
4+
}

examples/sites/demos/apis/image.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,21 @@ export default {
222222
mode: ['pc', 'mobile-first'],
223223
pcDemo: 'count-slot',
224224
mfDemo: ''
225+
},
226+
{
227+
name: 'appendToBody',
228+
type: 'boolean',
229+
defaultValue: 'true',
230+
meta: {
231+
stable: '3.19.0'
232+
},
233+
desc: {
234+
'zh-CN': '预览弹框是否显示在当前节点下面',
235+
'en-US': 'Indicates whether the preview dialog box is displayed under the current node.'
236+
},
237+
mode: ['pc', 'mobile-first'],
238+
pcDemo: 'preview',
239+
mfDemo: ''
225240
}
226241
]
227242
}

examples/sites/demos/apis/tree-menu.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,21 @@ export default {
422422
},
423423
mode: ['pc'],
424424
pcDemo: 'show-filter'
425+
},
426+
{
427+
name: 'width-adapt',
428+
type: 'boolean',
429+
defaultValue: 'false',
430+
desc: {
431+
'zh-CN': '通过 <code> widthAdapt </code> 属性,是否让组件宽度自适应父容器。',
432+
'en-US':
433+
'The <code>widthAdapt </code> attribute specifies whether to enable the component width to adapt to the parent container.'
434+
},
435+
meta: {
436+
stable: '3.19.0'
437+
},
438+
mode: ['pc'],
439+
pcDemo: 'show-filter'
425440
}
426441
],
427442
events: [

examples/sites/demos/pc/app/action-menu/icon-composition-api.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
>
1212
</tiny-action-menu>
1313
<br />
14-
<tiny-action-menu :options="options" :suffix-icon="tinyIconEllipsis" more-text="" spacing="8px" :max-show-num="3">
15-
</tiny-action-menu>
16-
<br />
1714
<p>场景2:只显示文本</p>
1815
<tiny-action-menu :options="options1" :show-icon="false" :max-show-num="3"> </tiny-action-menu>
1916
</div>
@@ -22,20 +19,20 @@
2219
<script setup>
2320
import { ref } from 'vue'
2421
import { ActionMenu as TinyActionMenu } from '@opentiny/vue'
25-
import { IconPreChecked, iconSuccessful, iconCloseSquare, iconEllipsis } from '@opentiny/vue-icon'
22+
import { iconWebPlus, iconSuccessful, iconShutdown, iconEllipsis } from '@opentiny/vue-icon'
2623
2724
const options = ref([
2825
{
2926
label: '远程登陆',
30-
icon: IconPreChecked()
27+
icon: iconWebPlus()
3128
},
3229
{
3330
label: '开机',
3431
icon: iconSuccessful()
3532
},
3633
{
3734
label: '关机',
38-
icon: iconCloseSquare()
35+
icon: iconShutdown()
3936
},
4037
{
4138
label: '重启'

examples/sites/demos/pc/app/action-menu/icon.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<script>
1919
import { ActionMenu } from '@opentiny/vue'
20-
import { IconPreChecked, iconSuccessful, iconCloseSquare, iconEllipsis } from '@opentiny/vue-icon'
20+
import { iconWebPlus, iconSuccessful, iconShutdown, iconEllipsis } from '@opentiny/vue-icon'
2121
2222
export default {
2323
components: {
@@ -28,15 +28,15 @@ export default {
2828
options: [
2929
{
3030
label: '远程登陆',
31-
icon: IconPreChecked()
31+
icon: iconWebPlus()
3232
},
3333
{
3434
label: '开机',
3535
icon: iconSuccessful()
3636
},
3737
{
3838
label: '关机',
39-
icon: iconCloseSquare()
39+
icon: iconShutdown()
4040
},
4141
{
4242
label: '重启'

examples/sites/demos/pc/app/autocomplete/custom-icon-composition-api.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<tiny-autocomplete
44
v-model="value"
55
:prefix-icon="IconEdit"
6-
:suffix-icon="IconAssociation"
6+
:suffix-icon="IconApp"
77
placeholder="请输入内容"
88
:fetch-suggestions="querySearch"
99
></tiny-autocomplete>
@@ -13,12 +13,12 @@
1313
<script setup>
1414
import { ref, onMounted } from 'vue'
1515
import { Autocomplete as TinyAutocomplete } from '@opentiny/vue'
16-
import { iconEdit, iconAssociation } from '@opentiny/vue-icon'
16+
import { iconEdit, iconApp } from '@opentiny/vue-icon'
1717
1818
const restaurants = ref([])
1919
const value = ref('')
2020
const IconEdit = iconEdit()
21-
const IconAssociation = iconAssociation()
21+
const IconApp = iconApp()
2222
2323
onMounted(() => {
2424
restaurants.value = loadAll()

examples/sites/demos/pc/app/autocomplete/custom-icon.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<tiny-autocomplete
44
v-model="value"
55
:prefix-icon="IconEdit"
6-
:suffix-icon="IconAssociation"
6+
:suffix-icon="IconApp"
77
placeholder="请输入内容"
88
:fetch-suggestions="querySearch"
99
></tiny-autocomplete>
@@ -12,7 +12,7 @@
1212

1313
<script>
1414
import { Autocomplete } from '@opentiny/vue'
15-
import { IconEdit, IconAssociation } from '@opentiny/vue-icon'
15+
import { iconEdit, iconApp } from '@opentiny/vue-icon'
1616
1717
export default {
1818
components: {
@@ -22,8 +22,8 @@ export default {
2222
return {
2323
restaurants: [],
2424
value: '',
25-
IconEdit: IconEdit(),
26-
IconAssociation: IconAssociation()
25+
IconEdit: iconEdit(),
26+
IconApp: iconApp()
2727
}
2828
},
2929
methods: {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
</tiny-row>
2121
<tiny-row>
2222
<tiny-button :icon="IconSearch" circle></tiny-button>
23-
<tiny-button type="primary" :icon="IconEdit" circle></tiny-button>
23+
<tiny-button type="primary" :icon="IconEditor" circle></tiny-button>
2424
<tiny-button type="success" :icon="IconYes" circle></tiny-button>
2525
<tiny-button type="info" :icon="IconMail" circle></tiny-button>
2626
<tiny-button type="warning" :icon="IconStarO" circle></tiny-button>
27-
<tiny-button type="danger" :icon="IconDel" circle></tiny-button>
27+
<tiny-button type="danger" :icon="IconDeleteL" circle></tiny-button>
2828
</tiny-row>
2929
</tiny-layout>
3030
</template>
3131

3232
<script setup>
3333
import { TinyButton, TinyLayout, TinyRow } from '@opentiny/vue'
34-
import { iconDel, iconYes, iconEdit, iconMail, iconStarO, iconSearch } from '@opentiny/vue-icon'
34+
import { iconDeleteL, iconYes, iconEditor, iconMail, iconStarO, iconSearch } from '@opentiny/vue-icon'
3535
36-
const IconDel = iconDel()
36+
const IconDeleteL = iconDeleteL()
3737
const IconYes = iconYes()
38-
const IconEdit = iconEdit()
38+
const IconEditor = iconEditor()
3939
const IconMail = iconMail()
4040
const IconStarO = iconStarO()
4141
const IconSearch = iconSearch()

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
</tiny-row>
2121
<tiny-row>
2222
<tiny-button :icon="IconSearch" circle></tiny-button>
23-
<tiny-button type="primary" :icon="IconEdit" circle></tiny-button>
23+
<tiny-button type="primary" :icon="IconEditor" circle></tiny-button>
2424
<tiny-button type="success" :icon="IconYes" circle></tiny-button>
2525
<tiny-button type="info" :icon="IconMail" circle></tiny-button>
2626
<tiny-button type="warning" :icon="IconStarO" circle></tiny-button>
27-
<tiny-button type="danger" :icon="IconDel" circle></tiny-button>
27+
<tiny-button type="danger" :icon="IconDeleteL" circle></tiny-button>
2828
</tiny-row>
2929
</tiny-layout>
3030
</template>
3131

3232
<script>
3333
import { Button, Layout, Row } from '@opentiny/vue'
34-
import { IconDel, IconYes, IconEdit, IconMail, IconStarO, IconSearch } from '@opentiny/vue-icon'
34+
import { IconDeleteL, IconYes, IconEditor, IconMail, IconStarO, IconSearch } from '@opentiny/vue-icon'
3535
3636
export default {
3737
components: {
@@ -41,9 +41,9 @@ export default {
4141
},
4242
data() {
4343
return {
44-
IconDel: IconDel(),
44+
IconDeleteL: IconDeleteL(),
4545
IconYes: IconYes(),
46-
IconEdit: IconEdit(),
46+
IconEditor: IconEditor(),
4747
IconMail: IconMail(),
4848
IconStarO: IconStarO(),
4949
IconSearch: IconSearch()
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<tiny-button>
2+
<tiny-button class="demo-button">
33
<img :src="image" width="26" />
44
<span>图片按钮</span>
55
</tiny-button>
@@ -8,5 +8,18 @@
88
<script setup>
99
import { TinyButton } from '@opentiny/vue'
1010
11-
const image = `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/button-image.png`
11+
const image = `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/email.png`
1212
</script>
13+
14+
<style>
15+
.demo-button img {
16+
width: 16px;
17+
height: 16px;
18+
margin-right: 8px;
19+
border-radius: 2px;
20+
}
21+
.demo-button span {
22+
height: 16px;
23+
line-height: 16px;
24+
}
25+
</style>

examples/sites/demos/pc/app/button/image.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<tiny-button>
2+
<tiny-button class="demo-button">
33
<img :src="image" width="26" />
44
<span>图片按钮</span>
55
</tiny-button>
@@ -14,8 +14,21 @@ export default {
1414
},
1515
data() {
1616
return {
17-
image: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/button-image.png`
17+
image: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/email.png`
1818
}
1919
}
2020
}
2121
</script>
22+
23+
<style>
24+
.demo-button img {
25+
width: 16px;
26+
height: 16px;
27+
margin-right: 8px;
28+
border-radius: 2px;
29+
}
30+
.demo-button span {
31+
height: 16px;
32+
line-height: 16px;
33+
}
34+
</style>

examples/sites/demos/pc/app/card/card-size-composition-api.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@
2626

2727
<script setup>
2828
import { Card as TinyCard } from '@opentiny/vue'
29-
import { IconDel, IconWriting, IconAscending, IconShare } from '@opentiny/vue-icon'
29+
import { IconDeleteL, IconEditor, IconSortTriangle, IconFilletExternalLink } from '@opentiny/vue-icon'
3030
import { ref } from 'vue'
3131
3232
const options = ref([
3333
{
3434
text: '删除列表',
35-
icon: IconDel()
35+
icon: IconDeleteL()
3636
},
3737
{
3838
text: '编辑',
39-
icon: IconWriting(),
39+
icon: IconEditor(),
4040
disabled: true
4141
},
4242
{
4343
text: '排序',
44-
icon: IconAscending()
44+
icon: IconSortTriangle()
4545
},
4646
{
4747
text: '分享',
48-
icon: IconShare(),
48+
icon: IconFilletExternalLink(),
4949
disabled: true
5050
}
5151
])

0 commit comments

Comments
 (0)