{"id":3372,"date":"2022-04-01T15:31:53","date_gmt":"2022-04-01T07:31:53","guid":{"rendered":"http:\/\/139.9.1.231\/?p=3372"},"modified":"2022-04-01T15:43:29","modified_gmt":"2022-04-01T07:43:29","slug":"chameleon","status":"publish","type":"post","link":"http:\/\/139.9.1.231\/index.php\/2022\/04\/01\/chameleon\/","title":{"rendered":"chameleon"},"content":{"rendered":"\n<p>\u4e00\u5957\u4ee3\u7801\u8fd0\u884c\u591a\u7aef\uff0c\u4e00\u7aef\u6240\u89c1\u5373\u591a\u7aef\u6240\u89c1<\/p>\n\n\n\n<p>\u6ef4\u6ef4\u5f00\u53d1github\uff1a<a href=\"https:\/\/github.com\/didi\/chameleon\">https:\/\/github.com\/didi\/chameleon<\/a><\/p>\n\n\n\n<p>\u652f\u6301\u5e73\u53f0\uff1a<strong>web\u3001\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u3001\u652f\u4ed8\u5b9d\u5c0f\u7a0b\u5e8f\u3001\u767e\u5ea6\u5c0f\u7a0b\u5e8f\u3001<a href=\"https:\/\/github.com\/chameleon-team\/chameleon-sdk-android\">android(weex)<\/a>\u3001<a href=\"https:\/\/github.com\/chameleon-team\/chameleon-sdk-ios\">ios(weex)<\/a>\u3001qq \u5c0f\u7a0b\u5e8f\u3001<a href=\"https:\/\/cml.js.org\/doc\/example\/tt_miniapp.html\">\u5b57\u8282\u8df3\u52a8\u5c0f\u7a0b\u5e8f<\/a>\u3001<a href=\"https:\/\/cml.js.org\/doc\/example\/quickapp_miniapp.html\">\u5feb\u5e94\u7528<\/a>\u3001\u6301\u7eed\u66f4\u65b0\u4e2d<\/strong><\/p>\n\n\n\n<p><strong>\u4e00\u7aef\u6240\u89c1\u5373\u591a\u7aef\u6240\u89c1<\/strong>\u2014\u2014\u591a\u7aef\u9ad8\u5ea6\u4e00\u81f4\uff0c\u65e0\u9700\u5173\u6ce8\u5404\u7aef\u6587\u6863\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>\u57fa\u4e8e\u591a\u6001\u534f\u8bae\u4e0d\u5f71\u54cd\u5404\u7aef\u5dee\u5f02\u5316\u7075\u6d3b\u6027<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/github.com\/beatles-chameleon\/cml-demo\"><img src=\"https:\/\/camo.githubusercontent.com\/6adcf0812a20e9a612f3403393aeeeb038c420822367ca2cb9f75572abcae20f\/68747470733a2f2f636d6c2e6a732e6f72672f646f632f6173736574732f656666696369656e742e676966\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>\u4ee3\u7801\u793a\u4f8b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;template&gt;\n  &lt;view&gt;\n    &lt;text&gt;{{title}}&lt;\/text&gt;&lt;text&gt;{{reversedTitle}}&lt;\/text&gt;\n  &lt;\/view&gt;\n&lt;\/template&gt;\n\n&lt;script&gt;\nclass Index  {\n  data = {\n    title: \"chameleon\"\n  }\n  computed = {\n    reversedTitle: function () {\n      return this.title.split('').reverse().join('')\n    }\n  }\n  mounted() {}\n  destroyed() {}\n}\nexport default new Index();\n&lt;\/script&gt;<\/pre>\n\n\n\n<p>\u4ece\u4e8b\u8fc7\u7f51\u9875\u7f16\u7a0b\u7684\u4eba\u77e5\u9053\uff0c\u7f51\u9875\u7f16\u7a0b\u91c7\u7528\u7684\u662f HTML + CSS + JS \u8fd9\u6837\u7684\u7ec4\u5408\uff0c\u540c\u6837\u9053\u7406\uff0cchameleon \u4e2d\u91c7\u7528\u7684\u662f CML + CMSS + JS\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/cml.js.org\/doc\/logic\/logic.html\">JS<\/a>\u8bed\u6cd5\u7528\u4e8e\u5904\u7406\u9875\u9762\u7684\u903b\u8f91\u5c42\uff0c\u4e0e\u666e\u901a\u7f51\u9875\u7f16\u7a0b\u76f8\u6bd4\uff0c\u672c\u9879\u76ee\u76ee\u6807\u5b9a\u4e49\u6807\u51c6 MVVM \u6846\u67b6\uff0c\u62e5\u6709\u5b8c\u6574\u7684\u751f\u547d\u5468\u671f\uff0cwatch\uff0ccomputed\uff0c\u6570\u636e\u53cc\u5411\u7ed1\u5b9a\u7b49\u4f18\u79c0\u7684\u7279\u6027\uff0c\u80fd\u591f\u5feb\u901f\u63d0\u9ad8\u5f00\u53d1\u901f\u5ea6\u3001\u964d\u4f4e\u7ef4\u62a4\u6210\u672c\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/cml.js.org\/doc\/view\/cml.html\">CML<\/a>\uff08Chameleon Markup Language\uff09\u7528\u4e8e\u63cf\u8ff0\u9875\u9762\u7684\u7ed3\u6784\uff0c\u6211\u4eec\u77e5\u9053 HTML \u662f\u6709\u4e00\u5957\u6807\u51c6\u7684\u8bed\u4e49\u5316\u6807\u7b7e\uff0c\u4f8b\u5982\u6587\u672c\u662f<code>&lt;span&gt;<\/code>&nbsp;\u6309\u94ae\u662f<code>&lt;button&gt;<\/code>\u3002CML \u540c\u6837\u5177\u6709\u4e00\u5957\u6807\u51c6\u7684\u6807\u7b7e\uff0c\u6211\u4eec\u5c06\u6807\u7b7e\u5b9a\u4e49\u4e3a<code>\u7ec4\u4ef6<\/code>\uff0cCML \u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217<a href=\"https:\/\/cml.js.org\/doc\/component\/base\/base.html\">\u7ec4\u4ef6<\/a>\u3002\u540c\u65f6 CML \u4e2d\u8fd8\u652f\u6301<strong>\u6a21\u677f\u8bed\u6cd5<\/strong>\uff0c\u4f8b\u5982\u6761\u4ef6\u6e32\u67d3\u3001\u5217\u8868\u6e32\u67d3\uff0c\u6570\u636e\u7ed1\u5b9a\u7b49\u7b49\u3002\u540c\u65f6\uff0cCML \u652f\u6301\u4f7f\u7528<a href=\"https:\/\/cml.js.org\/doc\/view\/vue.html\">\u7c7b VUE \u8bed\u6cd5<\/a>\uff0c\u8ba9\u4f60\u66f4\u5feb\u5165\u624b\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/cml.js.org\/doc\/view\/cmss.html\">CMSS<\/a>(Chameleon Style Sheets)\u7528\u4e8e\u63cf\u8ff0 CML \u9875\u9762\u7ed3\u6784\u7684\u6837\u5f0f\u8bed\u8a00\uff0c\u5176\u5177\u6709\u5927\u90e8\u5206 CSS \u7684\u7279\u6027\uff0c\u5e76\u4e14\u8fd8\u53ef\u4ee5\u652f\u6301\u5404\u79cd css \u7684\u9884\u5904\u8bed\u8a00<code>less stylus<\/code>\u3002<\/p>\n\n\n\n<p>CML \u91c7\u7528\u4e0e Vue \u4e00\u81f4\u7684\u7ec4\u4ef6\u5316\u65b9\u6848\u3001\u5355\u6587\u4ef6\u7ec4\u7ec7\u65b9\u5f0f\u3001\u751f\u547d\u5468\u671f\uff0c\u540c\u65f6\u6570\u636e\u54cd\u5e94\u80fd\u529b\u5bf9\u9f50 Vue\uff0c\u6570\u636e\u7ba1\u7406\u80fd\u529b\u5bf9\u9f50 Vuex\uff0c\u975e\u5e38\u65b9\u4fbf\u5f00\u53d1\u8005\u4e0a\u624b\u3001\u7ef4\u62a4\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0a\u5bf9\u4e8e\u5f00\u53d1\u8bed\u8a00\u7684\u4ecb\u7ecd\uff0c\u76f8\u4fe1\u4f60\u770b\u5230\u53ea\u8981\u662f\u6709\u8fc7\u7f51\u9875\u7f16\u7a0b\u77e5\u8bc6\u7684\u4eba\u90fd\u53ef\u4ee5\u5feb\u901f\u7684\u4e0a\u624bchameleon\u7684\u5f00\u53d1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u5957\u4ee3\u7801\u8fd0\u884c\u591a\u7aef\uff0c\u4e00\u7aef\u6240\u89c1\u5373\u591a\u7aef\u6240\u89c1 \u6ef4\u6ef4\u5f00\u53d1github\uff1ahttps:\/\/github.com\/didi\/c &hellip; <a href=\"http:\/\/139.9.1.231\/index.php\/2022\/04\/01\/chameleon\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">chameleon<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/3372"}],"collection":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/comments?post=3372"}],"version-history":[{"count":3,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/3372\/revisions"}],"predecessor-version":[{"id":3375,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/3372\/revisions\/3375"}],"wp:attachment":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/media?parent=3372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/categories?post=3372"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/tags?post=3372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}