UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

71 lines (70 loc) 2.6 kB
import { defineComponent as N, mergeModels as S, useModel as B, createElementBlock as s, openBlock as n, createElementVNode as t, createVNode as a, unref as e, toDisplayString as l, Fragment as r, renderList as m, normalizeClass as _ } from "vue"; import { getHeadDate as E } from "./date.mjs"; import { useDate as F } from "./hook/useDate.mjs"; import { Icon as c } from "@vuux/icons"; const P = { class: "app-date-details" }, Y = { class: "date-control" }, b = { class: "control-left" }, w = { class: "is-icon" }, z = { class: "is-icon" }, H = { class: "cur-date" }, L = { class: "control-right" }, T = { class: "is-icon" }, $ = { class: "is-icon" }, j = { class: "date-box" }, q = { class: "date-num" }, A = ["onClick"], W = /* @__PURE__ */ N({ __name: "date", props: { modelValue: {}, modelModifiers: {} }, emits: /* @__PURE__ */ S(["change"], ["update:modelValue"]), setup(h, { expose: u, emit: v }) { const k = v, p = B(h, "modelValue"), { dateData: C, dateState: d, dateItemClassNames: f, checkToday: g, init: x, handlePrveYear: y, handlePrveMonth: D, handleNextMonth: I, handleNextYear: V, handleSelectDateFn: M } = F(p, k); return u({ init: x }), (G, J) => (n(), s("div", P, [ t("div", Y, [ t("div", b, [ t("div", w, [ a(e(c), { name: "Icon1407811", onClick: e(y) }, null, 8, ["onClick"]) ]), t("div", z, [ a(e(c), { name: "Icon3498333", onClick: e(D) }, null, 8, ["onClick"]) ]) ]), t("div", H, l(e(d).year) + " 年 " + l(e(d).month) + " 月", 1), t("div", L, [ t("div", T, [ a(e(c), { name: "Icon6657361", onClick: e(I) }, null, 8, ["onClick"]) ]), t("div", $, [ a(e(c), { name: "Icon1756783", onClick: e(V) }, null, 8, ["onClick"]) ]) ]) ]), t("div", j, [ (n(!0), s(r, null, m(e(E), (o, i) => (n(), s("div", { key: "i" + i, class: "date-item" }, [ t("div", q, l(o), 1) ]))), 128)), (n(!0), s(r, null, m(e(C), (o, i) => (n(), s("div", { key: "i" + i, class: _(["date-item", e(f)(o)]), onClick: (K) => e(M)(o) }, [ t("div", { class: _(["date-value", [{ "is-today": e(g)(o) }]]) }, l(o.showDate), 3) ], 10, A))), 128)) ]) ])); } }); export { W as default };