Article From:https://segmentfault.com/q/1010000011703254
Question:

In a Vue file.

<script>

>  How do I quote the value of the DATA variable here?Export default {Data () {Return {Msg:'Welcome to Your Vue.JS App'}},BeforeCreated:function () {This.$ajax ({Method:'post',Url: "/api/graph",Data:{Code:myCode}}.Then (function (response)){Var DATA = response['data']});}}< /script>

It is the variable value of a function that is to be referenced outside export default, because it is right.axiosThe resulting values are processed to get the values obtained outside the export.

I also want to ask why I can’t get vue.js’s Chinese official website.

Answer 0:

Using vuex is the most convenient and quick way, or the way of attribute transfer, callback function and bus bus can also be realized.

Leave a Reply

Your email address will not be published. Required fields are marked *