Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"packages/taro-tt",
"packages/taro-qq",
"packages/taro-jd",
"packages/taro-quickapp",
"packages/taro-plugin-html",
"packages/taro-plugin-react-devtools",
"packages/taro-plugin-vue-devtools"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"webpack-merge": "^4.2.2"
},
"dependencies": {
"@rollup/plugin-json": "^4.1.0",
"@types/babel__traverse": "^7.0.7",
"@types/react-reconciler": "0.26.1",
"rollup-plugin-copy": "^3.4.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const Input = {
focus: 'false',
'confirm-type': singleQuote('done'),
'confirm-hold': 'false',
cursor: 'i.value.length',
cursor: '(i.value && i.value.length)',
'selection-start': '-1',
'selection-end': '-1',
bindInput: '',
Expand Down
6 changes: 3 additions & 3 deletions packages/shared/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ import { Shortcuts } from './shortcuts'
import { isBooleanStringLiteral, isNumber, isFunction } from './is'
import { toCamelCase, toKebabCase, toDashed, hasOwn, indent } from './utils'

interface Component {
export interface Component {
nodeName: string;
attributes: Attributes;
}

interface Components {
export interface Components {
[key: string]: Record<string, string>;
}

interface ComponentConfig {
export interface ComponentConfig {
includes: Set<string>
exclude: Set<string>
thirdPartyComponents: Map<string, Set<string>>
Expand Down
1 change: 1 addition & 0 deletions packages/taro-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@tarojs/plugin-platform-swan": "3.3.3",
"@tarojs/plugin-platform-tt": "3.3.3",
"@tarojs/plugin-platform-weapp": "3.3.3",
"@tarojs/plugin-platform-quickapp": "3.3.3",
"@tarojs/service": "3.3.3",
"@tarojs/shared": "3.3.3",
"@tarojs/taro": "3.3.3",
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export default class CLI {
'@tarojs/plugin-platform-swan',
'@tarojs/plugin-platform-tt',
'@tarojs/plugin-platform-qq',
'@tarojs/plugin-platform-jd'
'@tarojs/plugin-platform-jd',
'@tarojs/plugin-platform-quickapp'
]
customCommand('build', kernel, {
_: args._,
Expand Down
94 changes: 47 additions & 47 deletions packages/taro-components/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
export { ScrollView } from './ScrollView'
export { View } from './View'
export { Block } from './Block'
export { Swiper } from './Swiper'
export { SwiperItem } from './SwiperItem'
export { MatchMedia } from './MatchMedia'
export { MovableView } from './MovableView'
export { MovableArea } from './MovableArea'
export { CoverView } from './CoverView'
export { CoverImage } from './CoverImage'
export { Icon } from './Icon'
export { Text } from './Text'
export { RichText } from './RichText'
export { Progress } from './Progress'
export { Button, ButtonProps } from './Button'
export { Checkbox } from './Checkbox'
export { CheckboxGroup } from './CheckboxGroup'
export { Editor } from './Editor'
export { Form } from './Form'
export { Input } from './Input'
export { Label } from './Label'
export { Picker } from './Picker'
export { PickerView } from './PickerView'
export { PickerViewColumn } from './PickerViewColumn'
export { Radio } from './Radio'
export { RadioGroup } from './RadioGroup'
export { Slider } from './Slider'
export { Switch } from './Switch'
export { Textarea } from './Textarea'
export { Image } from './Image'
export { Navigator } from './Navigator'
export { Camera } from './Camera'
export { Canvas } from './Canvas'
export { OpenData } from './OpenData'
export { Video } from './Video'
export { Ad } from './Ad'
export { Audio } from './Audio'
export { FunctionalPageNavigator } from './FunctionalPageNavigator'
export { LivePlayer } from './LivePlayer'
export { LivePusher } from './LivePusher'
export { Map } from './Map'
export { WebView } from './WebView'
export { OfficialAccount } from './OfficialAccount'
export { NavigationBar } from './NavigationBar'
export { PageMeta } from './PageMeta'
export { Slot } from './Slot'
export { CustomWrapper } from './CustomWrapper'
export * from './ScrollView'
export * from './View'
export * from './Block'
export * from './Swiper'
export * from './SwiperItem'
export * from './MatchMedia'
export * from './MovableView'
export * from './MovableArea'
export * from './CoverView'
export * from './CoverImage'
export * from './Icon'
export * from './Text'
export * from './RichText'
export * from './Progress'
export * from './Button'
export * from './Checkbox'
export * from './CheckboxGroup'
export * from './Editor'
export * from './Form'
export * from './Input'
export * from './Label'
export * from './Picker'
export * from './PickerView'
export * from './PickerViewColumn'
export * from './Radio'
export * from './RadioGroup'
export * from './Slider'
export * from './Switch'
export * from './Textarea'
export * from './Image'
export * from './Navigator'
export * from './Camera'
export * from './Canvas'
export * from './OpenData'
export * from './Video'
export * from './Ad'
export * from './Audio'
export * from './FunctionalPageNavigator'
export * from './LivePlayer'
export * from './LivePusher'
export * from './Map'
export * from './WebView'
export * from './OfficialAccount'
export * from './NavigationBar'
export * from './PageMeta'
export * from './Slot'
export * from './CustomWrapper'
export * from './common'
export * from './event'
1 change: 1 addition & 0 deletions packages/taro-helper/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export const UPDATE_PACKAGE_LIST = [
'@tarojs/plugin-platform-tt',
'@tarojs/plugin-platform-qq',
'@tarojs/plugin-platform-jd',
'@tarojs/plugin-platform-quickapp',
'nervjs',
'nerv-devtools'
]
Expand Down
7 changes: 5 additions & 2 deletions packages/taro-loader/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as webpack from 'webpack'
import { getOptions, stringifyRequest } from 'loader-utils'
import { normalizePath } from '@tarojs/helper'

import { frameworkMeta } from './utils'
import { frameworkMeta, quickAppExportStr } from './utils'

export default function (this: webpack.loader.LoaderContext) {
const stringify = (s: string): string => stringifyRequest(this, s)
Expand Down Expand Up @@ -33,7 +33,10 @@ var app = ${createApp}
app.onLaunch()
exports.taroApp = app
`
: `var inst = App(${createApp})`
: `
var inst = App(${createApp})
${quickAppExportStr}
`

return `${setReconciler}
import { ${creator}, window } from '@tarojs/runtime'
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-loader/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as webpack from 'webpack'
import { getOptions, stringifyRequest } from 'loader-utils'
import { normalizePath } from '@tarojs/helper'
import * as path from 'path'
import { frameworkMeta } from './utils'
import { frameworkMeta, quickAppExportStr } from './utils'

export default function (this: webpack.loader.LoaderContext) {
const options = getOptions(this)
Expand All @@ -22,6 +22,7 @@ if (typeof PRERENDER !== 'undefined') {
return `import { createComponentConfig } from '@tarojs/runtime'
import component from ${stringify(componentPath)}
var inst = Component(createComponentConfig(component, '${options.name}'))
${quickAppExportStr}
${options.prerender ? prerender : ''}
`
}
3 changes: 2 additions & 1 deletion packages/taro-loader/src/independentPage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as webpack from 'webpack'
import { getOptions, stringifyRequest } from 'loader-utils'
import * as path from 'path'
import { frameworkMeta } from './utils'
import { frameworkMeta, quickAppExportStr } from './utils'

interface PageConfig {
content: any
Expand Down Expand Up @@ -49,6 +49,7 @@ ${creator}(App, ${frameworkArgsCopy})
${config.enableShareTimeline ? 'component.enableShareTimeline = true' : ''}
${config.enableShareAppMessage ? 'component.enableShareAppMessage = true' : ''}
var inst = Page(createPageConfig(component, '${options.name}', {}, config || {}))
${quickAppExportStr}
${options.prerender ? prerender : ''}
`
}
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-loader/src/native-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as webpack from 'webpack'
import { getOptions, stringifyRequest } from 'loader-utils'
import { normalizePath } from '@tarojs/helper'
import * as path from 'path'
import { frameworkMeta } from './utils'
import { frameworkMeta, quickAppExportStr } from './utils'
import { getPageConfig } from './page'

export default function (this: webpack.loader.LoaderContext) {
Expand Down Expand Up @@ -38,6 +38,7 @@ hooks.initNativeApiImpls = [defaultReconciler.initNativeApi]
var component = require(${stringify(componentPath)}).default
var config = ${configString};
var inst = Component(createNativeComponentConfig(component, ${frameworkArgs}))
${quickAppExportStr}
${options.prerender ? prerender : ''}
`
}
3 changes: 2 additions & 1 deletion packages/taro-loader/src/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { normalizePath } from '@tarojs/helper'
import * as path from 'path'
import * as acorn from 'acorn'
import * as walk from 'acorn-walk'
import { frameworkMeta } from './utils'
import { frameworkMeta, quickAppExportStr } from './utils'

interface PageConfig {
content: any
Expand Down Expand Up @@ -40,6 +40,7 @@ var config = ${configString};
${config.enableShareTimeline ? 'component.enableShareTimeline = true' : ''}
${config.enableShareAppMessage ? 'component.enableShareAppMessage = true' : ''}
var inst = Page(createPageConfig(component, '${options.name}', {root:{cn:[]}}, config || {}))
${quickAppExportStr}
${options.prerender ? prerender : ''}
`
}
Expand Down
4 changes: 4 additions & 0 deletions packages/taro-loader/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,7 @@ class App extends React.Component {
compatComponentExtra: 'config.PullDownRefresh = PullDownRefresh'
}
}

export const quickAppExportStr = `
export default inst
`
1 change: 1 addition & 0 deletions packages/taro-mini-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@tarojs/plugin-platform-swan": "3.3.3",
"@tarojs/plugin-platform-tt": "3.3.3",
"@tarojs/plugin-platform-weapp": "3.3.3",
"@tarojs/plugin-platform-quickapp": "3.3.3",
"@tarojs/runner-utils": "3.3.3",
"@tarojs/runtime": "3.3.3",
"@tarojs/shared": "3.3.3",
Expand Down
Loading