Skip to content

Commit 367e241

Browse files
committed
Add: width and height props
1 parent 752b894 commit 367e241

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

commands/basec/templates/BaseButton.vue

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<template>
22
<div>
3-
<button v-on="$listeners" class="button" v-bind="$attrs">
4-
<slot />
3+
<button
4+
:style="{ width: wh + 'px', height: ht + 'px' }"
5+
v-on="$listeners"
6+
class="button"
7+
v-bind="$attrs"
8+
>
9+
<slot> Submit </slot>
510
</button>
611
</div>
712
</template>
@@ -10,16 +15,24 @@
1015
export default {
1116
name: "base",
1217
inheritAttrs: false,
18+
props: {
19+
wh: {
20+
type: String,
21+
default: "150",
22+
},
23+
ht: {
24+
type: String,
25+
default: "25",
26+
},
27+
},
1328
};
1429
</script>
1530

1631
<style scoped>
1732
.button {
18-
height: 25px;
19-
width: 75px;
2033
display: inline-flex;
21-
align-items: center;
2234
justify-content: center;
35+
align-items: center;
2336
white-space: nowrap;
2437
transition: all 0.2s linear;
2538
}

0 commit comments

Comments
 (0)