add eslint working conf
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
/>
|
||||
<div class="absolute flex flex-col justify-between w-full top-0 bottom-0">
|
||||
<div class="flex items-center justify-between p-4">
|
||||
<router-link to="/memos/" class="btn-secondary">< Back</router-link>
|
||||
<router-link to="/memos/" class="btn-secondary">Back</router-link>
|
||||
<div class="flex-middle">
|
||||
<router-link :to="'/memos/' + memo.memo_id + '/edit'" class="btn-secondary mr-1" >Edit</router-link>
|
||||
<a href="#" class="btn-alert" @click="modal = ! modal">Delete</a>
|
||||
@@ -38,53 +38,55 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import TagBox from "../Tag/TagBox";
|
||||
import Loader from "../../components/Loader";
|
||||
let MarkdownIt = require('markdown-it'),
|
||||
md = new MarkdownIt()
|
||||
.use(require('markdown-it-checkbox'));
|
||||
// import TagBox from "../Tag/TagBox";
|
||||
import Loader from '../../components/Loader'
|
||||
let MarkdownIt = require('markdown-it'),
|
||||
md = new MarkdownIt()
|
||||
.use(require('markdown-it-checkbox'))
|
||||
|
||||
export default {
|
||||
name: 'MemoShow',
|
||||
components: {
|
||||
Loader
|
||||
// TagBox
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
loading: true,
|
||||
modal: false,
|
||||
memo: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
memoMarkdown: function () {
|
||||
return md.render(this.memo.memo)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/memos/' + this.$route.params.id)
|
||||
.then(response => {
|
||||
this.memo = response.data.data
|
||||
this.loading = false
|
||||
export default {
|
||||
name: 'MemoShow',
|
||||
components: {
|
||||
Loader
|
||||
// TagBox
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
loading: true,
|
||||
modal: false,
|
||||
memo: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
memoMarkdown: function () {
|
||||
return md.render(this.memo.memo)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// eslint-disable-next-line no-undef
|
||||
axios.get('/api/memos/' + this.$route.params.id)
|
||||
.then(response => {
|
||||
this.memo = response.data.data
|
||||
this.loading = false
|
||||
})
|
||||
.catch(errorRes => {
|
||||
this.loading = false
|
||||
if (errorRes.response.status === 404) {
|
||||
this.$router.push('/memos')
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
destroy: function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
axios.delete('/api/memos/' + this.$route.params.id)
|
||||
.then(() => {
|
||||
this.$router.push('/memos')
|
||||
})
|
||||
.catch(errorRes => {
|
||||
this.loading = false
|
||||
if (errorRes.response.status === 404) {
|
||||
this.$router.push('/memos')
|
||||
}
|
||||
console.log('Internal Error, Unable to delete contact.' + errorRes)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
destroy: function () {
|
||||
axios.delete('/api/memos/' + this.$route.params.id)
|
||||
.then(response => {
|
||||
this.$router.push('/memos')
|
||||
})
|
||||
.catch(errorRes => {
|
||||
console.log('Internal Error, Unable to delete contact.' + errorRes)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user