Skip to content

vue3 中有个bug this.$waterfall.forceUpdate() #160

Open
@yukaige

Description

@yukaige

会报错
Uncaught TypeError: Cannot read properties of undefined (reading 'forceUpdate')
需要将index.js中的

        app.$waterfall = {
            forceUpdate: function forceUpdate() {
                bus.emit('forceUpdate');
            },
            mix: function mix() {
                bus.emit('mix');
            }
        };

改为

        app.config.globalProperties.$waterfall = {
            forceUpdate() {
                bus.emit('forceUpdate');
            },
            mix() {
                bus.emit('mix');
            }
        };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions