@oiij/naive-ui 0.0.66 → 0.0.68
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/components/_utils/index.js +2 -0
- package/dist/components/config-providers/ConfigProviders.js +13 -19
- package/dist/components/config-providers/ConfigProviders.vue.d.ts +11 -11
- package/dist/components/config-providers/index.d.ts +7 -9
- package/dist/components/config-providers/index.js +1 -0
- package/dist/components/copy-button/CopyButton.vue.d.ts +13 -13
- package/dist/components/copy-button/index.js +1 -0
- package/dist/components/data-table-plus/DataTablePlus.js +1 -0
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +44 -44
- package/dist/components/data-table-plus/index.js +1 -0
- package/dist/components/index.d.ts +17 -19
- package/dist/components/index.js +28 -0
- package/dist/components/loading-provider/LoadingProvider.js +79 -0
- package/dist/components/loading-provider/LoadingProvider.vue.d.ts +38 -0
- package/dist/components/loading-provider/index.d.ts +24 -0
- package/dist/components/loading-provider/index.js +7 -0
- package/dist/components/{full-loading/full-loading.cssr.js → loading-provider/loading-provider.cssr.js} +6 -5
- package/dist/components/preset-form/PresetForm.js +1 -0
- package/dist/components/preset-form/PresetForm.vue.d.ts +19 -19
- package/dist/components/preset-form/index.js +1 -0
- package/dist/components/preset-input/PresetInput.js +1 -0
- package/dist/components/preset-input/PresetInput.vue.d.ts +4 -4
- package/dist/components/preset-input/index.js +1 -0
- package/dist/components/preset-picker/PresetPicker.js +1 -1
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +5 -5
- package/dist/components/preset-picker/index.js +1 -0
- package/dist/components/preset-select/PresetSelect.vue.d.ts +28 -28
- package/dist/components/preset-select/index.js +1 -0
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +11 -11
- package/dist/components/remote-request/index.js +1 -0
- package/dist/components/search-input/SearchInput.vue.d.ts +12 -12
- package/dist/components/search-input/index.js +1 -0
- package/dist/components/toggle-input/index.js +1 -0
- package/dist/components/tooltip-button/index.js +1 -0
- package/dist/components/transition/BaseTransition.vue.d.ts +6 -6
- package/dist/components/transition/index.js +1 -0
- package/dist/components/type-writer/TypeWriter.js +2 -1
- package/dist/components/type-writer/TypeWriter.vue.d.ts +5 -5
- package/dist/components/type-writer/index.js +1 -0
- package/dist/components/type-writer/type-writer.cssr.js +1 -0
- package/dist/components.d.ts +19 -21
- package/dist/components.js +6 -5
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.js +4 -0
- package/dist/composables/useDataRequest.d.ts +7 -7
- package/dist/composables/useLoading.d.ts +10 -0
- package/dist/composables/useLoading.js +10 -0
- package/dist/composables/useNaiveForm.d.ts +6 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +11 -11
- package/dist/components/bubble/Bubble.js +0 -67
- package/dist/components/bubble/Bubble.vue.d.ts +0 -54
- package/dist/components/bubble/bubble.cssr.js +0 -23
- package/dist/components/bubble/index.d.ts +0 -20
- package/dist/components/full-loading/FullLoading.js +0 -70
- package/dist/components/full-loading/FullLoading.vue.d.ts +0 -38
- package/dist/components/full-loading/index.d.ts +0 -17
package/dist/components.d.ts
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { _default as _default$9 } from "./components/remote-request/RemoteRequest.vue.js";
|
|
1
|
+
import { NaiveFormRules } from "./composables/useNaiveForm.js";
|
|
2
|
+
import { _default as _default$8 } from "./components/remote-request/RemoteRequest.vue.js";
|
|
4
3
|
import { RemoteRequestEmits, RemoteRequestExpose, RemoteRequestFields, RemoteRequestInst, RemoteRequestProps } from "./components/remote-request/index.js";
|
|
5
|
-
import { _default as _default$
|
|
4
|
+
import { _default as _default$9 } from "./components/search-input/SearchInput.vue.js";
|
|
6
5
|
import { SearchInputProps } from "./components/search-input/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import { _default as _default$3 } from "./components/data-table-plus/DataTablePlus.vue.js";
|
|
6
|
+
import { _default as _default$2 } from "./components/data-table-plus/DataTablePlus.vue.js";
|
|
9
7
|
import { ClassStyle, DataTablePlusEmits, DataTablePlusExpose, DataTablePlusFields, DataTablePlusInst, DataTablePlusProps } from "./components/data-table-plus/index.js";
|
|
10
|
-
import { _default as _default$
|
|
11
|
-
import {
|
|
12
|
-
import { _default
|
|
13
|
-
import { ConfigProvidersProps
|
|
14
|
-
import { _default as _default$
|
|
8
|
+
import { _default as _default$3 } from "./components/loading-provider/LoadingProvider.vue.js";
|
|
9
|
+
import { LoadingProviderInst, LoadingProviderProps, loadingProviderInjectionKey } from "./components/loading-provider/index.js";
|
|
10
|
+
import { _default } from "./components/config-providers/ConfigProviders.vue.js";
|
|
11
|
+
import { ConfigProvidersProps } from "./components/config-providers/index.js";
|
|
12
|
+
import { _default as _default$1 } from "./components/copy-button/CopyButton.vue.js";
|
|
15
13
|
import { CopyButtonProps } from "./components/copy-button/index.js";
|
|
16
|
-
import { _default as _default$
|
|
14
|
+
import { _default as _default$5 } from "./components/preset-input/PresetInput.vue.js";
|
|
17
15
|
import { PresetInputOptions, PresetInputProps, PresetInputType } from "./components/preset-input/index.js";
|
|
18
|
-
import { _default as _default$
|
|
16
|
+
import { _default as _default$4 } from "./components/preset-form/PresetForm.vue.js";
|
|
19
17
|
import { PresetFormExpose, PresetFormInst, PresetFormOptionItem, PresetFormOptions, PresetFormProps } from "./components/preset-form/index.js";
|
|
20
|
-
import { _default as _default$
|
|
18
|
+
import { _default as _default$6 } from "./components/preset-picker/PresetPicker.vue.js";
|
|
21
19
|
import { PresetPickerEmits, PresetPickerExpose, PresetPickerInst, PresetPickerProps, PresetPickerValue } from "./components/preset-picker/index.js";
|
|
22
|
-
import { _default as _default$
|
|
20
|
+
import { _default as _default$7 } from "./components/preset-select/PresetSelect.vue.js";
|
|
23
21
|
import { ArrayAwareType, OptionFormat, PresetSelectEmits, PresetSelectExpose, PresetSelectFields, PresetSelectInst, PresetSelectProps, PresetSelectValue } from "./components/preset-select/index.js";
|
|
24
|
-
import { _default as _default$
|
|
25
|
-
import { _default as _default$
|
|
22
|
+
import { _default as _default$10 } from "./components/toggle-input/ToggleInput.vue.js";
|
|
23
|
+
import { _default as _default$11 } from "./components/tooltip-button/TooltipButton.vue.js";
|
|
26
24
|
import { TooltipButtonProps } from "./components/tooltip-button/index.js";
|
|
27
|
-
import { _default as _default$
|
|
25
|
+
import { _default as _default$12 } from "./components/transition/BaseTransition.vue.js";
|
|
28
26
|
import { TransitionProps } from "./components/transition/index.js";
|
|
29
|
-
import { _default as _default$
|
|
27
|
+
import { _default as _default$13 } from "./components/type-writer/TypeWriter.vue.js";
|
|
30
28
|
import { TypeWriterProps } from "./components/type-writer/index.js";
|
|
31
29
|
import "./components/index.js";
|
|
32
|
-
import { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots
|
|
33
|
-
export { ArrayAwareType,
|
|
30
|
+
import { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots } from "vue-component-type-helpers";
|
|
31
|
+
export { ArrayAwareType, ClassStyle, ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots, ConfigProvidersProps, CopyButtonProps, DataTablePlusEmits, DataTablePlusExpose, DataTablePlusFields, DataTablePlusInst, DataTablePlusProps, LoadingProviderInst, LoadingProviderProps, _default as NConfigProviders, _default$1 as NCopyButton, _default$2 as NDataTablePlus, _default$3 as NLoadingProvider, _default$4 as NPresetForm, _default$5 as NPresetInput, _default$6 as NPresetPicker, _default$7 as NPresetSelect, _default$8 as NRemoteRequest, _default$9 as NSearchInput, _default$10 as NToggleInput, _default$11 as NTooltipButton, _default$12 as NTransition, _default$13 as NTypeWriter, NaiveFormRules, OptionFormat, PresetFormExpose, PresetFormInst, PresetFormOptionItem, PresetFormOptions, PresetFormProps, PresetInputOptions, PresetInputProps, PresetInputType, PresetPickerEmits, PresetPickerExpose, PresetPickerInst, PresetPickerProps, PresetPickerValue, PresetSelectEmits, PresetSelectExpose, PresetSelectFields, PresetSelectInst, PresetSelectProps, PresetSelectValue, RemoteRequestEmits, RemoteRequestExpose, RemoteRequestFields, RemoteRequestInst, RemoteRequestProps, SearchInputProps, TooltipButtonProps, TransitionProps, TypeWriterProps, loadingProviderInjectionKey };
|
package/dist/components.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import BaseTransition_default from "./components/transition/BaseTransition.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import FullLoading_default from "./components/full-loading/FullLoading.js";
|
|
2
|
+
import LoadingProvider_default from "./components/loading-provider/LoadingProvider.js";
|
|
3
|
+
import { loadingProviderInjectionKey } from "./components/loading-provider/index.js";
|
|
5
4
|
import ConfigProviders_default from "./components/config-providers/ConfigProviders.js";
|
|
6
5
|
import CopyButton_default from "./components/copy-button/CopyButton.js";
|
|
7
6
|
import SearchInput_default from "./components/search-input/SearchInput.js";
|
|
@@ -13,6 +12,8 @@ import PresetSelect_default from "./components/preset-select/PresetSelect.js";
|
|
|
13
12
|
import RemoteRequest_default from "./components/remote-request/RemoteRequest.js";
|
|
14
13
|
import ToggleInput_default from "./components/toggle-input/ToggleInput.js";
|
|
15
14
|
import TooltipButton_default from "./components/tooltip-button/TooltipButton.js";
|
|
16
|
-
import
|
|
15
|
+
import TypeWriter_default from "./components/type-writer/TypeWriter.js";
|
|
16
|
+
import "./components/index.js";
|
|
17
|
+
import { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots } from "vue-component-type-helpers";
|
|
17
18
|
|
|
18
|
-
export { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots,
|
|
19
|
+
export { ComponentAttrs, ComponentEmit, ComponentExposed, ComponentProps, ComponentSlots, ConfigProviders_default as NConfigProviders, CopyButton_default as NCopyButton, DataTablePlus_default as NDataTablePlus, LoadingProvider_default as NLoadingProvider, PresetForm_default as NPresetForm, PresetInput_default as NPresetInput, PresetPicker_default as NPresetPicker, PresetSelect_default as NPresetSelect, RemoteRequest_default as NRemoteRequest, SearchInput_default as NSearchInput, ToggleInput_default as NToggleInput, TooltipButton_default as NTooltipButton, BaseTransition_default as NTransition, TypeWriter_default as NTypeWriter, loadingProviderInjectionKey };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DataObject, DataRequestFields, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest } from "./useDataRequest.js";
|
|
2
|
+
import { useLoading } from "./useLoading.js";
|
|
2
3
|
import { NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, useNaiveForm } from "./useNaiveForm.js";
|
|
3
4
|
import { NaiveThemeReturns, useNaiveTheme } from "./useNaiveTheme.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _vueuse_core0 from "@vueuse/core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue2 from "vue";
|
|
3
3
|
import { UseRequestOptions, UseRequestPlugin } from "vue-hooks-plus/es/useRequest/types";
|
|
4
4
|
|
|
5
5
|
//#region src/composables/useDataRequest.d.ts
|
|
@@ -24,12 +24,12 @@ type UseDataRequestPagination = {
|
|
|
24
24
|
itemCount: number;
|
|
25
25
|
};
|
|
26
26
|
declare function useDataRequest<P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject>(api: (...args: P[]) => Promise<D>, options?: UseDataRequestOptions<P, D>): {
|
|
27
|
-
loading: Readonly<
|
|
28
|
-
data: Readonly<
|
|
29
|
-
error: Readonly<
|
|
30
|
-
params: Readonly<
|
|
31
|
-
list:
|
|
32
|
-
pagination:
|
|
27
|
+
loading: Readonly<vue2.Ref<boolean, boolean>>;
|
|
28
|
+
data: Readonly<vue2.Ref<D | undefined, D | undefined>>;
|
|
29
|
+
error: Readonly<vue2.Ref<Error | undefined, Error | undefined>>;
|
|
30
|
+
params: Readonly<vue2.Ref<[] | P[], [] | P[]>>;
|
|
31
|
+
list: vue2.ComputedRef<R[]>;
|
|
32
|
+
pagination: vue2.Ref<{
|
|
33
33
|
page: number;
|
|
34
34
|
pageSize: number;
|
|
35
35
|
itemCount: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { loadingProviderInjectionKey } from "../components/loading-provider/index.js";
|
|
2
|
+
import { inject } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/composables/useLoading.ts
|
|
5
|
+
function useLoading() {
|
|
6
|
+
return inject(loadingProviderInjectionKey);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useLoading };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataObject } from "./useDataRequest.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _vueuse_core0 from "@vueuse/core";
|
|
3
|
+
import * as vue0 from "vue";
|
|
4
4
|
import { Ref, TemplateRef } from "vue";
|
|
5
5
|
import { FormInst, FormItemRule, FormRules } from "naive-ui";
|
|
6
6
|
import { ValidateError } from "async-validator";
|
|
@@ -17,12 +17,12 @@ type NaiveFormOptions<T extends DataObject> = {
|
|
|
17
17
|
clearRules?: NaiveFormClearRules;
|
|
18
18
|
};
|
|
19
19
|
declare function useNaiveForm<T extends DataObject = DataObject>(formRef: TemplateRef<FormInst>, value?: T | Ref<T>, options?: NaiveFormOptions<T>): {
|
|
20
|
-
formRef: Readonly<
|
|
20
|
+
formRef: Readonly<vue0.ShallowRef<FormInst | null>>;
|
|
21
21
|
formValue: Ref<T, T>;
|
|
22
22
|
formRules: Ref<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>, Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
23
23
|
formProps: {
|
|
24
|
-
model:
|
|
25
|
-
rules:
|
|
24
|
+
model: vue0.Reactive<T>;
|
|
25
|
+
rules: vue0.Reactive<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
26
26
|
};
|
|
27
27
|
setValue: (_value: Partial<T>) => void;
|
|
28
28
|
validate: () => Promise<{
|
|
@@ -32,7 +32,7 @@ declare function useNaiveForm<T extends DataObject = DataObject>(formRef: Templa
|
|
|
32
32
|
resetForm: () => void;
|
|
33
33
|
reset: () => void;
|
|
34
34
|
clear: () => void;
|
|
35
|
-
onValidated:
|
|
35
|
+
onValidated: _vueuse_core0.EventHookOn<[T]>;
|
|
36
36
|
};
|
|
37
37
|
type NaiveFormReturns<T extends DataObject = DataObject> = ReturnType<typeof useNaiveForm<T>>;
|
|
38
38
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataObject, DataRequestFields, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest } from "./composables/useDataRequest.js";
|
|
2
|
+
import { useLoading } from "./composables/useLoading.js";
|
|
2
3
|
import { NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, useNaiveForm } from "./composables/useNaiveForm.js";
|
|
3
4
|
import { NaiveThemeReturns, useNaiveTheme } from "./composables/useNaiveTheme.js";
|
|
4
5
|
import "./composables/index.js";
|
|
5
|
-
export { DataObject, DataRequestFields, NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, NaiveThemeReturns, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest, useNaiveForm, useNaiveTheme };
|
|
6
|
+
export { DataObject, DataRequestFields, NaiveFormClearRules, NaiveFormOptions, NaiveFormReturns, NaiveFormRules, NaiveThemeReturns, UseDataRequestOptions, UseDataRequestPagination, UseDataRequestReturns, useDataRequest, useLoading, useNaiveForm, useNaiveTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useDataRequest } from "./composables/useDataRequest.js";
|
|
2
|
+
import { useLoading } from "./composables/useLoading.js";
|
|
2
3
|
import { useNaiveForm } from "./composables/useNaiveForm.js";
|
|
3
4
|
import { useNaiveTheme } from "./composables/useNaiveTheme.js";
|
|
5
|
+
import "./composables/index.js";
|
|
4
6
|
|
|
5
|
-
export { useDataRequest, useNaiveForm, useNaiveTheme };
|
|
7
|
+
export { useDataRequest, useLoading, useNaiveForm, useNaiveTheme };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oiij/naive-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.68",
|
|
5
5
|
"description": "Some Composable Functions And Components for Vue 3",
|
|
6
6
|
"author": "oiij",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"es-toolkit": "^1.43.0",
|
|
43
43
|
"naive-ui": "^2.43.2",
|
|
44
44
|
"prismjs": "^1.30.0",
|
|
45
|
-
"vue": "^3.5.
|
|
46
|
-
"vue-component-type-helpers": "^3.1
|
|
45
|
+
"vue": "^3.5.26",
|
|
46
|
+
"vue-component-type-helpers": "^3.2.1",
|
|
47
47
|
"vue-hooks-plus": "^2.4.1",
|
|
48
|
-
"@oiij/markdown-it": "0.0.
|
|
49
|
-
"@oiij/css-render": "0.0.
|
|
50
|
-
"@oiij/use": "0.0.
|
|
48
|
+
"@oiij/markdown-it": "0.0.10",
|
|
49
|
+
"@oiij/css-render": "0.0.8",
|
|
50
|
+
"@oiij/use": "0.0.30"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/prismjs": "^1.26.5",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"es-toolkit": "^1.43.0",
|
|
58
58
|
"naive-ui": "^2.43.2",
|
|
59
59
|
"prismjs": "^1.30.0",
|
|
60
|
-
"vue": "^3.5.
|
|
61
|
-
"vue-component-type-helpers": "^3.1
|
|
60
|
+
"vue": "^3.5.26",
|
|
61
|
+
"vue-component-type-helpers": "^3.2.1",
|
|
62
62
|
"vue-hooks-plus": "^2.4.1",
|
|
63
|
-
"@oiij/
|
|
64
|
-
"@oiij/
|
|
65
|
-
"@oiij/
|
|
63
|
+
"@oiij/markdown-it": "0.0.10",
|
|
64
|
+
"@oiij/css-render": "0.0.8",
|
|
65
|
+
"@oiij/use": "0.0.30"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import BaseTransition_default from "../transition/BaseTransition.js";
|
|
2
|
-
import TypeWriter_default from "../type-writer/TypeWriter.js";
|
|
3
|
-
import { bubbleCssr, cName } from "./bubble.cssr.js";
|
|
4
|
-
import { createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
|
|
5
|
-
import { NAvatar, NEl, NFlex, NSpin } from "naive-ui";
|
|
6
|
-
import { useStyle } from "@oiij/css-render";
|
|
7
|
-
|
|
8
|
-
//#region src/components/bubble/Bubble.vue
|
|
9
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
-
__name: "Bubble",
|
|
11
|
-
props: {
|
|
12
|
-
avatar: {},
|
|
13
|
-
content: {},
|
|
14
|
-
contentClass: {},
|
|
15
|
-
contentStyle: {},
|
|
16
|
-
loading: { type: Boolean },
|
|
17
|
-
typing: { type: Boolean },
|
|
18
|
-
markdown: { type: Boolean },
|
|
19
|
-
placement: {}
|
|
20
|
-
},
|
|
21
|
-
emits: ["typingComplete"],
|
|
22
|
-
setup(__props, { emit: __emit }) {
|
|
23
|
-
const emit = __emit;
|
|
24
|
-
useStyle("n-bubble", bubbleCssr());
|
|
25
|
-
return (_ctx, _cache) => {
|
|
26
|
-
return openBlock(), createBlock(unref(NEl), {
|
|
27
|
-
tag: "div",
|
|
28
|
-
class: normalizeClass([unref(cName), __props.placement === "end" ? `${unref(cName)}--reverse` : ""])
|
|
29
|
-
}, {
|
|
30
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "avatar", {}, () => [__props.avatar ? (openBlock(), createBlock(unref(NAvatar), mergeProps({
|
|
31
|
-
key: 0,
|
|
32
|
-
round: ""
|
|
33
|
-
}, __props.avatar.props), {
|
|
34
|
-
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.avatar.icon)))]),
|
|
35
|
-
_: 1
|
|
36
|
-
}, 16)) : createCommentVNode("v-if", true)]), createVNode(unref(NFlex), { vertical: "" }, {
|
|
37
|
-
default: withCtx(() => [
|
|
38
|
-
renderSlot(_ctx.$slots, "header"),
|
|
39
|
-
createVNode(unref(BaseTransition_default), null, {
|
|
40
|
-
default: withCtx(() => [__props.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [createVNode(unref(NSpin), { style: { "height": "44px" } })]) : renderSlot(_ctx.$slots, "default", { key: 1 }, () => [createElementVNode("div", {
|
|
41
|
-
class: normalizeClass([`${unref(cName)}__content`, __props.contentClass]),
|
|
42
|
-
style: normalizeStyle(__props.contentStyle)
|
|
43
|
-
}, [createVNode(unref(TypeWriter_default), {
|
|
44
|
-
typing: __props.typing,
|
|
45
|
-
markdown: __props.markdown,
|
|
46
|
-
value: __props.content,
|
|
47
|
-
onStop: _cache[0] || (_cache[0] = ($event) => emit("typingComplete"))
|
|
48
|
-
}, null, 8, [
|
|
49
|
-
"typing",
|
|
50
|
-
"markdown",
|
|
51
|
-
"value"
|
|
52
|
-
])], 6)])]),
|
|
53
|
-
_: 3
|
|
54
|
-
}),
|
|
55
|
-
renderSlot(_ctx.$slots, "footer")
|
|
56
|
-
]),
|
|
57
|
-
_: 3
|
|
58
|
-
})]),
|
|
59
|
-
_: 3
|
|
60
|
-
}, 8, ["class"]);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var Bubble_default = _sfc_main;
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
export { Bubble_default as default };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as vue25 from "vue";
|
|
2
|
-
import * as naive_ui15 from "naive-ui";
|
|
3
|
-
|
|
4
|
-
//#region src/components/bubble/Bubble.vue.d.ts
|
|
5
|
-
declare var __VLS_8: {}, __VLS_27: {}, __VLS_35: {}, __VLS_42: {}, __VLS_51: {};
|
|
6
|
-
type __VLS_Slots = {} & {
|
|
7
|
-
avatar?: (props: typeof __VLS_8) => any;
|
|
8
|
-
} & {
|
|
9
|
-
header?: (props: typeof __VLS_27) => any;
|
|
10
|
-
} & {
|
|
11
|
-
loading?: (props: typeof __VLS_35) => any;
|
|
12
|
-
} & {
|
|
13
|
-
default?: (props: typeof __VLS_42) => any;
|
|
14
|
-
} & {
|
|
15
|
-
footer?: (props: typeof __VLS_51) => any;
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_base: vue25.DefineComponent<{
|
|
18
|
-
avatar?: {
|
|
19
|
-
icon?: vue25.VNodeChild;
|
|
20
|
-
props?: naive_ui15.AvatarProps;
|
|
21
|
-
};
|
|
22
|
-
content?: string;
|
|
23
|
-
contentClass?: string;
|
|
24
|
-
contentStyle?: vue25.CSSProperties;
|
|
25
|
-
loading?: boolean;
|
|
26
|
-
typing?: boolean;
|
|
27
|
-
markdown?: boolean;
|
|
28
|
-
placement?: "start" | "end";
|
|
29
|
-
}, {}, {}, {}, {}, vue25.ComponentOptionsMixin, vue25.ComponentOptionsMixin, {} & {
|
|
30
|
-
typingComplete: () => any;
|
|
31
|
-
}, string, vue25.PublicProps, Readonly<{
|
|
32
|
-
avatar?: {
|
|
33
|
-
icon?: vue25.VNodeChild;
|
|
34
|
-
props?: naive_ui15.AvatarProps;
|
|
35
|
-
};
|
|
36
|
-
content?: string;
|
|
37
|
-
contentClass?: string;
|
|
38
|
-
contentStyle?: vue25.CSSProperties;
|
|
39
|
-
loading?: boolean;
|
|
40
|
-
typing?: boolean;
|
|
41
|
-
markdown?: boolean;
|
|
42
|
-
placement?: "start" | "end";
|
|
43
|
-
}> & Readonly<{
|
|
44
|
-
onTypingComplete?: (() => any) | undefined;
|
|
45
|
-
}>, {}, {}, {}, {}, string, vue25.ComponentProvideOptions, false, {}, any>;
|
|
46
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
47
|
-
declare const _default: typeof __VLS_export;
|
|
48
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
-
new (): {
|
|
50
|
-
$slots: S;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
//#endregion
|
|
54
|
-
export { _default };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { cssr, namespace, plugin } from "../_utils/cssr-bem.js";
|
|
2
|
-
|
|
3
|
-
//#region src/components/bubble/bubble.cssr.ts
|
|
4
|
-
const { c, cB, cE, cM } = {
|
|
5
|
-
...cssr,
|
|
6
|
-
...plugin
|
|
7
|
-
};
|
|
8
|
-
const cName = `${namespace}-bubble`;
|
|
9
|
-
function bubbleCssr() {
|
|
10
|
-
return c([cB("bubble", {
|
|
11
|
-
display: "flex",
|
|
12
|
-
gap: "10px",
|
|
13
|
-
fontSize: "var(--n-font-size);"
|
|
14
|
-
}, [cM("reverse", { flexDirection: "row-reverse" }), cE("content", {
|
|
15
|
-
backgroundColor: "var(--tag-color)",
|
|
16
|
-
padding: "10px",
|
|
17
|
-
borderRadius: "var(--border-radius)",
|
|
18
|
-
minHeight: "44px"
|
|
19
|
-
})])]);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { bubbleCssr, cName };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { _default } from "./Bubble.vue.js";
|
|
2
|
-
import { CSSProperties, VNodeChild } from "vue";
|
|
3
|
-
import { AvatarProps } from "naive-ui";
|
|
4
|
-
|
|
5
|
-
//#region src/components/bubble/index.d.ts
|
|
6
|
-
type BubbleProps = {
|
|
7
|
-
avatar?: {
|
|
8
|
-
icon?: VNodeChild;
|
|
9
|
-
props?: AvatarProps;
|
|
10
|
-
};
|
|
11
|
-
content?: string;
|
|
12
|
-
contentClass?: string;
|
|
13
|
-
contentStyle?: CSSProperties;
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
typing?: boolean;
|
|
16
|
-
markdown?: boolean;
|
|
17
|
-
placement?: 'start' | 'end';
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { BubbleProps };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import BaseTransition_default from "../transition/BaseTransition.js";
|
|
2
|
-
import { cName, fullLoadingCssr } from "./full-loading.cssr.js";
|
|
3
|
-
import { Teleport, createBlock, createCommentVNode, createSlots, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderSlot, unref, watchEffect, withCtx } from "vue";
|
|
4
|
-
import { NEl, NSpin } from "naive-ui";
|
|
5
|
-
import { useStyle } from "@oiij/css-render";
|
|
6
|
-
|
|
7
|
-
//#region src/components/full-loading/FullLoading.vue
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "FullLoading",
|
|
10
|
-
props: {
|
|
11
|
-
show: { type: Boolean },
|
|
12
|
-
appendTo: { default: "body" },
|
|
13
|
-
mask: {
|
|
14
|
-
type: [Boolean, Object],
|
|
15
|
-
default: true
|
|
16
|
-
},
|
|
17
|
-
blur: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: true
|
|
20
|
-
},
|
|
21
|
-
disableScroll: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true
|
|
24
|
-
},
|
|
25
|
-
scrollSelector: { default: "body" },
|
|
26
|
-
spinProps: {}
|
|
27
|
-
},
|
|
28
|
-
setup(__props) {
|
|
29
|
-
useStyle(cName, fullLoadingCssr());
|
|
30
|
-
const cacheOverFlow = ref("auto");
|
|
31
|
-
watchEffect(() => {
|
|
32
|
-
if (__props.disableScroll) {
|
|
33
|
-
const el = __props.scrollSelector instanceof HTMLElement ? __props.scrollSelector : document.querySelector(__props.scrollSelector);
|
|
34
|
-
if (el) {
|
|
35
|
-
if (__props.show) cacheOverFlow.value = el.style.overflow;
|
|
36
|
-
el.style.overflow = __props.show ? "hidden" : cacheOverFlow.value;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
return (_ctx, _cache) => {
|
|
41
|
-
return openBlock(), createBlock(unref(BaseTransition_default), null, {
|
|
42
|
-
default: withCtx(() => [(openBlock(), createBlock(Teleport, { to: __props.appendTo }, [__props.show ? (openBlock(), createBlock(unref(NEl), {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: normalizeClass([
|
|
45
|
-
unref(cName),
|
|
46
|
-
{ [`${unref(cName)}--mask`]: __props.mask },
|
|
47
|
-
{ [`${unref(cName)}--blur`]: __props.blur }
|
|
48
|
-
]),
|
|
49
|
-
style: normalizeStyle(typeof __props.mask === "object" ? __props.mask : {})
|
|
50
|
-
}, {
|
|
51
|
-
default: withCtx(() => [createVNode(unref(NSpin), normalizeProps(guardReactiveProps(__props.spinProps)), createSlots({ _: 2 }, [_ctx.$slots.description ? {
|
|
52
|
-
name: "description",
|
|
53
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
54
|
-
key: "0"
|
|
55
|
-
} : void 0, _ctx.$slots.icon ? {
|
|
56
|
-
name: "icon",
|
|
57
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
58
|
-
key: "1"
|
|
59
|
-
} : void 0]), 1040)]),
|
|
60
|
-
_: 3
|
|
61
|
-
}, 8, ["class", "style"])) : createCommentVNode("v-if", true)], 8, ["to"]))]),
|
|
62
|
-
_: 3
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
var FullLoading_default = _sfc_main;
|
|
68
|
-
|
|
69
|
-
//#endregion
|
|
70
|
-
export { FullLoading_default as default };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
-
import "../../components.js";
|
|
3
|
-
import * as vue71 from "vue";
|
|
4
|
-
import * as naive_ui39 from "naive-ui";
|
|
5
|
-
|
|
6
|
-
//#region src/components/full-loading/FullLoading.vue.d.ts
|
|
7
|
-
declare var __VLS_27: {}, __VLS_30: {};
|
|
8
|
-
type __VLS_Slots = {} & {
|
|
9
|
-
description?: (props: typeof __VLS_27) => any;
|
|
10
|
-
} & {
|
|
11
|
-
icon?: (props: typeof __VLS_30) => any;
|
|
12
|
-
};
|
|
13
|
-
declare const __VLS_base: vue71.DefineComponent<{
|
|
14
|
-
show?: boolean;
|
|
15
|
-
appendTo?: string | vue71.RendererElement;
|
|
16
|
-
mask?: boolean | vue71.CSSProperties;
|
|
17
|
-
blur?: boolean;
|
|
18
|
-
disableScroll?: boolean;
|
|
19
|
-
scrollSelector?: string | HTMLElement;
|
|
20
|
-
spinProps?: Omit<naive_ui39.SpinProps, "show"> & ClassStyle;
|
|
21
|
-
}, {}, {}, {}, {}, vue71.ComponentOptionsMixin, vue71.ComponentOptionsMixin, {}, string, vue71.PublicProps, Readonly<{
|
|
22
|
-
show?: boolean;
|
|
23
|
-
appendTo?: string | vue71.RendererElement;
|
|
24
|
-
mask?: boolean | vue71.CSSProperties;
|
|
25
|
-
blur?: boolean;
|
|
26
|
-
disableScroll?: boolean;
|
|
27
|
-
scrollSelector?: string | HTMLElement;
|
|
28
|
-
spinProps?: Omit<naive_ui39.SpinProps, "show"> & ClassStyle;
|
|
29
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, vue71.ComponentProvideOptions, false, {}, any>;
|
|
30
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
-
declare const _default: typeof __VLS_export;
|
|
32
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
-
new (): {
|
|
34
|
-
$slots: S;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
//#endregion
|
|
38
|
-
export { _default };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
-
import { _default } from "./FullLoading.vue.js";
|
|
3
|
-
import { CSSProperties, RendererElement } from "vue";
|
|
4
|
-
import { SpinProps } from "naive-ui";
|
|
5
|
-
|
|
6
|
-
//#region src/components/full-loading/index.d.ts
|
|
7
|
-
type FullLoadingProps = {
|
|
8
|
-
show?: boolean;
|
|
9
|
-
appendTo?: string | RendererElement;
|
|
10
|
-
mask?: boolean | CSSProperties;
|
|
11
|
-
blur?: boolean;
|
|
12
|
-
disableScroll?: boolean;
|
|
13
|
-
scrollSelector?: string | HTMLElement;
|
|
14
|
-
spinProps?: Omit<SpinProps, 'show'> & ClassStyle;
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
export { FullLoadingProps };
|