This file contains hidden or 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
{ | |
"appKey": "randomKey", | |
"authHost": "https://corestaging.croudcontrol.com", | |
"authEndpoint": "/broadcasting/auth", | |
"database": "redis", | |
"databaseConfig": { | |
"redis": { | |
"port": "6379", | |
"host": "localhost", | |
"options": { |
This file contains hidden or 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
import { mapActions } from 'vuex' | |
export default { | |
methods: { | |
...mapActions([ | |
'updateInputFocus', | |
]), | |
lastInputFocus(e) { | |
if (!e.srcElement.name) return |
This file contains hidden or 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Remote debugging", | |
"sourceMaps": true, | |
"url": "http://localhost:8080", | |
"webRoot": "${workspaceRoot}" |
This file contains hidden or 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
<template> | |
<div>{{ hello }}</div> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
hello: 'Hello', | |
} |
This file contains hidden or 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
<template> | |
<div class="a" v-html="content"></div> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
content: 'this is a <a class="b">Test</a>', | |
} |
This file contains hidden or 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
<template> | |
<div v-if="outOfView" class="placeholder"> </div> | |
<div v-else> | |
<slot></slot> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { |
This file contains hidden or 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
const observer = new IntersectionObserver((entries) => { | |
entries.forEach(entry => { | |
if (entry.intersectionRatio > 0) { | |
observer.disconnect() | |
this.showComments = true | |
} | |
}) | |
}, this.options) | |
observer.observe(this.$refs.ending) |
This file contains hidden or 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
export default { | |
methods: { | |
// better for readability | |
async veryReadable() { | |
const { data } = await axios.get(`https://jsonplaceholder.typicode.com/post/${response.data[0]}/comments?_page=1`) | |
this.comments = data | |
}, | |
// better for returning a promise for chaining | |
returningPromise() { |
This file contains hidden or 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
<template> | |
<div v-if="outOfView" class="placeholder"> </div> | |
<div v-else> | |
<slot></slot> | |
</div> | |
</template> |
This file contains hidden or 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
Vue.config.performance = true |