@toife/vue 3.0.6 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/package.json +4 -8
- package/src/components/action/action.scss +1 -1
- package/src/components/app/app.scss +1 -1
- package/src/components/avatar/avatar.scss +1 -1
- package/src/components/button/button.scss +1 -1
- package/src/components/cable/cable.scss +1 -1
- package/src/components/card/card/card.scss +1 -1
- package/src/components/card/card/card.vue +1 -1
- package/src/components/card/card-body/card-body.scss +1 -1
- package/src/components/card/card-footer/card-footer.scss +1 -1
- package/src/components/card/card-header/card-header.scss +1 -1
- package/src/components/checkbox/checkbox.scss +1 -1
- package/src/components/collapse/collapse.scss +1 -1
- package/src/components/container/container.scss +1 -1
- package/src/components/decision-modal/decision-modal.scss +6 -1
- package/src/components/decision-modal/decision-modal.vue +3 -5
- package/src/components/divider/divider.scss +1 -1
- package/src/components/dropdown/dropdown.html +6 -0
- package/src/components/dropdown/dropdown.scss +68 -0
- package/src/components/dropdown/dropdown.type.ts +19 -0
- package/src/components/dropdown/dropdown.vue +109 -0
- package/src/components/dropdown/index.ts +2 -0
- package/src/components/field/field.html +12 -1
- package/src/components/field/outline/outline.html +29 -25
- package/src/components/field/outline/outline.scss +105 -52
- package/src/components/field/outline/outline.vue +59 -16
- package/src/components/form-group/form-group.scss +1 -1
- package/src/components/gesture-indicator/gesture-indicator.scss +1 -1
- package/src/components/index.ts +3 -0
- package/src/components/layout/cell/cell.html +1 -0
- package/src/components/layout/cell/cell.md +47 -0
- package/src/components/layout/cell/cell.scss +54 -0
- package/src/components/layout/cell/cell.type.ts +19 -0
- package/src/components/layout/cell/cell.vue +35 -0
- package/src/components/layout/cell/index.ts +2 -0
- package/src/components/layout/flex/flex.html +1 -0
- package/src/components/layout/flex/flex.scss +59 -0
- package/src/components/layout/flex/flex.type.ts +13 -0
- package/src/components/layout/flex/flex.vue +34 -0
- package/src/components/layout/flex/index.ts +2 -0
- package/src/components/layout/grid/grid.html +1 -0
- package/src/components/layout/grid/grid.md +50 -0
- package/src/components/layout/grid/grid.scss +53 -0
- package/src/components/layout/grid/grid.type.ts +12 -0
- package/src/components/layout/grid/grid.vue +32 -0
- package/src/components/layout/grid/index.ts +2 -0
- package/src/components/layout/index.ts +3 -0
- package/src/components/modal/modal.scss +1 -1
- package/src/components/page/page.scss +1 -1
- package/src/components/present/present.scss +1 -1
- package/src/components/radio/radio/radio.scss +1 -1
- package/src/components/radio/radio-group/radio-group.scss +1 -1
- package/src/components/refresher/refresher.scss +1 -1
- package/src/components/route/route-navigator/route-navigator.scss +5 -5
- package/src/components/route/route-navigator/route-navigator.vue +26 -20
- package/src/components/segmented-field/segmented-field.scss +1 -1
- package/src/components/select/index.ts +2 -0
- package/src/components/select/select.html +29 -0
- package/src/components/select/select.scss +129 -0
- package/src/components/select/select.type.ts +45 -0
- package/src/components/select/select.vue +119 -0
- package/src/components/skeleton/skeleton.scss +1 -1
- package/src/components/switch/switch.scss +1 -1
- package/src/components/tabs/tabs/tabs.scss +6 -6
- package/src/components/toast/toast/toast.scss +1 -1
- package/src/components/toast/toast-content/toast-content.scss +1 -1
- package/src/components/toolbar/toolbar.scss +1 -1
- package/src/factory.ts +10 -0
- package/src/utils/style/index.ts +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ Usage docs live **next to source** under `src/`. Authoring scaffold: [docs/templ
|
|
|
27
27
|
| [field.md](src/components/field/field.md) | `t-field` |
|
|
28
28
|
| [form-group.md](src/components/form-group/form-group.md) | `t-form-group` |
|
|
29
29
|
| [gesture-indicator.md](src/components/gesture-indicator/gesture-indicator.md) | `t-gesture-indicator` |
|
|
30
|
+
| [grid.md](src/components/grid/grid/grid.md) | `t-grid` |
|
|
31
|
+
| [grid-item.md](src/components/grid/grid-item/grid-item.md) | `t-grid-item` |
|
|
30
32
|
| [image.md](src/components/image/image.md) | `t-image` |
|
|
31
33
|
| [modal.md](src/components/modal/modal.md) | `t-modal` |
|
|
32
34
|
| [page.md](src/components/page/page.md) | `t-page` |
|
|
@@ -62,7 +64,7 @@ Usage docs live **next to source** under `src/`. Authoring scaffold: [docs/templ
|
|
|
62
64
|
| `vue` ^3.5 | Required |
|
|
63
65
|
| `vue-router` ^4 | Required when using route-related components |
|
|
64
66
|
| `@toife/gesture` | Gestures |
|
|
65
|
-
| `@toife/sass-layer
|
|
67
|
+
| `@toife/sass-layer` | Component SCSS uses `@use`; install in the app and configure Sass (e.g. Vite `css.preprocessorOptions`) |
|
|
66
68
|
|
|
67
69
|
## Installation
|
|
68
70
|
|
|
@@ -217,7 +219,7 @@ See [src/utils/element.md](src/utils/element.md), [src/utils/events.md](src/util
|
|
|
217
219
|
|
|
218
220
|
## Sass / theming
|
|
219
221
|
|
|
220
|
-
Component styles use `@use "@toife/sass-layer
|
|
222
|
+
Component styles use `@use "@toife/sass-layer"` and SCSS under `src`. Configure **sass-embedded** / **sass** and any aliases in **your** app so tokens, layers, and variables resolve when you build.
|
|
221
223
|
|
|
222
224
|
## License
|
|
223
225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toife/vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "A Frontend framework for Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@toife/gesture": "^1.1.4",
|
|
34
|
-
"@toife/sass-layer-generator": "^1.0.9",
|
|
35
33
|
"vue": "^3.5.0",
|
|
36
34
|
"vue-router": "^4.0.0"
|
|
37
35
|
},
|
|
@@ -48,7 +46,8 @@
|
|
|
48
46
|
"devDependencies": {
|
|
49
47
|
"@commitlint/cli": "^20.4.4",
|
|
50
48
|
"@commitlint/config-conventional": "^20.4.4",
|
|
51
|
-
"@toife/
|
|
49
|
+
"@toife/gesture": "^1.1.5",
|
|
50
|
+
"@toife/sass-layer": "^1.0.2",
|
|
52
51
|
"@types/node": "^25.0.3",
|
|
53
52
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
54
53
|
"husky": "^9.1.7",
|
|
@@ -60,8 +59,5 @@
|
|
|
60
59
|
"vue": "^3.5.0",
|
|
61
60
|
"vue-router": "^4.0.0"
|
|
62
61
|
},
|
|
63
|
-
"packageManager": "yarn@4.12.0"
|
|
64
|
-
"dependencies": {
|
|
65
|
-
"@toife/gesture": "^1.1.4"
|
|
66
|
-
}
|
|
62
|
+
"packageManager": "yarn@4.12.0"
|
|
67
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "@toife/sass-layer
|
|
1
|
+
@use "@toife/sass-layer" as sass;
|
|
2
2
|
|
|
3
3
|
// Class name
|
|
4
4
|
$decision-modal: sass.fn-naming-prefix("decision-modal");
|
|
@@ -11,6 +11,7 @@ $shape-pill: sass.fn-naming-prefix("shape-pill");
|
|
|
11
11
|
// Property name - layer: decision-modal
|
|
12
12
|
$decision-modal-background-color: sass.fn-naming-var("decision-modal", "background-color");
|
|
13
13
|
$decision-modal-border-color: sass.fn-naming-var("decision-modal", "border-color");
|
|
14
|
+
$decision-modal-color: sass.fn-naming-var("decision-modal", "color");
|
|
14
15
|
|
|
15
16
|
$border-radius: sass.fn-naming-var("border-radius");
|
|
16
17
|
$width: sass.fn-naming-var("viewport", "width");
|
|
@@ -26,6 +27,7 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
26
27
|
.#{$decision-modal} {
|
|
27
28
|
// Styles
|
|
28
29
|
background-color: rgb(#{$decision-modal-background-color});
|
|
30
|
+
color: rgb(#{$decision-modal-color});
|
|
29
31
|
width: #{$width};
|
|
30
32
|
max-width: #{$max-width};
|
|
31
33
|
overflow: hidden;
|
|
@@ -47,6 +49,7 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
47
49
|
align-items: center;
|
|
48
50
|
font-weight: 600;
|
|
49
51
|
border-bottom: #{$border-width} solid transparent;
|
|
52
|
+
color: rgb(#{$decision-modal-color});
|
|
50
53
|
transition:
|
|
51
54
|
box-shadow #{$transition-duration} ease,
|
|
52
55
|
border-color #{$transition-duration} ease,
|
|
@@ -58,12 +61,14 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
58
61
|
// Content of alert
|
|
59
62
|
.#{$decision-modal-body} {
|
|
60
63
|
padding: calc(#{$padding-y} * 4) calc(#{$padding-x} * 4);
|
|
64
|
+
color: rgb(#{$decision-modal-color});
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
// Footer of alert
|
|
64
68
|
.#{$decision-modal-footer} {
|
|
65
69
|
display: flex;
|
|
66
70
|
border-top: #{$border-width} solid transparent;
|
|
71
|
+
color: rgb(#{$decision-modal-color});
|
|
67
72
|
transition:
|
|
68
73
|
box-shadow #{$transition-duration} ease,
|
|
69
74
|
border-color #{$transition-duration} ease,
|
|
@@ -36,19 +36,17 @@ const shape = computed(() => {
|
|
|
36
36
|
return props.shape || appState?.shape.value || "";
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
const role = computed(() => {
|
|
40
|
-
return props.role || appState?.role.value || "";
|
|
41
|
-
});
|
|
42
|
-
|
|
43
39
|
const divider = computed(() => {
|
|
44
40
|
return (props.divider !== undefined ? props.divider : appState?.divider.value) ?? false;
|
|
45
41
|
});
|
|
46
42
|
|
|
47
43
|
const decisionModalAttrs = computed(() => {
|
|
44
|
+
const role = props.role || appState?.role.value || "";
|
|
45
|
+
|
|
48
46
|
return {
|
|
49
47
|
class: [
|
|
50
48
|
withPrefix(["layer", "decision-modal"]),
|
|
51
|
-
withPrefix(["role", role
|
|
49
|
+
withPrefix(["role", role]),
|
|
52
50
|
withPrefix(["shape", shape.value]),
|
|
53
51
|
withPrefix("decision-modal"),
|
|
54
52
|
{
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "@toife/sass-layer" as sass;
|
|
2
|
+
|
|
3
|
+
// Class name
|
|
4
|
+
$dropdown: sass.fn-naming-prefix("dropdown");
|
|
5
|
+
$dropdown-panel: sass.fn-naming-prefix("dropdown-panel");
|
|
6
|
+
|
|
7
|
+
// Property name - layer: dropdown
|
|
8
|
+
$dropdown-border-color: sass.fn-naming-var("dropdown", "border-color");
|
|
9
|
+
$dropdown-background-color: sass.fn-naming-var("dropdown", "background-color");
|
|
10
|
+
$dropdown-color: sass.fn-naming-var("dropdown", "color");
|
|
11
|
+
$border-radius: sass.fn-naming-var("border-radius");
|
|
12
|
+
$border-width: sass.fn-naming-var("stroke", "width");
|
|
13
|
+
$spacing-x: sass.fn-naming-var("spacing", "x");
|
|
14
|
+
$spacing-y: sass.fn-naming-var("spacing", "y");
|
|
15
|
+
$size-font-size: sass.fn-naming-var("font-size");
|
|
16
|
+
$size-line-height: sass.fn-naming-var("line-height");
|
|
17
|
+
$transition-duration: sass.fn-naming-var("motion", "duration");
|
|
18
|
+
|
|
19
|
+
.#{$dropdown} {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: block;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.#{$dropdown-panel} {
|
|
26
|
+
position: absolute;
|
|
27
|
+
z-index: 20;
|
|
28
|
+
min-width: 100%;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
border-radius: #{$border-radius};
|
|
31
|
+
border-width: #{$border-width};
|
|
32
|
+
margin: #{$spacing-y} 0;
|
|
33
|
+
border-style: solid;
|
|
34
|
+
border-color: rgb(#{$dropdown-border-color});
|
|
35
|
+
background-color: rgb(#{$dropdown-background-color});
|
|
36
|
+
color: rgb(#{$dropdown-color});
|
|
37
|
+
font-size: #{$size-font-size};
|
|
38
|
+
line-height: #{$size-line-height};
|
|
39
|
+
max-height: min(50vh, 16rem);
|
|
40
|
+
overflow-y: auto;
|
|
41
|
+
transition:
|
|
42
|
+
border-color #{$transition-duration} ease,
|
|
43
|
+
background-color #{$transition-duration} ease,
|
|
44
|
+
color #{$transition-duration} ease,
|
|
45
|
+
box-shadow #{$transition-duration} ease;
|
|
46
|
+
|
|
47
|
+
&.bottom-start {
|
|
48
|
+
top: 100%;
|
|
49
|
+
left: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.bottom-end {
|
|
53
|
+
top: 100%;
|
|
54
|
+
right: 0;
|
|
55
|
+
left: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.top-start {
|
|
59
|
+
bottom: 100%;
|
|
60
|
+
left: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.top-end {
|
|
64
|
+
bottom: 100%;
|
|
65
|
+
right: 0;
|
|
66
|
+
left: auto;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AppDirection } from "../app";
|
|
2
|
+
|
|
3
|
+
export type DropdownPlacement = "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
4
|
+
|
|
5
|
+
export type DropdownProps = {
|
|
6
|
+
modelValue?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
placement?: DropdownPlacement;
|
|
9
|
+
role?: string;
|
|
10
|
+
shadow?: boolean;
|
|
11
|
+
shape?: string;
|
|
12
|
+
direction?: AppDirection;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type DropdownEmit = {
|
|
16
|
+
(e: "update:modelValue", open: boolean): void;
|
|
17
|
+
(e: "open"): void;
|
|
18
|
+
(e: "close"): void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<style lang="scss" src="./dropdown.scss" scoped></style>
|
|
2
|
+
<template src="./dropdown.html"></template>
|
|
3
|
+
<script lang="ts" setup>
|
|
4
|
+
import { computed, inject, onMounted, onUnmounted, ref, watch } from "vue";
|
|
5
|
+
import type { DropdownEmit, DropdownProps } from "./dropdown.type";
|
|
6
|
+
import { withPrefix } from "../../utils";
|
|
7
|
+
import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../app";
|
|
8
|
+
|
|
9
|
+
// Component setup (props, emits, injects)
|
|
10
|
+
// ----------------------------------------------------------------------------
|
|
11
|
+
const props = withDefaults(defineProps<DropdownProps>(), {
|
|
12
|
+
modelValue: false,
|
|
13
|
+
disabled: false,
|
|
14
|
+
placement: "bottom-start",
|
|
15
|
+
role: undefined,
|
|
16
|
+
shadow: undefined,
|
|
17
|
+
shape: undefined,
|
|
18
|
+
direction: undefined,
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits<DropdownEmit>();
|
|
21
|
+
const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
|
|
22
|
+
|
|
23
|
+
// Reactive state
|
|
24
|
+
// ----------------------------------------------------------------------------
|
|
25
|
+
const rootRef = ref<HTMLElement | null>(null);
|
|
26
|
+
const isOpen = ref(false);
|
|
27
|
+
|
|
28
|
+
// Computed properties
|
|
29
|
+
// ----------------------------------------------------------------------------
|
|
30
|
+
const wrapperAttrs = computed(() => {
|
|
31
|
+
const role = props.role ?? appState?.role.value ?? "";
|
|
32
|
+
const shadow = props.shadow ?? appState?.shadow.value ?? false;
|
|
33
|
+
const shape = props.shape ?? appState?.shape.value ?? "";
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
class: [
|
|
37
|
+
withPrefix(["layer", "dropdown"]),
|
|
38
|
+
withPrefix(["role", role]),
|
|
39
|
+
withPrefix(["shape", shape]),
|
|
40
|
+
withPrefix("dropdown"),
|
|
41
|
+
{
|
|
42
|
+
open: isOpen.value,
|
|
43
|
+
disabled: props.disabled,
|
|
44
|
+
shadow: shadow,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const panelAttrs = computed(() => {
|
|
51
|
+
return {
|
|
52
|
+
class: [withPrefix("dropdown-panel"), props.placement],
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Methods
|
|
57
|
+
// ----------------------------------------------------------------------------
|
|
58
|
+
const toggle = () => {
|
|
59
|
+
if (props.disabled) return;
|
|
60
|
+
isOpen.value = !isOpen.value;
|
|
61
|
+
emit("update:modelValue", isOpen.value);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const close = () => {
|
|
65
|
+
if (!isOpen.value) return;
|
|
66
|
+
isOpen.value = false;
|
|
67
|
+
emit("update:modelValue", false);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const onDocPointerDown = (e: PointerEvent) => {
|
|
71
|
+
if (!isOpen.value) return;
|
|
72
|
+
const root = rootRef.value;
|
|
73
|
+
if (root && !root.contains(e.target as Node)) {
|
|
74
|
+
close();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const onDocKeydown = (e: KeyboardEvent) => {
|
|
79
|
+
if (e.key === "Escape" && isOpen.value) {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
close();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Lifecycle
|
|
86
|
+
// ----------------------------------------------------------------------------
|
|
87
|
+
watch(
|
|
88
|
+
() => props.modelValue,
|
|
89
|
+
(open) => {
|
|
90
|
+
isOpen.value = open;
|
|
91
|
+
},
|
|
92
|
+
{ immediate: true }
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
watch(isOpen, (next, prev) => {
|
|
96
|
+
if (next && !prev) emit("open");
|
|
97
|
+
if (!next && prev) emit("close");
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
onMounted(() => {
|
|
101
|
+
document.addEventListener("pointerdown", onDocPointerDown, true);
|
|
102
|
+
document.addEventListener("keydown", onDocKeydown, true);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
onUnmounted(() => {
|
|
106
|
+
document.removeEventListener("pointerdown", onDocPointerDown, true);
|
|
107
|
+
document.removeEventListener("keydown", onDocKeydown, true);
|
|
108
|
+
});
|
|
109
|
+
</script>
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
<OutlineField v-if="props.variant === 'outline'" v-bind="fieldAttrs"
|
|
1
|
+
<OutlineField v-if="props.variant === 'outline'" v-bind="fieldAttrs">
|
|
2
|
+
<template #start-input>
|
|
3
|
+
<slot name="start-input"></slot>
|
|
4
|
+
</template>
|
|
5
|
+
<template #input>
|
|
6
|
+
<slot name="input"></slot>
|
|
7
|
+
</template>
|
|
8
|
+
<template #end-input>
|
|
9
|
+
<slot name="end-input"></slot>
|
|
10
|
+
</template>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</OutlineField>
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
<div v-bind="fieldAttrs">
|
|
2
2
|
<div v-bind="fieldContentAttrs">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
3
|
+
<slot name="start-input"></slot>
|
|
4
|
+
<slot name="input">
|
|
5
|
+
<div v-bind="fieldInputShellAttrs" v-if="type !== 'password'">
|
|
6
|
+
<div
|
|
7
|
+
v-bind="fieldEditableAttrs"
|
|
8
|
+
@input="onInput"
|
|
9
|
+
@compositionstart="onCompositionStart"
|
|
10
|
+
@compositionend="onCompositionEnd"
|
|
11
|
+
@focus="onFocus"
|
|
12
|
+
@blur="onBlur"
|
|
13
|
+
@beforeinput="onBeforeinput"
|
|
14
|
+
ref="contentRef"
|
|
15
|
+
></div>
|
|
16
|
+
</div>
|
|
17
|
+
<input
|
|
18
|
+
v-bind="fieldPasswordInputAttrs"
|
|
19
|
+
@input="onInput"
|
|
20
|
+
@compositionstart="onCompositionStart"
|
|
21
|
+
@compositionend="onCompositionEnd"
|
|
22
|
+
@focus="onFocus"
|
|
23
|
+
@blur="onBlur"
|
|
24
|
+
@beforeinput="onBeforeinput"
|
|
25
|
+
ref="contentRef"
|
|
26
|
+
:value="content"
|
|
27
|
+
type="password"
|
|
28
|
+
v-else
|
|
29
|
+
/>
|
|
30
|
+
</slot>
|
|
31
|
+
<slot name="end-input"></slot>
|
|
28
32
|
</div>
|
|
29
33
|
<div v-bind="fieldMessageAttrs" v-if="message">{{ message }}</div>
|
|
30
34
|
<div v-bind="fieldHelpAttrs" v-if="help">{{ help }}</div>
|