Merge pull request #113 from Tencent/omi-ts-support-png

Add png support for omi-ts template
This commit is contained in:
当耐特 2018-10-25 11:14:04 +08:00 committed by GitHub
commit cb9ee30aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,7 @@
declare module '*.svg'
declare module '*.png'
declare module '*.jpg'
declare module '*.jpeg'
declare module '*.gif'
declare module '*.bmp'
declare module '*.tiff'

View File

@ -1,6 +1,8 @@
import { tag, WeElement, render, h } from 'omi'
import './hello-omi';
import * as logo from './omi.png';
interface AbcEvent extends Event {
detail: {
name: string;
@ -47,6 +49,7 @@ class MyApp extends WeElement<MyAppProps, MyAppData> {
render() {
return (
<div>
<img src={logo} />
Hello {this.props.name} {this.data.abc}
<hello-omi onAbc={this.onAbc} prop-from-parent={this.data.passToChild} msg="Omi"></hello-omi>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB