riku
2024-11-12 befd1f21839939b54254bd316bbd158b136fcd15
miniprogram_npm/tdesign-miniprogram/overlay/overlay.js
@@ -6,31 +6,16 @@
};
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,
@@ -40,7 +25,7 @@
        this.observers = {
            backgroundColor(v) {
                this.setData({
                    computedStyle: `background-color: ${v};`,
                    computedStyle: v ? `background-color: ${v};` : '',
                });
            },
            zIndex(v) {