fix: typing
This commit is contained in:
parent
c668dce348
commit
2e04934881
|
|
@ -127,7 +127,7 @@ export function PrintPreview(props: PrintPreviewProps) {
|
|||
width={`${store.state.dimensions?.cardWidth || 56}mm`}
|
||||
height={`${store.state.dimensions?.cardHeight || 88}mm`}
|
||||
>
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" class="w-full h-full bg-white">
|
||||
<div class="w-full h-full bg-white" {...({ xmlns: 'http://www.w3.org/1999/xhtml' } as any)}>
|
||||
<div
|
||||
class="absolute"
|
||||
style={{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface TableRow {
|
|||
|
||||
customElement('md-table', { roll: false, remix: false }, (props, { element }) => {
|
||||
noShadowDOM();
|
||||
const [rows, setRows] = createSignal<CSV<TableRow>>([]);
|
||||
const [rows, setRows] = createSignal<CSV<TableRow>>([] as unknown as CSV<TableRow>);
|
||||
const [activeTab, setActiveTab] = createSignal(0);
|
||||
const [activeGroup, setActiveGroup] = createSignal<string | null>(null);
|
||||
const [bodyHtml, setBodyHtml] = createSignal('');
|
||||
|
|
@ -45,7 +45,8 @@ customElement('md-table', { roll: false, remix: false }, (props, { element }) =>
|
|||
createEffect(() => {
|
||||
const data = csvData();
|
||||
if (data) {
|
||||
setRows(data as any[]);
|
||||
// 将加载的数据赋值给 rows,CSV 类型已经包含 sourcePath 等属性
|
||||
setRows(data as unknown as CSV<TableRow>);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@ import { For, Show, createEffect } from 'solid-js';
|
|||
import type {TextResult, RuntimeResult, OptionsResult} from '../yarn-spinner/runtime/results';
|
||||
import { createYarnStore } from './stores/yarnStore';
|
||||
|
||||
export interface YarnSpinnerProps {
|
||||
start: string;
|
||||
}
|
||||
|
||||
customElement<{start: string}>('md-yarn-spinner', {start: 'start'}, (props, { element }) => {
|
||||
noShadowDOM();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference types="vite/client" />
|
||||
|
||||
interface WebpackContext {
|
||||
(path: string): { default?: string } | string;
|
||||
keys(): string[];
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
webpackContext(
|
||||
directory: string,
|
||||
options: {
|
||||
recursive?: boolean;
|
||||
regExp?: RegExp;
|
||||
}
|
||||
): WebpackContext;
|
||||
}
|
||||
Loading…
Reference in New Issue