Giter VIP home page Giter VIP logo

vue3admin's Introduction

vue3admin

mock文件中的代码用的是他人的

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

vue3admin's People

Contributors

dependabot[bot] avatar vexth avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vue3admin's Issues

Does not work with modules in the initiator

I stumbled upon your repo and used it as a guide to get started with a vue app in conjunction with a few others. Thanks for publishing.

After getting over the 1st few learning blocks of vuejs the natural step (for me) was to persist the vuex state and "re-hydrate" (developers come up with the most ridiculous use of English words, as this use case has nothing to with water) the store with the previously saved state on new page load.

https://www.npmjs.com/package/vuex-persist
After searching i found this package which requires that the modules "should be registered in the Vuex constructor. When using store.registerModule you risk the (restored) persisted state being overwritten with the default state defined in the module itself."

As I had setup my modules in the method from this repo i was not injecting them into the store, but when i did it was throwing errors saying it could not find getters: https://stackoverflow.com/questions/55843052/vuex-not-loading-module-decorated-with-vuex-module-decorators

Long story short, I think the line export const AuthenticationModule = getModule(Authentication); is not enough for the new Vuex.Store and instead the module should be exported from the index.ts instead: https://stackoverflow.com/questions/55843052/vuex-not-loading-module-decorated-with-vuex-module-decorators#answer-55843970

I did not get a reply from the author of the decorator package nor an answer on stackoverflow, nor am i seasoned vuejs developer yet... but implement the modules in the way i answered in the SO post is working perfectly now with the vuex.persist and i can also write my modules in the same DRY fashion from your admin repo.

Would love to know your thoughts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.