提交 0d85a944 编写于 作者: ibizdev's avatar ibizdev

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

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