{"id":687,"date":"2021-08-20T11:42:48","date_gmt":"2021-08-20T03:42:48","guid":{"rendered":"https:\/\/www.stellarplayer.com\/blog\/?p=687"},"modified":"2022-01-21T19:11:28","modified_gmt":"2022-01-21T11:11:28","slug":"687","status":"publish","type":"post","link":"https:\/\/www.stellarplayer.com\/blog\/manual\/687","title":{"rendered":"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf"},"content":{"rendered":"\n<h2>\u4e00. \u4ec0\u4e48\u662f\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\uff1f<\/h2>\n\n\n\n<p>\u6052\u661f\u63d2\u4ef6\u662f\u57fa\u4e8e\u6052\u661f\u64ad\u653e\u5668\u63d0\u4f9b\u7684\u63a5\u53e3\u5f00\u53d1\u7684\u5404\u5f0f\u5404\u6837\u7684\u5c0f\u7a0b\u5e8f\u3002\u8fd9\u4e9b\u5c0f\u7a0b\u5e8f\u7684\u8fd0\u884c\u4f9d\u8d56\u6052\u661f\u64ad\u653e\u5668\uff0c\u4f7f\u7528\u8fd9\u4e9b\u5c0f\u7a0b\u5e8f\u4f60\u53ef\u4ee5\u5b9e\u73b0\u8bf8\u5982\u591a\u5a92\u4f53\u6587\u4ef6\u7ba1\u7406\uff0c\u89c6\u9891\u5904\u7406\u7b49\u7b49\u5404\u79cd\u529f\u80fd\u3002<\/p>\n\n\n\n<h2>\u4e8c. \u5728\u54ea\u91cc\u627e\u5230\u5404\u5f0f\u5404\u6837\u7684\u6052\u661f\u63d2\u4ef6\uff1f<\/h2>\n\n\n\n<p>\u5c1d\u8bd5\u5728\u767e\u5ea6\uff0c\u8d34\u5427\uff0c\u535a\u5ba2\uff0c\u77e5\u4e4e\u7b49\u5730\u65b9\u641c\u7d22\u201c\u6052\u661f\u64ad\u653e\u5668 \u63d2\u4ef6\u201d\uff0c\u6709\u4e9b\u9177\u9177\u7684\u5c0f\u4f19\u4f34\u53ef\u80fd\u4f1a\u5728\u8fd9\u4e9b\u5730\u65b9\u5206\u4eab\u81ea\u5df1\u5f00\u53d1\u7684\u63d2\u4ef6\u94fe\u63a5\uff0c\u5c06\u94fe\u63a5\u7c98\u8d34\u5728\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7ba1\u7406\u9875\u9762\u4e2d\uff0c\u5373\u53ef\u4f53\u9a8c\u8fd9\u4e9b\u5404\u5f0f\u5404\u6837\u7684\u63d2\u4ef6\u3002<\/p>\n\n\n\n<p>\u6052\u661f\u64ad\u653e\u5668\u516c\u5f00\u4e86\u63d2\u4ef6\u5f00\u53d1\u7684\u63a5\u53e3\u548c\u6559\u7a0b\uff0c\u5bf9\u5f00\u53d1\u611f\u5174\u8da3\u7684\u5c0f\u4f19\u4f34\u90fd\u53ef\u4ee5\u5f00\u53d1\u81ea\u5df1\u7684\u4e13\u5c5e\u63d2\u4ef6\uff0c\u7136\u540e\u4e0a\u4f20python\u4ee3\u7801\u6587\u4ef6\u5230github\u4e0a\uff0c\u6700\u540e\u5728\u5404\u7c7b\u793e\u533a\u6216\u81ea\u5a92\u4f53\u5206\u4eab\u4f60\u7684\u63d2\u4ef6github\u5730\u5740\u94fe\u63a5\uff0c\u5c31\u53ef\u4ee5\u8ba9\u5927\u5bb6\u4f53\u9a8c\u4f60\u7684\u4f5c\u54c1\u4e86\u3002<\/p>\n\n\n\n<h2>\u4e09. \u5982\u4f55\u5b89\u88c5\u6052\u661f\u63d2\u4ef6\uff1f<\/h2>\n\n\n\n<p>\u6309\u7167\u5982\u4e0b\u56fe\u6b65\u9aa4\uff0c\u5b89\u88c5\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-8.png\"  class=\"wp-image-862\" width=\"772\" height=\"482\" srcset=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-8.png 960w, https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-8-300x188.png 300w, https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-8-768x480.png 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" title=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe\" alt=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe\" \/><figcaption>\u63d2\u4ef6\u5165\u53e3<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/\u5fae\u4fe1\u622a\u56fe_20220121121616.png\"  class=\"wp-image-850\" width=\"-79\" height=\"-84\" srcset=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/\u5fae\u4fe1\u622a\u56fe_20220121121616.png 424w, https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/\u5fae\u4fe1\u622a\u56fe_20220121121616-279x300.png 279w\" sizes=\"(max-width: 424px) 100vw, 424px\" title=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe1\" alt=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe1\" \/><figcaption>\u63d2\u4ef6\u7ba1\u7406<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/\u5fae\u4fe1\u622a\u56fe_20220121122157.png\"  class=\"wp-image-853\" width=\"-149\" height=\"-157\" srcset=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/\u5fae\u4fe1\u622a\u56fe_20220121122157.png 500w, https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/\u5fae\u4fe1\u622a\u56fe_20220121122157-282x300.png 282w\" sizes=\"(max-width: 500px) 100vw, 500px\" title=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe2\" alt=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe2\" \/><figcaption>\u542f\u7528\u63d2\u4ef6<\/figcaption><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-9.png\"  class=\"wp-image-864\" width=\"726\" height=\"453\" srcset=\"https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-9.png 960w, https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-9-300x188.png 300w, https:\/\/www.stellarplayer.com\/blog\/wp-content\/uploads\/2022\/01\/image-9-768x480.png 768w\" sizes=\"(max-width: 726px) 100vw, 726px\" title=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe3\" alt=\"\u6052\u661f\u64ad\u653e\u5668\u63d2\u4ef6\u7cfb\u7edf\u63d2\u56fe3\" \/><\/figure>\n\n\n\n<h2>\u56db. \u6211\u4e5f\u80fd\u5f00\u53d1\u6052\u661f\u63d2\u4ef6\u5417\uff1f<\/h2>\n\n\n\n<p><strong>\u63d2\u4ef6\u5f00\u53d1\u8005\u4ea4\u6d41QQ\u7fa4\uff1a614038264<\/strong><\/p>\n\n\n\n<h3>\u63d2\u4ef6\u57fa\u7840\u4fe1\u606f<\/h3>\n\n\n\n<p>\u63d2\u4ef6\u90e8\u7f72\u76ee\u5f55 <\/p>\n\n\n\n<p>\u64ad\u653e\u5668 data\u76ee\u5f55 \\pyplugin\\ \u63d2\u4ef6\u76ee\u5f55<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\"><\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<p>\u57fa\u7840\u6587\u4ef6\u7ed3\u6784<\/p>\n\n\n\n<p>\u57fa\u7840\u6587\u4ef6\uff0c\u4f5c\u4e3a\u63d2\u4ef6\u5fc5\u987b\u542b\u6709<code>main.py<\/code>\u548c<code>plugin.prop<\/code>\u4e24\u4e2a\u6587\u4ef6<\/p>\n\n\n\n<ul><li>main.py # \u5165\u53e3\u6587\u4ef6<\/li><li>plugin.prop # \u63d2\u4ef6\u63cf\u8ff0\u6587\u4ef6<\/li><\/ul>\n\n\n\n<p>\u63d2\u4ef6\u76ee\u5f55<\/p>\n\n\n\n<p>\u63d2\u4ef6\u57fa\u672c\u4ee3\u7801\u5c55\u793a<\/p>\n\n\n\n<p>main.py \u5185\u5bb9<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># -*- coding: utf-8 -*- \nimport StellarPlayer\nclass Plugin(StellarPlayer.IStellarPlayerPlugin): \n    def __init__(self, player:StellarPlayer.IStellarPlayer): \n        super().__init__(player) \n    \n    def handleRequest(self, method, args): \n        if hasattr(self.simple, f\"on_{method}\"): \n            getattr(self.simple, f\"on_{method}\")(args) \n            \n    def start(self): \n        print(\"\u63d2\u4ef6\u542f\u52a8\") \n        \n    def stop(self): \n        super().stop() \n        print(\"\u63d2\u4ef6\u505c\u6b62\") \n        \n    def newPlugin(player:StellarPlayer.IStellarPlayer,*arg): \n        print(\"\u63d2\u4ef6\u521d\u59cb\u5316\") \n        return Plugin(player) <\/pre>\n<\/div>\n<\/div>\n\n\n\n<h3>\u63d2\u4ef6\u8fd0\u884c\u539f\u7406<\/h3>\n\n\n\n<p>\u63d2\u4ef6\u542f\u52a8\u8fc7\u7a0b<\/p>\n\n\n\n<ol><li>\u64ad\u653e\u5668\u542f\u52a8<\/li><li>\u52a0\u8f7d\u63d2\u4ef6\u76ee\u5f55<code>main.py<\/code><\/li><li>\u64ad\u653e\u5668\u5728Python\u4e3b\u7ebf\u7a0b\u4e2d\u6267\u884c<code>main.py<\/code>\u4e2d\u7684<code>newPlugin<\/code>\u51fd\u6570\uff0c\u6267\u884c\u521d\u59cb\u5316\u64cd\u4f5c<\/li><li>\u64ad\u653e\u5668\u5728\u72ec\u7acb\u7ebf\u7a0b\u4e2d\u6267\u884c<code>newPlugin<\/code>\u51fd\u6570\u8fd4\u56de\u7684<code>Plugin<\/code>\u5bf9\u8c61\u7684<code>Start<\/code>\u65b9\u6cd5<\/li><\/ol>\n\n\n\n<p>\u63d2\u4ef6\u8fd0\u884c\u72b6\u6001<\/p>\n\n\n\n<p>StellarPlayer.exe # \u64ad\u653e\u5668\u4e3b\u8fdb\u7a0b Pid: 1000 \u7ebf\u7a0b 100 &#8211; python.exe demoA\/main.py =&gt; PluginAObj.Start() # \u63d2\u4ef6A Python\u4e3b\u7ebf\u7a0b \u7ebf\u7a0b 101 &#8211; python.exe demoB\/main.py =&gt; PluginBObj.Start() # \u63d2\u4ef6B Python\u4e3b\u7ebf\u7a0b<\/p>\n\n\n\n<h3>main.py \u4ecb\u7ecd<\/h3>\n\n\n\n<p>main.py \u4e3a\u63d2\u4ef6\u7684\u4e3b\u5165\u53e3\u6587\u4ef6<\/p>\n\n\n\n<p><strong>\u63d2\u4ef6\u521d\u59cb\u5316\u51fd\u6570<\/strong><\/p>\n\n\n\n<p>\u672c\u51fd\u6570\u89e6\u53d1\u65f6\u673a<\/p>\n\n\n\n<ul><li>\u5728\u63d2\u4ef6\u7ba1\u7406\u5668\u624b\u52a8\u6fc0\u6d3b\u63d2\u4ef6\u65f6<\/li><li>\u64ad\u653e\u5668\u542f\u52a8\u4e14\u63d2\u4ef6\u5728\u6fc0\u6d3b\u72b6\u6001<\/li><\/ul>\n\n\n\n<p>\u51fd\u6570\u4f1a\u88ab\u4f20\u5165\u4e00\u4e2a<code>IStellarPlayerPlugin<\/code>\u6d3e\u751f\u7c7b\u5b9e\u4f8b\uff0c\u7c7b\u5b9a\u4e49\u8bf7\u5177\u4f53\u67e5\u770b\u540e\u9762\u7ae0\u8282<code>newPlugin<\/code> \u5165\u53e3\u51fd\u6570<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def newPlugin(player):     \n     \"\"\"\u51fd\u6570\u8c03\u7528\u5165\u53e3\u51fd\u6570     \n     \u53c2\u6570     \n     ----------    \n     player : StellarPlayer.IStellarPlayer         \n     IStellarPlayer\u5bf9\u8c61\u5b9e\u4f8b     \n     \u8fd4\u56de\uff1a         \n          player     \n     \"\"\"  <\/pre>\n<\/div>\n<\/div>\n\n\n\n<p><code>destroyPlugin<\/code>\u9500\u6bc1\u51fd\u6570<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def destroyPlugin(plugin:StellarPlayer.IStellarPlayerPlugin)     \n     \"\"\"\u51fd\u6570\u8c03\u7528\u9500\u6bc1\u51fd\u6570     \n     \u53c2\u6570     ----------     \n     plugin : StellarPlayer.IStellarPlayerPlugin         \n     IStellarPlayerPlugin\u5b9e\u4f8b\u5bf9\u8c61     \n     \u8fd4\u56de\uff1a          \n          player     \n     \"\"\"<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p><strong>\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n\n\n\n<ul><li>\u672c\u65b9\u6cd5\u5728\u89e3\u91ca\u5668\u4e3b\u7ebf\u7a0b\u6267\u884c\uff0c\u53ea\u53ef\u6267\u884c\u4e00\u4e9b\u521d\u59cb\u5316\u7684\u903b\u8f91\uff0c\u6267\u884c\u8017\u65f6\u64cd\u4f5c\u4f1a\u5bfc\u81f4\u64ad\u653e\u5668\u5361\u987f<\/li><li>\u672c\u51fd\u6570\u64ad\u653e\u5668\u5728\u6574\u4e2a\u751f\u547d\u5468\u671f\u4e2d\u53ea\u4f1a\u8c03\u7528\u4e00\u6b21<\/li><\/ul>\n\n\n\n<h3>plugin.prop \u6587\u4ef6\u4ecb\u7ecd<\/h3>\n\n\n\n<p>\u4e3a\u63d2\u4ef6\u7684\u63cf\u8ff0\u6587\u4ef6\uff0c\u4ee5\u6bcf\u4e00\u884c\u4e3akey=value\u7684\u5f62\u5f0f\u8868\u73b0\uff0c\u7f16\u7801\u4e3aUTF-8<\/p>\n\n\n\n<p>\u6587\u4ef6\u5fc5\u9009\u5b57\u6bb5<\/p>\n\n\n\n<ul><li><code>name<\/code>&nbsp;\u6807\u8bc6\u63d2\u4ef6\u540d\u79f0<\/li><li><code>description<\/code>&nbsp;\u63d2\u4ef6\u63cf\u8ff0<\/li><\/ul>\n\n\n\n<h3>\u64ad\u653e\u5668\u5185\u7f6e\u5bf9\u8c61<\/h3>\n\n\n\n<p>\u63d2\u4ef6\u7cfb\u7edf\u7edf\u4e00\u547d\u540d\u89c4\u8303<\/p>\n\n\n\n<ul><li>\u9875\u9762\u540d\u79f0:&nbsp;<code>pageName<\/code><\/li><li>\u63a7\u4ef6\u552f\u4e00\u6807\u8bc6:&nbsp;<code>controlId<\/code><\/li><li>\u5143\u7d20\u7d22\u5f15:&nbsp;<code>itemIndex<\/code><\/li><\/ul>\n\n\n\n<p>IStellarPlayerPlugin \u7c7b\u4ecb\u7ecd<\/p>\n\n\n\n<ul><li>\u8be5\u7c7b\u4e3a\u6240\u6709Python\u63d2\u4ef6\u7684\u901a\u7528\u57fa\u7c7b\uff0c\u5728\u64ad\u653e\u5668Python\u8fd0\u884c\u73af\u5883\u4e2d\u5185\u7f6e\uff0c\u65e0\u9700\u5f15\u7528\u4efb\u4f55\u7c7b\u5e93<\/li><li>\u63d2\u4ef6\u5fc5\u987b\u5b9e\u73b0\u4e00\u4e2a\u7ee7\u627f\u4e8e<code>IStellarPlayerPlugin<\/code>\u7684\u5b50\u7c7b<\/li><\/ul>\n\n\n\n<p>IStellarPlayerPlugin \u7ed3\u6784\u53ca\u529f\u80fd<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class IStellarPlayerPlugin:          \n\n        def __init__(self, player:StellarPlayer.IStellarPlayer):\n            \u6784\u9020\u51fd\u6570         \n            super().__init__(player)  \n   \u200b     \n        def handleRequest(self, method, args):         \n            \u5904\u7406\u64ad\u653e\u5668\u4e8b\u4ef6\u7684\u56de\u8c03\u51fd\u6570         \n            \u53c2\u6570         \n            ----------         \n            method : \u64ad\u653e\u5668\u52a8\u4f5c              \n\u200b     \n        def start(self):         \n            \u63d2\u4ef6\u4e3b\u903b\u8f91\u542f\u52a8\u65b9\u6cd5\uff0c\u64ad\u653e\u5668\u5c06\u4e3b\u52a8\u8c03\u7528\u6b64\u65b9\u6cd5\u542f\u52a8\u63d2\u4ef6\u7684\u6838\u5fc3\u903b\u8f91\n            \u6b64\u65b9\u6cd5\u5c06\u5728python\u72ec\u7acb\u7ebf\u7a0b\u4e2d\u6267\u884c         \n\n\n        def stop(self):\n            \u63d2\u4ef6\u7684\u505c\u6b62\u65b9\u6cd5\uff0c\u8c03\u7528\u672c\u65b9\u6cd5\u53ef\u4ee5\u505c\u6b62\u64ad\u653e\u5668\u5bf9\u63d2\u4ef6\u7684\u7ebf\u7a0b\u6267\u884c\n            \u5b50\u7c7b\u5b9e\u73b0\u6b64\u65b9\u6cd5\u5fc5\u987b\u9700\u8981\u8c03\u7528super().stop()\uff0c\u5426\u5219\u63d2\u4ef6\u7ebf\u7a0b\u65e0\u6cd5\u505c\u6b62         \u200b     \n        def onClick(self,pageName,controlId):\n            \u63a7\u4ef6\u5bf9\u8c61\u7684\u56de\u8c03\u51fd\u6570\n            \u53c2\u6570\n            ----------\n            pageName: \u88ab\u70b9\u51fb\u7684\u9875\u9762\u6807\u8bc6\n            controlId: \u88ab\u70b9\u51fb\u7684\u63a7\u4ef6\u6807\u8bc6\n\n        def onListItemDoubleClick(self,pageName,controlId,itemIndex):  \n            \u5217\u8868\u7684\u67d0\u4e00\u9879\u5143\u7d20\u88ab\u53cc\u51fb\u65f6\uff0c\u8be5\u65b9\u6cd5\u4f1a\u88ab\u8c03\u7528         \n            \u53c2\u6570        \n            ----------         \n            pageName: \u88ab\u53cc\u51fb\u7684\u9875\u9762\u6807\u8bc6         \n            controlId: \u88ab\u53cc\u51fb\u7684\u63a7\u4ef6\u6807\u8bc6         \n            itemIndex: \u88ab\u53cc\u51fb\u7684\u5217\u8868\u5143\u7d20\u7d22\u5f15        \n\n        def onListItemControlClick(\n            self,pageName,listControlId,itemIndex,itemControlId):  \n            \u5217\u8868\u7684\u67d0\u4e00\u9879\u5b50\u5143\u7d20\u63a7\u4ef6\u88ab\u5355\u51fb\u65f6\uff0c\u8be5\u65b9\u6cd5\u88ab\u8c03\u7528         \n            \u53c2\u6570         \n            ----------\n            pageName: \u88ab\u70b9\u51fb\u7684\u9875\u9762\u6807\u8bc6\n            listControlId: \u5217\u8868\u6807\u8bc6\u7b26id\n            itemIndex: \u5217\u8868item\u7d22\u5f15, \u7b2c\u4e00\u4e2a\u5143\u7d20\u7d22\u5f15\u4e3a0\uff0c\u4ee5\u6b64\u7c7b\u63a8\n            itemControlId: \u88ab\u70b9\u51fb\u7684\u5b50\u5143\u7d20id   <\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>StellarPlayer \u7c7b\u4ecb\u7ecd<\/p>\n\n\n\n<ul><li>\u8be5\u7c7b\u4e3a\u6240\u6709Python\u63d2\u4ef6\u7684\u901a\u7528\u57fa\u7c7b\uff0c\u5728\u64ad\u653e\u5668Python\u8fd0\u884c\u73af\u5883\u4e2d\u5185\u7f6e\uff0c\u65e0\u9700\u5f15\u7528\u4efb\u4f55\u7c7b\u5e93<\/li><\/ul>\n\n\n\n<p>IStellarPlayer \u7c7b\u7ed3\u6784\u53ca\u529f\u80fd<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class IStellarPlayer\uff1a \u200b  \n\n   def call(method, *args):\n       \u4e8b\u4ef6\u56de\u8c03\u51fd\u6570\n       \u53c2\u6570 \n       ----------\n       method : \u64ad\u653e\u5668\u52a8\u4f5c\n       args: \u64ad\u653e\u5668\u4f20\u5165\u7684\u53c2\u6570\u6570\u7ec4\uff0c\u4e3a\u53ef\u53d8\u53c2\u6570       \n\n   def doModal(pageName, width, height, title, controls:list):         \n       \u8c03\u7528\u64ad\u653e\u5668\u5f39\u7a97\u7ec4\u4ef6\u6e32\u67d3\n       \u53c2\u6570         \n       ----------\n       pageName : \u5bf9\u8bdd\u6846\u552f\u4e00ID\uff0c\u6b64ID\u662f\u5f53\u524d\u64ad\u653e\u5668\u8fdb\u7a0b\u552f\u4e00\u5b58\u5728\uff0c\u4e0d\u53ef\u5f39\u51fa2\u4e2a\u76f8\u540c\u7684ID\u7684\u5bf9\u8bdd\u6846         \n       width: \u7a97\u53e3\u5bbd\u5ea6 int         \n       height: \u7a97\u53e3\u9ad8\u5ea6 int         \n       title: \u7a97\u53e3\u6807\u9898 string         \n       controls: \u63a7\u4ef6\u914d\u7f6e\u6570\u7ec4\uff0c\u5305\u542b\u6d6e\u7a97\u4e2d\u6e32\u67d3\u7684\u63a7\u4ef6\u914d\u7f6e\u4fe1\u606f\uff0c\u5177\u4f53\u8bf7\u770b \u63d2\u4ef6\u5e03\u5c40\u7cfb\u7edf\u4ecb\u7ecd \u7ae0\u8282         \n\n   def play(url):         \n       \u64ad\u653e\u5668URL\u5730\u5740         \n       \u53c2\u6570\n       ---------- \n       url : \u5a92\u4f53\u8d44\u6e90\u7684URL\u5730\u5740, http\u3001\u78c1\u529b\u94fe\u3001\u672c\u5730\u6587\u4ef6\u8def\u5f84                           \n\n   def getControlValue(pageName, controlId):        \n       \u83b7\u53d6pageId\u5bf9\u8bdd\u6846\u4e2d\uff0ccontrolId\u5bf9\u5e94\u7684\u63a7\u4ef6ID\n       \u53c2\u6570\n       ----------\n       pageId: \u5bf9\u8bdd\u6846Id         \n       controlId: \u63a7\u4ef6\u540d\u79f0 <\/pre>\n<\/div>\n<\/div>\n\n\n\n<h3>\u63d2\u4ef6UI\u5e03\u5c40\u63a7\u4ef6<\/h3>\n\n\n\n<p>\u63a7\u4ef6\u5206\u7c7b<\/p>\n\n\n\n<ul><li>\u8f93\u5165\u6846<ul><li>\u7528\u6237\u8f93\u5165\u6587\u672c\u548c\u6587\u5b57\u4fe1\u606f<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1aedit<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type':'edit',\n     'name':'\u7f16\u8f91\u5668\u6587\u672c' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u590d\u9009\u6846<ul><li>\u5728\u4e00\u7ec4\u9009\u9879\u4e2d\u4efb\u610f\u9009\u62e9\u5408\u9002\u7684\u9009\u9879<\/li><li>\u4ee3\u7801\u6807\u8bc6: check<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type':'check',\n    'name':'\u590d\u9009\u6846' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u5355\u9009\u6846<ul><li>\u5728\u4e00\u7ec4\u9009\u9879\u4e2d\u9009\u62e9\u5176\u4e2d\u4e00\u4e2a<\/li><li>\u4ee3\u7801\u6807\u8bc6: radio<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type':'radio',\n    'name':'\u5355\u9009\u6846' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u6309\u94ae<ul><li>\u5b9e\u73b0\u4e00\u4e2a\u6309\u94ae\u529f\u80fd<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1abutton<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'button',\n    'name': '\u6309\u94ae\u6587\u672c' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u8d85\u94fe\u63a5<ul><li>\u5b9e\u73b0\u4e00\u4e2a\u8d85\u94fe\u63a5<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1alink<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'link',\n    'value': 'https:\/\/www.baidu.com',\n    'name': '\u94fe\u63a5\u6587\u672c' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u6587\u672c<ul><li>\u663e\u793a\u4e00\u6bb5\u6587\u672c<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1alabel<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{    \n    'type': 'label',\n    'name': '\u6587\u672c\u6837\u672c' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u56fe\u7247<ul><li>\u663e\u793a\u4e00\u4e2a\u56fe\u7247<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1aimage<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'image',\n    'value': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg' \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u5206\u5272\u5bf9\u8c61<ul><li>\u5b9e\u73b0\u4e00\u4e2a\u7a7a\u767d\u63a7\u4ef6<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1aspace<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'space'\n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u5206\u7ec4\u63a7\u4ef6<ul><li>\u7528\u4e8e\u63cf\u8ff0\u63a7\u4ef6\u96c6\u5408<\/li><li>\u4ee3\u7801\u6807\u8bc6\uff1agroup<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'group',\n    'dir': 'horizontal' \/\/ horizontal \u6c34\u5e73\u6392\u5217\uff0cvertical \u5782\u76f4\u6392\u5217 \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<ul><li>\u5217\u8868\u7ec4\u4ef6<ul><li>\u4ee3\u7801\u6807\u8bc6: list<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'list',\n    'itemheight': 100, \/\/ list\u6bcf\u4e2a\u5143\u7d20\u7684\u9ad8\u5ea6, \u53ef\u9009\uff0c\u9ed8\u8ba430\n    'marginSize': 10 \/\/ list\u6bcf\u4e2a\u5143\u7d20\u7684\u95f4\u8ddd\u5927\u5c0f\uff0c\u53ef\u9009\uff0c\u9ed8\u8ba41\n    'itemlayout': [ \n        \/\/ \u5217\u8868\u6bcf\u4e00\u884c\u5143\u7d20\u7684\u5e03\u5c40\u914d\u7f6e              \n    ],\n    'value': [] # \u5e03\u5c40\u7684\u6570\u636e \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p><strong>\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n\n\n\n<ol><li>\u884c\u5143\u7d20\u9ad8\u5ea6\u5bbd\u5ea6\u7531<code>itemheight<\/code>\u63a7\u5236\uff0c\u5e03\u5c40\u65f6\u8bf7\u786e\u4fdd\u884c\u5143\u7d20\u7684\u9ad8\u5bbd\u53ef\u4ee5\u5bb9\u4e0b\u5185\u90e8\u5143\u7d20<\/li><\/ol>\n\n\n\n<p>\u7f51\u683c\u7ec4\u4ef6<\/p>\n\n\n\n<ul><li>\u4ee3\u7801\u6807\u8bc6: grid<\/li><\/ul>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{     \n    'type': 'grid',\n    'itemheight': 100, \/\/ list\u6bcf\u4e2a\u5143\u7d20\u7684\u9ad8\u5ea6, \u53ef\u9009\uff0c\u9ed8\u8ba430\n    'marginSize': 10, \/\/ list\u6bcf\u4e2a\u5143\u7d20\u7684\u95f4\u8ddd\u5927\u5c0f\uff0c\u53ef\u9009\uff0c\u9ed8\u8ba41\n    'itemwidth': 30, \/\/ \u6bcf\u4e2a\u5143\u7d20\u7684\u5bbd\u5ea6\n    'itemlayout': [ \n        \/\/ \u7f51\u683c\u6bcf\u4e00\u4e2a\u5143\u7d20\u5e03\u5c40\u7684\u914d\u7f6e, \u6570\u7ec4              \n    ],\n    'value': [] \/\/ \u5e03\u5c40\u7684\u6570\u636e \n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p><strong>\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n\n\n\n<ol><li>\u7f51\u683c\u5143\u7d20\u9ad8\u5ea6\u5bbd\u5ea6\u7531<code>itemheight<\/code>\u548c<code>itemwidth<\/code>\u63a7\u5236\uff0c\u5e03\u5c40\u65f6\u8bf7\u786e\u4fdd\u884c\u5143\u7d20\u7684\u9ad8\u5bbd\u53ef\u4ee5\u5bb9\u4e0b\u5185\u90e8\u5143\u7d20<\/li><\/ol>\n\n\n\n<p>\u63a7\u4ef6\u5c5e\u6027<\/p>\n\n\n\n<p><strong>Width\u5c5e\u6027<\/strong><\/p>\n\n\n\n<ul><li>\u53ef\u9009\u5c5e\u6027\uff0c\u4e0d\u914d\u7f6e\u9ed8\u8ba4\u503c\u4e3a\u81ea\u52a8\u9002\u5e94\u5bbd\u5ea6<\/li><li>\u503c\u914d\u7f6e<ul><li>\u6bd4\u4f8b\u503c\uff0c\u4f7f\u7528\u6d6e\u70b9\u6570\uff0c\u5f53\u524d\u7236\u5bb9\u5668\u5bbd\u5ea6<\/li><li>\u7edd\u5bf9\u503c\uff0c\u4f7f\u7528\u6574\u6570\uff0c\u5355\u4f4d\u4e3a\u50cf\u7d20<\/li><li>\u4e00\u884c\u591a\u5143\u7d20\u5bbd\u5ea6\u7b97\u6cd5<ul><li>\u540c\u4e00\u884c\u4e2d\u6240\u6709\u6240\u6709\u63a7\u4ef6\u6ca1\u6709\u8bbe\u5b9awidth\u5c5e\u6027<ul><li>\u6240\u6709\u63a7\u4ef6\u5c06\u6839\u636e\u7a97\u53e3\u603b\u5bbd\u5ea6\u5e73\u5747\u5206\u914d\u5bbd\u5ea6<\/li><li>\u4f8b\uff1a\u7a97\u53e3\u5bbd100px\uff0c4\u4e2a\u63a7\u4ef6\uff0c\u6bcf\u4e2a\u63a7\u4ef6\u81ea\u52a8\u5bbd\u5ea6\u4e3a25px<\/li><\/ul><\/li><li>\u540c\u4e00\u884c\u4e2d\u6240\u6709\u63a7\u4ef6\u5747\u8bbe\u5b9a\u4e86width\u5c5e\u6027<ul><li>\u5c06\u6309\u7167\u5b9e\u9645\u914d\u7f6e\u5bbd\u5ea6\u6e32\u67d3<\/li><li>\u4f8b\uff1a\u7a97\u53e3\u5bbd100px\uff0c3\u4e2a\u63a7\u4ef6\uff0c\u6bcf\u4e2a\u63a7\u4ef6\u5747\u8bbe\u7f6e\u5bbd\u5ea6\u4e3a25px\uff0c\u4e09\u4e2a\u63a7\u4ef6\u9760\u5de6\u6e32\u67d3\uff0c\u5b9e\u9645\u5bbd\u5ea675px<\/li><\/ul><\/li><li>\u540c\u4e00\u884c\u4e2d\u90e8\u5206\u63a7\u4ef6\u8bbe\u5b9a\u4e86width\u5c5e\u6027<ul><li>\u8bbe\u5b9a\u5bbd\u5ea6\u7684\u63a7\u4ef6\u6309\u7167\u8bbe\u5b9a\u5bbd\u5ea6\u6e32\u67d3<\/li><li>\u5269\u4f59\u672a\u8bbe\u5b9a\u5bbd\u5ea6\u7684\u63a7\u4ef6\u6839\u636e\uff08\u7a97\u53e3\u5bbd\u5ea6 \u2013 \u8bbe\u5b9a\u5bbd\u5ea6\u63a7\u4ef6\u5bbd\u5ea6\u4e4b\u548c\uff09\u5e73\u5206\u5269\u4f59\u5bbd\u5ea6<\/li><li>\u4f8b\uff1a\u7a97\u53e3\u5bbd100px\uff0c3\u4e2a\u63a7\u4ef6\uff0c2\u4e2a\u63a7\u4ef6\u8bbe\u5b9a\u5bbd\u5ea6\u4e3a25px\uff0c1\u4e2a\u63a7\u4ef6\u5bbd\u5ea6\u672a\u8bbe\u7f6e\uff0c\u5b9e\u9645\u6e32\u67d3\u7ed3\u679c\u4e3a 25px\uff08\u8bbe\u5b9a\u5bbd\u5ea6\uff09 + 25px\uff08\u8bbe\u5b9a\u5bbd\u5ea6\uff09 + 50px\uff08\u672a\u8bbe\u5b9a\u5bbd\u5ea6\uff09<\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>height\u5c5e\u6027<\/strong><\/p>\n\n\n\n<ul><li>\u53ef\u9009\u5c5e\u6027\uff0c\u4e0d\u914d\u7f6e\u9ed8\u8ba4\u503c\u4e3a\u81ea\u52a8\u9002\u5e94\u9ad8\u5ea6<\/li><li>\u503c\u914d\u7f6e<ul><li>\u6bd4\u4f8b\u503c\uff0c\u4f7f\u7528\u6d6e\u70b9\u6570\uff0c\u5f53\u524d\u7236\u5bb9\u5668\u9ad8\u5ea6<\/li><li>\u7edd\u5bf9\u503c\uff0c\u4f7f\u7528\u6574\u6570\uff0c\u5355\u4f4d\u4e3a\u50cf\u7d20<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>value\u5c5e\u6027<\/strong><\/p>\n\n\n\n<ul><li>\u53ef\u9009\u5c5e\u6027\uff0c\u7528\u4e8e\u90a3\u4e9b\u4e9b\u9700\u8981\u8bbe\u5b9a\u5185\u5bb9\u3001\u503c\u7684\u63a7\u4ef6<\/li><li>\u5b57\u7b26\u4e32<\/li><\/ul>\n\n\n\n<p><strong>textColor\u5c5e\u6027<\/strong><\/p>\n\n\n\n<ul><li>\u53ef\u9009\u5c5e\u6027<\/li><li>\u5b57\u7b26\u4e32\uff1a\u8bbe\u7f6e\u6587\u672c\u989c\u8272\uff0c\u4f7f\u7528HEX\u8868\u793a\u6cd5\uff1a#ff0000 \u8868\u793a\u7ea2\u8272<\/li><\/ul>\n\n\n\n<p><strong>fontSize\u5c5e\u6027<\/strong><\/p>\n\n\n\n<ul><li>\u53ef\u9009\u5c5e\u6027<\/li><li>\u6574\u6570\u503c\uff1a\u8bbe\u7f6e\u6587\u672c\u5b57\u4f53\u5927\u5c0f\uff0c\u5355\u4f4d\u4e3a\u50cf\u7d20<\/li><\/ul>\n\n\n\n<p><strong>clickable\u5c5e\u6027<\/strong><\/p>\n\n\n\n<ul><li>\u53ef\u9009\u5c5e\u6027<\/li><li>\u4ec5\u9002\u7528<code>label<\/code>\uff0c<code>image<\/code>\u63a7\u4ef6<\/li><li>\u5e03\u5c14\uff1a\u7528\u6765\u8868\u793a\u8be5\u63a7\u4ef6\u662f\u5426\u53ef\u70b9\u51fb<\/li><\/ul>\n\n\n\n<p><strong>@click\u5c5e\u6027<\/strong><\/p>\n\n\n\n<p>\u503c\u4e3a\u70b9\u51fb\u56de\u8c03\u65b9\u6cd5\u540d\u79f0<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\t\n    'type':'button',\n    'name':'Update',\n    'width':60,\n    'matchParent':True,\n    '@click':'on_update_click' # \u70b9\u51fb\u56de\u8c03\u65b9\u6cd5\uff0c\u5bf9\u5e94Plugin\u7c7b\u7684\u540c\u540d\u65b9\u6cd5\n}<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h3>\u63a7\u4ef6\u5e03\u5c40<\/h3>\n\n\n\n<p>\u64ad\u653e\u5668\u5f53\u524d\u4f7f\u7528\u7b80\u5316\u5e03\u5c40\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u5feb\u901f\u5b9a\u4e49UI\u5e03\u5c40<\/p>\n\n\n\n<p><strong>\u57fa\u672c\u539f\u7406<\/strong><\/p>\n\n\n\n<p>\u4e3a\u7b80\u5316\u5e03\u5c40\u5f00\u53d1\u6210\u672c\uff0c\u6052\u661f\u64ad\u653e\u5668\u5f53\u524d\u4f7f\u7528\u7b80\u5355\u7684\u6805\u683c\u5f0f\u5e03\u5c40\u65b9\u5f0f\uff0c\u4ee5\u4e00\u4e2alist\u5217\u8868\u5bf9\u8c61\u4e3a\u5bb9\u5668\uff0c\u5217\u8868\u6bcf\u4e00\u4e2a\u5143\u7d20\u4e3a\u4e00\u884c\uff0c\u4e14\u53ef\u4ee5\u5d4c\u5957<\/p>\n\n\n\n<p>\u793a\u4f8bA\uff0c\u4e24\u4e2a\u6587\u672c\u8f93\u5165\u63a7\u4ef6\u5904\u4e8e\u4e0a\u4e0b\u6392\u5217<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">controls = [     \n    {'type':'edit',  'name':'\u7528\u6237\u540d'},     \n    {'type':'edit',  'name':'\u5bc6\u7801'} \n]<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>\u793a\u4f8bB\uff0c\u4e24\u4e2a\u6587\u672c\u8f93\u5165\u63a7\u4ef6\u5728\u540c\u4e00\u884c\u6392\u5217<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> controls = [ \n    [         \n        {'type':'edit',    'name':'\u7528\u6237\u540d'},              \n        {'type':'edit',    'name':'\u5bc6\u7801'}    \n    ] # \u884c\u4e3a\u5217\u8868\uff0c\u5305\u542b\u4e24\u4e2a\u63a7\u4ef6\u5bf9\u8c61\uff0c\u4e24\u4e2a\u63a7\u4ef6\u5bbd\u5ea6\u5404\u5360\u884c\u7684\u4e00\u534a\u7a7a\u95f4\n ]<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>\u793a\u4f8bC\uff0c<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"prolog\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">controls = [    \n     [        \n            {'type':'edit',     'name':'\u7528\u6237\u540d'},\n            {'type':'edit',     'name':'\u5bc6\u7801'}\n     ], # \u7b2c\u4e00\u884c\uff0c\u53cc\u63a7\u4ef6     \n     {'type':'edit',  'name':'\u9a8c\u8bc1\u7801'} # \u7b2c\u4e8c\u884c\uff0c\u5355\u63a7\u4ef6\n ]<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p><strong>\u5217\u8868\u3001\u7f51\u683c\u5bf9\u8c61\u5e03\u5c40\u548c\u8d4b\u503c<\/strong><\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\u529f\u80fd\u7b80\u4ecb\n 1. \u5217\u8868\/\u7f51\u683c\u5bf9\u8c61\u9700\u8981\u63d0\u4f9b\u5e03\u5c40\u5b9a\u4e49\u5176\u5143\u7d20\u7684\u914d\u7f6e\uff0c\u4f7f\u7528 itemlayout \u5c5e\u6027\u5b9a\u4e49 \n 2. \u5bf9\u5217\u8868\/\u7f51\u683c\u5bf9\u8c61\u586b\u5145\u6570\u636e\uff0c\u9700\u8981\u4f7f\u7528 value \u5bf9\u8c61\u6309\u7167\u5b9a\u4e49\u7684\u5e03\u5c40\u683c\u5f0f\u8fdb\u884c\u586b\u5145  \n\n# \u5b9e\u4f8bA\n [     \n       {        \n           'type': 'list',\n           'itemheight': 100,\n           'itemwidth': 100,\n           'itemlayout': [ # \u5fc5\u987b\u662f\u6570\u7ec4\n              { \n                  'type': 'image',\n                  'name': 'example-photo'\n                  'height': 100,\n                  'width': 50 \n              }\n           ],         \n           'value': [ # \u6e32\u67d35\u884c\u56fe\u7247 \n             {                 \n                   # \u8fd9\u91ccexample-photo\u5bf9\u5e94layout\u4e2d\u5bf9\u8c61\u7684name\uff0c\u6bcf\u884c\u552f\u4e00                                 'example-photo':       'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg' \n             },             \n             {\n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg'\n             },\n             {\n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg'\n             },\n             {\n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg'\n             },\n             {\n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg'\n             },\n         ]     \n       }\n ]\n\n\n \u200b # \u5b9e\u4f8bB\n \u200b [\n     {\n         'type': 'list',\n         'itemheight': 100,\n         'itemwidth': 100,\n         'itemlayout': [ # \u4e00\u884c\u542b\u6709\u4e00\u4e2a\u56fe\u7247\u548c\u4e00\u4e2a\u6587\u672c\u6807\u8bb0\u5143\u7d20\n             {\n                 'type': 'image',\n                 'name': 'example-photo'\n             },\n             {\n                 'type': 'label',\n                 'name': 'example-label'\n             }\n         ],\n         'value': [\n             {\n                 # \u8fd9\u91ccexample-photo\u5bf9\u5e94layout\u4e2d\u5bf9\u8c61\u7684name\uff0c\u6bcf\u884c\u552f\u4e00                 \n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg',                 \n                 'example-label' : '\u8fd9\u662f\u4e00\u884c\u6f14\u793a\u6587\u672c'\n             },\n             {\n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg',\n                 'example-label' : '\u8fd9\u662f\u4e00\u884c\u6f14\u793a\u6587\u672c'\n             },\n             {\n                 'example-photo': 'https:\/\/wx1.sinaimg.cn\/orj360\/006wVUPtgy1gstem06e9sj30u018fgwy.jpg',\n                 'example-label' : '\u8fd9\u662f\u4e00\u884c\u6f14\u793a\u6587\u672c'\n             }\n          ]\n      }\n ]<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h3>\u63d2\u4ef6\u65e5\u5fd7\u76ee\u5f55<\/h3>\n\n\n\n<p>\u6253\u5f00Windows\u6587\u4ef6\u7ba1\u7406\u5668\uff0c\u5728\u5730\u5740\u680f\u8f93\u5165\u8fd9\u4e2a\u5730\u5740\uff0c\u5373\u53ef\u6253\u5f00\u65e5\u5fd7\u76ee\u5f55<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>%APPDATA%\\StellarPlayer\\logs<\/p><\/blockquote>\n\n\n\n<ul><li>\u9ed8\u8ba4\u64ad\u653e\u5668\u4f1a\u62c6\u5206\u63d2\u4ef6\u65e5\u5fd7\uff0c\u683c\u5f0f\u4e3a Plugin-\u65e5\u671f-\u65f6\u5206.log<\/li><li>\u4e3a\u4e86\u65b9\u4fbf\u8c03\u8bd5\uff0c\u53ef\u4ee5\u5728\u64ad\u653e\u5668\u5b89\u88c5\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u6587\u4ef6\uff0c\u540d\u79f0\u4e3a single_log_flag\uff0c\u64ad\u653e\u5668\u4f1a\u5c06\u6240\u6709\u63d2\u4ef6\u65e5\u5fd7\u5408\u5e76\u5230Plugin-.log\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u65b9\u4fbf\u8c03\u8bd5\u5f00\u53d1<\/li><\/ul>\n\n\n\n<h3>\u6253\u5370\u65e5\u5fd7<\/h3>\n\n\n\n<p>\u76f4\u63a5\u4f7f\u7528python\u7684print\u51fd\u6570\u6253\u5370\u65e5\u5fd7\uff0c\u6253\u5370\u5185\u5bb9\u4f1a\u81ea\u52a8\u8f93\u51fa\u5230\u65e5\u5fd7\u6587\u4ef6\u4e2d<\/p>\n\n\n\n<h3>\u63d2\u4ef6\u4ee3\u7801\u91cd\u65b0\u52a0\u8f7d<\/h3>\n\n\n\n<p>\u4fee\u6539\u63d2\u4ef6\u4ee3\u7801\u4ee3\u7801\u540e\uff0c\u8bf7\u5728\u63d2\u4ef6\u9762\u677f\u5173\u95ed\u5e76\u91cd\u542f\u6fc0\u6d3b\u63d2\u4ef6\uff0c\u64ad\u653e\u5668\u4f1a\u91cd\u65b0\u52a0\u8f7d\u63d2\u4ef6\u4ee3\u7801\u5e76\u6267\u884c<\/p>\n\n\n\n<h3>\u53c2\u8003\u6587\u6863<\/h3>\n\n\n\n<p>python\u6587\u6863\u7f16\u5199\u6307\u5357<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/realpython.com\/documenting-python-code\/#docstring-formats\n<\/div><\/figure>\n\n\n\n<h3>\u63d2\u4ef6\u57fa\u7840\u8fd0\u884c\u73af\u5883<\/h3>\n\n\n\n<p>Python \u8fd0\u884c\u73af\u5883\u7248\u672c\u4fe1\u606f<\/p>\n\n\n\n<p>Windows 64\u4f4d&nbsp;<code>V3.8.10<\/code><\/p>\n\n\n\n<p>Python \u5185\u7f6e\u7c7b\u5e93\u4fe1\u606f<\/p>\n\n\n\n<p>\u6253\u5370\u5df2\u8fd0\u884c\u73af\u5883\u4e2d\u5b89\u88c5\u7684\u5305\u53ca\u7248\u672c\u7684\u53f7\u7684\u4ee3\u7801<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import pkg_resources\n installed_packages = pkg_resources.working_set\n installed_packages_list = sorted([\"%s==%s\" % (i.key, i.version)\n      for i in installed_packages])\n print(installed_packages_list)<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>\u8fd0\u884c\u73af\u5883\u5185\u7f6e\u529f\u80fd\u5e93\u53ca\u7248\u672c<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Beautiful Soup \u662f\u4e00\u4e2a\u53ef\u4ee5\u4eceHTML\u6216XML\u6587\u4ef6\u4e2d\u63d0\u53d6\u6570\u636e\u7684Python\u5e93.\u5b83\u80fd\u591f\u901a\u8fc7\u4f60\u559c\u6b22\u7684\u8f6c\u6362\u5668\u5b9e\u73b0\u60ef\u7528\u7684\u6587\u6863\u5bfc\u822a,\u67e5\u627e,\u4fee\u6539\u6587\u6863\u7684\u65b9\u5f0f.Beautiful Soup\u4f1a\u5e2e\u4f60\u8282\u7701\u6570\u5c0f\u65f6\u751a\u81f3\u6570\u5929\u7684\u5de5\u4f5c\u65f6\u95f4.\n\n# \u6587\u6863https:\/\/beautifulsoup.readthedocs.io\/zh_CN\/v4.4.0\/beautifulsoup4==4.9.3\n\n# \u9a8c\u8bc1ssl\u8bc1\u4e66\u7684\u53ef\u4fe1\u5ea6 certifi==2021.5.30\n\n# \u6587\u672c\u7f16\u7801\u5e93\n\n# https:\/\/charset-normalizer.readthedocs.io\/en\/latest\/charset-normalizer==2.0.3\n\n# \u57df\u540d\u89e3\u6790\u5e93\n# \u6587\u6863https:\/\/pypi.org\/project\/idna\/idna==3.2\n\n# python\u5305\u7ba1\u7406\u5e93pip==21.1.3 \n\n# http\u8bf7\u6c42\u5e93\n# \u6587\u6863 https:\/\/docs.python-requests.org\/zh_CN\/latest\/requests==2.26.0\n\n# \u5b89\u88c5\u5de5\u5177setuptools==57.4.0\n\n# CSS\u9009\u62e9\u5f15\u64ce\n# \u6587\u6863 https:\/\/pypi.org\/project\/soupsieve\/soupsieve==2.2.1\n\n# URL\u8bf7\u6c42\u5e93\n# \u6587\u6863 https:\/\/urllib3.readthedocs.io\/en\/stable\/urllib3==1.26.6\n\n# Wheel\u5b89\u88c5\u5305\u5e93\n# \u6587\u6863 https:\/\/pythonwheels.com\/wheel==0<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6052\u661f\u63d2\u4ef6\u662f\u57fa\u4e8e\u6052\u661f\u64ad\u653e\u5668\u63d0\u4f9b\u7684\u63a5\u53e3\u5f00\u53d1\u7684\u5404\u5f0f\u5404\u6837\u7684\u5c0f\u7a0b\u5e8f\u3002\u8fd9\u4e9b\u5c0f\u7a0b\u5e8f\u7684\u8fd0\u884c\u4f9d\u8d56\u6052\u661f\u64ad\u653e\u5668\uff0c\u4f7f\u7528\u8fd9\u4e9b\u5c0f\u7a0b\u5e8f\u4f60\u53ef\u4ee5\u5b9e\u73b0\u8bf8\u5982\u591a\u5a92\u4f53\u6587\u4ef6\u7ba1\u7406\uff0c\u89c6\u9891\u5904\u7406\u7b49\u7b49\u5404\u79cd\u529f\u80fd\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/posts\/687"}],"collection":[{"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/comments?post=687"}],"version-history":[{"count":17,"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/posts\/687\/revisions"}],"predecessor-version":[{"id":866,"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/posts\/687\/revisions\/866"}],"wp:attachment":[{"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/media?parent=687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/categories?post=687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stellarplayer.com\/blog\/wp-json\/wp\/v2\/tags?post=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}