Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a925001

Browse files
committed
Datagrid with VueJS almost ok (needs header/filter/pagination but simple data is displayed)
1 parent 2a7c022 commit a925001

File tree

4 files changed

+19
-27
lines changed

4 files changed

+19
-27
lines changed

‎assets/js/form-devxpress-vuejs/App.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<template>
22
<div id="app">
3-
<router-view/>
3+
<Books></Books>
44
</div>
55
</template>
66

77
<script>
8+
import Books from "./components/Books";
89
export default {
910
name: 'app',
11+
components: {Books},
1012
}
1113
</script>
1214

‎assets/js/form-devxpress-vuejs/app.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
33
import Vue from 'vue'
44
import App from './App.vue'
5-
import router from './router'
65
import { isProduction } from '../lib/config'
7-
import Vuelidate from 'vuelidate'
86
import VueApollo from 'vue-apollo'
97
import { apolloProvider } from '../lib/apollo'
108

@@ -13,13 +11,11 @@ import 'devextreme/dist/css/dx.light.compact.css';
1311

1412
Vue.config.productionTip = isProduction()
1513

16-
Vue.use(Vuelidate)
1714
Vue.use(VueApollo)
1815

1916
/* eslint-disable no-new */
2017
new Vue({
2118
el: '#app',
22-
router,
2319
apolloProvider,
2420
render: h => h(App),
2521
})

‎assets/js/form-devxpress-vuejs/router/index.js‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎assets/js/lib/login.js‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,24 @@ export const IsLoggedInObservable = IsLoggedInSubject
1414
filter(data => Boolean(data && data.isLoggedIn))
1515
)
1616

17-
axios.interceptors.request.eject(logoutStdInterceptors)
17+
const axiosEject = {
18+
ejected: {},
19+
eject(axios, interceptors) {
20+
if (this.ejected[interceptors]) {
21+
return;
22+
}
23+
24+
if (axios && axios.interceptors) {
25+
axios.interceptors.request.eject(interceptors)
26+
this.ejected[interceptors] = true;
27+
}
28+
}
29+
}
1830

1931
// @todo move it to RxJs implementation with subscribe + only call the uri on last call of the method during 300ms
2032
export default function isLoggedIn(loaderToActivate, uri = loginInfos.uriIsLoggedIn.json) {
21-
debugger
33+
axiosEject.eject(axios, logoutStdInterceptors)
34+
2235
return new Promise((resolve, reject) => {
2336
if (loaderToActivate && loaderToActivate.isLoading) {
2437
loaderToActivate.isLoading = true
@@ -52,6 +65,7 @@ export const resetLoginInfo = function() {
5265
IsLoggedInSubject.next(undefined)
5366
}
5467

68+
// @todo refactor coz it should abstract the Notify => for instance it's conly compatible with Quasar, it's stupid, even the redirect is stupid coz depend on the framework used
5569
export const logout = function() {
5670
resetLoginInfo()
5771
Notify.create({

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /