1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <template>
- <u-button
- @click="click"
- :type="type"
- :size="size"
- :custom-style="{
- borderRadius: 0
- }"
- style="border-radius: 0;"
- :style="{
- width: width,
- fontSize: fontSize,
- position: position,
- bottom: bottom,
- left: left
- }">
- {{ text }}
- </u-button>
- </template>
- <script>
- export default {
- data() {
- return {
-
- };
- },
- methods:{
- click() {
- if(this.customClick) {
- this.$emit('click')
- } else {
- this.$utils.openReLaunch('/pages/index/index')
- }
- }
- },
- props: {
- // 自定义点击事件
- customClick: {
- type: Boolean,
- default: false
- },
- text: {
- type: String,
- default: '返回首页'
- },
- size: {
- type: String,
- default: 'default'
- },
- type: {
- type: String,
- default: 'primary'
- },
- width: {
- type: String,
- default: '100%'
- },
- height: {
- type: String,
- default: '60rpx'
- },
- fontSize: {
- type: String,
- default: '24rpx'
- },
- position: {
- type: String,
- default: 'fixed'
- },
- bottom: {
- type: String,
- default: '0'
- },
- left: {
- type: String,
- default: '0'
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .u-btn {
- }
- </style>
|