1 Star 5 Fork 0

自然框架 / vue-data-state

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.en.md

vue-data-state Lightweight state management

Description

Similar to vuex's lightweight data, state, cache integrated management method.

  • Global state,use it like Vuex.
  • Local state,It is valid within the parent component and its child components, and does not affect the sibling component and superior component.
  • Initialization, the global state can be initialized assignment.

It only contains the state, but does not contain the operation methods 、mutations and action. You can use Vue3 Composition API to operate the state.

Source code

https://gitee.com/naturefw/vue-data-state

<script src='https://gitee.com/naturefw/vue-data-state/widget_preview' async defer></script>
<style> .osc_pro_color {color: #ffffff !important;} .osc_panel_color {background-color: #1e252b !important;} .osc_background_color {background-color: #323d47 !important;} .osc_border_color {border-color: #455059 !important;} .osc_desc_color {color: #d7deea !important;} .osc_link_color * {color: #99a0ae !important;} </style>

Installation

  1. npm i vue-data-state

Instructions

like Vuex.

  1. VuexDataState.createStore Create instance, define global state, local state and initialization function.
  2. main.js to app
  3. template use $state
  4. code use VueDS.useStore()

Comments ( 0 )

Sign in for post a comment

About

类似 Vuex 的轻量级的数据、状态、缓存综合管理方法。简称:Vueds spread retract
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
JavaScript
1
https://gitee.com/naturefw/vue-data-state.git
git@gitee.com:naturefw/vue-data-state.git
naturefw
vue-data-state
vue-data-state
master

Search