nav tabs on admin dashboard
This commit is contained in:
+55
-5
@@ -2,7 +2,7 @@
|
||||
|
||||
> This package is auto-generated. For pull requests please see [src/platforms/web/entry-compiler.js](https://github.com/vuejs/vue/tree/dev/src/platforms/web/entry-compiler.js).
|
||||
|
||||
This package can be used to pre-compile Vue 2.0 templates into render functions to avoid runtime-compilation overhead and CSP restrictions. You will only need it if you are writing build tools with very specific needs. In most cases you should be using [`vue-loader`](https://github.com/vuejs/vue-loader) or [`vueify`](https://github.com/vuejs/vueify) instead, both of which use this package internally.
|
||||
This package can be used to pre-compile Vue 2.0 templates into render functions to avoid runtime-compilation overhead and CSP restrictions. In most cases you should be using it with [`vue-loader`](https://github.com/vuejs/vue-loader), you will only need it separately if you are writing build tools with very specific needs.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -33,12 +33,54 @@ Note the returned function code uses `with` and thus cannot be used in strict mo
|
||||
|
||||
#### Options
|
||||
|
||||
It's possible to hook into the compilation process to support custom template features. **However, beware that by injecting custom compile-time modules, your templates will not work with other build tools built on standard built-in modules, e.g `vue-loader` and `vueify`.**
|
||||
- `outputSourceRange` *new in 2.6*
|
||||
- Type: `boolean`
|
||||
- Default: `false`
|
||||
|
||||
The optional `options` object can contain the following:
|
||||
Set this to true will cause the `errors` returned in the compiled result become objects in the form of `{ msg, start, end }`. The `start` and `end` properties are numbers that mark the code range of the error source in the template. This can be passed on to the `compiler.generateCodeFrame` API to generate code frame for the error.
|
||||
|
||||
- `whitespace`
|
||||
- Type: `string`
|
||||
- Valid values: `'preserve' | 'condense'`
|
||||
- Default: `'preserve'`
|
||||
|
||||
The default value `'preserve'` handles whitespaces as follows:
|
||||
|
||||
- A whitespace-only text node between element tags is condensed into a single space.
|
||||
- All other whitespaces are preserved as-is.
|
||||
|
||||
If set to `'condense'`:
|
||||
|
||||
- A whitespace-only text node between element tags is removed if it contains new lines. Otherwise, it is condensed into a single space.
|
||||
- Consecutive whitespaces inside a non-whitespace-only text node is condensed into a single space.
|
||||
|
||||
Using condense mode will result in smaller compiled code size and slightly improved performance. However, it will produce minor visual layout differences compared to plain HTML in certain cases.
|
||||
|
||||
**This option does not affect the `<pre>` tag.**
|
||||
|
||||
Example:
|
||||
|
||||
``` html
|
||||
<!-- source -->
|
||||
<div>
|
||||
<span>
|
||||
foo
|
||||
</span> <span>bar</span>
|
||||
</div>
|
||||
|
||||
<!-- whitespace: 'preserve' -->
|
||||
<div> <span>
|
||||
foo
|
||||
</span> <span>bar</span> </div>
|
||||
|
||||
<!-- whitespace: 'condense' -->
|
||||
<div><span> foo </span> <span>bar</span></div>
|
||||
```
|
||||
|
||||
- `modules`
|
||||
|
||||
It's possible to hook into the compilation process to support custom template features. **However, beware that by injecting custom compile-time modules, your templates will not work with other build tools built on standard built-in modules, e.g `vue-loader` and `vueify`.**
|
||||
|
||||
An array of compiler modules. For details on compiler modules, refer to the `ModuleOptions` type in [flow declarations](https://github.com/vuejs/vue/blob/dev/flow/compiler.js#L38-L45) and the [built-in modules](https://github.com/vuejs/vue/tree/dev/src/platforms/web/compiler/modules).
|
||||
|
||||
- `directives`
|
||||
@@ -59,9 +101,11 @@ The optional `options` object can contain the following:
|
||||
|
||||
Refer to the implementation of some [built-in compile-time directives](https://github.com/vuejs/vue/tree/dev/src/platforms/web/compiler/directives).
|
||||
|
||||
- `preserveWhitespace`
|
||||
- `preserveWhitespace` **Deprecated since 2.6**
|
||||
- Type: `boolean`
|
||||
- Default: `true`
|
||||
|
||||
Defaults to `true`. This means the compiled render function preserves all whitespace characters between HTML tags. If set to `false`, whitespace between tags will be ignored. This can result in slightly better performance but may affect layout for inline elements.
|
||||
By default, the compiled render function preserves all whitespace characters between HTML tags. If set to `false`, whitespace between tags will be ignored. This can result in slightly better performance but may affect layout for inline elements.
|
||||
|
||||
---
|
||||
|
||||
@@ -102,6 +146,12 @@ Same as `compiler.compileToFunction` but generates SSR-specific render function
|
||||
|
||||
Parse a SFC (single-file component, or `*.vue` file) into a descriptor (refer to the `SFCDescriptor` type in [flow declarations](https://github.com/vuejs/vue/blob/dev/flow/compiler.js)). This is used in SFC build tools like `vue-loader` and `vueify`.
|
||||
|
||||
---
|
||||
|
||||
### compiler.generateCodeFrame(template, start, end)
|
||||
|
||||
Generate a code frame that highlights the part in `template` defined by `start` and `end`. Useful for error reporting in higher-level tooling.
|
||||
|
||||
#### Options
|
||||
|
||||
#### `pad`
|
||||
|
||||
Reference in New Issue
Block a user