mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-11 13:10:26 +08:00
fix: lint
This commit is contained in:
parent
8f5f4ebd3e
commit
7de3d875f8
@ -19,7 +19,7 @@ component.vue
|
||||
|
||||
| Name | Type | Default | Description | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| auto-espace | `boolean` | `true` | Whether to escape patterns automatically. By default, elements in patterns will be converted into regular expressions for matching, and this process includes automatic escaping, so that the regular expressions will match the literal content of the elements. For example, `\(` will match `\(`. If you need the n-highlight component to match using regular expressions constructed from the elements in patterns themselves (e.g., `\(` matches `(`), you can set this to false. If you do not understand these details, do not change this setting. | NEXT_VERSION |
|
||||
| auto-espace | `boolean` | `true` | Whether to escape `patterns` automatically. By default, elements in `patterns` will be converted into regular expressions for matching, and this process includes automatic escaping, so that the regular expressions will match the literal content of the elements. For example, `\(` will match `\(`. If you need the n-highlight component to match using regular expressions constructed from the elements in `patterns` themselves (e.g., `\(` matches `(`), you can set this to false. If you do not understand these details, do not change this setting. | NEXT_VERSION |
|
||||
| case-sensitive | `boolean` | `false` | Case sensitive or not. | NEXT_VERSION |
|
||||
| highlight-class | `string` | `undefined` | Class name of the highlight content. | NEXT_VERSION |
|
||||
| highlight-style | `Object \| string` | `undefined` | Style of the highlight content. | NEXT_VERSION |
|
||||
|
@ -19,7 +19,7 @@ component.vue
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| auto-espace | `boolean` | `true` | 自动转义。默认情况下,words 中的元素会被转化为正则表达式进行匹配,这个过程中需要进行自动转义,正则表达式最终匹配的是元素的字面内容,例如 `\(` 匹配的就是 `\(`。如果你需要 `n-highlight` 组件去匹配使用 patterns 中元素本身构造的正则表达式,例如 `\(` 匹配的是 `(`,则可以设为 `false`。如果你看不懂这些,不要改这个设置。 | NEXT_VERSION |
|
||||
| auto-espace | `boolean` | `true` | 自动转义。默认情况下,`patterns` 中的元素会被转化为正则表达式进行匹配,这个过程中需要进行自动转义,正则表达式最终匹配的是元素的字面内容,例如 `\(` 匹配的就是 `\(`。如果你需要 `n-highlight` 组件去匹配使用 `patterns` 中元素本身构造的正则表达式,例如 `\(` 匹配的是 `(`,则可以设为 `false`。如果你看不懂这些,不要改这个设置。 | NEXT_VERSION |
|
||||
| case-sensitive | `boolean` | `false` | 区分大小写 | NEXT_VERSION |
|
||||
| highlight-class | `string` | `undefined` | 高亮内容的类名 | NEXT_VERSION |
|
||||
| highlight-style | `Object \| string` | `undefined` | 高亮内容的样式 | NEXT_VERSION |
|
||||
|
@ -2,24 +2,16 @@
|
||||
# Custom Mark
|
||||
|
||||
You can use `marks` prop to customize handle button.
|
||||
|
||||
</markdown>
|
||||
|
||||
<template>
|
||||
<n-space style="height: 300px; justify-content: space-evenly">
|
||||
<n-slider v-model:value="value" :marks="marks" vertical range />
|
||||
<n-slider v-model:value="value" :marks="customMarks" vertical range />
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, h } from 'vue'
|
||||
import { defineComponent, h, ref } from 'vue'
|
||||
import Temperature16Regular from '@vicons/fluent/Temperature16Regular'
|
||||
import { NIcon } from '../../../icon'
|
||||
import { NFlex } from '../../../flex'
|
||||
|
||||
export default defineComponent({
|
||||
setup () {
|
||||
setup() {
|
||||
const renderMark = (value: number, color: string) => {
|
||||
return h(
|
||||
NFlex,
|
||||
@ -51,3 +43,10 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-space style="height: 300px; justify-content: space-evenly">
|
||||
<n-slider v-model:value="value" :marks="marks" vertical range />
|
||||
<n-slider v-model:value="value" :marks="customMarks" vertical range />
|
||||
</n-space>
|
||||
</template>
|
||||
|
@ -2,24 +2,16 @@
|
||||
# 自定义标记
|
||||
|
||||
可以使用 `marks` 插槽自定义刻度。
|
||||
|
||||
</markdown>
|
||||
|
||||
<template>
|
||||
<n-space style="height: 300px; justify-content: space-evenly">
|
||||
<n-slider v-model:value="value" :marks="marks" vertical range />
|
||||
<n-slider v-model:value="value" :marks="customMarks" vertical range />
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, h } from 'vue'
|
||||
import { defineComponent, h, ref } from 'vue'
|
||||
import Temperature16Regular from '@vicons/fluent/Temperature16Regular'
|
||||
import { NIcon } from '../../../icon'
|
||||
import { NFlex } from '../../../flex'
|
||||
|
||||
export default defineComponent({
|
||||
setup () {
|
||||
setup() {
|
||||
const renderMark = (value: number, color: string) => {
|
||||
return h(
|
||||
NFlex,
|
||||
@ -51,3 +43,10 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-space style="height: 300px; justify-content: space-evenly">
|
||||
<n-slider v-model:value="value" :marks="marks" vertical range />
|
||||
<n-slider v-model:value="value" :marks="customMarks" vertical range />
|
||||
</n-space>
|
||||
</template>
|
||||
|
@ -2,8 +2,8 @@ import {
|
||||
type CSSProperties,
|
||||
type ComponentPublicInstance,
|
||||
type PropType,
|
||||
type VNodeChild,
|
||||
Transition,
|
||||
type VNodeChild,
|
||||
computed,
|
||||
defineComponent,
|
||||
h,
|
||||
|
Loading…
Reference in New Issue
Block a user