nuxt-glorious 2.0.0-develop-14 → 2.0.0-develop-15
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/dist/module.json +1 -1
- package/dist/runtime/components/G/Input.vue +22 -22
- package/package.json +1 -1
package/dist/module.json
CHANGED
@@ -12,9 +12,9 @@ const inputValue: any = ref(null)
|
|
12
12
|
watch(
|
13
13
|
() => inputValue.value,
|
14
14
|
() => {
|
15
|
-
if (getAttribute(props.mode, '
|
15
|
+
if (getAttribute(props.mode, 'input', 'mode') === 'tag') return
|
16
16
|
|
17
|
-
switch (getAttribute(props.display, '
|
17
|
+
switch (getAttribute(props.display, 'input', 'display')) {
|
18
18
|
case 'price':
|
19
19
|
inputValue.value = numbersWithSeparateSamePrice(inputValue.value)
|
20
20
|
modelValue.value = inputValue.value.toString().replaceAll(',', '')
|
@@ -57,11 +57,11 @@ const computeIconSize = computed(() => {
|
|
57
57
|
const tags: any = ref([])
|
58
58
|
|
59
59
|
const addTag = (event: any) => {
|
60
|
-
if (getAttribute(props.tagLockOption, '
|
60
|
+
if (getAttribute(props.tagLockOption, 'input', 'tagLockOption')) return
|
61
61
|
|
62
62
|
if (tags.value.length === 0) tags.value = []
|
63
63
|
|
64
|
-
if (getAttribute(props.mode, '
|
64
|
+
if (getAttribute(props.mode, 'input', 'mode') !== 'tag') return
|
65
65
|
const value: any = event.target.value
|
66
66
|
tags.value.push(value)
|
67
67
|
modelValue.value = tags.value
|
@@ -104,7 +104,7 @@ const removeTag = (tag: string) => {
|
|
104
104
|
|
105
105
|
// -------------------------------------- init value
|
106
106
|
const initValue = () => {
|
107
|
-
if (getAttribute(props.mode, '
|
107
|
+
if (getAttribute(props.mode, 'input', 'mode') === 'tag') {
|
108
108
|
tags.value = modelValue.value
|
109
109
|
return
|
110
110
|
}
|
@@ -117,10 +117,10 @@ watch(
|
|
117
117
|
() => initValue()
|
118
118
|
)
|
119
119
|
|
120
|
-
const typeInput = ref(getAttribute(props.type, '
|
120
|
+
const typeInput = ref(getAttribute(props.type, 'input', 'type'))
|
121
121
|
|
122
122
|
const inputClicked = (event: any) => {
|
123
|
-
if (getAttribute(props.mode, '
|
123
|
+
if (getAttribute(props.mode, 'input', 'mode') === 'tag' && props.options) {
|
124
124
|
const gio = document.querySelectorAll('.glorious-input-options')
|
125
125
|
gio.forEach((element: any) => element.classList.add('hidden'))
|
126
126
|
|
@@ -137,9 +137,9 @@ const inputClicked = (event: any) => {
|
|
137
137
|
<template>
|
138
138
|
<div class="flex flex-col">
|
139
139
|
<span class="glorious-title text-sm font-medium text-gray-500">
|
140
|
-
{{ getAttribute(props.title, '
|
140
|
+
{{ getAttribute(props.title, 'input', 'title') }}
|
141
141
|
<span
|
142
|
-
v-if="getAttribute(props.required, '
|
142
|
+
v-if="getAttribute(props.required, 'input', 'required')"
|
143
143
|
class="text-red-500"
|
144
144
|
>
|
145
145
|
*
|
@@ -156,28 +156,28 @@ const inputClicked = (event: any) => {
|
|
156
156
|
<div class="relative">
|
157
157
|
<input
|
158
158
|
v-model="inputValue"
|
159
|
-
:inputmode="getAttribute(props.inputMode, '
|
159
|
+
:inputmode="getAttribute(props.inputMode, 'input', 'inputMode')"
|
160
160
|
:autocomplete="
|
161
|
-
getAttribute(props.autocomplete, '
|
161
|
+
getAttribute(props.autocomplete, 'input', 'autocomplete')
|
162
162
|
"
|
163
163
|
class="w-full glorious-input-field"
|
164
164
|
:class="[
|
165
165
|
`size-${props.size}`,
|
166
|
-
`glorious-input-${getAttribute(props.color, '
|
167
|
-
getAttribute(props.type, '
|
166
|
+
`glorious-input-${getAttribute(props.color, 'input', 'color')}`,
|
167
|
+
getAttribute(props.type, 'input', 'type') === 'password'
|
168
168
|
? 'pl-[30px] pr-3'
|
169
169
|
: 'px-3',
|
170
|
-
`mode-${getAttribute(props.mode, '
|
170
|
+
`mode-${getAttribute(props.mode, 'input', 'mode')}`,
|
171
171
|
]"
|
172
|
-
:placeholder="getAttribute(props.placeholder, '
|
173
|
-
:disabled="getAttribute(props.disable, '
|
172
|
+
:placeholder="getAttribute(props.placeholder, 'input', 'placeholder')"
|
173
|
+
:disabled="getAttribute(props.disable, 'input', 'disable')"
|
174
174
|
:type="typeInput"
|
175
175
|
@keyup.enter="addTag($event)"
|
176
176
|
@click="inputClicked($event)"
|
177
177
|
/>
|
178
178
|
<GIcon
|
179
179
|
v-if="
|
180
|
-
getAttribute(props.type, '
|
180
|
+
getAttribute(props.type, 'input', 'type') === 'password' &&
|
181
181
|
typeInput === 'password'
|
182
182
|
"
|
183
183
|
class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
|
@@ -187,7 +187,7 @@ const inputClicked = (event: any) => {
|
|
187
187
|
></GIcon>
|
188
188
|
<GIcon
|
189
189
|
v-if="
|
190
|
-
getAttribute(props.type, '
|
190
|
+
getAttribute(props.type, 'input', 'type') === 'password' &&
|
191
191
|
typeInput === 'text'
|
192
192
|
"
|
193
193
|
class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
|
@@ -202,7 +202,7 @@ const inputClicked = (event: any) => {
|
|
202
202
|
:class="[`size-${props.size}`]"
|
203
203
|
>
|
204
204
|
<div
|
205
|
-
v-if="getAttribute(props.loading, '
|
205
|
+
v-if="getAttribute(props.loading, 'input', 'loading')"
|
206
206
|
class="flex justify-center"
|
207
207
|
>
|
208
208
|
<GLoading color="green" />
|
@@ -216,7 +216,7 @@ const inputClicked = (event: any) => {
|
|
216
216
|
>
|
217
217
|
{{
|
218
218
|
option[
|
219
|
-
getAttribute(props.displayTextKey, '
|
219
|
+
getAttribute(props.displayTextKey, 'input', 'displayTextKey')
|
220
220
|
]
|
221
221
|
}}
|
222
222
|
</div>
|
@@ -234,7 +234,7 @@ const inputClicked = (event: any) => {
|
|
234
234
|
{{
|
235
235
|
typeof item === 'object'
|
236
236
|
? item[
|
237
|
-
getAttribute(props.displayTextKey, '
|
237
|
+
getAttribute(props.displayTextKey, 'input', 'displayTextKey')
|
238
238
|
]
|
239
239
|
: item
|
240
240
|
}}
|
@@ -253,7 +253,7 @@ const inputClicked = (event: any) => {
|
|
253
253
|
:size="computeIconSize"
|
254
254
|
/>
|
255
255
|
<div
|
256
|
-
v-if="getAttribute(props.loading, '
|
256
|
+
v-if="getAttribute(props.loading, 'input', 'loading')"
|
257
257
|
class="absolute top-1 bottom-0 my-auto left-1"
|
258
258
|
>
|
259
259
|
<GLoading color="green" />
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "2.0.0-develop-
|
2
|
+
"version": "2.0.0-develop-15",
|
3
3
|
"name": "nuxt-glorious",
|
4
4
|
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
5
|
"repository": "sajadhzj/nuxt-glorious",
|