birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
68 lines (67 loc) • 2.53 kB
JavaScript
import _sfc_main from "./time-table.vue2.js";
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withCtx, toDisplayString, createVNode, createTextVNode } from "vue";
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
const _hoisted_1 = ["onClick"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_RecycleScroller = resolveComponent("RecycleScroller");
const _component_bp_button = resolveComponent("bp-button");
return openBlock(), createElementBlock("div", {
class: normalizeClass(_ctx.name)
}, [
createElementVNode("div", {
class: normalizeClass(`${_ctx.name}-body`)
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList([_ctx.hourList, _ctx.minuteList, _ctx.secondList], (items, index) => {
return openBlock(), createBlock(_component_RecycleScroller, {
listClass: "time-col-scroller-list",
ref_for: true,
ref: (el) => _ctx.typeRefs[index] = el,
class: normalizeClass(`${_ctx.name}-time-col`),
items,
"item-size": 28
}, {
default: withCtx(({ item }) => [
createElementVNode("div", {
class: normalizeClass([`${_ctx.name}-col-cell`, { active: item === _ctx.globalValue[index] }]),
onClick: ($event) => _ctx.handleClick(index, item)
}, [
createElementVNode("span", {
class: normalizeClass(`${_ctx.name}-col-cell-inner`)
}, toDisplayString(item), 3)
], 10, _hoisted_1)
]),
_: 2
}, 1032, ["class", "items"]);
}), 256))
], 2),
createElementVNode("div", {
class: normalizeClass(`${_ctx.name}-footer`)
}, [
createVNode(_component_bp_button, {
size: "mini",
onClick: _ctx.setNow
}, {
default: withCtx(() => [
createTextVNode("现在")
]),
_: 1
}, 8, ["onClick"]),
createVNode(_component_bp_button, {
disabled: _ctx.confirmDisabled,
size: "mini",
type: "primary",
status: "primary",
onClick: _ctx.handleSelect
}, {
default: withCtx(() => [
createTextVNode(" 确认 ")
]),
_: 1
}, 8, ["disabled", "onClick"])
], 2)
], 2);
}
const timeTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
timeTable as default
};