some test code and playing around

This commit is contained in:
vabene1111
2021-01-11 15:04:35 +01:00
parent 5bb20bd479
commit cb913f6cea
13 changed files with 64 additions and 3712 deletions

View File

@@ -1,24 +0,0 @@
# vue
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -33,7 +33,9 @@
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
"rules": {
"no-unused-vars": "off"
}
},
"browserslist": [
"> 1%",

View File

@@ -1,5 +1,5 @@
<template>
<HelloWorld msg="Welcome to Your Vue.js App"/>
<HelloWorld msg="Test"/>
</template>
<script>

View File

@@ -1,15 +1,25 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
{{ text }}
</div>
</template>
<script>
import {myCustomTestFunction} from "@/utils";
export default {
name: 'HelloWorld',
data() {
return {
text: ''
}
},
props: {
msg: String
},
mounted() {
this.text = myCustomTestFunction("Neuer Text")
}
}
</script>

View File

@@ -0,0 +1,14 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
</div>
</template>
<script>
export default {
name: 'TestComponent',
props: {
msg: String
}
}
</script>

3
vue/src/test.js Normal file
View File

@@ -0,0 +1,3 @@
export function myOtherTestFunction(n) {
return n
}

9
vue/src/utils.js Normal file
View File

@@ -0,0 +1,9 @@
export {myOtherTestFunction} from './test.js'
import TestComponent from './components/TestComponent'
export function myCustomTestFunction(x) {
console.log(x)
return x
}

View File

@@ -5,6 +5,10 @@ const pages = {
entry: './src/main.js',
chunks: ['chunk-vendors']
},
'util': {
entry: './src/utils.js',
chunks: ['chunk-vendors']
},
}
module.exports = {

View File

@@ -1 +1 @@
{"status":"done","chunks":{"chunk-vendors":[{"name":"js/chunk-vendors.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\chunk-vendors.js"}],"vue_app_01":[{"name":"css/vue_app_01.css","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\css\\vue_app_01.css"},{"name":"js/vue_app_01.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\vue_app_01.js"}]}}
{"status":"done","publicPath":"http://localhost:8080/","chunks":{"chunk-vendors":[{"name":"js/chunk-vendors.js","publicPath":"http://localhost:8080/js/chunk-vendors.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\chunk-vendors.js"}],"util":[{"name":"js/util.js","publicPath":"http://localhost:8080/js/util.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\util.js"}],"vue_app_01":[{"name":"js/vue_app_01.js","publicPath":"http://localhost:8080/js/vue_app_01.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\vue_app_01.js"},{"name":"vue_app_01.3d20274fdb25a102c86d.hot-update.js","publicPath":"http://localhost:8080/vue_app_01.3d20274fdb25a102c86d.hot-update.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\vue_app_01.3d20274fdb25a102c86d.hot-update.js"}]},"error":"ModuleError","message":"Module Error (from ./node_modules/eslint-loader/index.js):\n\nF:\\Developement\\Django\\recipes\\vue\\src\\components\\HelloWorld.vue\n 17:5 error Unexpected mutation of \"msg\" prop vue/no-mutating-props\n\n✖ 1 problem (1 error, 0 warnings)\n"}