birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
57 lines (56 loc) • 2.55 kB
JavaScript
;
const yearTable_vue_vue_type_script_lang = require("./year-table.vue2.js");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
const _hoisted_1 = ["onClick"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_IconArrowLeftDoubleFill = vue.resolveComponent("IconArrowLeftDoubleFill");
const _component_IconArrowRightDoubleFill = vue.resolveComponent("IconArrowRightDoubleFill");
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass(_ctx.name)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-header`)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-header-inner`)
}, [
vue.createElementVNode("span", {
class: vue.normalizeClass(`${_ctx.name}-header-inner-year`)
}, vue.toDisplayString(_ctx.firstYear) + " - " + vue.toDisplayString(_ctx.firstYear + 12), 3)
], 2),
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-header-option`)
}, [
vue.createVNode(_component_IconArrowLeftDoubleFill, {
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleChange("prev")),
size: "20px"
}),
vue.createVNode(_component_IconArrowRightDoubleFill, {
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleChange("next")),
size: "20px"
})
], 2)
], 2),
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.name}-body`)
}, [
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.yearCell, (col) => {
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass([
`${_ctx.name}-year-cell`,
{ active: _ctx.currentVal === col.value },
{ "to-year": _ctx.currentVal !== col.value && col.label === _ctx.dayjs(_ctx.toDay).year() + "" }
]),
onClick: vue.withModifiers(($event) => _ctx.handleSelect(col), ["stop"])
}, [
vue.createElementVNode("span", {
class: vue.normalizeClass([`${_ctx.name}-year-cell-inner`])
}, vue.toDisplayString(col.label), 3)
], 10, _hoisted_1);
}), 256))
], 2)
], 2);
}
const yearTable = /* @__PURE__ */ _pluginVue_exportHelper(yearTable_vue_vue_type_script_lang, [["render", _sfc_render]]);
module.exports = yearTable;