{"id":7685,"date":"2026-08-31T10:41:23","date_gmt":"2026-08-31T02:41:23","guid":{"rendered":"https:\/\/www.hightopo.com\/blog\/?p=7685"},"modified":"2026-08-31T10:43:39","modified_gmt":"2026-08-31T02:43:39","slug":"%e4%b8%ad%e7%af%87%e3%83%bb%e8%bf%90%e7%ac%94%ef%bd%9c%e7%bb%9f%e4%b8%80-datamodel-%e5%ba%95%e5%ba%a7%ef%bc%8cht-ui-%e7%bb%84%e4%bb%b6%e4%b8%87%e7%89%a9%e5%90%8c%e6%ba%90","status":"publish","type":"post","link":"https:\/\/www.hightopo.com\/blog\/7685.html","title":{"rendered":"\u4e2d\u7bc7\u30fb\u8fd0\u7b14\uff5c\u7edf\u4e00 DataModel \u5e95\u5ea7\uff0cHT UI \u7ec4\u4ef6\u4e07\u7269\u540c\u6e90"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/01-2.webp\"><img loading=\"lazy\" width=\"1080\" height=\"1147\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/01-2.webp\" alt=\"\" class=\"wp-image-7690\"\/><\/a><\/figure><\/div>\n\n\n\n<p><a href=\"https:\/\/www.hightopo.com\/blog\/7678.html\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e0a\u4e00\u7bc7<\/a>\u8bb2\u4e86&nbsp;HT UI&nbsp;\u9009\u7528&nbsp;Canvas&nbsp;\u7ed8\u5236\u754c\u9762\u7684\u7f18\u7531\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e00\u7bc7\u6362\u4e2a\u89c6\u89d2\uff0c\u804a\u804a\u6846\u67b6\u7684\u7ec4\u4ef6\u50a8\u5907\u4e0e\u5e95\u5c42\u7edf\u4e00\u67b6\u6784\uff1a\u5185\u7f6e\u7ec4\u4ef6\u54c1\u7c7b\u662f\u5426\u5145\u8db3\uff0c\u7ec4\u4ef6\u7e41\u591a\u540e\u5982\u4f55\u4fdd\u6301\u89c4\u6574\uff0c\u89c4\u6574\u4e4b\u5916\u754c\u9762\u80fd\u5426\u5b8c\u6574\u5bfc\u51fa\u590d\u7528\u3002<\/p>\n\n\n\n<p>\u8bc4\u5224\u4e00\u5957\u7ed8\u56fe\u5de5\u5177\u7684\u529f\u5e95\uff0c\u4e0d\u5728\u4e8e\u80fd\u7ed8\u5236\u591a\u5c11\u5143\u7d20\uff0c\u800c\u5728\u4e8e\u4e07\u5343\u7ec4\u4ef6\u5171\u4eab\u540c\u4e00\u5957\u5e95\u5c42\u903b\u8f91\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"563\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-1024x563.png\" alt=\"\" class=\"wp-image-7686\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-1024x563.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-300x165.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-768x422.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-1536x844.png 1536w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-2048x1126.png 2048w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-660x363.png 660w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2><strong>01<\/strong> <strong>\u5148\u62a5\u4e2a\u83dc\u5355\uff0c\u6cbb\u4e00\u6cbb\u9009\u62e9\u56f0\u96be<\/strong><\/h2>\n\n\n\n<p>\u6280\u672f\u9009\u578b\u7684\u7b2c\u4e00\u9053\u96be\u5173\uff0c\u5f80\u5f80\u4e0d\u662f\u5e93\u597d\u4e0d\u597d\u7528\uff0c\u800c\u662f\u7ec4\u4ef6\u8986\u76d6\u662f\u5426\u9f50\u5168\u3002<\/p>\n\n\n\n<p>\u5174\u51b2\u51b2\u9009\u5b9a\u4e00\u5957\u7ec4\u4ef6\u5e93\uff0c\u5f00\u53d1\u4e2d\u9014\u624d\u53d1\u73b0\u7f3a\u5c11\u65e5\u671f\u9009\u62e9\u5668\u3001\u6811\u8868\u683c\u3001\u5c5e\u6027\u9762\u677f\uff0c\u4e8e\u662f\u5f00\u59cb\u6ee1\u4e16\u754c\u627e\u7b2c\u4e09\u65b9\u7ec4\u4ef6\u62fc\u51d1\u3001\u53cd\u590d\u8e29\u5751\uff0c\u751a\u81f3\u4fee\u6539\u6e90\u7801 \u2014\u2014 \u505a\u8fc7\u9879\u76ee\u7684\u4eba\u90fd\u6df1\u6709\u4f53\u4f1a\u3002<\/p>\n\n\n\n<p>\u591a\u65b9\u62fc\u51d1\u51fa\u7684\u754c\u9762\u4f1a\u9020\u6210\u4ea4\u4e92\u3001\u89c6\u89c9\u6807\u51c6\u4e0d\u7edf\u4e00\uff0c\u9875\u9762\u6574\u4f53\u5272\u88c2\u6742\u4e71\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u644a\u5f00&nbsp;HT UI&nbsp;\u7ec4\u4ef6\u6e05\u5355\uff0c\u7f57\u5217<strong>\u6570\u5341\u79cd\u7ec4\u4ef6<\/strong>\uff0c\u8986\u76d6\u7edd\u5927\u591a\u6570\u4e1a\u52a1\u573a\u666f\uff1a<\/p>\n\n\n\n<ul><li><strong>\u57fa\u7840\u63a7\u4ef6<\/strong><br>\u6309\u94ae\u3001\u5f00\u5173\u3001\u590d\u9009\u6846\u3001\u5355\u9009\u6846\u3001\u6587\u672c\u8f93\u5165\u6846\u3001\u6587\u672c\u57df\u3001\u4e0b\u62c9\u9009\u62e9\u5668\u3001\u53d6\u8272\u5668\u3001\u65e5\u671f\u65f6\u95f4\u9009\u62e9\u5668\u3001\u6ed1\u5757\u3001\u8fdb\u5ea6\u6761\u3001\u8bc4\u5206\u7ec4\u4ef6\u2026\u2026<\/li><li><strong>\u6570\u636e\u5c55\u793a<\/strong><br>\u666e\u901a\u8868\u683c\u3001\u6811\u5f62\u8868\u683c\u3001\u7eaf\u6811\u5f62\u7ec4\u4ef6\u3001\u5217\u8868\u3001\u5c5e\u6027\u9762\u677f\u3001\u7f51\u683c\u3001\u65f6\u95f4\u8f74\u3001\u8f6e\u64ad\u3001\u6807\u7b7e\u3001\u6b65\u9aa4\u6761\u2026\u2026<\/li><li><strong>\u5bb9\u5668\u4e0e\u5bfc\u822a<\/strong><br>\u666e\u901a\u9762\u677f\u3001\u5f39\u7a97\u3001\u62bd\u5c49\u3001\u591a\u6807\u7b7e\u9875\u3001\u4fa7\u8fb9\u680f\u3001\u53f3\u952e\u83dc\u5355\u3001\u6c14\u6ce1\u6d6e\u7a97\u2026\u2026<\/li><li><strong>\u5e03\u5c40\u5bb6\u65cf<\/strong><br>\u8fb9\u6846\u5e03\u5c40\u3001\u6a2a\u5411 \/ \u7eb5\u5411\u5e03\u5c40\u3001\u7f51\u683c\u5e03\u5c40\u3001\u76f8\u5bf9\u5e03\u5c40\u3001\u6d41\u5f0f\u5e03\u5c40\u3001\u591a\u5217\u5e03\u5c40\u3001\u53ef\u62d6\u62fd\u5206\u5272\u9762\u677f\u2026\u2026<\/li><li><strong>\u9ad8\u9636\u7ec4\u4ef6<\/strong><br>\u5185\u7f6e&nbsp;Monaco&nbsp;\u4ee3\u7801\u7f16\u8f91\u5668\u3001\u6587\u4ef6\u4e0a\u4f20\u7ec4\u4ef6\u3001\u8c03\u8272\u9762\u677f\u3001\u6d88\u606f\u901a\u77e5\u3001\u79fb\u52a8\u7aef\u9002\u914d\u9009\u62e9\u5668\u2026\u2026<\/li><\/ul>\n\n\n\n<p>\u4e0b\u56fe\u4e3a\u57fa\u4e8e&nbsp;HT UI&nbsp;\u642d\u5efa\u7684\u53ef\u89c6\u5316&nbsp;UI&nbsp;\u7f16\u8f91\u5668\uff1a\u6309\u94ae\u3001\u6811\u5f62\u63a7\u4ef6\u3001\u6570\u636e\u8868\u683c\u3001\u5c5e\u6027\u9762\u677f\u3001\u5404\u7c7b\u5e03\u5c40\u5bb9\u5668\u534f\u540c\u8fd0\u884c\uff0c\u5168\u90e8\u7531\u6846\u67b6\u81ea\u6709\u7ec4\u4ef6\u6784\u6210\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03.png\"><img loading=\"lazy\" width=\"1024\" height=\"520\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-1024x520.png\" alt=\"\" class=\"wp-image-7687\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-1024x520.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-300x152.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-768x390.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-660x335.png 660w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03.png 1080w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u91cd\u70b9\u7559\u610f\u72ec\u7acb\u5212\u5206\u7684\u5e03\u5c40\u7ec4\u4ef6\u4f53\u7cfb\uff0c\u8fd9\u4e5f\u662f&nbsp;HT UI&nbsp;\u6781\u6613\u88ab\u5ffd\u7565\u7684\u6838\u5fc3\u4f18\u52bf\u3002<\/p>\n\n\n\n<p>\u5e02\u9762\u4e0a\u5927\u90e8\u5206\u524d\u7aef\u7ec4\u4ef6\u5e93\u4f9d\u8d56&nbsp;CSS&nbsp;\u5b8c\u6210\u9875\u9762\u6392\u7248\uff0c\u5f00\u53d1\u8005\u9700\u8981\u624b\u5199\u5927\u91cf&nbsp;flex\u3001grid&nbsp;\u6837\u5f0f\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>HT UI&nbsp;\u628a\u5e03\u5c40\u5668\u505a\u6210\u4e86\u201c<strong>\u72ec\u7acb\u4e00\u7b49\u516c\u6c11<\/strong>\u201d\uff0c\u8fb9\u6846\u3001\u6a2a\u7eb5\u3001\u7f51\u683c\u3001\u76f8\u5bf9\u3001\u6d41\u5f0f\u3001\u5206\u5272\u2026\u2026\u6bcf\u4e00\u79cd\u5e03\u5c40\u90fd\u62e5\u6709\u5b8c\u6574\u751f\u547d\u5468\u671f\uff0c\u6d4b\u91cf\u3001\u6392\u7248\u3001\u7ed8\u5236\u903b\u8f91\u5206\u5c42\u6e05\u6670\uff0c\u5404\u53f8\u5176\u804c\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u5f00\u53d1\u5b9a\u5236\u5316\u5e03\u5c40\u5bb9\u5668\uff0c\u4ec5\u9700\u7ee7\u627f\u57fa\u7c7b\u3001\u91cd\u5199\u4e24\u4e2a\u51fd\u6570\uff0c\u81ea\u5b9a\u4e49\u903b\u8f91\u4e0e\u4e1a\u52a1\u7ec4\u4ef6\u5b8c\u5168\u590d\u7528\u540c\u4e00\u5957\u5f00\u53d1\u601d\u8def\u3002<\/p>\n\n\n\n<p>\u7ec4\u4ef6\u54c1\u7c7b\u5df2\u7ecf\u8db3\u591f\u9f50\u5168\uff0c\u4f46\u54c1\u7c7b\u7e41\u591a\u4e5f\u4f1a\u5e26\u6765\u65b0\u95ee\u9898\uff1a<strong>\u5404\u7c7b\u7ec4\u4ef6\u662f\u5404\u81ea\u72ec\u7acb\u3001\u903b\u8f91\u5272\u88c2\uff0c\u8fd8\u662f\u5171\u7528\u540c\u4e00\u5957\u5e95\u5c42\u903b\u8f91\uff1f<\/strong>\u8fd9\u5c31\u8981\u8bb2\u5230&nbsp;HT UI&nbsp;\u771f\u6b63\u7684\u5185\u6838\uff1a<strong>DataModel<\/strong>\u3002<\/p>\n\n\n\n<h2><strong>02<\/strong> <strong>\u4e07\u7269\u7686 Data\uff1a\u4e00\u5957\u6a21\u578b\u7edf\u5168\u5c40<\/strong><\/h2>\n\n\n\n<p>\u6574\u7bc7\u7cfb\u5217\u6700\u6838\u5fc3\u7684\u89c2\u70b9\uff0c\u5e0c\u671b\u4f60\u80fd\u8bb0\u4f4f\uff1a<\/p>\n\n\n\n<p><strong>\u5728&nbsp;HT&nbsp;\u7684\u4f53\u7cfb\u4e2d\uff0c\u754c\u9762\u4e0a\u6240\u6709\u53ef\u89c1\u3001\u4e0d\u53ef\u89c1\u5143\u7d20\uff0c\u5e95\u5c42\u672c\u8d28\u90fd\u662f\u4e00\u4efd&nbsp;Data&nbsp;\u6570\u636e\u5bf9\u8c61\u3002<\/strong><\/p>\n\n\n\n<p>\u6811\u5f62\u7ec4\u4ef6\u7684\u4e00\u6761\u8282\u70b9\u662f&nbsp;ht.Data\uff0c\u8868\u683c\u7684\u4e00\u884c\u6570\u636e\u662f ht.Data\uff0c\u62d3\u6251\u56fe\u4e0a\u4e00\u53f0\u673a\u623f\u8bbe\u5907\u3001\u4e00\u6761\u8fde\u7ebf\uff0c\u540c\u6837\u662f&nbsp;ht.Data\u3002\u800c\u7edf\u4e00\u7ba1\u7406\u6240\u6709&nbsp;Data&nbsp;\u7684\u5bb9\u5668\uff0c\u4fbf\u662f&nbsp;DataModel\uff08\u4e1a\u5185\u5e38\u7b80\u79f0\u4e3a&nbsp;dm\uff09\u3002<\/p>\n\n\n\n<p>\u8fd9\u610f\u5473\u7740<strong>\u638c\u63e1\u4e00\u5957\u6570\u636e\u64cd\u4f5c&nbsp;API\uff0c\u5c31\u80fd\u9002\u914d\u51e0\u4e4e\u5168\u90e8\u7ec4\u4ef6\u3002<\/strong><\/p>\n\n\n\n<p>\u5411\u6811\u5f62\u7ec4\u4ef6\u65b0\u589e\u8282\u70b9\u3001\u5411\u8868\u683c\u65b0\u589e\u884c\u3001\u5411\u5217\u8868\u65b0\u589e\u6761\u76ee\uff0c\u64cd\u4f5c\u903b\u8f91\u9ad8\u5ea6\u7edf\u4e00\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u4ee5\u6811\u8868\u683c\u7ec4\u4ef6\u4e3e\u4f8b\nvar tablePane = new ht.ui.TreeTablePane(),\n    tableView = tablePane.getTableView(),\n    dataModel = tableView.dm();          \/\/ \u83b7\u53d6\u5168\u5c40\u7edf\u4e00\u6570\u636e\u6a21\u578b\n\n\/\/ \u521b\u5efa\u6570\u636e\u5b9e\u4f8b\uff0c\u65e0\u9700\u533a\u5206\u7ec4\u4ef6\u7c7b\u578b\uff0c\u7edf\u4e00\u4e3a ht.Data\nvar node = new ht.Data();\nnode.setName('\u673a\u623f A');\nnode.a('status', 'online');              \/\/ a() \u7b80\u5199\u5b58\u50a8\u81ea\u5b9a\u4e49\u4e1a\u52a1\u5c5e\u6027\uff0c\u65e0\u5b57\u6bb5\u9650\u5236\nnode.a('temperature', 26.5);\n\ndataModel.add(node);                      \/\/ \u5199\u5165\u6570\u636e\u6a21\u578b\uff0c\u7ed1\u5b9a\u7ec4\u4ef6\u81ea\u52a8\u5237\u65b0\u754c\u9762<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\u770b&nbsp;node.a(&#8216;status&#8217;, &#8216;online&#8217;)\uff1aa() \u662f attr&nbsp;\u5c5e\u6027\u7684\u7b80\u5199\uff0c<strong>\u652f\u6301\u968f\u610f\u6302\u8f7d\u81ea\u5b9a\u4e49\u4e1a\u52a1\u5c5e\u6027\uff0c\u65e0\u9884\u8bbe\u5b57\u6bb5\u7ea6\u675f\u3002<\/strong><\/p>\n\n\n\n<p>\u4eca\u65e5\u5b58\u50a8\u8bbe\u5907\u5728\u7ebf\u72b6\u6001\uff0c\u660e\u65e5\u6302\u8f7d\u7ecf\u7eac\u5ea6\uff0c\u540e\u5929\u8bb0\u5f55\u6e29\u6e7f\u5ea6\uff0c\u6570\u636e\u6a21\u578b\u5747\u53ef\u517c\u5bb9\uff0c\u6e32\u67d3\u5c42\u6309\u9700\u8bfb\u53d6\u4f7f\u7528\u5373\u53ef\uff0c\u65e0\u9700\u63d0\u524d\u5b9a\u4e49\u5b57\u6bb5\u3001\u4fee\u6539\u6570\u636e\u7ed3\u6784\u3002<\/p>\n\n\n\n<h2><strong>03<\/strong> <strong>\u540c\u6e90\u8054\u52a8\uff1a\u4e00\u6e90\u591a\u663e\uff0c\u81ea\u52a8\u540c\u6b65<\/strong><\/h2>\n\n\n\n<p>DataModel&nbsp;\u6700\u5438\u5f15\u4eba\u7684\u7279\u6027\uff0c\u662f\u7ec4\u4ef6\u95f4\u6570\u636e\u8054\u52a8\u51e0\u4e4e\u96f6\u5f00\u53d1\u6210\u672c\u3002<\/p>\n\n\n\n<p>\u540c\u4e00\u4e2a&nbsp;DataModel&nbsp;\u5b9e\u4f8b\uff0c\u53ef\u540c\u65f6\u7ed1\u5b9a\u591a\u4e2a\u4e0d\u540c\u7ec4\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nvar dm = new ht.DataModel();\n\n\/\/ \u5de6\u4fa7\u6811\u5f62\u7ec4\u4ef6\u3001\u53f3\u4fa7\u8868\u683c\u7ec4\u4ef6\uff0c\u5171\u7528\u540c\u4e00\u5957\u6570\u636e\u6e90\nvar treeView  = new ht.ui.TreeView();\nvar tableView = new ht.ui.TableView();\ntreeView.setDataModel(dm);\ntableView.setDataModel(dm);<\/code><\/pre>\n\n\n\n<p>\u63a5\u4e0b\u6765\u795e\u5947\u7684\u4e8b\u53d1\u751f\u4e86\uff1a<\/p>\n\n\n\n<p>\u5728\u5de6\u4fa7\u6811\u4e0a\u9009\u4e2d\u201c\u673a\u623f A\u201d\uff0c\u53f3\u4fa7\u8868\u683c\u5bf9\u5e94\u884c<strong>\u81ea\u52a8\u540c\u6b65\u9ad8\u4eae<\/strong>\uff1b\u4ece&nbsp;dm&nbsp;\u4e2d\u5220\u9664\u4e00\u6761\u6570\u636e\uff0c\u4e24\u4e2a\u7ec4\u4ef6<strong>\u540c\u6b65<\/strong>\u79fb\u9664\u5bf9\u5e94\u5185\u5bb9\u3002\u5168\u7a0b\u65e0\u9700\u624b\u52a8\u7f16\u5199\u540c\u6b65\u4ee3\u7801\uff0c\u53ea\u56e0\u6240\u6709\u7ec4\u4ef6\u8bfb\u53d6\u7684\u662f\u540c\u4e00\u4efd\u539f\u59cb\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u80cc\u540e\u662f\u4e00\u5957\u6734\u7d20\u5374\u9ad8\u6548\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a<strong>\u754c\u9762\u4e0d\u5b58\u50a8\u6570\u636e\uff0c\u4ec5\u4f5c\u4e3a\u6570\u636e\u7684\u53ef\u89c6\u5316\u955c\u50cf\u3002<\/strong><\/p>\n\n\n\n<p>\u6570\u636e\u53d1\u751f\u53d8\u66f4\uff0c\u89c6\u56fe\u81ea\u52a8\u66f4\u65b0\uff1b\u60f3\u8981\u4fee\u6539\u754c\u9762\u5185\u5bb9\uff0c\u76f4\u63a5\u64cd\u4f5c\u5e95\u5c42\u6570\u636e\u5373\u53ef\uff0c\u65e0\u9700\u64cd\u4f5c&nbsp;DOM&nbsp;\u6216\u7ec4\u4ef6\u5b9e\u4f8b\u3002<\/p>\n\n\n\n<p>\u505a\u8fc7\u591a\u7ec4\u4ef6\u8054\u52a8\u5f00\u53d1\u7684\u5f00\u53d1\u8005\uff0c\u4e00\u5b9a\u8e29\u8fc7\u201c\u4fee\u6539\u4e00\u5904\u7ec4\u4ef6\uff0c\u5fd8\u8bb0\u540c\u6b65\u5176\u4ed6\u89c6\u56fe\uff0c\u6570\u636e\u5c55\u793a\u4e0d\u4e00\u81f4\u201d\u7684\u5751\uff0c\uff08\u770b\u5230\u8fd9\u53e5\u662f\u4e0d\u662f\u4f1a\u6709\u70b9\u60f3\u54ed\u3002\uff09\u4f46\u56fe\u6251\u8fd9\u5957\u673a\u5236\u80fd\u4ece\u6839\u6e90\u89c4\u907f\u8fd9\u7c7b\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u884c\u4e1a\u5e38\u8bf4 \u201c\u7ea6\u5b9a\u4f18\u4e8e\u914d\u7f6e\u201d\uff0c\u8fd9\u91cc\u4e5f\u5f97\u81ea\u5632\u4e00\u53e5\uff1a<\/p>\n\n\n\n<p>\u505a\u53ef\u89c6\u5316\u5f00\u53d1\u5f88\u5bb9\u6613\u9677\u5165\u4e00\u4e2a\u8bef\u533a \u2014\u2014&nbsp;<strong>\u4e3a\u4e0d\u540c\u7ec4\u4ef6\u8bbe\u8ba1\u5dee\u5f02\u5316\u6570\u636e\u683c\u5f0f\u3002<\/strong>\u6811\u6709\u6811\u7684\u813e\u6c14\uff0c\u8868\u6709\u8868\u7684\u89c4\u77e9\uff0c\u591a\u7ec4\u4ef6\u8054\u52a8\u9700\u8981\u5806\u780c\u5927\u91cf\u80f6\u6c34\u4ee3\u7801\uff0c\u6539\u4e00\u5904\u5d29\u4e09\u5904\u3002<\/p>\n\n\n\n<p>DataModel&nbsp;\u7684\u4f5c\u7528\uff0c\u5c31\u662f\u7edf\u4e00\u5168\u7ec4\u4ef6\u6570\u636e\u89c4\u8303\u3002<strong>\u5b66\u4f1a\u4e00\u5957&nbsp;API\uff0c\u6240\u6709\u7ec4\u4ef6\u901a\u7528\u3002<\/strong><\/p>\n\n\n\n<h2><strong>04<\/strong> <strong>\u5c5e\u6027\u9875\uff1a\u4e00\u6b21\u6559\u79d1\u4e66\u7ea7\u7684\u793a\u8303<\/strong><\/h2>\n\n\n\n<p>\u5982\u679c\u524d\u9762\u7684\u6982\u5ff5\u8fd8\u662f\u7565\u663e\u62bd\u8c61\uff0c\u90a3\u770b&nbsp;PropertyView&nbsp;\u5c5e\u6027\u9762\u677f\u4f60\u5c06\u4f1a\u77ac\u95f4\u901a\u900f\u3002<\/p>\n\n\n\n<p>\u8fd9\u7c7b\u4ea4\u4e92\u573a\u666f\u5341\u5206\u5e38\u89c1\uff1a\u5de6\u4fa7\u9009\u4e2d\u5bf9\u8c61\uff0c\u53f3\u4fa7\u9762\u677f\u81ea\u52a8\u5217\u51fa\u6240\u6709\u53ef\u7f16\u8f91\u5f97\u5c5e\u6027 \u2014\u2014 \u540d\u5b57\u4f7f\u7528\u6587\u672c\u6846\u3001\u989c\u8272\u4f7f\u7528\u62fe\u8272\u5668\u3001\u5f00\u5173\u4f7f\u7528\u5f00\u5173\u6309\u94ae\u3001\u6570\u503c\u4f7f\u7528\u6ed1\u5757\u3002IDE\u3001\u53ef\u89c6\u5316\u8bbe\u8ba1\u5de5\u5177\u3001\u7ec4\u6001\u8f6f\u4ef6\u3001\u6e38\u620f\u7f16\u8f91\u5668\u4e2d\u968f\u5904\u53ef\u89c1\uff08\u524d\u6587\u622a\u56fe\u53f3\u4fa7\u9762\u677f\u4fbf\u662f\u8be5\u7ec4\u4ef6\uff09\u3002<\/p>\n\n\n\n<p>\u5728\u5176\u4ed6\u524d\u7aef\u6846\u67b6\u4e2d\uff0c\u5b9e\u73b0\u8be5\u529f\u80fd\u9700\u8981\u7f16\u5199\u5927\u91cf\u7ed1\u5b9a\u903b\u8f91\uff1a\u76d1\u542c\u63a7\u4ef6\u53d8\u66f4\u540c\u6b65\u5bf9\u8c61\u3001\u76d1\u542c\u5bf9\u8c61\u53d8\u66f4\u56de\u586b\u63a7\u4ef6\uff0c\u53cc\u5411\u7ed1\u5b9a\u4ee3\u7801\u7e41\u7410\uff0c\u6765\u56de\u62c9\u626f\u6781\u6613\u51fa\u73b0\u9057\u6f0f\u3002<\/p>\n\n\n\n<p>\u800c&nbsp;HT UI&nbsp;\u4e2d\uff0c<strong>\u5f85\u7f16\u8f91\u5bf9\u8c61\u672c\u8eab\u5c31\u662f&nbsp;ht.Data<\/strong>\uff0c\u5c5e\u6027\u9762\u677f\u4ec5\u9700\u914d\u7f6e\u5c5e\u6027\u4e0e\u7f16\u8f91\u5668\u7684\u5bf9\u5e94\u5173\u7cfb\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nvar propertyView = new ht.ui.PropertyView();\npropertyView.setProperties(&#91;\n    { name: 'name',  displayName: '\u540d\u79f0', editable: true, editorClass: 'ht.ui.editor.StringEditor' },    \n    { name: 'status', displayName: '\u72b6\u6001', accessType: 'attr',\n      valueType: 'boolean', editable: true },                                \/\/ \u81ea\u52a8\u7528\u5f00\u5173\n    { name: 'color',  displayName: '\u989c\u8272', accessType: 'attr',\n      valueType: 'color', editable: true, editorClass: 'ht.ui.editor.ColorEditor' }                              \n]);\npropertyView.dm().add(node);   \/\/ \u628a\u4e0a\u9762\u90a3\u4e2a ht.Data \u4e22\u8fdb\u6765\npropertyView.dm().sm().ss(node); \/\/ \u9009\u4e2d data \u8fdb\u884c\u663e\u793a\u548c\u7f16\u8f91<\/code><\/pre>\n\n\n\n<p><strong>\u4fee\u6539\u9762\u677f\u63a7\u4ef6\uff0c\u5e95\u5c42&nbsp;Data&nbsp;\u81ea\u52a8\u66f4\u65b0\uff1b\u5176\u4ed6\u4e1a\u52a1\u903b\u8f91\u4fee\u6539&nbsp;Data\uff0c\u9762\u677f\u540c\u6b65\u56de\u663e\u6700\u65b0\u503c<\/strong>&nbsp;\u2014\u2014 \u53cc\u5411\u7ed1\u5b9a\u3001\u96f6\u5f00\u53d1\u6210\u672c\uff0c\u65e0\u9700\u624b\u5199\u4efb\u4f55\u540c\u6b65\u903b\u8f91\u3002\u8fd9\u4fbf\u662f\u7edf\u4e00\u6570\u636e\u6a21\u578b\u5e26\u6765\u7684\u957f\u671f\u6536\u76ca\uff1a\u5e95\u5c42\u89c4\u8303\u7edf\u4e00\u4e00\u6b21\uff0c\u4e0a\u5c42\u6240\u6709\u201c\u6570\u636e\u2194\u4ecb\u9762\u201d\u53cc\u5411\u4ea4\u4e92\uff0c\u81ea\u7136\u65e0\u7f1d\u6253\u901a\u3002<strong>\u7ec4\u4ef6\u573a\u666f\u8d8a\u4e30\u5bcc\uff0c\u8fd9\u4efd\u4f18\u52bf\u8d8a\u7a81\u51fa\u3002<\/strong><\/p>\n\n\n\n<h2><strong>05<\/strong> <strong>\u754c\u9762\u4e5f\u80fd&#8221;\u6253\u5305\u5e26\u8d70&#8221;\uff1a\u5e8f\u5217\u5316<\/strong><\/h2>\n\n\n\n<p>\u804a\u5b8c\u7ec4\u4ef6\u4e30\u5bcc\u5ea6\u4e0e\u6570\u636e\u7edf\u4e00\u6027\uff0c\u518d\u4ecb\u7ecd\u4e00\u9879\u4f4e\u8c03\u4f46\u5173\u952e\u65f6\u523b\u521a\u9700\u7684\u80fd\u529b\uff1a<strong>\u5e8f\u5217\u5316<\/strong>\u3002<\/p>\n\n\n\n<p>HT UI&nbsp;\u652f\u6301\u5c06\u6574\u5957\u754c\u9762<strong>\u5b58\u50a8\u6210\u4e00\u6bb5&nbsp;JSON&nbsp;\u5b57\u7b26\u4e32<\/strong>\uff0c\u540e\u7eed\u53ef\u901a\u8fc7\u53cd\u5e8f\u5217\u5316\u4e00\u952e\u8fd8\u539f\u5168\u90e8\u754c\u9762\u3002<\/p>\n\n\n\n<p>\u4ec5\u4e00\u884c&nbsp;API&nbsp;\u5373\u53ef\u5b9e\u73b0\uff0c\u884d\u751f\u51fa\u5927\u91cf\u5b9e\u7528\u573a\u666f\uff1a<\/p>\n\n\n\n<ul><li><strong>\u53ef\u89c6\u5316\u7f16\u8f91\u5668\u5b58\u6863<\/strong><br>\u7528\u6237\u5728\u7ec4\u6001\u5de5\u5177\u62d6\u62fd\u642d\u5efa\u754c\u9762\u540e\uff0c\u5c06&nbsp;JSON&nbsp;\u5b58\u5165\u6570\u636e\u5e93\uff1b\u518d\u6b21\u6253\u5f00\u9875\u9762\u6267\u884c\u53cd\u5e8f\u5217\u5316\uff0c\u5b8c\u6574\u8fd8\u539f\u5e03\u5c40\u3001\u6570\u636e\u3001\u6eda\u52a8\u4f4d\u7f6e\u7b49\u5168\u90e8\u72b6\u6001\u3002<\/li><li><strong>\u914d\u7f6e\u9a71\u52a8\u754c\u9762<\/strong><br>\u754c\u9762\u5e03\u5c40\u4e0d\u518d\u786c\u7f16\u7801\u81f3\u4ee3\u7801\uff0c\u800c\u662f\u7531&nbsp;JSON&nbsp;\u914d\u7f6e\u6587\u4ef6\u63a7\u5236\u3002\u4fee\u6539&nbsp;JSON&nbsp;\u5373\u53ef\u8c03\u6574\u754c\u9762\u7ed3\u6784\uff0c\u751a\u81f3\u7531\u8fd0\u8425\u3001\u540e\u53f0<strong>\u52a8\u6001\u4e0b\u53d1<\/strong>\u4e0d\u540c\u5e03\u5c40\u914d\u7f6e\u533a\u5206\u5ba2\u6237\uff0c\u65e0\u9700\u524d\u7aef\u8fed\u4ee3\u53d1\u7248\u3002<\/li><li><strong>\u8de8\u7aef\u3001\u591a\u4eba\u534f\u4f5c<\/strong><br>\u754c\u9762\u8f6c\u5316\u4e3a\u53ef\u4f20\u8f93\u7684\u7eaf\u6570\u636e\uff0c\u4efb\u610f\u73af\u5883\u5747\u53ef\u8fd8\u539f\u76f8\u540c\u5e03\u5c40\uff0c\u65e0\u9700\u53e3\u5934\u63cf\u8ff0\u8c03\u6574\u7ec6\u8282\u3002<\/li><\/ul>\n\n\n\n<p>\u5e8f\u5217\u5316\u529f\u80fd\u5b9e\u73b0\u987a\u7545\uff0c\u6839\u6e90\u4f9d\u65e7\u662f\u7edf\u4e00\u6570\u636e\u6a21\u578b:<strong>\u6240\u6709\u754c\u9762\u5143\u7d20\u5747\u6807\u51c6\u5316\u4e3a&nbsp;Data&nbsp;\u5bf9\u8c61\uff0c\u8f6c\u4e3a&nbsp;JSON&nbsp;\u53ea\u662f\u57fa\u7840\u80fd\u529b\u5ef6\u4f38\u3002<\/strong><\/p>\n\n\n\n<p>\u5e95\u5c42\u67b6\u6784\u7684\u7edf\u4e00\uff0c\u5728\u8fd9\u91cc\u518d\u6b21\u4f53\u73b0\u4ef7\u503c\u3002\u8fd9\u4e5f\u662f\u524d\u6587\u53cd\u590d\u5f3a\u8c03&nbsp;DataModel&nbsp;\u7684\u539f\u56e0\uff1a\u5b83\u5e76\u975e\u5355\u4e00\u72ec\u7acb\u529f\u80fd\uff0c\u800c\u662f\u4e32\u8054\u7ec4\u4ef6\u62d3\u5c55\u3001\u591a\u7ec4\u4ef6\u8054\u52a8\u3001\u754c\u9762\u5b58\u6863\u7684\u6838\u5fc3\u4e3b\u7ebf\u3002<\/p>\n\n\n\n<h2><strong>06<\/strong> <strong>\u8fd9\u4e00\u7bc7\uff0c\u8bf7\u8bb0\u4f4f\u4e09\u53e5\u8bdd<\/strong><\/h2>\n\n\n\n<ul><li><strong>\u7ec4\u4ef6\u54c1\u7c7b\u9f50\u5168\u3002<\/strong><br>\u6570\u5341\u7c7b\u57fa\u7840\u3001\u9ad8\u9636\u7ec4\u4ef6\u642d\u914d\u5b8c\u6574\u5e03\u5c40\u5668\uff0c\u5e38\u89c4\u4e1a\u52a1\u65e0\u9700\u62fc\u51d1\u7b2c\u4e09\u65b9\u7ec4\u4ef6\u3002<\/li><li><strong>\u4e07\u7269\u7686&nbsp;Data\u3002<\/strong><br>\u4f9d\u6258\u7edf\u4e00&nbsp;DataModel&nbsp;\u7ba1\u7406\u5168\u7ec4\u4ef6\u6570\u636e\uff0c\u4e00\u5957\u64cd\u4f5c\u903b\u8f91\u9002\u914d\u6240\u6709\u7ec4\u4ef6\uff0c\u591a\u89c6\u56fe\u8054\u52a8\u51e0\u4e4e\u96f6\u6210\u672c\u3002<\/li><li><strong>\u754c\u9762\u53ef\u5b8c\u6574\u5e8f\u5217\u5316\u5bfc\u51fa\u3002<\/strong><br>\u4e00\u952e\u8f6c\u4e3a&nbsp;JSON&nbsp;\u5b58\u6863\u3001\u52a8\u6001\u914d\u7f6e\u9875\u9762\u3001\u8de8\u7aef\u534f\u4f5c\u90fd\u80fd\u8f7b\u677e\u5b9e\u73b0\u3002<\/li><\/ul>\n\n\n\n<p>\u7ec4\u4ef6\u50a8\u5907\u5145\u8db3\u3001\u6570\u636e\u6d41\u8f6c\u987a\u7545\u3001\u754c\u9762\u652f\u6301\u5b58\u6863\u590d\u7528\uff0c\u4f46\u4e00\u5957\u6210\u719f\u7684\u5de5\u5177\u7ec4\u4ef6\u5e93\uff0c\u8fd8\u9700\u8981\u9002\u914d\u5404\u7c7b\u4f7f\u7528\u573a\u666f\uff1a<strong>\u65e5\u95f4\u4eae\u8272\u6a21\u5f0f\u3001\u591c\u95f4\u6697\u8272\u6a21\u5f0f\u3001\u591a\u8bed\u8a00\u56fd\u9645\u5316\u3001\u79fb\u52a8\u7aef\u81ea\u9002\u5e94\uff0c\u5168\u90e8\u8981\u517c\u987e\u3002<\/strong><\/p>\n\n\n<p><\/p>\n\n\n<\/p>\n<p><strong>\u4e0b\u4e00\u7bc7\uff0c\u804a\u804a\u7ec4\u4ef6\u591a\u6837\u9002\u914d\u80fd\u529b<\/strong><\/p>\n<p>\n\n\n\n<\/p>\n<p style=\"padding-left: 40px;\">\u4e14\u770b\u540c\u4e00\u652f\u753b\u7b14\uff0c\u5982\u4f55\u9002\u914d\u5404\u7c7b\u573a\u666f\u98ce\u683c\u3002<\/p>\n<p>\n\n\n<p><\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p><!-- wp:image {\"align\":\"center\",\"id\":7690,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/01-2.webp\"><img loading=\"lazy\" width=\"1080\" height=\"1147\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/01-2.webp\" alt=\"\" class=\"wp-image-7690\"\/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><a href=\"https:\/\/www.hightopo.com\/blog\/7678.html\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e0a\u4e00\u7bc7<\/a>\u8bb2\u4e86&nbsp;HT UI&nbsp;\u9009\u7528&nbsp;Canvas&nbsp;\u7ed8\u5236\u754c\u9762\u7684\u7f18\u7531\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8fd9\u4e00\u7bc7\u6362\u4e2a\u89c6\u89d2\uff0c\u804a\u804a\u6846\u67b6\u7684\u7ec4\u4ef6\u50a8\u5907\u4e0e\u5e95\u5c42\u7edf\u4e00\u67b6\u6784\uff1a\u5185\u7f6e\u7ec4\u4ef6\u54c1\u7c7b\u662f\u5426\u5145\u8db3\uff0c\u7ec4\u4ef6\u7e41\u591a\u540e\u5982\u4f55\u4fdd\u6301\u89c4\u6574\uff0c\u89c4\u6574\u4e4b\u5916\u754c\u9762\u80fd\u5426\u5b8c\u6574\u5bfc\u51fa\u590d\u7528\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8bc4\u5224\u4e00\u5957\u7ed8\u56fe\u5de5\u5177\u7684\u529f\u5e95\uff0c\u4e0d\u5728\u4e8e\u80fd\u7ed8\u5236\u591a\u5c11\u5143\u7d20\uff0c\u800c\u5728\u4e8e\u4e07\u5343\u7ec4\u4ef6\u5171\u4eab\u540c\u4e00\u5957\u5e95\u5c42\u903b\u8f91\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":7686,\"sizeSlug\":\"large\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1.png\"><img loading=\"lazy\" width=\"1024\" height=\"563\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-1024x563.png\" alt=\"\" class=\"wp-image-7686\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-1024x563.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-300x165.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-768x422.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-1536x844.png 1536w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-2048x1126.png 2048w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/02-1-660x363.png 660w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2><strong>01<\/strong> <strong>\u5148\u62a5\u4e2a\u83dc\u5355\uff0c\u6cbb\u4e00\u6cbb\u9009\u62e9\u56f0\u96be<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6280\u672f\u9009\u578b\u7684\u7b2c\u4e00\u9053\u96be\u5173\uff0c\u5f80\u5f80\u4e0d\u662f\u5e93\u597d\u4e0d\u597d\u7528\uff0c\u800c\u662f\u7ec4\u4ef6\u8986\u76d6\u662f\u5426\u9f50\u5168\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5174\u51b2\u51b2\u9009\u5b9a\u4e00\u5957\u7ec4\u4ef6\u5e93\uff0c\u5f00\u53d1\u4e2d\u9014\u624d\u53d1\u73b0\u7f3a\u5c11\u65e5\u671f\u9009\u62e9\u5668\u3001\u6811\u8868\u683c\u3001\u5c5e\u6027\u9762\u677f\uff0c\u4e8e\u662f\u5f00\u59cb\u6ee1\u4e16\u754c\u627e\u7b2c\u4e09\u65b9\u7ec4\u4ef6\u62fc\u51d1\u3001\u53cd\u590d\u8e29\u5751\uff0c\u751a\u81f3\u4fee\u6539\u6e90\u7801 \u2014\u2014 \u505a\u8fc7\u9879\u76ee\u7684\u4eba\u90fd\u6df1\u6709\u4f53\u4f1a\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u591a\u65b9\u62fc\u51d1\u51fa\u7684\u754c\u9762\u4f1a\u9020\u6210\u4ea4\u4e92\u3001\u89c6\u89c9\u6807\u51c6\u4e0d\u7edf\u4e00\uff0c\u9875\u9762\u6574\u4f53\u5272\u88c2\u6742\u4e71\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4e0b\u9762\u644a\u5f00&nbsp;HT UI&nbsp;\u7ec4\u4ef6\u6e05\u5355\uff0c\u7f57\u5217<strong>\u6570\u5341\u79cd\u7ec4\u4ef6<\/strong>\uff0c\u8986\u76d6\u7edd\u5927\u591a\u6570\u4e1a\u52a1\u573a\u666f\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u57fa\u7840\u63a7\u4ef6<\/strong><br \/>\u6309\u94ae\u3001\u5f00\u5173\u3001\u590d\u9009\u6846\u3001\u5355\u9009\u6846\u3001\u6587\u672c\u8f93\u5165\u6846\u3001\u6587\u672c\u57df\u3001\u4e0b\u62c9\u9009\u62e9\u5668\u3001\u53d6\u8272\u5668\u3001\u65e5\u671f\u65f6\u95f4\u9009\u62e9\u5668\u3001\u6ed1\u5757\u3001\u8fdb\u5ea6\u6761\u3001\u8bc4\u5206\u7ec4\u4ef6\u2026\u2026<\/li>\n<li><strong>\u6570\u636e\u5c55\u793a<\/strong><br \/>\u666e\u901a\u8868\u683c\u3001\u6811\u5f62\u8868\u683c\u3001\u7eaf\u6811\u5f62\u7ec4\u4ef6\u3001\u5217\u8868\u3001\u5c5e\u6027\u9762\u677f\u3001\u7f51\u683c\u3001\u65f6\u95f4\u8f74\u3001\u8f6e\u64ad\u3001\u6807\u7b7e\u3001\u6b65\u9aa4\u6761\u2026\u2026<\/li>\n<li><strong>\u5bb9\u5668\u4e0e\u5bfc\u822a<\/strong><br \/>\u666e\u901a\u9762\u677f\u3001\u5f39\u7a97\u3001\u62bd\u5c49\u3001\u591a\u6807\u7b7e\u9875\u3001\u4fa7\u8fb9\u680f\u3001\u53f3\u952e\u83dc\u5355\u3001\u6c14\u6ce1\u6d6e\u7a97\u2026\u2026<\/li>\n<li><strong>\u5e03\u5c40\u5bb6\u65cf<\/strong><br \/>\u8fb9\u6846\u5e03\u5c40\u3001\u6a2a\u5411 \/ \u7eb5\u5411\u5e03\u5c40\u3001\u7f51\u683c\u5e03\u5c40\u3001\u76f8\u5bf9\u5e03\u5c40\u3001\u6d41\u5f0f\u5e03\u5c40\u3001\u591a\u5217\u5e03\u5c40\u3001\u53ef\u62d6\u62fd\u5206\u5272\u9762\u677f\u2026\u2026<\/li>\n<li><strong>\u9ad8\u9636\u7ec4\u4ef6<\/strong><br \/>\u5185\u7f6e&nbsp;Monaco&nbsp;\u4ee3\u7801\u7f16\u8f91\u5668\u3001\u6587\u4ef6\u4e0a\u4f20\u7ec4\u4ef6\u3001\u8c03\u8272\u9762\u677f\u3001\u6d88\u606f\u901a\u77e5\u3001\u79fb\u52a8\u7aef\u9002\u914d\u9009\u62e9\u5668\u2026\u2026<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4e0b\u56fe\u4e3a\u57fa\u4e8e&nbsp;HT UI&nbsp;\u642d\u5efa\u7684\u53ef\u89c6\u5316&nbsp;UI&nbsp;\u7f16\u8f91\u5668\uff1a\u6309\u94ae\u3001\u6811\u5f62\u63a7\u4ef6\u3001\u6570\u636e\u8868\u683c\u3001\u5c5e\u6027\u9762\u677f\u3001\u5404\u7c7b\u5e03\u5c40\u5bb9\u5668\u534f\u540c\u8fd0\u884c\uff0c\u5168\u90e8\u7531\u6846\u67b6\u81ea\u6709\u7ec4\u4ef6\u6784\u6210\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"align\":\"center\",\"id\":7687,\"sizeSlug\":\"large\",\"linkDestination\":\"media\"} --><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03.png\"><img loading=\"lazy\" width=\"1024\" height=\"520\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-1024x520.png\" alt=\"\" class=\"wp-image-7687\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-1024x520.png 1024w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-300x152.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-768x390.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03-660x335.png 660w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2026\/08\/03.png 1080w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u53ef\u4ee5\u91cd\u70b9\u7559\u610f\u72ec\u7acb\u5212\u5206\u7684\u5e03\u5c40\u7ec4\u4ef6\u4f53\u7cfb\uff0c\u8fd9\u4e5f\u662f&nbsp;HT UI&nbsp;\u6781\u6613\u88ab\u5ffd\u7565\u7684\u6838\u5fc3\u4f18\u52bf\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5e02\u9762\u4e0a\u5927\u90e8\u5206\u524d\u7aef\u7ec4\u4ef6\u5e93\u4f9d\u8d56&nbsp;CSS&nbsp;\u5b8c\u6210\u9875\u9762\u6392\u7248\uff0c\u5f00\u53d1\u8005\u9700\u8981\u624b\u5199\u5927\u91cf&nbsp;flex\u3001grid&nbsp;\u6837\u5f0f\u4ee3\u7801\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>HT UI&nbsp;\u628a\u5e03\u5c40\u5668\u505a\u6210\u4e86\u201c<strong>\u72ec\u7acb\u4e00\u7b49\u516c\u6c11<\/strong>\u201d\uff0c\u8fb9\u6846\u3001\u6a2a\u7eb5\u3001\u7f51\u683c\u3001\u76f8\u5bf9\u3001\u6d41\u5f0f\u3001\u5206\u5272\u2026\u2026\u6bcf\u4e00\u79cd\u5e03\u5c40\u90fd\u62e5\u6709\u5b8c\u6574\u751f\u547d\u5468\u671f\uff0c\u6d4b\u91cf\u3001\u6392\u7248\u3001\u7ed8\u5236\u903b\u8f91\u5206\u5c42\u6e05\u6670\uff0c\u5404\u53f8\u5176\u804c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5982\u679c\u9700\u8981\u5f00\u53d1\u5b9a\u5236\u5316\u5e03\u5c40\u5bb9\u5668\uff0c\u4ec5\u9700\u7ee7\u627f\u57fa\u7c7b\u3001\u91cd\u5199\u4e24\u4e2a\u51fd\u6570\uff0c\u81ea\u5b9a\u4e49\u903b\u8f91\u4e0e\u4e1a\u52a1\u7ec4\u4ef6\u5b8c\u5168\u590d\u7528\u540c\u4e00\u5957\u5f00\u53d1\u601d\u8def\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ec4\u4ef6\u54c1\u7c7b\u5df2\u7ecf\u8db3\u591f\u9f50\u5168\uff0c\u4f46\u54c1\u7c7b\u7e41\u591a\u4e5f\u4f1a\u5e26\u6765\u65b0\u95ee\u9898\uff1a<strong>\u5404\u7c7b\u7ec4\u4ef6\u662f\u5404\u81ea\u72ec\u7acb\u3001\u903b\u8f91\u5272\u88c2\uff0c\u8fd8\u662f\u5171\u7528\u540c\u4e00\u5957\u5e95\u5c42\u903b\u8f91\uff1f<\/strong>\u8fd9\u5c31\u8981\u8bb2\u5230&nbsp;HT UI&nbsp;\u771f\u6b63\u7684\u5185\u6838\uff1a<strong>DataModel<\/strong>\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2><strong>02<\/strong> <strong>\u4e07\u7269\u7686 Data\uff1a\u4e00\u5957\u6a21\u578b\u7edf\u5168\u5c40<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6574\u7bc7\u7cfb\u5217\u6700\u6838\u5fc3\u7684\u89c2\u70b9\uff0c\u5e0c\u671b\u4f60\u80fd\u8bb0\u4f4f\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u5728&nbsp;HT&nbsp;\u7684\u4f53\u7cfb\u4e2d\uff0c\u754c\u9762\u4e0a\u6240\u6709\u53ef\u89c1\u3001\u4e0d\u53ef\u89c1\u5143\u7d20\uff0c\u5e95\u5c42\u672c\u8d28\u90fd\u662f\u4e00\u4efd&nbsp;Data&nbsp;\u6570\u636e\u5bf9\u8c61\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6811\u5f62\u7ec4\u4ef6\u7684\u4e00\u6761\u8282\u70b9\u662f&nbsp;ht.Data\uff0c\u8868\u683c\u7684\u4e00\u884c\u6570\u636e\u662f ht.Data\uff0c\u62d3\u6251\u56fe\u4e0a\u4e00\u53f0\u673a\u623f\u8bbe\u5907\u3001\u4e00\u6761\u8fde\u7ebf\uff0c\u540c\u6837\u662f&nbsp;ht.Data\u3002\u800c\u7edf\u4e00\u7ba1\u7406\u6240\u6709&nbsp;Data&nbsp;\u7684\u5bb9\u5668\uff0c\u4fbf\u662f&nbsp;DataModel\uff08\u4e1a\u5185\u5e38\u7b80\u79f0\u4e3a&nbsp;dm\uff09\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8fd9\u610f\u5473\u7740<strong>\u638c\u63e1\u4e00\u5957\u6570\u636e\u64cd\u4f5c&nbsp;API\uff0c\u5c31\u80fd\u9002\u914d\u51e0\u4e4e\u5168\u90e8\u7ec4\u4ef6\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5411\u6811\u5f62\u7ec4\u4ef6\u65b0\u589e\u8282\u70b9\u3001\u5411\u8868\u683c\u65b0\u589e\u884c\u3001\u5411\u5217\u8868\u65b0\u589e\u6761\u76ee\uff0c\u64cd\u4f5c\u903b\u8f91\u9ad8\u5ea6\u7edf\u4e00\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\/\/ \u4ee5\u6811\u8868\u683c\u7ec4\u4ef6\u4e3e\u4f8b\nvar tablePane = new ht.ui.TreeTablePane(),\n    tableView = tablePane.getTableView(),\n    dataModel = tableView.dm();          \/\/ \u83b7\u53d6\u5168\u5c40\u7edf\u4e00\u6570\u636e\u6a21\u578b\n\n\/\/ \u521b\u5efa\u6570\u636e\u5b9e\u4f8b\uff0c\u65e0\u9700\u533a\u5206\u7ec4\u4ef6\u7c7b\u578b\uff0c\u7edf\u4e00\u4e3a ht.Data\nvar node = new ht.Data();\nnode.setName('\u673a\u623f A');\nnode.a('status', 'online');              \/\/ a() \u7b80\u5199\u5b58\u50a8\u81ea\u5b9a\u4e49\u4e1a\u52a1\u5c5e\u6027\uff0c\u65e0\u5b57\u6bb5\u9650\u5236\nnode.a('temperature', 26.5);\n\ndataModel.add(node);                      \/\/ \u5199\u5165\u6570\u636e\u6a21\u578b\uff0c\u7ed1\u5b9a\u7ec4\u4ef6\u81ea\u52a8\u5237\u65b0\u754c\u9762<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6ce8\u610f\u770b&nbsp;node.a(&#8216;status&#8217;, &#8216;online&#8217;)\uff1aa() \u662f attr&nbsp;\u5c5e\u6027\u7684\u7b80\u5199\uff0c<strong>\u652f\u6301\u968f\u610f\u6302\u8f7d\u81ea\u5b9a\u4e49\u4e1a\u52a1\u5c5e\u6027\uff0c\u65e0\u9884\u8bbe\u5b57\u6bb5\u7ea6\u675f\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4eca\u65e5\u5b58\u50a8\u8bbe\u5907\u5728\u7ebf\u72b6\u6001\uff0c\u660e\u65e5\u6302\u8f7d\u7ecf\u7eac\u5ea6\uff0c\u540e\u5929\u8bb0\u5f55\u6e29\u6e7f\u5ea6\uff0c\u6570\u636e\u6a21\u578b\u5747\u53ef\u517c\u5bb9\uff0c\u6e32\u67d3\u5c42\u6309\u9700\u8bfb\u53d6\u4f7f\u7528\u5373\u53ef\uff0c\u65e0\u9700\u63d0\u524d\u5b9a\u4e49\u5b57\u6bb5\u3001\u4fee\u6539\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2><strong>03<\/strong> <strong>\u540c\u6e90\u8054\u52a8\uff1a\u4e00\u6e90\u591a\u663e\uff0c\u81ea\u52a8\u540c\u6b65<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>DataModel&nbsp;\u6700\u5438\u5f15\u4eba\u7684\u7279\u6027\uff0c\u662f\u7ec4\u4ef6\u95f4\u6570\u636e\u8054\u52a8\u51e0\u4e4e\u96f6\u5f00\u53d1\u6210\u672c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u540c\u4e00\u4e2a&nbsp;DataModel&nbsp;\u5b9e\u4f8b\uff0c\u53ef\u540c\u65f6\u7ed1\u5b9a\u591a\u4e2a\u4e0d\u540c\u7ec4\u4ef6\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\nvar dm = new ht.DataModel();\n\n\/\/ \u5de6\u4fa7\u6811\u5f62\u7ec4\u4ef6\u3001\u53f3\u4fa7\u8868\u683c\u7ec4\u4ef6\uff0c\u5171\u7528\u540c\u4e00\u5957\u6570\u636e\u6e90\nvar treeView  = new ht.ui.TreeView();\nvar tableView = new ht.ui.TableView();\ntreeView.setDataModel(dm);\ntableView.setDataModel(dm);<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u63a5\u4e0b\u6765\u795e\u5947\u7684\u4e8b\u53d1\u751f\u4e86\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728\u5de6\u4fa7\u6811\u4e0a\u9009\u4e2d\u201c\u673a\u623f A\u201d\uff0c\u53f3\u4fa7\u8868\u683c\u5bf9\u5e94\u884c<strong>\u81ea\u52a8\u540c\u6b65\u9ad8\u4eae<\/strong>\uff1b\u4ece&nbsp;dm&nbsp;\u4e2d\u5220\u9664\u4e00\u6761\u6570\u636e\uff0c\u4e24\u4e2a\u7ec4\u4ef6<strong>\u540c\u6b65<\/strong>\u79fb\u9664\u5bf9\u5e94\u5185\u5bb9\u3002\u5168\u7a0b\u65e0\u9700\u624b\u52a8\u7f16\u5199\u540c\u6b65\u4ee3\u7801\uff0c\u53ea\u56e0\u6240\u6709\u7ec4\u4ef6\u8bfb\u53d6\u7684\u662f\u540c\u4e00\u4efd\u539f\u59cb\u6570\u636e\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u80cc\u540e\u662f\u4e00\u5957\u6734\u7d20\u5374\u9ad8\u6548\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a<strong>\u754c\u9762\u4e0d\u5b58\u50a8\u6570\u636e\uff0c\u4ec5\u4f5c\u4e3a\u6570\u636e\u7684\u53ef\u89c6\u5316\u955c\u50cf\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6570\u636e\u53d1\u751f\u53d8\u66f4\uff0c\u89c6\u56fe\u81ea\u52a8\u66f4\u65b0\uff1b\u60f3\u8981\u4fee\u6539\u754c\u9762\u5185\u5bb9\uff0c\u76f4\u63a5\u64cd\u4f5c\u5e95\u5c42\u6570\u636e\u5373\u53ef\uff0c\u65e0\u9700\u64cd\u4f5c&nbsp;DOM&nbsp;\u6216\u7ec4\u4ef6\u5b9e\u4f8b\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u505a\u8fc7\u591a\u7ec4\u4ef6\u8054\u52a8\u5f00\u53d1\u7684\u5f00\u53d1\u8005\uff0c\u4e00\u5b9a\u8e29\u8fc7\u201c\u4fee\u6539\u4e00\u5904\u7ec4\u4ef6\uff0c\u5fd8\u8bb0\u540c\u6b65\u5176\u4ed6\u89c6\u56fe\uff0c\u6570\u636e\u5c55\u793a\u4e0d\u4e00\u81f4\u201d\u7684\u5751\uff0c\uff08\u770b\u5230\u8fd9\u53e5\u662f\u4e0d\u662f\u4f1a\u6709\u70b9\u60f3\u54ed\u3002\uff09\u4f46\u56fe\u6251\u8fd9\u5957\u673a\u5236\u80fd\u4ece\u6839\u6e90\u89c4\u907f\u8fd9\u7c7b\u95ee\u9898\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u884c\u4e1a\u5e38\u8bf4 \u201c\u7ea6\u5b9a\u4f18\u4e8e\u914d\u7f6e\u201d\uff0c\u8fd9\u91cc\u4e5f\u5f97\u81ea\u5632\u4e00\u53e5\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u505a\u53ef\u89c6\u5316\u5f00\u53d1\u5f88\u5bb9\u6613\u9677\u5165\u4e00\u4e2a\u8bef\u533a \u2014\u2014&nbsp;<strong>\u4e3a\u4e0d\u540c\u7ec4\u4ef6\u8bbe\u8ba1\u5dee\u5f02\u5316\u6570\u636e\u683c\u5f0f\u3002<\/strong>\u6811\u6709\u6811\u7684\u813e\u6c14\uff0c\u8868\u6709\u8868\u7684\u89c4\u77e9\uff0c\u591a\u7ec4\u4ef6\u8054\u52a8\u9700\u8981\u5806\u780c\u5927\u91cf\u80f6\u6c34\u4ee3\u7801\uff0c\u6539\u4e00\u5904\u5d29\u4e09\u5904\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>DataModel&nbsp;\u7684\u4f5c\u7528\uff0c\u5c31\u662f\u7edf\u4e00\u5168\u7ec4\u4ef6\u6570\u636e\u89c4\u8303\u3002<strong>\u5b66\u4f1a\u4e00\u5957&nbsp;API\uff0c\u6240\u6709\u7ec4\u4ef6\u901a\u7528\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2><strong>04<\/strong> <strong>\u5c5e\u6027\u9875\uff1a\u4e00\u6b21\u6559\u79d1\u4e66\u7ea7\u7684\u793a\u8303<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5982\u679c\u524d\u9762\u7684\u6982\u5ff5\u8fd8\u662f\u7565\u663e\u62bd\u8c61\uff0c\u90a3\u770b&nbsp;PropertyView&nbsp;\u5c5e\u6027\u9762\u677f\u4f60\u5c06\u4f1a\u77ac\u95f4\u901a\u900f\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u8fd9\u7c7b\u4ea4\u4e92\u573a\u666f\u5341\u5206\u5e38\u89c1\uff1a\u5de6\u4fa7\u9009\u4e2d\u5bf9\u8c61\uff0c\u53f3\u4fa7\u9762\u677f\u81ea\u52a8\u5217\u51fa\u6240\u6709\u53ef\u7f16\u8f91\u5f97\u5c5e\u6027 \u2014\u2014 \u540d\u5b57\u4f7f\u7528\u6587\u672c\u6846\u3001\u989c\u8272\u4f7f\u7528\u62fe\u8272\u5668\u3001\u5f00\u5173\u4f7f\u7528\u5f00\u5173\u6309\u94ae\u3001\u6570\u503c\u4f7f\u7528\u6ed1\u5757\u3002IDE\u3001\u53ef\u89c6\u5316\u8bbe\u8ba1\u5de5\u5177\u3001\u7ec4\u6001\u8f6f\u4ef6\u3001\u6e38\u620f\u7f16\u8f91\u5668\u4e2d\u968f\u5904\u53ef\u89c1\uff08\u524d\u6587\u622a\u56fe\u53f3\u4fa7\u9762\u677f\u4fbf\u662f\u8be5\u7ec4\u4ef6\uff09\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728\u5176\u4ed6\u524d\u7aef\u6846\u67b6\u4e2d\uff0c\u5b9e\u73b0\u8be5\u529f\u80fd\u9700\u8981\u7f16\u5199\u5927\u91cf\u7ed1\u5b9a\u903b\u8f91\uff1a\u76d1\u542c\u63a7\u4ef6\u53d8\u66f4\u540c\u6b65\u5bf9\u8c61\u3001\u76d1\u542c\u5bf9\u8c61\u53d8\u66f4\u56de\u586b\u63a7\u4ef6\uff0c\u53cc\u5411\u7ed1\u5b9a\u4ee3\u7801\u7e41\u7410\uff0c\u6765\u56de\u62c9\u626f\u6781\u6613\u51fa\u73b0\u9057\u6f0f\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u800c&nbsp;HT UI&nbsp;\u4e2d\uff0c<strong>\u5f85\u7f16\u8f91\u5bf9\u8c61\u672c\u8eab\u5c31\u662f&nbsp;ht.Data<\/strong>\uff0c\u5c5e\u6027\u9762\u677f\u4ec5\u9700\u914d\u7f6e\u5c5e\u6027\u4e0e\u7f16\u8f91\u5668\u7684\u5bf9\u5e94\u5173\u7cfb\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>\nvar propertyView = new ht.ui.PropertyView();\npropertyView.setProperties(&#91;\n    { name: 'name',  displayName: '\u540d\u79f0', editable: true, editorClass: 'ht.ui.editor.StringEditor' },    \n    { name: 'status', displayName: '\u72b6\u6001', accessType: 'attr',\n      valueType: 'boolean', editable: true },                                \/\/ \u81ea\u52a8\u7528\u5f00\u5173\n    { name: 'color',  displayName: '\u989c\u8272', accessType: 'attr',\n      valueType: 'color', editable: true, editorClass: 'ht.ui.editor.ColorEditor' }                              \n]);\npropertyView.dm().add(node);   \/\/ \u628a\u4e0a\u9762\u90a3\u4e2a ht.Data \u4e22\u8fdb\u6765\npropertyView.dm().sm().ss(node); \/\/ \u9009\u4e2d data \u8fdb\u884c\u663e\u793a\u548c\u7f16\u8f91<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u4fee\u6539\u9762\u677f\u63a7\u4ef6\uff0c\u5e95\u5c42&nbsp;Data&nbsp;\u81ea\u52a8\u66f4\u65b0\uff1b\u5176\u4ed6\u4e1a\u52a1\u903b\u8f91\u4fee\u6539&nbsp;Data\uff0c\u9762\u677f\u540c\u6b65\u56de\u663e\u6700\u65b0\u503c<\/strong>&nbsp;\u2014\u2014 \u53cc\u5411\u7ed1\u5b9a\u3001\u96f6\u5f00\u53d1\u6210\u672c\uff0c\u65e0\u9700\u624b\u5199\u4efb\u4f55\u540c\u6b65\u903b\u8f91\u3002\u8fd9\u4fbf\u662f\u7edf\u4e00\u6570\u636e\u6a21\u578b\u5e26\u6765\u7684\u957f\u671f\u6536\u76ca\uff1a\u5e95\u5c42\u89c4\u8303\u7edf\u4e00\u4e00\u6b21\uff0c\u4e0a\u5c42\u6240\u6709\u201c\u6570\u636e\u2194\u4ecb\u9762\u201d\u53cc\u5411\u4ea4\u4e92\uff0c\u81ea\u7136\u65e0\u7f1d\u6253\u901a\u3002<strong>\u7ec4\u4ef6\u573a\u666f\u8d8a\u4e30\u5bcc\uff0c\u8fd9\u4efd\u4f18\u52bf\u8d8a\u7a81\u51fa\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2><strong>05<\/strong> <strong>\u754c\u9762\u4e5f\u80fd&#8221;\u6253\u5305\u5e26\u8d70&#8221;\uff1a\u5e8f\u5217\u5316<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u804a\u5b8c\u7ec4\u4ef6\u4e30\u5bcc\u5ea6\u4e0e\u6570\u636e\u7edf\u4e00\u6027\uff0c\u518d\u4ecb\u7ecd\u4e00\u9879\u4f4e\u8c03\u4f46\u5173\u952e\u65f6\u523b\u521a\u9700\u7684\u80fd\u529b\uff1a<strong>\u5e8f\u5217\u5316<\/strong>\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>HT UI&nbsp;\u652f\u6301\u5c06\u6574\u5957\u754c\u9762<strong>\u5b58\u50a8\u6210\u4e00\u6bb5&nbsp;JSON&nbsp;\u5b57\u7b26\u4e32<\/strong>\uff0c\u540e\u7eed\u53ef\u901a\u8fc7\u53cd\u5e8f\u5217\u5316\u4e00\u952e\u8fd8\u539f\u5168\u90e8\u754c\u9762\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4ec5\u4e00\u884c&nbsp;API&nbsp;\u5373\u53ef\u5b9e\u73b0\uff0c\u884d\u751f\u51fa\u5927\u91cf\u5b9e\u7528\u573a\u666f\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u53ef\u89c6\u5316\u7f16\u8f91\u5668\u5b58\u6863<\/strong><br \/>\u7528\u6237\u5728\u7ec4\u6001\u5de5\u5177\u62d6\u62fd\u642d\u5efa\u754c\u9762\u540e\uff0c\u5c06&nbsp;JSON&nbsp;\u5b58\u5165\u6570\u636e\u5e93\uff1b\u518d\u6b21\u6253\u5f00\u9875\u9762\u6267\u884c\u53cd\u5e8f\u5217\u5316\uff0c\u5b8c\u6574\u8fd8\u539f\u5e03\u5c40\u3001\u6570\u636e\u3001\u6eda\u52a8\u4f4d\u7f6e\u7b49\u5168\u90e8\u72b6\u6001\u3002<\/li>\n<li><strong>\u914d\u7f6e\u9a71\u52a8\u754c\u9762<\/strong><br \/>\u754c\u9762\u5e03\u5c40\u4e0d\u518d\u786c\u7f16\u7801\u81f3\u4ee3\u7801\uff0c\u800c\u662f\u7531&nbsp;JSON&nbsp;\u914d\u7f6e\u6587\u4ef6\u63a7\u5236\u3002\u4fee\u6539&nbsp;JSON&nbsp;\u5373\u53ef\u8c03\u6574\u754c\u9762\u7ed3\u6784\uff0c\u751a\u81f3\u7531\u8fd0\u8425\u3001\u540e\u53f0<strong>\u52a8\u6001\u4e0b\u53d1<\/strong>\u4e0d\u540c\u5e03\u5c40\u914d\u7f6e\u533a\u5206\u5ba2\u6237\uff0c\u65e0\u9700\u524d\u7aef\u8fed\u4ee3\u53d1\u7248\u3002<\/li>\n<li><strong>\u8de8\u7aef\u3001\u591a\u4eba\u534f\u4f5c<\/strong><br \/>\u754c\u9762\u8f6c\u5316\u4e3a\u53ef\u4f20\u8f93\u7684\u7eaf\u6570\u636e\uff0c\u4efb\u610f\u73af\u5883\u5747\u53ef\u8fd8\u539f\u76f8\u540c\u5e03\u5c40\uff0c\u65e0\u9700\u53e3\u5934\u63cf\u8ff0\u8c03\u6574\u7ec6\u8282\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5e8f\u5217\u5316\u529f\u80fd\u5b9e\u73b0\u987a\u7545\uff0c\u6839\u6e90\u4f9d\u65e7\u662f\u7edf\u4e00\u6570\u636e\u6a21\u578b:<strong>\u6240\u6709\u754c\u9762\u5143\u7d20\u5747\u6807\u51c6\u5316\u4e3a&nbsp;Data&nbsp;\u5bf9\u8c61\uff0c\u8f6c\u4e3a&nbsp;JSON&nbsp;\u53ea\u662f\u57fa\u7840\u80fd\u529b\u5ef6\u4f38\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5e95\u5c42\u67b6\u6784\u7684\u7edf\u4e00\uff0c\u5728\u8fd9\u91cc\u518d\u6b21\u4f53\u73b0\u4ef7\u503c\u3002\u8fd9\u4e5f\u662f\u524d\u6587\u53cd\u590d\u5f3a\u8c03&nbsp;DataModel&nbsp;\u7684\u539f\u56e0\uff1a\u5b83\u5e76\u975e\u5355\u4e00\u72ec\u7acb\u529f\u80fd\uff0c\u800c\u662f\u4e32\u8054\u7ec4\u4ef6\u62d3\u5c55\u3001\u591a\u7ec4\u4ef6\u8054\u52a8\u3001\u754c\u9762\u5b58\u6863\u7684\u6838\u5fc3\u4e3b\u7ebf\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2><strong>06<\/strong> <strong>\u8fd9\u4e00\u7bc7\uff0c\u8bf7\u8bb0\u4f4f\u4e09\u53e5\u8bdd<\/strong><\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li><strong>\u7ec4\u4ef6\u54c1\u7c7b\u9f50\u5168\u3002<\/strong><br \/>\u6570\u5341\u7c7b\u57fa\u7840\u3001\u9ad8\u9636\u7ec4\u4ef6\u642d\u914d\u5b8c\u6574\u5e03\u5c40\u5668\uff0c\u5e38\u89c4\u4e1a\u52a1\u65e0\u9700\u62fc\u51d1\u7b2c\u4e09\u65b9\u7ec4\u4ef6\u3002<\/li>\n<li><strong>\u4e07\u7269\u7686&nbsp;Data\u3002<\/strong><br \/>\u4f9d\u6258\u7edf\u4e00&nbsp;DataModel&nbsp;\u7ba1\u7406\u5168\u7ec4\u4ef6\u6570\u636e\uff0c\u4e00\u5957\u64cd\u4f5c\u903b\u8f91\u9002\u914d\u6240\u6709\u7ec4\u4ef6\uff0c\u591a\u89c6\u56fe\u8054\u52a8\u51e0\u4e4e\u96f6\u6210\u672c\u3002<\/li>\n<li><strong>\u754c\u9762\u53ef\u5b8c\u6574\u5e8f\u5217\u5316\u5bfc\u51fa\u3002<\/strong><br \/>\u4e00\u952e\u8f6c\u4e3a&nbsp;JSON&nbsp;\u5b58\u6863\u3001\u52a8\u6001\u914d\u7f6e\u9875\u9762\u3001\u8de8\u7aef\u534f\u4f5c\u90fd\u80fd\u8f7b\u677e\u5b9e\u73b0\u3002<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ec4\u4ef6\u50a8\u5907\u5145\u8db3\u3001\u6570\u636e\u6d41\u8f6c\u987a\u7545\u3001\u754c\u9762\u652f\u6301\u5b58\u6863\u590d\u7528\uff0c\u4f46\u4e00\u5957\u6210\u719f\u7684\u5de5\u5177\u7ec4\u4ef6\u5e93\uff0c\u8fd8\u9700\u8981\u9002\u914d\u5404\u7c7b\u4f7f\u7528\u573a\u666f\uff1a<strong>\u65e5\u95f4\u4eae\u8272\u6a21\u5f0f\u3001\u591c\u95f4\u6697\u8272\u6a21\u5f0f\u3001\u591a\u8bed\u8a00\u56fd\u9645\u5316\u3001\u79fb\u52a8\u7aef\u81ea\u9002\u5e94\uff0c\u5168\u90e8\u8981\u517c\u987e\u3002<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph -->\n<\/p>\n<p><strong>\u4e0b\u4e00\u7bc7\uff0c\u804a\u804a\u7ec4\u4ef6\u591a\u6837\u9002\u914d\u80fd\u529b<\/strong><\/p>\n<p>\n<!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph -->\n<\/p>\n<p style=\"padding-left: 40px;\">\u4e14\u770b\u540c\u4e00\u652f\u753b\u7b14\uff0c\u5982\u4f55\u9002\u914d\u5404\u7c7b\u573a\u666f\u98ce\u683c\u3002<\/p>\n<p>\n<!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n","protected":false},"author":2,"featured_media":7692,"comment_status":"closed","ping_status":"","sticky":true,"template":"","format":"standard","meta":[],"categories":[1],"tags":[14,7,9,922,925,927,929,928,923,924,823],"_links":{"self":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/7685"}],"collection":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/comments?post=7685"}],"version-history":[{"count":2,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/7685\/revisions"}],"predecessor-version":[{"id":7691,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/7685\/revisions\/7691"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/media\/7692"}],"wp:attachment":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/media?parent=7685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/categories?post=7685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/tags?post=7685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}