@tplc/wot 1.0.8 → 1.0.9
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.8...v1.0.9) (2025-12-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 调整wot ([c8fff58](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c8fff587f4176cfb6b672d8ac8c59c74f62d6af1))
|
|
11
|
+
|
|
5
12
|
### [1.0.8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.81...v1.0.8) (2025-12-06)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import '../common/abstracts/variable';
|
|
2
|
+
@import '../common/abstracts/mixin';
|
|
3
|
+
|
|
4
|
+
.wot-theme-dark {
|
|
5
|
+
@include b(input) {
|
|
6
|
+
@include e(placeholder) {
|
|
7
|
+
color: $-dark-color3;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@include b(input) {
|
|
13
|
+
@include e(placeholder) {
|
|
14
|
+
color: $-input-placeholder-color;
|
|
15
|
+
|
|
16
|
+
&.is-error {
|
|
17
|
+
color: $-input-error-color;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import '../common/abstracts/variable';
|
|
2
|
+
@import '../common/abstracts/mixin';
|
|
3
|
+
|
|
4
|
+
.wot-theme-dark {
|
|
5
|
+
@include b(textarea) {
|
|
6
|
+
@include e(placeholder) {
|
|
7
|
+
color: $-dark-color3;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@include b(textarea) {
|
|
13
|
+
@include e(placeholder) {
|
|
14
|
+
color: $-input-placeholder-color;
|
|
15
|
+
|
|
16
|
+
&.is-error {
|
|
17
|
+
color: $-input-error-color;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="rootClass" :style="customStyle">
|
|
3
3
|
<view v-if="label || $slots.label" class="wd-textarea__label" :style="labelStyle">
|
|
4
|
-
<text
|
|
4
|
+
<text
|
|
5
|
+
v-if="isRequired && markerSide === 'before'"
|
|
6
|
+
class="wd-textarea__required wd-textarea__required--left"
|
|
7
|
+
>
|
|
8
|
+
*
|
|
9
|
+
</text>
|
|
5
10
|
<view v-if="prefixIcon || $slots.prefix" class="wd-textarea__prefix">
|
|
6
|
-
<wd-icon
|
|
11
|
+
<wd-icon
|
|
12
|
+
v-if="prefixIcon && !$slots.prefix"
|
|
13
|
+
custom-class="wd-textarea__icon"
|
|
14
|
+
:name="prefixIcon"
|
|
15
|
+
@click="onClickPrefixIcon"
|
|
16
|
+
/>
|
|
7
17
|
<slot v-else name="prefix"></slot>
|
|
8
18
|
</view>
|
|
9
19
|
<view class="wd-textarea__label-inner">
|
|
@@ -14,7 +24,9 @@
|
|
|
14
24
|
</view>
|
|
15
25
|
|
|
16
26
|
<!-- 文本域 -->
|
|
17
|
-
<view
|
|
27
|
+
<view
|
|
28
|
+
:class="`wd-textarea__value ${showClear ? 'is-suffix' : ''} ${customTextareaContainerClass} ${showWordCount ? 'is-show-limit' : ''}`"
|
|
29
|
+
>
|
|
18
30
|
<textarea
|
|
19
31
|
:class="`wd-textarea__inner ${customTextareaClass}`"
|
|
20
32
|
v-model="inputValue"
|
|
@@ -51,7 +63,12 @@
|
|
|
51
63
|
|
|
52
64
|
<view v-if="props.readonly" class="wd-textarea__readonly-mask" />
|
|
53
65
|
<view class="wd-textarea__suffix">
|
|
54
|
-
<wd-icon
|
|
66
|
+
<wd-icon
|
|
67
|
+
v-if="showClear"
|
|
68
|
+
custom-class="wd-textarea__clear"
|
|
69
|
+
name="error-fill"
|
|
70
|
+
@click="handleClear"
|
|
71
|
+
/>
|
|
55
72
|
<view v-if="showWordCount" class="wd-textarea__count">
|
|
56
73
|
<text :class="countClass">
|
|
57
74
|
{{ currentLength }}
|
|
@@ -69,8 +86,8 @@ export default {
|
|
|
69
86
|
options: {
|
|
70
87
|
virtualHost: true,
|
|
71
88
|
addGlobalClass: true,
|
|
72
|
-
styleIsolation: 'shared'
|
|
73
|
-
}
|
|
89
|
+
styleIsolation: 'shared',
|
|
90
|
+
},
|
|
74
91
|
}
|
|
75
92
|
</script>
|
|
76
93
|
|
|
@@ -102,7 +119,7 @@ const emit = defineEmits([
|
|
|
102
119
|
'confirm',
|
|
103
120
|
'linechange',
|
|
104
121
|
'clickprefixicon',
|
|
105
|
-
'click'
|
|
122
|
+
'click',
|
|
106
123
|
])
|
|
107
124
|
const slots = useSlots() as TextareaSlots
|
|
108
125
|
|
|
@@ -121,7 +138,7 @@ watch(
|
|
|
121
138
|
(newValue) => {
|
|
122
139
|
focused.value = newValue
|
|
123
140
|
},
|
|
124
|
-
{ immediate: true, deep: true }
|
|
141
|
+
{ immediate: true, deep: true },
|
|
125
142
|
)
|
|
126
143
|
|
|
127
144
|
watch(
|
|
@@ -129,7 +146,7 @@ watch(
|
|
|
129
146
|
(newValue) => {
|
|
130
147
|
inputValue.value = isDef(newValue) ? String(newValue) : ''
|
|
131
148
|
},
|
|
132
|
-
{ immediate: true, deep: true }
|
|
149
|
+
{ immediate: true, deep: true },
|
|
133
150
|
)
|
|
134
151
|
|
|
135
152
|
const { parent: form } = useParent(FORM_KEY)
|
|
@@ -139,7 +156,13 @@ const { parent: form } = useParent(FORM_KEY)
|
|
|
139
156
|
*/
|
|
140
157
|
const showClear = computed(() => {
|
|
141
158
|
const { disabled, readonly, clearable, clearTrigger } = props
|
|
142
|
-
if (
|
|
159
|
+
if (
|
|
160
|
+
clearable &&
|
|
161
|
+
!readonly &&
|
|
162
|
+
!disabled &&
|
|
163
|
+
inputValue.value &&
|
|
164
|
+
(clearTrigger === 'always' || (props.clearTrigger === 'focus' && focusing.value))
|
|
165
|
+
) {
|
|
143
166
|
return true
|
|
144
167
|
} else {
|
|
145
168
|
return false
|
|
@@ -169,7 +192,11 @@ const isRequired = computed(() => {
|
|
|
169
192
|
if (form && form.props.rules) {
|
|
170
193
|
const rules = form.props.rules
|
|
171
194
|
for (const key in rules) {
|
|
172
|
-
if (
|
|
195
|
+
if (
|
|
196
|
+
Object.prototype.hasOwnProperty.call(rules, key) &&
|
|
197
|
+
key === props.prop &&
|
|
198
|
+
Array.isArray(rules[key])
|
|
199
|
+
) {
|
|
173
200
|
formRequired = rules[key].some((rule: FormItemRule) => rule.required)
|
|
174
201
|
}
|
|
175
202
|
}
|
|
@@ -210,7 +237,7 @@ const labelStyle = computed(() => {
|
|
|
210
237
|
return props.labelWidth
|
|
211
238
|
? objToStyle({
|
|
212
239
|
'min-width': props.labelWidth,
|
|
213
|
-
'max-width': props.labelWidth
|
|
240
|
+
'max-width': props.labelWidth,
|
|
214
241
|
})
|
|
215
242
|
: ''
|
|
216
243
|
})
|
|
@@ -261,7 +288,7 @@ async function handleBlur({ detail }: any) {
|
|
|
261
288
|
focusing.value = false
|
|
262
289
|
emit('blur', {
|
|
263
290
|
value: inputValue.value,
|
|
264
|
-
cursor: detail.cursor ? detail.cursor : null
|
|
291
|
+
cursor: detail.cursor ? detail.cursor : null,
|
|
265
292
|
})
|
|
266
293
|
}
|
|
267
294
|
function handleFocus({ detail }: any) {
|