feat: 模版市场

This commit is contained in:
wangjiahao
2023-11-10 08:39:42 +08:00
parent bf8cd7e593
commit 2d864eea23
30 changed files with 791 additions and 93 deletions

View File

@@ -8,7 +8,7 @@ import { ref, watch } from 'vue'
import { XpackComponent } from '@/components/plugin'
const dvMainStore = dvMainStoreWithOut()
const { dvInfo } = storeToRefs(dvMainStore)
const emit = defineEmits(['reload', 'download'])
const emit = defineEmits(['reload', 'download', 'downloadAsAppTemplate'])
const { t } = useI18n()
const favorited = ref(false)
@@ -24,6 +24,9 @@ const reload = () => {
const download = type => {
emit('download', type)
}
const downloadAsAppTemplate = downloadType => {
emit('downloadAsAppTemplate', downloadType)
}
const dvEdit = () => {
const baseUrl = dvInfo.value.type === 'dataV' ? '#/dvCanvas?dvId=' : '#/dashboard?resourceId='
@@ -124,6 +127,9 @@ watch(
<el-dropdown-item style="width: 118px" @click="download('pdf')"
>PDF</el-dropdown-item
>
<el-dropdown-item style="width: 118px" @click="downloadAsAppTemplate('template')"
>模版</el-dropdown-item
>
<el-dropdown-item @click="download('img')">{{
t('chart.image')
}}</el-dropdown-item>