| | |
| | | }; |
| | | import { SuperComponent, wxComponent } from '../common/src/index'; |
| | | import config from '../common/config'; |
| | | import props from './props'; |
| | | import transition from '../mixins/transition'; |
| | | import useCustomNavbar from '../mixins/using-custom-navbar'; |
| | | const { prefix } = config; |
| | | const name = `${prefix}-overlay`; |
| | | let Overlay = class Overlay extends SuperComponent { |
| | | constructor() { |
| | | super(...arguments); |
| | | this.properties = { |
| | | zIndex: { |
| | | type: Number, |
| | | value: 11000, |
| | | }, |
| | | duration: { |
| | | type: Number, |
| | | value: 300, |
| | | }, |
| | | backgroundColor: { |
| | | type: String, |
| | | value: '', |
| | | }, |
| | | preventScrollThrough: { |
| | | type: Boolean, |
| | | value: true, |
| | | }, |
| | | }; |
| | | this.behaviors = [transition()]; |
| | | this.properties = props; |
| | | this.behaviors = [transition(), useCustomNavbar]; |
| | | this.data = { |
| | | prefix, |
| | | classPrefix: name, |
| | |
| | | this.observers = { |
| | | backgroundColor(v) { |
| | | this.setData({ |
| | | computedStyle: `background-color: ${v};`, |
| | | computedStyle: v ? `background-color: ${v};` : '', |
| | | }); |
| | | }, |
| | | zIndex(v) { |