[+] Checkbox group

This commit is contained in:
Hykilpikonna
2022-06-21 16:52:20 -04:00
parent 6f15d6e4c4
commit 6972de67bd
3 changed files with 41 additions and 31 deletions
+27 -27
View File
@@ -5,34 +5,34 @@
<router-link class="rlink" to="/">tf</router-link> <router-link class="rlink" to="/">tf</router-link>
| |
<router-link class="rlink" to="/about">About</router-link> <router-link class="rlink" to="/about">About</router-link>
<div id="application">
<Navbar />
</div>
</p> </p>
<input <div id="application">
v-model="contentType" <Navbar />
type="checkbox" </div>
value="Video" <!-- <input-->
name="video"/> <!-- v-model="contentType"-->
<label for="video">Video</label> <!-- type="checkbox"-->
<input v-model="contentType" <!-- value="Video"-->
type="checkbox" <!-- name="video"/>-->
value="Text" <!-- <label for="video">Video</label>-->
name="text" /> <!-- <input v-model="contentType" -->
<label for="text">Text</label> <!-- type="checkbox" -->
<input <!-- value="Text" -->
v-model="contentType" <!-- name="text" />-->
type="checkbox" <!-- <label for="text">Text</label>-->
value="Examples" <!-- <input-->
name="examples"/> <!-- v-model="contentType"-->
<label for="examples">Examples</label> <!-- type="checkbox"-->
<input <!-- value="Examples"-->
v-model="contentType" <!-- name="examples"/>-->
type="checkbox" <!-- <label for="examples">Examples</label>-->
value="QnA" <!-- <input-->
name="qna"/> <!-- v-model="contentType"-->
<label for="qna">QnA</label> <!-- type="checkbox"-->
<p>Content Type: {{ contentType }}</p> <!-- value="QnA"-->
<!-- name="qna"/>-->
<!-- <label for="qna">QnA</label>-->
<!-- <p>Content Type: {{ contentType }}</p>-->
<router-view></router-view> <router-view></router-view>
</template> </template>
+11 -1
View File
@@ -1,5 +1,12 @@
<template> <template>
<div id="Home"> <div id="Home">
<el-checkbox-group v-model="options">
<el-checkbox label="Text" />
<el-checkbox label="Video" />
<el-checkbox label="Examples" />
<el-checkbox label="Q&A" />
</el-checkbox-group>
<div class="category" v-for="ty of types" :key="ty"> <div class="category" v-for="ty of types" :key="ty">
<h2>{{ty}}</h2> <h2>{{ty}}</h2>
<div class="api" v-for="api of apis(ty)" :key="api.name"> <div class="api" v-for="api of apis(ty)" :key="api.name">
@@ -18,8 +25,9 @@
<script lang="ts"> <script lang="ts">
import {Options, Vue} from 'vue-class-component'; import {Options, Vue} from 'vue-class-component';
import meta from '../meta.json'; import meta from '../meta.json';
import metaYT from '../meta_yt_links.json'
import { marked } from 'marked'; import { marked } from 'marked';
import {$} from '../main'; import {$} from '@/main';
interface APIEntry interface APIEntry
{ {
@@ -37,6 +45,8 @@ function onlyUnique(value, index, self) {
@Options({components: {}}) @Options({components: {}})
export default class Home extends Vue export default class Home extends Vue
{ {
options = ['Text']
get types(): string[] get types(): string[]
{ {
return meta.map(it => it.type).filter(onlyUnique) return meta.map(it => it.type).filter(onlyUnique)
+1 -1
View File
@@ -19,7 +19,7 @@
import {Options, Vue} from 'vue-class-component'; import {Options, Vue} from 'vue-class-component';
import meta from '../meta_primary_symbol.json'; import meta from '../meta_primary_symbol.json';
import { marked } from 'marked'; import { marked } from 'marked';
import {$} from '../main'; import {$} from '@/main';
interface APIEntry interface APIEntry
{ {