| | |
| | | </template> |
| | | |
| | | <script> |
| | | import buttonClickMixin from '@/mixins/button-click.js'; |
| | | |
| | | export default { |
| | | |
| | | name: "OIFormInput", |
| | | mixins: [buttonClickMixin], |
| | | props: { |
| | | viewMode: { |
| | | type: Boolean, |
| | |
| | | }, |
| | | methods: { |
| | | onChange(e) { |
| | | this.$emit("change", e) |
| | | this.$emit("on-change", e) |
| | | }, |
| | | onConfirm(e) { |
| | | console.log("onConfirm") |
| | | this.onChange(e) |
| | | }, |
| | | onClick(e) { |
| | | this.$emit("click", e) |
| | | }, |
| | | onFocus(e) { |
| | | this.$emit("focus", e) |
| | | this.$emit("on-focus", e) |
| | | }, |
| | | onPrefixButton() { |
| | | this.$emit("click-prefix") |
| | | this.handleButtonClick((done) => { |
| | | this.$emit("on-click-prefix") |
| | | setTimeout(() => { |
| | | done(); // 重置状态 |
| | | }, 1000); |
| | | }); |
| | | }, |
| | | onSuffixButton() { |
| | | this.$emit("click-suffix") |
| | | |
| | | this.handleButtonClick((done) => { |
| | | this.$emit("on-click-suffix") |
| | | setTimeout(() => { |
| | | done(); // 重置状态 |
| | | }, 1000); |
| | | }); |
| | | |
| | | |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | }; |
| | | </script> |
| | | |
| | |
| | | border: 1px solid #d5d5d5; |
| | | border-radius: 6px !important; |
| | | padding: 3rpx; |
| | | width: calc(100%- 6rpx); |
| | | width: calc(100% - 6rpx); |
| | | display: flex; |
| | | flex-direction: row; |
| | | |
| | | |
| | | .input-disabled { |
| | | background-color: #f3f3f3 !important; |
| | | } |