mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
41 lines (40 loc) • 1.24 kB
JavaScript
import { defineComponent as d, mergeModels as n, useModel as s, createElementBlock as i, openBlock as u, mergeProps as f, unref as m } from "vue";
import { useDraw as p } from "./hooks.js";
/*!
* mine-h5-ui v2.15.0
* Copyright (c) 2025 biaov
* @license MIT
*/
const k = /* @__PURE__ */ d({
name: "MeMspaint",
__name: "index",
props: /* @__PURE__ */ n({
width: { default: "200px" },
height: { default: "200px" },
background: { default: "#fff" },
borderStyle: { type: [Boolean, String], default: !1 },
strokeStyle: { default: "#f56c6c" },
lineWidth: { default: 1 },
visible: { type: Boolean, default: !0 }
}, {
modelValue: {},
modelModifiers: {}
}),
emits: ["update:modelValue"],
setup(t) {
const a = t, o = s(t, "modelValue"), { canvasRef: l, getBorder: r } = p({ props: a, modelValue: o });
return (e, h) => (u(), i("canvas", f({ class: "me-mspaint" }, { width: parseInt(e.width), height: parseInt(e.height) }, {
style: {
width: e.width,
height: e.height,
background: e.background,
border: m(r)
},
ref_key: "canvasRef",
ref: l
}), null, 16));
}
});
export {
k as default
};