Open w934423231 opened 3 years ago
this.$nextTick(() => {
// query bottom button
const sButton = document.querySelector('div[data-direction="s"]');
// insert Html
sButton.innerHTML = `<div class="double">双击修改文字<div>`;
const effect=this.doSomething;
// query inserted and addEventListener
document.querySelector(".double").addEventListener( "touchend", effect );
});
.double {
width: 200px;
text-align: center;
height: 60px;
line-height: 60px;
border-radius: 10px;
position: absolute;
bottom: -70px;
background: rgba(#000, 0.8);
color: #fff;
left: 50%;
transform: translateX(-50%);
font-size: 0.8rem;
}
ables: { name: "mouseTest", props: {}, events: {}, render(moveable, React) { const CustomElement = moveable.useCSS( "div",
{ position: absolute; }); // Add key (required) // Add class prefix moveable-(required) return moveable.createElement("div", {}, "lietu"); }, mouseEnter() { console.log("ENTER"); }, mouseLeave() { console.log("LEAVE"); } },
这是我在 vue data中定义的组件数据