File tree Expand file tree Collapse file tree 9 files changed +44
-40
lines changed Expand file tree Collapse file tree 9 files changed +44
-40
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export type IButtonSize = 'lg' | 'md' | 'sm' | 'xs';
8
8
import './button.scss' ;
9
9
10
10
export default defineComponent ( {
11
+ name : 'd-button' ,
11
12
props : {
12
13
id : {
13
14
type : [ String , Number ]
@@ -29,8 +30,8 @@ export default defineComponent({
29
30
default : 'default'
30
31
} ,
31
32
bordered : {
32
- type : String as ( ) => IButtonPosition ,
33
- default : 'default'
33
+ type : Boolean ,
34
+ default : false
34
35
} ,
35
36
icon : {
36
37
type : String ,
Original file line number Diff line number Diff line change 20
20
<script >
21
21
import { defineComponent } from ' vue'
22
22
import DevUICodeBox from ' ../../shared/devui-codebox/devui-codebox.vue'
23
- import DevUIButtonPrimary from ' ./primary/primary.vue '
24
- import DevUIButtonCommon from ' ./common/common.vue '
23
+ import DevUIButtonPrimary from ' ./primary/primary'
24
+ import DevUIButtonCommon from ' ./common/common'
25
25
26
26
export default defineComponent ({
27
27
name: ' d-button-demo' ,
28
28
components: {
29
29
' d-codebox' : DevUICodeBox,
30
30
' d-button-primary' : DevUIButtonPrimary,
31
31
' d-button-common' : DevUIButtonCommon,
32
+ },
33
+ setup () {
34
+ const primarySource = {};
35
+ const commonSource = {};
36
+ return {
37
+ primarySource,
38
+ commonSource
39
+ }
32
40
}
33
41
})
34
42
</script >
Original file line number Diff line number Diff line change
1
+ import { defineComponent } from 'vue' ;
2
+ import Button from '../../button' ;
3
+
4
+ export default defineComponent ( {
5
+ name : 'd-button-common' ,
6
+ setup ( ) {
7
+ return ( ) => {
8
+ return (
9
+ < div >
10
+ < Button bsStyle = "common" > Common</ Button >
11
+ </ div >
12
+ ) ;
13
+ }
14
+ }
15
+ } ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { defineComponent } from 'vue' ;
2
+ import Button from '../../button' ;
3
+
4
+ export default defineComponent ( {
5
+ name : 'd-button-primary' ,
6
+ setup ( ) {
7
+ return ( ) => {
8
+ return (
9
+ < div >
10
+ < Button bsStyle = "primary" > primary</ Button >
11
+ </ div >
12
+ ) ;
13
+ }
14
+ }
15
+ } ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
devui codebox
4
+ <slot ></slot >
4
5
</div >
5
6
</template >
6
7
Original file line number Diff line number Diff line change 94
94
</div >
95
95
<!-- <app-content></app-content> -->
96
96
<router-view ></router-view >
97
- <d-button @click =" confirm" >Confirm</d-button >
98
- <d-button @click =" cancel" >Cancel</d-button >
99
97
</div >
100
98
</template >
101
99
102
100
<script lang="ts">
103
101
import { defineComponent } from ' vue'
104
102
import AppContent from ' ./components/app-content.vue'
105
- import DevUIButton from ' ../devui/button/button'
106
103
107
104
export default defineComponent ({
108
105
name: ' App' ,
109
106
components: {
110
107
AppContent ,
111
- ' d-button' : DevUIButton ,
112
108
},
113
109
methods: {
114
- confirm() {
115
- console .log (' confirm' )
116
- },
117
- cancel() {
118
- console .log (' cancel' )
119
- }
120
110
}
121
111
})
122
112
</script >
You can’t perform that action at this time.
0 commit comments