提交 3429236c 编写于 作者: ibizdev's avatar ibizdev

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

上级 b60fac04
......@@ -149,8 +149,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; &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; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &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<br />\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<br /><br /><br />\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<br />\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<div>&lt;/html&gt;</div>\n</div>",
"contentType" : "RAW",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text1",
......@@ -159,16 +158,17 @@
"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; &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; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &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<br />\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<br /><br /><br />\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<br />\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<div>&lt;/html&gt;</div>\n</div>",
"contentType" : "HTML",
"caption" : "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>HTML Template with Features</title>\n <style>\n /* 外部样式 */\n button {\n padding: 10px 20px;\n background-color: #007BFF;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n\n button:hover {\n background-color: #0056b3;\n }\n\n .book-info {\n border: 1px solid #ccc;\n width: 300px;\n height: auto;\n padding: 20px;\n margin-top: 20px;\n border-radius: 5px;\n animation: fadeIn 1s ease;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n </style>\n</head>\n\n<body>\n <!-- 按钮,带有点击事件 -->\n <button id=\"myButton\" onclick=\"handleClick()\">test</button>\n <button id=\"myButton\" onclick=\"handleClick2()\">log</button>\n <!-- 书籍信息容器 -->\n <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"\n ondrop=\"drop(event)\">\n <div>名称:{{data.bookname}}</div>\n <div>更新时间:{{data.updatedate}}</div>\n </div>\n <div>\n <div>123</div>\n <div>456</div>\n <div>789</div>\n </div>\n <script>\n // 模拟数据\n const data = {\n test: 'test1',\n bookname: 'name外部值为-{{data.bookname}}',\n updatedate: '{{data.updatedate}}'\n };\n // 处理按钮点击事件\n function handleClick() {\n // 获取书籍信息元素\n const bookInfo = document.getElementById('bookInfo');\n if (bookInfo) {\n // 移除元素\n bookInfo.remove();\n }\n }\n // 处理按钮点击事件\n function handleClick2() {\n console.log('打印{data.bookname}', '测试内容{data.bookname}');\n console.log('内部data数据', data);\n }\n // 拖拽开始事件处理函数\n function dragStart(event) {\n event.dataTransfer.setData('text/plain', event.target.id);\n // 添加内联样式,改变透明度\n event.target.style.opacity = '0.5';\n }\n // 拖拽经过事件处理函数\n function dragOver(event) {\n event.preventDefault();\n }\n // 拖拽放下事件处理函数\n function drop(event) {\n event.preventDefault();\n const data = event.dataTransfer.getData('text/plain');\n const draggedElement = document.getElementById(data);\n // 移除内联样式\n draggedElement.style.opacity = '1';\n // 将拖拽元素移动到新位置\n event.target.appendChild(draggedElement);\n }\n </script>\n</body>\n\n</html>",
"contentType" : "RAW",
"name" : "static_text1",
"predefinedType" : "HTML_PREVIEW"
"predefinedType" : "HTML_PREVIEW",
"renderMode" : "TEXT"
},
"rawContent" : "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>HTML Template with Features</title>\n <style>\n /* 外部样式 */\n button {\n padding: 10px 20px;\n background-color: #007BFF;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n\n button:hover {\n background-color: #0056b3;\n }\n\n .book-info {\n border: 1px solid #ccc;\n width: 300px;\n height: auto;\n padding: 20px;\n margin-top: 20px;\n border-radius: 5px;\n animation: fadeIn 1s ease;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n </style>\n</head>\n\n<body>\n <!-- 按钮,带有点击事件 -->\n <button id=\"myButton\" onclick=\"handleClick()\">test</button>\n <button id=\"myButton\" onclick=\"handleClick2()\">log</button>\n <!-- 书籍信息容器 -->\n <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"\n ondrop=\"drop(event)\">\n <div>名称:{{data.bookname}}</div>\n <div>更新时间:{{data.updatedate}}</div>\n </div>\n <div>\n <div>123</div>\n <div>456</div>\n <div>789</div>\n </div>\n <script>\n // 模拟数据\n const data = {\n test: 'test1',\n bookname: 'name外部值为-{{data.bookname}}',\n updatedate: '{{data.updatedate}}'\n };\n // 处理按钮点击事件\n function handleClick() {\n // 获取书籍信息元素\n const bookInfo = document.getElementById('bookInfo');\n if (bookInfo) {\n // 移除元素\n bookInfo.remove();\n }\n }\n // 处理按钮点击事件\n function handleClick2() {\n console.log('打印{data.bookname}', '测试内容{data.bookname}');\n console.log('内部data数据', data);\n }\n // 拖拽开始事件处理函数\n function dragStart(event) {\n event.dataTransfer.setData('text/plain', event.target.id);\n // 添加内联样式,改变透明度\n event.target.style.opacity = '0.5';\n }\n // 拖拽经过事件处理函数\n function dragOver(event) {\n event.preventDefault();\n }\n // 拖拽放下事件处理函数\n function drop(event) {\n event.preventDefault();\n const data = event.dataTransfer.getData('text/plain');\n const draggedElement = document.getElementById(data);\n // 移除内联样式\n draggedElement.style.opacity = '1';\n // 将拖拽元素移动到新位置\n event.target.appendChild(draggedElement);\n }\n </script>\n</body>\n\n</html>",
"showCaption" : true
}, {
"caption" : "文本",
"contentType" : "HTML",
"htmlContent" : "<div>\n<div>&nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;button id=\"myButton\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{ data.bookname }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{ data.updatedate }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n</div>",
"contentType" : "RAW",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text",
......@@ -177,14 +177,50 @@
"layout" : "FLEX"
},
"getPSRawItem" : {
"content" : "<div>\n<div>&nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;button id=\"myButton\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{ data.bookname }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{ data.updatedate }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n</div>",
"contentType" : "HTML",
"caption" : "    <!-- 按钮,带有点击事件 -->\n    <button id=\"myButton\">test</button>\n    <!-- 书籍信息容器 -->\n    <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\">\n      <div>名称:{{ data.bookname }}</div>\n      <div>更新时间:{{ data.updatedate }}</div>\n    </div>\n    <div>\n      <div>123</div>\n      <div>456</div>\n      <div>789</div>\n    </div>",
"contentType" : "RAW",
"name" : "static_text",
"predefinedType" : "HTML_PREVIEW"
"predefinedType" : "HTML_PREVIEW",
"renderMode" : "TEXT"
},
"getPSSysImage" : {
"cssClass" : "arrow-down-circle"
},
"rawContent" : "    <!-- 按钮,带有点击事件 -->\n    <button id=\"myButton\">test</button>\n    <!-- 书籍信息容器 -->\n    <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\">\n      <div>名称:{{ data.bookname }}</div>\n      <div>更新时间:{{ data.updatedate }}</div>\n    </div>\n    <div>\n      <div>123</div>\n      <div>456</div>\n      <div>789</div>\n    </div>",
"showCaption" : true
}, {
"caption" : "通过html设置",
"itemStyle" : "DEFAULT",
"itemType" : "CONTAINER",
"name" : "container_group",
"getPSLayout" : {
"layout" : "FLEX"
},
"getPSLayoutPos" : {
"grow" : -1,
"layout" : "FLEX"
},
"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; &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>",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text2",
"getPSLayoutPos" : {
"grow" : -1,
"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; &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"
},
"showCaption" : true
} ],
"predefinedType" : "CONTAINER_GROUP",
"titleBarCloseMode" : 2,
"showCaption" : true
} ],
"predefinedType" : "CONTAINER_SINGLEDATA"
......
......@@ -148,8 +148,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; &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; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &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<br />\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<br /><br /><br />\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<br />\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<div>&lt;/html&gt;</div>\n</div>",
"contentType" : "RAW",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text1",
......@@ -158,16 +157,17 @@
"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; &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; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &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<br />\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<br /><br /><br />\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<br />\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<div>&lt;/html&gt;</div>\n</div>",
"contentType" : "HTML",
"caption" : "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>HTML Template with Features</title>\n <style>\n /* 外部样式 */\n button {\n padding: 10px 20px;\n background-color: #007BFF;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n\n button:hover {\n background-color: #0056b3;\n }\n\n .book-info {\n border: 1px solid #ccc;\n width: 300px;\n height: auto;\n padding: 20px;\n margin-top: 20px;\n border-radius: 5px;\n animation: fadeIn 1s ease;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n </style>\n</head>\n\n<body>\n <!-- 按钮,带有点击事件 -->\n <button id=\"myButton\" onclick=\"handleClick()\">test</button>\n <button id=\"myButton\" onclick=\"handleClick2()\">log</button>\n <!-- 书籍信息容器 -->\n <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"\n ondrop=\"drop(event)\">\n <div>名称:{{data.bookname}}</div>\n <div>更新时间:{{data.updatedate}}</div>\n </div>\n <div>\n <div>123</div>\n <div>456</div>\n <div>789</div>\n </div>\n <script>\n // 模拟数据\n const data = {\n test: 'test1',\n bookname: 'name外部值为-{{data.bookname}}',\n updatedate: '{{data.updatedate}}'\n };\n // 处理按钮点击事件\n function handleClick() {\n // 获取书籍信息元素\n const bookInfo = document.getElementById('bookInfo');\n if (bookInfo) {\n // 移除元素\n bookInfo.remove();\n }\n }\n // 处理按钮点击事件\n function handleClick2() {\n console.log('打印{data.bookname}', '测试内容{data.bookname}');\n console.log('内部data数据', data);\n }\n // 拖拽开始事件处理函数\n function dragStart(event) {\n event.dataTransfer.setData('text/plain', event.target.id);\n // 添加内联样式,改变透明度\n event.target.style.opacity = '0.5';\n }\n // 拖拽经过事件处理函数\n function dragOver(event) {\n event.preventDefault();\n }\n // 拖拽放下事件处理函数\n function drop(event) {\n event.preventDefault();\n const data = event.dataTransfer.getData('text/plain');\n const draggedElement = document.getElementById(data);\n // 移除内联样式\n draggedElement.style.opacity = '1';\n // 将拖拽元素移动到新位置\n event.target.appendChild(draggedElement);\n }\n </script>\n</body>\n\n</html>",
"contentType" : "RAW",
"name" : "static_text1",
"predefinedType" : "HTML_PREVIEW"
"predefinedType" : "HTML_PREVIEW",
"renderMode" : "TEXT"
},
"rawContent" : "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>HTML Template with Features</title>\n <style>\n /* 外部样式 */\n button {\n padding: 10px 20px;\n background-color: #007BFF;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n\n button:hover {\n background-color: #0056b3;\n }\n\n .book-info {\n border: 1px solid #ccc;\n width: 300px;\n height: auto;\n padding: 20px;\n margin-top: 20px;\n border-radius: 5px;\n animation: fadeIn 1s ease;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n </style>\n</head>\n\n<body>\n <!-- 按钮,带有点击事件 -->\n <button id=\"myButton\" onclick=\"handleClick()\">test</button>\n <button id=\"myButton\" onclick=\"handleClick2()\">log</button>\n <!-- 书籍信息容器 -->\n <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"\n ondrop=\"drop(event)\">\n <div>名称:{{data.bookname}}</div>\n <div>更新时间:{{data.updatedate}}</div>\n </div>\n <div>\n <div>123</div>\n <div>456</div>\n <div>789</div>\n </div>\n <script>\n // 模拟数据\n const data = {\n test: 'test1',\n bookname: 'name外部值为-{{data.bookname}}',\n updatedate: '{{data.updatedate}}'\n };\n // 处理按钮点击事件\n function handleClick() {\n // 获取书籍信息元素\n const bookInfo = document.getElementById('bookInfo');\n if (bookInfo) {\n // 移除元素\n bookInfo.remove();\n }\n }\n // 处理按钮点击事件\n function handleClick2() {\n console.log('打印{data.bookname}', '测试内容{data.bookname}');\n console.log('内部data数据', data);\n }\n // 拖拽开始事件处理函数\n function dragStart(event) {\n event.dataTransfer.setData('text/plain', event.target.id);\n // 添加内联样式,改变透明度\n event.target.style.opacity = '0.5';\n }\n // 拖拽经过事件处理函数\n function dragOver(event) {\n event.preventDefault();\n }\n // 拖拽放下事件处理函数\n function drop(event) {\n event.preventDefault();\n const data = event.dataTransfer.getData('text/plain');\n const draggedElement = document.getElementById(data);\n // 移除内联样式\n draggedElement.style.opacity = '1';\n // 将拖拽元素移动到新位置\n event.target.appendChild(draggedElement);\n }\n </script>\n</body>\n\n</html>",
"showCaption" : true
}, {
"caption" : "文本",
"contentType" : "HTML",
"htmlContent" : "<div>\n<div>&nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;button id=\"myButton\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{ data.bookname }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{ data.updatedate }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n</div>",
"contentType" : "RAW",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text",
......@@ -176,14 +176,50 @@
"layout" : "FLEX"
},
"getPSRawItem" : {
"content" : "<div>\n<div>&nbsp; &nbsp; &lt;!-- 按钮,带有点击事件 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;button id=\"myButton\"&gt;test&lt;/button&gt;</div>\n<div>&nbsp; &nbsp; &lt;!-- 书籍信息容器 --&gt;</div>\n<div>&nbsp; &nbsp; &lt;div id=\"bookInfo\" class=\"book-info\" draggable=\"true\"&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;名称:{{ data.bookname }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;更新时间:{{ data.updatedate }}&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;123&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;456&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &nbsp; &lt;div&gt;789&lt;/div&gt;</div>\n<div>&nbsp; &nbsp; &lt;/div&gt;</div>\n</div>",
"contentType" : "HTML",
"caption" : "    <!-- 按钮,带有点击事件 -->\n    <button id=\"myButton\">test</button>\n    <!-- 书籍信息容器 -->\n    <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\">\n      <div>名称:{{ data.bookname }}</div>\n      <div>更新时间:{{ data.updatedate }}</div>\n    </div>\n    <div>\n      <div>123</div>\n      <div>456</div>\n      <div>789</div>\n    </div>",
"contentType" : "RAW",
"name" : "static_text",
"predefinedType" : "HTML_PREVIEW"
"predefinedType" : "HTML_PREVIEW",
"renderMode" : "TEXT"
},
"getPSSysImage" : {
"cssClass" : "arrow-down-circle"
},
"rawContent" : "    <!-- 按钮,带有点击事件 -->\n    <button id=\"myButton\">test</button>\n    <!-- 书籍信息容器 -->\n    <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\">\n      <div>名称:{{ data.bookname }}</div>\n      <div>更新时间:{{ data.updatedate }}</div>\n    </div>\n    <div>\n      <div>123</div>\n      <div>456</div>\n      <div>789</div>\n    </div>",
"showCaption" : true
}, {
"caption" : "通过html设置",
"itemStyle" : "DEFAULT",
"itemType" : "CONTAINER",
"name" : "container_group",
"getPSLayout" : {
"layout" : "FLEX"
},
"getPSLayoutPos" : {
"grow" : -1,
"layout" : "FLEX"
},
"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; &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>",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text2",
"getPSLayoutPos" : {
"grow" : -1,
"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; &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"
},
"showCaption" : true
} ],
"predefinedType" : "CONTAINER_GROUP",
"titleBarCloseMode" : 2,
"showCaption" : true
} ],
"predefinedType" : "CONTAINER_SINGLEDATA"
......
......@@ -113309,8 +113309,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; &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;script&gt;</div>\n<div>&nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; const data = {</div>\n<div>&nbsp; &nbsp; &nbsp; bookname: '{{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<br />\n<div>&nbsp; &nbsp; }</div>\n<br />\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<br /><br /><br />\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<br />\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" : "RAW",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text1",
......@@ -113319,16 +113318,17 @@
"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; &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;script&gt;</div>\n<div>&nbsp; &nbsp; // 模拟数据</div>\n<div>&nbsp; &nbsp; const data = {</div>\n<div>&nbsp; &nbsp; &nbsp; bookname: '{{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<br />\n<div>&nbsp; &nbsp; }</div>\n<br />\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<br /><br /><br />\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<br />\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",
"caption" : "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>HTML Template with Features</title>\n <style>\n /* 外部样式 */\n button {\n padding: 10px 20px;\n background-color: #007BFF;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n\n button:hover {\n background-color: #0056b3;\n }\n\n .book-info {\n border: 1px solid #ccc;\n width: 300px;\n height: auto;\n padding: 20px;\n margin-top: 20px;\n border-radius: 5px;\n animation: fadeIn 1s ease;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n </style>\n</head>\n\n<body>\n <!-- 按钮,带有点击事件 -->\n <button id=\"myButton\" onclick=\"handleClick()\">test</button>\n <button id=\"myButton\" onclick=\"handleClick2()\">log</button>\n <!-- 书籍信息容器 -->\n <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"\n ondrop=\"drop(event)\">\n <div>名称:{{data.bookname}}</div>\n <div>更新时间:{{data.updatedate}}</div>\n </div>\n <div>\n <div>123</div>\n <div>456</div>\n <div>789</div>\n </div>\n <script>\n // 模拟数据\n const data = {\n test: 'test1',\n bookname: 'name外部值为-{{data.bookname}}',\n updatedate: '{{data.updatedate}}'\n };\n // 处理按钮点击事件\n function handleClick() {\n // 获取书籍信息元素\n const bookInfo = document.getElementById('bookInfo');\n if (bookInfo) {\n // 移除元素\n bookInfo.remove();\n }\n }\n // 处理按钮点击事件\n function handleClick2() {\n console.log('打印{data.bookname}', '测试内容{data.bookname}');\n console.log('内部data数据', data);\n }\n // 拖拽开始事件处理函数\n function dragStart(event) {\n event.dataTransfer.setData('text/plain', event.target.id);\n // 添加内联样式,改变透明度\n event.target.style.opacity = '0.5';\n }\n // 拖拽经过事件处理函数\n function dragOver(event) {\n event.preventDefault();\n }\n // 拖拽放下事件处理函数\n function drop(event) {\n event.preventDefault();\n const data = event.dataTransfer.getData('text/plain');\n const draggedElement = document.getElementById(data);\n // 移除内联样式\n draggedElement.style.opacity = '1';\n // 将拖拽元素移动到新位置\n event.target.appendChild(draggedElement);\n }\n </script>\n</body>\n\n</html>",
"contentType" : "RAW",
"name" : "static_text1",
"predefinedType" : "HTML_PREVIEW"
"predefinedType" : "HTML_PREVIEW",
"renderMode" : "TEXT"
},
"rawContent" : "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>HTML Template with Features</title>\n <style>\n /* 外部样式 */\n button {\n padding: 10px 20px;\n background-color: #007BFF;\n color: white;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n\n button:hover {\n background-color: #0056b3;\n }\n\n .book-info {\n border: 1px solid #ccc;\n width: 300px;\n height: auto;\n padding: 20px;\n margin-top: 20px;\n border-radius: 5px;\n animation: fadeIn 1s ease;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n </style>\n</head>\n\n<body>\n <!-- 按钮,带有点击事件 -->\n <button id=\"myButton\" onclick=\"handleClick()\">test</button>\n <button id=\"myButton\" onclick=\"handleClick2()\">log</button>\n <!-- 书籍信息容器 -->\n <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\" ondragstart=\"dragStart(event)\" ondragover=\"dragOver(event)\"\n ondrop=\"drop(event)\">\n <div>名称:{{data.bookname}}</div>\n <div>更新时间:{{data.updatedate}}</div>\n </div>\n <div>\n <div>123</div>\n <div>456</div>\n <div>789</div>\n </div>\n <script>\n // 模拟数据\n const data = {\n test: 'test1',\n bookname: 'name外部值为-{{data.bookname}}',\n updatedate: '{{data.updatedate}}'\n };\n // 处理按钮点击事件\n function handleClick() {\n // 获取书籍信息元素\n const bookInfo = document.getElementById('bookInfo');\n if (bookInfo) {\n // 移除元素\n bookInfo.remove();\n }\n }\n // 处理按钮点击事件\n function handleClick2() {\n console.log('打印{data.bookname}', '测试内容{data.bookname}');\n console.log('内部data数据', data);\n }\n // 拖拽开始事件处理函数\n function dragStart(event) {\n event.dataTransfer.setData('text/plain', event.target.id);\n // 添加内联样式,改变透明度\n event.target.style.opacity = '0.5';\n }\n // 拖拽经过事件处理函数\n function dragOver(event) {\n event.preventDefault();\n }\n // 拖拽放下事件处理函数\n function drop(event) {\n event.preventDefault();\n const data = event.dataTransfer.getData('text/plain');\n const draggedElement = document.getElementById(data);\n // 移除内联样式\n draggedElement.style.opacity = '1';\n // 将拖拽元素移动到新位置\n event.target.appendChild(draggedElement);\n }\n </script>\n</body>\n\n</html>",
"showCaption" : true
}, {
"caption" : "文本",
"contentType" : "HTML",
"htmlContent" : "<div>\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;!-- 书籍信息容器 --&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<br />\n<div>&lt;/body&gt;</div>\n</div>",
"contentType" : "RAW",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text",
......@@ -113337,11 +113337,50 @@
"layout" : "FLEX"
},
"getPSRawItem" : {
"content" : "<div>\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;!-- 书籍信息容器 --&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<br />\n<div>&lt;/body&gt;</div>\n</div>",
"contentType" : "HTML",
"caption" : "    <!-- 按钮,带有点击事件 -->\n    <button id=\"myButton\">test</button>\n    <!-- 书籍信息容器 -->\n    <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\">\n      <div>名称:{{ data.bookname }}</div>\n      <div>更新时间:{{ data.updatedate }}</div>\n    </div>\n    <div>\n      <div>123</div>\n      <div>456</div>\n      <div>789</div>\n    </div>",
"contentType" : "RAW",
"name" : "static_text",
"predefinedType" : "HTML_PREVIEW"
"predefinedType" : "HTML_PREVIEW",
"renderMode" : "TEXT"
},
"getPSSysImage" : {
"cssClass" : "arrow-down-circle"
},
"rawContent" : "    <!-- 按钮,带有点击事件 -->\n    <button id=\"myButton\">test</button>\n    <!-- 书籍信息容器 -->\n    <div id=\"bookInfo\" class=\"book-info\" draggable=\"true\">\n      <div>名称:{{ data.bookname }}</div>\n      <div>更新时间:{{ data.updatedate }}</div>\n    </div>\n    <div>\n      <div>123</div>\n      <div>456</div>\n      <div>789</div>\n    </div>",
"showCaption" : true
}, {
"caption" : "通过html设置",
"itemStyle" : "DEFAULT",
"itemType" : "CONTAINER",
"name" : "container_group",
"getPSLayout" : {
"layout" : "FLEX"
},
"getPSLayoutPos" : {
"grow" : -1,
"layout" : "FLEX"
},
"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; &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>",
"itemStyle" : "DEFAULT",
"itemType" : "RAWITEM",
"name" : "static_text2",
"getPSLayoutPos" : {
"grow" : -1,
"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; &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"
},
"showCaption" : true
} ],
"predefinedType" : "CONTAINER_GROUP",
"titleBarCloseMode" : 2,
"showCaption" : true
} ],
"predefinedType" : "CONTAINER_SINGLEDATA"
......@@ -125230,7 +125269,7 @@
}, {
"actionType" : "UIACTION",
"buttonStyle" : "SUCCESS",
"caption" : "按钮",
"caption" : "成功按钮",
"itemStyle" : "DEFAULT",
"itemType" : "BUTTON",
"name" : "button_calluilogic4",
......@@ -125260,7 +125299,7 @@
"uIActionType" : "DEUIACTION",
"id" : "successButton@Test_aaa"
},
"tooltip" : "按钮",
"tooltip" : "成功按钮",
"uIActionTarget" : "NONE",
"showCaption" : true
} ]
......@@ -125432,9 +125471,9 @@
},
"getPSPanelItems" : [ {
"actionType" : "UIACTION",
"buttonStyle" : "PRIMARY",
"buttonStyle" : "INFO",
"caption" : "信息按钮",
"itemStyle" : "PRIMARY",
"itemStyle" : "DEFAULT",
"itemType" : "BUTTON",
"name" : "button_calluilogic3",
"getPSAppViewUIAction" : {
......@@ -126967,6 +127006,7 @@
"showCaption" : true
}, {
"actionType" : "FIUPDATE",
"caption" : "表单项更新",
"codeName" : "button8",
"detailStyle" : "DEFAULT",
"detailType" : "BUTTON",
......@@ -126982,6 +127022,7 @@
"colXS" : 8,
"layout" : "TABLE_24COL"
},
"tooltip" : "表单项更新",
"uIActionTarget" : "NONE",
"showCaption" : true
} ],
......@@ -127007,6 +127048,7 @@
"name" : "grouppanel2",
"getPSDEFormDetails" : [ {
"actionGroupExtractMode" : "ITEM",
"caption" : "按钮组",
"codeName" : "buttonlist1",
"detailStyle" : "DEFAULT",
"detailType" : "BUTTONLIST",
......@@ -127106,6 +127148,7 @@
"showCaption" : true
}, {
"actionGroupExtractMode" : "ITEMS",
"caption" : "按钮组",
"codeName" : "buttonlist2",
"detailStyle" : "DEFAULT",
"detailType" : "BUTTONLIST",
......@@ -127205,6 +127248,7 @@
"showCaption" : true
}, {
"actionGroupExtractMode" : "ITEMX",
"caption" : "按钮组",
"codeName" : "buttonlist3",
"detailStyle" : "DEFAULT",
"detailType" : "BUTTONLIST",
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册