本文整理汇总了TypeScript中sql/base/common/objects.clone函数的典型用法代码示例。如果您正苦于以下问题:TypeScript clone函数的具体用法?TypeScript clone怎么用?TypeScript clone使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了clone函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: reSizeColumn
private reSizeColumn(e: JQuery.Event<HTMLElement, string>) {
let headerEl = $(e.currentTarget).closest('.slick-header-column');
let columnDef = headerEl.data('column');
if (!columnDef || !columnDef.resizable) {
return;
}
e.preventDefault();
e.stopPropagation();
let headerWidth = this.getElementWidth(headerEl[0]);
let colIndex = this._grid.getColumnIndex(columnDef.id);
let origCols = this._grid.getColumns();
let allColumns = clone(origCols);
allColumns.forEach((col, index) => {
col.formatter = origCols[index].formatter;
col.asyncPostRender = origCols[index].asyncPostRender;
});
let column = allColumns[colIndex];
let autoSizeWidth = Math.max(headerWidth, this.getMaxColumnTextWidth(columnDef, colIndex)) + 1;
if (autoSizeWidth !== column.width) {
allColumns[colIndex].width = autoSizeWidth;
this._grid.setColumns(allColumns);
this._grid.onColumnsResized.notify();
}
}
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:29,代码来源:autoSizeColumns.plugin.ts
示例2: mixin
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { mixin } from 'vs/base/common/objects';
import { clone } from 'sql/base/common/objects';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import * as nls from 'vs/nls';
import { registerInsight } from 'sql/platform/dashboard/common/insightRegistry';
import { properties as BarChartSchema } from 'sql/parts/dashboard/widgets/insights/views/charts/types/barChart.contribution';
import LineChart from './lineChart.component';
const properties: IJSONSchema = {
properties: {
dataType: {
type: 'string',
description: nls.localize('dataTypeDescription', 'Indicates data property of a data set for a chart.'),
default: 'number',
enum: ['number', 'point'],
enumDescriptions: ['Set "number" if the data values are contained in 1 column.', 'Set "point" if the data is an {x,y} combination requiring 2 columns for each value.']
},
}
};
export const lineSchema = mixin(clone(BarChartSchema), properties) as IJSONSchema;
registerInsight('line', '', lineSchema, LineChart);
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:29,代码来源:lineChart.contribution.ts
示例3: mixin
yAxisMin: {
type: 'number',
description: nls.localize('yAxisMin', "Minimum value of the y axis")
},
yAxisMax: {
type: 'number',
description: nls.localize('yAxisMax', "Maximum value of the y axis")
},
yAxisLabel: {
type: 'string',
description: nls.localize('barchart.yAxisLabel', "Label for the y axis")
},
xAxisMin: {
type: 'number',
description: nls.localize('xAxisMin', "Minimum value of the x axis")
},
xAxisMax: {
type: 'number',
description: nls.localize('xAxisMax', "Maximum value of the x axis")
},
xAxisLabel: {
type: 'string',
description: nls.localize('barchart.xAxisLabel', "Label for the x axis")
}
}
};
export const barChartSchema = mixin(clone(chartInsightSchema), properties) as IJSONSchema;
registerInsight('bar', '', barChartSchema, BarChart);
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:30,代码来源:barChart.contribution.ts
示例4: mixin
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { clone } from 'sql/base/common/objects';
import { mixin } from 'vs/base/common/objects';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { registerInsight } from 'sql/platform/dashboard/common/insightRegistry';
import { chartInsightSchema } from 'sql/parts/dashboard/widgets/insights/views/charts/chartInsight.contribution';
import DoughnutChart from './doughnutChart.component';
const properties: IJSONSchema = {
};
const doughnutChartSchema = mixin(clone(chartInsightSchema), properties) as IJSONSchema;
registerInsight('doughnut', '', doughnutChartSchema, DoughnutChart);
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:19,代码来源:doughnutChart.contribution.ts
示例5: mixin
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { mixin } from 'vs/base/common/objects';
import { clone } from 'sql/base/common/objects';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { registerInsight } from 'sql/platform/dashboard/common/insightRegistry';
import { chartInsightSchema } from 'sql/parts/dashboard/widgets/insights/views/charts/chartInsight.contribution';
import PieChart from './pieChart.component';
const properties: IJSONSchema = {
};
const pieSchema = mixin(clone(chartInsightSchema), properties) as IJSONSchema;
registerInsight('pie', '', pieSchema, PieChart);
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:19,代码来源:pieChart.contribution.ts
示例6: mixin
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { clone } from 'sql/base/common/objects';
import { mixin } from 'vs/base/common/objects';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { registerInsight } from 'sql/platform/dashboard/common/insightRegistry';
import { barChartSchema } from 'sql/parts/dashboard/widgets/insights/views/charts/types/barChart.contribution';
import HorizontalBarChart from './horizontalBarChart.component';
const properties: IJSONSchema = {
};
const horizontalBarSchema = mixin(clone(barChartSchema), properties) as IJSONSchema;
registerInsight('horizontalBar', '', horizontalBarSchema, HorizontalBarChart);
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:20,代码来源:horizontalBarChart.contribution.ts
示例7: mixin
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { mixin } from 'vs/base/common/objects';
import { clone } from 'sql/base/common/objects';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { registerInsight } from 'sql/platform/dashboard/common/insightRegistry';
import { barChartSchema } from 'sql/parts/dashboard/widgets/insights/views/charts/types/barChart.contribution';
import ScatterChart from './scatterChart.component';
const properties: IJSONSchema = {
};
const scatterSchema = mixin(clone(barChartSchema), properties) as IJSONSchema;
registerInsight('scatter', '', scatterSchema, ScatterChart);
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:19,代码来源:scatterChart.contribution.ts
示例8: mixin
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { mixin } from 'vs/base/common/objects';
import { clone } from 'sql/base/common/objects';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { registerInsight } from 'sql/platform/dashboard/common/insightRegistry';
import { barChartSchema } from 'sql/parts/dashboard/widgets/insights/views/charts/types/barChart.contribution';
import TimeSeriesChart from './timeSeriesChart.component';
const properties: IJSONSchema = {
};
const timeSeriesSchema = mixin(clone(barChartSchema), properties) as IJSONSchema;
registerInsight('timeSeries', '', timeSeriesSchema, TimeSeriesChart);
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:19,代码来源:timeSeriesChart.contribution.ts
注:本文中的sql/base/common/objects.clone函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论