How to read JS file app.ux Global variables in

Fast application definition in app.ux The global variables in the JS file can be obtained through the quick application of the public method getapp (). For details, please refer to the following example code.

app.ux code:

data: {
      AppData: '123456',

JS file:

export default {
      getAppData() {
        return getApp().$

For more details, please refer to:

Quick application development guidance document:

Quick application script:

Link to the original text:

Original author: mayism

Read More: