qidian-vue-ui 2.0.42 → 2.0.44
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/auto-tooltip/index.vue2.mjs +1 -1
- package/dist/components/avatar/index.css +2 -2
- package/dist/components/avatar/index.vue.mjs +1 -1
- package/dist/components/avatar/index.vue2.mjs +15 -5
- package/dist/components/codemirror/index.css +12 -12
- package/dist/components/codemirror/index.vue.mjs +1 -1
- package/dist/components/codemirror/index.vue2.mjs +10 -5
- package/dist/components/crud/table/index.vue2.mjs +4 -4
- package/dist/components/crud/tabs-table/index.css +15 -15
- package/dist/components/crud/tabs-table/index.vue.mjs +1 -1
- package/dist/components/crud/tabs-table/index.vue2.mjs +2 -2
- package/dist/components/dialog/index.vue.mjs +2 -2
- package/dist/components/dict/select/index.vue.mjs +5 -2
- package/dist/components/drawer/index.vue.mjs +3 -2
- package/dist/components/file-viewer/index.css +7 -7
- package/dist/components/file-viewer/index.vue.mjs +1 -1
- package/dist/components/file-viewer/index.vue2.mjs +5 -5
- package/dist/components/grid/item.css +1 -1
- package/dist/components/grid/item.vue.mjs +1 -1
- package/dist/components/grid/item.vue2.mjs +1 -1
- package/dist/components/icon/index.vue.mjs +1 -1
- package/dist/components/image/index.vue.mjs +41 -31
- package/dist/components/md-editor/index.vue.mjs +1 -1
- package/dist/components/md-editor/index.vue2.mjs +1 -1
- package/dist/components/md-editor/index2.css +12 -12
- package/dist/components/multi-file-viewer/index.vue.mjs +17 -6
- package/dist/components/office/pdf/hooks/useZoom.mjs +23 -10
- package/dist/components/office/pdf/index.vue.mjs +1 -1
- package/dist/components/office/pdf/index.vue2.mjs +104 -27
- package/dist/components/office/pdf/index2.css +21 -21
- package/dist/components/office/pdf/utils/image2pdf.mjs +4 -2
- package/dist/components/org/select/index.vue.mjs +6 -0
- package/dist/components/org/tag/index.css +1 -1
- package/dist/components/org/tag/index.vue.mjs +1 -1
- package/dist/components/org/tag/index.vue2.mjs +41 -20
- package/dist/components/read-write/index.css +6 -6
- package/dist/components/read-write/index.vue.mjs +1 -1
- package/dist/components/read-write/index.vue2.mjs +2 -3
- package/dist/components/service/list/index.css +2 -2
- package/dist/components/service/list/index.vue.mjs +1 -1
- package/dist/components/service/list/index.vue2.mjs +4 -3
- package/dist/components/service/table/index.css +58 -49
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +24 -9
- package/dist/components/service-popup-table-select/index.vue.mjs +1 -1
- package/dist/components/service-popup-table-select/index.vue2.mjs +3 -3
- package/dist/components/service-popup-table-select/index2.css +8 -8
- package/dist/components/service-select/index.css +1 -1
- package/dist/components/service-select/index.vue.d.ts +1 -1
- package/dist/components/service-select/index.vue.mjs +1 -1
- package/dist/components/service-select/index.vue2.mjs +3 -1
- package/dist/components/service-tree-select/index.vue.d.ts +1 -1
- package/dist/components/stream-markdown/index.vue.mjs +1 -1
- package/dist/components/stream-markdown/index.vue2.mjs +1 -1
- package/dist/components/stream-markdown/index2.css +1 -1
- package/dist/components/stream-markdown/previewers/echarts.css +2 -2
- package/dist/components/stream-markdown/previewers/echarts.vue.mjs +1 -1
- package/dist/components/stream-markdown/previewers/echarts.vue2.mjs +6 -1
- package/dist/components/stream-markdown/previewers/markmap.css +2 -2
- package/dist/components/stream-markdown/previewers/markmap.vue.mjs +1 -1
- package/dist/components/stream-markdown/previewers/markmap.vue2.mjs +9 -4
- package/dist/components/tinymce/index.css +9 -9
- package/dist/components/tinymce/index.vue.mjs +1 -1
- package/dist/components/tinymce/index.vue2.mjs +5 -2
- package/dist/components/tinymce/preview.vue2.mjs +1 -1
- package/dist/components/upload/file-flow-file-list-display/index.vue2.mjs +1 -1
- package/dist/components/upload/image-file-list-display/index.vue.mjs +7 -4
- package/dist/components/upload/image-flow-file-list-display/index.vue.mjs +2 -2
- package/dist/components/upload/index.css +34 -34
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +25 -13
- package/dist/directive/hasPermi.mjs +1 -1
- package/dist/directive/hasRole.mjs +1 -1
- package/dist/hooks/useAgentChat/index.mjs +1 -1
- package/dist/hooks/useDict/index.mjs +11 -5
- package/dist/hooks/useModal.mjs +2 -2
- package/dist/hooks/useUserAvatar/index.mjs +5 -2
- package/dist/index.mjs +4 -4
- package/dist/utils/{auth.mjs → auth/index.mjs} +1 -1
- package/dist/utils/{date.mjs → date/index.mjs} +3 -3
- package/package.json +10 -3
- /package/dist/utils/{auth.d.ts → auth/index.d.ts} +0 -0
- /package/dist/utils/{date.d.ts → date/index.d.ts} +0 -0
- /package/dist/utils/{overlayStack.d.ts → overlayStack/index.d.ts} +0 -0
- /package/dist/utils/{overlayStack.mjs → overlayStack/index.mjs} +0 -0
- /package/dist/utils/{tools.d.ts → tools/index.d.ts} +0 -0
- /package/dist/utils/{tools.mjs → tools/index.mjs} +0 -0
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import { defineComponent, useCssVars, useTemplateRef, ref, computed, watch, nextTick, createElementBlock, openBlock, createVNode, renderSlot, unref, withCtx, withDirectives, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
3
3
|
import { resizeDirective } from "qidian-shared";
|
|
4
4
|
import { Tooltip } from "tdesign-vue-next";
|
|
5
|
-
import { reAttach } from "../../utils/tools.mjs";
|
|
5
|
+
import { reAttach } from "../../utils/tools/index.mjs";
|
|
6
6
|
const _hoisted_1 = { class: "qd-auto-tooltip" };
|
|
7
7
|
const _hoisted_2 = {
|
|
8
8
|
key: 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.qd-avatar[data-v-
|
|
1
|
+
.qd-avatar[data-v-e6856505] {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
font: var(--td-font-body-medium);
|
|
5
5
|
color: var(--td-text-color-primary);
|
|
6
6
|
}
|
|
7
|
-
.qd-avatar__name[data-v-
|
|
7
|
+
.qd-avatar__name[data-v-e6856505] {
|
|
8
8
|
margin-left: var(--td-comp-margin-s);
|
|
9
9
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e6856505"]]);
|
|
6
6
|
export {
|
|
7
7
|
index as default
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css'
|
|
2
|
-
import { defineComponent, mergeDefaults, inject, computed, ref, watch, createElementBlock, openBlock, withDirectives, createCommentVNode, createBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createVNode, renderList, normalizeProps, guardReactiveProps, normalizeClass, toDisplayString } from "vue";
|
|
3
|
-
import { isEmpty, validator, abortWrapper, filterSlots } from "qidian-shared";
|
|
2
|
+
import { defineComponent, mergeDefaults, inject, computed, ref, watch, onUnmounted, createElementBlock, openBlock, withDirectives, createCommentVNode, createBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createVNode, renderList, normalizeProps, guardReactiveProps, normalizeClass, toDisplayString } from "vue";
|
|
3
|
+
import { isEmpty, validator, abortWrapper, to, filterSlots } from "qidian-shared";
|
|
4
4
|
import { UserIcon } from "tdesign-icons-vue-next";
|
|
5
5
|
import { Avatar, LoadingDirective } from "tdesign-vue-next";
|
|
6
6
|
import { PROVIDE_AVATAR } from "../config-provider/config.mjs";
|
|
@@ -38,6 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
computed(() => void 0)
|
|
39
39
|
);
|
|
40
40
|
const { loading, getAvatar } = useUserAvatar();
|
|
41
|
+
const serviceAbortReason = /* @__PURE__ */ Symbol("abort");
|
|
41
42
|
let serviceAbort;
|
|
42
43
|
const reImage = ref();
|
|
43
44
|
const reProps = computed(() => {
|
|
@@ -72,7 +73,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
73
|
() => reProps.value.image,
|
|
73
74
|
async (newVal, oldVal) => {
|
|
74
75
|
if (newVal === oldVal) return;
|
|
75
|
-
serviceAbort?.abort?.(
|
|
76
|
+
serviceAbort?.abort?.(serviceAbortReason);
|
|
77
|
+
serviceAbort = void 0;
|
|
76
78
|
const { mode, serviceOptions } = reProps.value;
|
|
77
79
|
if (mode === "ossId") {
|
|
78
80
|
const { service } = serviceOptions;
|
|
@@ -80,8 +82,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
82
|
reImage.value = newVal;
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
const currentRequest = abortWrapper(getAvatar(newVal));
|
|
86
|
+
serviceAbort = currentRequest;
|
|
87
|
+
const [error, res] = await to(currentRequest);
|
|
88
|
+
if (serviceAbort !== currentRequest) return;
|
|
89
|
+
serviceAbort = void 0;
|
|
90
|
+
if (error) throw error;
|
|
85
91
|
reImage.value = res;
|
|
86
92
|
return;
|
|
87
93
|
}
|
|
@@ -89,6 +95,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
95
|
},
|
|
90
96
|
{ immediate: true }
|
|
91
97
|
);
|
|
98
|
+
onUnmounted(() => {
|
|
99
|
+
serviceAbort?.abort?.(serviceAbortReason);
|
|
100
|
+
serviceAbort = void 0;
|
|
101
|
+
});
|
|
92
102
|
return (_ctx, _cache) => {
|
|
93
103
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
94
104
|
withDirectives((openBlock(), createBlock(unref(Avatar), mergeProps({ class: __props.avatarClassName }, reProps.value.avatarOptions, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.qd-codemirror[data-v-
|
|
1
|
+
.qd-codemirror[data-v-a21483c7] {
|
|
2
2
|
--cm-color: var(--td-text-color-primary);
|
|
3
3
|
--cm-border-color: var(--td-border-level-2-color);
|
|
4
4
|
--cm-bk-color: var(--td-bg-color-specialcomponent);
|
|
@@ -9,41 +9,41 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
transition: border cubic-bezier(0.38, 0, 0.24, 1) 0.2s, box-shadow cubic-bezier(0.38, 0, 0.24, 1) 0.2s, background-color cubic-bezier(0.38, 0, 0.24, 1) 0.2s;
|
|
11
11
|
}
|
|
12
|
-
.qd-codemirror[data-v-
|
|
12
|
+
.qd-codemirror[data-v-a21483c7]:hover {
|
|
13
13
|
border-color: var(--td-brand-color);
|
|
14
14
|
}
|
|
15
|
-
.qd-codemirror.qd-codemirror--focus[data-v-
|
|
15
|
+
.qd-codemirror.qd-codemirror--focus[data-v-a21483c7] {
|
|
16
16
|
border-color: var(--td-brand-color);
|
|
17
17
|
box-shadow: 0 0 0 2px var(--td-brand-color-focus);
|
|
18
18
|
}
|
|
19
|
-
.qd-codemirror.qd-codemirror--disabled[data-v-
|
|
19
|
+
.qd-codemirror.qd-codemirror--disabled[data-v-a21483c7] {
|
|
20
20
|
color: var(--td-text-color-disabled);
|
|
21
21
|
background-color: var(--td-bg-color-component-disabled);
|
|
22
22
|
cursor: not-allowed;
|
|
23
23
|
}
|
|
24
|
-
.qd-codemirror.qd-codemirror--disabled[data-v-
|
|
24
|
+
.qd-codemirror.qd-codemirror--disabled[data-v-a21483c7] .cm-editor {
|
|
25
25
|
background-color: transparent;
|
|
26
26
|
}
|
|
27
|
-
.qd-codemirror.qd-codemirror--disabled[data-v-
|
|
27
|
+
.qd-codemirror.qd-codemirror--disabled[data-v-a21483c7]:hover {
|
|
28
28
|
border-color: var(--td-border-level-2-color);
|
|
29
29
|
}
|
|
30
|
-
.qd-codemirror[data-v-
|
|
30
|
+
.qd-codemirror[data-v-a21483c7] .cm-editor {
|
|
31
31
|
font: var(--td-font-body-medium);
|
|
32
32
|
height: 100%;
|
|
33
33
|
}
|
|
34
|
-
.qd-codemirror[data-v-
|
|
34
|
+
.qd-codemirror[data-v-a21483c7] .cm-scroller {
|
|
35
35
|
line-height: inherit !important;
|
|
36
36
|
}
|
|
37
|
-
.qd-codemirror[data-v-
|
|
37
|
+
.qd-codemirror[data-v-a21483c7] .cm-content {
|
|
38
38
|
margin: 0 !important;
|
|
39
39
|
padding: calc(calc(var(--td-comp-size-m) - var(--td-line-height-body-medium)) / 2) var(--td-comp-paddingLR-s);
|
|
40
40
|
}
|
|
41
|
-
.qd-codemirror[data-v-
|
|
41
|
+
.qd-codemirror[data-v-a21483c7] .ͼ1 .cm-placeholder {
|
|
42
42
|
color: var(--td-text-color-placeholder);
|
|
43
43
|
}
|
|
44
|
-
.t-is-error .qd-codemirror[data-v-
|
|
44
|
+
.t-is-error .qd-codemirror[data-v-a21483c7] {
|
|
45
45
|
border-color: var(--td-error-color);
|
|
46
46
|
}
|
|
47
|
-
.t-is-error .qd-codemirror--focus[data-v-
|
|
47
|
+
.t-is-error .qd-codemirror--focus[data-v-a21483c7] {
|
|
48
48
|
box-shadow: 0 0 0 2px var(--td-error-color-focus);
|
|
49
49
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a21483c7"]]);
|
|
6
6
|
export {
|
|
7
7
|
index as default
|
|
8
8
|
};
|
|
@@ -49,13 +49,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
const languageExtension = ref(null);
|
|
50
50
|
watch(
|
|
51
51
|
() => props.language,
|
|
52
|
-
async (lang) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
52
|
+
async (lang, _oldLang, onCleanup) => {
|
|
53
|
+
let active = true;
|
|
54
|
+
onCleanup(() => {
|
|
55
|
+
active = false;
|
|
56
|
+
});
|
|
57
|
+
if (!lang || !languages[lang]) {
|
|
57
58
|
languageExtension.value = null;
|
|
59
|
+
return;
|
|
58
60
|
}
|
|
61
|
+
const module = await languages[lang]();
|
|
62
|
+
if (!active) return;
|
|
63
|
+
languageExtension.value = module.default();
|
|
59
64
|
},
|
|
60
65
|
{ immediate: true }
|
|
61
66
|
);
|
|
@@ -19,7 +19,7 @@ import _sfc_main$2 from "../../dialog/form.vue.mjs";
|
|
|
19
19
|
import QdColumnsController from "../../columns-controller/index.vue.mjs";
|
|
20
20
|
import get from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.mjs";
|
|
21
21
|
import QdServiceTable from "../../service/table/index.vue.mjs";
|
|
22
|
-
import { hasPermiOr } from "../../../utils/auth.mjs";
|
|
22
|
+
import { hasPermiOr } from "../../../utils/auth/index.mjs";
|
|
23
23
|
const _hoisted_1 = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "qd-crud-table__toolbar-separator"
|
|
@@ -1026,14 +1026,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1026
1026
|
const {
|
|
1027
1027
|
colIndex,
|
|
1028
1028
|
rowIndex,
|
|
1029
|
-
index,
|
|
1029
|
+
index: index$1,
|
|
1030
1030
|
mapKey
|
|
1031
1031
|
} = cellIndex;
|
|
1032
1032
|
if (isEmpty(colIndex) && isEmpty(rowIndex)) {
|
|
1033
|
-
ifRenderMap[`${mapKey || "action"}.${index}`] = ifRender;
|
|
1033
|
+
ifRenderMap[`${mapKey || "action"}.${index$1}`] = ifRender;
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
|
-
ifRenderMap[`${colIndex}.${rowIndex}.${index}`] = ifRender;
|
|
1036
|
+
ifRenderMap[`${colIndex}.${rowIndex}.${index$1}`] = ifRender;
|
|
1037
1037
|
}
|
|
1038
1038
|
function getActionSeparator(action, cellIndex) {
|
|
1039
1039
|
const {
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
.qd-crud-tabs-table[data-v-
|
|
1
|
+
.qd-crud-tabs-table[data-v-e9eff854] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 100%;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
}
|
|
7
|
-
.qd-crud-tabs-table__nav[data-v-
|
|
7
|
+
.qd-crud-tabs-table__nav[data-v-e9eff854] {
|
|
8
8
|
width: 100%;
|
|
9
9
|
flex-shrink: 0;
|
|
10
10
|
border-top-left-radius: var(--td-radius-medium);
|
|
11
11
|
border-top-right-radius: var(--td-radius-medium);
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
}
|
|
14
|
-
.qd-crud-tabs-table__nav[data-v-
|
|
14
|
+
.qd-crud-tabs-table__nav[data-v-e9eff854] .t-tabs__content {
|
|
15
15
|
display: none;
|
|
16
16
|
}
|
|
17
|
-
.qd-crud-tabs-table__nav[data-v-
|
|
17
|
+
.qd-crud-tabs-table__nav[data-v-e9eff854] .t-tabs__nav-item {
|
|
18
18
|
overflow: visible;
|
|
19
19
|
}
|
|
20
|
-
.qd-crud-tabs-table__shared-search[data-v-
|
|
20
|
+
.qd-crud-tabs-table__shared-search[data-v-e9eff854] {
|
|
21
21
|
border-top-left-radius: 0;
|
|
22
22
|
border-top-right-radius: 0;
|
|
23
23
|
}
|
|
24
|
-
.qd-crud-tabs-table__shared-search + .qd-crud-tabs-table__content[data-v-
|
|
24
|
+
.qd-crud-tabs-table__shared-search + .qd-crud-tabs-table__content[data-v-e9eff854] {
|
|
25
25
|
margin-top: var(--td-comp-margin-l);
|
|
26
26
|
}
|
|
27
|
-
.qd-crud-tabs-table__shared-search + .qd-crud-tabs-table__content[data-v-
|
|
27
|
+
.qd-crud-tabs-table__shared-search + .qd-crud-tabs-table__content[data-v-e9eff854] .qd-crud-table__body {
|
|
28
28
|
border-top-left-radius: var(--td-radius-medium);
|
|
29
29
|
border-top-right-radius: var(--td-radius-medium);
|
|
30
30
|
}
|
|
31
|
-
.qd-crud-tabs-table__content[data-v-
|
|
31
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] {
|
|
32
32
|
flex: auto;
|
|
33
33
|
overflow: visible;
|
|
34
34
|
background-color: transparent;
|
|
35
35
|
}
|
|
36
|
-
.qd-crud-tabs-table__content[data-v-
|
|
36
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .t-tabs__header {
|
|
37
37
|
display: none;
|
|
38
38
|
}
|
|
39
|
-
.qd-crud-tabs-table__content[data-v-
|
|
39
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .t-tabs__content {
|
|
40
40
|
height: 100%;
|
|
41
41
|
}
|
|
42
|
-
.qd-crud-tabs-table__content[data-v-
|
|
42
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .t-tabs__nav-item {
|
|
43
43
|
overflow: visible;
|
|
44
44
|
}
|
|
45
|
-
.qd-crud-tabs-table__content[data-v-
|
|
45
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .t-tab-panel {
|
|
46
46
|
height: 100%;
|
|
47
47
|
}
|
|
48
|
-
.qd-crud-tabs-table__content[data-v-
|
|
49
|
-
.qd-crud-tabs-table__content[data-v-
|
|
48
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .qd-crud-table .qd-crud-search,
|
|
49
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .qd-crud-table__body {
|
|
50
50
|
border-top-left-radius: 0;
|
|
51
51
|
border-top-right-radius: 0;
|
|
52
52
|
}
|
|
53
|
-
.qd-crud-tabs-table__content[data-v-
|
|
53
|
+
.qd-crud-tabs-table__content[data-v-e9eff854] .qd-crud-table .qd-crud-search + .qd-crud-table__body {
|
|
54
54
|
border-top-left-radius: var(--td-radius-medium);
|
|
55
55
|
border-top-right-radius: var(--td-radius-medium);
|
|
56
56
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdCrudTabsTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdCrudTabsTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9eff854"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdCrudTabsTable as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css'
|
|
2
2
|
import { defineComponent, mergeDefaults, computed, useTemplateRef, createElementBlock, openBlock, renderSlot, Fragment, createVNode, createBlock, createCommentVNode, unref, isRef, createSlots, withCtx, renderList, mergeProps, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
3
3
|
import { useVModels } from "../../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
4
|
-
import { useTplRefsList, createExposeProxy, extractSlotsWithPrefix, extractSlotsWithoutPrefix } from "qidian-shared";
|
|
4
|
+
import { useTplRefsList, createExposeProxy, extractSlotsWithPrefix, extractSlotsWithoutPrefix, isEmpty } from "qidian-shared";
|
|
5
5
|
import { Tabs, TabPanel, Empty } from "tdesign-vue-next";
|
|
6
6
|
import { useConfig } from "../../config-provider/useConfig.mjs";
|
|
7
7
|
import { qdCrudTabsTableProps } from "./props.mjs";
|
|
@@ -219,7 +219,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
219
219
|
return tableRefs.value[fIdx];
|
|
220
220
|
});
|
|
221
221
|
function initActiveTab() {
|
|
222
|
-
if (!reProps.value.tabs.length || activeTab.value) return;
|
|
222
|
+
if (!reProps.value.tabs.length || !isEmpty(activeTab.value)) return;
|
|
223
223
|
activeTab.value = reProps.value.tabs[0].value;
|
|
224
224
|
}
|
|
225
225
|
function buildCrudOptions(tab, baseOptions) {
|
|
@@ -4,8 +4,8 @@ import { useDraggable, useVModels } from "../../node_modules/.pnpm/@vueuse_core@
|
|
|
4
4
|
import { useActivated, domOn, suspectedWrapperPromise, isEmpty, filterSlots } from "qidian-shared";
|
|
5
5
|
import { FullscreenExitIcon, FullscreenIcon } from "tdesign-icons-vue-next";
|
|
6
6
|
import { Dialog, Divider, Button } from "tdesign-vue-next";
|
|
7
|
-
import { OVERLAY_TRANSPARENT_CLASS, OVERLAY_CLOSING_CLASS, updateOverlayMasks, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack.mjs";
|
|
8
|
-
import { reAttach, resolveAttachParent, getTransformOffset } from "../../utils/tools.mjs";
|
|
7
|
+
import { OVERLAY_TRANSPARENT_CLASS, OVERLAY_CLOSING_CLASS, updateOverlayMasks, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack/index.mjs";
|
|
8
|
+
import { reAttach, resolveAttachParent, getTransformOffset } from "../../utils/tools/index.mjs";
|
|
9
9
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
10
10
|
import { qdDialogProps } from "./props.mjs";
|
|
11
11
|
import debounce from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.mjs";
|
|
@@ -241,8 +241,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
241
241
|
function setDefaultSelectFirst(data) {
|
|
242
242
|
if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && data.length) {
|
|
243
243
|
const firstOption = data[0];
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
const { multiple, valueType } = reProps.value.selectOptions;
|
|
245
|
+
const firstValue = valueType === "object" ? firstOption : firstOption.value;
|
|
246
|
+
const value = multiple ? [firstValue] : firstValue;
|
|
247
|
+
reModelValue.value = value;
|
|
248
|
+
props.onDefaultSelectFirst?.(value, {
|
|
246
249
|
option: firstOption,
|
|
247
250
|
selectedOptions: [firstOption],
|
|
248
251
|
trigger: "default"
|
|
@@ -3,8 +3,8 @@ import { defineComponent, mergeDefaults, getCurrentInstance, ref, computed, watc
|
|
|
3
3
|
import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
4
4
|
import { useActivated, suspectedWrapperPromise } from "qidian-shared";
|
|
5
5
|
import { Drawer } from "tdesign-vue-next";
|
|
6
|
-
import { OVERLAY_CLOSING_CLASS, OVERLAY_TRANSPARENT_CLASS, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, updateOverlayMasks, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack.mjs";
|
|
7
|
-
import { reAttach, resolveAttachParent } from "../../utils/tools.mjs";
|
|
6
|
+
import { OVERLAY_CLOSING_CLASS, OVERLAY_TRANSPARENT_CLASS, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, updateOverlayMasks, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack/index.mjs";
|
|
7
|
+
import { reAttach, resolveAttachParent } from "../../utils/tools/index.mjs";
|
|
8
8
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
9
9
|
import { qdDrawerProps } from "./props.mjs";
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -69,6 +69,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
69
|
drawerOptions: {
|
|
70
70
|
...drawerOptions,
|
|
71
71
|
attach: reAttach(drawerOptions.attach ?? t("attach") ?? "body"),
|
|
72
|
+
confirmLoading: reConfirmLoading,
|
|
72
73
|
closeOnEscKeydown: hasMask ? false : reConfirmLoading ? false : drawerOptions.closeOnEscKeydown,
|
|
73
74
|
closeOnOverlayClick: reConfirmLoading ? false : drawerOptions.closeOnOverlayClick,
|
|
74
75
|
closeBtn: reConfirmLoading ? false : drawerOptions.closeBtn,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.qd-file-viewer[data-v-
|
|
2
|
-
.qd-file-viewer__content[data-v-
|
|
1
|
+
.qd-file-viewer[data-v-c97b62de],
|
|
2
|
+
.qd-file-viewer__content[data-v-c97b62de] {
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
|
5
5
|
}
|
|
6
|
-
.qd-file-viewer--image[data-v-
|
|
6
|
+
.qd-file-viewer--image[data-v-c97b62de] {
|
|
7
7
|
transform: translate3d(0, 0, 0);
|
|
8
8
|
}
|
|
9
|
-
.qd-file-viewer--image[data-v-
|
|
9
|
+
.qd-file-viewer--image[data-v-c97b62de] .t-image-viewer__trigger {
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
|
-
.qd-file-viewer--image[data-v-
|
|
13
|
-
.qd-file-viewer--image[data-v-
|
|
12
|
+
.qd-file-viewer--image[data-v-c97b62de] .t-image-viewer__modal-box,
|
|
13
|
+
.qd-file-viewer--image[data-v-c97b62de] .t-image-viewer-preview-image {
|
|
14
14
|
animation: none;
|
|
15
15
|
}
|
|
16
|
-
.qd-file-viewer--image[data-v-
|
|
16
|
+
.qd-file-viewer--image[data-v-c97b62de] .t-image-viewer__modal-mask {
|
|
17
17
|
transition: none;
|
|
18
18
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdFileViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdFileViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c97b62de"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdFileViewer as default
|
|
8
8
|
};
|
|
@@ -3,7 +3,7 @@ import { defineComponent, ref, computed, watch, nextTick, createElementBlock, op
|
|
|
3
3
|
import { allRenderers } from "@file-viewer/preset-all";
|
|
4
4
|
import { FileViewer } from "@file-viewer/vue3";
|
|
5
5
|
import { ImageViewer } from "tdesign-vue-next";
|
|
6
|
-
import { isImage, reAttach } from "../../utils/tools.mjs";
|
|
6
|
+
import { isImage, reAttach } from "../../utils/tools/index.mjs";
|
|
7
7
|
import { useTheme } from "../../hooks/useTheme.mjs";
|
|
8
8
|
import QdOfficePdf from "../office/pdf/index.vue.mjs";
|
|
9
9
|
import merge from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
@@ -33,11 +33,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
const { file, src } = props;
|
|
34
34
|
if (file) {
|
|
35
35
|
if ("type" in file && file.type === "application/pdf") return true;
|
|
36
|
-
if ("name" in file && file.name.endsWith(".pdf")) return true;
|
|
36
|
+
if ("name" in file && file.name.toLowerCase().endsWith(".pdf")) return true;
|
|
37
37
|
}
|
|
38
38
|
if (src) {
|
|
39
39
|
const pathname = new URL(src, "https://x").pathname;
|
|
40
|
-
if (pathname.endsWith(".pdf")) return true;
|
|
40
|
+
if (pathname.toLowerCase().endsWith(".pdf")) return true;
|
|
41
41
|
}
|
|
42
42
|
return false;
|
|
43
43
|
});
|
|
@@ -45,11 +45,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
const { file, src } = props;
|
|
46
46
|
if (file) {
|
|
47
47
|
if ("type" in file && file.type === "image/svg+xml") return true;
|
|
48
|
-
if ("name" in file && file.name.endsWith(".svg")) return true;
|
|
48
|
+
if ("name" in file && file.name.toLowerCase().endsWith(".svg")) return true;
|
|
49
49
|
}
|
|
50
50
|
if (src) {
|
|
51
51
|
const pathname = new URL(src, "https://x").pathname;
|
|
52
|
-
if (pathname.endsWith(".svg")) return true;
|
|
52
|
+
if (pathname.toLowerCase().endsWith(".svg")) return true;
|
|
53
53
|
}
|
|
54
54
|
return false;
|
|
55
55
|
});
|
|
@@ -2,7 +2,7 @@ import './item.css'
|
|
|
2
2
|
import _sfc_main from "./item.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f601eb1d"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdGridItem as default
|
|
8
8
|
};
|
|
@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
const gridWidth = inject(PROVIDE_GRID_WIDTH_KEY, ref(DEFAULT_GRID_WIDTH));
|
|
18
18
|
const reProps = computed(() => {
|
|
19
19
|
const mergeGutterValue = (prop, defaultProp) => {
|
|
20
|
-
if (
|
|
20
|
+
if (prop === void 0) return defaultProp;
|
|
21
21
|
if (!defaultProp) return prop;
|
|
22
22
|
if (typeof prop === "number" || typeof defaultProp === "number") return prop;
|
|
23
23
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, defineAsyncComponent, createBlock, openBlock, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { formatGlob } from "qidian-shared";
|
|
3
|
-
import { useUICsl } from "../../utils/tools.mjs";
|
|
3
|
+
import { useUICsl } from "../../utils/tools/index.mjs";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
...{
|
|
6
6
|
name: "QdIcon"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, mergeDefaults, inject, computed, ref, watch, withDirectives, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createVNode, renderList, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
-
import { isEmpty, validator,
|
|
1
|
+
import { defineComponent, mergeDefaults, inject, computed, ref, watch, onUnmounted, withDirectives, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, renderSlot, createVNode, renderList, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import { isEmpty, validator, abortWrapper, to, filterSlots, suspectedWrapperPromise } from "qidian-shared";
|
|
3
3
|
import { ImageErrorIcon, LoadingIcon } from "tdesign-icons-vue-next";
|
|
4
4
|
import { Image, LoadingDirective } from "tdesign-vue-next";
|
|
5
5
|
import { PROVIDE_UPLOAD } from "../config-provider/config.mjs";
|
|
@@ -50,52 +50,62 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
52
|
const serviceLoad = ref(false);
|
|
53
|
+
const serviceAbortReason = /* @__PURE__ */ Symbol("abort");
|
|
54
|
+
let serviceAbort;
|
|
55
|
+
async function requestSrc(currentParams, listOssByIds) {
|
|
56
|
+
const { service, transformParams, transformRes } = listOssByIds;
|
|
57
|
+
if (!service) return;
|
|
58
|
+
let serviceParams = currentParams;
|
|
59
|
+
if (transformParams) {
|
|
60
|
+
const [trErr, trRes] = await suspectedWrapperPromise(transformParams(currentParams));
|
|
61
|
+
if (trErr) throw trErr;
|
|
62
|
+
serviceParams = trRes;
|
|
63
|
+
}
|
|
64
|
+
const [serviceErr, serviceRes] = await to(service(serviceParams));
|
|
65
|
+
if (serviceErr) throw serviceErr;
|
|
66
|
+
let res;
|
|
67
|
+
if (transformRes) {
|
|
68
|
+
const [trErr, trRes] = await suspectedWrapperPromise(transformRes(serviceRes));
|
|
69
|
+
if (trErr) throw trErr;
|
|
70
|
+
res = trRes;
|
|
71
|
+
} else {
|
|
72
|
+
res = serviceRes;
|
|
73
|
+
}
|
|
74
|
+
return res[0]?.url;
|
|
75
|
+
}
|
|
53
76
|
watch(
|
|
54
77
|
() => reProps.value.src,
|
|
55
78
|
async (newVal, oldVal) => {
|
|
56
79
|
if (newVal === oldVal) return;
|
|
80
|
+
serviceAbort?.abort?.(serviceAbortReason);
|
|
81
|
+
serviceAbort = void 0;
|
|
57
82
|
const { mode, listOssByIds } = reProps.value;
|
|
58
83
|
if (mode === "ossId") {
|
|
59
84
|
if (!listOssByIds || !listOssByIds.service || isEmpty(newVal) || newVal instanceof File || validator(newVal, "url")) {
|
|
85
|
+
serviceLoad.value = false;
|
|
60
86
|
reSrc.value = newVal;
|
|
61
87
|
return;
|
|
62
88
|
}
|
|
63
|
-
const { service, transformParams, transformRes } = listOssByIds;
|
|
64
89
|
serviceLoad.value = true;
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
tParams = trRes;
|
|
74
|
-
}
|
|
75
|
-
const [serviceErr, serviceRes] = await to(
|
|
76
|
-
service(tParams || currentParams)
|
|
77
|
-
);
|
|
78
|
-
if (serviceErr) {
|
|
79
|
-
serviceLoad.value = false;
|
|
80
|
-
throw serviceErr;
|
|
81
|
-
}
|
|
82
|
-
let res;
|
|
83
|
-
if (transformRes) {
|
|
84
|
-
const [trErr, trRes] = await suspectedWrapperPromise(transformRes(serviceRes));
|
|
85
|
-
serviceLoad.value = false;
|
|
86
|
-
if (trErr) throw trErr;
|
|
87
|
-
res = trRes;
|
|
88
|
-
} else {
|
|
89
|
-
serviceLoad.value = false;
|
|
90
|
-
res = serviceRes;
|
|
91
|
-
}
|
|
92
|
-
reSrc.value = res[0]?.url;
|
|
90
|
+
const currentRequest = abortWrapper(requestSrc(newVal, listOssByIds));
|
|
91
|
+
serviceAbort = currentRequest;
|
|
92
|
+
const [error, src] = await to(currentRequest);
|
|
93
|
+
if (serviceAbort !== currentRequest) return;
|
|
94
|
+
serviceAbort = void 0;
|
|
95
|
+
serviceLoad.value = false;
|
|
96
|
+
if (error) throw error;
|
|
97
|
+
reSrc.value = src;
|
|
93
98
|
return;
|
|
94
99
|
}
|
|
100
|
+
serviceLoad.value = false;
|
|
95
101
|
reSrc.value = newVal;
|
|
96
102
|
},
|
|
97
103
|
{ immediate: true }
|
|
98
104
|
);
|
|
105
|
+
onUnmounted(() => {
|
|
106
|
+
serviceAbort?.abort?.(serviceAbortReason);
|
|
107
|
+
serviceAbort = void 0;
|
|
108
|
+
});
|
|
99
109
|
return (_ctx, _cache) => {
|
|
100
110
|
return withDirectives((openBlock(), createBlock(unref(Image), mergeProps(reProps.value.imageOptions, {
|
|
101
111
|
src: typeof reSrc.value === "number" ? reSrc.value + "" : reSrc.value
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./index.vue2.mjs";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20684325"]]);
|
|
8
8
|
export {
|
|
9
9
|
index as default
|
|
10
10
|
};
|
|
@@ -142,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
142
142
|
tdFormItem?.handleBlur();
|
|
143
143
|
onBlur?.(evt);
|
|
144
144
|
};
|
|
145
|
-
const reToolbars = tdReadonly.value || tdDisabled.value ? ["=", "pageFullscreen", "preview"] : toolbars ??
|
|
145
|
+
const reToolbars = tdReadonly.value || tdDisabled.value ? ["=", "pageFullscreen", "preview"] : [...toolbars ?? qdMdEditorToolbars];
|
|
146
146
|
const reDisabledUploadImg = disabledUploadImg ?? true;
|
|
147
147
|
if (reDisabledUploadImg) {
|
|
148
148
|
const imgIdx = reToolbars.findIndex((item) => item === "image");
|