| | |
| | | },
|
| | | methods: {
|
| | | dockClick(dock) {
|
| | | debugger
|
| | | if (dock.type === '1') {
|
| | | window.open(dock.url);
|
| | | } else if (dock.type === '2') {
|
| | | let ids = this.$store.getters["desktop/frames"].map(item => item.id);
|
| | | if (ids.indexOf(dock.id) > -1) {
|
| | | this.$store.commit('desktop/resetMinFrame', dock.id);
|
| | | this.resetDockItem();
|
| | | return;
|
| | | }
|
| | |
|
| | | let ret = this.$store.dispatch('desktop/addFrame', {
|
| | | } else if (dock.type === '2' && !dock.isOpen) {
|
| | | this.$store.dispatch('desktop/addFrame', {
|
| | | id: dock.id,
|
| | | icon: dock.src,
|
| | | title: dock.name,
|
| | | url: dock.url
|
| | | });
|
| | | } else if (dock.type === '2' && dock.isOpen) {
|
| | | this.$store.commit('desktop/resetMinFrame', dock.id);
|
| | | }
|
| | | },
|
| | | resetDockItem() {
|