fl-web-component 1.2.11 → 1.2.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.
Files changed (54) hide show
  1. package/README.md +4 -0
  2. package/dist/fl-web-component.common.1.js +15 -15
  3. package/dist/fl-web-component.common.1.js.map +1 -1
  4. package/dist/fl-web-component.common.2.js.map +1 -1
  5. package/dist/fl-web-component.common.3.js.map +1 -1
  6. package/dist/fl-web-component.common.js +160 -115
  7. package/dist/fl-web-component.common.js.map +1 -1
  8. package/dist/fl-web-component.css +1 -1
  9. package/package.json +1 -1
  10. package/packages/components/com-flcanvas/index.vue +2 -2
  11. package/packages/components/com-graphics/index.vue +31 -6
  12. package/src/utils/flgltf-parser.js +68 -50
  13. package/src/utils/instance-parser.js +39 -30
  14. package/packages/components/button/index.vue +0 -26
  15. package/packages/components/model/api/index.js +0 -421
  16. package/packages/components/model/api/mock/detecttree.js +0 -58
  17. package/packages/components/model/api/mock/getmodel-line.js +0 -15834
  18. package/packages/components/model/api/mock/init.js +0 -1
  19. package/packages/components/model/api/mock/pbstree.js +0 -826
  20. package/packages/components/model/api/mock/topology.json +0 -3238
  21. package/packages/components/model/components/TextOverTooltip/index.vue +0 -84
  22. package/packages/components/model/components/annotation-toolbar.vue +0 -410
  23. package/packages/components/model/components/check-proofing-model.vue +0 -39
  24. package/packages/components/model/components/clipping-type.vue +0 -59
  25. package/packages/components/model/components/com-dialogWrapper/Readme.md +0 -53
  26. package/packages/components/model/components/com-dialogWrapper/index.vue +0 -114
  27. package/packages/components/model/components/detect-panel.vue +0 -339
  28. package/packages/components/model/components/detect-tree.vue +0 -445
  29. package/packages/components/model/components/firstPer-panel.vue +0 -109
  30. package/packages/components/model/components/header-button.vue +0 -470
  31. package/packages/components/model/components/imageViewer/index.vue +0 -126
  32. package/packages/components/model/components/import-model.vue +0 -127
  33. package/packages/components/model/components/location-panel.vue +0 -91
  34. package/packages/components/model/components/measure-type.vue +0 -59
  35. package/packages/components/model/components/pbs-tree.vue +0 -497
  36. package/packages/components/model/components/proof-config.vue +0 -72
  37. package/packages/components/model/components/proof-for-pc.vue +0 -126
  38. package/packages/components/model/components/proof-history.vue +0 -300
  39. package/packages/components/model/components/proof-panel-detail.vue +0 -568
  40. package/packages/components/model/components/proof-panel.vue +0 -846
  41. package/packages/components/model/components/proof-project-user.vue +0 -445
  42. package/packages/components/model/components/proof-publish.vue +0 -130
  43. package/packages/components/model/components/proof-role.vue +0 -504
  44. package/packages/components/model/components/props-panel.vue +0 -258
  45. package/packages/components/model/index.vue +0 -3425
  46. package/packages/components/model/readme.md +0 -31
  47. package/packages/components/model/utils/annotation-tool.js +0 -333
  48. package/packages/components/model/utils/cursor.js +0 -23
  49. package/packages/components/model/utils/detect-v1.js +0 -329
  50. package/packages/components/model/utils/index.js +0 -48
  51. package/packages/components/model/utils/threejs/measure-angle.js +0 -258
  52. package/packages/components/model/utils/threejs/measure-area.js +0 -281
  53. package/packages/components/model/utils/threejs/measure-distance.js +0 -209
  54. package/packages/components/model/utils/threejs/measure-volume.js +0 -97
@@ -1,84 +0,0 @@
1
- <!--
2
- * @Author: luoxue
3
- * @Date: 2022-09-05 15:40:46
4
- * @LastEditors: luoxue
5
- * @LastEditTime: 2023-06-15 16:14:10
6
- * @FilePath: \cms-ui\src\components\TextOverTooltip\index.vue
7
- * @Description: 单行文本溢出显示省略号,鼠标悬浮展现完整内容(单行展示)
8
- -->
9
- <template>
10
- <div class="text-over-tooltip">
11
- <el-tooltip
12
- :effect="effect"
13
- :content="content"
14
- :disabled="isDisableTooltip"
15
- :placement="placement"
16
- >
17
- <div class="isEllipsis" @mouseover="onMouseOver(refName)">
18
- <span :ref="refName">
19
- <slot name="tooltip-content">
20
- <span>{{ content }}</span>
21
- </slot>
22
- </span>
23
- </div>
24
- </el-tooltip>
25
- </div>
26
- </template>
27
-
28
- <script>
29
- export default {
30
- name: 'TextOverTooltip',
31
- props: {
32
- // 显示的文字内容
33
- content: {
34
- type: String,
35
- required: true,
36
- },
37
- // 子元素标识(如在同一页面中调用多次组件,此参数不可重复)
38
- refName: {
39
- type: [String, Number],
40
- required: true,
41
- },
42
- // 默认主题
43
- effect: {
44
- type: String,
45
- default: 'dark',
46
- },
47
- // tooltip 出现的位置
48
- placement: {
49
- type: String,
50
- default: 'top',
51
- },
52
- },
53
- data() {
54
- return {
55
- // 是否禁止提示
56
- isDisableTooltip: true,
57
- };
58
- },
59
- methods: {
60
- // 鼠标移入事件: 判断内容的宽度contentWidth是否大于父级的宽度
61
- onMouseOver(str) {
62
- if (!this.$refs[str]) return;
63
- let parentWidth = this.$refs[str].parentNode.offsetWidth;
64
- let contentWidth = this.$refs[str].offsetWidth;
65
- // 判断是否禁用tooltip功能
66
- this.isDisableTooltip = contentWidth <= parentWidth;
67
- },
68
- },
69
- };
70
- </script>
71
-
72
- <style lang="scss" scoped>
73
- .text-over-tooltip {
74
- width: 100%;
75
- height: 100%;
76
- vertical-align: middle;
77
- /* 文字超出宽度显示省略号 单行*/
78
- .isEllipsis {
79
- white-space: nowrap;
80
- overflow: hidden;
81
- text-overflow: ellipsis;
82
- }
83
- }
84
- </style>
@@ -1,410 +0,0 @@
1
- <template>
2
- <div class="toolbar">
3
- <el-tooltip class="item" effect="dark" content="提示:双击空白处输入文字" placement="top-start">
4
- <el-button
5
- type="text"
6
- class="icon_toolbar icon_title"
7
- :class="[type === 'Text' ? 'icon_active' : '']"
8
- title="文本"
9
- @click="handleDrawCanvas({ cursor: 'text', type: 'Text' })"
10
- />
11
- </el-tooltip>
12
- <!-- <el-button
13
- type="text"
14
- class="icon_toolbar icon_line"
15
- :class="[type === 'Line' ? 'icon_active' : '']"
16
- title="画笔"
17
- @click="handleDrawCanvas({ cursor: 'crosshair', type: 'Line' })"
18
- slot="reference"
19
- /> -->
20
- <el-button
21
- type="text"
22
- class="icon_toolbar icon_rectangle"
23
- :class="[type === 'Rect' ? 'icon_active' : '']"
24
- title="矩形"
25
- @click="handleDrawCanvas({ cursor: 'crosshair', type: 'Rect' })"
26
- />
27
- <el-button
28
- type="text"
29
- class="icon_toolbar icon_circle"
30
- :class="[type === 'Circle' ? 'icon_active' : '']"
31
- title="圆形"
32
- @click="handleDrawCanvas({ cursor: 'crosshair', type: 'Circle' })"
33
- />
34
- <el-button
35
- type="text"
36
- class="icon_toolbar icon_rubber"
37
- :class="[type === 'Rubber' ? 'icon_active' : '']"
38
- title="橡皮擦"
39
- @click="handleDrawCanvas({ cursor: 'eraser', type: 'Rubber' })"
40
- />
41
- <el-popover popper-class="toolbar_stroke-width" placement="top" width="100" v-model="visible">
42
- <el-button
43
- type="text"
44
- class="icon_toolbar icon_stroke_width_1x"
45
- :class="[strokeWidth === 1 ? 'icon_active' : '']"
46
- @click="handleDrawCanvas({ strokeWidth: 1 })"
47
- title="默认"
48
- />
49
- <el-button
50
- type="text"
51
- class="icon_toolbar icon_stroke_width_2x"
52
- :class="[strokeWidth === 3 ? 'icon_active' : '']"
53
- @click="handleDrawCanvas({ strokeWidth: 3 })"
54
- title="粗"
55
- />
56
- <el-button
57
- type="text"
58
- class="icon_toolbar icon_stroke_width_3x"
59
- :class="[strokeWidth === 5 ? 'icon_active' : '']"
60
- @click="handleDrawCanvas({ strokeWidth: 5 })"
61
- title="加粗"
62
- />
63
- <el-button type="text" class="icon_toolbar icon_mark_stroke" title="粗细" slot="reference" />
64
- </el-popover>
65
-
66
- <el-button type="text" class="icon_toolbar icon_color" title="颜色">
67
- <el-color-picker
68
- v-model="defaultColor"
69
- popper-class="popperClass"
70
- @change="colorChange"
71
- ></el-color-picker>
72
- </el-button>
73
- <el-button
74
- type="text"
75
- class="text_toolbar icon_clear"
76
- @click="handleClear"
77
- title="清除"
78
- ></el-button>
79
- <el-button
80
- type="text"
81
- class="text_toolbar icon_cancel"
82
- @click="cancel"
83
- title="取消"
84
- ></el-button>
85
- <el-button
86
- type="text"
87
- class="text_toolbar icon_save"
88
- @click="saveDrawing"
89
- title="保存"
90
- ></el-button>
91
- </div>
92
- </template>
93
-
94
- <script>
95
- export default {
96
- name: 'DrawToolbar',
97
- data() {
98
- return {
99
- type: '',
100
- defaultColor: '#A90A0A',
101
- strokeWidth: 1,
102
- visible: false,
103
- };
104
- },
105
- methods: {
106
- saveDrawing() {
107
- this.$emit('save');
108
- },
109
- // 当前显示的颜色发生改变时
110
- colorChange(val) {
111
- if (val) {
112
- this.$emit('colorChange', val);
113
- }
114
- },
115
- uploadByUrl(url, data) {
116
- return fetch(url, {
117
- mode: 'cors', // 解决跨域
118
- headers: { 'Content-Type': 'application/octet-stream' },
119
- method: 'PUT',
120
- body: data,
121
- });
122
- },
123
- handleDrawCanvas({ cursorStyle, type, strokeWidth }) {
124
- if (type === this.type) return;
125
- if (type) {
126
- this.type = type;
127
- }
128
- if (strokeWidth) {
129
- this.strokeWidth = strokeWidth;
130
- }
131
- this.$emit('handleDraw', {
132
- cursor: cursorStyle,
133
- type: this.type,
134
- strokeWidth: this.strokeWidth,
135
- });
136
- // if (actived !== this.type) { this.type = actived }
137
- // if (style !== 'eraser') this.cursorStyle = style
138
- // else if (style === 'eraser') this.cursorStyle = `url('${cursors.eraser}') 15 15, auto`
139
- // this.canDraw = false
140
- // let sx, sy, mx, my, arcDownX, arcDownY, arcMoveX, arcMoveY
141
- // let text = document.getElementById("text")
142
- // //鼠标按下
143
- // let mousedown = (e) => {
144
- // this.ctx_front.strokeStyle = this.defaultColor
145
- // this.ctx_front.lineWidth = this.slide
146
- // e = e || window.event
147
- // sx = e.clientX - canvas_front.offsetLeft
148
- // sy = e.clientY - canvas_front.offsetTop
149
- // arcDownX = e.screenX
150
- // arcDownY = e.screenY
151
- // const cbx = this.ctx_base.getImageData( e.offsetX - 12, e.offsetY - 12, 12, 12)
152
- // this.ctx_front.moveTo(sx, sy)
153
- // this.canDraw = true
154
- // switch (type) {
155
- // case '橡皮':
156
- // this.ctx_front.putImageData( cbx, e.offsetX - 12, e.offsetY - 12)
157
- // this.ctx_back.putImageData(cbx, e.offsetX - 12, e.offsetY - 12)
158
- // break
159
- // case '文本':
160
- // this.handleTextBlur()
161
- // this.text = ""
162
- // text.style.fontSize = 14 + this.slide * 10 + "px"
163
- // text.style.color = this.defaultColor
164
- // text.style.left = e.offsetX + canvas_front.offsetLeft - 20 + "px"
165
- // text.style.top = e.offsetY + canvas_front.offsetTop - 10 + "px"
166
- // text.style.zIndex = 10
167
- // text.style.display = "block"
168
- // this.tl = e.offsetX - 20
169
- // this.tt = e.offsetY + 10
170
- // break
171
- // }
172
- // }
173
- // let mousemove = (e) => {
174
- // e = e || window.event
175
- // mx = e.clientX - canvas_front.offsetLeft
176
- // my = e.clientY - canvas_front.offsetTop
177
- // arcMoveX = e.screenX;
178
- // arcMoveY = e.screenY;
179
- // const cbx = this.ctx_base.getImageData( e.offsetX - 12, e.offsetY - 12, 12, 12)
180
- // if (this.canDraw) {
181
- // switch (type) {
182
- // case '折线':
183
- // this.handleFromCanvas()
184
- // this.ctx_front.beginPath()
185
- // this.ctx_front.moveTo(sx - 200 + create_canvas.scrollLeft, sy - 39 + create_canvas.scrollTop)
186
- // this.ctx_front.lineTo(mx - 200 + create_canvas.scrollLeft, my - 39 + create_canvas.scrollTop)
187
- // this.ctx_front.stroke()
188
- // break
189
- // case '圆形':
190
- // this.handleFromCanvas()
191
- // this.ctx_front.beginPath()
192
- // // eslint-disable-next-line no-case-declarations
193
- // let rds = Math.sqrt(Math.pow( (arcDownX - arcMoveX), 2) + (arcDownY - arcMoveY), 2 )
194
- // this.ctx_front.arc(sx - 200 + create_canvas.scrollLeft, sy - 39 + create_canvas.scrollTop, rds, 0, Math.PI * 2, false)
195
- // this.ctx_front.stroke()
196
- // break
197
- // case '矩形':
198
- // this.handleFromCanvas()
199
- // this.ctx_front.beginPath()
200
- // this.ctx_front.moveTo(sx - 200 + create_canvas.scrollLeft, sy - 39 + create_canvas.scrollTop)
201
- // this.ctx_front.lineTo(mx - 200 + create_canvas.scrollLeft, sy - 39 + create_canvas.scrollTop)
202
- // this.ctx_front.lineTo(mx - 200 + create_canvas.scrollLeft, my - 39 + create_canvas.scrollTop)
203
- // this.ctx_front.lineTo(sx - 200 + create_canvas.scrollLeft, my - 39 + create_canvas.scrollTop)
204
- // this.ctx_front.lineTo(sx - 200 + create_canvas.scrollLeft, sy - 39 + create_canvas.scrollTop)
205
- // this.ctx_front.stroke()
206
- // break
207
- // case '橡皮':
208
- // this.ctx_front.putImageData(cbx, e.offsetX - 12, e.offsetY - 12)
209
- // this.ctx_back.putImageData(cbx, e.offsetX - 12, e.offsetY - 12)
210
- // break
211
- // }
212
- // }
213
- // }
214
- // let mouseup = () => {
215
- // if (this.canDraw) {
216
- // this.canDraw = false
217
- // this.ctx_front.closePath()
218
- // if (type !== 6) {
219
- // this.handleSaveCanvasStore()
220
- // }
221
- // }
222
- // }
223
- // canvas_front.onmousedown = (e) => mousedown(e)
224
- // canvas_front.onmousemove = (e) => mousemove(e)
225
- // canvas_front.onmouseup = (e) => mouseup(e)
226
- // canvas_front.onmouseout = (e) => mouseup(e)
227
- // canvas_front.onmouseleave = (e) => mouseup(e)
228
- },
229
- /** 失焦或者回车绘制文本,框隐藏*/
230
- handleTextBlur() {
231
- let text = document.getElementById('text');
232
- this.ctx_front.font = `300 ${text.style.fontSize} sans-serif`;
233
- this.ctx_front.fillStyle = this.defaultColor;
234
- this.ctx_front.fillText(this.text, this.tl, this.tt);
235
- text.style.display = 'none';
236
- this.text = '';
237
- text.value = '';
238
- this.handleSaveCanvasStore();
239
- },
240
- /** 保存绘制*/
241
- handleSaveCanvasStore() {
242
- let url = canvas_front.toDataURL();
243
- let image = new Image();
244
- image.src = url;
245
- image.onload = () => {
246
- this.ctx_front.clearRect(0, 0, canvas_front.width, canvas_front.height);
247
- this.ctx_front.drawImage(image, 0, 0, image.width, image.height);
248
- this.ctx_back.drawImage(image, 0, 0, image.width, image.height);
249
- const url2 = canvas_back.toDataURL();
250
- this.currentImg.url = url2;
251
- this.currentImg.index += 1;
252
- this.canvasStore.push(url2);
253
- };
254
- },
255
- handleFromCanvas() {
256
- this.ctx_front.clearRect(0, 0, canvas_front.width, canvas_front.height);
257
- },
258
- cancel() {
259
- this.$emit('closeDrawing');
260
- },
261
- handleClear() {
262
- this.$emit('handleClear');
263
- },
264
- },
265
- };
266
- </script>
267
- <style lang="scss" scoped>
268
- // P标签样式
269
- .classification_title {
270
- margin: 0 0 10px 0;
271
- color: #fff;
272
- font-size: 14px;
273
- cursor: default;
274
- }
275
-
276
- // 工具栏样式
277
- .toolbar {
278
- z-index: 10;
279
- width: 520px;
280
- padding: 6px 16px;
281
- border-radius: 6px;
282
- box-shadow: 0px 2px 8px 0px rgba(6, 29, 44, 0.25);
283
- background-color: #fff;
284
- position: relative;
285
- left: 50%;
286
- top: 50%;
287
- box-sizing: border-box;
288
- transform: translate(-50%, -50%);
289
- display: flex;
290
- justify-content: space-around;
291
- }
292
- // 工具栏图标
293
- .icon_toolbar,
294
- .text_toolbar {
295
- float: left;
296
- width: 40px;
297
- height: 40px;
298
- padding: 0px !important;
299
- background-repeat: no-repeat;
300
- background-size: 24px;
301
- background-position: center;
302
- }
303
- .icon_toolbar:hover,
304
- .text_toolbar:hover,
305
- .icon_active {
306
- background-color: rgba(238, 238, 238, 1);
307
- }
308
- .icon_title {
309
- background-image: url(~@/assets/draw-tool/mark_font@2x.png);
310
- }
311
- .icon_line {
312
- background-image: url(~@/assets/draw-tool/mark_polyline@2x.png);
313
- }
314
-
315
- .icon_rectangle {
316
- background-image: url(~@/assets/draw-tool/mark_rectangle@2x.png);
317
- }
318
-
319
- .icon_circle {
320
- background-image: url(~@/assets/draw-tool/mark_cercle@2x.png);
321
- }
322
-
323
- .icon_rubber {
324
- background-image: url(~@/assets/draw-tool/mark_eraser@2x.png);
325
- }
326
- .icon_color {
327
- background-image: url(~@/assets/draw-tool/mark_color@2x.png);
328
- }
329
- .icon_clear {
330
- background-image: url(~@/assets/draw-tool/mark_clear@2x.png);
331
- }
332
-
333
- .icon_cancel {
334
- background-image: url(~@/assets/draw-tool/mark_exit@2x.png);
335
- }
336
-
337
- .icon_stroke_width_1x {
338
- background-image: url(~@/assets/draw-tool/stroke_width_1x.png);
339
- }
340
-
341
- .icon_stroke_width_2x {
342
- background-image: url(~@/assets/draw-tool/stroke_width_2x.png);
343
- }
344
-
345
- .icon_stroke_width_3x {
346
- background-image: url(~@/assets/draw-tool/stroke_width_3x.png);
347
- }
348
-
349
- .icon_save {
350
- background-image: url(~@/assets/draw-tool/mark_finish@2x.png);
351
- }
352
-
353
- .icon_mark_stroke {
354
- background-image: url(~@/assets/draw-tool/mark_stroke.png);
355
- }
356
-
357
- // 调色盘设置
358
- ::v-deep .icon_color .el-color-picker__trigger {
359
- opacity: 0;
360
- filter: alpha(opacity=0);
361
- }
362
- ::v-deep .el-color-picker--medium,
363
- ::v-deep .el-color-picker--medium .el-color-picker__trigger {
364
- width: 24px !important;
365
- height: 24px !important;
366
- }
367
-
368
- // 画布
369
- .create_canvas {
370
- position: relative;
371
- width: 100%;
372
- height: 100%;
373
- overflow: auto;
374
- box-sizing: border-box;
375
- // padding: 20px;
376
-
377
- canvas {
378
- position: absolute;
379
- overflow: auto;
380
- // top: 20px;
381
- // left: 20px;
382
- }
383
- #ctx_front {
384
- z-index: 5;
385
- }
386
- #ctx_back {
387
- z-index: 3;
388
- }
389
- #ctx_base {
390
- z-index: 1;
391
- }
392
- }
393
- #text {
394
- position: absolute;
395
- z-index: -1;
396
- resize: none;
397
- outline: none;
398
- border: 1px dashed #eeeeee;
399
- overflow: hidden;
400
- background: transparent;
401
- line-height: 30px;
402
- display: none;
403
- }
404
- </style>
405
- <style lang="scss">
406
- .toolbar_stroke-width {
407
- display: flex;
408
- justify-content: space-around;
409
- }
410
- </style>
@@ -1,39 +0,0 @@
1
- <template>
2
- <div v-if="show">
3
- <el-empty>
4
- <el-button type="text" @click="handleClick">载入模型</el-button>
5
- </el-empty>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- import * as modelApi from '../api/index';
11
-
12
- export default {
13
- name: 'CheckProofingModel',
14
- data() {
15
- return {
16
- show: false,
17
- };
18
- },
19
- props: {
20
- defaultParams: {
21
- type: Object,
22
- default() {
23
- return {};
24
- },
25
- },
26
- },
27
- mounted() {},
28
- methods: {
29
- handleClick() {
30
- this.$emit('click');
31
- },
32
- showCheckProofingModel() {
33
- this.show = true;
34
- },
35
- },
36
- };
37
- </script>
38
-
39
- <style type="scss" scoped></style>
@@ -1,59 +0,0 @@
1
- <template>
2
- <div class="clipping-type action-box">
3
- <div
4
- v-for="item of clippingList"
5
- :key="item.id"
6
- :class="[active === item.id ? 'active' : 'unactive', 'btn-item']"
7
- @click="clippingType(item.id)"
8
- >
9
- <span class="span-txt">{{ item.name }}</span
10
- ><img :src="item.imgUrl" :alt="item.name" class="btn-bg" />
11
- </div>
12
- </div>
13
- </template>
14
- <script>
15
- export default {
16
- name: 'ClippingType',
17
- data() {
18
- return {
19
- active: '',
20
- clippingList: [
21
- { name: '全局剖切', id: 'all', imgUrl: require('@/assets/clipping-all.png') },
22
- // { name: '局部剖切', id: 'local', imgUrl: require('@/assets/clipping-local.png') }
23
- ],
24
- };
25
- },
26
- methods: {
27
- clippingType(type) {
28
- if (type !== this.active) {
29
- this.$set(this, 'active', type);
30
- this.$emit('clippingType', type);
31
- }
32
- },
33
- },
34
- };
35
- </script>
36
- <style lang="scss" scoped>
37
- .clipping-type {
38
- height: 45px;
39
- }
40
- .btn-item {
41
- height: 45px;
42
- line-height: 45px;
43
- padding: 0 10px;
44
- cursor: pointer;
45
- }
46
- .btn-bg {
47
- display: inline-block;
48
- vertical-align: middle;
49
- }
50
- .unactive {
51
- color: #fff;
52
- }
53
- .span-txt {
54
- padding-right: 5px;
55
- }
56
- .active {
57
- background: rgba(255, 255, 255, 0.5);
58
- }
59
- </style>
@@ -1,53 +0,0 @@
1
- <!-- 使用方法 样例 -->
2
- <template>
3
- <div class="trigger_dialog">
4
- <!-- 触发弹窗操作 -->
5
- <el-button type="primary" @click="dialogVisible = true">触发对话框</el-button>
6
- <!-- 弹窗组件 -->
7
- <DialogWrapper
8
- v-if="dialogVisible"
9
- dialog-title="触发对话框"
10
- :visible.sync="dialogVisible"
11
- :popup-width="'35%'"
12
- @handleClose="handleClose"
13
- @submitDialogData="submitDialogData"
14
- >
15
- 弹窗内容
16
- </DialogWrapper>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- components: {
23
- // 弹窗引入,如注册全局组件则克直接使用
24
- DialogWrapper: () => import('./DialogWrapper.vue')
25
- },
26
- props: {},
27
- data() {
28
- return {
29
- dialogVisible: false // 弹框状态
30
- }
31
- },
32
- computed: { },
33
- watch: {},
34
- created() {},
35
- mounted() {},
36
- methods: {
37
- /* 弹窗 修改是否让页面显示与隐藏的事件 */
38
- updateVisible(val) {
39
- this.dialogVisible = val
40
- },
41
- /* 弹窗 确认 操作 */
42
- submitDialogData() {
43
- this.dialogVisible = false
44
- },
45
- /* 弹窗 关闭 操作 */
46
- handleClose() {
47
- this.dialogVisible = false
48
- }
49
- }
50
- }
51
- </script>
52
- <style lang="scss" scoped>
53
- </style>