hzzt-plus 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +10 -5
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +7 -7
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +10 -5
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/components/click-input/index.mjs +2 -2
- package/es/components/click-input/src/click-input.mjs +21 -84
- package/es/components/click-input/src/click-input.mjs.map +1 -1
- package/es/components/click-input/src/click-input2.mjs +84 -21
- package/es/components/click-input/src/click-input2.mjs.map +1 -1
- package/es/components/collapse/index.d.ts +6 -0
- package/es/components/collapse/src/collapse.vue.d.ts +6 -0
- package/es/components/icon/index.d.ts +6 -0
- package/es/components/icon/src/index.mjs +9 -4
- package/es/components/icon/src/index.mjs.map +1 -1
- package/es/components/icon/src/index.vue.d.ts +6 -0
- package/es/components/index.mjs +2 -2
- package/es/components/lazy-list/index.mjs +2 -2
- package/es/components/lazy-list/src/lazy-list.mjs +80 -22
- package/es/components/lazy-list/src/lazy-list.mjs.map +1 -1
- package/es/components/lazy-list/src/lazy-list2.mjs +22 -80
- package/es/components/lazy-list/src/lazy-list2.mjs.map +1 -1
- package/es/components/page-size/index.d.ts +6 -0
- package/es/components/page-size/src/index.vue.d.ts +6 -0
- package/es/components/pagination/index.d.ts +6 -0
- package/es/components/pagination/src/index.vue.d.ts +6 -0
- package/es/components/quarter-picker/index.d.ts +6 -0
- package/es/components/quarter-picker/src/index.vue.d.ts +6 -0
- package/es/components/scroll/src/scroll.vue.d.ts +6 -0
- package/es/components/select/src/select.vue.d.ts +6 -0
- package/es/components/tab/index.d.ts +6 -0
- package/es/components/tab/src/index.vue.d.ts +6 -0
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/click-input/index.js +2 -2
- package/lib/components/click-input/src/click-input.js +22 -84
- package/lib/components/click-input/src/click-input.js.map +1 -1
- package/lib/components/click-input/src/click-input2.js +84 -22
- package/lib/components/click-input/src/click-input2.js.map +1 -1
- package/lib/components/collapse/index.d.ts +6 -0
- package/lib/components/collapse/src/collapse.vue.d.ts +6 -0
- package/lib/components/icon/index.d.ts +6 -0
- package/lib/components/icon/src/index.js +8 -3
- package/lib/components/icon/src/index.js.map +1 -1
- package/lib/components/icon/src/index.vue.d.ts +6 -0
- package/lib/components/index.js +2 -2
- package/lib/components/lazy-list/index.js +2 -2
- package/lib/components/lazy-list/src/lazy-list.js +80 -23
- package/lib/components/lazy-list/src/lazy-list.js.map +1 -1
- package/lib/components/lazy-list/src/lazy-list2.js +23 -80
- package/lib/components/lazy-list/src/lazy-list2.js.map +1 -1
- package/lib/components/page-size/index.d.ts +6 -0
- package/lib/components/page-size/src/index.vue.d.ts +6 -0
- package/lib/components/pagination/index.d.ts +6 -0
- package/lib/components/pagination/src/index.vue.d.ts +6 -0
- package/lib/components/quarter-picker/index.d.ts +6 -0
- package/lib/components/quarter-picker/src/index.vue.d.ts +6 -0
- package/lib/components/scroll/src/scroll.vue.d.ts +6 -0
- package/lib/components/select/src/select.vue.d.ts +6 -0
- package/lib/components/tab/index.d.ts +6 -0
- package/lib/components/tab/src/index.vue.d.ts +6 -0
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/dist/index.full.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Hzzt Plus v2.0.
|
|
1
|
+
/*! Hzzt Plus v2.0.8 */
|
|
2
2
|
|
|
3
3
|
import { getCurrentScope, onScopeDispose, unref, getCurrentInstance, onMounted, nextTick, readonly, shallowRef, watchEffect, watch, ref, computed, defineComponent, openBlock, createElementBlock, createElementVNode, warn, isRef, inject, provide, renderSlot, mergeProps, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, onBeforeUnmount, Transition, withDirectives, vShow, reactive, onActivated, onUpdated, cloneVNode, Text, Comment, Teleport as Teleport$1, onBeforeMount, onDeactivated, toRaw, vModelCheckbox, createTextVNode, toRefs, vModelRadio, h, resolveComponent, renderList, onBeforeUpdate, withKeys, vModelText, createSlots, resolveDirective, toHandlerKey, normalizeProps, guardReactiveProps } from 'vue';
|
|
4
4
|
|
|
@@ -12961,7 +12961,7 @@ var ConfigProvider$1 = ConfigProvider;
|
|
|
12961
12961
|
|
|
12962
12962
|
const HzztConfigProvider = withInstall$1(ConfigProvider$1);
|
|
12963
12963
|
|
|
12964
|
-
const version$1 = "2.0.
|
|
12964
|
+
const version$1 = "2.0.8";
|
|
12965
12965
|
|
|
12966
12966
|
const makeInstaller = (components = []) => {
|
|
12967
12967
|
const install = (app, options) => {
|
|
@@ -25881,19 +25881,24 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
25881
25881
|
type: {
|
|
25882
25882
|
type: String,
|
|
25883
25883
|
default: "el"
|
|
25884
|
-
}
|
|
25884
|
+
},
|
|
25885
|
+
size: [String, Number],
|
|
25886
|
+
color: String
|
|
25885
25887
|
},
|
|
25886
25888
|
setup(__props) {
|
|
25887
25889
|
const props = __props;
|
|
25888
25890
|
const attrs = useAttrs$1();
|
|
25889
25891
|
const componentName = computed(() => `hzzt-${props.type}-${props.name}`);
|
|
25890
25892
|
return (_ctx, _cache) => {
|
|
25891
|
-
return openBlock(), createBlock(unref(ElIcon),
|
|
25893
|
+
return openBlock(), createBlock(unref(ElIcon), mergeProps(unref(attrs), {
|
|
25894
|
+
size: __props.size,
|
|
25895
|
+
color: __props.color
|
|
25896
|
+
}), {
|
|
25892
25897
|
default: withCtx(() => [
|
|
25893
25898
|
(openBlock(), createBlock(resolveDynamicComponent(unref(componentName))))
|
|
25894
25899
|
]),
|
|
25895
25900
|
_: 1
|
|
25896
|
-
}, 16);
|
|
25901
|
+
}, 16, ["size", "color"]);
|
|
25897
25902
|
};
|
|
25898
25903
|
}
|
|
25899
25904
|
});
|
package/dist/locale/en.js
CHANGED
package/dist/locale/en.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v2.0.
|
|
1
|
+
/*! Hzzt Plus v2.0.8 */(function(e,r){typeof exports=="object"&&typeof module!="undefined"?module.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis!="undefined"?globalThis:e||self,e.HzztPlusLocaleEn=r())})(this,function(){"use strict";var e={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"",strip:""},pageSize:{total:"Total ",strip:"",page:"page",d:"",per_page:"per page"},quarterpicker:{prevYear:"Previous Year",nextYear:"Next Year",year:"",firstQuarter:"First quarter",secondQuarter:"Second quarter",thirdQuarter:"Third quarter",fourthQuarter:"Fourth quarter"}}};return e});
|
|
2
2
|
//# sourceMappingURL=en.min.js.map
|
package/dist/locale/en.min.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v2.0.
|
|
1
|
+
/*! Hzzt Plus v2.0.8 */var r={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"",strip:""},pageSize:{total:"Total ",strip:"",page:"page",d:"",per_page:"per page"},quarterpicker:{prevYear:"Previous Year",nextYear:"Next Year",year:"",firstQuarter:"First quarter",secondQuarter:"Second quarter",thirdQuarter:"Third quarter",fourthQuarter:"Fourth quarter"}}};export{r as default};
|
|
2
2
|
//# sourceMappingURL=en.min.mjs.map
|
package/dist/locale/en.mjs
CHANGED
package/dist/locale/zh-cn.js
CHANGED
package/dist/locale/zh-cn.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v2.0.
|
|
1
|
+
/*! Hzzt Plus v2.0.8 */(function(u,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e():typeof define=="function"&&define.amd?define(e):(u=typeof globalThis!="undefined"?globalThis:u||self,u.HzztPlusLocaleZhCn=e())})(this,function(){"use strict";var u={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"},pageSize:{total:"\u5171",strip:"\u6761",d:"\u7B2C",page:"\u9875",per_page:"\u6BCF\u9875"},quarterpicker:{prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",year:"\u5E74",firstQuarter:"\u7B2C\u4E00\u5B63\u5EA6",secondQuarter:"\u7B2C\u4E8C\u5B63\u5EA6",thirdQuarter:"\u7B2C\u4E09\u5B63\u5EA6",fourthQuarter:"\u7B2C\u56DB\u5B63\u5EA6"}}};return u});
|
|
2
2
|
//# sourceMappingURL=zh-cn.min.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Hzzt Plus v2.0.
|
|
1
|
+
/*! Hzzt Plus v2.0.8 */var u={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"},pageSize:{total:"\u5171",strip:"\u6761",d:"\u7B2C",page:"\u9875",per_page:"\u6BCF\u9875"},quarterpicker:{prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",year:"\u5E74",firstQuarter:"\u7B2C\u4E00\u5B63\u5EA6",secondQuarter:"\u7B2C\u4E8C\u5B63\u5EA6",thirdQuarter:"\u7B2C\u4E09\u5B63\u5EA6",fourthQuarter:"\u7B2C\u56DB\u5B63\u5EA6"}}};export{u as default};
|
|
2
2
|
//# sourceMappingURL=zh-cn.min.mjs.map
|
package/dist/locale/zh-cn.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import ClickInput from './src/click-
|
|
3
|
-
export { clickInputEmits, clickInputProps } from './src/click-
|
|
2
|
+
import ClickInput from './src/click-input2.mjs';
|
|
3
|
+
export { clickInputEmits, clickInputProps } from './src/click-input.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const HzztClickInput = withInstall(ClickInput);
|
|
@@ -1,89 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { clickInputProps, clickInputEmits } from './click-input2.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
3
2
|
import '../../../hooks/index.mjs';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import '../../../constants/index.mjs';
|
|
4
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
6
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
7
|
+
import { isString } from '@vue/shared';
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const clickInputProps = buildProps({
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
disabled: Boolean,
|
|
15
|
+
readonly: Boolean,
|
|
16
|
+
inputProps: Object,
|
|
17
|
+
size: useSizeProp
|
|
11
18
|
});
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const props = __props;
|
|
18
|
-
const _inputVal = ref(props.modelValue || "");
|
|
19
|
-
const inputVal = ref(props.modelValue || "");
|
|
20
|
-
const inputRef = ref();
|
|
21
|
-
const editable = ref(false);
|
|
22
|
-
const nsInput = useNamespace("click-input");
|
|
23
|
-
const formSize = useFormSize();
|
|
24
|
-
const formDisabled = useFormDisabled();
|
|
25
|
-
const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
|
|
26
|
-
const trueDisabled = computed(() => props.disabled || formDisabled.value);
|
|
27
|
-
const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value);
|
|
28
|
-
const containerCls = computed(() => [
|
|
29
|
-
nsInput.b(),
|
|
30
|
-
nsInput.m(trueSize.value),
|
|
31
|
-
"flex width-100% align-items-center"
|
|
32
|
-
]);
|
|
33
|
-
const spanClass = computed(() => [
|
|
34
|
-
nsInput.e("span"),
|
|
35
|
-
"flex width-100% align-items-center"
|
|
36
|
-
]);
|
|
37
|
-
watch(() => props.modelValue, (v) => {
|
|
38
|
-
inputVal.value = v || "";
|
|
39
|
-
_inputVal.value = v || "";
|
|
40
|
-
});
|
|
41
|
-
function input(val) {
|
|
42
|
-
emit("update:modelValue", val);
|
|
43
|
-
emit("input", val);
|
|
44
|
-
}
|
|
45
|
-
function change() {
|
|
46
|
-
editable.value = false;
|
|
47
|
-
if (_inputVal.value === inputVal.value) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
input(inputVal.value);
|
|
51
|
-
emit("change", inputVal.value);
|
|
52
|
-
}
|
|
53
|
-
function edit() {
|
|
54
|
-
if (trueDisabled.value || props.readonly) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
editable.value = true;
|
|
58
|
-
nextTick(() => {
|
|
59
|
-
inputRef.value.focus();
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return (_ctx, _cache) => {
|
|
63
|
-
return openBlock(), createElementBlock("div", {
|
|
64
|
-
class: normalizeClass(unref(containerCls))
|
|
65
|
-
}, [
|
|
66
|
-
!unref(trueReadonly) ? (openBlock(), createBlock(unref(ElInput), mergeProps({
|
|
67
|
-
key: 0,
|
|
68
|
-
ref_key: "inputRef",
|
|
69
|
-
ref: inputRef,
|
|
70
|
-
modelValue: inputVal.value,
|
|
71
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event)
|
|
72
|
-
}, _ctx.inputProps, {
|
|
73
|
-
clearable: "",
|
|
74
|
-
size: unref(trueSize),
|
|
75
|
-
onKeyup: withKeys(change, ["enter"]),
|
|
76
|
-
onBlur: change
|
|
77
|
-
}), null, 16, ["modelValue", "size", "onKeyup"])) : (openBlock(), createElementBlock("div", {
|
|
78
|
-
key: 1,
|
|
79
|
-
class: normalizeClass(["width-100%", unref(spanClass)]),
|
|
80
|
-
onClick: edit
|
|
81
|
-
}, toDisplayString(inputVal.value || " "), 3))
|
|
82
|
-
], 2);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
var ClickInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "click-input.vue"]]);
|
|
19
|
+
const clickInputEmits = {
|
|
20
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
21
|
+
input: (value) => isString(value),
|
|
22
|
+
change: (value) => isString(value)
|
|
23
|
+
};
|
|
87
24
|
|
|
88
|
-
export {
|
|
25
|
+
export { clickInputEmits, clickInputProps };
|
|
89
26
|
//# sourceMappingURL=click-input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click-input.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.
|
|
1
|
+
{"version":3,"file":"click-input.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.ts"],"sourcesContent":["import {buildProps, isString} from '@hzzt-plus/utils'\nimport {useSizeProp} from \"@hzzt-plus/hooks\";\n\nimport type { ExtractPropTypes } from 'vue'\nimport type ClickInput from './click-input.vue'\nimport {UPDATE_MODEL_EVENT} from \"@hzzt-plus/constants\";\n\nexport const clickInputProps = buildProps({\n modelValue: {\n type: String,\n default: '',\n },\n disabled: Boolean,\n readonly: Boolean,\n inputProps: Object,\n size: useSizeProp,\n})\n\nexport type ClickInputProps = ExtractPropTypes<typeof clickInputProps>\n\nexport const clickInputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string) => isString(value),\n}\nexport type ClickInputEmits = typeof clickInputEmits\n\nexport type ClickInputInstance = InstanceType<typeof ClickInput>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,IAAI,EAAE,WAAW;AACnB,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACpC;;;;"}
|
|
@@ -1,26 +1,89 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import { defineComponent, ref, computed, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref, createBlock, mergeProps, withKeys, toDisplayString } from 'vue';
|
|
2
|
+
import { clickInputProps, clickInputEmits } from './click-input.mjs';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { isString } from '@vue/shared';
|
|
4
|
+
import { useFormSize, useFormDisabled, ElInput } from 'element-plus';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { useGlobalSize } from '../../../hooks/use-size/index.mjs';
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
type: String,
|
|
12
|
-
default: ""
|
|
13
|
-
},
|
|
14
|
-
disabled: Boolean,
|
|
15
|
-
readonly: Boolean,
|
|
16
|
-
inputProps: Object,
|
|
17
|
-
size: useSizeProp
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "HzztClickInput"
|
|
18
11
|
});
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: clickInputProps,
|
|
15
|
+
emits: clickInputEmits,
|
|
16
|
+
setup(__props, { emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const _inputVal = ref(props.modelValue || "");
|
|
19
|
+
const inputVal = ref(props.modelValue || "");
|
|
20
|
+
const inputRef = ref();
|
|
21
|
+
const editable = ref(false);
|
|
22
|
+
const nsInput = useNamespace("click-input");
|
|
23
|
+
const formSize = useFormSize();
|
|
24
|
+
const formDisabled = useFormDisabled();
|
|
25
|
+
const trueSize = computed(() => props.size || formSize.value || useGlobalSize().value);
|
|
26
|
+
const trueDisabled = computed(() => props.disabled || formDisabled.value);
|
|
27
|
+
const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value);
|
|
28
|
+
const containerCls = computed(() => [
|
|
29
|
+
nsInput.b(),
|
|
30
|
+
nsInput.m(trueSize.value),
|
|
31
|
+
"flex width-100% align-items-center"
|
|
32
|
+
]);
|
|
33
|
+
const spanClass = computed(() => [
|
|
34
|
+
nsInput.e("span"),
|
|
35
|
+
"flex width-100% align-items-center"
|
|
36
|
+
]);
|
|
37
|
+
watch(() => props.modelValue, (v) => {
|
|
38
|
+
inputVal.value = v || "";
|
|
39
|
+
_inputVal.value = v || "";
|
|
40
|
+
});
|
|
41
|
+
function input(val) {
|
|
42
|
+
emit("update:modelValue", val);
|
|
43
|
+
emit("input", val);
|
|
44
|
+
}
|
|
45
|
+
function change() {
|
|
46
|
+
editable.value = false;
|
|
47
|
+
if (_inputVal.value === inputVal.value) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
input(inputVal.value);
|
|
51
|
+
emit("change", inputVal.value);
|
|
52
|
+
}
|
|
53
|
+
function edit() {
|
|
54
|
+
if (trueDisabled.value || props.readonly) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
editable.value = true;
|
|
58
|
+
nextTick(() => {
|
|
59
|
+
inputRef.value.focus();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return (_ctx, _cache) => {
|
|
63
|
+
return openBlock(), createElementBlock("div", {
|
|
64
|
+
class: normalizeClass(unref(containerCls))
|
|
65
|
+
}, [
|
|
66
|
+
!unref(trueReadonly) ? (openBlock(), createBlock(unref(ElInput), mergeProps({
|
|
67
|
+
key: 0,
|
|
68
|
+
ref_key: "inputRef",
|
|
69
|
+
ref: inputRef,
|
|
70
|
+
modelValue: inputVal.value,
|
|
71
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputVal.value = $event)
|
|
72
|
+
}, _ctx.inputProps, {
|
|
73
|
+
clearable: "",
|
|
74
|
+
size: unref(trueSize),
|
|
75
|
+
onKeyup: withKeys(change, ["enter"]),
|
|
76
|
+
onBlur: change
|
|
77
|
+
}), null, 16, ["modelValue", "size", "onKeyup"])) : (openBlock(), createElementBlock("div", {
|
|
78
|
+
key: 1,
|
|
79
|
+
class: normalizeClass(["width-100%", unref(spanClass)]),
|
|
80
|
+
onClick: edit
|
|
81
|
+
}, toDisplayString(inputVal.value || " "), 3))
|
|
82
|
+
], 2);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
var ClickInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "click-input.vue"]]);
|
|
24
87
|
|
|
25
|
-
export {
|
|
88
|
+
export { ClickInput as default };
|
|
26
89
|
//# sourceMappingURL=click-input2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"click-input2.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.
|
|
1
|
+
{"version":3,"file":"click-input2.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n v-if=\"!trueReadonly\"\n ref=\"inputRef\"\n v-model=\"inputVal\"\n v-bind=\"inputProps\"\n clearable\n :size=\"trueSize\"\n @keyup.enter=\"change\"\n @blur=\"change\"\n />\n <div v-else class=\"width-100%\" :class=\"spanClass\" @click=\"edit\">\n {{ inputVal || ' ' }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {computed, ref, watch, nextTick} from 'vue'\n import {clickInputEmits, clickInputProps} from './click-input'\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import {ElInput} from 'element-plus'\n\n defineOptions({\n name: 'HzztClickInput',\n })\n\n const props = defineProps(clickInputProps)\n const emit = defineEmits(clickInputEmits)\n\n const _inputVal = ref(props.modelValue || '');\n const inputVal = ref(props.modelValue || '');\n const inputRef = ref();\n const editable = ref(false);\n\n const nsInput = useNamespace('click-input')\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value)\n\n const containerCls = computed(() => [\n nsInput.b(),\n nsInput.m(trueSize.value),\n 'flex width-100% align-items-center',\n ])\n\n const spanClass = computed(() => [\n nsInput.e('span'),\n 'flex width-100% align-items-center',\n ])\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v || '';\n _inputVal.value = v || '';\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change() {\n editable.value = false;\n if (_inputVal.value === inputVal.value) {\n return;\n }\n input(inputVal.value);\n emit('change', inputVal.value);\n }\n\n function edit() {\n if (trueDisabled.value || props.readonly) {\n return;\n }\n editable.value = true;\n nextTick(() => {\n inputRef.value.focus();\n });\n }\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCAyBgB,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,SAAY,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,EAAE,CAAA,CAAA;AAC5C,IAAA,MAAM,QAAW,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,EAAE,CAAA,CAAA;AAC3C,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AACrB,IAAM,MAAA,QAAA,GAAW,IAAI,KAAK,CAAA,CAAA;AAE1B,IAAM,MAAA,OAAA,GAAU,aAAa,aAAa,CAAA,CAAA;AAC1C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA,YAAA,CAAA,KAAA,IAAA,KAAA,CAAA,QAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAM,eAAe,QAAS,CAAA,MAAM;AAEpC,MAAM,OAAA,CAAA,CAAA,EAAA;AAEN,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,MAClC,oCAAU;AAAA,KACV,CAAA,CAAA;AAAwB,IACxB,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACD,OAAA,CAAA,CAAA,CAAA,MAAA,CAAA;AAED,MAAM,oCAA2B;AAAA,KAC/B,CAAA,CAAA;AAAgB,IAChB,KAAA,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACD,QAAA,CAAA,KAAA,GAAA,CAAA,IAAA,EAAA,CAAA;AAED,MAAA,SAAY,CAAA,KAAA,GAAkB,CAAA,IAAA,EAAA,CAAA;AAC5B,KAAA,CAAA,CAAA;AACA,IAAA,SAAA,WAAkB;AAAK,MACxB,IAAA,CAAA,mBAAA,EAAA,GAAA,CAAA,CAAA;AAED,MAAA,IAAA,CAAA,SAA4B,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,kBAAiB;AAAA,MACnB,QAAA,CAAA,KAAA,GAAA,KAAA,CAAA;AAEA,MAAA,IAAA,SAAkB,CAAA,KAAA,KAAA,QAAA,CAAA,KAAA,EAAA;AAChB,QAAA,OAAS;AACT,OAAI;AACF,MAAA,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAAA,MACF,IAAA,CAAA,QAAA,EAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AACA,KAAA;AACA,IAAK,SAAA,IAAA,GAAA;AAAwB,MAC/B,IAAA,YAAA,CAAA,KAAA,IAAA,KAAA,CAAA,QAAA,EAAA;AAEA,QAAA,OAAgB;AACd,OAAI;AACF,MAAA,QAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,MACF,QAAA,CAAA,MAAA;AACA,QAAA,QAAiB,CAAA,KAAA,CAAA,KAAA,EAAA,CAAA;AACjB,OAAA,CAAA,CAAA;AACE,KAAA;AAAqB,IAAA,OACtB,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACH,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -49,6 +49,8 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
|
|
|
49
49
|
type: StringConstructor;
|
|
50
50
|
default: string;
|
|
51
51
|
};
|
|
52
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
53
|
+
color: StringConstructor;
|
|
52
54
|
}, {
|
|
53
55
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
54
56
|
name: {
|
|
@@ -59,6 +61,8 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
|
|
|
59
61
|
type: StringConstructor;
|
|
60
62
|
default: string;
|
|
61
63
|
};
|
|
64
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
65
|
+
color: StringConstructor;
|
|
62
66
|
}>> & {
|
|
63
67
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
64
68
|
}>>;
|
|
@@ -174,6 +178,8 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
|
|
|
174
178
|
type: StringConstructor;
|
|
175
179
|
default: string;
|
|
176
180
|
};
|
|
181
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
182
|
+
color: StringConstructor;
|
|
177
183
|
}>>, {
|
|
178
184
|
type: string;
|
|
179
185
|
}>;
|
|
@@ -49,6 +49,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
type: StringConstructor;
|
|
50
50
|
default: string;
|
|
51
51
|
};
|
|
52
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
53
|
+
color: StringConstructor;
|
|
52
54
|
}, {
|
|
53
55
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
54
56
|
name: {
|
|
@@ -59,6 +61,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
61
|
type: StringConstructor;
|
|
60
62
|
default: string;
|
|
61
63
|
};
|
|
64
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
65
|
+
color: StringConstructor;
|
|
62
66
|
}>> & {
|
|
63
67
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
64
68
|
}>>;
|
|
@@ -174,6 +178,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
174
178
|
type: StringConstructor;
|
|
175
179
|
default: string;
|
|
176
180
|
};
|
|
181
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
182
|
+
color: StringConstructor;
|
|
177
183
|
}>>, {
|
|
178
184
|
type: string;
|
|
179
185
|
}>;
|
|
@@ -7,6 +7,8 @@ export declare const HzztIcon: import("hzzt-plus/es/utils").SFCWithInstall<impor
|
|
|
7
7
|
type: StringConstructor;
|
|
8
8
|
default: string;
|
|
9
9
|
};
|
|
10
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
color: StringConstructor;
|
|
10
12
|
}, {
|
|
11
13
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
14
|
name: {
|
|
@@ -17,6 +19,8 @@ export declare const HzztIcon: import("hzzt-plus/es/utils").SFCWithInstall<impor
|
|
|
17
19
|
type: StringConstructor;
|
|
18
20
|
default: string;
|
|
19
21
|
};
|
|
22
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
color: StringConstructor;
|
|
20
24
|
}>> & {
|
|
21
25
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
22
26
|
}>>;
|
|
@@ -132,6 +136,8 @@ export declare const HzztIcon: import("hzzt-plus/es/utils").SFCWithInstall<impor
|
|
|
132
136
|
type: StringConstructor;
|
|
133
137
|
default: string;
|
|
134
138
|
};
|
|
139
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
140
|
+
color: StringConstructor;
|
|
135
141
|
}>>, {
|
|
136
142
|
type: string;
|
|
137
143
|
}>> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, computed, openBlock, createBlock, unref,
|
|
1
|
+
import { defineComponent, useAttrs, computed, openBlock, createBlock, unref, mergeProps, withCtx, resolveDynamicComponent } from 'vue';
|
|
2
2
|
import { ElIcon } from 'element-plus';
|
|
3
3
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
@@ -15,19 +15,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
type: {
|
|
16
16
|
type: String,
|
|
17
17
|
default: "el"
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
size: [String, Number],
|
|
20
|
+
color: String
|
|
19
21
|
},
|
|
20
22
|
setup(__props) {
|
|
21
23
|
const props = __props;
|
|
22
24
|
const attrs = useAttrs();
|
|
23
25
|
const componentName = computed(() => `hzzt-${props.type}-${props.name}`);
|
|
24
26
|
return (_ctx, _cache) => {
|
|
25
|
-
return openBlock(), createBlock(unref(ElIcon),
|
|
27
|
+
return openBlock(), createBlock(unref(ElIcon), mergeProps(unref(attrs), {
|
|
28
|
+
size: __props.size,
|
|
29
|
+
color: __props.color
|
|
30
|
+
}), {
|
|
26
31
|
default: withCtx(() => [
|
|
27
32
|
(openBlock(), createBlock(resolveDynamicComponent(unref(componentName))))
|
|
28
33
|
]),
|
|
29
34
|
_: 1
|
|
30
|
-
}, 16);
|
|
35
|
+
}, 16, ["size", "color"]);
|
|
31
36
|
};
|
|
32
37
|
}
|
|
33
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/icon/src/index.vue"],"sourcesContent":["<template>\n <ElIcon v-bind=\"attrs\">\n <component :is=\"componentName\" />\n </ElIcon>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { ElIcon } from 'element-plus'\n\ndefineOptions({\n name: 'HzztIcon',\n})\n\nconst props = defineProps({\n name: {\n type: String,\n required: true,\n },\n type: {\n type: String,\n default: 'el',\n },\n})\n\nconst attrs = useAttrs()\n\nconst componentName = computed(() => `hzzt-${props.type}-${props.name}`)\n</script>\n"],"names":[],"mappings":";;;;mCAUc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/icon/src/index.vue"],"sourcesContent":["<template>\n <ElIcon v-bind=\"attrs\" :size=\"size\" :color=\"color\">\n <component :is=\"componentName\" />\n </ElIcon>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { ElIcon } from 'element-plus'\n\ndefineOptions({\n name: 'HzztIcon',\n})\n\nconst props = defineProps({\n name: {\n type: String,\n required: true,\n },\n type: {\n type: String,\n default: 'el',\n },\n size: [String, Number],\n color: String,\n})\n\nconst attrs = useAttrs()\n\nconst componentName = computed(() => `hzzt-${props.type}-${props.name}`)\n</script>\n"],"names":[],"mappings":";;;;mCAUc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;AAeA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM,CAAA,KAAA,EAAQ,MAAM,IAAI,CAAA,CAAA,EAAI,KAAM,CAAA,IAAI,CAAE,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,6 +7,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: StringConstructor;
|
|
8
8
|
default: string;
|
|
9
9
|
};
|
|
10
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
color: StringConstructor;
|
|
10
12
|
}, {
|
|
11
13
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
14
|
name: {
|
|
@@ -17,6 +19,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
19
|
type: StringConstructor;
|
|
18
20
|
default: string;
|
|
19
21
|
};
|
|
22
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
color: StringConstructor;
|
|
20
24
|
}>> & {
|
|
21
25
|
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
22
26
|
}>>;
|
|
@@ -132,6 +136,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
136
|
type: StringConstructor;
|
|
133
137
|
default: string;
|
|
134
138
|
};
|
|
139
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
140
|
+
color: StringConstructor;
|
|
135
141
|
}>>, {
|
|
136
142
|
type: string;
|
|
137
143
|
}>;
|
package/es/components/index.mjs
CHANGED
|
@@ -29,6 +29,6 @@ export { selectTextareaEmits, selectTextareaProps } from './select-textarea/src/
|
|
|
29
29
|
export { inputRangeEmits, inputRangeProps } from './input-range/src/input-range.mjs';
|
|
30
30
|
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
|
|
31
31
|
export { selectEmits, selectProps } from './select/src/select.mjs';
|
|
32
|
-
export { clickInputEmits, clickInputProps } from './click-input/src/click-
|
|
33
|
-
export { lazyListEmits, lazyListProps } from './lazy-list/src/lazy-
|
|
32
|
+
export { clickInputEmits, clickInputProps } from './click-input/src/click-input.mjs';
|
|
33
|
+
export { lazyListEmits, lazyListProps } from './lazy-list/src/lazy-list2.mjs';
|
|
34
34
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import LazyList from './src/lazy-
|
|
3
|
-
export { lazyListEmits, lazyListProps } from './src/lazy-
|
|
2
|
+
import LazyList from './src/lazy-list.mjs';
|
|
3
|
+
export { lazyListEmits, lazyListProps } from './src/lazy-list2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const HzztLazyList = withInstall(LazyList);
|