@king-one/form-antdv 0.0.15 → 0.0.16
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 +8 -0
- package/dist/es/src/components/HalfInputNumber/half-input-number.vue2.mjs +27 -25
- package/dist/es/src/components/HalfInputNumber/index.mjs +8 -6
- package/dist/lib/src/components/HalfInputNumber/half-input-number.vue2.js +1 -1
- package/dist/lib/src/components/HalfInputNumber/index.js +1 -1
- package/dist/theme-chalk/form-antdv.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/src/components/HalfInputNumber/half-input-number.vue.d.ts +14 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InputNumber as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as u, openBlock as d, createBlock as i, unref as m } from "vue";
|
|
2
|
+
import { InputNumber as p } from "ant-design-vue";
|
|
3
|
+
const h = /* @__PURE__ */ u({
|
|
4
|
+
inheritAttrs: !1,
|
|
4
5
|
__name: "half-input-number",
|
|
5
|
-
props:
|
|
6
|
+
props: {
|
|
6
7
|
placeholder: { default: "请输入" },
|
|
7
|
-
min: { default: 0 }
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
emits: ["update:
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
function
|
|
8
|
+
min: { default: 0 },
|
|
9
|
+
disabled: { type: Boolean },
|
|
10
|
+
modelValue: {},
|
|
11
|
+
addonAfter: { default: "" }
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(f, { emit: a }) {
|
|
15
|
+
const r = a;
|
|
16
|
+
function t(e) {
|
|
16
17
|
return e == null ? "0" : String(e);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function o(e) {
|
|
19
20
|
const n = Number.parseFloat(e);
|
|
20
21
|
return Number.isNaN(n) ? 0 : Math.round(n * 2) / 2;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function l(e) {
|
|
23
24
|
if (e === null) {
|
|
24
|
-
|
|
25
|
+
r("update:modelValue", 0);
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
r("update:modelValue", Math.round(e * 2) / 2);
|
|
28
29
|
}
|
|
29
|
-
return (e, n) => (d(),
|
|
30
|
-
value:
|
|
31
|
-
"onUpdate:value": n[0] || (n[0] = (o) => u.value = o),
|
|
30
|
+
return (e, n) => (d(), i(m(p), {
|
|
31
|
+
value: e.modelValue,
|
|
32
32
|
placeholder: e.placeholder,
|
|
33
33
|
min: e.min,
|
|
34
|
+
"addon-after": e.addonAfter,
|
|
34
35
|
step: 0.5,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
disabled: e.disabled,
|
|
37
|
+
formatter: t,
|
|
38
|
+
parser: o,
|
|
39
|
+
onChange: l
|
|
40
|
+
}, null, 8, ["value", "placeholder", "min", "addon-after", "disabled"]));
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
43
|
export {
|
|
42
|
-
|
|
44
|
+
h as default
|
|
43
45
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import "../../internal.mjs";
|
|
2
2
|
import "./half-input-number.vue.mjs";
|
|
3
|
-
import { transformComponent as o, connect as
|
|
3
|
+
import { transformComponent as o, connect as m, mapProps as r } from "@king-one/form-render";
|
|
4
4
|
import t from "./half-input-number.vue2.mjs";
|
|
5
|
-
const
|
|
6
|
-
change: "update:
|
|
7
|
-
}),
|
|
5
|
+
const e = o(t, {
|
|
6
|
+
change: "update:modelValue"
|
|
7
|
+
}), f = m(e, r({
|
|
8
|
+
value: "modelValue"
|
|
9
|
+
}));
|
|
8
10
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
f as HalfInputNumber,
|
|
12
|
+
e as TransformHalfInputNumber
|
|
11
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),d=require("ant-design-vue"),i=n.defineComponent({inheritAttrs:!1,__name:"half-input-number",props:{placeholder:{default:"请输入"},min:{default:0},disabled:{type:Boolean},modelValue:{},addonAfter:{default:""}},emits:["update:modelValue"],setup(s,{emit:u}){const t=u;function a(e){return e==null?"0":String(e)}function l(e){const r=Number.parseFloat(e);return Number.isNaN(r)?0:Math.round(r*2)/2}function o(e){if(e===null){t("update:modelValue",0);return}t("update:modelValue",Math.round(e*2)/2)}return(e,r)=>(n.openBlock(),n.createBlock(n.unref(d.InputNumber),{value:e.modelValue,placeholder:e.placeholder,min:e.min,"addon-after":e.addonAfter,step:.5,disabled:e.disabled,formatter:a,parser:l,onChange:o},null,8,["value","placeholder","min","addon-after","disabled"]))}});exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../internal.js");require("./half-input-number.vue.js");const e=require("@king-one/form-render"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../internal.js");require("./half-input-number.vue.js");const e=require("@king-one/form-render"),u=require("./half-input-number.vue2.js"),r=e.transformComponent(u.default,{change:"update:modelValue"}),t=e.connect(r,e.mapProps({value:"modelValue"}));exports.HalfInputNumber=t;exports.TransformHalfInputNumber=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.kr-antdv-ArrayCard .title-box{display:flex;justify-content:space-between;align-items:center;height:32px}.kr-antdv-ArrayCard .title-box .delete-btn{padding:2px 12px;color:var(--king-color-danger);font-size:14px;cursor:pointer;border:1px solid var(--king-color-danger);border-radius:4px;transition:all .3s ease}.kr-antdv-ArrayCard .title-box .delete-btn:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(255,77,79,.3)}.kr-antdv-ArrayTable .ant-table-row .ant-table-cell{padding:0 8px!important}.k-render-form-provider .ant-input-number{width:100%}
|
|
1
|
+
.kr-antdv-ArrayCard .title-box{display:flex;justify-content:space-between;align-items:center;height:32px}.kr-antdv-ArrayCard .title-box .delete-btn{padding:2px 12px;color:var(--king-color-danger);font-size:14px;cursor:pointer;border:1px solid var(--king-color-danger);border-radius:4px;transition:all .3s ease}.kr-antdv-ArrayCard .title-box .delete-btn:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(255,77,79,.3)}.kr-antdv-ArrayTable .ant-table-row .ant-table-cell{padding:0 8px!important}.k-render-form-provider .ant-input-number{width:100%}.ant-input-number-group-wrapper{width:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.kr-antdv-ArrayCard .title-box{display:flex;justify-content:space-between;align-items:center;height:32px}.kr-antdv-ArrayCard .title-box .delete-btn{padding:2px 12px;color:var(--king-color-danger);font-size:14px;cursor:pointer;border:1px solid var(--king-color-danger);border-radius:4px;transition:all .3s ease}.kr-antdv-ArrayCard .title-box .delete-btn:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(255,77,79,.3)}.kr-antdv-ArrayTable .ant-table-row .ant-table-cell{padding:0 8px!important}.k-render-form-provider .ant-input-number{width:100%}
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.kr-antdv-ArrayCard .title-box{display:flex;justify-content:space-between;align-items:center;height:32px}.kr-antdv-ArrayCard .title-box .delete-btn{padding:2px 12px;color:var(--king-color-danger);font-size:14px;cursor:pointer;border:1px solid var(--king-color-danger);border-radius:4px;transition:all .3s ease}.kr-antdv-ArrayCard .title-box .delete-btn:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(255,77,79,.3)}.kr-antdv-ArrayTable .ant-table-row .ant-table-cell{padding:0 8px!important}.k-render-form-provider .ant-input-number{width:100%}.ant-input-number-group-wrapper{width:100%}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare
|
|
2
|
+
declare const _default: DefineComponent<{
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
min?: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} &
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
modelValue?: number;
|
|
7
|
+
addonAfter?: string;
|
|
8
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
9
|
+
"update:modelValue": (value: number) => any;
|
|
10
|
+
}, string, PublicProps, Readonly<{
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
min?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
modelValue?: number;
|
|
15
|
+
addonAfter?: string;
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
13
18
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
19
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-one/form-antdv",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"description": "@king-one 表单渲染器 - ant-design-vue 组件库",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "ISC",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@king-one/theme": "^1.0.1",
|
|
44
44
|
"ant-design-vue": "^4.2.6",
|
|
45
45
|
"vue": "^3.5.13",
|
|
46
|
-
"@king-one/form-render": "^0.0.
|
|
46
|
+
"@king-one/form-render": "^0.0.12"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public",
|