0.0.38-rc.13 • Published 3 years ago
@vue-polkadot/vue-settings v0.0.38-rc.13
Installation
npm install --save @vue-polkadot/vue-settings
State Props
Name | Description |
---|---|
apiUrl | Selected Url |
i18nLang | Selected language |
locking | Selected Locking |
prefix | Prefix |
uiMode | UI Mode |
uiTheme | UI Theme |
avaibleOptions | Object of all avaible options |
Mutations
Name | Description | Params | Types |
---|---|---|---|
setSettings | Set settings | settings | SettingsStruct |
Getters
Name | Description | Returns |
---|---|---|
availableNodes | List of Nodes | Option[] |
availableLanguages | List of Languages | Option[] |
availableCryptos | List of Cryptographic modes | Option[] |
availableLocking | List of Locking | Option[] |
availablePrefixes | List of Prefixes | Option[] |
availableUiModes | List of UI Modes | Option[] |
availableUiThemes | List of UI Themes | Option[] |
getSettings | Object of all avaible options | SettingsStruct |
Usage Examples
import SettingModule
to your store as module
import Vue from 'vue'
import Vuex from 'vuex'
import SettingModule from '@vue-polkadot/vue-settings'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
setting: SettingModule,
},
})
now you can use getters and actions inside your component (Using Vue with typescript)
<template>
<div>
<div v-for="option in options">
<span>{{option.value}}</span>
<span>{{option.text}}</span>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
@Component
export default class App extends Vue {
// Getter is like computed
get options(): Option[] {
return this.$store.getters.availableNodes
}
}
</script>
0.0.38-rc.10
3 years ago
0.0.38-rc.11
3 years ago
0.0.38-rc.12
3 years ago
0.0.38-rc.13
3 years ago
0.0.38-rc.5
4 years ago
0.0.38-rc.6
4 years ago
0.0.38-rc.7
4 years ago
0.0.38-rc.8
4 years ago
0.0.38-rc.3
4 years ago
0.0.38-rc.4
4 years ago
0.0.38-rc.9
4 years ago
0.0.23
4 years ago
0.0.24
4 years ago
0.0.25
4 years ago
0.0.37
4 years ago
0.0.30
4 years ago
0.0.31
4 years ago
0.0.32
4 years ago
0.0.38-rc.1
4 years ago
0.0.33
4 years ago
0.0.38-rc.2
4 years ago
0.0.34
4 years ago
0.0.35
4 years ago
0.0.36
4 years ago
0.0.20
4 years ago
0.0.21
4 years ago
0.0.22
4 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.17
4 years ago
0.0.16
4 years ago
0.0.15
5 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.12-beta.1
5 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago