riku
2025-04-27 f46786f11c5c08ead7501a82e5a71430ad69b782
miniprogram_npm/tdesign-miniprogram/message/index.js
@@ -14,10 +14,11 @@
const showMessage = function (options, theme = MessageType.info) {
    const { context, selector = '#t-message' } = options, otherOptions = __rest(options, ["context", "selector"]);
    const instance = getInstance(context, selector);
    if (typeof otherOptions.single !== 'boolean') {
        otherOptions.single = true;
    }
    if (instance) {
        instance.resetData(() => {
            instance.setData(Object.assign({ theme }, otherOptions), instance.show.bind(instance));
        });
        instance.setMessage(otherOptions, theme);
        return instance;
    }
    console.error('未找到组件,请确认 selector && context 是否正确');