hisonvue 1.1.22 → 1.1.24
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-CKbaRrfY.js → HAccordion-D-kfQCAv.js} +1 -1
- package/dist/{HAccordion-CNWAodMp.mjs → HAccordion-DCoVDIkA.mjs} +2 -2
- package/dist/{HBaggie-C-OS7n2D.mjs → HBaggie-B67IwC1d.mjs} +2 -2
- package/dist/{HBaggie-BQYZO1MF.js → HBaggie-qY6U6B0_.js} +1 -1
- package/dist/{HBanner-8AQVAGPP.js → HBanner-CSLLXB8T.js} +1 -1
- package/dist/{HBanner-D0ImN6h1.mjs → HBanner-D6bm0a9r.mjs} +2 -2
- package/dist/{HButton-C1AtcoQd.js → HButton-D3oUibAS.js} +1 -1
- package/dist/{HButton-CuoH95_k.mjs → HButton-x_S-jszQ.mjs} +2 -2
- package/dist/{HCalendar-CnuUn3Xk.mjs → HCalendar-BUNmBTAb.mjs} +2 -2
- package/dist/{HCalendar-DFXWXkci.js → HCalendar-BmxQBFsY.js} +2 -2
- package/dist/{HCaption-Di8ePmqg.mjs → HCaption-CI-BKkqg.mjs} +1 -1
- package/dist/{HCaption-BaelSNHR.js → HCaption-szh3jdKO.js} +1 -1
- package/dist/{HChart-DKfoM5dM.js → HChart-9i4BZlWy.js} +1 -1
- package/dist/{HChart-xM2KDiJi.mjs → HChart-Doi51nnJ.mjs} +1 -1
- package/dist/{HDrawer-A3BpOuup.js → HDrawer-3OcH1vGf.js} +1 -1
- package/dist/{HDrawer-Vt4JA6pk.mjs → HDrawer-DyphCN6Y.mjs} +1 -1
- package/dist/{HDropdown-BBEH646p.mjs → HDropdown-BqyYaNXJ.mjs} +2 -2
- package/dist/{HDropdown-Dj7h-JPP.js → HDropdown-Cqs5VnRI.js} +1 -1
- package/dist/{HFileset-oi7P1lcc.mjs → HFileset-C9FiHu7o.mjs} +1 -1
- package/dist/{HFileset-B9EmgNi1.js → HFileset-CAURkWDg.js} +1 -1
- package/dist/{HGap-Bp1hRvbT.mjs → HGap-B3n0CbCH.mjs} +1 -1
- package/dist/{HGap-Dy_H_-in.js → HGap-L_MePj7N.js} +1 -1
- package/dist/{HGrid-DDbU5kIr.js → HGrid-BRSMs0I-.js} +1 -1
- package/dist/{HGrid-Bc13aqjL.mjs → HGrid-DTmKLAql.mjs} +1 -1
- package/dist/{HImagebox-BVeQuB4p.js → HImagebox-D5rm0RGU.js} +1 -1
- package/dist/{HImagebox-8Uwvm5U0.mjs → HImagebox-DuzjHbDZ.mjs} +1 -1
- package/dist/HInput-Cc-4I8dr.js +1 -0
- package/dist/{HInput-DoSKCROI.mjs → HInput-Ci-U8Ydv.mjs} +398 -479
- package/dist/HInputGroup-B82A4Fhj.mjs +320 -0
- package/dist/HInputGroup-DDK9-Fq1.js +1 -0
- package/dist/HLabel-C5k05e5e.js +1 -0
- package/dist/{HLabel-DQVACpDP.mjs → HLabel-DFIoCKi2.mjs} +88 -83
- package/dist/{HLayout-BoHgIQcJ.mjs → HLayout-3_T7iEaY.mjs} +1 -1
- package/dist/{HLayout-CgaYkiuH.js → HLayout-dSBu97_b.js} +1 -1
- package/dist/{HList-BROYxKwn.js → HList-BW9oD7u1.js} +1 -1
- package/dist/{HList-BQEDGW7_.mjs → HList-CXJD9gN4.mjs} +2 -2
- package/dist/{HModal-GpwcBz5c.mjs → HModal-5GqISQqt.mjs} +1 -1
- package/dist/{HModal-DTqm3PfL.js → HModal-ND1cN5oB.js} +1 -1
- package/dist/{HNote-Dv8mltb0.mjs → HNote-DHNOZxfT.mjs} +1 -1
- package/dist/{HNote-BotCfjhk.js → HNote-r7ksmv0H.js} +1 -1
- package/dist/{HPagination-DG0I3Orn.mjs → HPagination-527mhA6E.mjs} +2 -2
- package/dist/{HPagination-DyqohdbC.js → HPagination-RATOiimL.js} +1 -1
- package/dist/{HParagraph-dWlO5RLM.mjs → HParagraph-BeEE50R_.mjs} +1 -1
- package/dist/{HParagraph-BheX7M-W.js → HParagraph-FfVJ2Iet.js} +1 -1
- package/dist/{HPopup-BrkB_lUB.mjs → HPopup-BO9dp3GE.mjs} +1 -1
- package/dist/{HPopup-BcGomDSy.js → HPopup-CeZDzKt0.js} +1 -1
- package/dist/{HSpinner-D6VNpQLM.mjs → HSpinner-9LkNJDu5.mjs} +92 -81
- package/dist/HSpinner-CW5dvlti.js +1 -0
- package/dist/{HTable-D2HYTuO9.mjs → HTable-5bmTb0dZ.mjs} +1 -1
- package/dist/{HTable-BdNtBsjD.js → HTable-CtIG1Pex.js} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +115 -66
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-DcB16odB.js → index-BDqki68Z.js} +3 -3
- package/dist/{index-CGr5-mvg.mjs → index-jeMy6Ys3.mjs} +5 -7
- package/dist/{setButtonCssEvent-T2QV1cDz.mjs → setButtonCssEvent-BDRTvujH.mjs} +1 -1
- package/dist/{setButtonCssEvent-CTLQPvWj.js → setButtonCssEvent-Rr6NF1b5.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
- package/dist/HLabel-BAbaNhJP.js +0 -1
- package/dist/HSpinner-CjjGcQJD.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 M, 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 g, 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 b, g as vn, u as pn, O as i, l as a, P as ee, w as B, 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-jeMy6Ys3.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,146 +156,99 @@ 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
|
-
if (
|
|
190
|
+
if (b.event.cssEvent.input_onBeforeFocus(e) === !1) {
|
|
291
191
|
e.stopPropagation(), e.preventDefault();
|
|
292
192
|
return;
|
|
293
193
|
}
|
|
294
|
-
n.classList.add("hison-input-on-active"),
|
|
295
|
-
},
|
|
194
|
+
n.classList.add("hison-input-on-active"), b.event.cssEvent.input_onAfterFocus(e);
|
|
195
|
+
}, Ne = (e) => {
|
|
296
196
|
const n = e.currentTarget;
|
|
297
|
-
if (
|
|
197
|
+
if (b.event.cssEvent.input_onBeforeBlur(e) === !1) {
|
|
298
198
|
e.stopPropagation(), e.preventDefault();
|
|
299
199
|
return;
|
|
300
200
|
}
|
|
301
|
-
n.classList.remove("hison-input-on-active"), n.classList.remove("hison-input-on-mouseover"),
|
|
302
|
-
},
|
|
201
|
+
n.classList.remove("hison-input-on-active"), n.classList.remove("hison-input-on-mouseover"), b.event.cssEvent.input_onAfterBlur(e);
|
|
202
|
+
}, Le = (e) => {
|
|
303
203
|
const n = e.currentTarget;
|
|
304
204
|
if (!n.readOnly) {
|
|
305
|
-
if (
|
|
205
|
+
if (b.event.cssEvent.input_onBeforeMouseover(e) === !1) {
|
|
306
206
|
e.stopPropagation(), e.preventDefault();
|
|
307
207
|
return;
|
|
308
208
|
}
|
|
309
|
-
n.classList.add("hison-input-on-mouseover"),
|
|
209
|
+
n.classList.add("hison-input-on-mouseover"), b.event.cssEvent.input_onAfterMouseover(e);
|
|
310
210
|
}
|
|
311
|
-
},
|
|
211
|
+
}, Be = (e) => {
|
|
312
212
|
const n = e.currentTarget;
|
|
313
213
|
if (!n.readOnly) {
|
|
314
|
-
if (
|
|
214
|
+
if (b.event.cssEvent.input_onBeforeMouseout(e) === !1) {
|
|
315
215
|
e.stopPropagation(), e.preventDefault();
|
|
316
216
|
return;
|
|
317
217
|
}
|
|
318
|
-
n.classList.remove("hison-input-on-mouseover"),
|
|
218
|
+
n.classList.remove("hison-input-on-mouseover"), b.event.cssEvent.input_onAfterMouseout(e);
|
|
319
219
|
}
|
|
320
|
-
},
|
|
220
|
+
}, Fe = (e) => {
|
|
321
221
|
const n = e.currentTarget;
|
|
322
222
|
if (!n.readOnly) {
|
|
323
|
-
if (
|
|
223
|
+
if (b.event.cssEvent.input_onBeforeTouchstart(e) === !1) {
|
|
324
224
|
e.stopPropagation(), e.preventDefault();
|
|
325
225
|
return;
|
|
326
226
|
}
|
|
327
|
-
n.classList.add("hison-input-on-mouseover"),
|
|
227
|
+
n.classList.add("hison-input-on-mouseover"), b.event.cssEvent.input_onAfterTouchstart(e);
|
|
328
228
|
}
|
|
329
|
-
},
|
|
229
|
+
}, Pe = (e) => {
|
|
330
230
|
const n = e.currentTarget;
|
|
331
231
|
if (!n.readOnly) {
|
|
332
|
-
if (
|
|
232
|
+
if (b.event.cssEvent.input_onBeforeTouchend(e) === !1) {
|
|
333
233
|
e.stopPropagation(), e.preventDefault();
|
|
334
234
|
return;
|
|
335
235
|
}
|
|
336
|
-
n.classList.remove("hison-input-on-mouseover"),
|
|
236
|
+
n.classList.remove("hison-input-on-mouseover"), b.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), F = r(null), k = r(null), v = e.id ? e.id : vn(), o = r(e.name ?? v), Se = M(() => o.value), N = 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", b.componentStyle.size), we(q.value, "color", "primary");
|
|
297
|
+
}, l = r(e.inputType ?? i.text), ie = M(() => {
|
|
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 = M(() => {
|
|
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"), L = r(e.format ?? null), P = r(a.utils.isNumeric(e.maxNumber) ? Number(e.maxNumber) : null), I = r(a.utils.isNumeric(e.minNumber) ? Number(e.minNumber) : null), K = r(a.utils.isInteger(e.roundNumber) || a.utils.isNegativeInteger(e.roundNumber) || e.roundNumber === "0" ? Number(e.roundNumber) : null), E = r(a.utils.isPositiveInteger(e.maxLength) ? Number(e.maxLength) : null), D = r(a.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 B.right;
|
|
325
|
+
case i.date:
|
|
326
|
+
case i.month:
|
|
327
|
+
case i.time:
|
|
328
|
+
return B.center;
|
|
429
329
|
default:
|
|
430
|
-
return
|
|
330
|
+
return B.left;
|
|
431
331
|
}
|
|
432
|
-
},
|
|
433
|
-
if (
|
|
434
|
-
return l.value ===
|
|
332
|
+
}, V = r(e.textAlign ?? se(l.value)), Ee = M(() => ({ textAlign: V.value })), H = r(e.border ?? !0), De = (t) => (t = String(t), E.value && (t = t.substring(0, E.value)), D.value && (t = a.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 = a.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, L.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 =
|
|
348
|
+
case i.date:
|
|
349
|
+
t && (t = a.utils.getDateWithFormat(t, ve.DateFormat["yyyy-MM-dd"]));
|
|
450
350
|
break;
|
|
451
|
-
case
|
|
452
|
-
t && (t =
|
|
351
|
+
case i.month:
|
|
352
|
+
t && (t = a.utils.getDateWithFormat(t, ve.YearMonthFormat["yyyy-MM"]));
|
|
453
353
|
break;
|
|
454
|
-
case
|
|
455
|
-
t && (t =
|
|
354
|
+
case i.time:
|
|
355
|
+
t && (t = a.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 = M(() => s.value), T = r(null), O = r(e.visible), W = r(e.title ?? ""), j = r(e.nullText ?? ""), w = r(e.editMode), Ke = M(() => w.value === _.disable), re = M(() => w.value === _.readonly), Re = M(() => H.value && !re.value ? "hison-border" : ""), Ue = M(() => w.value !== _.editable ? [`hison-input-${w.value}`, `hison-input-${ie.value}-${w.value}`] : []), z = r(e.required), He = M(() => 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,350 +379,369 @@ 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 = M(() => {
|
|
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 = M(() => {
|
|
387
|
+
if (X.value) return "hison-font-bold";
|
|
388
|
+
}), J = r(e.fontItalic), ze = M(() => {
|
|
389
|
+
if (J.value) return "hison-font-italic";
|
|
390
|
+
}), Z = r(e.fontThruline), Ye = M(() => {
|
|
391
|
+
if (Z.value) return "hison-font-thruline";
|
|
392
|
+
}), G = r(e.fontUnderline), Qe = M(() => {
|
|
393
|
+
if (G.value) return "hison-font-underline";
|
|
394
|
+
}), Xe = M(() => O.value ? "" : "hison-display-none"), de = r(!1), h = 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), d = 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 = a.utils.getNumberFormat(t, L.value ?? a.getNumberFormat());
|
|
510
410
|
break;
|
|
511
|
-
case
|
|
512
|
-
|
|
411
|
+
case i.date:
|
|
412
|
+
u = a.utils.getDateWithFormat(t, L.value ?? a.getDateFormat());
|
|
513
413
|
break;
|
|
514
|
-
case
|
|
515
|
-
|
|
414
|
+
case i.month:
|
|
415
|
+
u = a.utils.getDateWithFormat(t, L.value ?? a.getYearMonthFormat());
|
|
516
416
|
break;
|
|
517
|
-
case
|
|
518
|
-
|
|
417
|
+
case i.time:
|
|
418
|
+
u = a.utils.getDateWithFormat(t, L.value ?? a.getTimeFormat());
|
|
519
419
|
break;
|
|
520
|
-
case
|
|
521
|
-
const
|
|
522
|
-
|
|
420
|
+
case i.select:
|
|
421
|
+
const f = C.value, be = f.selectedIndex;
|
|
422
|
+
u = be >= 0 ? f.options[be].text : "";
|
|
523
423
|
break;
|
|
524
424
|
}
|
|
525
|
-
} catch (
|
|
526
|
-
console.warn("[HInput] Failed to format value", t,
|
|
425
|
+
} catch (f) {
|
|
426
|
+
console.warn("[HInput] Failed to format value", t, f), 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, h.value = !0, d == null || d(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), h.value = !0, d == null || d(v, s.value)), de.value = !1, n("blur", t, k.value);
|
|
441
|
+
}, p = (t, u = !0, f = !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, f && 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), h.value = !0, d == null || d(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), h.value = !0, d == null || d(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), h.value = !0, d == null || d(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), h.value = !0, d && o.value) {
|
|
455
|
+
const f = u.checked ? N.value || v : null;
|
|
456
|
+
d(o.value, f);
|
|
457
|
+
} else
|
|
458
|
+
d == null || d(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), h.value = !0, d == null || d(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
|
-
|
|
566
|
-
|
|
567
|
-
}),
|
|
468
|
+
n("keydown", t, k.value);
|
|
469
|
+
}, Me = () => {
|
|
470
|
+
b.component.inputList[v] && b.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(), F.value && hn(F.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: () => N.value,
|
|
477
|
+
setDataKey: (t) => {
|
|
478
|
+
const u = (t ?? "").trim(), f = u.length > 0 ? u : v;
|
|
479
|
+
f !== N.value && (N.value = f, l.value === i.radio && s.value && d && o.value && d(o.value, N.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
|
-
setValue: (t) => {
|
|
580
|
-
|
|
489
|
+
setValue: (t, u) => {
|
|
490
|
+
if (T.value = s.value, s.value = t, p(s.value, !0, !!(u != null && u.emitChange)), u != null && u.markModified && (h.value = !0), u != null && u.notifyGroup)
|
|
491
|
+
if (l.value === i.radio && d && o.value) {
|
|
492
|
+
const f = s.value ? N.value || v : null;
|
|
493
|
+
d(o.value, f);
|
|
494
|
+
} else
|
|
495
|
+
d == null || d(v, s.value);
|
|
496
|
+
u != null && u.emitModelValue && n("update:modelValue", s.value);
|
|
581
497
|
},
|
|
582
|
-
getTitle: () =>
|
|
498
|
+
getTitle: () => W.value,
|
|
583
499
|
setTitle: (t) => {
|
|
584
|
-
|
|
500
|
+
W.value = t;
|
|
585
501
|
},
|
|
586
|
-
isVisible: () =>
|
|
502
|
+
isVisible: () => O.value,
|
|
587
503
|
setVisible: (t) => {
|
|
588
|
-
|
|
504
|
+
O.value = t;
|
|
589
505
|
},
|
|
590
506
|
getInputType: () => l.value,
|
|
591
507
|
setInputType: (t) => {
|
|
592
|
-
l.value =
|
|
508
|
+
l.value = i[t], T.value = s.value, p(s.value), e.textAlign == null && (V.value = se(l.value));
|
|
593
509
|
},
|
|
594
|
-
getFormat: () =>
|
|
510
|
+
getFormat: () => L.value ?? "",
|
|
595
511
|
setFormat: (t) => {
|
|
596
|
-
|
|
512
|
+
L.value = t, T.value = s.value, p(s.value);
|
|
597
513
|
},
|
|
598
|
-
getNullText: () =>
|
|
514
|
+
getNullText: () => j.value,
|
|
599
515
|
setNullText: (t) => {
|
|
600
|
-
|
|
516
|
+
j.value = t, (ee(s.value) || s.value === "") && (c.value = ae(s.value));
|
|
601
517
|
},
|
|
602
|
-
getEditMode: () =>
|
|
518
|
+
getEditMode: () => w.value,
|
|
603
519
|
setEditMode: (t) => {
|
|
604
|
-
|
|
520
|
+
w.value = t;
|
|
605
521
|
},
|
|
606
|
-
getMaxNumber: () =>
|
|
522
|
+
getMaxNumber: () => P.value,
|
|
607
523
|
setMaxNumber: (t) => {
|
|
608
|
-
|
|
524
|
+
a.utils.isNumeric(t) && (P.value = t, T.value = s.value, l.value === i.number && p(s.value));
|
|
609
525
|
},
|
|
610
|
-
getMinNumber: () =>
|
|
526
|
+
getMinNumber: () => I.value,
|
|
611
527
|
setMinNumber: (t) => {
|
|
612
|
-
|
|
528
|
+
a.utils.isNumeric(t) && (I.value = t, T.value = s.value, l.value === i.number && p(s.value));
|
|
613
529
|
},
|
|
614
|
-
getRoundNumber: () =>
|
|
530
|
+
getRoundNumber: () => K.value,
|
|
615
531
|
setRoundNumber: (t) => {
|
|
616
|
-
!
|
|
532
|
+
!a.utils.isPositiveInteger(t) && !a.utils.isNegativeInteger(t) && t !== 0 || (K.value = t, T.value = s.value, l.value === i.number && p(s.value));
|
|
617
533
|
},
|
|
618
|
-
getMaxLength: () =>
|
|
534
|
+
getMaxLength: () => E.value,
|
|
619
535
|
setMaxLength: (t) => {
|
|
620
|
-
|
|
536
|
+
a.utils.isPositiveInteger(t) && (E.value = t), T.value = s.value, p(s.value);
|
|
621
537
|
},
|
|
622
|
-
getMaxByte: () =>
|
|
538
|
+
getMaxByte: () => D.value,
|
|
623
539
|
setMaxByte: (t) => {
|
|
624
|
-
|
|
540
|
+
a.utils.isPositiveInteger(t) && (D.value = t), T.value = s.value, p(s.value);
|
|
625
541
|
},
|
|
626
|
-
getRequired: () =>
|
|
542
|
+
getRequired: () => z.value,
|
|
627
543
|
setRequired: (t) => {
|
|
628
|
-
|
|
544
|
+
z.value = t;
|
|
629
545
|
},
|
|
630
|
-
getPlaceholder: () =>
|
|
546
|
+
getPlaceholder: () => Y.value,
|
|
631
547
|
setPlaceholder: (t) => {
|
|
632
|
-
|
|
548
|
+
Y.value = t;
|
|
633
549
|
},
|
|
634
|
-
getPlaceholderColor: () =>
|
|
550
|
+
getPlaceholderColor: () => Q.value,
|
|
635
551
|
setPlaceholderColor: (t) => {
|
|
636
|
-
const
|
|
637
|
-
|
|
552
|
+
const u = (t ?? "").trim();
|
|
553
|
+
Q.value = u.length > 0 ? u : "primary";
|
|
638
554
|
},
|
|
639
|
-
isFontBold: () =>
|
|
555
|
+
isFontBold: () => X.value,
|
|
640
556
|
setFontBold: (t) => {
|
|
641
|
-
|
|
557
|
+
X.value = t;
|
|
642
558
|
},
|
|
643
|
-
isFontItalic: () =>
|
|
559
|
+
isFontItalic: () => J.value,
|
|
644
560
|
setFontItalic: (t) => {
|
|
645
|
-
|
|
561
|
+
J.value = t;
|
|
646
562
|
},
|
|
647
|
-
isFontThruline: () =>
|
|
563
|
+
isFontThruline: () => Z.value,
|
|
648
564
|
setFontThruline: (t) => {
|
|
649
|
-
|
|
565
|
+
Z.value = t;
|
|
650
566
|
},
|
|
651
|
-
isFontUnderline: () =>
|
|
567
|
+
isFontUnderline: () => G.value,
|
|
652
568
|
setFontUnderline: (t) => {
|
|
653
|
-
|
|
569
|
+
G.value = t;
|
|
654
570
|
},
|
|
655
|
-
getTextAlign: () =>
|
|
571
|
+
getTextAlign: () => V.value,
|
|
656
572
|
setTextAlign: (t) => {
|
|
657
|
-
(t ===
|
|
573
|
+
(t === B.left || t === B.center || t === B.right) && (V.value = t);
|
|
658
574
|
},
|
|
659
|
-
isBorder: () =>
|
|
575
|
+
isBorder: () => H.value,
|
|
660
576
|
setBorder: (t) => {
|
|
661
|
-
|
|
577
|
+
H.value = t;
|
|
662
578
|
},
|
|
663
579
|
isModified: () => h.value,
|
|
664
580
|
setModified: (t) => {
|
|
665
581
|
h.value = t;
|
|
666
582
|
},
|
|
667
|
-
getToggleStyle: () =>
|
|
583
|
+
getToggleStyle: () => U.value,
|
|
668
584
|
setToggleStyle: (t) => {
|
|
669
|
-
(t === "default" || t === "switch") && (
|
|
585
|
+
(t === "default" || t === "switch") && (U.value = t);
|
|
670
586
|
},
|
|
671
|
-
getTabIndex: () =>
|
|
587
|
+
getTabIndex: () => x.value,
|
|
672
588
|
setTabIndex: (t) => {
|
|
673
|
-
|
|
589
|
+
x.value = t != null ? Number(t) : null;
|
|
674
590
|
},
|
|
675
591
|
focus: () => {
|
|
676
592
|
var t;
|
|
677
|
-
|
|
593
|
+
F.value ? F.value.focus() : (t = C.value) == null || t.focus();
|
|
678
594
|
},
|
|
679
|
-
reload: () =>
|
|
680
|
-
},
|
|
681
|
-
},
|
|
682
|
-
|
|
595
|
+
reload: () => Cn(te)
|
|
596
|
+
}, b.component.inputList[v] = k.value, fe && fe(v), n("mounted", k.value));
|
|
597
|
+
}, ge = () => {
|
|
598
|
+
Tn(te), delete b.component.inputList[v], l.value !== i.checkbox && l.value !== i.radio && l.value !== i.range && l.value !== i.color && Bn(C.value), F.value && Nn(F.value);
|
|
683
599
|
};
|
|
684
|
-
return
|
|
685
|
-
|
|
686
|
-
}),
|
|
687
|
-
|
|
688
|
-
}),
|
|
600
|
+
return sn(Me), ln(ge), m(pe, (t) => {
|
|
601
|
+
ue(), n("responsive-change", t);
|
|
602
|
+
}), m(() => e.modelValue, (t) => {
|
|
603
|
+
p(t, !1);
|
|
604
|
+
}), m(() => e.name, (t) => {
|
|
689
605
|
if (t && t !== o.value) {
|
|
690
|
-
const
|
|
691
|
-
o.value = t, l.value ===
|
|
606
|
+
const u = o.value;
|
|
607
|
+
o.value = t, l.value === i.radio && (R == null || R(v, u, t, !!s.value));
|
|
692
608
|
}
|
|
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
|
-
|
|
609
|
+
}), m(() => e.dataKey, (t) => {
|
|
610
|
+
const u = (t ?? "").trim(), f = u.length > 0 ? u : v;
|
|
611
|
+
f !== N.value && (N.value = f, l.value === i.radio && s.value && d && o.value && d(o.value, N.value));
|
|
612
|
+
}), m(() => e.visible, (t) => {
|
|
613
|
+
const u = !!t;
|
|
614
|
+
u !== O.value && (O.value = u);
|
|
615
|
+
}), m(() => e.title, (t) => {
|
|
616
|
+
const u = t ?? "";
|
|
617
|
+
u !== W.value && (W.value = u);
|
|
618
|
+
}), m(() => e.nullText, (t) => {
|
|
619
|
+
const u = t ?? "";
|
|
620
|
+
u !== j.value && (j.value = u, (ee(s.value) || s.value === "") && (c.value = ae(s.value)));
|
|
621
|
+
}), m(() => e.inputType, (t) => {
|
|
622
|
+
t && t !== l.value && (l.value = t, e.textAlign == null && (V.value = se(l.value)), p(s.value));
|
|
623
|
+
}), m(() => e.format, (t) => {
|
|
624
|
+
const u = t ?? null;
|
|
625
|
+
u !== L.value && (L.value = u, p(s.value));
|
|
626
|
+
}), m(() => e.maxNumber, (t) => {
|
|
627
|
+
const u = a.utils.isNumeric(t) ? Number(t) : null;
|
|
628
|
+
u !== P.value && (P.value = u, l.value === i.number && p(s.value));
|
|
629
|
+
}), m(() => e.minNumber, (t) => {
|
|
630
|
+
const u = a.utils.isNumeric(t) ? Number(t) : null;
|
|
631
|
+
u !== I.value && (I.value = u, l.value === i.number && p(s.value));
|
|
632
|
+
}), m(() => e.roundNumber, (t) => {
|
|
633
|
+
const u = a.utils.isInteger(t) || a.utils.isNegativeInteger(t) || t === "0" ? Number(t) : null;
|
|
634
|
+
u !== K.value && (K.value = u, l.value === i.number && p(s.value));
|
|
635
|
+
}), m(() => e.maxLength, (t) => {
|
|
636
|
+
const u = a.utils.isPositiveInteger(t) ? Number(t) : null;
|
|
637
|
+
u !== E.value && (E.value = u, p(s.value));
|
|
638
|
+
}), m(() => e.maxByte, (t) => {
|
|
639
|
+
const u = a.utils.isPositiveInteger(t) ? Number(t) : null;
|
|
640
|
+
u !== D.value && (D.value = u, p(s.value));
|
|
641
|
+
}), m(() => e.textAlign, (t) => {
|
|
642
|
+
t && t !== V.value && (t === B.left || t === B.center || t === B.right) && (V.value = t);
|
|
643
|
+
}), m(() => e.border, (t) => {
|
|
644
|
+
const u = !!t;
|
|
645
|
+
u !== H.value && (H.value = u);
|
|
646
|
+
}), m(() => e.placeholder, (t) => {
|
|
647
|
+
const u = t ?? "";
|
|
648
|
+
u !== Y.value && (Y.value = u);
|
|
649
|
+
}), m(() => e.placeholderColor, (t) => {
|
|
650
|
+
const u = t ?? "primary";
|
|
651
|
+
u !== Q.value && (Q.value = u);
|
|
652
|
+
}), m(() => e.required, (t) => {
|
|
653
|
+
const u = !!t;
|
|
654
|
+
u !== z.value && (z.value = u);
|
|
655
|
+
}), m(() => e.fontBold, (t) => {
|
|
656
|
+
const u = !!t;
|
|
657
|
+
u !== X.value && (X.value = u);
|
|
658
|
+
}), m(() => e.fontItalic, (t) => {
|
|
659
|
+
const u = !!t;
|
|
660
|
+
u !== J.value && (J.value = u);
|
|
661
|
+
}), m(() => e.fontThruline, (t) => {
|
|
662
|
+
const u = !!t;
|
|
663
|
+
u !== Z.value && (Z.value = u);
|
|
664
|
+
}), m(() => e.fontUnderline, (t) => {
|
|
665
|
+
const u = !!t;
|
|
666
|
+
u !== G.value && (G.value = u);
|
|
667
|
+
}), m(() => e.editMode, (t) => {
|
|
668
|
+
t && t !== w.value && (w.value = t);
|
|
669
|
+
}), m(() => e.tabIndex, (t) => {
|
|
670
|
+
const u = t === null || t === "" ? null : Number(t);
|
|
671
|
+
u !== x.value && (x.value = u);
|
|
672
|
+
}), m(() => e.class, () => {
|
|
673
|
+
ue();
|
|
674
|
+
}), m(() => e.toggleStyle, (t) => {
|
|
675
|
+
const u = t ?? "default";
|
|
676
|
+
u !== U.value && (u === "default" || u === "switch") && (U.value = u);
|
|
758
677
|
}), {
|
|
759
|
-
inputRef:
|
|
760
|
-
inputTextRef:
|
|
761
|
-
inputMethods:
|
|
762
|
-
inputValue:
|
|
763
|
-
editing:
|
|
678
|
+
inputRef: C,
|
|
679
|
+
inputTextRef: F,
|
|
680
|
+
inputMethods: M(() => rn(k)),
|
|
681
|
+
inputValue: qe,
|
|
682
|
+
editing: de,
|
|
764
683
|
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:
|
|
684
|
+
id: v,
|
|
685
|
+
nameAttr: Se,
|
|
686
|
+
responsiveClassList: q,
|
|
687
|
+
visibleClass: Xe,
|
|
688
|
+
editModeClassList: Ue,
|
|
689
|
+
requiredClassList: He,
|
|
690
|
+
fontBoldClass: je,
|
|
691
|
+
fontItalicClass: ze,
|
|
692
|
+
fontThrulineClass: Ye,
|
|
693
|
+
fontUnderlineClass: Qe,
|
|
694
|
+
textAlignStyle: Ee,
|
|
695
|
+
placeholderColorStyle: We,
|
|
777
696
|
borderClass: Re,
|
|
778
|
-
disable:
|
|
779
|
-
readonly:
|
|
697
|
+
disable: Ke,
|
|
698
|
+
readonly: re,
|
|
780
699
|
inputType: l,
|
|
781
700
|
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:
|
|
701
|
+
inputAttrType: Ae,
|
|
702
|
+
title: W,
|
|
703
|
+
placeholder: Y,
|
|
704
|
+
maxNumber: P,
|
|
705
|
+
minNumber: I,
|
|
706
|
+
spanText: c,
|
|
707
|
+
toggleStyle: U,
|
|
708
|
+
tabIndex: x,
|
|
709
|
+
onInput: Ze,
|
|
710
|
+
onTextInputFocus: Je,
|
|
711
|
+
onFocus: Ge,
|
|
712
|
+
onBlur: xe,
|
|
713
|
+
onRangeChange: ce,
|
|
714
|
+
onColorChange: _e,
|
|
715
|
+
onCheckboxChange: en,
|
|
716
|
+
onRadioChange: nn,
|
|
717
|
+
onSelectChange: on,
|
|
718
|
+
onKeydown: tn
|
|
800
719
|
};
|
|
801
720
|
}
|
|
802
|
-
}),
|
|
803
|
-
function
|
|
804
|
-
return
|
|
805
|
-
class:
|
|
721
|
+
}), 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"];
|
|
722
|
+
function Hn(e, n, C, F, k, v) {
|
|
723
|
+
return $(), y("div", {
|
|
724
|
+
class: g([
|
|
806
725
|
"hison-wrapper",
|
|
807
726
|
"hison-s-input-margin-adjustment",
|
|
808
727
|
...e.responsiveClassList,
|
|
809
728
|
e.visibleClass
|
|
810
729
|
])
|
|
811
730
|
}, [
|
|
812
|
-
e.inputType === "range" ? (
|
|
731
|
+
e.inputType === "range" ? ($(), y("div", {
|
|
813
732
|
key: 0,
|
|
814
|
-
class:
|
|
733
|
+
class: g([
|
|
815
734
|
"hison-input",
|
|
816
735
|
"hison-input-range-div"
|
|
817
736
|
]),
|
|
818
|
-
style:
|
|
737
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
819
738
|
}, [
|
|
820
|
-
|
|
739
|
+
A("input", {
|
|
821
740
|
ref: "inputRef",
|
|
822
741
|
id: `${e.id}`,
|
|
823
742
|
name: `${e.nameAttr}`,
|
|
824
743
|
type: "range",
|
|
825
|
-
class:
|
|
744
|
+
class: g([
|
|
826
745
|
`hison-input-${e.inputType}`,
|
|
827
746
|
...e.editModeClassList,
|
|
828
747
|
...e.requiredClassList
|
|
@@ -854,21 +773,21 @@ function Un(e, n, $, L, T, p) {
|
|
|
854
773
|
onTouchmove: n[19] || (n[19] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
855
774
|
onTouchcancel: n[20] || (n[20] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
856
775
|
onContextmenu: n[21] || (n[21] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
857
|
-
}, null, 42,
|
|
858
|
-
], 4)) : e.inputType === "color" ? (
|
|
776
|
+
}, null, 42, Pn)
|
|
777
|
+
], 4)) : e.inputType === "color" ? ($(), y("div", {
|
|
859
778
|
key: 1,
|
|
860
|
-
class:
|
|
779
|
+
class: g([
|
|
861
780
|
"hison-input",
|
|
862
781
|
"hison-input-color-div"
|
|
863
782
|
]),
|
|
864
|
-
style:
|
|
783
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
865
784
|
}, [
|
|
866
|
-
|
|
785
|
+
A("input", {
|
|
867
786
|
ref: "inputRef",
|
|
868
787
|
id: `${e.id}`,
|
|
869
788
|
name: `${e.nameAttr}`,
|
|
870
789
|
type: "color",
|
|
871
|
-
class:
|
|
790
|
+
class: g([
|
|
872
791
|
`hison-input-${e.inputType}`,
|
|
873
792
|
...e.editModeClassList,
|
|
874
793
|
...e.requiredClassList
|
|
@@ -901,22 +820,22 @@ function Un(e, n, $, L, T, p) {
|
|
|
901
820
|
onTouchmove: n[41] || (n[41] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
902
821
|
onTouchcancel: n[42] || (n[42] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
903
822
|
onContextmenu: n[43] || (n[43] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
904
|
-
}, null, 42,
|
|
905
|
-
], 4)) : e.inputType === "checkbox" ? (
|
|
823
|
+
}, null, 42, In)
|
|
824
|
+
], 4)) : e.inputType === "checkbox" ? ($(), y("div", {
|
|
906
825
|
key: 2,
|
|
907
|
-
class:
|
|
826
|
+
class: g([
|
|
908
827
|
"hison-input",
|
|
909
828
|
"hison-input-checkbox-div"
|
|
910
829
|
]),
|
|
911
|
-
style:
|
|
830
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
912
831
|
}, [
|
|
913
|
-
e.toggleStyle !== "switch" ? (
|
|
832
|
+
e.toggleStyle !== "switch" ? ($(), y("input", {
|
|
914
833
|
key: 0,
|
|
915
834
|
ref: "inputRef",
|
|
916
835
|
id: `${e.id}`,
|
|
917
836
|
name: `${e.nameAttr}`,
|
|
918
837
|
type: "checkbox",
|
|
919
|
-
class:
|
|
838
|
+
class: g([
|
|
920
839
|
`hison-input-${e.inputType}`,
|
|
921
840
|
...e.editModeClassList,
|
|
922
841
|
...e.requiredClassList
|
|
@@ -948,11 +867,11 @@ function Un(e, n, $, L, T, p) {
|
|
|
948
867
|
onTouchmove: n[63] || (n[63] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
949
868
|
onTouchcancel: n[64] || (n[64] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
950
869
|
onContextmenu: n[65] || (n[65] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
951
|
-
}, null, 42,
|
|
870
|
+
}, null, 42, Sn)) : ($(), y("label", {
|
|
952
871
|
key: 1,
|
|
953
|
-
class:
|
|
872
|
+
class: g(["hison-input-checkbox-switch", ...e.editModeClassList])
|
|
954
873
|
}, [
|
|
955
|
-
|
|
874
|
+
A("input", {
|
|
956
875
|
ref: "inputRef",
|
|
957
876
|
id: `${e.id}`,
|
|
958
877
|
name: `${e.nameAttr}`,
|
|
@@ -985,27 +904,27 @@ function Un(e, n, $, L, T, p) {
|
|
|
985
904
|
onTouchmove: n[85] || (n[85] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
986
905
|
onTouchcancel: n[86] || (n[86] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
987
906
|
onContextmenu: n[87] || (n[87] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
988
|
-
}, null, 40,
|
|
989
|
-
|
|
990
|
-
class:
|
|
907
|
+
}, null, 40, An),
|
|
908
|
+
A("span", {
|
|
909
|
+
class: g(["hison-switch-visual", [
|
|
991
910
|
...e.editModeClassList,
|
|
992
911
|
...e.requiredClassList
|
|
993
912
|
]]),
|
|
994
913
|
"aria-hidden": "true"
|
|
995
914
|
}, null, 2)
|
|
996
915
|
], 2))
|
|
997
|
-
], 4)) : e.inputType === "radio" ? (
|
|
916
|
+
], 4)) : e.inputType === "radio" ? ($(), y("div", {
|
|
998
917
|
key: 3,
|
|
999
|
-
class:
|
|
1000
|
-
style:
|
|
918
|
+
class: g(["hison-input", "hison-input-radio-div"]),
|
|
919
|
+
style: S([e.textAlignStyle, e.props.style])
|
|
1001
920
|
}, [
|
|
1002
|
-
e.toggleStyle !== "switch" ? (
|
|
921
|
+
e.toggleStyle !== "switch" ? ($(), y("input", {
|
|
1003
922
|
key: 0,
|
|
1004
923
|
ref: "inputRef",
|
|
1005
924
|
id: `${e.id}`,
|
|
1006
925
|
name: `${e.nameAttr}`,
|
|
1007
926
|
type: "radio",
|
|
1008
|
-
class:
|
|
927
|
+
class: g([
|
|
1009
928
|
`hison-input-${e.inputType}`,
|
|
1010
929
|
"hison-input-radio--default",
|
|
1011
930
|
...e.editModeClassList,
|
|
@@ -1038,11 +957,11 @@ function Un(e, n, $, L, T, p) {
|
|
|
1038
957
|
onTouchmove: n[107] || (n[107] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1039
958
|
onTouchcancel: n[108] || (n[108] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1040
959
|
onContextmenu: n[109] || (n[109] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1041
|
-
}, null, 42,
|
|
960
|
+
}, null, 42, En)) : ($(), y("label", {
|
|
1042
961
|
key: 1,
|
|
1043
|
-
class:
|
|
962
|
+
class: g(["hison-input-radio-switch", ...e.editModeClassList])
|
|
1044
963
|
}, [
|
|
1045
|
-
|
|
964
|
+
A("input", {
|
|
1046
965
|
ref: "inputRef",
|
|
1047
966
|
id: `${e.id}`,
|
|
1048
967
|
name: `${e.nameAttr}`,
|
|
@@ -1075,22 +994,22 @@ function Un(e, n, $, L, T, p) {
|
|
|
1075
994
|
onTouchmove: n[129] || (n[129] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1076
995
|
onTouchcancel: n[130] || (n[130] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1077
996
|
onContextmenu: n[131] || (n[131] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1078
|
-
}, null, 40,
|
|
1079
|
-
|
|
1080
|
-
class:
|
|
997
|
+
}, null, 40, Dn),
|
|
998
|
+
A("span", {
|
|
999
|
+
class: g(["hison-switch-visual", [
|
|
1081
1000
|
...e.editModeClassList,
|
|
1082
1001
|
...e.requiredClassList
|
|
1083
1002
|
]]),
|
|
1084
1003
|
"aria-hidden": "true"
|
|
1085
1004
|
}, null, 2)
|
|
1086
1005
|
], 2))
|
|
1087
|
-
], 4)) : e.inputType === "select" ? (
|
|
1006
|
+
], 4)) : e.inputType === "select" ? ($(), y("select", {
|
|
1088
1007
|
key: 4,
|
|
1089
1008
|
ref: "inputRef",
|
|
1090
1009
|
id: `${e.id}`,
|
|
1091
1010
|
name: `${e.nameAttr}`,
|
|
1092
|
-
style:
|
|
1093
|
-
class:
|
|
1011
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1012
|
+
class: g([
|
|
1094
1013
|
"hison-input",
|
|
1095
1014
|
`hison-input-${e.inputType}`,
|
|
1096
1015
|
...e.editModeClassList,
|
|
@@ -1129,16 +1048,16 @@ function Un(e, n, $, L, T, p) {
|
|
|
1129
1048
|
onTouchcancel: n[152] || (n[152] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1130
1049
|
onContextmenu: n[153] || (n[153] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1131
1050
|
}, [
|
|
1132
|
-
(
|
|
1051
|
+
($(!0), y($e, null, dn(e.props.options, (o) => ($(), y("option", {
|
|
1133
1052
|
key: o.value,
|
|
1134
1053
|
value: o.value
|
|
1135
|
-
},
|
|
1136
|
-
], 46,
|
|
1054
|
+
}, Ce(o.text), 9, qn))), 128))
|
|
1055
|
+
], 46, Vn)) : e.inputType === "textarea" ? ($(), y("textarea", {
|
|
1137
1056
|
key: 5,
|
|
1138
1057
|
ref: "inputRef",
|
|
1139
1058
|
id: `${e.id}`,
|
|
1140
1059
|
name: `${e.nameAttr}`,
|
|
1141
|
-
class:
|
|
1060
|
+
class: g([
|
|
1142
1061
|
"hison-input",
|
|
1143
1062
|
`hison-input-${e.inputType}`,
|
|
1144
1063
|
...e.editModeClassList,
|
|
@@ -1150,7 +1069,7 @@ function Un(e, n, $, L, T, p) {
|
|
|
1150
1069
|
e.borderClass
|
|
1151
1070
|
]),
|
|
1152
1071
|
value: e.inputValue,
|
|
1153
|
-
style:
|
|
1072
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1154
1073
|
disabled: e.disable,
|
|
1155
1074
|
readonly: e.readonly,
|
|
1156
1075
|
placeholder: e.placeholder || void 0,
|
|
@@ -1160,12 +1079,12 @@ function Un(e, n, $, L, T, p) {
|
|
|
1160
1079
|
onInput: n[154] || (n[154] = (...o) => e.onInput && e.onInput(...o)),
|
|
1161
1080
|
onFocus: n[155] || (n[155] = (...o) => e.onFocus && e.onFocus(...o)),
|
|
1162
1081
|
onBlur: n[156] || (n[156] = (...o) => e.onBlur && e.onBlur(...o))
|
|
1163
|
-
},
|
|
1164
|
-
|
|
1082
|
+
}, Ce(e.inputValue), 47, Kn)) : ($(), y($e, { key: 6 }, [
|
|
1083
|
+
Te(A("input", {
|
|
1165
1084
|
ref: "inputTextRef",
|
|
1166
1085
|
id: `input_text_${e.id}`,
|
|
1167
1086
|
name: `input_text_${e.nameAttr}`,
|
|
1168
|
-
class:
|
|
1087
|
+
class: g([
|
|
1169
1088
|
"hison-input",
|
|
1170
1089
|
`hison-input-text-${e.inputType}`,
|
|
1171
1090
|
...e.editModeClassList,
|
|
@@ -1178,7 +1097,7 @@ function Un(e, n, $, L, T, p) {
|
|
|
1178
1097
|
]),
|
|
1179
1098
|
type: "text",
|
|
1180
1099
|
value: e.spanText,
|
|
1181
|
-
style:
|
|
1100
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1182
1101
|
disabled: e.disable,
|
|
1183
1102
|
readonly: e.readonly,
|
|
1184
1103
|
title: e.title || void 0,
|
|
@@ -1204,20 +1123,20 @@ function Un(e, n, $, L, T, p) {
|
|
|
1204
1123
|
onTouchmove: n[174] || (n[174] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1205
1124
|
onTouchcancel: n[175] || (n[175] = (o) => e.$emit("touchcancel", o, e.inputMethods))
|
|
1206
1125
|
}, null, 46, Rn), [
|
|
1207
|
-
[
|
|
1126
|
+
[ke, !e.editing]
|
|
1208
1127
|
]),
|
|
1209
|
-
|
|
1128
|
+
Te(A("input", {
|
|
1210
1129
|
ref: "inputRef",
|
|
1211
1130
|
id: `${e.id}`,
|
|
1212
1131
|
name: `${e.nameAttr}`,
|
|
1213
|
-
class:
|
|
1132
|
+
class: g([
|
|
1214
1133
|
"hison-input",
|
|
1215
1134
|
`hison-input-${e.inputType}`,
|
|
1216
1135
|
...e.editModeClassList,
|
|
1217
1136
|
e.borderClass
|
|
1218
1137
|
]),
|
|
1219
1138
|
value: e.inputValue,
|
|
1220
|
-
style:
|
|
1139
|
+
style: S([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1221
1140
|
disabled: e.disable,
|
|
1222
1141
|
readonly: e.readonly,
|
|
1223
1142
|
type: e.inputType,
|
|
@@ -1243,13 +1162,13 @@ function Un(e, n, $, L, T, p) {
|
|
|
1243
1162
|
onPaste: n[190] || (n[190] = (o) => e.$emit("paste", o, e.inputMethods)),
|
|
1244
1163
|
onWheel: n[191] || (n[191] = (o) => e.$emit("wheel", o, e.inputMethods)),
|
|
1245
1164
|
onContextmenu: n[192] || (n[192] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1246
|
-
}, null, 46,
|
|
1247
|
-
[
|
|
1165
|
+
}, null, 46, Un), [
|
|
1166
|
+
[ke, e.editing]
|
|
1248
1167
|
])
|
|
1249
1168
|
], 64))
|
|
1250
1169
|
], 2);
|
|
1251
1170
|
}
|
|
1252
|
-
const
|
|
1171
|
+
const zn = /* @__PURE__ */ kn(Fn, [["render", Hn], ["__scopeId", "data-v-0b8c03f7"]]);
|
|
1253
1172
|
export {
|
|
1254
|
-
|
|
1173
|
+
zn as default
|
|
1255
1174
|
};
|