From 87da12c6ebaee7107b923a24335737c8537e2da0 Mon Sep 17 00:00:00 2001 From: wscats <2587575267@qq.com> Date: Tue, 11 Jun 2019 09:13:44 +0800 Subject: [PATCH] rename rename component which omil -> app-omil --- .../elements/{omil => app-omil}/_index.css | 2 +- .../app/src/elements/app-omil/index.eno | 49 +++++++++++++++++++ .../{omil/index.omi.js => app-omil/index.js} | 10 ++-- .../src/elements/{omil => app-omil}/index.omi | 8 +-- .../template/app/src/elements/app/index.js | 2 +- 5 files changed, 61 insertions(+), 10 deletions(-) rename packages/omi-cli/template/app/src/elements/{omil => app-omil}/_index.css (96%) create mode 100644 packages/omi-cli/template/app/src/elements/app-omil/index.eno rename packages/omi-cli/template/app/src/elements/{omil/index.omi.js => app-omil/index.js} (86%) rename packages/omi-cli/template/app/src/elements/{omil => app-omil}/index.omi (77%) diff --git a/packages/omi-cli/template/app/src/elements/omil/_index.css b/packages/omi-cli/template/app/src/elements/app-omil/_index.css similarity index 96% rename from packages/omi-cli/template/app/src/elements/omil/_index.css rename to packages/omi-cli/template/app/src/elements/app-omil/_index.css index a3eff2ef6..94fac9214 100755 --- a/packages/omi-cli/template/app/src/elements/omil/_index.css +++ b/packages/omi-cli/template/app/src/elements/app-omil/_index.css @@ -1,4 +1,4 @@ -.omil { +.app-omil { margin-top: 20px; } diff --git a/packages/omi-cli/template/app/src/elements/app-omil/index.eno b/packages/omi-cli/template/app/src/elements/app-omil/index.eno new file mode 100644 index 000000000..185586fdd --- /dev/null +++ b/packages/omi-cli/template/app/src/elements/app-omil/index.eno @@ -0,0 +1,49 @@ + + + \ No newline at end of file diff --git a/packages/omi-cli/template/app/src/elements/omil/index.omi.js b/packages/omi-cli/template/app/src/elements/app-omil/index.js similarity index 86% rename from packages/omi-cli/template/app/src/elements/omil/index.omi.js rename to packages/omi-cli/template/app/src/elements/app-omil/index.js index 3d8736d38..14745fd30 100644 --- a/packages/omi-cli/template/app/src/elements/omil/index.omi.js +++ b/packages/omi-cli/template/app/src/elements/app-omil/index.js @@ -9,12 +9,12 @@ const appOmil = class extends WeElement { return h( "div", { - class: "omil" + class: "app-omil" }, h( "button", { - onClick: this.testClick.bind(this), + onClick: this.omiSnippets.bind(this), class: "weui-btn weui-btn_primary", style: "width: 200px;" }, @@ -59,8 +59,10 @@ const appOmil = class extends WeElement { title: "I am omil button." }; } - testClick() { - console.log("omil"); + omiSnippets() { + window.open( + "https://marketplace.visualstudio.com/items?itemName=Wscats.omi-snippets" + ); } }; diff --git a/packages/omi-cli/template/app/src/elements/omil/index.omi b/packages/omi-cli/template/app/src/elements/app-omil/index.omi similarity index 77% rename from packages/omi-cli/template/app/src/elements/omil/index.omi rename to packages/omi-cli/template/app/src/elements/app-omil/index.omi index b6c14bd40..185586fdd 100644 --- a/packages/omi-cli/template/app/src/elements/omil/index.omi +++ b/packages/omi-cli/template/app/src/elements/app-omil/index.omi @@ -1,6 +1,6 @@ diff --git a/packages/omi-cli/template/app/src/elements/app/index.js b/packages/omi-cli/template/app/src/elements/app/index.js index bfb444831..6e2bb249f 100755 --- a/packages/omi-cli/template/app/src/elements/app/index.js +++ b/packages/omi-cli/template/app/src/elements/app/index.js @@ -1,7 +1,7 @@ import { define, WeElement } from 'omi' import logo from './logo.svg' import '../app-intro' -import '../omil/index.omi.js' +import '../app-omil' import 'omiu/button' define('my-app', class extends WeElement {