feat: add component sticky
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import Write from './components/Write.vue'
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import { ContentDetailWrap } from '@/components/ContentDetailWrap'
|
||||
import { ref, unref } from 'vue'
|
||||
import { ElButton } from 'element-plus'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
@@ -42,14 +42,13 @@ const save = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentWrap :title="t('exampleDemo.add')">
|
||||
<ContentDetailWrap :title="t('exampleDemo.add')" @back="push('/example/example-page')">
|
||||
<Write ref="writeRef" />
|
||||
|
||||
<div class="text-center">
|
||||
<template #right>
|
||||
<ElButton type="primary" :loading="loading" @click="save">
|
||||
{{ t('exampleDemo.save') }}
|
||||
</ElButton>
|
||||
<ElButton @click="push('/example/example-page')">{{ t('dialogDemo.close') }}</ElButton>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
</ContentDetailWrap>
|
||||
</template>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import Detail from './components/Detail.vue'
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import { ContentDetailWrap } from '@/components/ContentDetailWrap'
|
||||
import { ref } from 'vue'
|
||||
import { ElButton } from 'element-plus'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { getTableDetApi } from '@/api/table'
|
||||
@@ -31,11 +30,7 @@ getTableDet()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentWrap :title="t('exampleDemo.detail')">
|
||||
<ContentDetailWrap :title="t('exampleDemo.detail')" @back="push('/example/example-page')">
|
||||
<Detail :current-row="currentRow" />
|
||||
|
||||
<div class="text-center">
|
||||
<ElButton @click="push('/example/example-page')">{{ t('dialogDemo.close') }}</ElButton>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
</ContentDetailWrap>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import Write from './components/Write.vue'
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import { ContentDetailWrap } from '@/components/ContentDetailWrap'
|
||||
import { ref, unref } from 'vue'
|
||||
import { ElButton } from 'element-plus'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
@@ -58,14 +58,13 @@ const save = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentWrap :title="t('exampleDemo.edit')">
|
||||
<ContentDetailWrap :title="t('exampleDemo.edit')" @back="push('/example/example-page')">
|
||||
<Write ref="writeRef" :current-row="currentRow" />
|
||||
|
||||
<div class="text-center">
|
||||
<template #right>
|
||||
<ElButton type="primary" :loading="loading" @click="save">
|
||||
{{ t('exampleDemo.save') }}
|
||||
</ElButton>
|
||||
<ElButton @click="push('/example/example-page')">{{ t('dialogDemo.close') }}</ElButton>
|
||||
</div>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
</ContentDetailWrap>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user