You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1005 B
Vue
63 lines
1005 B
Vue
<template>
|
|
<div>
|
|
<div class="title">
|
|
<span contenteditable="true" @blur="edit('title', $event)">
|
|
{{ data.title }}
|
|
</span>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<div class="value">
|
|
<span contenteditable="true" @blur="edit('value', $event)">
|
|
{{ data.value }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "El1",
|
|
props: ['data'],
|
|
data() {
|
|
return {};
|
|
},
|
|
mounted() {
|
|
|
|
},
|
|
methods: {
|
|
edit(key, e) {
|
|
this.$props.data[key] = e.target.innerText
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
|
|
.title {
|
|
margin-top: 5vw;
|
|
width: 100%;
|
|
text-align: center;
|
|
font-size: 1.9vw;
|
|
letter-spacing: 2px;
|
|
font-weight: 600;
|
|
color: #000;
|
|
}
|
|
|
|
.divider {
|
|
width: 4vw;
|
|
height: 4px;
|
|
background: #3372FE;
|
|
border-radius: 999px;
|
|
margin: 10px auto;
|
|
}
|
|
|
|
.value {
|
|
width: 62vw;
|
|
margin: 2vw auto 4vw auto;
|
|
text-align: left;
|
|
font-size: 1vw;
|
|
line-height: 2vw;
|
|
letter-spacing: 0.1vw;
|
|
color: #000;
|
|
text-indent: 2em;
|
|
}
|
|
</style> |