We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use the vue-property-decorator.Component.registerHooks 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 jackdizhu / WePY_app / 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'

import '@/weui/weui.css'
import '@/weui/weui_theme.css'
import '@/css/app.css'
// import '@/weui/weui_theme.less'

interface IMpVue extends VueConstructor {
  mpType: string,
  $store: any
}

// 添加小程序hooks http://mpvue.com/mpvue/#_4
Component.registerHooks([
  // app
  'onLaunch', // 初始化
  'onShow', // 当小程序启动,或从后台进入前台显示
  'onHide', // 当小程序从前台进入后台
  // pages
  'onLoad', // 监听页面加载
  'onShow', // 监听页面显示
  'onReady', // 监听页面初次渲染完成
  'onHide', // 监听页面隐藏
  'onUnload', // 监听页面卸载
  'onPullDownRefresh', // 监听用户下拉动作
  'onReachBottom', // 页面上拉触底事件的处理函数
  'onShareAppMessage', // 用户点击右上角分享
  'onPageScroll', // 页面滚动
  'onTabItemTap', //当前是 tab 页时, 点击 tab 时触发 (mpvue 0.0.16 支持)
])
github sogehige / sogeBot / src / panel / views / managers / alias / alias-edit.vue View on Github external
import { permission } from 'src/bot/helpers/permissions'

import { Alias as AliasEntity } from 'src/bot/database/entity/alias';
import { Permissions as PermissionsEntity } from 'src/bot/database/entity/permissions';

import { Validations } from 'vuelidate-property-decorators';
import { required } from 'vuelidate/lib/validators'
import { orderBy } from 'lodash-es'

import uuid from 'uuid/v4';

import { library } from '@fortawesome/fontawesome-svg-core';
import { faKey } from '@fortawesome/free-solid-svg-icons';
library.add(faKey);

Component.registerHooks([
  'beforeRouteEnter',
  'beforeRouteLeave',
  'beforeRouteUpdate' // for vue-router 2.2+
])

@Component({
  components: {
    'loading': () => import('../../../components/loading.vue'),
  },
  filters: {
    capitalize(value) {
      if (!value) return ''
      value = value.toString()
      return value.charAt(0).toUpperCase() + value.slice(1)
    }
  }
github sogehige / sogeBot / src / panel / views / managers / viewers / viewers-edit.vue View on Github external
import { getSocket } from 'src/panel/helpers/socket';
import { orderBy, remove, xor } from 'lodash';

import VueFlatPickr from 'vue-flatpickr-component';
import 'flatpickr/dist/flatpickr.css';

import moment from 'moment';
import { User } from 'src/bot/database/entity/user';

import { library } from '@fortawesome/fontawesome-svg-core';
import {
  faLock, faUnlock,
} from '@fortawesome/free-solid-svg-icons';
library.add(faLock, faUnlock);

Component.registerHooks([
  'beforeRouteEnter',
  'beforeRouteLeave',
  'beforeRouteUpdate' // for vue-router 2.2+
])

@Component({
  components: {
    'loading': () => import('../../../components/loading.vue'),
    datetime: VueFlatPickr,
  }
})
export default class viewersEdit extends Vue {
  moment = moment;
  orderBy = orderBy;
  xor = xor;
github naver / ngrinder / ngrinder-frontend / src / js / components / perftest / detail / Detail.vue View on Github external
safeDistribution: test.safeDistribution,
                    param: test.param,
                },
                rampUp: {
                    enable: test.useRampUp,
                    type: test.rampUpType,
                    initCount: test.rampUpInitCount,
                    step: test.rampUpStep,
                    initSleepTime: test.rampUpInitSleepTime,
                    interval: test.rampUpIncrementInterval,
                },
            };
        }
    }

    Component.registerHooks(['beforeRouteEnter', 'beforeRouteUpdate']);
    @Component({
        name: 'perfTestDetail',
        components: { ControlGroup, Config, Report, Running, IntroButton, Select2, ScheduleModal },
        $_veeValidate: {
            validator: 'new',
        },
    })
    export default class PerfTestDetail extends Mixins(Base, MessagesMixin) {
        @Prop({ type: String, required: false })
        id;

        @Prop({ type: Object, required: true })
        config;

        @Prop({ type: Number, required: true })
        timezoneOffset;