@gct-paas/design 0.1.6-dev.0 → 0.1.6-dev.1
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/loader.esm.min.js +1 -1
- package/es/components/field-transfer/components/Transfer/TreeItem.mjs +3 -2
- package/es/components/field-transfer/less/AdvancedTransfer.css +2 -2
- package/es/components/field-transfer/less/FieldCascader.css +8 -8
- package/es/components/field-transfer/less/TransferTree.css +3 -3
- package/es/components/field-transfer/less/TreeItem.css +79 -14
- package/es/hooks/design-view/page/usePage.mjs +1 -1
- package/es/utils/schema/index.mjs +4 -0
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../less/TreeItem.css';/* empty css */
|
|
2
|
-
import { t } from "@gct-paas/core";
|
|
2
|
+
import { t, useNamespace } from "@gct-paas/core";
|
|
3
3
|
import { computed, createVNode, defineComponent } from "vue";
|
|
4
4
|
import { Tooltip } from "ant-design-vue";
|
|
5
5
|
//#region src/components/field-transfer/components/Transfer/TreeItem.tsx
|
|
@@ -13,11 +13,12 @@ var TreeItem_default = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
draggable: Boolean
|
|
14
14
|
},
|
|
15
15
|
setup(props) {
|
|
16
|
+
const ns = useNamespace("field-transfer-tree-item");
|
|
16
17
|
const editing = computed(() => {
|
|
17
18
|
return props.node.isNew;
|
|
18
19
|
});
|
|
19
20
|
return () => {
|
|
20
|
-
return createVNode("div", { "class":
|
|
21
|
+
return createVNode("div", { "class": ns.b() }, [createVNode("div", { "class": ns.e("title") }, [createVNode(Tooltip, { "title": props.node.tooltip }, { default: () => [createVNode("span", null, [props.node.title || "-"])] })]), !editing.value && props.draggable && !props.node?.disabled && !props.node?._preset && createVNode("div", { "class": ns.e("operation") }, [createVNode(Tooltip, { "title": t("sys.component.fieldTransfer.move") }, { default: () => [createVNode("i", { "class": ["iconfont", "icon-drag"] }, null)] })])]);
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
});
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
|
5
5
|
padding: 16px;
|
|
6
|
-
border: 1px solid #f0f0f0;
|
|
7
6
|
background-color: #fafafa;
|
|
7
|
+
border: 1px solid #f0f0f0;
|
|
8
8
|
}
|
|
9
9
|
.advanced-transfer-container .ant-transfer-list-body {
|
|
10
10
|
height: 340px;
|
|
11
11
|
}
|
|
12
12
|
.advanced-transfer-container .ant-transfer-list-body .field-title {
|
|
13
13
|
overflow: hidden;
|
|
14
|
-
color: #333;
|
|
15
14
|
text-overflow: ellipsis;
|
|
15
|
+
color: #333;
|
|
16
16
|
white-space: nowrap;
|
|
17
17
|
}
|
|
18
18
|
.advanced-transfer-container .ant-transfer-list-body .field-title .field-icon {
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
outline: none;
|
|
6
6
|
}
|
|
7
7
|
.field-cascader .bread {
|
|
8
|
-
color: #333;
|
|
9
8
|
display: inline-block;
|
|
10
9
|
line-height: 32px;
|
|
10
|
+
color: #333;
|
|
11
11
|
}
|
|
12
12
|
.field-cascader .bread .field-cascader-title {
|
|
13
13
|
color: #666;
|
|
14
14
|
}
|
|
15
15
|
.field-cascader .last-name {
|
|
16
|
-
color: #333;
|
|
17
16
|
margin-left: 4px;
|
|
17
|
+
color: #333;
|
|
18
18
|
}
|
|
19
19
|
.field-cascader .down-icon {
|
|
20
20
|
color: #bfbfbf;
|
|
@@ -26,32 +26,32 @@
|
|
|
26
26
|
max-width: 60vw;
|
|
27
27
|
}
|
|
28
28
|
.field-popup-cascader .ant-cascader-menu-item {
|
|
29
|
-
padding: 0;
|
|
30
29
|
min-width: 160px;
|
|
30
|
+
padding: 0;
|
|
31
31
|
}
|
|
32
32
|
.field-popup-cascader .ant-cascader-menu-item .ant-cascader-menu-item-content {
|
|
33
33
|
display: flex;
|
|
34
34
|
align-items: center;
|
|
35
35
|
}
|
|
36
36
|
.field-popup-cascader .ant-cascader-menu-item .field-ops {
|
|
37
|
+
flex: 1;
|
|
37
38
|
padding-right: 0;
|
|
38
|
-
line-height: 32px;
|
|
39
39
|
padding-left: 16px;
|
|
40
|
-
|
|
40
|
+
line-height: 32px;
|
|
41
41
|
}
|
|
42
42
|
.field-popup-cascader .ant-cascader-menu-item .field-ops .field-ops-name .field-ops-desc {
|
|
43
43
|
color: rgba(0, 0, 0, 0.45);
|
|
44
44
|
}
|
|
45
45
|
.field-popup-cascader .ant-cascader-menu-item .iconfont {
|
|
46
|
-
font-size: 12px;
|
|
47
|
-
padding-right: 8px;
|
|
48
46
|
flex-shrink: 0;
|
|
47
|
+
padding-right: 8px;
|
|
48
|
+
font-size: 12px;
|
|
49
49
|
color: rgba(0, 0, 0, 0.45);
|
|
50
50
|
}
|
|
51
51
|
.field-popup-cascader .ant-cascader-menu-item .ant-cascader-menu-item-expand-icon {
|
|
52
52
|
display: none;
|
|
53
53
|
}
|
|
54
54
|
.field-popup-cascader .ant-cascader-menu-item.ant-cascader-menu-item-disabled {
|
|
55
|
-
cursor: default;
|
|
56
55
|
color: #c3c3c3;
|
|
56
|
+
cursor: default;
|
|
57
57
|
}
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
justify-content: center;
|
|
18
18
|
width: 16px;
|
|
19
19
|
height: 16px;
|
|
20
|
-
color: #bfbfbf;
|
|
21
20
|
font-size: 14px;
|
|
21
|
+
color: #bfbfbf;
|
|
22
22
|
}
|
|
23
23
|
.transfer-tree-container .tree-wrapper {
|
|
24
24
|
flex: 1;
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
opacity: 0;
|
|
66
66
|
}
|
|
67
67
|
.transfer-tree-container .ant-tree-switcher {
|
|
68
|
-
display: none;
|
|
69
68
|
position: relative;
|
|
70
69
|
top: -1px;
|
|
70
|
+
display: none;
|
|
71
71
|
align-self: center;
|
|
72
72
|
width: 20px;
|
|
73
|
-
background: transparent;
|
|
74
73
|
color: rgba(0, 0, 0, 0.45);
|
|
74
|
+
background: transparent;
|
|
75
75
|
}
|
|
76
76
|
.transfer-tree-container .ant-tree-checkbox {
|
|
77
77
|
margin-top: 0;
|
|
@@ -1,29 +1,94 @@
|
|
|
1
|
-
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.gct-field-transfer-tree-item {
|
|
2
66
|
position: relative;
|
|
3
67
|
display: flex;
|
|
4
68
|
align-items: center;
|
|
5
69
|
}
|
|
6
|
-
.tree-item
|
|
70
|
+
.gct-field-transfer-tree-item:hover .gct-field-transfer-tree-item__operation {
|
|
7
71
|
opacity: 1;
|
|
8
72
|
}
|
|
9
|
-
.
|
|
10
|
-
word-break: keep-all;
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
text-overflow: ellipsis;
|
|
73
|
+
.gct-field-transfer-tree-item__title {
|
|
14
74
|
flex: 1;
|
|
15
75
|
width: 1px;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
word-break: keep-all;
|
|
19
79
|
white-space: nowrap;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.gct-field-transfer-tree-item__operation {
|
|
20
83
|
color: #8c8c8c;
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
opacity: 0;
|
|
21
86
|
}
|
|
22
|
-
.
|
|
23
|
-
color: #bfbfbf;
|
|
87
|
+
.gct-field-transfer-tree-item__operation .iconfont {
|
|
24
88
|
margin: 0 4px;
|
|
25
89
|
font-size: 12px;
|
|
90
|
+
color: #bfbfbf;
|
|
26
91
|
}
|
|
27
|
-
.
|
|
92
|
+
.gct-field-transfer-tree-item__operation .iconfont:hover {
|
|
28
93
|
color: #595959;
|
|
29
|
-
}
|
|
94
|
+
}
|
|
@@ -43,7 +43,7 @@ async function loadPageInfo(app) {
|
|
|
43
43
|
};
|
|
44
44
|
else pageInfo.value = platform.value === Platform.WEB ? await _api.apaas.webpage.getInfo({ id: _gct.store.context.pid }) : platform.value === Platform.PAD ? await _api.apaas.padPage.getInfo({ id: _gct.store.context.pid }) : await _api.apaas.mobilePage.getInfo({ id: _gct.store.context.pid });
|
|
45
45
|
const all = [];
|
|
46
|
-
all.push(KitPkgUtil.loadDesign(_gct.store.appInfo.suiteKey).then((module) => {
|
|
46
|
+
if (_gct.store.appInfo.suiteKey) all.push(KitPkgUtil.loadDesign(_gct.store.appInfo.suiteKey).then((module) => {
|
|
47
47
|
if (module) module.setupApp(app);
|
|
48
48
|
}));
|
|
49
49
|
const _configs = [];
|
|
@@ -10,6 +10,10 @@ import { cloneWidget } from "@gct-paas/schema";
|
|
|
10
10
|
* @return {*} {Mapping[T]}
|
|
11
11
|
*/
|
|
12
12
|
function createWidgetByType(type) {
|
|
13
|
+
if (!type) {
|
|
14
|
+
console.warn("Widget type is not existed.");
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
13
17
|
const p = designRegister.value.getProvider(type);
|
|
14
18
|
if (!p) throw new Error(`Widget type ${type} is not registered.`);
|
|
15
19
|
return cloneWidget(p.schema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.1.6-dev.
|
|
3
|
+
"version": "0.1.6-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"react-dnd-html5-backend": "^16.0.1",
|
|
52
52
|
"vue": "^3.5.30",
|
|
53
53
|
"vue3-dnd": "^2.1.0",
|
|
54
|
-
"@gct-paas/core
|
|
55
|
-
"@gct-paas/
|
|
56
|
-
"@gct-paas/
|
|
57
|
-
"@gct-paas/schema": "0.1.6-dev.
|
|
54
|
+
"@gct-paas/core": "0.1.6-dev.1",
|
|
55
|
+
"@gct-paas/scss": "0.1.6-dev.1",
|
|
56
|
+
"@gct-paas/core-web": "0.1.6-dev.1",
|
|
57
|
+
"@gct-paas/schema": "0.1.6-dev.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/babel__core": "^7.20.5",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@gct-paas/api": "^0.1.4-dev.4",
|
|
66
66
|
"vue": ">=3",
|
|
67
|
-
"@gct-paas/core
|
|
68
|
-
"@gct-paas/core": "0.1.6-dev.
|
|
69
|
-
"@gct-paas/
|
|
70
|
-
"@gct-paas/
|
|
67
|
+
"@gct-paas/core": "0.1.6-dev.1",
|
|
68
|
+
"@gct-paas/core-web": "0.1.6-dev.1",
|
|
69
|
+
"@gct-paas/scss": "0.1.6-dev.1",
|
|
70
|
+
"@gct-paas/schema": "0.1.6-dev.1"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
|