fl-web-component 0.1.0 → 0.1.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/README.md +35 -24
- package/dist/fl-web-component.common.js +67035 -54
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/dist/fl-web-component.umd.js +67035 -54
- package/dist/fl-web-component.umd.js.map +1 -1
- package/dist/fl-web-component.umd.min.js +13 -1
- package/dist/fl-web-component.umd.min.js.map +1 -1
- package/package.json +59 -47
- package/packages/components/button/index.vue +6 -3
- package/packages/components/com-card/card-page.vue +100 -0
- package/packages/components/com-card/index.vue +54 -0
- package/packages/components/com-dialogWrapper/Readme.md +53 -0
- package/packages/components/com-dialogWrapper/index.vue +101 -0
- package/packages/components/com-formDialog/Readme.md +409 -0
- package/packages/components/com-formDialog/index.vue +470 -0
- package/packages/components/com-graphics/index.vue +240 -0
- package/packages/components/com-page/index.vue +101 -0
- package/packages/components/com-selectTree/Readme.md +17 -0
- package/packages/components/com-selectTree/index.vue +238 -0
- package/packages/components/com-table/column-default.vue +76 -0
- package/packages/components/com-table/column-dynamic.vue +40 -0
- package/packages/components/com-table/column-menu.vue +71 -0
- package/packages/components/com-table/column-slot.vue +53 -0
- package/packages/components/com-table/column.vue +49 -0
- package/packages/components/com-table/config.js +21 -0
- package/packages/components/com-table/index.vue +281 -0
- package/packages/components/com-table/table-page.vue +106 -0
- package/packages/components/com-tabs/index.vue +50 -0
- package/packages/components/com-treeDynamic/Readme.md +271 -0
- package/packages/components/com-treeDynamic/index.vue +207 -0
- package/patches/camera-controls+2.9.0.patch +63 -0
- package/{packages/index.js → src/main.js} +5 -5
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: fengyang9326@163.com
|
|
3
|
+
* @Date: 2024-05-15 15:22:52
|
|
4
|
+
* @LastEditors: fengyang9326@163.com
|
|
5
|
+
* @LastEditTime: 2024-05-16 10:27:18
|
|
6
|
+
* @FilePath: /web/framework/src/views/system/temporary/tree-dynamic.vue
|
|
7
|
+
* @Description:
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div class="tree_dynamic">
|
|
11
|
+
<!-- 搜索框 -->
|
|
12
|
+
<el-input
|
|
13
|
+
v-if="hasSearch"
|
|
14
|
+
v-model="filterText"
|
|
15
|
+
class="filter_input"
|
|
16
|
+
clearable
|
|
17
|
+
:size="inputSize"
|
|
18
|
+
:placeholder="filterPlaceholder"
|
|
19
|
+
/>
|
|
20
|
+
<!-- 树结构 -->
|
|
21
|
+
<el-tree
|
|
22
|
+
ref="dynamicTree"
|
|
23
|
+
:class="hasSearch ? 'whole_tree' : 'part_tree'"
|
|
24
|
+
:data="treeData"
|
|
25
|
+
:props="treeProps"
|
|
26
|
+
:style="{ height: treeHeight }"
|
|
27
|
+
:expand-on-click-node="expandOnClickNode"
|
|
28
|
+
:node-key="nodeKey"
|
|
29
|
+
:default-expand-all="defaultExpandAll"
|
|
30
|
+
:filter-node-method="filterNode"
|
|
31
|
+
highlight-current
|
|
32
|
+
@node-click="treeNodeClick"
|
|
33
|
+
>
|
|
34
|
+
<span slot-scope="{ node, data }" class="custom-tree-node" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
|
35
|
+
<span :title="node.label" class="tree_node_span">
|
|
36
|
+
<template id="">
|
|
37
|
+
<i class="el-icon-folder-opened" style="margin-right:3px" />
|
|
38
|
+
</template>
|
|
39
|
+
<span :title="node.label" class="title_tree">{{ node.label }}</span>
|
|
40
|
+
</span>
|
|
41
|
+
<span class="tree_operation" style=" display: inline-block; width: 80px; text-align: right; ">
|
|
42
|
+
<slot v-if="treeNodeHandle" class="fr_text" :data="data">
|
|
43
|
+
操作按钮
|
|
44
|
+
</slot>
|
|
45
|
+
|
|
46
|
+
</span>
|
|
47
|
+
</span>
|
|
48
|
+
</el-tree>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
export default {
|
|
54
|
+
name: 'TreeDynamic',
|
|
55
|
+
components: {},
|
|
56
|
+
props: {
|
|
57
|
+
/* 是否可搜索 */
|
|
58
|
+
hasSearch: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
61
|
+
},
|
|
62
|
+
/* 搜索框文字提示 */
|
|
63
|
+
filterPlaceholder: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '输入关键字进行过滤'
|
|
66
|
+
},
|
|
67
|
+
// 搜索框大小
|
|
68
|
+
inputSize: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'small'
|
|
71
|
+
},
|
|
72
|
+
/* 树结构数据 */
|
|
73
|
+
treeData: {
|
|
74
|
+
type: Array,
|
|
75
|
+
default: () => [],
|
|
76
|
+
required: true
|
|
77
|
+
},
|
|
78
|
+
/* 树结构 props */
|
|
79
|
+
treeProps: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default: () => {},
|
|
82
|
+
required: true
|
|
83
|
+
},
|
|
84
|
+
/* 是否默认展开所有节点 */
|
|
85
|
+
defaultExpandAll: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: true
|
|
88
|
+
},
|
|
89
|
+
/* 是否在点击节点的时候展开或者收缩节点 */
|
|
90
|
+
expandOnClickNode: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false
|
|
93
|
+
},
|
|
94
|
+
/* 树节点 nodeKey */
|
|
95
|
+
nodeKey: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'id'
|
|
98
|
+
},
|
|
99
|
+
/* 树结构节点操作 */
|
|
100
|
+
treeNodeHandle: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: true
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
data() {
|
|
107
|
+
return {
|
|
108
|
+
/* 搜索字段 */
|
|
109
|
+
filterText: '',
|
|
110
|
+
treeHeight: ''
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
computed: {},
|
|
114
|
+
watch: {
|
|
115
|
+
filterText(val) {
|
|
116
|
+
this.$refs.dynamicTree.filter(val)
|
|
117
|
+
},
|
|
118
|
+
deep: true
|
|
119
|
+
},
|
|
120
|
+
created() {},
|
|
121
|
+
mounted() {
|
|
122
|
+
/* 获取搜索框样式,动态赋值树高度 */
|
|
123
|
+
if (this.hasSearch) {
|
|
124
|
+
const that = this
|
|
125
|
+
this.$nextTick(() => {
|
|
126
|
+
const inputDom = document.getElementsByClassName('filter_input')[0]
|
|
127
|
+
if (inputDom) {
|
|
128
|
+
const inputDomHeight = inputDom.scrollHeight + 8
|
|
129
|
+
if (inputDomHeight) {
|
|
130
|
+
const treeCalcHeight = `calc(100% - ${inputDomHeight}px)`
|
|
131
|
+
that.$set(that, 'treeHeight', treeCalcHeight)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
} else {
|
|
136
|
+
this.$set(this, 'treeHeight', '100%')
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
methods: {
|
|
140
|
+
/* 搜索 */
|
|
141
|
+
filterNode(value, data) {
|
|
142
|
+
if (!value) return true
|
|
143
|
+
const label = this.treeProps.label
|
|
144
|
+
return data[label].indexOf(value) !== -1
|
|
145
|
+
},
|
|
146
|
+
/* 树结构 点击节点 */
|
|
147
|
+
treeNodeClick(node) {
|
|
148
|
+
this.$emit('treeNodeClick', node)
|
|
149
|
+
},
|
|
150
|
+
/** 树节点鼠标移入移出 */
|
|
151
|
+
mouseenter(data) {
|
|
152
|
+
this.$set(data, 'show', true)
|
|
153
|
+
},
|
|
154
|
+
mouseleave(data) {
|
|
155
|
+
this.$set(data, 'show', false)
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
</script>
|
|
160
|
+
<style lang="scss" scoped>
|
|
161
|
+
.tree_dynamic {
|
|
162
|
+
height: 100%;
|
|
163
|
+
width: 100%;
|
|
164
|
+
box-sizing: border-box;
|
|
165
|
+
padding-right: 1px;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
}
|
|
168
|
+
/* 搜索框样式 */
|
|
169
|
+
.filter_input {
|
|
170
|
+
margin-bottom: 8px;
|
|
171
|
+
}
|
|
172
|
+
/* 树结构样式 */
|
|
173
|
+
.el-tree {
|
|
174
|
+
width: 100%;
|
|
175
|
+
overflow-y: auto;
|
|
176
|
+
.custom-tree-node{
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
width: calc(100% - 24px)!important;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
}
|
|
182
|
+
.custom-tree-node .tree_node_span{
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
width: calc(100% - 80px)!important;
|
|
187
|
+
i {
|
|
188
|
+
display: inline-block;
|
|
189
|
+
}
|
|
190
|
+
.title_tree{
|
|
191
|
+
display: inline-block;
|
|
192
|
+
width: calc(100% - 18px)!important;
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
white-space: nowrap;
|
|
195
|
+
text-overflow: ellipsis;
|
|
196
|
+
height: 100%;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
.part_tree {
|
|
201
|
+
height: 100%;
|
|
202
|
+
}
|
|
203
|
+
.whole_tree {
|
|
204
|
+
height: v-bind(treeHeight);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
diff --git a/node_modules/camera-controls/dist/camera-controls.module.js b/node_modules/camera-controls/dist/camera-controls.module.js
|
|
2
|
+
index 08a8fd6..76089cb 100644
|
|
3
|
+
--- a/node_modules/camera-controls/dist/camera-controls.module.js
|
|
4
|
+
+++ b/node_modules/camera-controls/dist/camera-controls.module.js
|
|
5
|
+
@@ -1395,7 +1395,7 @@ class CameraControls extends EventDispatcher {
|
|
6
|
+
* @category Methods
|
|
7
|
+
*/
|
|
8
|
+
dolly(distance, enableTransition = false) {
|
|
9
|
+
- return this.dollyTo(this._sphericalEnd.radius - distance, enableTransition);
|
|
10
|
+
+ return this.dollyTo(this._sphericalEnd.radius - distance, this.minDistance, enableTransition);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Dolly in/out camera position to given distance.
|
|
14
|
+
@@ -1403,11 +1403,11 @@ class CameraControls extends EventDispatcher {
|
|
15
|
+
* @param enableTransition Whether to move smoothly or immediately.
|
|
16
|
+
* @category Methods
|
|
17
|
+
*/
|
|
18
|
+
- dollyTo(distance, enableTransition = false) {
|
|
19
|
+
+ dollyTo(distance, minDistance, enableTransition = false) {
|
|
20
|
+
this._isUserControllingDolly = false;
|
|
21
|
+
this._lastDollyDirection = DOLLY_DIRECTION.NONE;
|
|
22
|
+
this._changedDolly = 0;
|
|
23
|
+
- return this._dollyToNoClamp(clamp(distance, this.minDistance, this.maxDistance), enableTransition);
|
|
24
|
+
+ return this._dollyToNoClamp(clamp(distance, minDistance, this.maxDistance), enableTransition);
|
|
25
|
+
}
|
|
26
|
+
_dollyToNoClamp(distance, enableTransition = false) {
|
|
27
|
+
const lastRadius = this._sphericalEnd.radius;
|
|
28
|
+
@@ -1635,7 +1635,7 @@ class CameraControls extends EventDispatcher {
|
|
29
|
+
if (isPerspectiveCamera(this._camera)) {
|
|
30
|
+
const distance = this.getDistanceToFitBox(bbSize.x, bbSize.y, bbSize.z, cover);
|
|
31
|
+
promises.push(this.moveTo(center.x, center.y, center.z, enableTransition));
|
|
32
|
+
- promises.push(this.dollyTo(distance, enableTransition));
|
|
33
|
+
+ promises.push(this.dollyTo(distance, this.minDistance, enableTransition));
|
|
34
|
+
promises.push(this.setFocalOffset(0, 0, 0, enableTransition));
|
|
35
|
+
}
|
|
36
|
+
else if (isOrthographicCamera(this._camera)) {
|
|
37
|
+
@@ -1664,7 +1664,7 @@ class CameraControls extends EventDispatcher {
|
|
38
|
+
promises.push(this.moveTo(boundingSphere.center.x, boundingSphere.center.y, boundingSphere.center.z, enableTransition));
|
|
39
|
+
if (isPerspectiveCamera(this._camera)) {
|
|
40
|
+
const distanceToFit = this.getDistanceToFitSphere(boundingSphere.radius);
|
|
41
|
+
- promises.push(this.dollyTo(distanceToFit, enableTransition));
|
|
42
|
+
+ promises.push(this.dollyTo(distanceToFit, this.minDistance, enableTransition));
|
|
43
|
+
}
|
|
44
|
+
else if (isOrthographicCamera(this._camera)) {
|
|
45
|
+
const width = this._camera.right - this._camera.left;
|
|
46
|
+
@@ -1831,7 +1831,7 @@ class CameraControls extends EventDispatcher {
|
|
47
|
+
_zColumn.multiplyScalar(cameraToPoint.z);
|
|
48
|
+
_v3A.copy(_xColumn).add(_yColumn).add(_zColumn);
|
|
49
|
+
_v3A.z = _v3A.z + distance;
|
|
50
|
+
- this.dollyTo(distance, false);
|
|
51
|
+
+ this.dollyTo(distance, Number.EPSILON, false);
|
|
52
|
+
this.setFocalOffset(-_v3A.x, _v3A.y, -_v3A.z, false);
|
|
53
|
+
this.moveTo(targetX, targetY, targetZ, false);
|
|
54
|
+
}
|
|
55
|
+
@@ -2283,7 +2283,7 @@ class CameraControls extends EventDispatcher {
|
|
56
|
+
this.moveTo(obj.target[0], obj.target[1], obj.target[2], enableTransition);
|
|
57
|
+
_sphericalA.setFromVector3(_v3A.fromArray(obj.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace));
|
|
58
|
+
this.rotateTo(_sphericalA.theta, _sphericalA.phi, enableTransition);
|
|
59
|
+
- this.dollyTo(_sphericalA.radius, enableTransition);
|
|
60
|
+
+ this.dollyTo(_sphericalA.radius, this.minDistance, enableTransition);
|
|
61
|
+
this.zoomTo(obj.zoom, enableTransition);
|
|
62
|
+
this.setFocalOffset(obj.focalOffset[0], obj.focalOffset[1], obj.focalOffset[2], enableTransition);
|
|
63
|
+
this._needsUpdate = true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import MyButton from '
|
|
1
|
+
import Model from '../packages/components/com-graphics/index.vue';
|
|
2
|
+
import MyButton from '../packages/components/button/index.vue';
|
|
3
3
|
|
|
4
4
|
const components = [
|
|
5
|
-
|
|
5
|
+
Model,
|
|
6
6
|
MyButton,
|
|
7
7
|
];
|
|
8
8
|
|
|
@@ -17,8 +17,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
17
17
|
install(window.Vue);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export default {
|
|
20
|
+
export default {
|
|
21
21
|
install,
|
|
22
|
-
|
|
22
|
+
Model,
|
|
23
23
|
MyButton,
|
|
24
24
|
};
|