| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <template>
- <view class="erp-submit-bar">
- <button class="submit-btn" :disabled="disabled" @click="handleClick">
- <slot>{{ text }}</slot>
- </button>
- </view>
- </template>
- <script>
- export default {
- name: 'ErpSubmitBar',
- props: {
- text: { type: String, default: '' },
- disabled: { type: Boolean, default: false }
- },
- methods: {
- handleClick() {
- if (!this.disabled) {
- this.$emit('click');
- }
- }
- }
- }
- </script>
- <style scoped>
- .erp-submit-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- background: #fff;
- padding: 20rpx 30rpx calc(env(safe-area-inset-bottom) + 20rpx);
- box-sizing: border-box;
- box-shadow: 0 -10rpx 30rpx rgba(0, 0, 0, 0.05);
- z-index: 100;
- }
- .submit-btn {
- background: #C1001C;
- color: #fff;
- height: 100rpx;
- border-radius: 50rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 34rpx;
- font-weight: bold;
- border: none;
- }
- .submit-btn:active {
- opacity: 0.9;
- transform: scale(0.98);
- }
- .submit-btn[disabled] {
- background: #e0e0e0;
- color: #999;
- }
- </style>
|