-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from medevicex/dev
Dev
- Loading branch information
Showing
13 changed files
with
113 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<div> | ||
<header> | ||
<button v-for="item in names" @click="test.active = item">{{ item }}</button> | ||
</header> | ||
<span>{{ scrolls.x }}</span>, | ||
<span>{{ scrolls.y }}</span> | ||
<div class="view" v-route-scroll="{ path: 'test', name: this.test.active, self: scrolls }"> | ||
<div class="inner"> | ||
</div> | ||
</div> | ||
<div class="view" v-route-scroll="{ path: 'test', name: this.test.active + '-' }"> | ||
<div class="inner"> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
import { mapModules, mapRules } from 'vuet' | ||
export default { | ||
mixins: [ | ||
mapModules({ test: 'test' }) | ||
], | ||
data () { | ||
return { | ||
names: ['view-1', 'view-2'] | ||
} | ||
}, | ||
computed: { | ||
scrolls () { | ||
return this.test.scrolls[this.test.active] | ||
} | ||
} | ||
} | ||
</script> | ||
<style scoped> | ||
header button { | ||
margin: 10px; | ||
} | ||
.view { | ||
overflow: auto; | ||
width: 400px; | ||
height: 400px; | ||
border: 1px solid #ddd; | ||
} | ||
.view .inner { | ||
width: 800px; | ||
height: 800px; | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Vuet scroll-self</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="/__build__/js/common.js"></script> | ||
<script src="/__build__/js/scroll-self.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Vue from 'vue' | ||
import App from './App' | ||
import vuet from './vuet' | ||
|
||
export default new Vue({ | ||
el: '#app', | ||
vuet, | ||
render (h) { | ||
return h(App) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Vue from 'vue' | ||
import Vuet from 'vuet' | ||
|
||
Vue.use(Vuet) | ||
|
||
export default new Vuet({ | ||
modules: { | ||
test: { | ||
data () { | ||
return { | ||
active: 'view-1', | ||
scrolls: { | ||
'view-1': { x: 50, y: 50 }, | ||
'view-2': { x: 0, y: 0 } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters