9.18 上午课堂提交
This commit is contained in:
parent
896fff6ed9
commit
025d2d289c
|
@ -0,0 +1 @@
|
|||
/Vue/Vue001/node_modules
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "vue3_cli_default",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.2.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^1.6.0",
|
||||
"@vue/compiler-sfc": "^3.2.6",
|
||||
"vite": "^2.5.2"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,44 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
const msg = ref('hello world...')
|
||||
const num = ref(17)
|
||||
function myclick(){
|
||||
if(mycolor.value == 'red'){
|
||||
mycolor.value = 'blue'
|
||||
}else{
|
||||
mycolor.value = 'red'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const username = ref('')
|
||||
const password = ref('')
|
||||
function login(){
|
||||
if(usernaem.value == 'admin' && password.value == '123456'){
|
||||
alert('成功')
|
||||
}else{
|
||||
alert('失败')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>{{msg.toLocaleUpperCase()}}</div>
|
||||
<div>{{num *18080}}</div>
|
||||
<button @click="myclick">点击11</button>
|
||||
<div class='red'>test</div>
|
||||
<div>{{username}}</div>
|
||||
<input type='text' v-model="username"/><br/>
|
||||
<input type='text' v-model="password"/><br/>
|
||||
<button @click="login">登录</button>
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.red{
|
||||
width:100px;
|
||||
height:100px;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -0,0 +1,38 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps({
|
||||
msg: String
|
||||
})
|
||||
|
||||
const count = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<p>
|
||||
Welcome:
|
||||
<a href="https://hx.dcloud.net.cn/" target="_blank">HBuilderX</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://vitejs.dev/guide/features.html" target="_blank">
|
||||
Vite Documentation
|
||||
</a>
|
||||
|
|
||||
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
|
||||
</p>
|
||||
|
||||
<button type="button" @click="count++">count is: {{ count }}</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test hot module replacement.
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,4 @@
|
|||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
createApp(App).mount('#app')
|
|
@ -0,0 +1,7 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()]
|
||||
})
|
|
@ -0,0 +1,22 @@
|
|||
package com.zhangzihao.springboot.springboot.Controllor;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class FileController {
|
||||
@RequestMapping
|
||||
public String index(){
|
||||
return "index";
|
||||
}
|
||||
@RequestMapping("upload")
|
||||
public String upload(MultipartFile file) throws IOException {
|
||||
File file1 = new File(pathname: "D:/data/");
|
||||
String fileName=file.getOriginalFilename();
|
||||
String filename;
|
||||
file.transferTo(new File(file1,filename));
|
||||
return "loginsuccess.html";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>文件上传</h1>
|
||||
<form action="/upload" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<input type="submit" value="上传">
|
||||
</form>
|
||||
</input>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue