forked from NervJS/taro
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(weapp): support skyline components
- Loading branch information
Showing
48 changed files
with
1,936 additions
and
1,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { h } from '@stencil/core' | ||
import { newSpecPage, SpecPage } from '@stencil/core/testing' | ||
|
||
import { Span } from '../src/components/span/span' | ||
import { printUnimplementedWarning } from './utils' | ||
|
||
const logError = jest.fn() | ||
console.error = logError | ||
|
||
describe('Span', () => { | ||
let page: SpecPage | ||
|
||
it('unimplemented', async () => { | ||
page = await newSpecPage({ | ||
components: [Span], | ||
template: () => <taro-span-core />, | ||
}) | ||
await page.waitForChanges() | ||
|
||
expect(page.root).toEqualHtml(` | ||
<taro-span-core></taro-span-core> | ||
`) | ||
expect(logError).toHaveBeenCalledWith(printUnimplementedWarning(page.root)) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# taro-span-core | ||
|
||
<!-- Auto Generated Below --> | ||
|
||
|
||
---------------------------------------------- | ||
|
||
*Built with [StencilJS](https://stenciljs.com/)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component, ComponentInterface, h, Host } from '@stencil/core' | ||
|
||
import { notSupport } from '../../utils' | ||
|
||
@Component({ | ||
tag: 'taro-span-core', | ||
}) | ||
export class Span implements ComponentInterface { | ||
componentDidLoad() { | ||
notSupport('Span', this) | ||
} | ||
|
||
render() { | ||
return <Host /> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from './common' | ||
|
||
interface SpanProps extends StandardProps { } | ||
|
||
/** | ||
* 用于支持内联文本和 image / navigator 的混排 | ||
* @classification skyline | ||
* @supported weapp | ||
* @see https://developers.weixin.qq.com/miniprogram/dev/component/span.html | ||
*/ | ||
declare const Span: ComponentType<SpanProps> | ||
export { Span, SpanProps } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.