UNPKG

el-plus-powerful-table

Version:

## [DOCS](https://peng-xiao-shuai.github.io/vite-vue-admin-docs/zh-CN/component_directive/component/powerful-table-doc.html)

65 lines (64 loc) 1.9 kB
import { defineComponent as d, inject as f, ref as u, reactive as v, watchEffect as p, onBeforeUnmount as h, createVNode as l, nextTick as D } from "vue"; import { ElIcon as b, ElDatePicker as g } from "element-plus"; import { ArrowUp as w } from "@element-plus/icons-vue"; import { props as P } from "./common.mjs"; import { SizeSymbol as k } from "../../keys.mjs"; const i = /* @__PURE__ */ d({ name: "PTFDatePicker", props: P, emits: ["headerFilterChange"], setup(t, { emit: n, expose: s }) { const c = f(k), o = u(), e = v({ value: "", visible: !1, defaultTime: [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 2, 1, 23, 59, 59)] }), r = (a) => { a || (e.value = ""), n("headerFilterChange", a, t.headerData); }, m = p(() => { var a; t.list.length && ((a = e.value) != null && a.length) && r(e.value); }); return h(() => { m(); }), s({ state: e, header: t.headerData }), () => l("span", { style: e.value ? { color: "var(--el-color-primary)" } : {}, onClick: async (a) => { a.stopPropagation(), e.visible = !e.visible, e.visible && (await D(), o.value.focus()); } }, [t.headerData.label, l(b, { class: e.visible ? "arrow-down" : "arrow-up" }, { default: () => [l(w, null, null)] }), l(g, { modelValue: e.value, "onUpdate:modelValue": [(a) => e.value = a, r], type: "datetimerange", "value-format": "YYYY-MM-DD HH:mm:ss", "default-time": e.defaultTime, ref: o, class: "date_style", style: "padding: 0; overflow: hidden", size: c, "onVisible-change": (a) => { e.visible = a; } }, null)]); } }), y = i; y.install = (t) => { t.component(i.name, i); }; export { i as FDatePicker, y as PTFDatePicker, i as default }; //# sourceMappingURL=FDatePicker.mjs.map