From b9c19b3bf8217ce551f9bb244aecc9d5303ab915 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Wed, 14 Nov 2018 09:35:36 +0800 Subject: [PATCH] eslint --- packages/omi/examples/template/main.js | 17 ++++++----------- packages/omi/examples/template/my-template.js | 14 +++++++------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/packages/omi/examples/template/main.js b/packages/omi/examples/template/main.js index b5b9a1fff..f889ca838 100644 --- a/packages/omi/examples/template/main.js +++ b/packages/omi/examples/template/main.js @@ -2,21 +2,16 @@ import { define, render, WeElement } from '../../src/omi' import tpl from './my-template' define('my-app', class extends WeElement { - - css() { - return ` + css() { + return ` div{ color: green; }` - } + } - render(props, data) { - return ( -
- {tpl({ name: 'zhanglei', age: 18 })} -
- ) - } + render() { + return
{tpl({ name: 'zhanglei', age: 18 })}
+ } }) render(, 'body') diff --git a/packages/omi/examples/template/my-template.js b/packages/omi/examples/template/my-template.js index 2b4ae0dd5..0d7a41ff3 100644 --- a/packages/omi/examples/template/my-template.js +++ b/packages/omi/examples/template/my-template.js @@ -1,8 +1,8 @@ -export default function tpl(data){ - return ( -
-
name: {data.name}
-
age: {data.age}
-
- ) +export default function tpl(data) { + return ( +
+
name: {data.name}
+
age: {data.age}
+
+ ) }