IndexPage.vue 4.82 KB
Newer Older
hucy's avatar
hucy committed
1 2 3 4
<!--
 * 动画2
 * https://www.youtube.com/@OnlineTutorialsYT/playlists
  -->
hucy's avatar
hucy committed
5 6 7 8 9
<script lang="ts">
export default {
  name: 'PAGE9',
};
</script>
hucy's avatar
hucy committed
10 11 12 13 14 15 16
<script setup lang="ts">
import { ref } from 'vue';
import TextVue from './element/TextVue.vue';
import WorkingDigitalClock from './element/WorkingDigitalClock .vue';
import SvgLineDrawingAnimation from './element/SvgLineDrawingAnimation.vue';
import FlyingTextAnimationEffects from './element/FlyingTextAnimationEffects.vue';
import TransformationAnimation from './element/TransformationAnimation.vue';
hucy's avatar
hucy committed
17
import AgGridStudy from './element/AgGridStudy2.vue';
hucy's avatar
hucy committed
18 19
import AgGridMaster from './element/AgGridMaster.vue';
import AgGridDetailGrids from './element/AgGridDetailGrids.vue';
hcyhuchaoyue's avatar
hcyhuchaoyue committed
20
import AgGridTreeData from './element/AgGridTreeData.vue';
hcyhuchaoyue's avatar
hcyhuchaoyue committed
21
import AgGridTreeFileBrowser from './element/AgGridTreeFileBrowser.vue';
hcyhuchaoyue's avatar
hcyhuchaoyue committed
22
import AgGridCustomDateComponent from './element/AgGridCustomDateComponent.vue';
hucy's avatar
hucy committed
23 24 25
import AgGridSelection from './element/AgGridSelection.vue';
import AgGridCheckboxSelection from './element/AgGridCheckboxSelection.vue';
import AgGridGroupSelection from './element/AgGridGroupSelection.vue';
hucy's avatar
hucy committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

const listData = [
  {
    title: '测试',
    name: 'text-vue',
  },
  {
    title: 'SVG 数字时钟',
    name: 'working-digital-clock',
  },
  {
    title: 'SVG 画线动画',
    name: 'svg-line-drawing-animation',
  },
  {
    title: '飞行文本动画效果 ',
    name: 'flying-text-animation-effects',
  },
  {
    title: '变形动画',
    name: 'transformation-animation',
  },
  {
hucy's avatar
hucy committed
49 50
    title: 'AG grid',
    name: 'ag-grid-study',
hucy's avatar
hucy committed
51
  },
52
  {
hucy's avatar
hucy committed
53 54 55 56 57 58
    title: 'AG grid 细节表格',
    name: 'ag-grid-master',
  },
  {
    title: 'Vue Data Grid: Master / Detail - Detail Grids',
    name: 'ag-grid-detail-grids',
59
  },
hcyhuchaoyue's avatar
hcyhuchaoyue committed
60 61 62 63
  {
    title: 'Ag Grid 表格树',
    name: 'ag-grid-tree-data',
  },
hcyhuchaoyue's avatar
hcyhuchaoyue committed
64 65 66 67
  {
    title: 'Ag Grid 表格树 文件浏览器例子',
    name: 'ag-grid-tree-file-browser',
  },
hcyhuchaoyue's avatar
hcyhuchaoyue committed
68 69 70 71
  {
    title: 'Ag Grid 自定义日期组件',
    name: 'ag-grid-custom-date-component',
  },
hucy's avatar
hucy committed
72 73 74 75 76 77 78 79 80 81 82 83
  {
    title: 'Ag Grid 选择',
    name: 'ag-grid-selection',
  },
  {
    title: 'Ag Grid 复选框选择',
    name: 'ag-grid-checkbox-selection',
  },
  {
    title: 'Ag Grid 组选择',
    name: 'ag-grid-group-selection',
  },
hucy's avatar
hucy committed
84 85
];
const isShow = ref(true);
hucy's avatar
hucy committed
86 87
const elementName = ref('ag-grid-group-selection');
const elementTitle = ref('Ag Grid 组选择');
hucy's avatar
hucy committed
88 89 90 91 92 93 94 95 96 97

function onclick(data: any) {
  elementTitle.value = data.title;
  elementName.value = data.name;
  isShow.value = true;
}
function goBack() {
  isShow.value = false;
}
</script>
hucy's avatar
hucy committed
98

hucy's avatar
hucy committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
<template>
  <div>
    <div v-if="isShow" class="main">
      <div class="action">
        <q-btn
          @click="goBack"
          round
          flat
          icon="bi-arrow-left"
          size="12px"
          style="color: #555"
        />
        <span>{{ elementTitle }}</span>
      </div>
      <div class="main-content">
        <text-vue v-if="elementName === 'text-vue'" />
        <working-digital-clock v-if="elementName === 'working-digital-clock'" />
        <svg-line-drawing-animation
          v-if="elementName === 'svg-line-drawing-animation'"
        />
        <flying-text-animation-effects
          v-if="elementName === 'flying-text-animation-effects'"
        />
        <transformation-animation
          v-if="elementName === 'transformation-animation'"
        />
hucy's avatar
hucy committed
125
        <ag-grid-study v-if="elementName === 'ag-grid-study'" />
hucy's avatar
hucy committed
126 127
        <ag-grid-master v-if="elementName === 'ag-grid-master'" />
        <ag-grid-detail-grids v-if="elementName === 'ag-grid-detail-grids'" />
hcyhuchaoyue's avatar
hcyhuchaoyue committed
128
        <ag-grid-tree-data v-if="elementName === 'ag-grid-tree-data'" />
hcyhuchaoyue's avatar
hcyhuchaoyue committed
129 130 131
        <ag-grid-tree-file-browser
          v-if="elementName === 'ag-grid-tree-file-browser'"
        />
hcyhuchaoyue's avatar
hcyhuchaoyue committed
132 133 134
        <ag-grid-custom-date-component
          v-if="elementName === 'ag-grid-custom-date-component'"
        />
hucy's avatar
hucy committed
135 136 137 138 139 140 141
        <ag-grid-selection v-if="elementName === 'ag-grid-selection'" />
        <ag-grid-checkbox-selection
          v-if="elementName === 'ag-grid-checkbox-selection'"
        />
        <ag-grid-group-selection
          v-if="elementName === 'ag-grid-group-selection'"
        />
hucy's avatar
hucy committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
      </div>
    </div>
    <div v-else>
      <ul class="list">
        <li
          @click="onclick(item)"
          v-for="(item, index) in listData"
          :key="index"
        >
          <p class="title">
            {{ item.title }}
          </p>
        </li>
      </ul>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.list {
  padding: 20px;
  li {
    list-style: none;
    .title {
      cursor: pointer;
      font-size: 16px;
      color: #555;
      &:hover {
        text-decoration: underline;
      }
    }
  }
}

.main {
  .action {
    height: 40px;
    background-color: #fff;
    line-height: 40px;
    box-sizing: border-box;
  }
  .main-content {
    position: relative;
    height: calc(100vh - 90px);
  }
}
</style>