Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.

Commit 1330b0e

Browse files
committed
Merge branch 'master' of github.com:dream2023/f-render
2 parents a51c1ab + 79d2a6a commit 1330b0e

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

CHANGELOG.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5-
### [4.12.3](https://github.com/dream2023/f-render/compare/v4.12.2...v4.12.3) (2021-01-01)
6-
7-
### [4.12.2](https://github.com/dream2023/f-render/compare/v4.12.1...v4.12.2) (2021-01-01)
5+
### [4.12.2](https://github.com/dream2023/f-render/compare/v4.12.1...v4.12.2) (2020-12-22)
86

97

108
### Bug Fixes
119

12-
* 修复 formPropsData 无效问题 ([35f3796](https://github.com/dream2023/f-render/commit/35f37969c57c13ee0d523c4fe40a5121eadd9446))
10+
* **#66:** attrs 属性未隔离 & 火狐浏览器拖拽打开新页面 ([7d733e9](https://github.com/dream2023/f-render/commit/7d733e94131d8ae6a9384b6b25cf8a1c0009136f)), closes [#66](https://github.com/dream2023/f-render/issues/66)
1311

1412
### [4.12.1](https://github.com/dream2023/f-render/compare/v4.12.0...v4.12.1) (2020-11-17)
1513

src/f-render.vue

+15-4
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ export default {
249249
// 通过类型获取表单项
250250
getFormItemByType(type) {
251251
const comp = this.getCompByType(type);
252-
return {
252+
return cloneDeep({
253253
type,
254-
...cloneDeep(this.formItemCommon.data),
255-
...cloneDeep(comp?.config?.common?.data || {}),
254+
...this.formItemCommon.data,
255+
...(comp?.config?.common?.data || {}),
256256
attrs: comp?.config?.attrs?.data || {}
257-
};
257+
});
258258
},
259259
// 通过类型获取组件
260260
getCompByType(type) {
@@ -302,6 +302,17 @@ export default {
302302
created() {
303303
// 设置表单属性默认值
304304
this.initFormPropsData();
305+
306+
// 防止火狐拖拽打开新标签
307+
this.ondrop = function(event) {
308+
event.preventDefault();
309+
event.stopPropagation();
310+
};
311+
312+
document.body.addEventListener("drop", this.ondrop);
313+
},
314+
beforeDestroy() {
315+
document.body.removeEventListener("drop", this.ondrop);
305316
}
306317
};
307318
</script>

0 commit comments

Comments
 (0)