hisonvue 1.1.22 → 1.1.23
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/LICENSE +21 -21
- package/README.md +260 -260
- package/dist/{HAccordion-CNWAodMp.mjs → HAccordion-BFl1mLFn.mjs} +2 -2
- package/dist/{HAccordion-CKbaRrfY.js → HAccordion-D4VuY7dP.js} +1 -1
- package/dist/{HBaggie-BQYZO1MF.js → HBaggie-B2-hUbeO.js} +1 -1
- package/dist/{HBaggie-C-OS7n2D.mjs → HBaggie-Cu0cqy_0.mjs} +2 -2
- package/dist/{HBanner-8AQVAGPP.js → HBanner-Bbp_22he.js} +1 -1
- package/dist/{HBanner-D0ImN6h1.mjs → HBanner-CJhgh8Av.mjs} +2 -2
- package/dist/{HButton-CuoH95_k.mjs → HButton-BJy7qJxO.mjs} +2 -2
- package/dist/{HButton-C1AtcoQd.js → HButton-CnI66WaY.js} +1 -1
- package/dist/{HCalendar-DFXWXkci.js → HCalendar-Birc716P.js} +2 -2
- package/dist/{HCalendar-CnuUn3Xk.mjs → HCalendar-CkzhtP-a.mjs} +2 -2
- package/dist/{HCaption-Di8ePmqg.mjs → HCaption-CvfOGjLH.mjs} +1 -1
- package/dist/{HCaption-BaelSNHR.js → HCaption-o7zHNPFi.js} +1 -1
- package/dist/{HChart-xM2KDiJi.mjs → HChart-9HpLcSAF.mjs} +1 -1
- package/dist/{HChart-DKfoM5dM.js → HChart-CRNhurrL.js} +1 -1
- package/dist/{HDrawer-A3BpOuup.js → HDrawer-C4C1soyr.js} +1 -1
- package/dist/{HDrawer-Vt4JA6pk.mjs → HDrawer-_GV5YZAt.mjs} +1 -1
- package/dist/{HDropdown-Dj7h-JPP.js → HDropdown-CZOjJzGI.js} +1 -1
- package/dist/{HDropdown-BBEH646p.mjs → HDropdown-rOSEF1le.mjs} +2 -2
- package/dist/{HFileset-B9EmgNi1.js → HFileset-BWdpsZxK.js} +1 -1
- package/dist/{HFileset-oi7P1lcc.mjs → HFileset-DEtMGoeG.mjs} +1 -1
- package/dist/{HGap-Bp1hRvbT.mjs → HGap-Bu7F233f.mjs} +1 -1
- package/dist/{HGap-Dy_H_-in.js → HGap-DzddYH3m.js} +1 -1
- package/dist/{HGrid-Bc13aqjL.mjs → HGrid--_YRxc-I.mjs} +1 -1
- package/dist/{HGrid-DDbU5kIr.js → HGrid-Bt_iy9Kt.js} +1 -1
- package/dist/{HImagebox-8Uwvm5U0.mjs → HImagebox-BOE4P4WI.mjs} +1 -1
- package/dist/{HImagebox-BVeQuB4p.js → HImagebox-BSjnoCEL.js} +1 -1
- package/dist/HInput-BPqc5Yki.js +1 -0
- package/dist/{HInput-DoSKCROI.mjs → HInput-WrTJ-7Za.mjs} +364 -451
- package/dist/HInputGroup-B9TLmdJA.mjs +320 -0
- package/dist/HInputGroup-CmYq67bE.js +1 -0
- package/dist/{HLabel-BAbaNhJP.js → HLabel-BOD2RCZp.js} +1 -1
- package/dist/{HLabel-DQVACpDP.mjs → HLabel-D5wM-IkN.mjs} +2 -2
- package/dist/{HLayout-BoHgIQcJ.mjs → HLayout-B5lrXA5M.mjs} +1 -1
- package/dist/{HLayout-CgaYkiuH.js → HLayout-ddBZkvt_.js} +1 -1
- package/dist/{HList-BROYxKwn.js → HList-CAsiBzwq.js} +1 -1
- package/dist/{HList-BQEDGW7_.mjs → HList-qvvMg1GY.mjs} +2 -2
- package/dist/{HModal-DTqm3PfL.js → HModal-CK9wkc73.js} +1 -1
- package/dist/{HModal-GpwcBz5c.mjs → HModal-DxuxiUAp.mjs} +1 -1
- package/dist/{HNote-Dv8mltb0.mjs → HNote-8-eRuRxV.mjs} +1 -1
- package/dist/{HNote-BotCfjhk.js → HNote-DAiqR0NK.js} +1 -1
- package/dist/{HPagination-DyqohdbC.js → HPagination-D2EbHt09.js} +1 -1
- package/dist/{HPagination-DG0I3Orn.mjs → HPagination-DSfxM1dp.mjs} +2 -2
- package/dist/{HParagraph-dWlO5RLM.mjs → HParagraph-BwXjwyuQ.mjs} +1 -1
- package/dist/{HParagraph-BheX7M-W.js → HParagraph-CBsf7TXw.js} +1 -1
- package/dist/{HPopup-BrkB_lUB.mjs → HPopup-CFt35psB.mjs} +1 -1
- package/dist/{HPopup-BcGomDSy.js → HPopup-DF9ffRS8.js} +1 -1
- package/dist/{HSpinner-CjjGcQJD.js → HSpinner-CUBK5bDY.js} +1 -1
- package/dist/{HSpinner-D6VNpQLM.mjs → HSpinner-DYOnQbZ_.mjs} +1 -1
- package/dist/{HTable-D2HYTuO9.mjs → HTable-CTqwvXER.mjs} +1 -1
- package/dist/{HTable-BdNtBsjD.js → HTable-Y-8ga-98.js} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +97 -64
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-DcB16odB.js → index-B6cKtmm6.js} +3 -3
- package/dist/{index-CGr5-mvg.mjs → index-HfC1PNxb.mjs} +5 -7
- package/dist/{setButtonCssEvent-T2QV1cDz.mjs → setButtonCssEvent-DKQg_9AF.mjs} +1 -1
- package/dist/{setButtonCssEvent-CTLQPvWj.js → setButtonCssEvent-fK8lE3Ve.js} +1 -1
- package/nuxt/module.mjs +40 -40
- package/nuxt/plugin.mjs +21 -21
- package/nuxt/warn-filter.mjs +41 -41
- package/package.json +56 -56
- package/dist/HInput-DHK28wmp.js +0 -1
- package/dist/HInputGroup-DSUZqea5.mjs +0 -281
- package/dist/HInputGroup-gD-E8vgq.js +0 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { T as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as un, ref as r, computed as f, inject as me, onMounted as sn, onBeforeUnmount as ln, watch as m, unref as rn, nextTick as ye, createElementBlock as y, openBlock as $, normalizeClass as M, normalizeStyle as S, createElementVNode as A, Fragment as $e, renderList as dn, toDisplayString as Ce, withDirectives as Te, vShow as ke } from "vue";
|
|
2
|
+
import { T as an, y as _, N as mn, h as g, g as vn, u as pn, O as i, l as d, P as ee, w as L, e as fn, t as Mn, a as gn, b as we, Q as ve, R as bn, U as yn, r as $n, c as Cn, d as Tn } from "./index-HfC1PNxb.mjs";
|
|
3
|
+
import { _ as kn } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const wn = {
|
|
5
5
|
/**
|
|
6
6
|
* Unique identifier for the input.
|
|
7
7
|
* - You can later retrieve its methods via `hison.component.getInput(id)`
|
|
8
|
-
* -
|
|
8
|
+
* - Duplicate `id` values can cause unexpected behavior if kept in a global registry.
|
|
9
9
|
*/
|
|
10
10
|
id: { type: String, required: !1 },
|
|
11
|
+
/**
|
|
12
|
+
* Data extraction key for `HInputGroup`.
|
|
13
|
+
* - Used as the key when `HInputGroup.getDataObject()` / `getDataModel()` extracts values.
|
|
14
|
+
* - If omitted or empty, it falls back to `id`.
|
|
15
|
+
* - `id` is still the runtime identifier for `hison.component.getInput(id)`.
|
|
16
|
+
*/
|
|
17
|
+
dataKey: { type: String, required: !1 },
|
|
11
18
|
/**
|
|
12
19
|
* HTML `name` attribute.
|
|
13
20
|
* - Default: same as `id` when omitted.
|
|
14
21
|
* - Radio usage (`inputType: 'radio'`):
|
|
15
22
|
* - All `HInput` with the same `name` form one radio group.
|
|
16
|
-
* - Each radio’s own `id` is
|
|
23
|
+
* - Each radio’s own `id` is the runtime identifier, while `dataKey` is the data candidate value
|
|
24
|
+
* (falls back to `id` when `dataKey` is empty).
|
|
17
25
|
* - The radio’s local `modelValue` is boolean (`true`/`false`) and drives its `checked` state.
|
|
18
26
|
* - When wrapped by `HInputGroup`, radios are aggregated per `name` and exposed as
|
|
19
|
-
* `{ [name]:
|
|
20
|
-
* - To set a selection programmatically (load/set), pass `{ [name]: <
|
|
27
|
+
* `{ [name]: selectedRadioDataKey | null }`.
|
|
28
|
+
* - To set a selection programmatically (load/set), pass `{ [name]: <radioDataKey> }` to `HInputGroup`.
|
|
21
29
|
* - Changing `name` at runtime via `setName()` re-registers group membership with `HInputGroup`.
|
|
22
30
|
* - Non-radio inputs: `name` only sets the underlying HTML attribute (no grouping behavior).
|
|
23
31
|
*/
|
|
24
32
|
name: { type: String, required: !1 },
|
|
25
33
|
/**
|
|
26
34
|
* Bound value for the input field.
|
|
27
|
-
* - Controlled via `v-model`
|
|
28
|
-
* - Supports multiple types depending on `inputType`:
|
|
29
|
-
* - `text`, `email`, `mask`, `digit`, `textarea` → `string`
|
|
30
|
-
* - `number` → `number`
|
|
31
|
-
* - `checkbox` → `boolean`
|
|
32
|
-
* - `select` → `string | number | boolean`
|
|
33
|
-
* - `date`, `month`, `time` → `string` or `Date`
|
|
34
|
-
* - Internally processed and formatted based on `inputType` and `format`
|
|
35
35
|
*/
|
|
36
36
|
modelValue: {
|
|
37
37
|
type: [String, Number, Boolean, Object, Array, Date],
|
|
@@ -39,8 +39,6 @@ const kn = {
|
|
|
39
39
|
},
|
|
40
40
|
/**
|
|
41
41
|
* Custom class string applied to the input container.
|
|
42
|
-
* - Supports responsive classes like `hison-col-*`, `hison-pos-*`, `hison-size-*`
|
|
43
|
-
* - Accepts string / array / object (Vue standard) form
|
|
44
42
|
*/
|
|
45
43
|
class: {
|
|
46
44
|
type: [String, Array, Object],
|
|
@@ -48,8 +46,6 @@ const kn = {
|
|
|
48
46
|
},
|
|
49
47
|
/**
|
|
50
48
|
* Inline style for the input element.
|
|
51
|
-
* - Accepts string, CSSProperties object, or an array of objects
|
|
52
|
-
* - Merged with internal dynamic styles
|
|
53
49
|
*/
|
|
54
50
|
style: {
|
|
55
51
|
type: [String, Object, Array],
|
|
@@ -57,80 +53,54 @@ const kn = {
|
|
|
57
53
|
},
|
|
58
54
|
/**
|
|
59
55
|
* Controls visibility of the input field.
|
|
60
|
-
* - Boolean only. Use `:visible="false"`
|
|
61
|
-
* - Default: `true`
|
|
62
56
|
*/
|
|
63
57
|
visible: { type: Boolean, default: !0 },
|
|
64
58
|
/**
|
|
65
59
|
* Tooltip text shown on hover.
|
|
66
|
-
* - Maps to the `title` attribute
|
|
67
|
-
* - Modifiable at runtime via `HInputMethods.setTitle()`
|
|
68
60
|
*/
|
|
69
61
|
title: { type: String, required: !1 },
|
|
70
62
|
/**
|
|
71
63
|
* Input type.
|
|
72
|
-
* - Available values: `'text'`, `'mask'`, `'number'`, `'digit'`, `'date'`, `'month'`, `'time'`, `'email'`, `'password'`, `'checkbox'`, `'range'`, `'color'`, `'textarea'`, `'select'`
|
|
73
|
-
* - Accepts enum `InputType` or its literal strings
|
|
74
|
-
* - Affects input formatting and behavior
|
|
75
64
|
*/
|
|
76
65
|
inputType: {
|
|
77
66
|
type: String,
|
|
78
67
|
required: !1,
|
|
79
|
-
validator: (e) =>
|
|
68
|
+
validator: (e) => mn.includes(e)
|
|
80
69
|
},
|
|
81
70
|
/**
|
|
82
71
|
* Format string used for displaying or formatting the value.
|
|
83
|
-
* - Used when `type` is `'number'`, `'mask'`, `'date'`, or `'month'`
|
|
84
72
|
*/
|
|
85
73
|
format: { type: String, required: !1 },
|
|
86
74
|
/**
|
|
87
75
|
* Placeholder text to show when value is null or empty.
|
|
88
|
-
* - Used as a display fallback in span mode
|
|
89
76
|
*/
|
|
90
77
|
nullText: { type: String, default: "" },
|
|
91
78
|
/**
|
|
92
79
|
* Maximum numeric value.
|
|
93
|
-
* - Only applicable when `type` is `'number'`
|
|
94
|
-
* - Enforced during input and formatting
|
|
95
|
-
* - Accepts string or number
|
|
96
80
|
*/
|
|
97
81
|
maxNumber: { type: [String, Number], required: !1 },
|
|
98
82
|
/**
|
|
99
83
|
* Minimum numeric value.
|
|
100
|
-
* - Only applicable when `type` is `'number'`
|
|
101
|
-
* - Accepts string or number
|
|
102
84
|
*/
|
|
103
85
|
minNumber: { type: [String, Number], required: !1 },
|
|
104
86
|
/**
|
|
105
87
|
* Rounding precision for numeric inputs.
|
|
106
|
-
* - Only applies when `type` is `'number'`
|
|
107
|
-
* - Accepts positive or negative integers (string or number)
|
|
108
88
|
*/
|
|
109
89
|
roundNumber: { type: [String, Number], required: !1 },
|
|
110
90
|
/**
|
|
111
91
|
* Maximum number of characters allowed.
|
|
112
|
-
* - Truncates string if exceeded
|
|
113
|
-
* - Does not consider byte size
|
|
114
|
-
* - Accepts string or number
|
|
115
92
|
*/
|
|
116
93
|
maxLength: { type: [String, Number], required: !1 },
|
|
117
94
|
/**
|
|
118
95
|
* Maximum number of bytes allowed.
|
|
119
|
-
* - Truncates string based on UTF-8 byte size
|
|
120
|
-
* - Uses `hison.utils.getCutByteLength()` internally
|
|
121
|
-
* - Accepts string or number
|
|
122
96
|
*/
|
|
123
97
|
maxByte: { type: [String, Number], required: !1 },
|
|
124
98
|
/**
|
|
125
99
|
* Placeholder string shown inside the input when empty.
|
|
126
|
-
* - Maps to the `placeholder` attribute
|
|
127
100
|
*/
|
|
128
101
|
placeholder: { type: String, required: !1 },
|
|
129
102
|
/**
|
|
130
103
|
* Placeholder text color.
|
|
131
|
-
* - Semantic tokens: 'primary' | 'muted' | 'info' | 'success' | 'danger' | 'warning'
|
|
132
|
-
* - Or any valid CSS color string (e.g. '#fff', '#ffffff', 'rgb(...)', 'rgba(...)').
|
|
133
|
-
* - Default: 'primary'
|
|
134
104
|
*/
|
|
135
105
|
placeholderColor: {
|
|
136
106
|
type: String,
|
|
@@ -138,69 +108,46 @@ const kn = {
|
|
|
138
108
|
},
|
|
139
109
|
/**
|
|
140
110
|
* Edit mode of the input.
|
|
141
|
-
* - Values: `'editable'`, `'readonly'`, `'disable'`
|
|
142
|
-
* - Accepts enum `EditMode` or its literal strings
|
|
143
|
-
* - `'readonly'` and `'disable'` both prevent editing but differ in styling
|
|
144
111
|
*/
|
|
145
112
|
editMode: {
|
|
146
113
|
type: String,
|
|
147
|
-
default:
|
|
114
|
+
default: _.editable,
|
|
148
115
|
validator: (e) => ["editable", "disable", "readonly"].includes(e)
|
|
149
116
|
},
|
|
150
117
|
/**
|
|
151
118
|
* Whether the input is required.
|
|
152
|
-
* - Boolean only
|
|
153
|
-
* - Adds `hison-input-required` class when `true`
|
|
154
119
|
*/
|
|
155
120
|
required: { type: Boolean, default: !1 },
|
|
156
121
|
/**
|
|
157
122
|
* Bold font style toggle.
|
|
158
|
-
* - Boolean only
|
|
159
|
-
* - Adds `hison-font-bold` class when enabled
|
|
160
123
|
*/
|
|
161
124
|
fontBold: { type: Boolean, default: !1 },
|
|
162
125
|
/**
|
|
163
126
|
* Italic font style toggle.
|
|
164
|
-
* - Boolean only
|
|
165
|
-
* - Adds `hison-font-italic` class when enabled
|
|
166
127
|
*/
|
|
167
128
|
fontItalic: { type: Boolean, default: !1 },
|
|
168
129
|
/**
|
|
169
130
|
* Strikethrough font style toggle.
|
|
170
|
-
* - Boolean only
|
|
171
|
-
* - Adds `hison-font-thruline` class when enabled
|
|
172
131
|
*/
|
|
173
132
|
fontThruline: { type: Boolean, default: !1 },
|
|
174
133
|
/**
|
|
175
134
|
* Underline font style toggle.
|
|
176
|
-
* - Boolean only
|
|
177
|
-
* - Adds `hison-font-underline` class when enabled
|
|
178
135
|
*/
|
|
179
136
|
fontUnderline: { type: Boolean, default: !1 },
|
|
180
137
|
/**
|
|
181
138
|
* Text alignment for the input’s display text.
|
|
182
|
-
* - 'left' | 'center' | 'right'
|
|
183
|
-
* - Accepts enum `TextAlign` or its literal strings
|
|
184
139
|
*/
|
|
185
140
|
textAlign: {
|
|
186
141
|
type: String,
|
|
187
142
|
default: null,
|
|
188
|
-
validator: (e) => e == null ||
|
|
143
|
+
validator: (e) => e == null || an.includes(e)
|
|
189
144
|
},
|
|
190
145
|
/**
|
|
191
146
|
* Whether to show border (rendered as subtle box-shadow).
|
|
192
|
-
* - Default: false (no border)
|
|
193
147
|
*/
|
|
194
148
|
border: { type: Boolean, default: !0 },
|
|
195
149
|
/**
|
|
196
150
|
* List of selectable options for `inputType: 'select'`.
|
|
197
|
-
* - Each option should be an object with `text` (label shown to the user) and `value` (actual value to bind).
|
|
198
|
-
* - Used only when `inputType === 'select'`.
|
|
199
|
-
* example
|
|
200
|
-
* options: [
|
|
201
|
-
* { text: 'Active', value: 'A' },
|
|
202
|
-
* { text: 'Inactive', value: 'I' }
|
|
203
|
-
* ]
|
|
204
151
|
*/
|
|
205
152
|
options: {
|
|
206
153
|
type: Array,
|
|
@@ -209,97 +156,50 @@ const kn = {
|
|
|
209
156
|
},
|
|
210
157
|
/**
|
|
211
158
|
* Output value when checkbox is checked (used in display mode).
|
|
212
|
-
* - Used only when `inputType === 'checkbox'`.
|
|
213
|
-
* - Affects the display text returned by `getText()` and the span view when not editing.
|
|
214
159
|
*/
|
|
215
160
|
checkedText: { type: String, default: "Y" },
|
|
216
161
|
/**
|
|
217
162
|
* Output value when checkbox is unchecked (used in display mode).
|
|
218
|
-
* - Used only when `inputType === 'checkbox'`.
|
|
219
|
-
* - Affects the display text returned by `getText()` and the span view when not editing.
|
|
220
163
|
*/
|
|
221
164
|
uncheckedText: { type: String, default: "N" },
|
|
222
|
-
/**
|
|
223
|
-
* Controls keyboard focus order of the element.
|
|
224
|
-
* - `0` enables natural tab navigation, positive numbers set custom order.
|
|
225
|
-
* - `null` or `''` removes tabindex (not focusable).
|
|
226
|
-
*/
|
|
227
|
-
tabIndex: {
|
|
228
|
-
type: [Number, String],
|
|
229
|
-
default: null,
|
|
230
|
-
validator: (e) => e === null || e === "" || !isNaN(+e) && isFinite(+e)
|
|
231
|
-
},
|
|
232
165
|
/**
|
|
233
166
|
* Custom formatter function for display text (span text) of the input component.
|
|
234
|
-
*
|
|
235
|
-
* It overrides the default formatting logic based on `inputType`, allowing full control
|
|
236
|
-
* over the rendered text content of the input.
|
|
237
|
-
*
|
|
238
|
-
* If this prop is provided, it takes priority over any built-in format logic
|
|
239
|
-
* such as number/date formatting, checkbox label mapping, or select label resolution.
|
|
240
|
-
*
|
|
241
|
-
* @example
|
|
242
|
-
* // 1. Formatting numbers as currency
|
|
243
|
-
* <HInput
|
|
244
|
-
* v-model="form.price"
|
|
245
|
-
* inputTextdHandler={(val) => `$${Number(val).toLocaleString()}`}
|
|
246
|
-
* />
|
|
247
|
-
* // modelValue = 1200 => "$1,200"
|
|
248
|
-
*
|
|
249
|
-
* @example
|
|
250
|
-
* // 2. Showing 'Yes' or 'No' instead of true/false
|
|
251
|
-
* <HInput
|
|
252
|
-
* v-model="form.enabled"
|
|
253
|
-
* inputType="checkbox"
|
|
254
|
-
* inputTextdHandler={(val) => val ? 'Yes' : 'No'}
|
|
255
|
-
* />
|
|
256
|
-
* // modelValue = true => "Yes"
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* // 3. Applying custom date formatting
|
|
260
|
-
* <HInput
|
|
261
|
-
* v-model="form.hireDate"
|
|
262
|
-
* inputType="date"
|
|
263
|
-
* inputTextdHandler={(val) => dayjs(val).format('MMMM D, YYYY')}
|
|
264
|
-
* />
|
|
265
|
-
* // modelValue = '2025-07-03' => "July 3, 2025"
|
|
266
|
-
*
|
|
267
|
-
* @remarks
|
|
268
|
-
* This only affects the `spanText` used in display mode. It does **not** modify the actual value
|
|
269
|
-
* bound via `v-model`, nor the value shown in the actual input box when in editing mode.
|
|
270
167
|
*/
|
|
271
168
|
inputTextdHandler: {
|
|
272
169
|
type: Function,
|
|
273
170
|
default: void 0
|
|
274
171
|
},
|
|
275
172
|
/**
|
|
276
|
-
* Defines the
|
|
277
|
-
*
|
|
278
|
-
* - `'default'` : Uses the standard circular (radio) or square (checkbox) design.
|
|
279
|
-
* - `'switch'` : Renders a modern switch-style toggle (sliding thumb on a track).
|
|
280
|
-
*
|
|
281
|
-
* @default 'default'
|
|
173
|
+
* Defines the visual style for toggle-type inputs (`checkbox` or `radio`).
|
|
282
174
|
*/
|
|
283
175
|
toggleStyle: {
|
|
284
176
|
type: String,
|
|
285
177
|
default: "default",
|
|
286
178
|
validator: (e) => ["default", "switch"].includes(e)
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* Controls keyboard focus order of the element.
|
|
182
|
+
*/
|
|
183
|
+
tabIndex: {
|
|
184
|
+
type: [Number, String],
|
|
185
|
+
default: null,
|
|
186
|
+
validator: (e) => e === null || e === "" || !isNaN(+e) && isFinite(+e)
|
|
287
187
|
}
|
|
288
|
-
},
|
|
188
|
+
}, ne = /* @__PURE__ */ new WeakSet(), oe = /* @__PURE__ */ new WeakSet(), he = (e) => {
|
|
289
189
|
const n = e.currentTarget;
|
|
290
190
|
if (g.event.cssEvent.input_onBeforeFocus(e) === !1) {
|
|
291
191
|
e.stopPropagation(), e.preventDefault();
|
|
292
192
|
return;
|
|
293
193
|
}
|
|
294
194
|
n.classList.add("hison-input-on-active"), g.event.cssEvent.input_onAfterFocus(e);
|
|
295
|
-
},
|
|
195
|
+
}, Ne = (e) => {
|
|
296
196
|
const n = e.currentTarget;
|
|
297
197
|
if (g.event.cssEvent.input_onBeforeBlur(e) === !1) {
|
|
298
198
|
e.stopPropagation(), e.preventDefault();
|
|
299
199
|
return;
|
|
300
200
|
}
|
|
301
201
|
n.classList.remove("hison-input-on-active"), n.classList.remove("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterBlur(e);
|
|
302
|
-
},
|
|
202
|
+
}, Le = (e) => {
|
|
303
203
|
const n = e.currentTarget;
|
|
304
204
|
if (!n.readOnly) {
|
|
305
205
|
if (g.event.cssEvent.input_onBeforeMouseover(e) === !1) {
|
|
@@ -308,7 +208,7 @@ const kn = {
|
|
|
308
208
|
}
|
|
309
209
|
n.classList.add("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterMouseover(e);
|
|
310
210
|
}
|
|
311
|
-
},
|
|
211
|
+
}, Be = (e) => {
|
|
312
212
|
const n = e.currentTarget;
|
|
313
213
|
if (!n.readOnly) {
|
|
314
214
|
if (g.event.cssEvent.input_onBeforeMouseout(e) === !1) {
|
|
@@ -317,7 +217,7 @@ const kn = {
|
|
|
317
217
|
}
|
|
318
218
|
n.classList.remove("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterMouseout(e);
|
|
319
219
|
}
|
|
320
|
-
},
|
|
220
|
+
}, Fe = (e) => {
|
|
321
221
|
const n = e.currentTarget;
|
|
322
222
|
if (!n.readOnly) {
|
|
323
223
|
if (g.event.cssEvent.input_onBeforeTouchstart(e) === !1) {
|
|
@@ -326,7 +226,7 @@ const kn = {
|
|
|
326
226
|
}
|
|
327
227
|
n.classList.add("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterTouchstart(e);
|
|
328
228
|
}
|
|
329
|
-
},
|
|
229
|
+
}, Pe = (e) => {
|
|
330
230
|
const n = e.currentTarget;
|
|
331
231
|
if (!n.readOnly) {
|
|
332
232
|
if (g.event.cssEvent.input_onBeforeTouchend(e) === !1) {
|
|
@@ -335,20 +235,20 @@ const kn = {
|
|
|
335
235
|
}
|
|
336
236
|
n.classList.remove("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterTouchend(e);
|
|
337
237
|
}
|
|
338
|
-
},
|
|
238
|
+
}, Ie = (e) => {
|
|
339
239
|
const n = e.currentTarget;
|
|
340
240
|
n.readOnly || n.classList.remove("hison-input-on-mouseover");
|
|
341
|
-
}, wn = (e) => {
|
|
342
|
-
ee.has(e) || (ee.add(e), e.addEventListener("mouseenter", Ne), e.addEventListener("mouseleave", Le), e.addEventListener("touchstart", Be, { passive: !1, capture: !0 }), e.addEventListener("touchend", Fe, { passive: !1, capture: !0 }), e.addEventListener("touchcancel", Pe, { passive: !1, capture: !0 }));
|
|
343
241
|
}, hn = (e) => {
|
|
344
|
-
|
|
242
|
+
ne.has(e) || (ne.add(e), e.addEventListener("mouseenter", Le), e.addEventListener("mouseleave", Be), e.addEventListener("touchstart", Fe, { passive: !1, capture: !0 }), e.addEventListener("touchend", Pe, { passive: !1, capture: !0 }), e.addEventListener("touchcancel", Ie, { passive: !1, capture: !0 }));
|
|
345
243
|
}, Nn = (e) => {
|
|
346
|
-
ne.has(e)
|
|
244
|
+
ne.has(e) && (ne.delete(e), e.removeEventListener("mouseenter", Le), e.removeEventListener("mouseleave", Be), e.removeEventListener("touchstart", Fe, { capture: !0 }), e.removeEventListener("touchend", Pe, { capture: !0 }), e.removeEventListener("touchcancel", Ie, { capture: !0 }), e.classList.remove("hison-input-on-mouseover"));
|
|
347
245
|
}, Ln = (e) => {
|
|
348
|
-
|
|
349
|
-
}, Bn =
|
|
246
|
+
oe.has(e) || (oe.add(e), e.addEventListener("focus", he), e.addEventListener("blur", Ne));
|
|
247
|
+
}, Bn = (e) => {
|
|
248
|
+
oe.has(e) && (oe.delete(e), e.removeEventListener("focus", he), e.removeEventListener("blur", Ne), e.classList.remove("hison-input-on-active"), e.classList.remove("hison-input-on-mouseover"));
|
|
249
|
+
}, Fn = un({
|
|
350
250
|
name: "HInput",
|
|
351
|
-
props:
|
|
251
|
+
props: wn,
|
|
352
252
|
inheritAttrs: !1,
|
|
353
253
|
emits: [
|
|
354
254
|
"update:modelValue",
|
|
@@ -392,81 +292,81 @@ const kn = {
|
|
|
392
292
|
"contextmenu"
|
|
393
293
|
],
|
|
394
294
|
setup(e, { emit: n }) {
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
}, l = r(e.inputType ??
|
|
295
|
+
const C = r(null), B = r(null), k = r(null), v = e.id ? e.id : vn(), o = r(e.name ?? v), Se = f(() => o.value), F = r((e.dataKey ?? "").trim() || v), te = `hinput:${v}`, pe = pn(), q = r([]), ue = () => {
|
|
296
|
+
q.value = fn(Mn(e.class) || "", pe.value), gn(q.value, "col") === -1 && q.value.push("hison-col-12"), we(q.value, "size", g.componentStyle.size), we(q.value, "color", "primary");
|
|
297
|
+
}, l = r(e.inputType ?? i.text), ie = f(() => {
|
|
398
298
|
switch (l.value) {
|
|
399
|
-
case
|
|
299
|
+
case i.checkbox:
|
|
400
300
|
return "checkbox";
|
|
401
|
-
case
|
|
301
|
+
case i.radio:
|
|
402
302
|
return "radio";
|
|
403
|
-
case
|
|
303
|
+
case i.select:
|
|
404
304
|
return "select";
|
|
405
|
-
case
|
|
305
|
+
case i.range:
|
|
406
306
|
return "range";
|
|
407
|
-
case
|
|
307
|
+
case i.color:
|
|
408
308
|
return "color";
|
|
409
309
|
default:
|
|
410
310
|
return "text";
|
|
411
311
|
}
|
|
412
|
-
}),
|
|
312
|
+
}), Ae = f(() => {
|
|
413
313
|
switch (l.value) {
|
|
414
|
-
case
|
|
415
|
-
case
|
|
314
|
+
case i.mask:
|
|
315
|
+
case i.digit:
|
|
416
316
|
return "text";
|
|
417
317
|
default:
|
|
418
318
|
return l.value;
|
|
419
319
|
}
|
|
420
|
-
}),
|
|
320
|
+
}), U = r(e.toggleStyle ?? "default"), h = r(e.format ?? null), P = r(d.utils.isNumeric(e.maxNumber) ? Number(e.maxNumber) : null), I = r(d.utils.isNumeric(e.minNumber) ? Number(e.minNumber) : null), K = r(d.utils.isInteger(e.roundNumber) || d.utils.isNegativeInteger(e.roundNumber) || e.roundNumber === "0" ? Number(e.roundNumber) : null), E = r(d.utils.isPositiveInteger(e.maxLength) ? Number(e.maxLength) : null), D = r(d.utils.isPositiveInteger(e.maxByte) ? Number(e.maxByte) : null), se = (t) => {
|
|
421
321
|
switch (t) {
|
|
422
|
-
case
|
|
423
|
-
case
|
|
424
|
-
return
|
|
425
|
-
case
|
|
426
|
-
case
|
|
427
|
-
case
|
|
428
|
-
return
|
|
322
|
+
case i.number:
|
|
323
|
+
case i.digit:
|
|
324
|
+
return L.right;
|
|
325
|
+
case i.date:
|
|
326
|
+
case i.month:
|
|
327
|
+
case i.time:
|
|
328
|
+
return L.center;
|
|
429
329
|
default:
|
|
430
|
-
return
|
|
330
|
+
return L.left;
|
|
431
331
|
}
|
|
432
|
-
},
|
|
433
|
-
if (
|
|
434
|
-
return l.value ===
|
|
332
|
+
}, V = r(e.textAlign ?? se(l.value)), Ee = f(() => ({ textAlign: V.value })), H = r(e.border ?? !0), De = (t) => (t = String(t), E.value && (t = t.substring(0, E.value)), D.value && (t = d.utils.getCutByteLength(t, D.value)), t), Ve = (t) => (t = Number(t), P.value && t > P.value && (t = P.value), I.value && t < I.value && (t = I.value), K.value && (t = d.utils.getRound(t, K.value)), t), le = (t) => {
|
|
333
|
+
if (ee(t))
|
|
334
|
+
return l.value === i.checkbox || l.value === i.radio ? !1 : t;
|
|
435
335
|
try {
|
|
436
336
|
switch (l.value) {
|
|
437
|
-
case
|
|
438
|
-
case
|
|
439
|
-
case
|
|
440
|
-
case
|
|
441
|
-
case
|
|
442
|
-
case
|
|
443
|
-
l.value ===
|
|
337
|
+
case i.text:
|
|
338
|
+
case i.password:
|
|
339
|
+
case i.email:
|
|
340
|
+
case i.mask:
|
|
341
|
+
case i.digit:
|
|
342
|
+
case i.textarea:
|
|
343
|
+
l.value === i.mask && (t = bn(t, h.value ?? "")), l.value === i.digit && (t = yn(t)), t = De(t);
|
|
444
344
|
break;
|
|
445
|
-
case
|
|
446
|
-
l.value ===
|
|
345
|
+
case i.number:
|
|
346
|
+
l.value === i.number && (t = Ve(t));
|
|
447
347
|
break;
|
|
448
|
-
case
|
|
449
|
-
t && (t = d.utils.getDateWithFormat(t,
|
|
348
|
+
case i.date:
|
|
349
|
+
t && (t = d.utils.getDateWithFormat(t, ve.DateFormat["yyyy-MM-dd"]));
|
|
450
350
|
break;
|
|
451
|
-
case
|
|
452
|
-
t && (t = d.utils.getDateWithFormat(t,
|
|
351
|
+
case i.month:
|
|
352
|
+
t && (t = d.utils.getDateWithFormat(t, ve.YearMonthFormat["yyyy-MM"]));
|
|
453
353
|
break;
|
|
454
|
-
case
|
|
455
|
-
t && (t = d.utils.getDateWithFormat(t,
|
|
354
|
+
case i.time:
|
|
355
|
+
t && (t = d.utils.getDateWithFormat(t, ve.TimeFormat["HH:mm:ss"]));
|
|
456
356
|
break;
|
|
457
|
-
case
|
|
458
|
-
case
|
|
357
|
+
case i.checkbox:
|
|
358
|
+
case i.radio:
|
|
459
359
|
t = !!t;
|
|
460
360
|
default:
|
|
461
361
|
break;
|
|
462
362
|
}
|
|
463
|
-
} catch (
|
|
464
|
-
console.warn("[HInput] Failed to format value", t,
|
|
363
|
+
} catch (u) {
|
|
364
|
+
console.warn("[HInput] Failed to format value", t, u);
|
|
465
365
|
}
|
|
466
366
|
return t;
|
|
467
|
-
}, s = r(
|
|
367
|
+
}, s = r(le(e.modelValue)), qe = f(() => s.value), T = r(null), O = r(e.visible), W = r(e.title ?? ""), j = r(e.nullText ?? ""), w = r(e.editMode), Ke = f(() => w.value === _.disable), re = f(() => w.value === _.readonly), Re = f(() => H.value && !re.value ? "hison-border" : ""), Ue = f(() => w.value !== _.editable ? [`hison-input-${w.value}`, `hison-input-${ie.value}-${w.value}`] : []), z = r(e.required), He = f(() => z.value ? ["hison-input-required", `hison-input-${ie.value}-required`] : []), Y = r(e.placeholder ?? ""), Q = r(e.placeholderColor ?? "primary"), Oe = (t) => {
|
|
468
368
|
if (!t) return null;
|
|
469
|
-
const
|
|
369
|
+
const u = t.trim();
|
|
470
370
|
return [
|
|
471
371
|
"primary",
|
|
472
372
|
"muted",
|
|
@@ -479,329 +379,342 @@ const kn = {
|
|
|
479
379
|
"custom3",
|
|
480
380
|
"custom4",
|
|
481
381
|
"custom5"
|
|
482
|
-
].includes(
|
|
483
|
-
},
|
|
484
|
-
const t =
|
|
382
|
+
].includes(u) ? `var(--hison-${u}-emptyTextColor)` : u;
|
|
383
|
+
}, We = f(() => {
|
|
384
|
+
const t = Oe(Q.value);
|
|
485
385
|
return t ? { "--hison-input-placeholder-color": t } : {};
|
|
486
|
-
}),
|
|
487
|
-
if (
|
|
488
|
-
}),
|
|
489
|
-
if (
|
|
490
|
-
}),
|
|
491
|
-
if (
|
|
492
|
-
}),
|
|
493
|
-
if (
|
|
494
|
-
}),
|
|
386
|
+
}), X = r(e.fontBold), je = f(() => {
|
|
387
|
+
if (X.value) return "hison-font-bold";
|
|
388
|
+
}), J = r(e.fontItalic), ze = f(() => {
|
|
389
|
+
if (J.value) return "hison-font-italic";
|
|
390
|
+
}), Z = r(e.fontThruline), Ye = f(() => {
|
|
391
|
+
if (Z.value) return "hison-font-thruline";
|
|
392
|
+
}), G = r(e.fontUnderline), Qe = f(() => {
|
|
393
|
+
if (G.value) return "hison-font-underline";
|
|
394
|
+
}), Xe = f(() => O.value ? "" : "hison-display-none"), de = r(!1), N = r(!1), x = r(
|
|
495
395
|
e.tabIndex !== null && e.tabIndex !== "" ? Number(e.tabIndex) : null
|
|
496
|
-
),
|
|
497
|
-
if (l.value ===
|
|
396
|
+
), fe = me("registerToInputGroup", null), a = me("notifyInputGroupStatus", null), R = me("radioMembershipChanged", null), ae = (t) => {
|
|
397
|
+
if (l.value === i.checkbox || l.value === i.radio)
|
|
498
398
|
return t ? e.checkedText : e.uncheckedText;
|
|
499
|
-
if (
|
|
399
|
+
if (ee(t) || t === "") return j.value ?? "";
|
|
500
400
|
if (e.inputTextdHandler)
|
|
501
401
|
return e.inputTextdHandler(t);
|
|
502
|
-
let
|
|
402
|
+
let u = String(t);
|
|
503
403
|
try {
|
|
504
404
|
switch (l.value) {
|
|
505
|
-
case
|
|
506
|
-
|
|
405
|
+
case i.password:
|
|
406
|
+
u = "•".repeat(t.length);
|
|
507
407
|
break;
|
|
508
|
-
case
|
|
509
|
-
|
|
408
|
+
case i.number:
|
|
409
|
+
u = d.utils.getNumberFormat(t, h.value ?? d.getNumberFormat());
|
|
510
410
|
break;
|
|
511
|
-
case
|
|
512
|
-
|
|
411
|
+
case i.date:
|
|
412
|
+
u = d.utils.getDateWithFormat(t, h.value ?? d.getDateFormat());
|
|
513
413
|
break;
|
|
514
|
-
case
|
|
515
|
-
|
|
414
|
+
case i.month:
|
|
415
|
+
u = d.utils.getDateWithFormat(t, h.value ?? d.getYearMonthFormat());
|
|
516
416
|
break;
|
|
517
|
-
case
|
|
518
|
-
|
|
417
|
+
case i.time:
|
|
418
|
+
u = d.utils.getDateWithFormat(t, h.value ?? d.getTimeFormat());
|
|
519
419
|
break;
|
|
520
|
-
case
|
|
521
|
-
const
|
|
522
|
-
|
|
420
|
+
case i.select:
|
|
421
|
+
const b = C.value, be = b.selectedIndex;
|
|
422
|
+
u = be >= 0 ? b.options[be].text : "";
|
|
523
423
|
break;
|
|
524
424
|
}
|
|
525
|
-
} catch (
|
|
526
|
-
console.warn("[HInput] Failed to format value", t,
|
|
425
|
+
} catch (b) {
|
|
426
|
+
console.warn("[HInput] Failed to format value", t, b), u = "";
|
|
527
427
|
}
|
|
528
|
-
return
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
var
|
|
532
|
-
(
|
|
428
|
+
return u;
|
|
429
|
+
}, c = r(""), Je = (t) => {
|
|
430
|
+
w.value === _.editable && (de.value = !0), ye(() => {
|
|
431
|
+
var u;
|
|
432
|
+
(u = C.value) == null || u.focus();
|
|
533
433
|
});
|
|
534
|
-
}, Je = (t) => {
|
|
535
|
-
let i = $.value.value;
|
|
536
|
-
(l.value === u.mask || l.value === u.digit || (S.value || A.value) && (l.value === u.text || l.value === u.email || l.value === u.password || l.value === u.textarea)) && (i = se(i), $.value.value = i), s.value = i, h.value = !0, m == null || m(p, s.value), n("input", t, T.value, s.value), n("update:modelValue", s.value);
|
|
537
434
|
}, Ze = (t) => {
|
|
538
|
-
|
|
435
|
+
let u = C.value.value;
|
|
436
|
+
(l.value === i.mask || l.value === i.digit || (E.value || D.value) && (l.value === i.text || l.value === i.email || l.value === i.password || l.value === i.textarea)) && (u = le(u), C.value.value = u), s.value = u, N.value = !0, a == null || a(v, s.value), n("input", t, k.value, s.value), n("update:modelValue", s.value);
|
|
539
437
|
}, Ge = (t) => {
|
|
540
|
-
|
|
541
|
-
}, v = (t, i = !0, D = !1) => {
|
|
542
|
-
s.value = i ? se(t) : t, x.value = de(s.value), l.value === u.checkbox || l.value === u.radio ? $.value.checked = !!s.value : $.value.value = s.value, D && n("change", C.value, s.value, T.value);
|
|
438
|
+
T.value = s.value, n("focus", t, k.value);
|
|
543
439
|
}, xe = (t) => {
|
|
544
|
-
|
|
545
|
-
|
|
440
|
+
T.value !== s.value && (p(s.value, !0, !0), N.value = !0, a == null || a(v, s.value)), de.value = !1, n("blur", t, k.value);
|
|
441
|
+
}, p = (t, u = !0, b = !1) => {
|
|
442
|
+
s.value = u ? le(t) : t, c.value = ae(s.value), l.value === i.checkbox || l.value === i.radio ? C.value.checked = !!s.value : C.value.value = s.value, b && n("change", T.value, s.value, k.value);
|
|
546
443
|
}, ce = (t) => {
|
|
547
|
-
const
|
|
548
|
-
|
|
444
|
+
const u = t.target;
|
|
445
|
+
p(u.value, !1, !0), N.value = !0, a == null || a(v, s.value), n("update:modelValue", s.value);
|
|
549
446
|
}, _e = (t) => {
|
|
550
|
-
const
|
|
551
|
-
|
|
447
|
+
const u = t.target;
|
|
448
|
+
p(u.value, !1, !0), N.value = !0, a == null || a(v, s.value), n("update:modelValue", s.value);
|
|
552
449
|
}, en = (t) => {
|
|
553
|
-
const
|
|
554
|
-
|
|
450
|
+
const u = t.target;
|
|
451
|
+
p(u.checked, !1, !0), N.value = !0, a == null || a(v, s.value), n("update:modelValue", s.value);
|
|
555
452
|
}, nn = (t) => {
|
|
556
|
-
const
|
|
557
|
-
|
|
453
|
+
const u = t.target;
|
|
454
|
+
if (p(u.checked, !1, !0), N.value = !0, a && o.value) {
|
|
455
|
+
const b = u.checked ? F.value || v : null;
|
|
456
|
+
a(o.value, b);
|
|
457
|
+
} else
|
|
458
|
+
a == null || a(v, s.value);
|
|
459
|
+
n("update:modelValue", s.value);
|
|
558
460
|
}, on = (t) => {
|
|
559
|
-
|
|
461
|
+
const u = t.target;
|
|
462
|
+
p(u.value, !1, !0), N.value = !0, a == null || a(v, s.value), n("update:modelValue", s.value);
|
|
463
|
+
}, tn = (t) => {
|
|
464
|
+
if (re.value && (t.code === "Space" || t.code === "Enter")) {
|
|
560
465
|
t.preventDefault(), t.stopPropagation();
|
|
561
466
|
return;
|
|
562
467
|
}
|
|
563
|
-
n("keydown", t,
|
|
564
|
-
},
|
|
565
|
-
g.component.inputList[
|
|
566
|
-
|
|
567
|
-
}),
|
|
468
|
+
n("keydown", t, k.value);
|
|
469
|
+
}, Me = () => {
|
|
470
|
+
g.component.inputList[v] && g.component.inputList[v].isHisonvueComponent && console.warn(`[Hisonvue] The input ID is at risk of being duplicated. ${v}`), $n(te, () => {
|
|
471
|
+
ge(), ye(Me);
|
|
472
|
+
}), C.value && (ue(), B.value && hn(B.value), l.value !== i.checkbox && l.value !== i.radio && l.value !== i.range && l.value !== i.color && Ln(C.value), p(s.value, !1), k.value = {
|
|
568
473
|
isHisonvueComponent: !0,
|
|
569
|
-
getId: () =>
|
|
474
|
+
getId: () => v,
|
|
570
475
|
getType: () => "input",
|
|
476
|
+
getDataKey: () => F.value,
|
|
477
|
+
setDataKey: (t) => {
|
|
478
|
+
const u = (t ?? "").trim(), b = u.length > 0 ? u : v;
|
|
479
|
+
b !== F.value && (F.value = b, l.value === i.radio && s.value && a && o.value && a(o.value, F.value));
|
|
480
|
+
},
|
|
571
481
|
getName: () => o.value,
|
|
572
482
|
setName: (t) => {
|
|
573
483
|
if (t === o.value) return;
|
|
574
|
-
const
|
|
575
|
-
o.value = t, l.value ===
|
|
484
|
+
const u = o.value;
|
|
485
|
+
o.value = t, l.value === i.radio && (R == null || R(v, u, t, !!s.value));
|
|
576
486
|
},
|
|
577
|
-
getText: () =>
|
|
487
|
+
getText: () => c.value,
|
|
578
488
|
getValue: () => s.value,
|
|
579
489
|
setValue: (t) => {
|
|
580
|
-
|
|
490
|
+
T.value = s.value, s.value = t, p(s.value);
|
|
581
491
|
},
|
|
582
|
-
getTitle: () =>
|
|
492
|
+
getTitle: () => W.value,
|
|
583
493
|
setTitle: (t) => {
|
|
584
|
-
|
|
494
|
+
W.value = t;
|
|
585
495
|
},
|
|
586
|
-
isVisible: () =>
|
|
496
|
+
isVisible: () => O.value,
|
|
587
497
|
setVisible: (t) => {
|
|
588
|
-
|
|
498
|
+
O.value = t;
|
|
589
499
|
},
|
|
590
500
|
getInputType: () => l.value,
|
|
591
501
|
setInputType: (t) => {
|
|
592
|
-
l.value =
|
|
502
|
+
l.value = i[t], T.value = s.value, p(s.value), e.textAlign == null && (V.value = se(l.value));
|
|
593
503
|
},
|
|
594
|
-
getFormat: () =>
|
|
504
|
+
getFormat: () => h.value ?? "",
|
|
595
505
|
setFormat: (t) => {
|
|
596
|
-
|
|
506
|
+
h.value = t, T.value = s.value, p(s.value);
|
|
597
507
|
},
|
|
598
|
-
getNullText: () =>
|
|
508
|
+
getNullText: () => j.value,
|
|
599
509
|
setNullText: (t) => {
|
|
600
|
-
|
|
510
|
+
j.value = t, (ee(s.value) || s.value === "") && (c.value = ae(s.value));
|
|
601
511
|
},
|
|
602
|
-
getEditMode: () =>
|
|
512
|
+
getEditMode: () => w.value,
|
|
603
513
|
setEditMode: (t) => {
|
|
604
|
-
|
|
514
|
+
w.value = t;
|
|
605
515
|
},
|
|
606
|
-
getMaxNumber: () =>
|
|
516
|
+
getMaxNumber: () => P.value,
|
|
607
517
|
setMaxNumber: (t) => {
|
|
608
|
-
d.utils.isNumeric(t) && (
|
|
518
|
+
d.utils.isNumeric(t) && (P.value = t, T.value = s.value, l.value === i.number && p(s.value));
|
|
609
519
|
},
|
|
610
|
-
getMinNumber: () =>
|
|
520
|
+
getMinNumber: () => I.value,
|
|
611
521
|
setMinNumber: (t) => {
|
|
612
|
-
d.utils.isNumeric(t) && (
|
|
522
|
+
d.utils.isNumeric(t) && (I.value = t, T.value = s.value, l.value === i.number && p(s.value));
|
|
613
523
|
},
|
|
614
|
-
getRoundNumber: () =>
|
|
524
|
+
getRoundNumber: () => K.value,
|
|
615
525
|
setRoundNumber: (t) => {
|
|
616
|
-
!d.utils.isPositiveInteger(t) && !d.utils.isNegativeInteger(t) && t !== 0 || (
|
|
526
|
+
!d.utils.isPositiveInteger(t) && !d.utils.isNegativeInteger(t) && t !== 0 || (K.value = t, T.value = s.value, l.value === i.number && p(s.value));
|
|
617
527
|
},
|
|
618
|
-
getMaxLength: () =>
|
|
528
|
+
getMaxLength: () => E.value,
|
|
619
529
|
setMaxLength: (t) => {
|
|
620
|
-
d.utils.isPositiveInteger(t) && (
|
|
530
|
+
d.utils.isPositiveInteger(t) && (E.value = t), T.value = s.value, p(s.value);
|
|
621
531
|
},
|
|
622
|
-
getMaxByte: () =>
|
|
532
|
+
getMaxByte: () => D.value,
|
|
623
533
|
setMaxByte: (t) => {
|
|
624
|
-
d.utils.isPositiveInteger(t) && (
|
|
534
|
+
d.utils.isPositiveInteger(t) && (D.value = t), T.value = s.value, p(s.value);
|
|
625
535
|
},
|
|
626
|
-
getRequired: () =>
|
|
536
|
+
getRequired: () => z.value,
|
|
627
537
|
setRequired: (t) => {
|
|
628
|
-
|
|
538
|
+
z.value = t;
|
|
629
539
|
},
|
|
630
|
-
getPlaceholder: () =>
|
|
540
|
+
getPlaceholder: () => Y.value,
|
|
631
541
|
setPlaceholder: (t) => {
|
|
632
|
-
|
|
542
|
+
Y.value = t;
|
|
633
543
|
},
|
|
634
|
-
getPlaceholderColor: () =>
|
|
544
|
+
getPlaceholderColor: () => Q.value,
|
|
635
545
|
setPlaceholderColor: (t) => {
|
|
636
|
-
const
|
|
637
|
-
|
|
546
|
+
const u = (t ?? "").trim();
|
|
547
|
+
Q.value = u.length > 0 ? u : "primary";
|
|
638
548
|
},
|
|
639
|
-
isFontBold: () =>
|
|
549
|
+
isFontBold: () => X.value,
|
|
640
550
|
setFontBold: (t) => {
|
|
641
|
-
|
|
551
|
+
X.value = t;
|
|
642
552
|
},
|
|
643
|
-
isFontItalic: () =>
|
|
553
|
+
isFontItalic: () => J.value,
|
|
644
554
|
setFontItalic: (t) => {
|
|
645
|
-
|
|
555
|
+
J.value = t;
|
|
646
556
|
},
|
|
647
|
-
isFontThruline: () =>
|
|
557
|
+
isFontThruline: () => Z.value,
|
|
648
558
|
setFontThruline: (t) => {
|
|
649
|
-
|
|
559
|
+
Z.value = t;
|
|
650
560
|
},
|
|
651
|
-
isFontUnderline: () =>
|
|
561
|
+
isFontUnderline: () => G.value,
|
|
652
562
|
setFontUnderline: (t) => {
|
|
653
|
-
|
|
563
|
+
G.value = t;
|
|
654
564
|
},
|
|
655
|
-
getTextAlign: () =>
|
|
565
|
+
getTextAlign: () => V.value,
|
|
656
566
|
setTextAlign: (t) => {
|
|
657
|
-
(t ===
|
|
567
|
+
(t === L.left || t === L.center || t === L.right) && (V.value = t);
|
|
658
568
|
},
|
|
659
|
-
isBorder: () =>
|
|
569
|
+
isBorder: () => H.value,
|
|
660
570
|
setBorder: (t) => {
|
|
661
|
-
|
|
571
|
+
H.value = t;
|
|
662
572
|
},
|
|
663
|
-
isModified: () =>
|
|
573
|
+
isModified: () => N.value,
|
|
664
574
|
setModified: (t) => {
|
|
665
|
-
|
|
575
|
+
N.value = t;
|
|
666
576
|
},
|
|
667
|
-
getToggleStyle: () =>
|
|
577
|
+
getToggleStyle: () => U.value,
|
|
668
578
|
setToggleStyle: (t) => {
|
|
669
|
-
(t === "default" || t === "switch") && (
|
|
579
|
+
(t === "default" || t === "switch") && (U.value = t);
|
|
670
580
|
},
|
|
671
|
-
getTabIndex: () =>
|
|
581
|
+
getTabIndex: () => x.value,
|
|
672
582
|
setTabIndex: (t) => {
|
|
673
|
-
|
|
583
|
+
x.value = t != null ? Number(t) : null;
|
|
674
584
|
},
|
|
675
585
|
focus: () => {
|
|
676
586
|
var t;
|
|
677
|
-
|
|
587
|
+
B.value ? B.value.focus() : (t = C.value) == null || t.focus();
|
|
678
588
|
},
|
|
679
|
-
reload: () =>
|
|
680
|
-
}, g.component.inputList[
|
|
681
|
-
},
|
|
682
|
-
|
|
589
|
+
reload: () => Cn(te)
|
|
590
|
+
}, g.component.inputList[v] = k.value, fe && fe(v), n("mounted", k.value));
|
|
591
|
+
}, ge = () => {
|
|
592
|
+
Tn(te), delete g.component.inputList[v], l.value !== i.checkbox && l.value !== i.radio && l.value !== i.range && l.value !== i.color && Bn(C.value), B.value && Nn(B.value);
|
|
683
593
|
};
|
|
684
|
-
return
|
|
685
|
-
|
|
686
|
-
}),
|
|
687
|
-
|
|
688
|
-
}),
|
|
594
|
+
return sn(Me), ln(ge), m(pe, (t) => {
|
|
595
|
+
ue(), n("responsive-change", t);
|
|
596
|
+
}), m(() => e.modelValue, (t) => {
|
|
597
|
+
p(t, !1);
|
|
598
|
+
}), m(() => e.name, (t) => {
|
|
689
599
|
if (t && t !== o.value) {
|
|
690
|
-
const
|
|
691
|
-
o.value = t, l.value ===
|
|
600
|
+
const u = o.value;
|
|
601
|
+
o.value = t, l.value === i.radio && (R == null || R(v, u, t, !!s.value));
|
|
692
602
|
}
|
|
693
|
-
}),
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
}),
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
}),
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
}),
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}),
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
}),
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
}),
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
}),
|
|
717
|
-
const
|
|
718
|
-
|
|
719
|
-
}),
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
}),
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}),
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
}),
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
}),
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
}),
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
}),
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
}),
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
}),
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
}),
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
}),
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
603
|
+
}), m(() => e.dataKey, (t) => {
|
|
604
|
+
const u = (t ?? "").trim(), b = u.length > 0 ? u : v;
|
|
605
|
+
b !== F.value && (F.value = b, l.value === i.radio && s.value && a && o.value && a(o.value, F.value));
|
|
606
|
+
}), m(() => e.visible, (t) => {
|
|
607
|
+
const u = !!t;
|
|
608
|
+
u !== O.value && (O.value = u);
|
|
609
|
+
}), m(() => e.title, (t) => {
|
|
610
|
+
const u = t ?? "";
|
|
611
|
+
u !== W.value && (W.value = u);
|
|
612
|
+
}), m(() => e.nullText, (t) => {
|
|
613
|
+
const u = t ?? "";
|
|
614
|
+
u !== j.value && (j.value = u, (ee(s.value) || s.value === "") && (c.value = ae(s.value)));
|
|
615
|
+
}), m(() => e.inputType, (t) => {
|
|
616
|
+
t && t !== l.value && (l.value = t, e.textAlign == null && (V.value = se(l.value)), p(s.value));
|
|
617
|
+
}), m(() => e.format, (t) => {
|
|
618
|
+
const u = t ?? null;
|
|
619
|
+
u !== h.value && (h.value = u, p(s.value));
|
|
620
|
+
}), m(() => e.maxNumber, (t) => {
|
|
621
|
+
const u = d.utils.isNumeric(t) ? Number(t) : null;
|
|
622
|
+
u !== P.value && (P.value = u, l.value === i.number && p(s.value));
|
|
623
|
+
}), m(() => e.minNumber, (t) => {
|
|
624
|
+
const u = d.utils.isNumeric(t) ? Number(t) : null;
|
|
625
|
+
u !== I.value && (I.value = u, l.value === i.number && p(s.value));
|
|
626
|
+
}), m(() => e.roundNumber, (t) => {
|
|
627
|
+
const u = d.utils.isInteger(t) || d.utils.isNegativeInteger(t) || t === "0" ? Number(t) : null;
|
|
628
|
+
u !== K.value && (K.value = u, l.value === i.number && p(s.value));
|
|
629
|
+
}), m(() => e.maxLength, (t) => {
|
|
630
|
+
const u = d.utils.isPositiveInteger(t) ? Number(t) : null;
|
|
631
|
+
u !== E.value && (E.value = u, p(s.value));
|
|
632
|
+
}), m(() => e.maxByte, (t) => {
|
|
633
|
+
const u = d.utils.isPositiveInteger(t) ? Number(t) : null;
|
|
634
|
+
u !== D.value && (D.value = u, p(s.value));
|
|
635
|
+
}), m(() => e.textAlign, (t) => {
|
|
636
|
+
t && t !== V.value && (t === L.left || t === L.center || t === L.right) && (V.value = t);
|
|
637
|
+
}), m(() => e.border, (t) => {
|
|
638
|
+
const u = !!t;
|
|
639
|
+
u !== H.value && (H.value = u);
|
|
640
|
+
}), m(() => e.placeholder, (t) => {
|
|
641
|
+
const u = t ?? "";
|
|
642
|
+
u !== Y.value && (Y.value = u);
|
|
643
|
+
}), m(() => e.placeholderColor, (t) => {
|
|
644
|
+
const u = t ?? "primary";
|
|
645
|
+
u !== Q.value && (Q.value = u);
|
|
646
|
+
}), m(() => e.required, (t) => {
|
|
647
|
+
const u = !!t;
|
|
648
|
+
u !== z.value && (z.value = u);
|
|
649
|
+
}), m(() => e.fontBold, (t) => {
|
|
650
|
+
const u = !!t;
|
|
651
|
+
u !== X.value && (X.value = u);
|
|
652
|
+
}), m(() => e.fontItalic, (t) => {
|
|
653
|
+
const u = !!t;
|
|
654
|
+
u !== J.value && (J.value = u);
|
|
655
|
+
}), m(() => e.fontThruline, (t) => {
|
|
656
|
+
const u = !!t;
|
|
657
|
+
u !== Z.value && (Z.value = u);
|
|
658
|
+
}), m(() => e.fontUnderline, (t) => {
|
|
659
|
+
const u = !!t;
|
|
660
|
+
u !== G.value && (G.value = u);
|
|
661
|
+
}), m(() => e.editMode, (t) => {
|
|
662
|
+
t && t !== w.value && (w.value = t);
|
|
663
|
+
}), m(() => e.tabIndex, (t) => {
|
|
664
|
+
const u = t === null || t === "" ? null : Number(t);
|
|
665
|
+
u !== x.value && (x.value = u);
|
|
666
|
+
}), m(() => e.class, () => {
|
|
667
|
+
ue();
|
|
668
|
+
}), m(() => e.toggleStyle, (t) => {
|
|
669
|
+
const u = t ?? "default";
|
|
670
|
+
u !== U.value && (u === "default" || u === "switch") && (U.value = u);
|
|
758
671
|
}), {
|
|
759
|
-
inputRef:
|
|
760
|
-
inputTextRef:
|
|
761
|
-
inputMethods: f(() =>
|
|
762
|
-
inputValue:
|
|
763
|
-
editing:
|
|
672
|
+
inputRef: C,
|
|
673
|
+
inputTextRef: B,
|
|
674
|
+
inputMethods: f(() => rn(k)),
|
|
675
|
+
inputValue: qe,
|
|
676
|
+
editing: de,
|
|
764
677
|
props: e,
|
|
765
|
-
id:
|
|
766
|
-
nameAttr:
|
|
767
|
-
responsiveClassList:
|
|
768
|
-
visibleClass:
|
|
769
|
-
editModeClassList:
|
|
770
|
-
requiredClassList:
|
|
771
|
-
fontBoldClass:
|
|
772
|
-
fontItalicClass:
|
|
773
|
-
fontThrulineClass:
|
|
774
|
-
fontUnderlineClass:
|
|
775
|
-
textAlignStyle:
|
|
776
|
-
placeholderColorStyle:
|
|
678
|
+
id: v,
|
|
679
|
+
nameAttr: Se,
|
|
680
|
+
responsiveClassList: q,
|
|
681
|
+
visibleClass: Xe,
|
|
682
|
+
editModeClassList: Ue,
|
|
683
|
+
requiredClassList: He,
|
|
684
|
+
fontBoldClass: je,
|
|
685
|
+
fontItalicClass: ze,
|
|
686
|
+
fontThrulineClass: Ye,
|
|
687
|
+
fontUnderlineClass: Qe,
|
|
688
|
+
textAlignStyle: Ee,
|
|
689
|
+
placeholderColorStyle: We,
|
|
777
690
|
borderClass: Re,
|
|
778
|
-
disable:
|
|
779
|
-
readonly:
|
|
691
|
+
disable: Ke,
|
|
692
|
+
readonly: re,
|
|
780
693
|
inputType: l,
|
|
781
694
|
inputExpressionType: ie,
|
|
782
|
-
inputAttrType:
|
|
783
|
-
title:
|
|
784
|
-
placeholder:
|
|
785
|
-
maxNumber:
|
|
786
|
-
minNumber:
|
|
787
|
-
spanText:
|
|
788
|
-
toggleStyle:
|
|
789
|
-
tabIndex:
|
|
790
|
-
onInput:
|
|
791
|
-
onTextInputFocus:
|
|
792
|
-
onFocus:
|
|
793
|
-
onBlur:
|
|
794
|
-
onRangeChange:
|
|
795
|
-
onColorChange:
|
|
796
|
-
onCheckboxChange:
|
|
797
|
-
onRadioChange:
|
|
798
|
-
onSelectChange:
|
|
799
|
-
onKeydown:
|
|
695
|
+
inputAttrType: Ae,
|
|
696
|
+
title: W,
|
|
697
|
+
placeholder: Y,
|
|
698
|
+
maxNumber: P,
|
|
699
|
+
minNumber: I,
|
|
700
|
+
spanText: c,
|
|
701
|
+
toggleStyle: U,
|
|
702
|
+
tabIndex: x,
|
|
703
|
+
onInput: Ze,
|
|
704
|
+
onTextInputFocus: Je,
|
|
705
|
+
onFocus: Ge,
|
|
706
|
+
onBlur: xe,
|
|
707
|
+
onRangeChange: ce,
|
|
708
|
+
onColorChange: _e,
|
|
709
|
+
onCheckboxChange: en,
|
|
710
|
+
onRadioChange: nn,
|
|
711
|
+
onSelectChange: on,
|
|
712
|
+
onKeydown: tn
|
|
800
713
|
};
|
|
801
714
|
}
|
|
802
|
-
}),
|
|
803
|
-
function
|
|
804
|
-
return
|
|
715
|
+
}), Pn = ["id", "name", "value", "disabled", "readonly", "title", "tabindex"], In = ["id", "name", "value", "disabled", "readonly", "checked", "title", "tabindex"], Sn = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], An = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], En = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], Dn = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], Vn = ["id", "name", "value", "disabled", "readonly", "title", "tabindex"], qn = ["value"], Kn = ["id", "name", "value", "disabled", "readonly", "placeholder", "title", "maxlength", "tabindex"], Rn = ["id", "name", "value", "disabled", "readonly", "title", "placeholder", "tabindex"], Un = ["id", "name", "value", "disabled", "readonly", "type", "title", "placeholder", "max", "min", "tabindex"];
|
|
716
|
+
function Hn(e, n, C, B, k, v) {
|
|
717
|
+
return $(), y("div", {
|
|
805
718
|
class: M([
|
|
806
719
|
"hison-wrapper",
|
|
807
720
|
"hison-s-input-margin-adjustment",
|
|
@@ -809,15 +722,15 @@ function Un(e, n, $, L, T, p) {
|
|
|
809
722
|
e.visibleClass
|
|
810
723
|
])
|
|
811
724
|
}, [
|
|
812
|
-
e.inputType === "range" ? (
|
|
725
|
+
e.inputType === "range" ? ($(), y("div", {
|
|
813
726
|
key: 0,
|
|
814
727
|
class: M([
|
|
815
728
|
"hison-input",
|
|
816
729
|
"hison-input-range-div"
|
|
817
730
|
]),
|
|
818
|
-
style:
|
|
731
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
819
732
|
}, [
|
|
820
|
-
|
|
733
|
+
A("input", {
|
|
821
734
|
ref: "inputRef",
|
|
822
735
|
id: `${e.id}`,
|
|
823
736
|
name: `${e.nameAttr}`,
|
|
@@ -854,16 +767,16 @@ function Un(e, n, $, L, T, p) {
|
|
|
854
767
|
onTouchmove: n[19] || (n[19] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
855
768
|
onTouchcancel: n[20] || (n[20] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
856
769
|
onContextmenu: n[21] || (n[21] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
857
|
-
}, null, 42,
|
|
858
|
-
], 4)) : e.inputType === "color" ? (
|
|
770
|
+
}, null, 42, Pn)
|
|
771
|
+
], 4)) : e.inputType === "color" ? ($(), y("div", {
|
|
859
772
|
key: 1,
|
|
860
773
|
class: M([
|
|
861
774
|
"hison-input",
|
|
862
775
|
"hison-input-color-div"
|
|
863
776
|
]),
|
|
864
|
-
style:
|
|
777
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
865
778
|
}, [
|
|
866
|
-
|
|
779
|
+
A("input", {
|
|
867
780
|
ref: "inputRef",
|
|
868
781
|
id: `${e.id}`,
|
|
869
782
|
name: `${e.nameAttr}`,
|
|
@@ -901,16 +814,16 @@ function Un(e, n, $, L, T, p) {
|
|
|
901
814
|
onTouchmove: n[41] || (n[41] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
902
815
|
onTouchcancel: n[42] || (n[42] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
903
816
|
onContextmenu: n[43] || (n[43] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
904
|
-
}, null, 42,
|
|
905
|
-
], 4)) : e.inputType === "checkbox" ? (
|
|
817
|
+
}, null, 42, In)
|
|
818
|
+
], 4)) : e.inputType === "checkbox" ? ($(), y("div", {
|
|
906
819
|
key: 2,
|
|
907
820
|
class: M([
|
|
908
821
|
"hison-input",
|
|
909
822
|
"hison-input-checkbox-div"
|
|
910
823
|
]),
|
|
911
|
-
style:
|
|
824
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
912
825
|
}, [
|
|
913
|
-
e.toggleStyle !== "switch" ? (
|
|
826
|
+
e.toggleStyle !== "switch" ? ($(), y("input", {
|
|
914
827
|
key: 0,
|
|
915
828
|
ref: "inputRef",
|
|
916
829
|
id: `${e.id}`,
|
|
@@ -948,11 +861,11 @@ function Un(e, n, $, L, T, p) {
|
|
|
948
861
|
onTouchmove: n[63] || (n[63] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
949
862
|
onTouchcancel: n[64] || (n[64] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
950
863
|
onContextmenu: n[65] || (n[65] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
951
|
-
}, null, 42,
|
|
864
|
+
}, null, 42, Sn)) : ($(), y("label", {
|
|
952
865
|
key: 1,
|
|
953
866
|
class: M(["hison-input-checkbox-switch", ...e.editModeClassList])
|
|
954
867
|
}, [
|
|
955
|
-
|
|
868
|
+
A("input", {
|
|
956
869
|
ref: "inputRef",
|
|
957
870
|
id: `${e.id}`,
|
|
958
871
|
name: `${e.nameAttr}`,
|
|
@@ -985,8 +898,8 @@ function Un(e, n, $, L, T, p) {
|
|
|
985
898
|
onTouchmove: n[85] || (n[85] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
986
899
|
onTouchcancel: n[86] || (n[86] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
987
900
|
onContextmenu: n[87] || (n[87] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
988
|
-
}, null, 40,
|
|
989
|
-
|
|
901
|
+
}, null, 40, An),
|
|
902
|
+
A("span", {
|
|
990
903
|
class: M(["hison-switch-visual", [
|
|
991
904
|
...e.editModeClassList,
|
|
992
905
|
...e.requiredClassList
|
|
@@ -994,12 +907,12 @@ function Un(e, n, $, L, T, p) {
|
|
|
994
907
|
"aria-hidden": "true"
|
|
995
908
|
}, null, 2)
|
|
996
909
|
], 2))
|
|
997
|
-
], 4)) : e.inputType === "radio" ? (
|
|
910
|
+
], 4)) : e.inputType === "radio" ? ($(), y("div", {
|
|
998
911
|
key: 3,
|
|
999
912
|
class: M(["hison-input", "hison-input-radio-div"]),
|
|
1000
|
-
style:
|
|
913
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
1001
914
|
}, [
|
|
1002
|
-
e.toggleStyle !== "switch" ? (
|
|
915
|
+
e.toggleStyle !== "switch" ? ($(), y("input", {
|
|
1003
916
|
key: 0,
|
|
1004
917
|
ref: "inputRef",
|
|
1005
918
|
id: `${e.id}`,
|
|
@@ -1038,11 +951,11 @@ function Un(e, n, $, L, T, p) {
|
|
|
1038
951
|
onTouchmove: n[107] || (n[107] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1039
952
|
onTouchcancel: n[108] || (n[108] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1040
953
|
onContextmenu: n[109] || (n[109] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1041
|
-
}, null, 42,
|
|
954
|
+
}, null, 42, En)) : ($(), y("label", {
|
|
1042
955
|
key: 1,
|
|
1043
956
|
class: M(["hison-input-radio-switch", ...e.editModeClassList])
|
|
1044
957
|
}, [
|
|
1045
|
-
|
|
958
|
+
A("input", {
|
|
1046
959
|
ref: "inputRef",
|
|
1047
960
|
id: `${e.id}`,
|
|
1048
961
|
name: `${e.nameAttr}`,
|
|
@@ -1075,8 +988,8 @@ function Un(e, n, $, L, T, p) {
|
|
|
1075
988
|
onTouchmove: n[129] || (n[129] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1076
989
|
onTouchcancel: n[130] || (n[130] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1077
990
|
onContextmenu: n[131] || (n[131] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1078
|
-
}, null, 40,
|
|
1079
|
-
|
|
991
|
+
}, null, 40, Dn),
|
|
992
|
+
A("span", {
|
|
1080
993
|
class: M(["hison-switch-visual", [
|
|
1081
994
|
...e.editModeClassList,
|
|
1082
995
|
...e.requiredClassList
|
|
@@ -1084,12 +997,12 @@ function Un(e, n, $, L, T, p) {
|
|
|
1084
997
|
"aria-hidden": "true"
|
|
1085
998
|
}, null, 2)
|
|
1086
999
|
], 2))
|
|
1087
|
-
], 4)) : e.inputType === "select" ? (
|
|
1000
|
+
], 4)) : e.inputType === "select" ? ($(), y("select", {
|
|
1088
1001
|
key: 4,
|
|
1089
1002
|
ref: "inputRef",
|
|
1090
1003
|
id: `${e.id}`,
|
|
1091
1004
|
name: `${e.nameAttr}`,
|
|
1092
|
-
style:
|
|
1005
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1093
1006
|
class: M([
|
|
1094
1007
|
"hison-input",
|
|
1095
1008
|
`hison-input-${e.inputType}`,
|
|
@@ -1129,11 +1042,11 @@ function Un(e, n, $, L, T, p) {
|
|
|
1129
1042
|
onTouchcancel: n[152] || (n[152] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1130
1043
|
onContextmenu: n[153] || (n[153] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1131
1044
|
}, [
|
|
1132
|
-
(
|
|
1045
|
+
($(!0), y($e, null, dn(e.props.options, (o) => ($(), y("option", {
|
|
1133
1046
|
key: o.value,
|
|
1134
1047
|
value: o.value
|
|
1135
|
-
},
|
|
1136
|
-
], 46,
|
|
1048
|
+
}, Ce(o.text), 9, qn))), 128))
|
|
1049
|
+
], 46, Vn)) : e.inputType === "textarea" ? ($(), y("textarea", {
|
|
1137
1050
|
key: 5,
|
|
1138
1051
|
ref: "inputRef",
|
|
1139
1052
|
id: `${e.id}`,
|
|
@@ -1150,7 +1063,7 @@ function Un(e, n, $, L, T, p) {
|
|
|
1150
1063
|
e.borderClass
|
|
1151
1064
|
]),
|
|
1152
1065
|
value: e.inputValue,
|
|
1153
|
-
style:
|
|
1066
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1154
1067
|
disabled: e.disable,
|
|
1155
1068
|
readonly: e.readonly,
|
|
1156
1069
|
placeholder: e.placeholder || void 0,
|
|
@@ -1160,8 +1073,8 @@ function Un(e, n, $, L, T, p) {
|
|
|
1160
1073
|
onInput: n[154] || (n[154] = (...o) => e.onInput && e.onInput(...o)),
|
|
1161
1074
|
onFocus: n[155] || (n[155] = (...o) => e.onFocus && e.onFocus(...o)),
|
|
1162
1075
|
onBlur: n[156] || (n[156] = (...o) => e.onBlur && e.onBlur(...o))
|
|
1163
|
-
},
|
|
1164
|
-
|
|
1076
|
+
}, Ce(e.inputValue), 47, Kn)) : ($(), y($e, { key: 6 }, [
|
|
1077
|
+
Te(A("input", {
|
|
1165
1078
|
ref: "inputTextRef",
|
|
1166
1079
|
id: `input_text_${e.id}`,
|
|
1167
1080
|
name: `input_text_${e.nameAttr}`,
|
|
@@ -1178,7 +1091,7 @@ function Un(e, n, $, L, T, p) {
|
|
|
1178
1091
|
]),
|
|
1179
1092
|
type: "text",
|
|
1180
1093
|
value: e.spanText,
|
|
1181
|
-
style:
|
|
1094
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1182
1095
|
disabled: e.disable,
|
|
1183
1096
|
readonly: e.readonly,
|
|
1184
1097
|
title: e.title || void 0,
|
|
@@ -1204,9 +1117,9 @@ function Un(e, n, $, L, T, p) {
|
|
|
1204
1117
|
onTouchmove: n[174] || (n[174] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1205
1118
|
onTouchcancel: n[175] || (n[175] = (o) => e.$emit("touchcancel", o, e.inputMethods))
|
|
1206
1119
|
}, null, 46, Rn), [
|
|
1207
|
-
[
|
|
1120
|
+
[ke, !e.editing]
|
|
1208
1121
|
]),
|
|
1209
|
-
|
|
1122
|
+
Te(A("input", {
|
|
1210
1123
|
ref: "inputRef",
|
|
1211
1124
|
id: `${e.id}`,
|
|
1212
1125
|
name: `${e.nameAttr}`,
|
|
@@ -1217,7 +1130,7 @@ function Un(e, n, $, L, T, p) {
|
|
|
1217
1130
|
e.borderClass
|
|
1218
1131
|
]),
|
|
1219
1132
|
value: e.inputValue,
|
|
1220
|
-
style:
|
|
1133
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1221
1134
|
disabled: e.disable,
|
|
1222
1135
|
readonly: e.readonly,
|
|
1223
1136
|
type: e.inputType,
|
|
@@ -1243,13 +1156,13 @@ function Un(e, n, $, L, T, p) {
|
|
|
1243
1156
|
onPaste: n[190] || (n[190] = (o) => e.$emit("paste", o, e.inputMethods)),
|
|
1244
1157
|
onWheel: n[191] || (n[191] = (o) => e.$emit("wheel", o, e.inputMethods)),
|
|
1245
1158
|
onContextmenu: n[192] || (n[192] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1246
|
-
}, null, 46,
|
|
1247
|
-
[
|
|
1159
|
+
}, null, 46, Un), [
|
|
1160
|
+
[ke, e.editing]
|
|
1248
1161
|
])
|
|
1249
1162
|
], 64))
|
|
1250
1163
|
], 2);
|
|
1251
1164
|
}
|
|
1252
|
-
const
|
|
1165
|
+
const zn = /* @__PURE__ */ kn(Fn, [["render", Hn], ["__scopeId", "data-v-a5b3797a"]]);
|
|
1253
1166
|
export {
|
|
1254
|
-
|
|
1167
|
+
zn as default
|
|
1255
1168
|
};
|