mortise-tenon-design 0.0.15 → 0.0.17
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/es/components/expand-box/src/expand-box.css +1 -1
- package/es/components/expand-box/src/expand-box.vue.mjs +1 -1
- package/es/components/expand-box/src/expand-box.vue2.mjs +27 -85
- package/es/components/expand-box/src/expand-box.vue2.mjs.map +1 -1
- package/lib/components/expand-box/src/expand-box.css +1 -1
- package/lib/components/expand-box/src/expand-box.vue.js +1 -1
- package/lib/components/expand-box/src/expand-box.vue2.js +1 -1
- package/lib/components/expand-box/src/expand-box.vue2.js.map +1 -1
- package/package.json +2 -2
- package/es/components/expand-box/index.d.ts +0 -91
- package/es/components/expand-box/src/expand-box.d.ts +0 -19
- package/es/components/expand-box/src/expand-box.vue.d.ts +0 -68
- package/es/components/index.d.ts +0 -1
- package/lib/components/expand-box/index.d.ts +0 -91
- package/lib/components/expand-box/src/expand-box.d.ts +0 -19
- package/lib/components/expand-box/src/expand-box.vue.d.ts +0 -68
- package/lib/components/index.d.ts +0 -1
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
.mt-expand-box[data-v-c6fd30b0]{overflow:hidden}.mt-expand-transition[data-v-c6fd30b0]{transition:height var(--6beda65b) ease-in-out}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import o from "./expand-box.vue2.mjs";
|
2
2
|
/* empty css */
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
4
|
-
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c6fd30b0"]]);
|
5
5
|
export {
|
6
6
|
f as default
|
7
7
|
};
|
@@ -1,98 +1,40 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import {
|
3
|
-
|
1
|
+
import { defineComponent as m, useCssVars as p, computed as a, ref as i, onMounted as d, openBlock as f, createElementBlock as g, normalizeClass as v, normalizeStyle as R, createElementVNode as b, renderSlot as x } from "vue";
|
2
|
+
import { useResizeObserver as y } from "@vueuse/core";
|
3
|
+
import { debounce as z } from "lodash-es";
|
4
|
+
const k = /* @__PURE__ */ m({
|
4
5
|
__name: "expand-box",
|
5
6
|
props: {
|
6
7
|
open: { type: Boolean, default: !1 },
|
7
8
|
targetRange: { default: 0 },
|
8
|
-
transitionTime: { default:
|
9
|
-
buttonStyle: {},
|
10
|
-
placement: { default: "bottom" }
|
9
|
+
transitionTime: { default: 200 }
|
11
10
|
},
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
overflow: "hidden",
|
16
|
-
height: `${!r.value || t.value ? f.value : u.targetRange}px`,
|
17
|
-
transition: `height ${u.transitionTime} ease-in-out`
|
11
|
+
setup(l) {
|
12
|
+
p((e) => ({
|
13
|
+
"6beda65b": u.value
|
18
14
|
}));
|
19
|
-
|
20
|
-
() => u.open,
|
21
|
-
(e) => {
|
22
|
-
t.value = e;
|
23
|
-
},
|
24
|
-
{ immediate: !0 }
|
25
|
-
);
|
26
|
-
function k(e) {
|
27
|
-
b("change", e), b("update:open", e), t.value = e;
|
28
|
-
}
|
29
|
-
function m() {
|
30
|
-
k(!t.value);
|
31
|
-
}
|
32
|
-
const o = g(() => ({
|
33
|
-
hasExtendMore: t.value,
|
34
|
-
isOutRange: r.value,
|
35
|
-
toggleExtendMore: m
|
36
|
-
}));
|
37
|
-
function $() {
|
15
|
+
const t = l, u = a(() => `${t.transitionTime}ms`), n = i(0), s = a(() => n.value > t.targetRange), c = a(() => ({ height: `${!s.value || t.open ? n.value : t.targetRange}px` })), o = i(), r = z(() => {
|
38
16
|
var e;
|
39
|
-
|
40
|
-
}
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
changeExtendMore: k,
|
51
|
-
toggleExtendMore: m
|
52
|
-
}), (e, T) => (c(), d("div", null, [
|
53
|
-
e.placement === "top" ? (c(), d("div", {
|
54
|
-
key: 0,
|
55
|
-
style: h(y.value)
|
56
|
-
}, [
|
57
|
-
v("div", {
|
58
|
-
ref_key: "contentRef",
|
59
|
-
ref: i
|
60
|
-
}, [
|
61
|
-
a(e.$slots, "content", l(s(o.value)), void 0, !0)
|
62
|
-
], 512)
|
63
|
-
], 4)) : R("", !0),
|
64
|
-
a(e.$slots, "custom", l(s(o.value)), () => [
|
65
|
-
v("div", P, [
|
66
|
-
a(e.$slots, "before", l(s(o.value)), void 0, !0),
|
67
|
-
r.value ? (c(), d("div", {
|
68
|
-
key: 0,
|
69
|
-
class: "extend-button",
|
70
|
-
style: h(e.buttonStyle),
|
71
|
-
onClick: m
|
72
|
-
}, [
|
73
|
-
a(e.$slots, "button", l(s(o.value)), void 0, !0),
|
74
|
-
v("div", {
|
75
|
-
class: N(["btn-icon", { active: t.value }])
|
76
|
-
}, " ﹀ ", 2)
|
77
|
-
], 4)) : R("", !0),
|
78
|
-
a(e.$slots, "after", l(s(o.value)), void 0, !0)
|
79
|
-
])
|
80
|
-
], !0),
|
81
|
-
e.placement === "bottom" ? (c(), d("div", {
|
82
|
-
key: 1,
|
83
|
-
style: h(y.value)
|
17
|
+
n.value = (e = o.value) == null ? void 0 : e.offsetHeight;
|
18
|
+
}, t.transitionTime);
|
19
|
+
return y(o, r), d(() => {
|
20
|
+
r();
|
21
|
+
}), (e, _) => (f(), g("div", {
|
22
|
+
class: v(["mt-expand-box", { "mt-expand-transition": !!e.transitionTime }]),
|
23
|
+
style: R(c.value)
|
24
|
+
}, [
|
25
|
+
b("div", {
|
26
|
+
ref_key: "contentRef",
|
27
|
+
ref: o
|
84
28
|
}, [
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
},
|
89
|
-
|
90
|
-
|
91
|
-
], 4)) : R("", !0)
|
92
|
-
]));
|
29
|
+
x(e.$slots, "default", {
|
30
|
+
open: e.open,
|
31
|
+
isOutRange: s.value
|
32
|
+
}, void 0, !0)
|
33
|
+
], 512)
|
34
|
+
], 6));
|
93
35
|
}
|
94
36
|
});
|
95
37
|
export {
|
96
|
-
|
38
|
+
k as default
|
97
39
|
};
|
98
40
|
//# sourceMappingURL=expand-box.vue2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"expand-box.vue2.mjs","sources":["../../../../../../packages/components/expand-box/src/expand-box.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type {
|
1
|
+
{"version":3,"file":"expand-box.vue2.mjs","sources":["../../../../../../packages/components/expand-box/src/expand-box.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { ExpandBoxProps } from './expand-box';\r\nimport { useResizeObserver } from '@vueuse/core';\r\nimport { debounce } from 'lodash-es';\r\nimport { computed, onMounted, ref } from 'vue';\r\n\r\nconst props = withDefaults(defineProps<ExpandBoxProps>(), {\r\n open: false,\r\n targetRange: 0,\r\n transitionTime: 200,\r\n});\r\n\r\nconst transitionDuration = computed(() => `${props.transitionTime}ms`);\r\n\r\n/** 内容的范围 */\r\nconst contentRange = ref(0);\r\n\r\n/** 是否超出目标范围 */\r\nconst isOutRange = computed(() => contentRange.value > props.targetRange);\r\n\r\n/** 展开或收起后内容样式 */\r\nconst contentStyle = computed(() => {\r\n const size = !isOutRange.value || props.open ? contentRange.value : props.targetRange;\r\n return { height: `${size}px` };\r\n});\r\n\r\n/** 内容实例 */\r\nconst contentRef = ref();\r\n\r\n/** 获取内容实际范围 */\r\nconst getContentRange = debounce(() => {\r\n contentRange.value = contentRef.value?.offsetHeight;\r\n}, props.transitionTime);\r\n\r\n// 监听内容高度变化\r\nuseResizeObserver(contentRef, getContentRange);\r\n\r\n// 初始化内容\r\nonMounted(() => {\r\n getContentRange();\r\n});\r\n</script>\r\n\r\n<template>\r\n <div\r\n class=\"mt-expand-box\"\r\n :class=\"{ 'mt-expand-transition': !!transitionTime }\"\r\n :style=\"contentStyle\"\r\n >\r\n <div ref=\"contentRef\">\r\n <slot :open=\"open\" :is-out-range=\"isOutRange\" />\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style lang=\"scss\" scoped>\r\n.mt-expand-box {\r\n overflow: hidden;\r\n}\r\n\r\n.mt-expand-transition {\r\n transition: height v-bind(transitionDuration) ease-in-out;\r\n}\r\n</style>\r\n"],"names":["props","__props","transitionDuration","computed","contentRange","ref","isOutRange","contentStyle","contentRef","getContentRange","debounce","_a","useResizeObserver","onMounted"],"mappings":";;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GAMRC,IAAqBC,EAAS,MAAM,GAAGH,EAAM,cAAc,IAAI,GAG/DI,IAAeC,EAAI,CAAC,GAGpBC,IAAaH,EAAS,MAAMC,EAAa,QAAQJ,EAAM,WAAW,GAGlEO,IAAeJ,EAAS,OAErB,EAAE,QAAQ,GADJ,CAACG,EAAW,SAASN,EAAM,OAAOI,EAAa,QAAQJ,EAAM,WAClD,KAAK,EAC9B,GAGKQ,IAAaH,KAGbI,IAAkBC,EAAS,MAAM;;AACxB,MAAAN,EAAA,SAAQO,IAAAH,EAAW,UAAX,gBAAAG,EAAkB;AAAA,IAAA,GACtCX,EAAM,cAAc;AAGvB,WAAAY,EAAkBJ,GAAYC,CAAe,GAG7CI,EAAU,MAAM;AACE,MAAAJ;IAAA,CACjB;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
.mt-expand-box[data-v-c6fd30b0]{overflow:hidden}.mt-expand-transition[data-v-c6fd30b0]{transition:height var(--6beda65b) ease-in-out}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./expand-box.vue2.js");;/* empty css */const t=require("../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./expand-box.vue2.js");;/* empty css */const t=require("../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-c6fd30b0"]]);exports.default=u;
|
2
2
|
//# sourceMappingURL=expand-box.vue.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@vueuse/core"),d=require("lodash-es"),p=e.defineComponent({__name:"expand-box",props:{open:{type:Boolean,default:!1},targetRange:{default:0},transitionTime:{default:200}},setup(i){e.useCssVars(t=>({"6beda65b":u.value}));const n=i,u=e.computed(()=>`${n.transitionTime}ms`),o=e.ref(0),s=e.computed(()=>o.value>n.targetRange),l=e.computed(()=>({height:`${!s.value||n.open?o.value:n.targetRange}px`})),a=e.ref(),r=d.debounce(()=>{var t;o.value=(t=a.value)==null?void 0:t.offsetHeight},n.transitionTime);return c.useResizeObserver(a,r),e.onMounted(()=>{r()}),(t,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mt-expand-box",{"mt-expand-transition":!!t.transitionTime}]),style:e.normalizeStyle(l.value)},[e.createElementVNode("div",{ref_key:"contentRef",ref:a},[e.renderSlot(t.$slots,"default",{open:t.open,isOutRange:s.value},void 0,!0)],512)],6))}});exports.default=p;
|
2
2
|
//# sourceMappingURL=expand-box.vue2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"expand-box.vue2.js","sources":["../../../../../../packages/components/expand-box/src/expand-box.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type {
|
1
|
+
{"version":3,"file":"expand-box.vue2.js","sources":["../../../../../../packages/components/expand-box/src/expand-box.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { ExpandBoxProps } from './expand-box';\r\nimport { useResizeObserver } from '@vueuse/core';\r\nimport { debounce } from 'lodash-es';\r\nimport { computed, onMounted, ref } from 'vue';\r\n\r\nconst props = withDefaults(defineProps<ExpandBoxProps>(), {\r\n open: false,\r\n targetRange: 0,\r\n transitionTime: 200,\r\n});\r\n\r\nconst transitionDuration = computed(() => `${props.transitionTime}ms`);\r\n\r\n/** 内容的范围 */\r\nconst contentRange = ref(0);\r\n\r\n/** 是否超出目标范围 */\r\nconst isOutRange = computed(() => contentRange.value > props.targetRange);\r\n\r\n/** 展开或收起后内容样式 */\r\nconst contentStyle = computed(() => {\r\n const size = !isOutRange.value || props.open ? contentRange.value : props.targetRange;\r\n return { height: `${size}px` };\r\n});\r\n\r\n/** 内容实例 */\r\nconst contentRef = ref();\r\n\r\n/** 获取内容实际范围 */\r\nconst getContentRange = debounce(() => {\r\n contentRange.value = contentRef.value?.offsetHeight;\r\n}, props.transitionTime);\r\n\r\n// 监听内容高度变化\r\nuseResizeObserver(contentRef, getContentRange);\r\n\r\n// 初始化内容\r\nonMounted(() => {\r\n getContentRange();\r\n});\r\n</script>\r\n\r\n<template>\r\n <div\r\n class=\"mt-expand-box\"\r\n :class=\"{ 'mt-expand-transition': !!transitionTime }\"\r\n :style=\"contentStyle\"\r\n >\r\n <div ref=\"contentRef\">\r\n <slot :open=\"open\" :is-out-range=\"isOutRange\" />\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style lang=\"scss\" scoped>\r\n.mt-expand-box {\r\n overflow: hidden;\r\n}\r\n\r\n.mt-expand-transition {\r\n transition: height v-bind(transitionDuration) ease-in-out;\r\n}\r\n</style>\r\n"],"names":["props","__props","transitionDuration","computed","contentRange","ref","isOutRange","contentStyle","contentRef","getContentRange","debounce","_a","useResizeObserver","onMounted"],"mappings":"0WAMA,MAAMA,EAAQC,EAMRC,EAAqBC,EAAAA,SAAS,IAAM,GAAGH,EAAM,cAAc,IAAI,EAG/DI,EAAeC,MAAI,CAAC,EAGpBC,EAAaH,EAAAA,SAAS,IAAMC,EAAa,MAAQJ,EAAM,WAAW,EAGlEO,EAAeJ,EAAAA,SAAS,KAErB,CAAE,OAAQ,GADJ,CAACG,EAAW,OAASN,EAAM,KAAOI,EAAa,MAAQJ,EAAM,WAClD,IAAK,EAC9B,EAGKQ,EAAaH,EAAAA,MAGbI,EAAkBC,EAAAA,SAAS,IAAM,OACxBN,EAAA,OAAQO,EAAAH,EAAW,QAAX,YAAAG,EAAkB,YAAA,EACtCX,EAAM,cAAc,EAGvBY,OAAAA,oBAAkBJ,EAAYC,CAAe,EAG7CI,EAAAA,UAAU,IAAM,CACEJ,GAAA,CACjB"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "mortise-tenon-design",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.17",
|
5
5
|
"description": "榫卯组件库",
|
6
6
|
"author": "nixwai",
|
7
7
|
"license": "ISC",
|
@@ -11,7 +11,7 @@
|
|
11
11
|
},
|
12
12
|
"main": "lib/index.js",
|
13
13
|
"module": "es/index.mjs",
|
14
|
-
"types": "
|
14
|
+
"types": "types/index.d.ts",
|
15
15
|
"files": ["es", "lib"],
|
16
16
|
"peerDependencies": {
|
17
17
|
"vue": "^3.4.0"
|
@@ -1,91 +0,0 @@
|
|
1
|
-
export declare const MtExpandBox: {
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./src/expand-box').ExpandBoxProps> & Readonly<{
|
3
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
4
|
-
onChange?: ((value: boolean) => any) | undefined;
|
5
|
-
}>, {
|
6
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
7
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
8
|
-
changeExtendMore: (value: boolean) => void;
|
9
|
-
toggleExtendMore: () => void;
|
10
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
11
|
-
"update:open": (open: boolean) => any;
|
12
|
-
change: (value: boolean) => any;
|
13
|
-
}, import('vue').PublicProps, {
|
14
|
-
open: boolean;
|
15
|
-
targetRange: number;
|
16
|
-
transitionTime: string;
|
17
|
-
placement: "top" | "bottom";
|
18
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
19
|
-
P: {};
|
20
|
-
B: {};
|
21
|
-
D: {};
|
22
|
-
C: {};
|
23
|
-
M: {};
|
24
|
-
Defaults: {};
|
25
|
-
}, Readonly<import('./src/expand-box').ExpandBoxProps> & Readonly<{
|
26
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
27
|
-
onChange?: ((value: boolean) => any) | undefined;
|
28
|
-
}>, {
|
29
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
30
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
31
|
-
changeExtendMore: (value: boolean) => void;
|
32
|
-
toggleExtendMore: () => void;
|
33
|
-
}, {}, {}, {}, {
|
34
|
-
open: boolean;
|
35
|
-
targetRange: number;
|
36
|
-
transitionTime: string;
|
37
|
-
placement: "top" | "bottom";
|
38
|
-
}>;
|
39
|
-
__isFragment?: never;
|
40
|
-
__isTeleport?: never;
|
41
|
-
__isSuspense?: never;
|
42
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./src/expand-box').ExpandBoxProps> & Readonly<{
|
43
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
44
|
-
onChange?: ((value: boolean) => any) | undefined;
|
45
|
-
}>, {
|
46
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
47
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
48
|
-
changeExtendMore: (value: boolean) => void;
|
49
|
-
toggleExtendMore: () => void;
|
50
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
51
|
-
"update:open": (open: boolean) => any;
|
52
|
-
change: (value: boolean) => any;
|
53
|
-
}, string, {
|
54
|
-
open: boolean;
|
55
|
-
targetRange: number;
|
56
|
-
transitionTime: string;
|
57
|
-
placement: "top" | "bottom";
|
58
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
59
|
-
$slots: {
|
60
|
-
content?(_: {
|
61
|
-
hasExtendMore: boolean;
|
62
|
-
isOutRange: boolean;
|
63
|
-
toggleExtendMore: () => void;
|
64
|
-
}): any;
|
65
|
-
content?(_: {
|
66
|
-
hasExtendMore: boolean;
|
67
|
-
isOutRange: boolean;
|
68
|
-
toggleExtendMore: () => void;
|
69
|
-
}): any;
|
70
|
-
custom?(_: {
|
71
|
-
hasExtendMore: boolean;
|
72
|
-
isOutRange: boolean;
|
73
|
-
toggleExtendMore: () => void;
|
74
|
-
}): any;
|
75
|
-
before?(_: {
|
76
|
-
hasExtendMore: boolean;
|
77
|
-
isOutRange: boolean;
|
78
|
-
toggleExtendMore: () => void;
|
79
|
-
}): any;
|
80
|
-
button?(_: {
|
81
|
-
hasExtendMore: boolean;
|
82
|
-
isOutRange: boolean;
|
83
|
-
toggleExtendMore: () => void;
|
84
|
-
}): any;
|
85
|
-
after?(_: {
|
86
|
-
hasExtendMore: boolean;
|
87
|
-
isOutRange: boolean;
|
88
|
-
toggleExtendMore: () => void;
|
89
|
-
}): any;
|
90
|
-
};
|
91
|
-
});
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { CSSProperties } from 'vue';
|
2
|
-
export interface ExpandBoxProps {
|
3
|
-
/** 控制是否展开(v-model) */
|
4
|
-
open?: boolean;
|
5
|
-
/** 达到可调整的目标范围(px) */
|
6
|
-
targetRange?: number;
|
7
|
-
/** 过渡时间 */
|
8
|
-
transitionTime?: string;
|
9
|
-
/** 展开按钮样式 */
|
10
|
-
buttonStyle?: CSSProperties;
|
11
|
-
/** 展开的位置 */
|
12
|
-
placement?: 'top' | 'bottom';
|
13
|
-
}
|
14
|
-
export interface ExpandBoxEmits {
|
15
|
-
/** open绑定修改 */
|
16
|
-
(e: 'update:open', open: boolean): void;
|
17
|
-
/** 展开状态变更 */
|
18
|
-
(e: 'change', value: boolean): void;
|
19
|
-
}
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import { ExpandBoxProps } from './expand-box';
|
2
|
-
/** 修改是否展开更多 */
|
3
|
-
declare function changeExtendMore(value: boolean): void;
|
4
|
-
/** 切换是否展开更多 */
|
5
|
-
declare function toggleExtendMore(): void;
|
6
|
-
declare function __VLS_template(): {
|
7
|
-
slots: {
|
8
|
-
content?(_: {
|
9
|
-
hasExtendMore: boolean;
|
10
|
-
isOutRange: boolean;
|
11
|
-
toggleExtendMore: typeof toggleExtendMore;
|
12
|
-
}): any;
|
13
|
-
content?(_: {
|
14
|
-
hasExtendMore: boolean;
|
15
|
-
isOutRange: boolean;
|
16
|
-
toggleExtendMore: typeof toggleExtendMore;
|
17
|
-
}): any;
|
18
|
-
custom?(_: {
|
19
|
-
hasExtendMore: boolean;
|
20
|
-
isOutRange: boolean;
|
21
|
-
toggleExtendMore: typeof toggleExtendMore;
|
22
|
-
}): any;
|
23
|
-
before?(_: {
|
24
|
-
hasExtendMore: boolean;
|
25
|
-
isOutRange: boolean;
|
26
|
-
toggleExtendMore: typeof toggleExtendMore;
|
27
|
-
}): any;
|
28
|
-
button?(_: {
|
29
|
-
hasExtendMore: boolean;
|
30
|
-
isOutRange: boolean;
|
31
|
-
toggleExtendMore: typeof toggleExtendMore;
|
32
|
-
}): any;
|
33
|
-
after?(_: {
|
34
|
-
hasExtendMore: boolean;
|
35
|
-
isOutRange: boolean;
|
36
|
-
toggleExtendMore: typeof toggleExtendMore;
|
37
|
-
}): any;
|
38
|
-
};
|
39
|
-
refs: {
|
40
|
-
contentRef: HTMLDivElement;
|
41
|
-
};
|
42
|
-
attrs: Partial<{}>;
|
43
|
-
};
|
44
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
45
|
-
declare const __VLS_component: import('vue').DefineComponent<ExpandBoxProps, {
|
46
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
47
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
48
|
-
changeExtendMore: typeof changeExtendMore;
|
49
|
-
toggleExtendMore: typeof toggleExtendMore;
|
50
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
51
|
-
"update:open": (open: boolean) => any;
|
52
|
-
change: (value: boolean) => any;
|
53
|
-
}, string, import('vue').PublicProps, Readonly<ExpandBoxProps> & Readonly<{
|
54
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
55
|
-
onChange?: ((value: boolean) => any) | undefined;
|
56
|
-
}>, {
|
57
|
-
open: boolean;
|
58
|
-
targetRange: number;
|
59
|
-
transitionTime: string;
|
60
|
-
placement: "top" | "bottom";
|
61
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
62
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
63
|
-
export default _default;
|
64
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
65
|
-
new (): {
|
66
|
-
$slots: S;
|
67
|
-
};
|
68
|
-
};
|
package/es/components/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './expand-box';
|
@@ -1,91 +0,0 @@
|
|
1
|
-
export declare const MtExpandBox: {
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./src/expand-box').ExpandBoxProps> & Readonly<{
|
3
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
4
|
-
onChange?: ((value: boolean) => any) | undefined;
|
5
|
-
}>, {
|
6
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
7
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
8
|
-
changeExtendMore: (value: boolean) => void;
|
9
|
-
toggleExtendMore: () => void;
|
10
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
11
|
-
"update:open": (open: boolean) => any;
|
12
|
-
change: (value: boolean) => any;
|
13
|
-
}, import('vue').PublicProps, {
|
14
|
-
open: boolean;
|
15
|
-
targetRange: number;
|
16
|
-
transitionTime: string;
|
17
|
-
placement: "top" | "bottom";
|
18
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
19
|
-
P: {};
|
20
|
-
B: {};
|
21
|
-
D: {};
|
22
|
-
C: {};
|
23
|
-
M: {};
|
24
|
-
Defaults: {};
|
25
|
-
}, Readonly<import('./src/expand-box').ExpandBoxProps> & Readonly<{
|
26
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
27
|
-
onChange?: ((value: boolean) => any) | undefined;
|
28
|
-
}>, {
|
29
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
30
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
31
|
-
changeExtendMore: (value: boolean) => void;
|
32
|
-
toggleExtendMore: () => void;
|
33
|
-
}, {}, {}, {}, {
|
34
|
-
open: boolean;
|
35
|
-
targetRange: number;
|
36
|
-
transitionTime: string;
|
37
|
-
placement: "top" | "bottom";
|
38
|
-
}>;
|
39
|
-
__isFragment?: never;
|
40
|
-
__isTeleport?: never;
|
41
|
-
__isSuspense?: never;
|
42
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./src/expand-box').ExpandBoxProps> & Readonly<{
|
43
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
44
|
-
onChange?: ((value: boolean) => any) | undefined;
|
45
|
-
}>, {
|
46
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
47
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
48
|
-
changeExtendMore: (value: boolean) => void;
|
49
|
-
toggleExtendMore: () => void;
|
50
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
51
|
-
"update:open": (open: boolean) => any;
|
52
|
-
change: (value: boolean) => any;
|
53
|
-
}, string, {
|
54
|
-
open: boolean;
|
55
|
-
targetRange: number;
|
56
|
-
transitionTime: string;
|
57
|
-
placement: "top" | "bottom";
|
58
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
59
|
-
$slots: {
|
60
|
-
content?(_: {
|
61
|
-
hasExtendMore: boolean;
|
62
|
-
isOutRange: boolean;
|
63
|
-
toggleExtendMore: () => void;
|
64
|
-
}): any;
|
65
|
-
content?(_: {
|
66
|
-
hasExtendMore: boolean;
|
67
|
-
isOutRange: boolean;
|
68
|
-
toggleExtendMore: () => void;
|
69
|
-
}): any;
|
70
|
-
custom?(_: {
|
71
|
-
hasExtendMore: boolean;
|
72
|
-
isOutRange: boolean;
|
73
|
-
toggleExtendMore: () => void;
|
74
|
-
}): any;
|
75
|
-
before?(_: {
|
76
|
-
hasExtendMore: boolean;
|
77
|
-
isOutRange: boolean;
|
78
|
-
toggleExtendMore: () => void;
|
79
|
-
}): any;
|
80
|
-
button?(_: {
|
81
|
-
hasExtendMore: boolean;
|
82
|
-
isOutRange: boolean;
|
83
|
-
toggleExtendMore: () => void;
|
84
|
-
}): any;
|
85
|
-
after?(_: {
|
86
|
-
hasExtendMore: boolean;
|
87
|
-
isOutRange: boolean;
|
88
|
-
toggleExtendMore: () => void;
|
89
|
-
}): any;
|
90
|
-
};
|
91
|
-
});
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { CSSProperties } from 'vue';
|
2
|
-
export interface ExpandBoxProps {
|
3
|
-
/** 控制是否展开(v-model) */
|
4
|
-
open?: boolean;
|
5
|
-
/** 达到可调整的目标范围(px) */
|
6
|
-
targetRange?: number;
|
7
|
-
/** 过渡时间 */
|
8
|
-
transitionTime?: string;
|
9
|
-
/** 展开按钮样式 */
|
10
|
-
buttonStyle?: CSSProperties;
|
11
|
-
/** 展开的位置 */
|
12
|
-
placement?: 'top' | 'bottom';
|
13
|
-
}
|
14
|
-
export interface ExpandBoxEmits {
|
15
|
-
/** open绑定修改 */
|
16
|
-
(e: 'update:open', open: boolean): void;
|
17
|
-
/** 展开状态变更 */
|
18
|
-
(e: 'change', value: boolean): void;
|
19
|
-
}
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import { ExpandBoxProps } from './expand-box';
|
2
|
-
/** 修改是否展开更多 */
|
3
|
-
declare function changeExtendMore(value: boolean): void;
|
4
|
-
/** 切换是否展开更多 */
|
5
|
-
declare function toggleExtendMore(): void;
|
6
|
-
declare function __VLS_template(): {
|
7
|
-
slots: {
|
8
|
-
content?(_: {
|
9
|
-
hasExtendMore: boolean;
|
10
|
-
isOutRange: boolean;
|
11
|
-
toggleExtendMore: typeof toggleExtendMore;
|
12
|
-
}): any;
|
13
|
-
content?(_: {
|
14
|
-
hasExtendMore: boolean;
|
15
|
-
isOutRange: boolean;
|
16
|
-
toggleExtendMore: typeof toggleExtendMore;
|
17
|
-
}): any;
|
18
|
-
custom?(_: {
|
19
|
-
hasExtendMore: boolean;
|
20
|
-
isOutRange: boolean;
|
21
|
-
toggleExtendMore: typeof toggleExtendMore;
|
22
|
-
}): any;
|
23
|
-
before?(_: {
|
24
|
-
hasExtendMore: boolean;
|
25
|
-
isOutRange: boolean;
|
26
|
-
toggleExtendMore: typeof toggleExtendMore;
|
27
|
-
}): any;
|
28
|
-
button?(_: {
|
29
|
-
hasExtendMore: boolean;
|
30
|
-
isOutRange: boolean;
|
31
|
-
toggleExtendMore: typeof toggleExtendMore;
|
32
|
-
}): any;
|
33
|
-
after?(_: {
|
34
|
-
hasExtendMore: boolean;
|
35
|
-
isOutRange: boolean;
|
36
|
-
toggleExtendMore: typeof toggleExtendMore;
|
37
|
-
}): any;
|
38
|
-
};
|
39
|
-
refs: {
|
40
|
-
contentRef: HTMLDivElement;
|
41
|
-
};
|
42
|
-
attrs: Partial<{}>;
|
43
|
-
};
|
44
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
45
|
-
declare const __VLS_component: import('vue').DefineComponent<ExpandBoxProps, {
|
46
|
-
isOutRange: import('vue').ComputedRef<boolean>;
|
47
|
-
hasExtendMore: import('vue').Ref<boolean, boolean>;
|
48
|
-
changeExtendMore: typeof changeExtendMore;
|
49
|
-
toggleExtendMore: typeof toggleExtendMore;
|
50
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
51
|
-
"update:open": (open: boolean) => any;
|
52
|
-
change: (value: boolean) => any;
|
53
|
-
}, string, import('vue').PublicProps, Readonly<ExpandBoxProps> & Readonly<{
|
54
|
-
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
55
|
-
onChange?: ((value: boolean) => any) | undefined;
|
56
|
-
}>, {
|
57
|
-
open: boolean;
|
58
|
-
targetRange: number;
|
59
|
-
transitionTime: string;
|
60
|
-
placement: "top" | "bottom";
|
61
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
62
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
63
|
-
export default _default;
|
64
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
65
|
-
new (): {
|
66
|
-
$slots: S;
|
67
|
-
};
|
68
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './expand-box';
|