zydx-plus 1.35.521 → 1.35.522
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/package.json
CHANGED
|
@@ -91,6 +91,10 @@ export default {
|
|
|
91
91
|
type: Boolean,
|
|
92
92
|
default: false
|
|
93
93
|
},
|
|
94
|
+
cameraIsLocked: { // 相机约束
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
},
|
|
94
98
|
},
|
|
95
99
|
mounted() {
|
|
96
100
|
// 鼠标移入
|
|
@@ -101,13 +105,12 @@ export default {
|
|
|
101
105
|
this.$refs.reactRef.addEventListener('mouseleave', () => {
|
|
102
106
|
document.body.style.overflow = 'visible'
|
|
103
107
|
});
|
|
104
|
-
|
|
105
108
|
const root = createRoot(this.$refs.reactRef)
|
|
106
109
|
root.render(createElement(Tldraw, {
|
|
107
110
|
onMount: this.handleMountedEditor,
|
|
108
111
|
hideUi: true, // 隐藏UI
|
|
109
112
|
// persistenceKey: "example111" // 持久化名字
|
|
110
|
-
autoFocus: true
|
|
113
|
+
autoFocus: true, // 聚焦
|
|
111
114
|
}, null))
|
|
112
115
|
},
|
|
113
116
|
methods: {
|
|
@@ -146,6 +149,7 @@ export default {
|
|
|
146
149
|
},
|
|
147
150
|
handleMountedEditor(editor) {
|
|
148
151
|
editorAPP = editor
|
|
152
|
+
editorAPP._cameraOptions.current.isLocked = this.cameraIsLocked
|
|
149
153
|
if (this.top) {
|
|
150
154
|
setTimeout(() => {
|
|
151
155
|
document.documentElement.scrollTop = 0
|