- Author: Donny Kurnia
- Release Date: Jun 5, 2018
- Original Post
Take note this is my personal edited version and the command related to Arch has been changed to work on my Arch system.
Take note this is my personal edited version and the command related to Arch has been changed to work on my Arch system.
<template> | |
<q-dialog v-model="swDialog" persistent ref="myDialog" @show="onShow" @hide="onHide"> | |
<q-card> | |
<q-bar class="bg-primary text-white" :class="draggable?'cursor-move':''"> | |
<div class="text-h6">{{title}}</div> | |
<q-space /> | |
<q-btn dense flat icon="close" v-close-popup /> | |
</q-bar> | |
<slot></slot> | |
</q-card> |
[ | |
{ | |
"code": "EUR", | |
"name": "Euro", | |
"name_plural": "euros", | |
"symbol": "€", | |
"symbol_native": "€", | |
"decimal_digits": 2, | |
"rounding": 0 | |
}, |
import { inject, ref, provide } from '@vue/composition-api'; | |
export function useAppBarProviders() { | |
const title = ref(''); | |
function updateTitle(newTitle: string) { | |
title.value = newTitle; | |
} | |
provide('updateAppBarTitle', updateTitle); |
import { expose } from "threads/worker" | |
const jobWorker = { | |
async doMyJob() { | |
console.log('Hello from worker thread!') | |
} | |
} | |
export type JobWorker = typeof jobWorker | |
expose(jobWorker) |
[ | |
{ | |
"currency": "Albania Lek", | |
"abbreviation": "ALL", | |
"symbol": "Lek" | |
}, | |
{ | |
"currency": "Afghanistan Afghani", | |
"abbreviation": "AFN", | |
"symbol": "؋" |
// Taken from https://github.com/angular/components/blob/master/src/cdk/drag-drop/drag-utils.ts | |
/** | |
* @license | |
* Copyright Google LLC All Rights Reserved. | |
* | |
* Use of this source code is governed by an MIT-style license that can be | |
* found in the LICENSE file at https://angular.io/license | |
*/ |
import { inject, InjectionKey, provide } from 'vue'; | |
function getValueFromMaybeFunction< | |
Args extends unknown[], | |
Provided, | |
T = Provided extends (...args: Args) => infer R ? R : Provided | |
>(params: Args, valueOrFn: Provided): T { | |
// TS isn't able to narrow down correctly `T | () => T` types as infer `ReturnType<Function>` as any | |
// See: https://github.com/microsoft/TypeScript/issues/37663 | |
// See: https://github.com/microsoft/TypeScript/issues/37993#issuecomment-615369691 |