@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
|
@@ -33,6 +33,10 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
33
33
|
* 下载参数
|
|
34
34
|
*/
|
|
35
35
|
__publicField(this, "exportParams");
|
|
36
|
+
/**
|
|
37
|
+
* 显示加载动画
|
|
38
|
+
*/
|
|
39
|
+
__publicField(this, "showLoading", false);
|
|
36
40
|
/**
|
|
37
41
|
* 文件类型
|
|
38
42
|
*
|
|
@@ -101,7 +105,14 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
101
105
|
this.multiple = false;
|
|
102
106
|
}
|
|
103
107
|
if (this.editorParams) {
|
|
104
|
-
const {
|
|
108
|
+
const {
|
|
109
|
+
isDrag,
|
|
110
|
+
multiple,
|
|
111
|
+
accept,
|
|
112
|
+
uploadParams,
|
|
113
|
+
exportParams,
|
|
114
|
+
showloading
|
|
115
|
+
} = this.editorParams;
|
|
105
116
|
if (isDrag) {
|
|
106
117
|
this.isDrag = Boolean(isDrag);
|
|
107
118
|
}
|
|
@@ -111,6 +122,9 @@ class UploadEditorController extends runtime.EditorController {
|
|
|
111
122
|
if (accept) {
|
|
112
123
|
this.accept = accept;
|
|
113
124
|
}
|
|
125
|
+
if (showloading) {
|
|
126
|
+
this.showLoading = Boolean(showloading);
|
|
127
|
+
}
|
|
114
128
|
if (uploadParams) {
|
|
115
129
|
try {
|
|
116
130
|
this.uploadParams = JSON.parse(uploadParams);
|
|
@@ -11,6 +11,7 @@ function useVanUpload(props, valueChange, c) {
|
|
|
11
11
|
});
|
|
12
12
|
const uploadUrl = vue.ref("");
|
|
13
13
|
const downloadUrl = vue.ref("");
|
|
14
|
+
const loading = vue.ref(false);
|
|
14
15
|
vue.watch(
|
|
15
16
|
() => props.value,
|
|
16
17
|
(newVal) => {
|
|
@@ -94,7 +95,6 @@ function useVanUpload(props, valueChange, c) {
|
|
|
94
95
|
emitValue();
|
|
95
96
|
};
|
|
96
97
|
const uploadFile = (file) => {
|
|
97
|
-
console.log(file);
|
|
98
98
|
const formData = new FormData();
|
|
99
99
|
formData.append("file", file.file);
|
|
100
100
|
return new Promise((resolve, reject) => {
|
|
@@ -105,7 +105,6 @@ function useVanUpload(props, valueChange, c) {
|
|
|
105
105
|
headers: headers.value
|
|
106
106
|
}).then((res) => {
|
|
107
107
|
if (res.status === 200) {
|
|
108
|
-
console.log(88, res);
|
|
109
108
|
onSuccess(res.data);
|
|
110
109
|
resolve(true);
|
|
111
110
|
} else {
|
|
@@ -118,6 +117,9 @@ function useVanUpload(props, valueChange, c) {
|
|
|
118
117
|
});
|
|
119
118
|
};
|
|
120
119
|
const afterRead = async (file) => {
|
|
120
|
+
if (c.showLoading) {
|
|
121
|
+
loading.value = true;
|
|
122
|
+
}
|
|
121
123
|
if (file.length && file.length > 0) {
|
|
122
124
|
for (let i = 0; i < file.length; i++) {
|
|
123
125
|
const fi = file[i];
|
|
@@ -126,6 +128,9 @@ function useVanUpload(props, valueChange, c) {
|
|
|
126
128
|
} else {
|
|
127
129
|
await uploadFile(file);
|
|
128
130
|
}
|
|
131
|
+
if (c.showLoading) {
|
|
132
|
+
loading.value = false;
|
|
133
|
+
}
|
|
129
134
|
};
|
|
130
135
|
const onDownload = (file) => {
|
|
131
136
|
const url = file.url || downloadUrl.value.replace("%fileId%", file.id);
|
|
@@ -140,6 +145,7 @@ function useVanUpload(props, valueChange, c) {
|
|
|
140
145
|
headers,
|
|
141
146
|
files,
|
|
142
147
|
limit,
|
|
148
|
+
loading,
|
|
143
149
|
onDownload,
|
|
144
150
|
onError,
|
|
145
151
|
onRemove,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./index-blank-placeholder.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function _isSlot(s) {
|
|
9
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
10
|
+
}
|
|
11
|
+
const IndexBlankPlaceholder = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
name: "IBizIndexBlankPlaceholder",
|
|
13
|
+
props: {
|
|
14
|
+
/**
|
|
15
|
+
* @description 空白占位模型数据
|
|
16
|
+
*/
|
|
17
|
+
modelData: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* @description 空白占位控制器
|
|
23
|
+
*/
|
|
24
|
+
controller: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup(props) {
|
|
30
|
+
const c = props.controller;
|
|
31
|
+
const ns = vue3Util.useNamespace("index-blank-placeholder");
|
|
32
|
+
const {
|
|
33
|
+
id
|
|
34
|
+
} = props.modelData;
|
|
35
|
+
const classArr = vue.computed(() => {
|
|
36
|
+
let result = [ns.b(), ns.m(id)];
|
|
37
|
+
result = [...result, ...props.controller.containerClass, ns.is("hidden", !props.controller.state.visible)];
|
|
38
|
+
return result;
|
|
39
|
+
});
|
|
40
|
+
if (c.routeDepth) {
|
|
41
|
+
vue3Util.onRouteChange((args) => {
|
|
42
|
+
c.setVisible(!args.currentKey);
|
|
43
|
+
}, c.routeDepth + 1);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
ns,
|
|
47
|
+
classArr
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
render() {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
let _slot;
|
|
53
|
+
const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
|
|
54
|
+
const content = vue.createVNode(vue.resolveComponent("iBizRow"), {
|
|
55
|
+
"slot": "content",
|
|
56
|
+
"layout": this.modelData.layout
|
|
57
|
+
}, _isSlot(_slot = defaultSlots.map((slot) => {
|
|
58
|
+
const props = slot.props;
|
|
59
|
+
if (!props || !props.controller) {
|
|
60
|
+
return slot;
|
|
61
|
+
}
|
|
62
|
+
return vue.createVNode(vue.resolveComponent("iBizCol"), {
|
|
63
|
+
"layoutPos": props.modelData.layoutPos,
|
|
64
|
+
"state": props.controller.state
|
|
65
|
+
}, _isSlot(slot) ? slot : {
|
|
66
|
+
default: () => [slot]
|
|
67
|
+
});
|
|
68
|
+
})) ? _slot : {
|
|
69
|
+
default: () => [_slot]
|
|
70
|
+
});
|
|
71
|
+
return vue.createVNode("div", {
|
|
72
|
+
"class": this.classArr,
|
|
73
|
+
"onClick": () => {
|
|
74
|
+
this.controller.onClick();
|
|
75
|
+
}
|
|
76
|
+
}, [this.controller.model.cssStyle ? vue.createVNode("style", {
|
|
77
|
+
"type": "text/css"
|
|
78
|
+
}, [this.controller.model.cssStyle]) : null, content]);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
exports.IndexBlankPlaceholder = IndexBlankPlaceholder;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
var indexBlankPlaceholder_state = require('./index-blank-placeholder.state.cjs');
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
class IndexBlankPlaceholderController extends runtime.PanelItemController {
|
|
8
|
+
createState() {
|
|
9
|
+
var _a;
|
|
10
|
+
return new indexBlankPlaceholder_state.IndexBlankPlaceholderState((_a = this.parent) == null ? void 0 : _a.state);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @description 当前视图路由层级
|
|
14
|
+
* @exposedoc
|
|
15
|
+
* @readonly
|
|
16
|
+
* @type {(number | undefined)}
|
|
17
|
+
* @memberof IndexBlankPlaceholderController
|
|
18
|
+
*/
|
|
19
|
+
get routeDepth() {
|
|
20
|
+
return this.panel.view.modal.routeDepth;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @description 应用菜单
|
|
24
|
+
* @exposedoc
|
|
25
|
+
* @readonly
|
|
26
|
+
* @type {(AppMenuController | undefined)}
|
|
27
|
+
* @memberof IndexBlankPlaceholderController
|
|
28
|
+
*/
|
|
29
|
+
get appmenu() {
|
|
30
|
+
return this.panel.getController("appmenu");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @description 首页导航栏
|
|
34
|
+
* @exposedoc
|
|
35
|
+
* @readonly
|
|
36
|
+
* @type {(NavPosIndexController | undefined)}
|
|
37
|
+
* @memberof IndexBlankPlaceholderController
|
|
38
|
+
*/
|
|
39
|
+
get navPos() {
|
|
40
|
+
return this.panel.panelItems.nav_pos_index;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 初始化
|
|
44
|
+
*
|
|
45
|
+
* @protected
|
|
46
|
+
* @return {*} {Promise<void>}
|
|
47
|
+
* @memberof IndexBlankPlaceholderController
|
|
48
|
+
*/
|
|
49
|
+
async onInit() {
|
|
50
|
+
await super.onInit();
|
|
51
|
+
this.state.keepAlive = true;
|
|
52
|
+
this.state.visible = false;
|
|
53
|
+
this.panel.evt.on("onMounted", async () => {
|
|
54
|
+
var _a;
|
|
55
|
+
if (this.navPos)
|
|
56
|
+
this.navPos.state.keepAlive = true;
|
|
57
|
+
const appViewId = (_a = this.appmenu) == null ? void 0 : _a.getDefaultOpenView();
|
|
58
|
+
if (appViewId) {
|
|
59
|
+
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
60
|
+
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
61
|
+
this.state.visible = !openMode.startsWith("INDEXVIEWTAB");
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @description 设置显示状态
|
|
67
|
+
* @exposedoc
|
|
68
|
+
* @param {boolean} state
|
|
69
|
+
* @memberof IndexBlankPlaceholderController
|
|
70
|
+
*/
|
|
71
|
+
setVisible(state) {
|
|
72
|
+
this.state.visible = state;
|
|
73
|
+
if (this.navPos)
|
|
74
|
+
this.navPos.state.visible = !state;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
exports.IndexBlankPlaceholderController = 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,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var indexBlankPlaceholder_controller = require('./index-blank-placeholder.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class IndexBlankPlaceholderProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
__publicField(this, "component", "IBizIndexBlankPlaceholder");
|
|
15
|
+
}
|
|
16
|
+
async createController(panelItem, panel, parent) {
|
|
17
|
+
const c = new indexBlankPlaceholder_controller.IndexBlankPlaceholderController(panelItem, panel, parent);
|
|
18
|
+
await c.init();
|
|
19
|
+
return c;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.IndexBlankPlaceholderProvider = IndexBlankPlaceholderProvider;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var runtime = require('@ibiz-template/runtime');
|
|
6
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
+
var indexBlankPlaceholder = require('./index-blank-placeholder.cjs');
|
|
8
|
+
var indexBlankPlaceholder_provider = require('./index-blank-placeholder.provider.cjs');
|
|
9
|
+
var indexBlankPlaceholder_controller = require('./index-blank-placeholder.controller.cjs');
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
const IBizIndexBlankPlaceholder = vue3Util.withInstall(
|
|
13
|
+
indexBlankPlaceholder.IndexBlankPlaceholder,
|
|
14
|
+
function(v) {
|
|
15
|
+
v.component(indexBlankPlaceholder.IndexBlankPlaceholder.name, indexBlankPlaceholder.IndexBlankPlaceholder);
|
|
16
|
+
runtime.registerPanelItemProvider(
|
|
17
|
+
"CONTAINER_INDEX_BLANK_PLACEHOLDER",
|
|
18
|
+
() => new indexBlankPlaceholder_provider.IndexBlankPlaceholderProvider()
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
exports.IndexBlankPlaceholderController = indexBlankPlaceholder_controller.IndexBlankPlaceholderController;
|
|
24
|
+
exports.IBizIndexBlankPlaceholder = IBizIndexBlankPlaceholder;
|
|
25
|
+
exports.default = IBizIndexBlankPlaceholder;
|
|
@@ -19,6 +19,7 @@ var index$c = require('./async-action/index.cjs');
|
|
|
19
19
|
var index$d = require('./panel-button-list/index.cjs');
|
|
20
20
|
var index$e = require('./auth-sso/index.cjs');
|
|
21
21
|
var index$f = require('./panel-app-title/index.cjs');
|
|
22
|
+
var index$g = require('./index-blank-placeholder/index.cjs');
|
|
22
23
|
|
|
23
24
|
"use strict";
|
|
24
25
|
const IBizPanelComponents = {
|
|
@@ -53,6 +54,7 @@ const IBizPanelComponents = {
|
|
|
53
54
|
v.use(index$e.IBizAuthSso);
|
|
54
55
|
v.use(vue3Util.IBizAuthWxmpQrcode);
|
|
55
56
|
v.use(index$f.IBizPanelAppTitle);
|
|
57
|
+
v.use(index$g.IBizIndexBlankPlaceholder);
|
|
56
58
|
}
|
|
57
59
|
};
|
|
58
60
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/mob-vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.13",
|
|
4
4
|
"description": "移动端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@floating-ui/dom": "^1.5.3",
|
|
29
29
|
"@ibiz-template-package/vs-tree-ex": "^0.1.1",
|
|
30
|
-
"@ibiz-template/core": "0.7.41-alpha.
|
|
31
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
32
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
30
|
+
"@ibiz-template/core": "0.7.41-alpha.23",
|
|
31
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.23",
|
|
32
|
+
"@ibiz-template/runtime": "0.7.41-alpha.23",
|
|
33
33
|
"@ibiz-template/theme": "0.7.39",
|
|
34
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
34
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.23",
|
|
35
35
|
"@ibiz-template/devtool": "0.0.11",
|
|
36
36
|
"@ibiz/model-core": "^0.1.81",
|
|
37
37
|
"@ibiz-template/mob-theme": "3.0.0",
|