How to use the vue-property-decorator.Vue.prototype function in vue-property-decorator

To help you get started, we’ve selected a few vue-property-decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Luffyying / mpvue-TS / src / main.ts View on Github external
import { Component, Emit, Inject, Model, Prop, Provide, Vue, Watch } from 'vue-property-decorator';
import { VueConstructor } from "vue";
import store from '@/store/index'
let isApp = false; //尝试mpvue-entry
let MyApp;
/* app-only-begin */
isApp = true;
interface IMpVue extends VueConstructor {
  mpType: string
}

Vue.prototype.$store = store;

// 添加小程序hooks http://mpvue.com/mpvue/#_4
Component.registerHooks([
  // app
  'onLaunch', // 初始化
  'onShow', // 当小程序启动,或从后台进入前台显示
  'onHide', // 当小程序从前台进入后台,子组件也会调用这个函数
  // pages
  'onLoad', // 监听页面加载 
  'onShow', // 监听页面显示
  'onReady', // 监听页面初次渲染完成
  'onHide', // 监听页面隐藏
  'onUnload', // 监听页面卸载 后退的时候执行,组件卸载
  'onPullDownRefresh', // 监听用户下拉动作
  'onReachBottom', // 页面上拉触底事件的处理函数
  'onShareAppMessage', // 用户点击右上角分享
github ulaval / modul-components / src / components / calendar / calendar-renderer / base-calendar / base-calendar.ts View on Github external
return Object.keys(MonthsNames).map((key: string) => {
                return Vue.prototype.$i18n.translate(
                    `${TRANSLATION_MONTHS}.${MonthsNames[key]}`
                );
            });
        }
github ulaval / modul-components / src / components / calendar / calendar-renderer / base-calendar / base-calendar.ts View on Github external
return Object.keys(WeekdayNames).map((key: string) => {
                return Vue.prototype.$i18n.translate(
                    `${TRANSLATION_WEEKDAYS}.${WeekdayNames[key]}${TRANSLATION_SUFFIXE}`
                );
            });
        }
github ulaval / modul-components / src / components / calendar / calendar-renderer / base-calendar / base-calendar.ts View on Github external
return Object.keys(MonthsNames).map((key: string) => {
                return Vue.prototype.$i18n.translate(
                    `${TRANSLATION_MONTHS}.${MonthsNames[key]}${TRANSLATION_SUFFIXE}`
                );
            });
        }
github ulaval / modul-components / src / components / calendar / calendar-renderer / base-calendar / base-calendar.ts View on Github external
return Object.keys(MonthsNames).map((key: string) => {
                return Vue.prototype.$i18n.translate(
                    `${TRANSLATION_MONTHS}.${MonthsNames[key]}${TRANSLATION_SUFFIXE}`
                );
            });
        }