Complete Vue.js 2 Web Development_ Practical guide to building end-to-end web development solutions with Vue.js 2
Navigating through the File Tree and Loading Folders from the URL Chapter 5 this.getFolderStructure(this.path); }, watch: { path ...
6 Caching the Current Folder Structure Using Vuex In this chapter, we are going to introduce an official Vue plugin called Vuex. ...
Caching the Current Folder Structure Using Vuex Chapter 6 As mentioned, Vuex is a state management pattern, which is the source ...
Caching the Current Folder Structure Using Vuex Chapter 6 Including and initializing Vuex The Vuex library is included the same ...
Caching the Current Folder Structure Using Vuex Chapter 6 let hash = window.location.hash.substring(1); this.path = (hash || '') ...
Caching the Current Folder Structure Using Vuex Chapter 6 getters: { message: state => { return state.message.toLowerCase(); ...
Caching the Current Folder Structure Using Vuex Chapter 6 This is literally accessing the store, then the state object, followed ...
Caching the Current Folder Structure Using Vuex Chapter 6 We also need to create a mutation to allow the path to be updated from ...
Caching the Current Folder Structure Using Vuex Chapter 6 When referring to the Vuex store on a Vue instance, it is saved under ...
Caching the Current Folder Structure Using Vuex Chapter 6 parts = this.$store.state.path.split('/'); for (let item of parts) { s ...
Caching the Current Folder Structure Using Vuex Chapter 6 This would become the following: updateStructure() { this.isLoading = ...
Caching the Current Folder Structure Using Vuex Chapter 6 return new Dropbox({ accessToken: this.accessToken }); }, getFolderStr ...
Caching the Current Folder Structure Using Vuex Chapter 6 Caching the folder contents Now that we have Vuex in our app and are u ...
Caching the Current Folder Structure Using Vuex Chapter 6 .then(this.createFolderStructure) .catch(error => { this.isLoading ...
Caching the Current Folder Structure Using Vuex Chapter 6 The path object will consist of a path variable, plus the data returne ...
Caching the Current Folder Structure Using Vuex Chapter 6 Although this works as is, it would be good practice to sanitize the p ...
Caching the Current Folder Structure Using Vuex Chapter 6 Loading data from the store if it exists Loading our data from the sto ...
Caching the Current Folder Structure Using Vuex Chapter 6 The path to the data is quite long and can make our code unreadable. T ...
Caching the Current Folder Structure Using Vuex Chapter 6 Lastly, update the Dropbox API function to call this method: getFolder ...
Caching the Current Folder Structure Using Vuex Chapter 6 return output; } } }); Vue.component('folder', { template: '<li> ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf