| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- /* @flow */
- import {
- no,
- noop,
- identity
- } from 'shared/util'
- export type Config = {
- // user
- optionMergeStrategies: { [key: string]: Function };
- silent: boolean;
- productionTip: boolean;
- performance: boolean;
- devtools: boolean;
- errorHandler: ?(err: Error, vm: Component, info: string) => void;
- ignoredElements: Array<string>;
- keyCodes: { [key: string]: number | Array<number> };
- // platform
- isReservedTag: (x?: string) => boolean;
- parsePlatformTagName: (x: string) => string;
- isUnknownElement: (x?: string) => boolean;
- getTagNamespace: (x?: string) => string | void;
- mustUseProp: (tag: string, type: ?string, name: string) => boolean;
- };
- export default ({
- /**
- * Option merge strategies (used in core/util/options)
- */
- optionMergeStrategies: Object.create(null),
- /**
- * Whether to suppress warnings.
- */
- silent: false,
- /**
- * Show production mode tip message on boot?
- */
- productionTip: process.env.NODE_ENV !== 'production',
- /**
- * Whether to enable devtools
- */
- devtools: process.env.NODE_ENV !== 'production',
- /**
- * Whether to record perf
- */
- performance: false,
- /**
- * Error handler for watcher errors
- */
- errorHandler: null,
- /**
- * Ignore certain custom elements
- */
- ignoredElements: [],
- /**
- * Custom user key aliases for v-on
- */
- keyCodes: Object.create(null),
- /**
- * Check if a tag is reserved so that it cannot be registered as a
- * component. This is platform-dependent and may be overwritten.
- */
- isReservedTag: no,
- /**
- * Check if a tag is an unknown element.
- * Platform-dependent.
- */
- isUnknownElement: no,
- /**
- * Get the namespace of an element
- */
- getTagNamespace: noop,
- /**
- * Parse the real tag name for the specific platform.
- */
- parsePlatformTagName: identity,
- /**
- * Check if an attribute must be bound using property, e.g. value
- * Platform-dependent.
- */
- mustUseProp: no
- }: Config)
|