mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-19 23:13:04 +08:00
chore: rename variable per comments
This commit is contained in:
2
packages/core/global-types.d.ts
vendored
2
packages/core/global-types.d.ts
vendored
@ -131,7 +131,7 @@ declare namespace NodeJS {
|
|||||||
declare const __DEV__: string;
|
declare const __DEV__: string;
|
||||||
declare const __CSS_PARSER__: string;
|
declare const __CSS_PARSER__: string;
|
||||||
declare const __NS_WEBPACK__: boolean;
|
declare const __NS_WEBPACK__: boolean;
|
||||||
declare const __UI_CUSTOM_FLAVOR__: boolean;
|
declare const __UI_USE_EXTERNAL_RENDERER__: boolean;
|
||||||
declare const __UI_USE_XML_PARSER__: boolean;
|
declare const __UI_USE_XML_PARSER__: boolean;
|
||||||
declare const __ANDROID__: boolean;
|
declare const __ANDROID__: boolean;
|
||||||
declare const __IOS__: boolean;
|
declare const __IOS__: boolean;
|
||||||
|
@ -344,7 +344,7 @@ export class Binding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let newValue = value;
|
let newValue = value;
|
||||||
if (__UI_CUSTOM_FLAVOR__) {
|
if (__UI_USE_EXTERNAL_RENDERER__) {
|
||||||
} else if (this.options.expression) {
|
} else if (this.options.expression) {
|
||||||
const changedModel = {};
|
const changedModel = {};
|
||||||
changedModel[bc.bindingValueKey] = value;
|
changedModel[bc.bindingValueKey] = value;
|
||||||
@ -376,7 +376,7 @@ export class Binding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _getExpressionValue(expression: string, isBackConvert: boolean, changedModel: any): any {
|
private _getExpressionValue(expression: string, isBackConvert: boolean, changedModel: any): any {
|
||||||
if (!__UI_CUSTOM_FLAVOR__) {
|
if (!__UI_USE_EXTERNAL_RENDERER__) {
|
||||||
try {
|
try {
|
||||||
const exp = PolymerExpressions.getExpression(expression);
|
const exp = PolymerExpressions.getExpression(expression);
|
||||||
if (exp) {
|
if (exp) {
|
||||||
@ -426,7 +426,7 @@ export class Binding {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__UI_CUSTOM_FLAVOR__ || !this.options.expression) {
|
if (__UI_USE_EXTERNAL_RENDERER__ || !this.options.expression) {
|
||||||
if (changedPropertyIndex > -1) {
|
if (changedPropertyIndex > -1) {
|
||||||
const props = sourceProps.slice(changedPropertyIndex + 1);
|
const props = sourceProps.slice(changedPropertyIndex + 1);
|
||||||
const propsLength = props.length;
|
const propsLength = props.length;
|
||||||
@ -521,7 +521,7 @@ export class Binding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getSourcePropertyValue() {
|
private getSourcePropertyValue() {
|
||||||
if (__UI_CUSTOM_FLAVOR__) {
|
if (__UI_USE_EXTERNAL_RENDERER__) {
|
||||||
} else if (this.options.expression) {
|
} else if (this.options.expression) {
|
||||||
const changedModel = {};
|
const changedModel = {};
|
||||||
changedModel[bc.bindingValueKey] = this.source ? this.source.get() : undefined;
|
changedModel[bc.bindingValueKey] = this.source ? this.source.get() : undefined;
|
||||||
|
@ -26,7 +26,7 @@ export abstract class ListViewBase extends ContainerView implements ListViewDefi
|
|||||||
public _defaultTemplate: KeyedTemplate = {
|
public _defaultTemplate: KeyedTemplate = {
|
||||||
key: 'default',
|
key: 'default',
|
||||||
createView: () => {
|
createView: () => {
|
||||||
if (__UI_CUSTOM_FLAVOR__) {
|
if (__UI_USE_EXTERNAL_RENDERER__) {
|
||||||
} else if (this.itemTemplate) {
|
} else if (this.itemTemplate) {
|
||||||
return Builder.parse(this.itemTemplate, this);
|
return Builder.parse(this.itemTemplate, this);
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ export class Repeater extends CustomLayoutView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!viewToAdd) {
|
if (!viewToAdd) {
|
||||||
if (__UI_CUSTOM_FLAVOR__) {
|
if (__UI_USE_EXTERNAL_RENDERER__) {
|
||||||
viewToAdd = this._getDefaultItemContent(i)
|
viewToAdd = this._getDefaultItemContent(i)
|
||||||
} else {
|
} else {
|
||||||
viewToAdd = this.itemTemplate ? Builder.parse(this.itemTemplate, this) : this._getDefaultItemContent(i);
|
viewToAdd = this.itemTemplate ? Builder.parse(this.itemTemplate, this) : this._getDefaultItemContent(i);
|
||||||
|
@ -243,7 +243,7 @@ export default function (config: Config, env: IWebpackEnv): Config {
|
|||||||
__DEV__: mode === 'development',
|
__DEV__: mode === 'development',
|
||||||
__NS_WEBPACK__: true,
|
__NS_WEBPACK__: true,
|
||||||
__UI_USE_XML_PARSER__: true,
|
__UI_USE_XML_PARSER__: true,
|
||||||
__UI_CUSTOM_FLAVOR__: projectUsesCustomFlavor(),
|
__UI_USE_EXTERNAL_RENDERER__: projectUsesCustomFlavor(),
|
||||||
__CSS_PARSER__: JSON.stringify(getValue('cssParser')), // todo: replace from config value
|
__CSS_PARSER__: JSON.stringify(getValue('cssParser')), // todo: replace from config value
|
||||||
__ANDROID__: platform === 'android',
|
__ANDROID__: platform === 'android',
|
||||||
__IOS__: platform === 'ios',
|
__IOS__: platform === 'ios',
|
||||||
|
Reference in New Issue
Block a user