fix linting errors

This commit is contained in:
MarcZierle 2022-01-11 21:51:29 +01:00
parent 33f3b825bf
commit d473d09a39
2 changed files with 49 additions and 46 deletions

5
jsconfig.json Normal file
View File

@ -0,0 +1,5 @@
{
"include": [
"./src/**/*"
]
}

View File

@ -1,69 +1,67 @@
<template> <template>
<div class="hello"> <div class="hello">
<h1>{{ msg }}</h1> <h1>{{ msg }}</h1>
<p> <p>
Check me out, BOY! Check me out, BOY!!!
</p> </p>
<n-button type="primary" @click="showModal = true">Open Modal</n-button>
<n-button type="primary" @click="showModal = true">Start Me up</n-button> <n-modal
<n-modal v-model:show="showModal"
v-model:show="showModal" :mask-closable="false"
:mask-closable="false" preset="dialog"
preset="dialog" title="Dialog"
title="Dialog" content="Are you sure?"
content="Are you sure?" positive-text="Confirm"
positive-text="Confirm" @positive-click="onPositiveClick"
@positive-click="onPositiveClick" @negative-click="onNegativeClick"
@negative-click="onNegativeClick" negative-text="Cancel"
negative-text="Cancel" />
/>
</div> </div>
</template> </template>
<script> <script>
import { useMessage } from 'naive-ui' import { useMessage } from 'naive-ui'
export default { export default {
name: "HelloWorld", name: 'HelloWorld',
props: { props: {
msg: String, msg: String,
}, },
data() { data() {
return { return {
message: useMessage(), message: useMessage(),
showModal: false showModal: false
} }
}, },
methods: { methods: {
onPositiveClick () { onPositiveClick () {
this.message.success('Submit') this.message.success('Submit')
this.showModal = false this.showModal = false
}, },
onNegativeClick () { onNegativeClick () {
this.message.success('Cancel') this.message.success('Cancel')
this.showModalRef = false this.showModalRef = false
} }
}
} }
};
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss"> <style scoped lang="scss">
h3 { h3 {
margin: 40px 0 0; margin: 40px 0 0;
} }
ul { ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
} }
li { li {
display: inline-block; display: inline-block;
margin: 0 10px; margin: 0 10px;
} }
a { a {
color: #42b983; color: #42b983;
} }
</style> </style>