How to use the vuex-class.namespace function in vuex-class

To help you get started, we’ve selected a few vuex-class 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 apache / incubator-weex-cli / packages / @weex / plugins / debug / frontend / src / views / home / home.ts View on Github external
import { Component, Vue } from 'vue-property-decorator'
import {
  State,
  Action,
  namespace
} from 'vuex-class'
import SockJS from 'simple-websocket'
import { BContainer } from 'bootstrap-vue/esm/components/layout/container'
import { BCol } from 'bootstrap-vue/esm/components/layout/col'
import { BRow } from 'bootstrap-vue/esm/components/layout/row'
import QrcodeVue from 'qrcode.vue'
import { BPopover } from 'bootstrap-vue/esm/components/popover/popover'
import filters from './filters'
import './home.scss'

const Module = namespace('home')

export interface Tip {
  icon: string
  title: any
  des: any
  url: any
}

@Component({
  template: require('./home.html'),
  components: {
    'b-container': BContainer,
    'b-col': BCol,
    'b-row': BRow,
    'b-popover': BPopover,
    'qrcode': QrcodeVue
github apache / incubator-weex-cli / packages / @weex / plugins / debug / frontend / src / views / weex / weex.ts View on Github external
Action,
  namespace
} from 'vuex-class'
import QrcodeVue from 'qrcode.vue'
import { BEmbed } from 'bootstrap-vue/esm/components/embed/embed'
import { BFormSelect } from 'bootstrap-vue/esm/components/form-select/form-select'
import { BButton } from 'bootstrap-vue/esm/components/button/button'
import SockJS from 'simple-websocket'
import { BModal } from 'bootstrap-vue/esm/components/modal/modal'
import MonacoEditor from 'vue-monaco-editor'
import * as types from '../../store/mutation-types'
import { Environment } from '../../store/modules/weex'
import { SnotifyToastConfig, SnotifyPosition } from 'vue-snotify'
import './weex.scss'

const Module = namespace('weex')

@Component({
  template: require('./weex.html'),
  components: {
    'b-embed': BEmbed,
    'b-button': BButton,
    'b-modal': BModal,
    'b-form-select': BFormSelect,
    'monacoeditor': MonacoEditor,
    'qrcode': QrcodeVue
  }
})
export class WeexComponent extends Vue {
  @State('webSocketHost') webSocketHost
  @State('helpSetting') helpSetting
  @State('bundleSetting') bundleSetting
github apache / incubator-weex-cli / packages / @weex / plugins / debug / frontend / src / views / analyze / analyze.ts View on Github external
import { BFormCheckbox } from 'bootstrap-vue/esm/components/form-checkbox'
import { BEmbed } from 'bootstrap-vue/esm/components/embed'
import { BTable } from 'bootstrap-vue/esm/components/table'
import { BProgress } from 'bootstrap-vue/esm/components/progress'
import { BButton } from 'bootstrap-vue/esm/components/button'
import { BModal } from 'bootstrap-vue/esm/components/modal'
import SockJS from 'simple-websocket'
import * as types from '../../store/mutation-types'
import { Parser } from '../../util/parser'
import { SelectComponent } from '../../components/select'
import VeWaterfallBar from 'v-charts/lib/waterfall.common'
import { BFormRadioGroup } from 'bootstrap-vue/esm/components/form-radio'
import { BPopover } from 'bootstrap-vue/esm/components/popover'
import './analyze.scss'

const Module = namespace('analyze')

@Component({
  template: require('./analyze.html'),
  components: {
    'b-embed': BEmbed,
    'b-button': BButton,
    'wx-select': SelectComponent,
    'b-checkbox': BFormCheckbox,
    'b-progress': BProgress,
    'b-table': BTable,
    'b-modal': BModal,
    'b-popover': BPopover,
    'b-form-radio-group': BFormRadioGroup,
    've-waterfall': VeWaterfallBar
  }
})
github project-yuki / YUKI / src / translator / components / HookSettings.vue View on Github external
} else {
      return _.orderBy(
        this.hooks,
        (hook: yuki.TextThread) => this.texts[hook.handle].length,
        'desc'
      )
    }
  }

  @(namespace('Hooks').State('hookInfos'))
  public hooks!: yuki.TextThread[]
  @(namespace('Hooks').State('texts'))
  public texts!: string[]
  @(namespace('Hooks').State('currentDisplayHookIndex'))
  public currentIndex!: number
  @(namespace('View').State('isWindowTooHigh'))
  public isWindowTooHigh!: boolean

  get classObject () {
    return {
      'small-margin': true,
      'fixed-scroll': !this.isWindowTooHigh,
      'fixed-scroll-margin-top': this.isWindowTooHigh
    }
  }

  public openInputHookDialog () {
    this.openInputHook = true
  }
  public closeInputHookDialog () {
    this.openInputHook = false
    this.hookCode = ''

vuex-class

Binding helpers for Vuex and vue-class-component

MIT
Latest version published 6 years ago

Package Health Score

50 / 100
Full package analysis