@nutui/nutui 4.3.1 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/nutui.es.js +2 -4
- package/dist/nutui.js +6035 -6408
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/actionsheet/ActionSheet.js +1 -1
- package/dist/packages/address/Address.js +1 -1
- package/dist/packages/addresslist/AddressList.js +2 -2
- package/dist/packages/animate/Animate.js +51 -44
- package/dist/packages/backtop/Backtop.js +79 -89
- package/dist/packages/calendar/Calendar.js +814 -3
- package/dist/packages/calendar/index.scss +0 -1
- package/dist/packages/calendarcard/CalendarCard.js +1 -1
- package/dist/packages/card/Card.js +4 -4
- package/dist/packages/cascader/Cascader.js +1 -1
- package/dist/packages/checkbox/Checkbox.js +1 -1
- package/dist/packages/circleprogress/CircleProgress.js +90 -97
- package/dist/packages/col/Col.js +41 -30
- package/dist/packages/comment/Comment.js +2 -2
- package/dist/packages/{common-LvGbU-A3.js → common-FZL3qC99.js} +5 -2
- package/dist/packages/dialog/Dialog.js +1 -1
- package/dist/packages/ecard/Ecard.js +2 -2
- package/dist/packages/form/Form.js +3 -1
- package/dist/packages/formitem/FormItem.js +1 -1
- package/dist/packages/imagepreview/ImagePreview.js +1 -1
- package/dist/packages/{index-wY4t0zYt.js → index-BqB5dTeo.js} +29 -17
- package/dist/packages/{index.vue_vue_type_script_lang-w2sgcysj.js → index.vue_vue_type_script_lang-n0HbjvfF.js} +1 -1
- package/dist/packages/input/Input.js +8 -8
- package/dist/packages/inputnumber/InputNumber.js +84 -103
- package/dist/packages/invoice/Invoice.js +87 -138
- package/dist/packages/layout/Layout.js +3 -0
- package/dist/packages/menuitem/MenuItem.js +1 -1
- package/dist/packages/navbar/Navbar.js +103 -115
- package/dist/packages/notify/Notify.js +1 -1
- package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -1
- package/dist/packages/popover/Popover.js +1 -1
- package/dist/packages/popup/Popup.js +1 -1
- package/dist/packages/price/Price.js +69 -77
- package/dist/packages/progress/Progress.js +96 -115
- package/dist/packages/radio/Radio.js +1 -1
- package/dist/packages/range/Range.js +1 -1
- package/dist/packages/rate/Rate.js +99 -141
- package/dist/packages/row/Row.js +43 -39
- package/dist/packages/searchbar/Searchbar.js +1 -1
- package/dist/packages/shortpassword/ShortPassword.js +1 -1
- package/dist/packages/sku/Sku.js +5 -5
- package/dist/packages/swipe/Swipe.js +96 -110
- package/dist/packages/swipegroup/SwipeGroup.js +41 -23
- package/dist/packages/switch/Switch.js +12 -4
- package/dist/packages/switch/index.css +1 -1
- package/dist/packages/switch/index.scss +1 -1
- package/dist/packages/tag/Tag.js +57 -66
- package/dist/packages/textarea/Textarea.js +1 -1
- package/dist/packages/timeselect/TimeSelect.js +1 -1
- package/dist/packages/uploader/Uploader.js +5 -5
- package/dist/smartips/web-types.json +12 -3
- package/dist/style.css +1 -1
- package/dist/styles/base-jdb.css +1 -1
- package/dist/styles/base-jddkh.css +1 -1
- package/dist/styles/base-jdt.css +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/themes/jdb.scss +0 -1
- package/dist/styles/themes/jddkh.scss +0 -1
- package/dist/styles/themes/jdt.scss +0 -1
- package/dist/styles/variables-jdb.scss +0 -1
- package/dist/styles/variables-jddkh.scss +0 -1
- package/dist/styles/variables-jdt.scss +0 -1
- package/dist/styles/variables.scss +0 -1
- package/dist/types/__VUE/animate/animate.vue.d.ts +75 -0
- package/dist/types/__VUE/animate/index.d.ts +6 -0
- package/dist/types/__VUE/backtop/backtop.vue.d.ts +87 -0
- package/dist/types/__VUE/backtop/index.d.ts +5 -0
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +2 -12
- package/dist/types/__VUE/circleprogress/circle-progress.vue.d.ts +88 -0
- package/dist/types/__VUE/circleprogress/index.d.ts +6 -0
- package/dist/types/__VUE/col/col.vue.d.ts +53 -0
- package/dist/types/__VUE/col/index.d.ts +5 -0
- package/dist/types/__VUE/form/common.d.ts +2 -0
- package/dist/types/__VUE/form/types.d.ts +0 -1
- package/dist/types/__VUE/input/index.vue.d.ts +1 -1
- package/dist/types/__VUE/inputnumber/index.d.ts +5 -0
- package/dist/types/__VUE/inputnumber/input-number.vue.d.ts +112 -0
- package/dist/types/__VUE/invoice/index.d.ts +6 -0
- package/dist/types/__VUE/invoice/invoice.vue.d.ts +59 -0
- package/dist/types/__VUE/invoice/types.d.ts +12 -0
- package/dist/types/__VUE/layout/index.d.ts +4 -0
- package/dist/types/__VUE/layout/layout.vue.d.ts +10 -0
- package/dist/types/__VUE/navbar/index.d.ts +5 -0
- package/dist/types/__VUE/navbar/navbar.vue.d.ts +125 -0
- package/dist/types/__VUE/price/index.d.ts +6 -0
- package/dist/types/__VUE/price/price.vue.d.ts +83 -0
- package/dist/types/__VUE/progress/index.d.ts +6 -0
- package/dist/types/__VUE/progress/progress.vue.d.ts +91 -0
- package/dist/types/__VUE/rate/index.d.ts +5 -0
- package/dist/types/__VUE/rate/rate.vue.d.ts +208 -0
- package/dist/types/__VUE/row/index.d.ts +5 -0
- package/dist/types/__VUE/row/row.vue.d.ts +71 -0
- package/dist/types/__VUE/swipe/index.d.ts +6 -0
- package/dist/types/__VUE/swipe/swipe.vue.d.ts +79 -0
- package/dist/types/__VUE/swipe/types.d.ts +1 -0
- package/dist/types/__VUE/swipegroup/index.d.ts +5 -0
- package/dist/types/__VUE/swipegroup/swipe-group.vue.d.ts +47 -0
- package/dist/types/__VUE/switch/index.vue.d.ts +9 -0
- package/dist/types/__VUE/tag/index.d.ts +6 -0
- package/dist/types/__VUE/tag/tag.vue.d.ts +90 -0
- package/dist/types/__VUE/tag/types.d.ts +1 -1
- package/dist/types/index.d.ts +32 -18
- package/package.json +1 -1
- package/dist/packages/calendaritem/CalendarItem.js +0 -819
- package/dist/packages/calendaritem/index.css +0 -0
- package/dist/packages/calendaritem/index.mjs +0 -2
- package/dist/packages/calendaritem/index.scss +0 -0
- package/dist/packages/calendaritem/style/css.mjs +0 -2
- package/dist/packages/calendaritem/style/index.mjs +0 -2
- package/dist/packages/types-Ynmct7na.js +0 -4
- package/dist/types/__VUE/animate/index.vue.d.ts +0 -71
- package/dist/types/__VUE/backtop/index.vue.d.ts +0 -98
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +0 -95
- package/dist/types/__VUE/col/index.vue.d.ts +0 -42
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +0 -117
- package/dist/types/__VUE/invoice/index.vue.d.ts +0 -53
- package/dist/types/__VUE/layout/index.vue.d.ts +0 -12
- package/dist/types/__VUE/navbar/index.vue.d.ts +0 -129
- package/dist/types/__VUE/price/index.vue.d.ts +0 -97
- package/dist/types/__VUE/progress/index.vue.d.ts +0 -120
- package/dist/types/__VUE/rate/index.vue.d.ts +0 -240
- package/dist/types/__VUE/row/index.vue.d.ts +0 -62
- package/dist/types/__VUE/swipe/index.vue.d.ts +0 -70
- package/dist/types/__VUE/swipegroup/index.vue.d.ts +0 -26
- package/dist/types/__VUE/tag/index.vue.d.ts +0 -94
- /package/dist/types/__VUE/animate/{type.d.ts → types.d.ts} +0 -0
|
@@ -1,55 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, toRef, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, unref, normalizeStyle } from "vue";
|
|
3
21
|
import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
|
|
4
22
|
import { Minus, Plus } from "@nutui/icons-vue";
|
|
5
|
-
import { u as useFormDisabled } from "../common-
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
const _sfc_main =
|
|
9
|
-
|
|
23
|
+
import { u as useFormDisabled } from "../common-FZL3qC99.js";
|
|
24
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
25
|
+
const _hoisted_1 = ["min", "max", "disabled", "readonly", "value"];
|
|
26
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
27
|
+
name: "NutInputNumber"
|
|
28
|
+
}), {
|
|
29
|
+
__name: "input-number",
|
|
10
30
|
props: {
|
|
11
|
-
modelValue: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
type: [Number, String],
|
|
21
|
-
default: ""
|
|
22
|
-
},
|
|
23
|
-
min: {
|
|
24
|
-
type: [Number, String],
|
|
25
|
-
default: 1
|
|
26
|
-
},
|
|
27
|
-
max: {
|
|
28
|
-
type: [Number, String],
|
|
29
|
-
default: 9999
|
|
30
|
-
},
|
|
31
|
-
step: {
|
|
32
|
-
type: [Number, String],
|
|
33
|
-
default: 1
|
|
34
|
-
},
|
|
35
|
-
decimalPlaces: {
|
|
36
|
-
type: [Number, String],
|
|
37
|
-
default: 0
|
|
38
|
-
},
|
|
39
|
-
disabled: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
readonly: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: false
|
|
46
|
-
}
|
|
31
|
+
modelValue: { default: 0 },
|
|
32
|
+
inputWidth: { default: "" },
|
|
33
|
+
buttonSize: { default: "" },
|
|
34
|
+
min: { default: 1 },
|
|
35
|
+
max: { default: 9999 },
|
|
36
|
+
step: { default: 1 },
|
|
37
|
+
decimalPlaces: { default: 0 },
|
|
38
|
+
disabled: { type: Boolean, default: false },
|
|
39
|
+
readonly: { type: Boolean, default: false }
|
|
47
40
|
},
|
|
48
41
|
emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
|
|
49
|
-
setup(
|
|
42
|
+
setup(__props, { emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
50
45
|
const disabled = useFormDisabled(toRef(props, "disabled"));
|
|
51
46
|
const classes = computed(() => {
|
|
52
|
-
const prefixCls =
|
|
47
|
+
const prefixCls = "nut-input-number";
|
|
53
48
|
return {
|
|
54
49
|
[prefixCls]: true,
|
|
55
50
|
[`${prefixCls}--disabled`]: disabled.value
|
|
@@ -112,7 +107,7 @@ const _sfc_main = create({
|
|
|
112
107
|
if (props.readonly)
|
|
113
108
|
return;
|
|
114
109
|
const input = event.target;
|
|
115
|
-
let value = input.
|
|
110
|
+
let value = Number(input.value);
|
|
116
111
|
if (value < Number(props.min)) {
|
|
117
112
|
value = Number(props.min);
|
|
118
113
|
} else if (value > Number(props.max)) {
|
|
@@ -142,64 +137,50 @@ const _sfc_main = create({
|
|
|
142
137
|
}
|
|
143
138
|
}
|
|
144
139
|
);
|
|
145
|
-
return {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
return (_ctx, _cache) => {
|
|
141
|
+
return openBlock(), createElementBlock("view", {
|
|
142
|
+
class: normalizeClass(classes.value)
|
|
143
|
+
}, [
|
|
144
|
+
createElementVNode("view", {
|
|
145
|
+
class: normalizeClass(["nut-input-number__icon nut-input-number__left", { "nut-input-number__icon--disabled": !reduceAllow() }]),
|
|
146
|
+
onClick: reduce
|
|
147
|
+
}, [
|
|
148
|
+
renderSlot(_ctx.$slots, "left-icon", {}, () => [
|
|
149
|
+
createVNode(unref(Minus), {
|
|
150
|
+
width: unref(pxCheck)(_ctx.buttonSize),
|
|
151
|
+
height: unref(pxCheck)(_ctx.buttonSize)
|
|
152
|
+
}, null, 8, ["width", "height"])
|
|
153
|
+
])
|
|
154
|
+
], 2),
|
|
155
|
+
createElementVNode("input", {
|
|
156
|
+
type: "number",
|
|
157
|
+
min: _ctx.min,
|
|
158
|
+
max: _ctx.max,
|
|
159
|
+
style: normalizeStyle({ width: unref(pxCheck)(_ctx.inputWidth), height: unref(pxCheck)(_ctx.buttonSize) }),
|
|
160
|
+
disabled: unref(disabled),
|
|
161
|
+
readonly: _ctx.readonly,
|
|
162
|
+
value: _ctx.modelValue,
|
|
163
|
+
onInput: change,
|
|
164
|
+
onBlur: blur,
|
|
165
|
+
onFocus: focus
|
|
166
|
+
}, null, 44, _hoisted_1),
|
|
167
|
+
createElementVNode("view", {
|
|
168
|
+
class: normalizeClass(["nut-input-number__icon nut-input-number__right", { "nut-input-number__icon--disabled": !addAllow() }]),
|
|
169
|
+
onClick: add
|
|
170
|
+
}, [
|
|
171
|
+
renderSlot(_ctx.$slots, "right-icon", {}, () => [
|
|
172
|
+
createVNode(unref(Plus), {
|
|
173
|
+
width: unref(pxCheck)(_ctx.buttonSize),
|
|
174
|
+
height: unref(pxCheck)(_ctx.buttonSize)
|
|
175
|
+
}, null, 8, ["width", "height"])
|
|
176
|
+
])
|
|
177
|
+
], 2)
|
|
178
|
+
], 2);
|
|
156
179
|
};
|
|
157
180
|
}
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
161
|
-
const _component_Minus = resolveComponent("Minus");
|
|
162
|
-
const _component_Plus = resolveComponent("Plus");
|
|
163
|
-
return openBlock(), createElementBlock("view", {
|
|
164
|
-
class: normalizeClass(_ctx.classes)
|
|
165
|
-
}, [
|
|
166
|
-
createElementVNode("view", {
|
|
167
|
-
class: normalizeClass(["nut-input-number__icon nut-input-number__left", { "nut-input-number__icon--disabled": !_ctx.reduceAllow() }]),
|
|
168
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.reduce && _ctx.reduce(...args))
|
|
169
|
-
}, [
|
|
170
|
-
renderSlot(_ctx.$slots, "left-icon", {}, () => [
|
|
171
|
-
createVNode(_component_Minus, {
|
|
172
|
-
width: _ctx.pxCheck(_ctx.buttonSize),
|
|
173
|
-
height: _ctx.pxCheck(_ctx.buttonSize)
|
|
174
|
-
}, null, 8, ["width", "height"])
|
|
175
|
-
])
|
|
176
|
-
], 2),
|
|
177
|
-
createElementVNode("input", {
|
|
178
|
-
type: "number",
|
|
179
|
-
min: _ctx.min,
|
|
180
|
-
max: _ctx.max,
|
|
181
|
-
style: normalizeStyle({ width: _ctx.pxCheck(_ctx.inputWidth), height: _ctx.pxCheck(_ctx.buttonSize) }),
|
|
182
|
-
disabled: _ctx.disabled,
|
|
183
|
-
readonly: _ctx.readonly,
|
|
184
|
-
value: _ctx.modelValue,
|
|
185
|
-
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
186
|
-
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
187
|
-
onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
188
|
-
}, null, 44, _hoisted_1),
|
|
189
|
-
createElementVNode("view", {
|
|
190
|
-
class: normalizeClass(["nut-input-number__icon nut-input-number__right", { "nut-input-number__icon--disabled": !_ctx.addAllow() }]),
|
|
191
|
-
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.add && _ctx.add(...args))
|
|
192
|
-
}, [
|
|
193
|
-
renderSlot(_ctx.$slots, "right-icon", {}, () => [
|
|
194
|
-
createVNode(_component_Plus, {
|
|
195
|
-
width: _ctx.pxCheck(_ctx.buttonSize),
|
|
196
|
-
height: _ctx.pxCheck(_ctx.buttonSize)
|
|
197
|
-
}, null, 8, ["width", "height"])
|
|
198
|
-
])
|
|
199
|
-
], 2)
|
|
200
|
-
], 2);
|
|
201
|
-
}
|
|
202
|
-
const NutInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
181
|
+
}));
|
|
182
|
+
withInstall(_sfc_main);
|
|
203
183
|
export {
|
|
204
|
-
|
|
184
|
+
_sfc_main as InputNumber,
|
|
185
|
+
_sfc_main as default
|
|
205
186
|
};
|
|
@@ -17,159 +17,108 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
21
|
-
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
20
|
+
import { defineComponent, ref, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
22
21
|
import { Form as _sfc_main$1 } from "../form/Form.js";
|
|
23
22
|
import { FormItem as _sfc_main$2 } from "../formitem/FormItem.js";
|
|
24
|
-
import { _ as _sfc_main$
|
|
25
|
-
import { _ as _sfc_main$
|
|
23
|
+
import { _ as _sfc_main$4 } from "../index.vue_vue_type_script_lang-n0HbjvfF.js";
|
|
24
|
+
import { _ as _sfc_main$3 } from "../index.vue_vue_type_script_lang-54PRh3YM.js";
|
|
26
25
|
import { Button as _sfc_main$5 } from "../button/Button.js";
|
|
27
|
-
import
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
import NutInput from "../input/Input.js";
|
|
27
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
28
|
+
const _hoisted_1 = { class: "nut-invoice" };
|
|
29
|
+
const _hoisted_2 = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "nut-invoice__submit"
|
|
32
|
+
};
|
|
33
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
34
|
+
name: "NutInvoice"
|
|
35
|
+
}), {
|
|
36
|
+
__name: "invoice",
|
|
37
37
|
props: {
|
|
38
|
-
data: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
formValue: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: {}
|
|
45
|
-
},
|
|
46
|
-
submit: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: true
|
|
49
|
-
}
|
|
38
|
+
data: { default: () => [] },
|
|
39
|
+
formValue: { default: () => {
|
|
40
|
+
} },
|
|
41
|
+
submit: { type: Boolean, default: true }
|
|
50
42
|
},
|
|
51
|
-
emits: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// will be deprecated
|
|
55
|
-
"onSubmit"
|
|
56
|
-
],
|
|
57
|
-
setup(props, { emit }) {
|
|
43
|
+
emits: ["submit", "scrollBottom"],
|
|
44
|
+
setup(__props, { emit: __emit }) {
|
|
45
|
+
const emit = __emit;
|
|
58
46
|
const formRef = ref();
|
|
59
|
-
const list = ref([]);
|
|
60
|
-
const state = reactive({
|
|
61
|
-
// list: []
|
|
62
|
-
});
|
|
63
|
-
const classes = computed(() => {
|
|
64
|
-
const prefixCls = componentName;
|
|
65
|
-
return {
|
|
66
|
-
[prefixCls]: true
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
onMounted(() => {
|
|
70
|
-
init();
|
|
71
|
-
});
|
|
72
|
-
const init = () => {
|
|
73
|
-
list.value = props.data;
|
|
74
|
-
};
|
|
75
47
|
const submitFun = () => {
|
|
76
48
|
formRef.value.validate().then(({ valid, errors }) => {
|
|
77
49
|
emit("submit", valid, errors);
|
|
78
|
-
emit("onSubmit", valid, errors);
|
|
79
50
|
});
|
|
80
51
|
};
|
|
81
|
-
|
|
82
|
-
()
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
key: 0,
|
|
97
|
-
class: "nut-invoice__submit"
|
|
98
|
-
};
|
|
99
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
100
|
-
const _component_nut_radio = resolveComponent("nut-radio");
|
|
101
|
-
const _component_nut_radio_group = resolveComponent("nut-radio-group");
|
|
102
|
-
const _component_nut_form_item = resolveComponent("nut-form-item");
|
|
103
|
-
const _component_nut_form = resolveComponent("nut-form");
|
|
104
|
-
const _component_nut_button = resolveComponent("nut-button");
|
|
105
|
-
return openBlock(), createElementBlock("view", {
|
|
106
|
-
class: normalizeClass(_ctx.classes)
|
|
107
|
-
}, [
|
|
108
|
-
createVNode(_component_nut_form, {
|
|
109
|
-
ref: "formRef",
|
|
110
|
-
"model-value": _ctx.formValue
|
|
111
|
-
}, {
|
|
112
|
-
default: withCtx(() => [
|
|
113
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
|
|
114
|
-
return openBlock(), createBlock(_component_nut_form_item, {
|
|
115
|
-
key: index2,
|
|
116
|
-
label: item.label,
|
|
117
|
-
required: item.required,
|
|
118
|
-
rules: item.rules,
|
|
119
|
-
prop: item.formItemProp
|
|
120
|
-
}, {
|
|
121
|
-
default: withCtx(() => [
|
|
122
|
-
item.type === "radio" ? (openBlock(), createBlock(_component_nut_radio_group, {
|
|
123
|
-
key: 0,
|
|
124
|
-
modelValue: _ctx.formValue[item.formItemProp],
|
|
125
|
-
"onUpdate:modelValue": ($event) => _ctx.formValue[item.formItemProp] = $event
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
54
|
+
createVNode(unref(_sfc_main$1), {
|
|
55
|
+
ref_key: "formRef",
|
|
56
|
+
ref: formRef,
|
|
57
|
+
"model-value": _ctx.formValue
|
|
58
|
+
}, {
|
|
59
|
+
default: withCtx(() => [
|
|
60
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (item, index) => {
|
|
61
|
+
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
62
|
+
key: index,
|
|
63
|
+
label: item.label,
|
|
64
|
+
required: item.required,
|
|
65
|
+
rules: item.rules,
|
|
66
|
+
prop: item.formItemProp
|
|
126
67
|
}, {
|
|
127
68
|
default: withCtx(() => [
|
|
128
|
-
(openBlock(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
69
|
+
item.type === "radio" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
70
|
+
key: 0,
|
|
71
|
+
modelValue: _ctx.formValue[item.formItemProp],
|
|
72
|
+
"onUpdate:modelValue": ($event) => _ctx.formValue[item.formItemProp] = $event
|
|
73
|
+
}, {
|
|
74
|
+
default: withCtx(() => [
|
|
75
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.radioLabel, (radioItem, radioIndex) => {
|
|
76
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
|
77
|
+
key: radioIndex,
|
|
78
|
+
shape: "button",
|
|
79
|
+
label: radioItem.label
|
|
80
|
+
}, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
createTextVNode(toDisplayString(radioItem.label), 1)
|
|
83
|
+
]),
|
|
84
|
+
_: 2
|
|
85
|
+
}, 1032, ["label"]);
|
|
86
|
+
}), 128))
|
|
87
|
+
]),
|
|
88
|
+
_: 2
|
|
89
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (openBlock(), createBlock(NutInput, {
|
|
90
|
+
key: 1,
|
|
91
|
+
modelValue: _ctx.formValue[item.formItemProp],
|
|
92
|
+
"onUpdate:modelValue": ($event) => _ctx.formValue[item.formItemProp] = $event,
|
|
93
|
+
class: "nut-input-text",
|
|
94
|
+
placeholder: item.placeholder,
|
|
95
|
+
type: "text"
|
|
96
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
|
|
140
97
|
]),
|
|
141
98
|
_: 2
|
|
142
|
-
}, 1032, ["
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
99
|
+
}, 1032, ["label", "required", "rules", "prop"]);
|
|
100
|
+
}), 128))
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["model-value"]),
|
|
104
|
+
_ctx.submit ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
105
|
+
createVNode(unref(_sfc_main$5), {
|
|
106
|
+
type: "primary",
|
|
107
|
+
block: "",
|
|
108
|
+
onClick: submitFun
|
|
109
|
+
}, {
|
|
110
|
+
default: withCtx(() => [
|
|
111
|
+
createTextVNode("提交审批")
|
|
151
112
|
]),
|
|
152
|
-
_:
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
])
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
type: "primary",
|
|
161
|
-
block: "",
|
|
162
|
-
onClick: _ctx.submitFun
|
|
163
|
-
}, {
|
|
164
|
-
default: withCtx(() => [
|
|
165
|
-
createTextVNode("提交审批")
|
|
166
|
-
]),
|
|
167
|
-
_: 1
|
|
168
|
-
}, 8, ["onClick"])
|
|
169
|
-
])) : createCommentVNode("", true)
|
|
170
|
-
], 2);
|
|
171
|
-
}
|
|
172
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
113
|
+
_: 1
|
|
114
|
+
})
|
|
115
|
+
])) : createCommentVNode("", true)
|
|
116
|
+
]);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
120
|
+
withInstall(_sfc_main);
|
|
173
121
|
export {
|
|
174
|
-
|
|
122
|
+
_sfc_main as Invoice,
|
|
123
|
+
_sfc_main as default
|
|
175
124
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
2
2
|
import "vue";
|
|
3
|
+
import { w as withInstall } from "../with-install-p59gYYU_.js";
|
|
3
4
|
const { create } = createComponent("layout");
|
|
4
5
|
const _sfc_main = create({});
|
|
6
|
+
withInstall(_sfc_main);
|
|
5
7
|
export {
|
|
8
|
+
_sfc_main as Layout,
|
|
6
9
|
_sfc_main as default
|
|
7
10
|
};
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, computed, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-TCzwHGVq.js";
|
|
22
|
-
import { N as NutPopup } from "../index-
|
|
22
|
+
import { N as NutPopup } from "../index-BqB5dTeo.js";
|
|
23
23
|
import { Check } from "@nutui/icons-vue";
|
|
24
24
|
import { u as useParent } from "../useParent-KIxqkovs.js";
|
|
25
25
|
import { M as MENU_KEY } from "../types-j71K23JP.js";
|