@ibiz-template/vue3-components 0.1.12-dev.0 → 0.1.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.min.css +1 -1
- package/dist/index.system.min.js +3 -3
- package/dist/index.system.min.js.map +1 -1
- package/dist/wang-editor-0c05cd5f.js +2 -0
- package/dist/wang-editor-0c05cd5f.js.map +1 -0
- package/es/common/action-toolbar/action-toolbar.mjs +1 -1
- package/es/common/no-data/no-data.mjs +1 -1
- package/es/common/rawitem/rawitem.css +1 -1
- package/es/common/split/split.css +1 -1
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/app-menu/app-menu.mjs +1 -1
- package/es/control/app-menu-icon-view/app-menu-icon-view.mjs +1 -1
- package/es/control/calendar/calendar.mjs +1 -1
- package/es/control/dashboard/portlet/container-portlet/container-portlet.css +1 -0
- package/es/control/dashboard/portlet/container-portlet/container-portlet.d.ts +1 -0
- package/es/control/dashboard/portlet/container-portlet/container-portlet.mjs +1 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/drbar/drbar.controller.mjs +2 -8
- package/es/control/drtab/drtab.controller.mjs +2 -8
- package/es/control/exp-bar/data-view-exp-bar/data-view-exp-bar.css +1 -1
- package/es/control/exp-bar/grid-exp-bar/grid-exp-bar.css +1 -1
- package/es/control/exp-bar/list-exp-bar/list-exp-bar.css +1 -1
- package/es/control/exp-bar/render-util.mjs +2 -2
- package/es/control/exp-bar/tree-exp-bar/tree-exp-bar.css +1 -1
- package/es/control/form/form/form.mjs +1 -1
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +6 -5
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.d.ts +72 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs +157 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.d.ts +1 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.mjs +17 -100
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.d.ts +1 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.mjs +19 -85
- package/es/control/form/form-detail/form-mdctrl/index.mjs +2 -0
- package/es/control/form/form-detail/form-page/form-page.css +1 -1
- package/es/control/form/search-form/search-form.css +1 -1
- package/es/control/form/search-form/search-form.mjs +10 -3
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +2 -0
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +7 -4
- package/es/control/grid/grid-column/grid-field-column/index.d.ts +2 -0
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +2 -1
- package/es/control/panel/view-layout-panel/index.d.ts +10 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +11 -3
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +48 -42
- package/es/control/toolbar/toolbar.mjs +1 -1
- package/es/control/tree/tree.css +1 -1
- package/es/devtool/devtool-action.css +1 -0
- package/es/devtool/devtool-action.d.ts +26 -0
- package/es/devtool/devtool-action.mjs +218 -0
- package/es/devtool/index.d.ts +50 -0
- package/es/devtool/index.mjs +80 -0
- package/es/devtool/interface/devtool-event.d.ts +12 -0
- package/es/devtool/interface/devtool-event.mjs +1 -0
- package/es/devtool/interface/devtool-view.d.ts +15 -0
- package/es/devtool/interface/devtool-view.mjs +1 -0
- package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/es/editor/text-box/input/input.d.ts +2 -2
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +3 -0
- package/es/node_modules/.pnpm/element-plus@2.3.9_vue@3.3.4/node_modules/element-plus/dist/locale/zh-cn.mjs +131 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +3 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +29 -6
- package/es/panel-component/auth-userinfo/index.d.ts +3 -0
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.mjs +4 -1
- package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/es/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/es/panel-component/panel-button/panel-button.css +1 -1
- package/es/panel-component/panel-button/panel-button.mjs +5 -4
- package/es/panel-component/panel-exp-header/panel-exp-header.css +1 -1
- package/es/panel-component/panel-index-view-search/index.d.ts +28 -0
- package/es/panel-component/panel-index-view-search/index.mjs +17 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +30 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +82 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.d.ts +13 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.mjs +20 -0
- package/es/panel-component/single-data-container/index.d.ts +10 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +37 -2
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +75 -1
- package/es/panel-component/single-data-container/single-data-container.d.ts +11 -2
- package/es/panel-component/single-data-container/single-data-container.mjs +34 -21
- package/es/util/app-drawer/app-drawer-component.css +1 -1
- package/es/view/common/index.d.ts +1 -0
- package/es/view/common/view.css +1 -1
- package/es/view/common/view.d.ts +1 -0
- package/es/view/common/view.mjs +13 -1
- package/es/view-engine/tab-exp-view.engine.d.ts +1 -0
- package/es/view-engine/tab-exp-view.engine.mjs +8 -1
- package/lib/common/action-toolbar/action-toolbar.cjs +1 -1
- package/lib/common/no-data/no-data.cjs +1 -1
- package/lib/common/rawitem/rawitem.css +1 -1
- package/lib/common/split/split.css +1 -1
- package/lib/control/app-menu/app-menu.cjs +1 -1
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/app-menu-icon-view/app-menu-icon-view.cjs +1 -1
- package/lib/control/calendar/calendar.cjs +1 -1
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.cjs +1 -0
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.css +1 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.controller.cjs +2 -8
- package/lib/control/drtab/drtab.controller.cjs +2 -8
- package/lib/control/exp-bar/data-view-exp-bar/data-view-exp-bar.css +1 -1
- package/lib/control/exp-bar/grid-exp-bar/grid-exp-bar.css +1 -1
- package/lib/control/exp-bar/list-exp-bar/list-exp-bar.css +1 -1
- package/lib/control/exp-bar/render-util.cjs +2 -2
- package/lib/control/exp-bar/tree-exp-bar/tree-exp-bar.css +1 -1
- package/lib/control/form/form/form.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.cjs +6 -5
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.cjs +159 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.cjs +16 -99
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.cjs +18 -84
- package/lib/control/form/form-detail/form-mdctrl/index.cjs +2 -0
- package/lib/control/form/form-detail/form-page/form-page.css +1 -1
- package/lib/control/form/search-form/search-form.cjs +10 -3
- package/lib/control/form/search-form/search-form.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +7 -4
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +2 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +47 -41
- package/lib/control/toolbar/toolbar.cjs +1 -1
- package/lib/control/tree/tree.css +1 -1
- package/lib/devtool/devtool-action.cjs +220 -0
- package/lib/devtool/devtool-action.css +1 -0
- package/lib/devtool/index.cjs +83 -0
- package/lib/devtool/interface/devtool-event.cjs +2 -0
- package/lib/devtool/interface/devtool-view.cjs +2 -0
- package/lib/editor/check-box/ibiz-checkbox/ibiz-checkbox.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/index.cjs +165 -159
- package/lib/node_modules/.pnpm/element-plus@2.3.9_vue@3.3.4/node_modules/element-plus/dist/locale/zh-cn.cjs +135 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +28 -5
- package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/lib/panel-component/index.cjs +19 -14
- package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/lib/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/lib/panel-component/panel-button/panel-button.cjs +5 -4
- package/lib/panel-component/panel-button/panel-button.css +1 -1
- package/lib/panel-component/panel-exp-header/panel-exp-header.css +1 -1
- package/lib/panel-component/panel-index-view-search/index.cjs +23 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +84 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.provider.cjs +22 -0
- package/lib/panel-component/single-data-container/single-data-container.cjs +33 -20
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +74 -0
- package/lib/util/app-drawer/app-drawer-component.css +1 -1
- package/lib/util/confirm-util/confirm-util.cjs +5 -5
- package/lib/util/loading-util/loading-util.cjs +2 -2
- package/lib/util/message-util/message-util.cjs +5 -5
- package/lib/util/modal-util/modal-util.cjs +6 -6
- package/lib/util/notification-util/notification-util.cjs +5 -5
- package/lib/view/common/view.cjs +12 -0
- package/lib/view/common/view.css +1 -1
- package/lib/view-engine/tab-exp-view.engine.cjs +7 -0
- package/package.json +6 -6
- package/dist/wang-editor-675011c6.js +0 -2
- package/dist/wang-editor-675011c6.js.map +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./devtool-action.css');
|
|
6
|
+
var vueRouter = require('vue-router');
|
|
7
|
+
|
|
8
|
+
function _isSlot(s) {
|
|
9
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
10
|
+
}
|
|
11
|
+
const DevtoolAction = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
name: "IBizDevtoolAction",
|
|
13
|
+
setup() {
|
|
14
|
+
var _a;
|
|
15
|
+
const ns = vue3Util.useNamespace("devtool-action");
|
|
16
|
+
const evt = vue.inject("devtool-evt");
|
|
17
|
+
const items = vue.ref([]);
|
|
18
|
+
const activeItem = vue.ref(null);
|
|
19
|
+
const isShow = vue.ref(false);
|
|
20
|
+
const height = vue.ref("");
|
|
21
|
+
const activeCollapse = vue.ref(["context", "params"]);
|
|
22
|
+
const router = vueRouter.useRouter();
|
|
23
|
+
const instance = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
24
|
+
router.afterEach(() => {
|
|
25
|
+
if (instance) {
|
|
26
|
+
activeItem.value = null;
|
|
27
|
+
instance.$forceUpdate();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const getObjEntriesArray = (obj) => {
|
|
31
|
+
if (!obj) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
return Object.entries(obj).map(([key, value]) => {
|
|
35
|
+
return {
|
|
36
|
+
key,
|
|
37
|
+
value: Object.prototype.toString.call(value) === "[object Object]" ? JSON.stringify(value) : `${value}`
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const contextArray = vue.computed(() => {
|
|
42
|
+
if (!activeItem.value) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
return getObjEntriesArray(activeItem.value.controller.context);
|
|
46
|
+
});
|
|
47
|
+
const paramsArray = vue.computed(() => {
|
|
48
|
+
if (!activeItem.value) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
return getObjEntriesArray(activeItem.value.controller.params);
|
|
52
|
+
});
|
|
53
|
+
const onDataChange = (data) => {
|
|
54
|
+
items.value = [...data.values()];
|
|
55
|
+
};
|
|
56
|
+
const keydownHandle = (e) => {
|
|
57
|
+
if ((e.ctrlKey || e.metaKey) && e.code === "F12") {
|
|
58
|
+
isShow.value = !isShow.value;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const onItemClick = (item) => {
|
|
62
|
+
var _a2;
|
|
63
|
+
if (item.key === ((_a2 = activeItem.value) == null ? void 0 : _a2.key)) {
|
|
64
|
+
activeItem.value = null;
|
|
65
|
+
} else {
|
|
66
|
+
activeItem.value = item;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const copy = async (value) => {
|
|
70
|
+
if (!value) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
await ibiz.util.text.copy(value);
|
|
75
|
+
ibiz.message.success("\u62F7\u8D1D\u6210\u529F!");
|
|
76
|
+
} catch (error) {
|
|
77
|
+
ibiz.message.error("\u62F7\u8D1D\u5931\u8D25!");
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const minimize = () => {
|
|
81
|
+
height.value = "44px";
|
|
82
|
+
};
|
|
83
|
+
const expand = () => {
|
|
84
|
+
height.value = "100%";
|
|
85
|
+
};
|
|
86
|
+
const close = () => {
|
|
87
|
+
isShow.value = false;
|
|
88
|
+
};
|
|
89
|
+
const onMouseEnter = (item) => {
|
|
90
|
+
const el = vue.unref(item.dom);
|
|
91
|
+
if (el) {
|
|
92
|
+
el.style.outline = "3px solid #409EFF";
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const onMouseLeave = (item) => {
|
|
96
|
+
const el = vue.unref(item.dom);
|
|
97
|
+
if (el) {
|
|
98
|
+
el.style.outline = "";
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
vue.onMounted(() => {
|
|
102
|
+
evt.on("change", onDataChange);
|
|
103
|
+
document.addEventListener("keydown", keydownHandle);
|
|
104
|
+
});
|
|
105
|
+
vue.onUnmounted(() => {
|
|
106
|
+
evt.off("change", onDataChange);
|
|
107
|
+
document.removeEventListener("keydown", keydownHandle);
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
ns,
|
|
111
|
+
items,
|
|
112
|
+
activeItem,
|
|
113
|
+
height,
|
|
114
|
+
isShow,
|
|
115
|
+
activeCollapse,
|
|
116
|
+
contextArray,
|
|
117
|
+
paramsArray,
|
|
118
|
+
onItemClick,
|
|
119
|
+
copy,
|
|
120
|
+
minimize,
|
|
121
|
+
expand,
|
|
122
|
+
close,
|
|
123
|
+
onMouseEnter,
|
|
124
|
+
onMouseLeave
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
render() {
|
|
128
|
+
let _slot, _slot2;
|
|
129
|
+
if (!this.isShow) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
return vue.createVNode("div", {
|
|
133
|
+
"class": this.ns.b(),
|
|
134
|
+
"style": {
|
|
135
|
+
height: this.height
|
|
136
|
+
}
|
|
137
|
+
}, [this.activeItem ? vue.createVNode("div", {
|
|
138
|
+
"class": this.ns.b("collapse")
|
|
139
|
+
}, [vue.createVNode(vue.resolveComponent("el-collapse"), {
|
|
140
|
+
"modelValue": this.activeCollapse,
|
|
141
|
+
"onUpdate:modelValue": ($event) => this.activeCollapse = $event
|
|
142
|
+
}, {
|
|
143
|
+
default: () => [vue.createVNode(vue.resolveComponent("el-collapse-item"), {
|
|
144
|
+
"title": "\u5E94\u7528\u4E0A\u4E0B\u6587",
|
|
145
|
+
"name": "context"
|
|
146
|
+
}, _isSlot(_slot = this.contextArray.map((item) => vue.createVNode("div", {
|
|
147
|
+
"class": this.ns.b("collapse-item")
|
|
148
|
+
}, [vue.createVNode("div", {
|
|
149
|
+
"class": this.ns.be("collapse-item", "key"),
|
|
150
|
+
"title": item.key,
|
|
151
|
+
"onClick": () => this.copy(item.key)
|
|
152
|
+
}, [item.key]), vue.createVNode("div", {
|
|
153
|
+
"class": this.ns.be("collapse-item", "value"),
|
|
154
|
+
"title": item.value,
|
|
155
|
+
"onClick": () => this.copy(item.value)
|
|
156
|
+
}, [`\uFF1A${item.value}`])]))) ? _slot : {
|
|
157
|
+
default: () => [_slot]
|
|
158
|
+
}), vue.createVNode(vue.resolveComponent("el-collapse-item"), {
|
|
159
|
+
"title": "\u89C6\u56FE\u53C2\u6570",
|
|
160
|
+
"name": "params"
|
|
161
|
+
}, _isSlot(_slot2 = this.paramsArray.map((item) => vue.createVNode("div", {
|
|
162
|
+
"class": this.ns.b("collapse-item")
|
|
163
|
+
}, [vue.createVNode("div", {
|
|
164
|
+
"class": this.ns.be("collapse-item", "key"),
|
|
165
|
+
"title": item.key,
|
|
166
|
+
"onClick": () => this.copy(item.key)
|
|
167
|
+
}, [item.key]), vue.createVNode("div", {
|
|
168
|
+
"class": this.ns.be("collapse-item", "value"),
|
|
169
|
+
"title": item.value,
|
|
170
|
+
"onClick": () => this.copy(item.value)
|
|
171
|
+
}, [`\uFF1A${item.value}`])]))) ? _slot2 : {
|
|
172
|
+
default: () => [_slot2]
|
|
173
|
+
})]
|
|
174
|
+
})]) : null, vue.createVNode("div", {
|
|
175
|
+
"class": this.ns.b("container")
|
|
176
|
+
}, [vue.createVNode("div", {
|
|
177
|
+
"class": this.ns.b("header")
|
|
178
|
+
}, [vue.createVNode("ion-icon", {
|
|
179
|
+
"name": "remove-outline",
|
|
180
|
+
"onClick": this.minimize
|
|
181
|
+
}, null), vue.createVNode("ion-icon", {
|
|
182
|
+
"name": "expand-outline",
|
|
183
|
+
"onClick": this.expand
|
|
184
|
+
}, null), vue.createVNode("ion-icon", {
|
|
185
|
+
"name": "close-outline",
|
|
186
|
+
"onClick": this.close
|
|
187
|
+
}, null)]), vue.createVNode("div", {
|
|
188
|
+
"class": this.ns.b("content")
|
|
189
|
+
}, [this.items.map((item) => {
|
|
190
|
+
var _a;
|
|
191
|
+
if (!item.controller.isActive) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
const {
|
|
195
|
+
caption,
|
|
196
|
+
name
|
|
197
|
+
} = item.controller.model;
|
|
198
|
+
const text = `${caption || ""}\uFF08${name || ""}\uFF09`;
|
|
199
|
+
const type = ((_a = this.activeItem) == null ? void 0 : _a.key) === item.key ? "success" : "";
|
|
200
|
+
return vue.createVNode("div", {
|
|
201
|
+
"key": item.key,
|
|
202
|
+
"class": this.ns.b("item")
|
|
203
|
+
}, [vue.createVNode(vue.resolveComponent("el-tag"), {
|
|
204
|
+
"type": type,
|
|
205
|
+
"class": this.ns.be("item", "text"),
|
|
206
|
+
"title": text,
|
|
207
|
+
"onClick": () => this.onItemClick(item),
|
|
208
|
+
"onMouseenter": () => this.onMouseEnter(item),
|
|
209
|
+
"onMouseleave": () => this.onMouseLeave(item)
|
|
210
|
+
}, _isSlot(text) ? text : {
|
|
211
|
+
default: () => [text]
|
|
212
|
+
}), vue.createVNode("div", {
|
|
213
|
+
"class": this.ns.be("item", "button"),
|
|
214
|
+
"onClick": () => this.copy(name)
|
|
215
|
+
}, [vue.createTextVNode("\u62F7\u8D1D")])]);
|
|
216
|
+
})])])]);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
exports.DevtoolAction = DevtoolAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-devtool-action{position:absolute;right:0;bottom:0;z-index:9999;display:flex;height:100%;font-size:13px;color:#fff;background:rgba(96,98,102,.8);transition:all .5s}.ibiz-devtool-action-collapse{flex:0 0 auto;width:320px;padding:0 12px;margin-top:44px;margin-bottom:12px;overflow:auto;border-right:1px solid #999}.ibiz-devtool-action-collapse-item{display:flex;align-items:center;padding-bottom:4px}.ibiz-devtool-action-collapse-item__key{flex:0 0 auto;width:40%;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.ibiz-devtool-action-collapse-item__key:hover{color:#dbe6ff}.ibiz-devtool-action-collapse-item__value{flex:0 0 auto;width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.ibiz-devtool-action-collapse-item__value:hover{color:#dbe6ff}.ibiz-devtool-action-container{display:flex;flex:0 0 auto;flex-direction:column;width:400px;padding:12px}.ibiz-devtool-action-header{display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;height:20px;margin-bottom:12px}.ibiz-devtool-action-header ion-icon{margin-right:12px;font-size:20px;cursor:pointer}.ibiz-devtool-action-header ion-icon:last-child{margin-right:0}.ibiz-devtool-action-content{display:flex;flex:0 0 auto;flex-direction:column;height:calc(100% - 32px);overflow:auto}.ibiz-devtool-action-item{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.ibiz-devtool-action-item__text{display:flex;flex:1 1 0;justify-content:flex-start;height:auto;padding:4px 6px;margin-right:16px;overflow:hidden;line-height:normal;cursor:pointer}.ibiz-devtool-action-item__text>.el-tag__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-devtool-action-item__button{flex:0 0 auto;cursor:pointer}.ibiz-devtool-action-item__button:hover{color:#409eff}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var qxUtil = require('qx-util');
|
|
5
|
+
var ElementPlus = require('element-plus');
|
|
6
|
+
var zhCn = require('../node_modules/.pnpm/element-plus@2.3.9_vue@3.3.4/node_modules/element-plus/dist/locale/zh-cn.cjs');
|
|
7
|
+
var devtoolAction = require('./devtool-action.cjs');
|
|
8
|
+
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __publicField = (obj, key, value) => {
|
|
12
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
class Devtool {
|
|
16
|
+
constructor() {
|
|
17
|
+
/**
|
|
18
|
+
* 视图map
|
|
19
|
+
*
|
|
20
|
+
* @author zhanghengfeng
|
|
21
|
+
* @date 2023-08-28 18:08:16
|
|
22
|
+
*/
|
|
23
|
+
__publicField(this, "viewMap", /* @__PURE__ */ new Map());
|
|
24
|
+
/**
|
|
25
|
+
* 事件中心
|
|
26
|
+
*
|
|
27
|
+
* @author zhanghengfeng
|
|
28
|
+
* @date 2023-08-28 18:08:43
|
|
29
|
+
*/
|
|
30
|
+
__publicField(this, "evt", new qxUtil.QXEvent());
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 初始化devtool工具
|
|
34
|
+
*
|
|
35
|
+
* @author zhanghengfeng
|
|
36
|
+
* @date 2023-08-28 18:08:24
|
|
37
|
+
* @param {Router} router
|
|
38
|
+
*/
|
|
39
|
+
init(router) {
|
|
40
|
+
const devtool2 = document.createElement("div");
|
|
41
|
+
devtool2.classList.add("devtool");
|
|
42
|
+
document.body.append(devtool2);
|
|
43
|
+
const app = vue.createApp(devtoolAction.DevtoolAction);
|
|
44
|
+
app.use(router);
|
|
45
|
+
app.use(ElementPlus, {
|
|
46
|
+
locale: zhCn.default
|
|
47
|
+
});
|
|
48
|
+
app.provide("devtool-evt", this.evt);
|
|
49
|
+
app.mount(devtool2);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 注册视图
|
|
53
|
+
*
|
|
54
|
+
* @author zhanghengfeng
|
|
55
|
+
* @date 2023-08-28 18:08:25
|
|
56
|
+
* @param {string} key
|
|
57
|
+
* @param {ViewController} controller
|
|
58
|
+
* @param {(Ref<HTMLElement | null>)} dom
|
|
59
|
+
*/
|
|
60
|
+
registerView(key, controller, dom) {
|
|
61
|
+
this.viewMap.set(key, {
|
|
62
|
+
key,
|
|
63
|
+
controller,
|
|
64
|
+
dom
|
|
65
|
+
});
|
|
66
|
+
this.evt.emit("change", this.viewMap);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 注销视图
|
|
70
|
+
*
|
|
71
|
+
* @author zhanghengfeng
|
|
72
|
+
* @date 2023-08-28 18:08:39
|
|
73
|
+
* @param {string} key
|
|
74
|
+
*/
|
|
75
|
+
unRegisterView(key) {
|
|
76
|
+
this.viewMap.delete(key);
|
|
77
|
+
this.evt.emit("change", this.viewMap);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const devtool = new Devtool();
|
|
81
|
+
|
|
82
|
+
exports.Devtool = Devtool;
|
|
83
|
+
exports.devtool = devtool;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var editorForVue = require('@wangeditor/editor-for-vue');
|
|
7
7
|
var qxUtil = require('qx-util');
|
|
8
|
+
var ramda = require('ramda');
|
|
8
9
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
9
10
|
var core = require('@ibiz-template/core');
|
|
10
11
|
require('./wang-editor.css');
|
|
@@ -119,10 +120,14 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
|
119
120
|
});
|
|
120
121
|
const handleCreated = (editor) => {
|
|
121
122
|
editorRef.value = editor;
|
|
123
|
+
editor.setHtml(valueHtml.value);
|
|
122
124
|
};
|
|
123
125
|
const handleChange = (editor) => {
|
|
124
126
|
const html = editor.getHtml();
|
|
125
127
|
const emitValue = html === "<p><br></p>" ? "" : html;
|
|
128
|
+
if (emitValue === props.value || emitValue === "" && ramda.isNil(props.value)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
126
131
|
emit("change", emitValue);
|
|
127
132
|
};
|
|
128
133
|
const handleDestroyed = (_editor) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-markdown .cherry-preview--full{border-left:none}.ibiz-markdown .theme__dark,.ibiz-markdown .theme__light{color:var(--ibiz-form-item-text-color)}.ibiz-markdown .cherry-markdown h1 a::before,.ibiz-markdown .cherry-markdown h2 a::before,.ibiz-markdown .cherry-markdown h3 a::before,.ibiz-markdown .cherry-markdown h4 a::before,.ibiz-markdown .cherry-markdown h5 a::before,.ibiz-markdown .cherry-markdown h6 a::before{display:none}
|
|
1
|
+
.ibiz-markdown{min-height:600px}.ibiz-markdown .cherry-preview--full{border-left:none}.ibiz-markdown .theme__dark,.ibiz-markdown .theme__light{color:var(--ibiz-form-item-text-color)}.ibiz-markdown .cherry-markdown h1 a::before,.ibiz-markdown .cherry-markdown h2 a::before,.ibiz-markdown .cherry-markdown h3 a::before,.ibiz-markdown .cherry-markdown h4 a::before,.ibiz-markdown .cherry-markdown h5 a::before,.ibiz-markdown .cherry-markdown h6 a::before{display:none}
|