@ibiz-template/mob-vue3-components 0.7.41-alpha.11 → 0.7.41-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-TTGYeV0q.js +76 -0
- package/dist/index-TTGYeV0q.js.map +1 -0
- package/dist/index.min.css +9 -9
- package/dist/index.system.min.js +1 -1
- package/dist/{quill-editor-5QOfComp.js → quill-editor-VqApoQJq.js} +2 -2
- package/dist/{quill-editor-5QOfComp.js.map → quill-editor-VqApoQJq.js.map} +1 -1
- package/dist/{quill-editor-preview-65f3RVj0.js → quill-editor-preview-G0MpMJzC.js} +2 -2
- package/dist/{quill-editor-preview-65f3RVj0.js.map → quill-editor-preview-G0MpMJzC.js.map} +1 -1
- package/dist/{quill-sraxwYmv.js → quill-wfN-3C_3.js} +2 -2
- package/dist/{quill-sraxwYmv.js.map → quill-wfN-3C_3.js.map} +1 -1
- package/es/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.d.ts +1 -1
- package/es/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.mjs +11 -4
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +2 -0
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +3 -0
- package/es/editor/upload/upload-editor.controller.d.ts +4 -0
- package/es/editor/upload/upload-editor.controller.mjs +15 -1
- package/es/editor/upload/use/use-van-upload.d.ts +1 -0
- package/es/editor/upload/use/use-van-upload.mjs +8 -2
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.controller.d.ts +54 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.controller.mjs +76 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.css +1 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.d.ts +43 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.mjs +80 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.provider.d.ts +14 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.provider.mjs +21 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.state.d.ts +10 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.state.mjs +7 -0
- package/es/panel-component/index-blank-placeholder/index.d.ts +25 -0
- package/es/panel-component/index-blank-placeholder/index.mjs +19 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/util/directive/loading.mjs +1 -0
- package/lib/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.cjs +10 -3
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +3 -0
- package/lib/editor/upload/upload-editor.controller.cjs +15 -1
- package/lib/editor/upload/use/use-van-upload.cjs +8 -2
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.cjs +82 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.controller.cjs +78 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.css +1 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.provider.cjs +23 -0
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.state.cjs +9 -0
- package/lib/panel-component/index-blank-placeholder/index.cjs +25 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/util/directive/loading.cjs +1 -0
- package/package.json +5 -5
- package/dist/index-q0SBDv6c.js +0 -76
- package/dist/index-q0SBDv6c.js.map +0 -1
- package/es/editor/upload/use/use-ibiz-upload.d.ts +0 -95
- package/es/editor/upload/use/use-ibiz-upload.mjs +0 -170
- package/lib/editor/upload/use/use-ibiz-upload.cjs +0 -175
|
@@ -36,7 +36,7 @@ export declare const IBizCascaderDropdown: import("vue").DefineComponent<{
|
|
|
36
36
|
show: Ref<boolean>;
|
|
37
37
|
treeData: Ref<import("@ibiz-template/core").IApiData[]>;
|
|
38
38
|
selectValue: Ref<string | string[] | string[][] | null>;
|
|
39
|
-
curValue:
|
|
39
|
+
curValue: Ref<string>;
|
|
40
40
|
onBlur: () => void;
|
|
41
41
|
onFocus: () => void;
|
|
42
42
|
openPopup: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref,
|
|
1
|
+
import { ref, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { getDropdownProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { isNil } from 'ramda';
|
|
4
4
|
import { IBizCommonRightIcon } from '../../common/right-icon/right-icon.mjs';
|
|
@@ -18,6 +18,7 @@ const IBizCascaderDropdown = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const c = props.controller;
|
|
19
19
|
const treeData = ref([]);
|
|
20
20
|
const codeListMap = /* @__PURE__ */ new Map();
|
|
21
|
+
const curValue = ref("");
|
|
21
22
|
const selectValue = ref(null);
|
|
22
23
|
const show = ref(false);
|
|
23
24
|
const onClose = () => {
|
|
@@ -57,6 +58,10 @@ const IBizCascaderDropdown = /* @__PURE__ */ defineComponent({
|
|
|
57
58
|
pvaluefield
|
|
58
59
|
} = c.editorParams;
|
|
59
60
|
treeData.value = transformTreeData(codeList, pvaluefield);
|
|
61
|
+
if (props.value) {
|
|
62
|
+
const item = codeListMap.get(props.value);
|
|
63
|
+
curValue.value = (item == null ? void 0 : item.text) || "";
|
|
64
|
+
}
|
|
60
65
|
};
|
|
61
66
|
loadCodeList();
|
|
62
67
|
const onFinish = ($event) => {
|
|
@@ -72,9 +77,11 @@ const IBizCascaderDropdown = /* @__PURE__ */ defineComponent({
|
|
|
72
77
|
} = $event;
|
|
73
78
|
emit("change", value);
|
|
74
79
|
};
|
|
75
|
-
|
|
76
|
-
const item = codeListMap.get(
|
|
77
|
-
|
|
80
|
+
watch(() => props.value, (newVal) => {
|
|
81
|
+
const item = codeListMap.get(newVal || "");
|
|
82
|
+
curValue.value = (item == null ? void 0 : item.text) || "";
|
|
83
|
+
}, {
|
|
84
|
+
immediate: true
|
|
78
85
|
});
|
|
79
86
|
const onBlur = () => {
|
|
80
87
|
emit("blur");
|
|
@@ -8,6 +8,7 @@ import { UploadEditorController } from '../upload-editor.controller';
|
|
|
8
8
|
* @editorparams {name:accept,parameterType:string,description:允许上传的文件类型,van-uploader组件的accept属性}
|
|
9
9
|
* @editorparams {name:uploadParams,parameterType:IData,description:上传参数}
|
|
10
10
|
* @editorparams {name:exportParams,parameterType:IData,description:下载参数}
|
|
11
|
+
* @editorparams {name:showloading,parameterType:boolean,description:是否显示加载动画}
|
|
11
12
|
* @ignoreprops autoFocus | overflowMode
|
|
12
13
|
* @ignoreemits blur | focus | enter | infoTextChange
|
|
13
14
|
*
|
|
@@ -44,6 +45,7 @@ export declare const IBizFileUpload: import("vue").DefineComponent<{
|
|
|
44
45
|
name: string;
|
|
45
46
|
url?: string | undefined;
|
|
46
47
|
}[]>;
|
|
48
|
+
loading: import("vue").Ref<boolean>;
|
|
47
49
|
onRemove: (file: import("@ibiz-template/core").IApiData) => void;
|
|
48
50
|
beforeUpload: () => void;
|
|
49
51
|
onDownload: (file: import("@ibiz-template/core").IApiData) => void;
|
|
@@ -17,6 +17,7 @@ const IBizFileUpload = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
uploadUrl,
|
|
18
18
|
headers,
|
|
19
19
|
files,
|
|
20
|
+
loading,
|
|
20
21
|
onRemove,
|
|
21
22
|
beforeUpload,
|
|
22
23
|
onDownload,
|
|
@@ -52,6 +53,7 @@ const IBizFileUpload = /* @__PURE__ */ defineComponent({
|
|
|
52
53
|
uploadUrl,
|
|
53
54
|
headers,
|
|
54
55
|
files,
|
|
56
|
+
loading,
|
|
55
57
|
onRemove,
|
|
56
58
|
beforeUpload,
|
|
57
59
|
onDownload,
|
|
@@ -77,6 +79,7 @@ const IBizFileUpload = /* @__PURE__ */ defineComponent({
|
|
|
77
79
|
}, this.$attrs), {
|
|
78
80
|
default: () => {
|
|
79
81
|
return !this.readonly && !this.disabled && createVNode(resolveComponent("van-button"), {
|
|
82
|
+
"loading": this.loading,
|
|
80
83
|
"class": this.ns.b("button"),
|
|
81
84
|
"icon": "add-o",
|
|
82
85
|
"type": "primary"
|
|
@@ -31,6 +31,10 @@ class UploadEditorController extends EditorController {
|
|
|
31
31
|
* 下载参数
|
|
32
32
|
*/
|
|
33
33
|
__publicField(this, "exportParams");
|
|
34
|
+
/**
|
|
35
|
+
* 显示加载动画
|
|
36
|
+
*/
|
|
37
|
+
__publicField(this, "showLoading", false);
|
|
34
38
|
/**
|
|
35
39
|
* 文件类型
|
|
36
40
|
*
|
|
@@ -99,7 +103,14 @@ class UploadEditorController extends EditorController {
|
|
|
99
103
|
this.multiple = false;
|
|
100
104
|
}
|
|
101
105
|
if (this.editorParams) {
|
|
102
|
-
const {
|
|
106
|
+
const {
|
|
107
|
+
isDrag,
|
|
108
|
+
multiple,
|
|
109
|
+
accept,
|
|
110
|
+
uploadParams,
|
|
111
|
+
exportParams,
|
|
112
|
+
showloading
|
|
113
|
+
} = this.editorParams;
|
|
103
114
|
if (isDrag) {
|
|
104
115
|
this.isDrag = Boolean(isDrag);
|
|
105
116
|
}
|
|
@@ -109,6 +120,9 @@ class UploadEditorController extends EditorController {
|
|
|
109
120
|
if (accept) {
|
|
110
121
|
this.accept = accept;
|
|
111
122
|
}
|
|
123
|
+
if (showloading) {
|
|
124
|
+
this.showLoading = Boolean(showloading);
|
|
125
|
+
}
|
|
112
126
|
if (uploadParams) {
|
|
113
127
|
try {
|
|
114
128
|
this.uploadParams = JSON.parse(uploadParams);
|
|
@@ -21,6 +21,7 @@ export declare function useVanUpload(props: IParams, valueChange: (_value: strin
|
|
|
21
21
|
url?: string | undefined;
|
|
22
22
|
}[]>;
|
|
23
23
|
limit: ComputedRef<1 | 9999>;
|
|
24
|
+
loading: Ref<boolean>;
|
|
24
25
|
onDownload: (file: IData) => void;
|
|
25
26
|
onError: (...args: IData[]) => never;
|
|
26
27
|
onRemove: (file: IData) => void;
|
|
@@ -9,6 +9,7 @@ function useVanUpload(props, valueChange, c) {
|
|
|
9
9
|
});
|
|
10
10
|
const uploadUrl = ref("");
|
|
11
11
|
const downloadUrl = ref("");
|
|
12
|
+
const loading = ref(false);
|
|
12
13
|
watch(
|
|
13
14
|
() => props.value,
|
|
14
15
|
(newVal) => {
|
|
@@ -92,7 +93,6 @@ function useVanUpload(props, valueChange, c) {
|
|
|
92
93
|
emitValue();
|
|
93
94
|
};
|
|
94
95
|
const uploadFile = (file) => {
|
|
95
|
-
console.log(file);
|
|
96
96
|
const formData = new FormData();
|
|
97
97
|
formData.append("file", file.file);
|
|
98
98
|
return new Promise((resolve, reject) => {
|
|
@@ -103,7 +103,6 @@ function useVanUpload(props, valueChange, c) {
|
|
|
103
103
|
headers: headers.value
|
|
104
104
|
}).then((res) => {
|
|
105
105
|
if (res.status === 200) {
|
|
106
|
-
console.log(88, res);
|
|
107
106
|
onSuccess(res.data);
|
|
108
107
|
resolve(true);
|
|
109
108
|
} else {
|
|
@@ -116,6 +115,9 @@ function useVanUpload(props, valueChange, c) {
|
|
|
116
115
|
});
|
|
117
116
|
};
|
|
118
117
|
const afterRead = async (file) => {
|
|
118
|
+
if (c.showLoading) {
|
|
119
|
+
loading.value = true;
|
|
120
|
+
}
|
|
119
121
|
if (file.length && file.length > 0) {
|
|
120
122
|
for (let i = 0; i < file.length; i++) {
|
|
121
123
|
const fi = file[i];
|
|
@@ -124,6 +126,9 @@ function useVanUpload(props, valueChange, c) {
|
|
|
124
126
|
} else {
|
|
125
127
|
await uploadFile(file);
|
|
126
128
|
}
|
|
129
|
+
if (c.showLoading) {
|
|
130
|
+
loading.value = false;
|
|
131
|
+
}
|
|
127
132
|
};
|
|
128
133
|
const onDownload = (file) => {
|
|
129
134
|
const url = file.url || downloadUrl.value.replace("%fileId%", file.id);
|
|
@@ -138,6 +143,7 @@ function useVanUpload(props, valueChange, c) {
|
|
|
138
143
|
headers,
|
|
139
144
|
files,
|
|
140
145
|
limit,
|
|
146
|
+
loading,
|
|
141
147
|
onDownload,
|
|
142
148
|
onError,
|
|
143
149
|
onRemove,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AppMenuController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { IndexBlankPlaceholderState } from './index-blank-placeholder.state';
|
|
4
|
+
import { NavPosIndexController } from '../nav-pos-index';
|
|
5
|
+
/**
|
|
6
|
+
* 首页空白占位控制器
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @class IndexBlankPlaceholderController
|
|
10
|
+
* @extends {PanelItemController<IPanelContainer>}
|
|
11
|
+
*/
|
|
12
|
+
export declare class IndexBlankPlaceholderController extends PanelItemController<IPanelContainer> {
|
|
13
|
+
state: IndexBlankPlaceholderState;
|
|
14
|
+
protected createState(): IndexBlankPlaceholderState;
|
|
15
|
+
/**
|
|
16
|
+
* @description 当前视图路由层级
|
|
17
|
+
* @exposedoc
|
|
18
|
+
* @readonly
|
|
19
|
+
* @type {(number | undefined)}
|
|
20
|
+
* @memberof IndexBlankPlaceholderController
|
|
21
|
+
*/
|
|
22
|
+
get routeDepth(): number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* @description 应用菜单
|
|
25
|
+
* @exposedoc
|
|
26
|
+
* @readonly
|
|
27
|
+
* @type {(AppMenuController | undefined)}
|
|
28
|
+
* @memberof IndexBlankPlaceholderController
|
|
29
|
+
*/
|
|
30
|
+
get appmenu(): AppMenuController | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* @description 首页导航栏
|
|
33
|
+
* @exposedoc
|
|
34
|
+
* @readonly
|
|
35
|
+
* @type {(NavPosIndexController | undefined)}
|
|
36
|
+
* @memberof IndexBlankPlaceholderController
|
|
37
|
+
*/
|
|
38
|
+
get navPos(): NavPosIndexController | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* 初始化
|
|
41
|
+
*
|
|
42
|
+
* @protected
|
|
43
|
+
* @return {*} {Promise<void>}
|
|
44
|
+
* @memberof IndexBlankPlaceholderController
|
|
45
|
+
*/
|
|
46
|
+
protected onInit(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* @description 设置显示状态
|
|
49
|
+
* @exposedoc
|
|
50
|
+
* @param {boolean} state
|
|
51
|
+
* @memberof IndexBlankPlaceholderController
|
|
52
|
+
*/
|
|
53
|
+
setVisible(state: boolean): void;
|
|
54
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IndexBlankPlaceholderState } from './index-blank-placeholder.state.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
class IndexBlankPlaceholderController extends PanelItemController {
|
|
6
|
+
createState() {
|
|
7
|
+
var _a;
|
|
8
|
+
return new IndexBlankPlaceholderState((_a = this.parent) == null ? void 0 : _a.state);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @description 当前视图路由层级
|
|
12
|
+
* @exposedoc
|
|
13
|
+
* @readonly
|
|
14
|
+
* @type {(number | undefined)}
|
|
15
|
+
* @memberof IndexBlankPlaceholderController
|
|
16
|
+
*/
|
|
17
|
+
get routeDepth() {
|
|
18
|
+
return this.panel.view.modal.routeDepth;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @description 应用菜单
|
|
22
|
+
* @exposedoc
|
|
23
|
+
* @readonly
|
|
24
|
+
* @type {(AppMenuController | undefined)}
|
|
25
|
+
* @memberof IndexBlankPlaceholderController
|
|
26
|
+
*/
|
|
27
|
+
get appmenu() {
|
|
28
|
+
return this.panel.getController("appmenu");
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @description 首页导航栏
|
|
32
|
+
* @exposedoc
|
|
33
|
+
* @readonly
|
|
34
|
+
* @type {(NavPosIndexController | undefined)}
|
|
35
|
+
* @memberof IndexBlankPlaceholderController
|
|
36
|
+
*/
|
|
37
|
+
get navPos() {
|
|
38
|
+
return this.panel.panelItems.nav_pos_index;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 初始化
|
|
42
|
+
*
|
|
43
|
+
* @protected
|
|
44
|
+
* @return {*} {Promise<void>}
|
|
45
|
+
* @memberof IndexBlankPlaceholderController
|
|
46
|
+
*/
|
|
47
|
+
async onInit() {
|
|
48
|
+
await super.onInit();
|
|
49
|
+
this.state.keepAlive = true;
|
|
50
|
+
this.state.visible = false;
|
|
51
|
+
this.panel.evt.on("onMounted", async () => {
|
|
52
|
+
var _a;
|
|
53
|
+
if (this.navPos)
|
|
54
|
+
this.navPos.state.keepAlive = true;
|
|
55
|
+
const appViewId = (_a = this.appmenu) == null ? void 0 : _a.getDefaultOpenView();
|
|
56
|
+
if (appViewId) {
|
|
57
|
+
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
58
|
+
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
59
|
+
this.state.visible = !openMode.startsWith("INDEXVIEWTAB");
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @description 设置显示状态
|
|
65
|
+
* @exposedoc
|
|
66
|
+
* @param {boolean} state
|
|
67
|
+
* @memberof IndexBlankPlaceholderController
|
|
68
|
+
*/
|
|
69
|
+
setVisible(state) {
|
|
70
|
+
this.state.visible = state;
|
|
71
|
+
if (this.navPos)
|
|
72
|
+
this.navPos.state.visible = !state;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { IndexBlankPlaceholderController };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-index-blank-placeholder{width:100%;height:100%}.ibiz-index-blank-placeholder>.ibiz-row{height:100%;overflow:hidden auto}.ibiz-index-blank-placeholder.is-hidden{display:none}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller';
|
|
4
|
+
import './index-blank-placeholder.scss';
|
|
5
|
+
/**
|
|
6
|
+
* 空白占位
|
|
7
|
+
* @primary
|
|
8
|
+
* @description 首页空白占位组件,当菜单未进行导航时,首页显示此容器内的内容。
|
|
9
|
+
*/
|
|
10
|
+
export declare const IndexBlankPlaceholder: import("vue").DefineComponent<{
|
|
11
|
+
/**
|
|
12
|
+
* @description 空白占位模型数据
|
|
13
|
+
*/
|
|
14
|
+
modelData: {
|
|
15
|
+
type: PropType<IPanelContainer>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @description 空白占位控制器
|
|
20
|
+
*/
|
|
21
|
+
controller: {
|
|
22
|
+
type: PropType<IndexBlankPlaceholderController>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
27
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
28
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
/**
|
|
30
|
+
* @description 空白占位模型数据
|
|
31
|
+
*/
|
|
32
|
+
modelData: {
|
|
33
|
+
type: PropType<IPanelContainer>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @description 空白占位控制器
|
|
38
|
+
*/
|
|
39
|
+
controller: {
|
|
40
|
+
type: PropType<IndexBlankPlaceholderController>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { isVNode, computed, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace, onRouteChange } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './index-blank-placeholder.css';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function _isSlot(s) {
|
|
7
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
+
}
|
|
9
|
+
const IndexBlankPlaceholder = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "IBizIndexBlankPlaceholder",
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* @description 空白占位模型数据
|
|
14
|
+
*/
|
|
15
|
+
modelData: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* @description 空白占位控制器
|
|
21
|
+
*/
|
|
22
|
+
controller: {
|
|
23
|
+
type: Object,
|
|
24
|
+
required: true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props) {
|
|
28
|
+
const c = props.controller;
|
|
29
|
+
const ns = useNamespace("index-blank-placeholder");
|
|
30
|
+
const {
|
|
31
|
+
id
|
|
32
|
+
} = props.modelData;
|
|
33
|
+
const classArr = computed(() => {
|
|
34
|
+
let result = [ns.b(), ns.m(id)];
|
|
35
|
+
result = [...result, ...props.controller.containerClass, ns.is("hidden", !props.controller.state.visible)];
|
|
36
|
+
return result;
|
|
37
|
+
});
|
|
38
|
+
if (c.routeDepth) {
|
|
39
|
+
onRouteChange((args) => {
|
|
40
|
+
c.setVisible(!args.currentKey);
|
|
41
|
+
}, c.routeDepth + 1);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
ns,
|
|
45
|
+
classArr
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render() {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
let _slot;
|
|
51
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
52
|
+
const content = createVNode(resolveComponent("iBizRow"), {
|
|
53
|
+
"slot": "content",
|
|
54
|
+
"layout": this.modelData.layout
|
|
55
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
56
|
+
const props = slot.props;
|
|
57
|
+
if (!props || !props.controller) {
|
|
58
|
+
return slot;
|
|
59
|
+
}
|
|
60
|
+
return createVNode(resolveComponent("iBizCol"), {
|
|
61
|
+
"layoutPos": props.modelData.layoutPos,
|
|
62
|
+
"state": props.controller.state
|
|
63
|
+
}, _isSlot(slot) ? slot : {
|
|
64
|
+
default: () => [slot]
|
|
65
|
+
});
|
|
66
|
+
})) ? _slot : {
|
|
67
|
+
default: () => [_slot]
|
|
68
|
+
});
|
|
69
|
+
return createVNode("div", {
|
|
70
|
+
"class": this.classArr,
|
|
71
|
+
"onClick": () => {
|
|
72
|
+
this.controller.onClick();
|
|
73
|
+
}
|
|
74
|
+
}, [this.controller.model.cssStyle ? createVNode("style", {
|
|
75
|
+
"type": "text/css"
|
|
76
|
+
}, [this.controller.model.cssStyle]) : null, content]);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export { IndexBlankPlaceholder };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 首页空白占位适配器
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class IndexBlankPlaceholderProvider
|
|
9
|
+
* @implements {IPanelItemProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class IndexBlankPlaceholderProvider implements IPanelItemProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<IndexBlankPlaceholderController>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class IndexBlankPlaceholderProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizIndexBlankPlaceholder");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new IndexBlankPlaceholderController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { IndexBlankPlaceholderProvider };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IndexBlankPlaceholderController } from './index-blank-placeholder.controller';
|
|
2
|
+
export { IndexBlankPlaceholderController };
|
|
3
|
+
export declare const IBizIndexBlankPlaceholder: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
4
|
+
modelData: {
|
|
5
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
controller: {
|
|
9
|
+
type: import("vue").PropType<IndexBlankPlaceholderController>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
14
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
modelData: {
|
|
17
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
controller: {
|
|
21
|
+
type: import("vue").PropType<IndexBlankPlaceholderController>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>>, {}, {}>>;
|
|
25
|
+
export default IBizIndexBlankPlaceholder;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { IndexBlankPlaceholder } from './index-blank-placeholder.mjs';
|
|
4
|
+
import { IndexBlankPlaceholderProvider } from './index-blank-placeholder.provider.mjs';
|
|
5
|
+
export { IndexBlankPlaceholderController } from './index-blank-placeholder.controller.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizIndexBlankPlaceholder = withInstall(
|
|
9
|
+
IndexBlankPlaceholder,
|
|
10
|
+
function(v) {
|
|
11
|
+
v.component(IndexBlankPlaceholder.name, IndexBlankPlaceholder);
|
|
12
|
+
registerPanelItemProvider(
|
|
13
|
+
"CONTAINER_INDEX_BLANK_PLACEHOLDER",
|
|
14
|
+
() => new IndexBlankPlaceholderProvider()
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export { IBizIndexBlankPlaceholder, IBizIndexBlankPlaceholder as default };
|
|
@@ -15,6 +15,7 @@ import { IBizMobAsyncAction } from './async-action/index.mjs';
|
|
|
15
15
|
import { IBizPanelButtonList } from './panel-button-list/index.mjs';
|
|
16
16
|
import { IBizAuthSso } from './auth-sso/index.mjs';
|
|
17
17
|
import { IBizPanelAppTitle } from './panel-app-title/index.mjs';
|
|
18
|
+
import { IBizIndexBlankPlaceholder } from './index-blank-placeholder/index.mjs';
|
|
18
19
|
|
|
19
20
|
"use strict";
|
|
20
21
|
const IBizPanelComponents = {
|
|
@@ -49,6 +50,7 @@ const IBizPanelComponents = {
|
|
|
49
50
|
v.use(IBizAuthSso);
|
|
50
51
|
v.use(IBizAuthWxmpQrcode);
|
|
51
52
|
v.use(IBizPanelAppTitle);
|
|
53
|
+
v.use(IBizIndexBlankPlaceholder);
|
|
52
54
|
}
|
|
53
55
|
};
|
|
54
56
|
|
|
@@ -20,6 +20,7 @@ const IBizCascaderDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
const c = props.controller;
|
|
21
21
|
const treeData = vue.ref([]);
|
|
22
22
|
const codeListMap = /* @__PURE__ */ new Map();
|
|
23
|
+
const curValue = vue.ref("");
|
|
23
24
|
const selectValue = vue.ref(null);
|
|
24
25
|
const show = vue.ref(false);
|
|
25
26
|
const onClose = () => {
|
|
@@ -59,6 +60,10 @@ const IBizCascaderDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
59
60
|
pvaluefield
|
|
60
61
|
} = c.editorParams;
|
|
61
62
|
treeData.value = transformTreeData(codeList, pvaluefield);
|
|
63
|
+
if (props.value) {
|
|
64
|
+
const item = codeListMap.get(props.value);
|
|
65
|
+
curValue.value = (item == null ? void 0 : item.text) || "";
|
|
66
|
+
}
|
|
62
67
|
};
|
|
63
68
|
loadCodeList();
|
|
64
69
|
const onFinish = ($event) => {
|
|
@@ -74,9 +79,11 @@ const IBizCascaderDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
79
|
} = $event;
|
|
75
80
|
emit("change", value);
|
|
76
81
|
};
|
|
77
|
-
|
|
78
|
-
const item = codeListMap.get(
|
|
79
|
-
|
|
82
|
+
vue.watch(() => props.value, (newVal) => {
|
|
83
|
+
const item = codeListMap.get(newVal || "");
|
|
84
|
+
curValue.value = (item == null ? void 0 : item.text) || "";
|
|
85
|
+
}, {
|
|
86
|
+
immediate: true
|
|
80
87
|
});
|
|
81
88
|
const onBlur = () => {
|
|
82
89
|
emit("blur");
|
|
@@ -19,6 +19,7 @@ const IBizFileUpload = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
19
|
uploadUrl,
|
|
20
20
|
headers,
|
|
21
21
|
files,
|
|
22
|
+
loading,
|
|
22
23
|
onRemove,
|
|
23
24
|
beforeUpload,
|
|
24
25
|
onDownload,
|
|
@@ -54,6 +55,7 @@ const IBizFileUpload = /* @__PURE__ */ vue.defineComponent({
|
|
|
54
55
|
uploadUrl,
|
|
55
56
|
headers,
|
|
56
57
|
files,
|
|
58
|
+
loading,
|
|
57
59
|
onRemove,
|
|
58
60
|
beforeUpload,
|
|
59
61
|
onDownload,
|
|
@@ -79,6 +81,7 @@ const IBizFileUpload = /* @__PURE__ */ vue.defineComponent({
|
|
|
79
81
|
}, this.$attrs), {
|
|
80
82
|
default: () => {
|
|
81
83
|
return !this.readonly && !this.disabled && vue.createVNode(vue.resolveComponent("van-button"), {
|
|
84
|
+
"loading": this.loading,
|
|
82
85
|
"class": this.ns.b("button"),
|
|
83
86
|
"icon": "add-o",
|
|
84
87
|
"type": "primary"
|