[+] Checkbox group
This commit is contained in:
+27
-27
@@ -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>
|
||||||
|
|||||||
+12
-2
@@ -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)
|
||||||
@@ -96,4 +106,4 @@ export default class Home extends Vue
|
|||||||
|
|
||||||
h1, h2
|
h1, h2
|
||||||
font-size: 1em !important
|
font-size: 1em !important
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -95,4 +95,4 @@ export default class PrimarySymbol extends Vue
|
|||||||
|
|
||||||
h1, h2
|
h1, h2
|
||||||
font-size: 1em !important
|
font-size: 1em !important
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user