1 | import { ComponentType } from 'react'
|
2 |
|
3 | import { StandardProps } from './common'
|
4 |
|
5 | interface ScriptProps extends StandardProps {
|
6 | |
7 |
|
8 |
|
9 | src: string
|
10 | |
11 |
|
12 |
|
13 | module: string
|
14 | }
|
15 |
|
16 | /** script 类似微信小程序的 wxs 标签,支持引用各种小程序的 xs 文件
|
17 | * 只能在 CompileMode 中使用
|
18 | * @classification viewContainer
|
19 | * @supported weapp, swan, alipay, tt, jd, qq
|
20 | * @example_react
|
21 | * ```tsx
|
22 | * import { Component } from 'react'
|
23 | * import { View, Script } from '@tarojs/components'
|
24 | *
|
25 | * export function Index () {
|
26 | * return (
|
27 | * <View compileMode>
|
28 | * <Script src="./logic.wxs" module="logic"></Script>
|
29 | * <Text>Hello, {logic.name}!</Text>
|
30 | * </View>
|
31 | * )
|
32 | * }
|
33 | * ```
|
34 | */
|
35 | declare const Script: ComponentType<ScriptProps>
|
36 |
|
37 | export { Script, ScriptProps }
|
38 |
|
\ | No newline at end of file |