Skip to content

Commit ed56452

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

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

commands/basec/templates/BaseButton.vue

Lines changed: 17 additions & 4 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,13 +15,21 @@
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;
2134
align-items: center;
2235
justify-content: center;

0 commit comments

Comments
 (0)