Skip to content

Commit f00b14a

Browse files
committed
chore: 解决合并冲突
1 parent c7a352b commit f00b14a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/shared/src/template.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
singleQuote,
2020
voidElements
2121
} from './components'
22+
import { COMPILE_MODE_IDENTIFIER_PREFIX } from './constants'
2223
import { isBooleanStringLiteral, isFunction, isNumber, isObjectStringLiteral, isString } from './is'
2324
import { Shortcuts } from './shortcuts'
2425
import { capitalize, getComponentsAlias, hasOwn, indent, toCamelCase, toDashed, toKebabCase } from './utils'
@@ -170,7 +171,7 @@ export class BaseTemplate {
170171
? `xs.b(i.${propAlias},${propValue})`
171172
: `i.${propAlias}===undefined?${propValue}:i.${propAlias}`
172173
} else if (isObjectStringLiteral(propValue)) {
173-
propValue = this.supportXS
174+
propValue = this.isUseXS
174175
? `xs.d(i.${propAlias})`
175176
: `i.${propAlias}===undefined?${propValue}:i.${propAlias}`
176177
} else {
@@ -289,7 +290,7 @@ export class BaseTemplate {
289290
if (isBooleanStringLiteral(patchValue) || isNumber(patchValue) || isString(patchValue)) {
290291
let propValue = ''
291292

292-
if (this.supportXS) {
293+
if (this.isUseXS) {
293294
if (isObjectStringLiteral(patchValue)) {
294295
propValue = `xs.d(i.${toCamelCase(attr)})`
295296
}

packages/taro-components/types/common.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CSSProperties, LegacyRef, ReactNode } from 'react'
22

3+
type COMPILE_MODE_SUB_RENDER_FN = 'subRenderFn'
34
export interface StandardProps<T = any, TouchEvent extends BaseTouchEvent<any> = ITouchEvent> extends EventProps<TouchEvent> {
45
/** 组件的唯一标示, 保持整个页面唯一 */
56
id?: string
@@ -30,7 +31,7 @@ export interface StandardProps<T = any, TouchEvent extends BaseTouchEvent<any> =
3031
* 是否开启编译模式
3132
* @supported weapp, harmony
3233
*/
33-
compileMode?: boolean | string
34+
compileMode?: boolean | string | COMPILE_MODE_SUB_RENDER_FN
3435
/**
3536
* 自定义容器组件的方向
3637
* @supported harmony

0 commit comments

Comments
 (0)