修复文本框不能输入 修复组件无法使用echarts

old-3.0
咬轮猫 4 years ago
parent 4f4762fb01
commit c41dc898f0

@ -35,7 +35,11 @@ import 'vue-webtopo-svgeditor/dist/style.css'
alias: { alias: {
'vue': 'vue/dist/vue.esm-bundler.js' // 定义vue的别名如果使用其他的插件可能会用到别名 'vue': 'vue/dist/vue.esm-bundler.js' // 定义vue的别名如果使用其他的插件可能会用到别名
}, },
# 如果需要使用图表 修改main.ts 全局注册一下图表组件
import { VChart} from 'vue-webtopo-svgeditor';
const app=createApp(App)
app.component('v-chart',VChart)
app.mount('#app')
``` ```
## 如何使用 ## 如何使用

@ -1,6 +1,6 @@
{ {
"name": "vue-webtopo-svgeditor", "name": "vue-webtopo-svgeditor",
"version": "0.0.2", "version": "0.0.3",
"files": [ "files": [
"dist" "dist"
], ],

@ -335,39 +335,48 @@ document.onkeydown = function (e) {
if (!select_svg.id) { if (!select_svg.id) {
return; return;
} }
e.preventDefault();
if (!e.ctrlKey && e.key == 'ArrowUp') { if (!e.ctrlKey && e.key == 'ArrowUp') {
e.preventDefault();
moveUp(svgLists, select_svg); moveUp(svgLists, select_svg);
} else if (!e.ctrlKey && e.key == 'ArrowDown') { } else if (!e.ctrlKey && e.key == 'ArrowDown') {
e.preventDefault();
moveDown(svgLists, select_svg); moveDown(svgLists, select_svg);
} else if (!e.ctrlKey && e.key == 'ArrowLeft') { } else if (!e.ctrlKey && e.key == 'ArrowLeft') {
e.preventDefault();
moveLeft(svgLists, select_svg); moveLeft(svgLists, select_svg);
} else if (!e.ctrlKey && e.key == 'ArrowRight') { } else if (!e.ctrlKey && e.key == 'ArrowRight') {
e.preventDefault();
moveRight(svgLists, select_svg); moveRight(svgLists, select_svg);
} }
//ctrl c //ctrl c
else if (e.ctrlKey && e.key.toLowerCase() == 'c') { else if (e.ctrlKey && e.key.toLowerCase() == 'c') {
e.preventDefault();
hotkeyCopy(svgLists, select_svg); hotkeyCopy(svgLists, select_svg);
} }
//deleted //deleted
else if (e.key == 'Delete') { else if (e.key == 'Delete') {
e.preventDefault();
hotkeyDel(svgLists, select_svg); hotkeyDel(svgLists, select_svg);
rightnav_open.value = false; rightnav_open.value = false;
} }
// //
else if (e.ctrlKey && e.key == 'ArrowUp') { else if (e.ctrlKey && e.key == 'ArrowUp') {
e.preventDefault();
hotkeyPutOnUp(svgLists, select_svg); hotkeyPutOnUp(svgLists, select_svg);
} }
// //
else if (e.ctrlKey && e.key == 'ArrowDown') { else if (e.ctrlKey && e.key == 'ArrowDown') {
e.preventDefault();
hotkeyPutOnDown(svgLists, select_svg); hotkeyPutOnDown(svgLists, select_svg);
} }
// //
else if (e.ctrlKey && e.key == 'ArrowLeft') { else if (e.ctrlKey && e.key == 'ArrowLeft') {
e.preventDefault();
hotkeyPutOnButtom(svgLists, select_svg); hotkeyPutOnButtom(svgLists, select_svg);
} }
// //
else if (e.ctrlKey && e.key == 'ArrowRight') { else if (e.ctrlKey && e.key == 'ArrowRight') {
e.preventDefault();
hotkeyPutOnTop(svgLists, select_svg); hotkeyPutOnTop(svgLists, select_svg);
} }
} }

@ -1,3 +1,4 @@
import SvgEditor from './components/SvgEditor.vue'; import SvgEditor from './components/SvgEditor.vue';
import SvgPrview from './components/SvgPrview.vue'; import SvgPrview from './components/SvgPrview.vue';
export { SvgEditor,SvgPrview } import ECharts from 'vue-echarts';
export { SvgEditor,SvgPrview,ECharts as VChart }
Loading…
Cancel
Save