提交 06b6f1f6 编写于 作者: ibizdev's avatar ibizdev

tony001 发布系统代码 [TrainSys,网页端]

上级 9ef2c626
......@@ -154,7 +154,7 @@
"getPSPanelItems" : [ {
"caption" : "文本",
"contentType" : "HTML",
"htmlContent" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&lt;head&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&lt;/head&gt;</div>\n<br />\n<div>&lt;body&gt; &lt;!-- 按钮,带有点击事件 --&gt; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = { bookname: '${data.bookname}', updatedate: '${data.bookname}' }; console.log('data', data.bookname);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo'); if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) { event.preventDefault(); }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault(); const data = event.dataTransfer.getData('text/plain'); const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&lt;/body&gt;</div>\n<br />\n<div>&lt;/html&gt;</div>\n</div>",
"htmlContent" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&nbsp; &nbsp; &lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;head&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 300px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: auto;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&nbsp; &nbsp; &lt;/head&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;body&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{data.bookname}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{data.updatedate}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/div&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookname: '{{data.bookname}}',</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updatedate: '{{data.updatedate}}'</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; };</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const data = event.dataTransfer.getData('text/plain');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&nbsp; &nbsp; &lt;/body&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;/html&gt;</div>\n</div>",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text",
......@@ -163,7 +163,7 @@
"layout" : "FLEX"
},
"getPSRawItem" : {
"content" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&lt;head&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&lt;/head&gt;</div>\n<br />\n<div>&lt;body&gt; &lt;!-- 按钮,带有点击事件 --&gt; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = { bookname: '${data.bookname}', updatedate: '${data.bookname}' }; console.log('data', data.bookname);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo'); if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) { event.preventDefault(); }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault(); const data = event.dataTransfer.getData('text/plain'); const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&lt;/body&gt;</div>\n<br />\n<div>&lt;/html&gt;</div>\n</div>",
"content" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&nbsp; &nbsp; &lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;head&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 300px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: auto;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&nbsp; &nbsp; &lt;/head&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;body&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{data.bookname}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{data.updatedate}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/div&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookname: '{{data.bookname}}',</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updatedate: '{{data.updatedate}}'</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; };</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const data = event.dataTransfer.getData('text/plain');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&nbsp; &nbsp; &lt;/body&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;/html&gt;</div>\n</div>",
"contentType" : "HTML",
"name" : "static_text",
"predefinedType" : "HTML_PREVIEW"
......
......@@ -153,7 +153,7 @@
"getPSPanelItems" : [ {
"caption" : "文本",
"contentType" : "HTML",
"htmlContent" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&lt;head&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&lt;/head&gt;</div>\n<br />\n<div>&lt;body&gt; &lt;!-- 按钮,带有点击事件 --&gt; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = { bookname: '${data.bookname}', updatedate: '${data.bookname}' }; console.log('data', data.bookname);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo'); if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) { event.preventDefault(); }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault(); const data = event.dataTransfer.getData('text/plain'); const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&lt;/body&gt;</div>\n<br />\n<div>&lt;/html&gt;</div>\n</div>",
"htmlContent" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&nbsp; &nbsp; &lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;head&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 300px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: auto;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&nbsp; &nbsp; &lt;/head&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;body&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{data.bookname}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{data.updatedate}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/div&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookname: '{{data.bookname}}',</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updatedate: '{{data.updatedate}}'</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; };</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const data = event.dataTransfer.getData('text/plain');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&nbsp; &nbsp; &lt;/body&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;/html&gt;</div>\n</div>",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text",
......@@ -162,7 +162,7 @@
"layout" : "FLEX"
},
"getPSRawItem" : {
"content" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&lt;head&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&lt;/head&gt;</div>\n<br />\n<div>&lt;body&gt; &lt;!-- 按钮,带有点击事件 --&gt; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:${data.bookname}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = { bookname: '${data.bookname}', updatedate: '${data.bookname}' }; console.log('data', data.bookname);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo'); if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) { event.preventDefault(); }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault(); const data = event.dataTransfer.getData('text/plain'); const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&lt;/body&gt;</div>\n<br />\n<div>&lt;/html&gt;</div>\n</div>",
"content" : "<div>\n<div>&lt;!DOCTYPE html&gt;</div>\n<div>&nbsp; &nbsp; &lt;html lang=\"en\"&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;head&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta charset=\"UTF-8\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;title&gt;HTML Template with Features&lt;/title&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;style&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; /* 外部样式 */</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 10px 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #007BFF;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color: white;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: none;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: pointer;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transition: background-color 0.3s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; button:hover {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #0056b3;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; .book-info {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border: 1px solid #ccc;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 300px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: auto;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin-top: 20px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius: 5px;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; animation: fadeIn 1s ease;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; @keyframes fadeIn {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 0;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; opacity: 1;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/style&gt;</div>\n<div>&nbsp; &nbsp; &lt;/head&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;body&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;button id=\"myButton\" onclick=\"handleClick()\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; ondrop=\"drop(event)\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{data.bookname}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{data.updatedate}}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/div&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &lt;script&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; const data = {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookname: '{{data.bookname}}',</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updatedate: '{{data.updatedate}}'</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; };</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 处理按钮点击事件</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function handleClick() {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 获取书籍信息元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const bookInfo = document.getElementById('bookInfo');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (bookInfo) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除元素</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bookInfo.remove();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽开始事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragStart(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.dataTransfer.setData('text/plain', event.target.id);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 添加内联样式,改变透明度</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.style.opacity = '0.5';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽经过事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function dragOver(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<br />\n<div>&nbsp; &nbsp; &nbsp; &nbsp; // 拖拽放下事件处理函数</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; function drop(event) {</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.preventDefault();</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const data = event.dataTransfer.getData('text/plain');</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const draggedElement = document.getElementById(data);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 移除内联样式</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draggedElement.style.opacity = '1';</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 将拖拽元素移动到新位置</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.target.appendChild(draggedElement);</div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;/script&gt;</div>\n<div>&nbsp; &nbsp; &lt;/body&gt;</div>\n<br />\n<div>&nbsp; &nbsp; &lt;/html&gt;</div>\n</div>",
"contentType" : "HTML",
"name" : "static_text",
"predefinedType" : "HTML_PREVIEW"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册