feat: md-pins allow numbers
This commit is contained in:
@@ -3,13 +3,13 @@ import {Show, For, createResource, createMemo, createSignal} from "solid-js";
|
||||
import { resolvePath } from "./utils/path";
|
||||
import { createPinsStore } from "./stores/pinsStore";
|
||||
|
||||
customElement("md-pins", { pins: "", fixed: false }, (props, { element }) => {
|
||||
customElement("md-pins", { pins: "", fixed: false, labelStart: "A" }, (props, { element }) => {
|
||||
noShadowDOM();
|
||||
|
||||
const [showToast, setShowToast] = createSignal(false);
|
||||
|
||||
// 创建 store
|
||||
const store = createPinsStore(props.pins, props.fixed);
|
||||
const store = createPinsStore(props.pins, props.fixed, props.labelStart);
|
||||
|
||||
// 从 element 的 textContent 获取图片路径
|
||||
const rawSrc = element?.textContent?.trim() || '';
|
||||
|
||||
Reference in New Issue
Block a user