提交 7b04fb8d 编写于 作者: M m0_63113719

Tue Nov 21 12:03:00 CST 2023 inscode

上级 7a093d7e
run = "npm i && npm run dev" run = "npm i && npm run dev"
language = "node"
[deployment] [deployment]
build = "npm i && npm run build" build = "npm i && npm run build"
...@@ -8,3 +9,6 @@ run = "npm run preview" ...@@ -8,3 +9,6 @@ run = "npm run preview"
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}" PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config" XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
[debugger]
program = "main.js"
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
}, },
"dependencies": { "dependencies": {
"guess": "^1.0.2", "guess": "^1.0.2",
"vue": "^3.2.37" "vue": "^3.2.37",
"vue-esign": "^1.1.4"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^3.0.1", "@vitejs/plugin-vue": "^3.0.1",
......
<script setup> <script>
import HelloWorld from './components/HelloWorld.vue' import vueEsign from 'vue-esign'
import TheWelcome from './components/TheWelcome.vue' export default {
components: {vueEsign},
data() {
return {
imgUrl: ''
}
},
methods: {
confirm() {
this.$refs.esign.generate().then(res => {
this.imgUrl = res
console.log(res)
}).catch(() => {
alert('请签名!')
})
}
}
}
</script> </script>
<template> <template>
<header> <div>
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" /> <button @click="confirm">确认</button>
<button style="margin-left: 10px;">清除</button>
<div class="wrapper"> <vueEsign ref="esign" style="border: 1px solid blue;" width="500" height="200" />
<HelloWorld msg="You did it!" /> <img v-if="imgUrl" :src="imgUrl" width="500" height="200" alt="">
</div> </div>
</header>
<main>
<TheWelcome />
</main>
</template> </template>
<style scoped> <style scoped>
header { button{
line-height: 1.5; width: 52px;
height: 23px;
} }
.logo {
display: block;
margin: 0 auto 2rem;
}
@media (min-width: 1024px) { @media (min-width: 1024px) {
header { header {
display: flex; display: flex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册