@king-one/antdv 1.0.0
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 +7 -0
- package/cdn/index.cdn.js +16 -0
- package/cdn/index.cdn.js.map +1 -0
- package/cdn/index.cdn.mjs +16 -0
- package/cdn/index.cdn.mjs.map +1 -0
- package/cdn/index.css +1 -0
- package/es/components/base/style/index.d.ts +1 -0
- package/es/components/base/style/index.mjs +2 -0
- package/es/components/base/style/index.mjs.map +1 -0
- package/es/components/form/component/form.d.ts +10 -0
- package/es/components/form/component/form.mjs +11 -0
- package/es/components/form/component/form.mjs.map +1 -0
- package/es/components/form/component/form.vue.d.ts +16 -0
- package/es/components/form/component/form.vue.mjs +6 -0
- package/es/components/form/component/form.vue.mjs.map +1 -0
- package/es/components/form/component/form.vue2.mjs +26 -0
- package/es/components/form/component/form.vue2.mjs.map +1 -0
- package/es/components/form/index.d.ts +17 -0
- package/es/components/form/index.mjs +9 -0
- package/es/components/form/index.mjs.map +1 -0
- package/es/components/form-item/component/form-item.vue.d.ts +11 -0
- package/es/components/form-item/component/form-item.vue.mjs +6 -0
- package/es/components/form-item/component/form-item.vue.mjs.map +1 -0
- package/es/components/form-item/component/form-item.vue2.mjs +113 -0
- package/es/components/form-item/component/form-item.vue2.mjs.map +1 -0
- package/es/components/form-item/index.d.ts +0 -0
- package/es/components/form-item/index.mjs +2 -0
- package/es/components/form-item/index.mjs.map +1 -0
- package/es/components/index.d.ts +2 -0
- package/es/components/index.mjs +5 -0
- package/es/components/index.mjs.map +1 -0
- package/es/components/scroll-bar/index.d.ts +26 -0
- package/es/components/scroll-bar/index.mjs +9 -0
- package/es/components/scroll-bar/index.mjs.map +1 -0
- package/es/components/scroll-bar/src/scroll-bar.d.ts +24 -0
- package/es/components/scroll-bar/src/scroll-bar.mjs +248 -0
- package/es/components/scroll-bar/src/scroll-bar.mjs.map +1 -0
- package/es/components/scroll-bar/src/types.d.ts +6 -0
- package/es/components/scroll-bar/src/types.mjs +8 -0
- package/es/components/scroll-bar/src/types.mjs.map +1 -0
- package/es/components/scroll-bar/style/index.d.ts +2 -0
- package/es/components/scroll-bar/style/index.mjs +3 -0
- package/es/components/scroll-bar/style/index.mjs.map +1 -0
- package/es/components/utils/install.d.ts +7 -0
- package/es/components/utils/install.mjs +19 -0
- package/es/components/utils/install.mjs.map +1 -0
- package/es/components/virtual-list/index.d.ts +276 -0
- package/es/components/virtual-list/index.mjs +9 -0
- package/es/components/virtual-list/index.mjs.map +1 -0
- package/es/components/virtual-list/src/types.d.ts +28 -0
- package/es/components/virtual-list/src/types.mjs +29 -0
- package/es/components/virtual-list/src/types.mjs.map +1 -0
- package/es/components/virtual-list/src/virtual-list.vue.d.ts +275 -0
- package/es/components/virtual-list/src/virtual-list.vue.mjs +6 -0
- package/es/components/virtual-list/src/virtual-list.vue.mjs.map +1 -0
- package/es/components/virtual-list/src/virtual-list.vue2.mjs +79 -0
- package/es/components/virtual-list/src/virtual-list.vue2.mjs.map +1 -0
- package/es/hooks/use-namespace/index.d.ts +23 -0
- package/es/hooks/use-namespace/index.mjs +78 -0
- package/es/hooks/use-namespace/index.mjs.map +1 -0
- package/es/index.d.ts +3 -0
- package/es/index.mjs +11 -0
- package/es/index.mjs.map +1 -0
- package/es/installer.d.ts +6 -0
- package/es/installer.mjs +14 -0
- package/es/installer.mjs.map +1 -0
- package/lib/components/base/style/index.d.ts +1 -0
- package/lib/components/base/style/index.js +5 -0
- package/lib/components/base/style/index.js.map +1 -0
- package/lib/components/form/component/form.d.ts +10 -0
- package/lib/components/form/component/form.js +13 -0
- package/lib/components/form/component/form.js.map +1 -0
- package/lib/components/form/component/form.vue.d.ts +16 -0
- package/lib/components/form/component/form.vue.js +10 -0
- package/lib/components/form/component/form.vue.js.map +1 -0
- package/lib/components/form/component/form.vue2.js +30 -0
- package/lib/components/form/component/form.vue2.js.map +1 -0
- package/lib/components/form/index.d.ts +17 -0
- package/lib/components/form/index.js +15 -0
- package/lib/components/form/index.js.map +1 -0
- package/lib/components/form-item/component/form-item.vue.d.ts +11 -0
- package/lib/components/form-item/component/form-item.vue.js +10 -0
- package/lib/components/form-item/component/form-item.vue.js.map +1 -0
- package/lib/components/form-item/component/form-item.vue2.js +117 -0
- package/lib/components/form-item/component/form-item.vue2.js.map +1 -0
- package/lib/components/form-item/index.d.ts +0 -0
- package/lib/components/form-item/index.js +3 -0
- package/lib/components/form-item/index.js.map +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +14 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/scroll-bar/index.d.ts +26 -0
- package/lib/components/scroll-bar/index.js +15 -0
- package/lib/components/scroll-bar/index.js.map +1 -0
- package/lib/components/scroll-bar/src/scroll-bar.d.ts +24 -0
- package/lib/components/scroll-bar/src/scroll-bar.js +252 -0
- package/lib/components/scroll-bar/src/scroll-bar.js.map +1 -0
- package/lib/components/scroll-bar/src/types.d.ts +6 -0
- package/lib/components/scroll-bar/src/types.js +10 -0
- package/lib/components/scroll-bar/src/types.js.map +1 -0
- package/lib/components/scroll-bar/style/index.d.ts +2 -0
- package/lib/components/scroll-bar/style/index.js +6 -0
- package/lib/components/scroll-bar/style/index.js.map +1 -0
- package/lib/components/utils/install.d.ts +7 -0
- package/lib/components/utils/install.js +22 -0
- package/lib/components/utils/install.js.map +1 -0
- package/lib/components/virtual-list/index.d.ts +276 -0
- package/lib/components/virtual-list/index.js +15 -0
- package/lib/components/virtual-list/index.js.map +1 -0
- package/lib/components/virtual-list/src/types.d.ts +28 -0
- package/lib/components/virtual-list/src/types.js +31 -0
- package/lib/components/virtual-list/src/types.js.map +1 -0
- package/lib/components/virtual-list/src/virtual-list.vue.d.ts +275 -0
- package/lib/components/virtual-list/src/virtual-list.vue.js +10 -0
- package/lib/components/virtual-list/src/virtual-list.vue.js.map +1 -0
- package/lib/components/virtual-list/src/virtual-list.vue2.js +83 -0
- package/lib/components/virtual-list/src/virtual-list.vue2.js.map +1 -0
- package/lib/hooks/use-namespace/index.d.ts +23 -0
- package/lib/hooks/use-namespace/index.js +83 -0
- package/lib/hooks/use-namespace/index.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/lib/installer.d.ts +6 -0
- package/lib/installer.js +19 -0
- package/lib/installer.js.map +1 -0
- package/package.json +29 -0
- package/theme-chalk/base.css +1 -0
- package/theme-chalk/buttons.css +1 -0
- package/theme-chalk/index.css +1 -0
- package/theme-chalk/reset.css +0 -0
- package/theme-chalk/scroll-bar.css +1 -0
- package/theme-chalk/var.css +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var virtualList_vue_vue_type_script_setup_true_lang = require('./virtual-list.vue2.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.default = virtualList_vue_vue_type_script_setup_true_lang.default;
|
|
10
|
+
//# sourceMappingURL=virtual-list.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-list.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var vueuc = require('vueuc');
|
|
7
|
+
var index = require('../../scroll-bar/index.js');
|
|
8
|
+
var types = require('./types.js');
|
|
9
|
+
|
|
10
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
+
__name: "virtual-list",
|
|
12
|
+
props: types.virtualListProps,
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const virtualListInstRef = vue.ref(null);
|
|
16
|
+
const scrollbarInstRef = vue.ref(null);
|
|
17
|
+
function getScrollContainer() {
|
|
18
|
+
var _a;
|
|
19
|
+
return (_a = virtualListInstRef.value) == null ? void 0 : _a.listElRef;
|
|
20
|
+
}
|
|
21
|
+
function getScrollContent() {
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = virtualListInstRef.value) == null ? void 0 : _a.itemsElRef;
|
|
24
|
+
}
|
|
25
|
+
const syncScrollbar = () => {
|
|
26
|
+
var _a;
|
|
27
|
+
return (_a = scrollbarInstRef.value) == null ? void 0 : _a.sync();
|
|
28
|
+
};
|
|
29
|
+
function handleScroll() {
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = props.onScroll) == null ? void 0 : _a.call(props);
|
|
32
|
+
syncScrollbar();
|
|
33
|
+
}
|
|
34
|
+
function handleResize() {
|
|
35
|
+
syncScrollbar();
|
|
36
|
+
}
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return vue.openBlock(), vue.createBlock(
|
|
39
|
+
vue.unref(index.KScrollBar),
|
|
40
|
+
{
|
|
41
|
+
ref_key: "scrollbarInstRef",
|
|
42
|
+
ref: scrollbarInstRef,
|
|
43
|
+
style: { "max-height": "300px" },
|
|
44
|
+
container: getScrollContainer,
|
|
45
|
+
content: getScrollContent
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
default: vue.withCtx(() => [
|
|
49
|
+
vue.createVNode(vue.unref(vueuc.VVirtualList), {
|
|
50
|
+
ref_key: "virtualListInstRef",
|
|
51
|
+
ref: virtualListInstRef,
|
|
52
|
+
items: _ctx.items,
|
|
53
|
+
style: { "height": "100%" },
|
|
54
|
+
"item-size": _ctx.itemSize,
|
|
55
|
+
"item-resizable": _ctx.itemResizable,
|
|
56
|
+
"show-scrollbar": false,
|
|
57
|
+
"padding-bottom": _ctx.paddingBottom,
|
|
58
|
+
"padding-top": _ctx.paddingTop,
|
|
59
|
+
"on-scroll": handleScroll,
|
|
60
|
+
"on-resize": handleResize
|
|
61
|
+
}, {
|
|
62
|
+
default: vue.withCtx(({ item, index }) => [
|
|
63
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
|
64
|
+
item,
|
|
65
|
+
index
|
|
66
|
+
})
|
|
67
|
+
]),
|
|
68
|
+
_: 3
|
|
69
|
+
/* FORWARDED */
|
|
70
|
+
}, 8, ["items", "item-size", "item-resizable", "padding-bottom", "padding-top"])
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
/* FORWARDED */
|
|
74
|
+
},
|
|
75
|
+
512
|
|
76
|
+
/* NEED_PATCH */
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
exports.default = _sfc_main;
|
|
83
|
+
//# sourceMappingURL=virtual-list.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-list.vue2.js","sources":["../../../../../../packages/antdv/components/virtual-list/src/virtual-list.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { VVirtualList, type VirtualListInst } from 'vueuc'\nimport scrollbar from '../../scroll-bar'\nimport { virtualListProps } from './types'\n\nconst props = defineProps(virtualListProps)\nconst virtualListInstRef = ref<VirtualListInst | null>(null)\nconst scrollbarInstRef = ref<InstanceType<typeof scrollbar> | null>(null)\nfunction getScrollContainer(): HTMLElement | null | undefined {\n return virtualListInstRef.value?.listElRef\n}\nfunction getScrollContent(): HTMLElement | null | undefined {\n return virtualListInstRef.value?.itemsElRef\n}\nconst syncScrollbar = () => scrollbarInstRef.value?.sync()\nfunction handleScroll() {\n props.onScroll?.()\n syncScrollbar()\n}\nfunction handleResize() {\n syncScrollbar()\n}\n</script>\n\n<template>\n <scrollbar ref=\"scrollbarInstRef\" style=\"max-height: 300px\" :container=\"getScrollContainer\" :content=\"getScrollContent\">\n <VVirtualList\n ref=\"virtualListInstRef\"\n :items=\"items\"\n style=\"height: 100%\"\n :item-size=\"itemSize\"\n :item-resizable=\"itemResizable\"\n :show-scrollbar=\"false\"\n :padding-bottom=\"paddingBottom\"\n :padding-top=\"paddingTop\"\n :on-scroll=\"handleScroll\"\n :on-resize=\"handleResize\"\n >\n <template #default=\"{ item, index }\">\n <slot :item=\"item\" :index=\"index\" />\n </template>\n </VVirtualList>\n </scrollbar>\n</template>\n\n<style></style>\n"],"names":["ref"],"mappings":";;;;;;;;;;;;;AAMA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAM,MAAA,kBAAA,GAAqBA,QAA4B,IAAI,CAAA,CAAA;AAC3D,IAAM,MAAA,gBAAA,GAAmBA,QAA2C,IAAI,CAAA,CAAA;AACxE,IAAA,SAAS,kBAAqD,GAAA;;AAC5D,MAAO,OAAA,CAAA,EAAA,GAAA,kBAAA,CAAmB,UAAnB,IAA0B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,CAAA;AAAA,KACnC;AACA,IAAA,SAAS,gBAAmD,GAAA;;AAC1D,MAAO,OAAA,CAAA,EAAA,GAAA,kBAAA,CAAmB,UAAnB,IAA0B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAA,CAAA;AAAA,KACnC;AACA,IAAA,MAAM,gBAAgB,MAAG;;AAAG,MAAA,OAAA,CAAA,EAAA,GAAA,gBAAA,CAAiB,UAAjB,IAAwB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,EAAA,CAAA;AAAA,KAAA,CAAA;AACpD,IAAA,SAAS,YAAe,GAAA;;AACtB,MAAA,CAAA,EAAA,GAAA,KAAA,CAAM,QAAN,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA;AACA,MAAc,aAAA,EAAA,CAAA;AAAA,KAChB;AACA,IAAA,SAAS,YAAe,GAAA;AACtB,MAAc,aAAA,EAAA,CAAA;AAAA,KAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
2
|
+
export declare const defaultNamespace = "king";
|
|
3
|
+
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
|
4
|
+
export declare function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>): import("vue").ComputedRef<string>;
|
|
5
|
+
export declare function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>): {
|
|
6
|
+
namespace: import("vue").ComputedRef<string>;
|
|
7
|
+
b: (blockSuffix?: string) => string;
|
|
8
|
+
e: (element?: string) => string;
|
|
9
|
+
m: (modifier?: string) => string;
|
|
10
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
11
|
+
em: (element?: string, modifier?: string) => string;
|
|
12
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
13
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
14
|
+
is: {
|
|
15
|
+
(name: string, state: boolean | undefined): string;
|
|
16
|
+
(name: string): string;
|
|
17
|
+
};
|
|
18
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
19
|
+
cssVarName: (name: string) => string;
|
|
20
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
21
|
+
cssVarBlockName: (name: string) => string;
|
|
22
|
+
};
|
|
23
|
+
export type UseNamespaceReturn = ReturnType<typeof useNamespace>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
|
|
5
|
+
const defaultNamespace = "king";
|
|
6
|
+
const statePrefix = "is-";
|
|
7
|
+
function _bem(namespace, block, blockSuffix, element, modifier) {
|
|
8
|
+
let cls = `${namespace}-${block}`;
|
|
9
|
+
if (blockSuffix) {
|
|
10
|
+
cls += `-${blockSuffix}`;
|
|
11
|
+
}
|
|
12
|
+
if (element) {
|
|
13
|
+
cls += `__${element}`;
|
|
14
|
+
}
|
|
15
|
+
if (modifier) {
|
|
16
|
+
cls += `--${modifier}`;
|
|
17
|
+
}
|
|
18
|
+
return cls;
|
|
19
|
+
}
|
|
20
|
+
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
21
|
+
function useGetDerivedNamespace(namespaceOverrides) {
|
|
22
|
+
const derivedNamespace = namespaceOverrides || (vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace));
|
|
23
|
+
const namespace = vue.computed(() => {
|
|
24
|
+
return vue.unref(derivedNamespace) || defaultNamespace;
|
|
25
|
+
});
|
|
26
|
+
return namespace;
|
|
27
|
+
}
|
|
28
|
+
function useNamespace(block, namespaceOverrides) {
|
|
29
|
+
const namespace = useGetDerivedNamespace(namespaceOverrides);
|
|
30
|
+
const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
|
|
31
|
+
const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
|
|
32
|
+
const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
|
|
33
|
+
const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
|
|
34
|
+
const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
|
|
35
|
+
const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
|
|
36
|
+
const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
|
|
37
|
+
const is = (name, ...args) => {
|
|
38
|
+
const state = args.length >= 1 ? args[0] : true;
|
|
39
|
+
return name && state ? `${statePrefix}${name}` : "";
|
|
40
|
+
};
|
|
41
|
+
const cssVar = (object) => {
|
|
42
|
+
const styles = {};
|
|
43
|
+
for (const key in object) {
|
|
44
|
+
if (object[key]) {
|
|
45
|
+
styles[`--${namespace.value}-${key}`] = object[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return styles;
|
|
49
|
+
};
|
|
50
|
+
const cssVarBlock = (object) => {
|
|
51
|
+
const styles = {};
|
|
52
|
+
for (const key in object) {
|
|
53
|
+
if (object[key]) {
|
|
54
|
+
styles[`--${namespace.value}-${block}-${key}`] = object[key];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return styles;
|
|
58
|
+
};
|
|
59
|
+
const cssVarName = (name) => `--${namespace.value}-${name}`;
|
|
60
|
+
const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
|
|
61
|
+
return {
|
|
62
|
+
namespace,
|
|
63
|
+
b,
|
|
64
|
+
e,
|
|
65
|
+
m,
|
|
66
|
+
be,
|
|
67
|
+
em,
|
|
68
|
+
bm,
|
|
69
|
+
bem,
|
|
70
|
+
is,
|
|
71
|
+
// css
|
|
72
|
+
cssVar,
|
|
73
|
+
cssVarName,
|
|
74
|
+
cssVarBlock,
|
|
75
|
+
cssVarBlockName
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
exports.defaultNamespace = defaultNamespace;
|
|
80
|
+
exports.namespaceContextKey = namespaceContextKey;
|
|
81
|
+
exports.useGetDerivedNamespace = useGetDerivedNamespace;
|
|
82
|
+
exports.useNamespace = useNamespace;
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/antdv/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'king'\nconst statePrefix = 'is-'\n\nfunction _bem(namespace: string, block: string, blockSuffix: string, element: string, modifier: string) {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> = Symbol('namespaceContextKey')\n\nexport function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>) {\n const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>) {\n const namespace = useGetDerivedNamespace(namespaceOverrides)\n const b = (blockSuffix = '') => _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) => (element ? _bem(namespace.value, block, '', element, '') : '')\n const m = (modifier?: string) => (modifier ? _bem(namespace.value, block, '', '', modifier) : '')\n const be = (blockSuffix?: string, element?: string) => (blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, '') : '')\n const em = (element?: string, modifier?: string) => (element && modifier ? _bem(namespace.value, block, '', element, modifier) : '')\n const bm = (blockSuffix?: string, modifier?: string) => (blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, '', modifier) : '')\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) => `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"names":["getCurrentInstance","inject","ref","computed","unref"],"mappings":";;;;AAIO,MAAM,gBAAmB,GAAA,OAAA;AAChC,MAAM,WAAc,GAAA,KAAA,CAAA;AAEpB,SAAS,IAAK,CAAA,SAAA,EAAmB,KAAe,EAAA,WAAA,EAAqB,SAAiB,QAAkB,EAAA;AACtG,EAAA,IAAI,GAAM,GAAA,CAAA,EAAG,SAAS,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,CAAA;AAC/B,EAAA,IAAI,WAAa,EAAA;AACf,IAAA,GAAA,IAAO,IAAI,WAAW,CAAA,CAAA,CAAA;AAAA,GACxB;AACA,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,GAAA,IAAO,KAAK,OAAO,CAAA,CAAA,CAAA;AAAA,GACrB;AACA,EAAA,IAAI,QAAU,EAAA;AACZ,IAAA,GAAA,IAAO,KAAK,QAAQ,CAAA,CAAA,CAAA;AAAA,GACtB;AACA,EAAO,OAAA,GAAA,CAAA;AACT,CAAA;AAEa,MAAA,mBAAA,GAA6D,OAAO,qBAAqB,EAAA;AAE/F,SAAS,uBAAuB,kBAA8C,EAAA;AACnF,EAAM,MAAA,gBAAA,GAAmB,kBAAuB,KAAAA,sBAAA,EAAuB,GAAAC,UAAA,CAAO,mBAAqB,EAAAC,OAAA,CAAI,gBAAgB,CAAC,CAAI,GAAAA,OAAA,CAAI,gBAAgB,CAAA,CAAA,CAAA;AAChJ,EAAM,MAAA,SAAA,GAAYC,aAAS,MAAM;AAC/B,IAAO,OAAAC,SAAA,CAAM,gBAAgB,CAAK,IAAA,gBAAA,CAAA;AAAA,GACnC,CAAA,CAAA;AACD,EAAO,OAAA,SAAA,CAAA;AACT,CAAA;AAEgB,SAAA,YAAA,CAAa,OAAe,kBAA8C,EAAA;AACxF,EAAM,MAAA,SAAA,GAAY,uBAAuB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,CAAC,IAAiB,KAAA,CAAA,EAAA,EAAK,UAAU,KAAK,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,CAAA;AAE/E,EAAO,OAAA;AAAA,IACL,SAAA;AAAA,IACA,CAAA;AAAA,IACA,CAAA;AAAA,IACA,CAAA;AAAA,IACA,EAAA;AAAA,IACA,EAAA;AAAA,IACA,EAAA;AAAA,IACA,GAAA;AAAA,IACA,EAAA;AAAA;AAAA,IAEA,MAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,GACF,CAAA;AACF;;;;;;;"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var installer = require('./installer.js');
|
|
6
|
+
require('./components/index.js');
|
|
7
|
+
var form = require('./components/form/component/form.js');
|
|
8
|
+
var index = require('./components/form/index.js');
|
|
9
|
+
var types = require('./components/virtual-list/src/types.js');
|
|
10
|
+
var index$1 = require('./components/virtual-list/index.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.default = installer.default;
|
|
15
|
+
exports.formType = form.formType;
|
|
16
|
+
exports.KForm = index.KForm;
|
|
17
|
+
exports.virtualListProps = types.virtualListProps;
|
|
18
|
+
exports.KVirtualList = index$1.KVirtualList;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
package/lib/installer.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('./components/index.js');
|
|
6
|
+
var index = require('./components/form/index.js');
|
|
7
|
+
var index$1 = require('./components/virtual-list/index.js');
|
|
8
|
+
|
|
9
|
+
const component = [index.KForm, index$1.KVirtualList];
|
|
10
|
+
function install(app) {
|
|
11
|
+
component.forEach((i) => app.use(i));
|
|
12
|
+
}
|
|
13
|
+
const plugin = {
|
|
14
|
+
install
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.default = plugin;
|
|
18
|
+
exports.install = install;
|
|
19
|
+
//# sourceMappingURL=installer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installer.js","sources":["../../../packages/antdv/installer.ts"],"sourcesContent":["/*\n * @Description:\n * @Version: 2.0\n * @Autor: caohao\n * @Date: 2024-09-16 23:00:22\n * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git\n * @LastEditTime: 2024-10-18 13:49:00\n */\nimport type { App, Plugin } from 'vue'\nimport { KForm, KVirtualList } from './components'\n\nconst component = [KForm, KVirtualList] as Plugin[]\nexport function install(app: App): any {\n component.forEach(i => app.use(i))\n}\nconst plugin = {\n install\n}\nexport default plugin\n"],"names":["KForm","KVirtualList"],"mappings":";;;;;;;;AAWA,MAAM,SAAA,GAAY,CAACA,WAAA,EAAOC,oBAAY,CAAA,CAAA;AAC/B,SAAS,QAAQ,GAAe,EAAA;AACrC,EAAA,SAAA,CAAU,OAAQ,CAAA,CAAA,CAAA,KAAK,GAAI,CAAA,GAAA,CAAI,CAAC,CAAC,CAAA,CAAA;AACnC,CAAA;AACA,MAAM,MAAS,GAAA;AAAA,EACb,OAAA;AACF;;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@king-one/antdv",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"main": "lib/index.js",
|
|
10
|
+
"module": "es/index.mjs",
|
|
11
|
+
"types": "es/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"ant-design-vue": "^4.2.4",
|
|
17
|
+
"async-validator": "^4.2.5",
|
|
18
|
+
"vue": "^3.4.34"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public",
|
|
22
|
+
"registry": "https://registry.npmjs.org/"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@king-one/utils": "workspace:^",
|
|
26
|
+
"evtd": "^0.2.4",
|
|
27
|
+
"vueuc": "^0.4.64"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-rail{position:absolute;right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail__scrollbar{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-rail{position:absolute;right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail__scrollbar{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399}
|