0.0.38-rc.13 • Published 2 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
2 years ago
0.0.38-rc.11
2 years ago
0.0.38-rc.12
2 years ago
0.0.38-rc.13
2 years ago
0.0.38-rc.5
2 years ago
0.0.38-rc.6
2 years ago
0.0.38-rc.7
2 years ago
0.0.38-rc.8
2 years ago
0.0.38-rc.3
2 years ago
0.0.38-rc.4
2 years ago
0.0.38-rc.9
2 years ago
0.0.23
2 years ago
0.0.24
2 years ago
0.0.25
2 years ago
0.0.37
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.32
2 years ago
0.0.38-rc.1
2 years ago
0.0.33
2 years ago
0.0.38-rc.2
2 years ago
0.0.34
2 years ago
0.0.35
2 years ago
0.0.36
2 years ago
0.0.20
3 years ago
0.0.21
3 years ago
0.0.22
3 years ago
0.0.19
3 years ago
0.0.18
3 years ago
0.0.17
3 years ago
0.0.16
3 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.12-beta.1
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago