@neatui/vue 1.2.12 → 1.2.16
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/package.json
CHANGED
|
@@ -144,12 +144,18 @@
|
|
|
144
144
|
watch([() => dom.value, () => tip.value], () => {
|
|
145
145
|
if (dom.value && tip.value) {
|
|
146
146
|
ex.value = new Follow(dom.value, tip.value, (status) => {
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
if (!props?.pos?.includes(':fixed')) {
|
|
148
|
+
if (status === 'b') {
|
|
149
|
+
const _pos = props?.pos?.replace(/b/g, 't');
|
|
150
|
+
if (_pos) {
|
|
151
|
+
state.pos = _pos;
|
|
152
|
+
}
|
|
153
|
+
} else {
|
|
154
|
+
const _pos = props?.pos?.replace(/t/g, 'b');
|
|
155
|
+
if (_pos) {
|
|
156
|
+
state.pos = _pos;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
153
159
|
}
|
|
154
160
|
});
|
|
155
161
|
} else {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<div v-if="ready" :ui-form-tips="state.ontips">{{ state.tips }}</div>
|
|
7
7
|
<slot>
|
|
8
8
|
<textarea
|
|
9
|
+
ref="el"
|
|
9
10
|
:rows="rows"
|
|
10
11
|
v-model="mv"
|
|
11
12
|
:type="type"
|
|
@@ -61,6 +62,11 @@
|
|
|
61
62
|
type: Number,
|
|
62
63
|
default: null
|
|
63
64
|
},
|
|
65
|
+
// 最小长度
|
|
66
|
+
autoHeight: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
64
70
|
// 是否禁用
|
|
65
71
|
disabled: {
|
|
66
72
|
type: Boolean,
|
|
@@ -141,7 +147,6 @@
|
|
|
141
147
|
});
|
|
142
148
|
|
|
143
149
|
const mv: any = ref(props.modelValue);
|
|
144
|
-
|
|
145
150
|
watch(
|
|
146
151
|
() => props.modelValue,
|
|
147
152
|
(v: any) => {
|
|
@@ -150,6 +155,8 @@
|
|
|
150
155
|
},
|
|
151
156
|
{ deep: true, immediate: true }
|
|
152
157
|
);
|
|
158
|
+
const el: any = ref(null);
|
|
159
|
+
// const rows = ref(1);
|
|
153
160
|
watch(
|
|
154
161
|
() => mv.value,
|
|
155
162
|
(v: any) => {
|
|
@@ -159,6 +166,12 @@
|
|
|
159
166
|
mv.value = value;
|
|
160
167
|
}
|
|
161
168
|
emits('update:modelValue', value);
|
|
169
|
+
|
|
170
|
+
// 自动高度
|
|
171
|
+
if (props.autoHeight) {
|
|
172
|
+
el.value.style.height = 'auto';
|
|
173
|
+
el.value.style.height = el.value.scrollHeight + 'px';
|
|
174
|
+
}
|
|
162
175
|
},
|
|
163
176
|
{ deep: true }
|
|
164
177
|
);
|