feat: add dashboard store

This commit is contained in:
Qiuxia Fan
2021-12-23 10:55:39 +08:00
parent 337d9bfe04
commit f9f38e4cf0
6 changed files with 69 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="dashboard-tool">
<el-button size="mini">Add Widget</el-button>
<el-button size="mini">Save As</el-button>
<el-button size="mini">Discard</el-button>
<el-button size="mini" type="primary">Apply</el-button>

View File

@@ -37,16 +37,9 @@ limitations under the License. -->
</grid-layout>
</template>
<script lang="ts" setup>
import { ref } from "vue";
export interface GridItemData {
x: number;
y: number;
w: number;
h: number;
i: number;
static: boolean;
}
const layout = [
import { GridItemData } from "@/types/dashboard";
const layout: GridItemData[] = [
{ x: 0, y: 0, w: 2, h: 2, i: "0" },
{ x: 2, y: 0, w: 2, h: 4, i: "1" },
{ x: 4, y: 0, w: 2, h: 5, i: "2" },