UNPKG

@opensig/opendesign

Version:

54 lines (53 loc) 1.24 kB
import { ref } from "vue"; import { ColorPool } from "./helper.mjs"; const defaultZIndex = ref(1e3); function initZIndex(val) { defaultZIndex.value = val; } const defaultSize = ref("medium"); function initSize(val) { defaultSize.value = val; } const defaultRound = ref(); function initRound(type) { defaultRound.value = type; } const defaultPrestColor = ["#d9e6c3", "#ebd5be", "#d1e6de", "#e0ceeb", "#ebd3c7", "#e6dada", "#e3deeb", "#dedae6", "#cad0e8", "#cedeeb"]; const defaultPrestColorPool = ref(new ColorPool(defaultPrestColor)); function initPrestColor(colors) { defaultPrestColorPool.value = new ColorPool(colors); } const Breakpoints = { Phone: "phone", PadV: "pad_v", PadH: "pad_h", Laptop: "laptop", Pc: "pc" }; const mediaPoint = ref({ [Breakpoints.Phone]: 600, [Breakpoints.PadV]: 840, /** * @deprecated use padH */ pad: 1200, [Breakpoints.PadH]: 1200, [Breakpoints.Laptop]: 1680, [Breakpoints.Pc]: 1920 }); function initMediaPoint(point) { mediaPoint.value = { ...mediaPoint.value, ...point }; } export { Breakpoints, defaultPrestColorPool, defaultRound, defaultSize, defaultZIndex, initMediaPoint, initPrestColor, initRound, initSize, initZIndex, mediaPoint };