Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

pre-build Vue don't have call method #1971

Open
3 tasks done
xiaomingplus opened this issue Dec 26, 2018 · 0 comments
Open
3 tasks done

pre-build Vue don't have call method #1971

xiaomingplus opened this issue Dec 26, 2018 · 0 comments

Comments

@xiaomingplus
Copy link

xiaomingplus commented Dec 26, 2018

Describe the bug

I use typescript to write weex vue,the compiled code is like:

 function Example(params) {
                        var _this = _super.call(this, params) || this;
                        _this.infoKey = 'weex';
                        return _this;
                    }

                    Example.prototype.created = function () {
                        modal.toast({
                            message: typeof vue__WEBPACK_IMPORTED_MODULE_1___default.a
                        });
                    };

There is a js error _super.call is undefined

Here is the compiled file:
https://gist.github.com/xiaomingplus/0b34a5af012b8069ba11405c4324d26a#file-weex-demo-js

I also see the pre-build vue version 2.5.16,but the package.json weex-vue-framwork 2.5.13-weex.5"

"Start JS Framework 0.29.1, Build at 2018-12-19 16:07. (Vue: 2.5.16-weex.5, Rax: 0.4.20)");

So,where are the vue source?

To Reproduce

Steps to reproduce the behavior. Include a MCVE using http://dotwe.org/vue , crash stacktrace or share your app project. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

Environment

  • Device: [e.g. iPhone6]iPhone X
  • OS: [e.g. iOS8.1]iOS 12
  • Version [e.g. 22] 0.20.1
  • Build from source [e.g. yes/no] no

Expected behavior

A clear and concise description of what you expected to happen.

https://gist.github.com/xiaomingplus/0b34a5af012b8069ba11405c4324d26a#file-weex-demo-js work well.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

I think the problem may be:

import * as Vue from 'vue'

instead of:

import Vue from 'vue'

from here: https://stackoverflow.com/questions/43051838/how-to-solve-super-apply-is-not-a-function-in-vuejs-component-typescript

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants