文件操作 - spectrum_picker.ts
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/core/components/colorpicker/spectrum_picker.ts
编辑文件内容
/** * Wrapper for the new ngReact <color-picker> directive for backward compatibility. * Allows remaining <spectrum-picker> untouched in outdated plugins. * Technically, it's just a wrapper for react component with two-way data binding support. */ import coreModule from '../../core_module'; /** @ngInject */ export function spectrumPicker() { return { restrict: 'E', require: 'ngModel', scope: true, replace: true, template: '<color-picker color="ngModel.$viewValue" onChange="onColorChange"></color-picker>', link: (scope: any, element: any, attrs: any, ngModel: any) => { scope.ngModel = ngModel; scope.onColorChange = (color: string) => { ngModel.$setViewValue(color); }; }, }; } coreModule.directive('spectrumPicker', spectrumPicker);
修改文件时间
将文件时间修改为当前时间的前一年
删除文件