birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
42 lines (41 loc) • 1.83 kB
JavaScript
;
const verifyCode_vue_vue_type_script_lang = require("./verifyCode.vue2.js");
const vue = require("vue");
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.js");
const _hoisted_1 = ["onUpdate:modelValue", "type", "disabled", "readonly", "onInput"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass(_ctx.inpClass)
}, [
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.length, (v) => {
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
"onUpdate:modelValue": ($event) => _ctx.globalValue[v - 1] = $event,
type: _ctx.inpType,
ref_for: true,
ref: _ctx.setItemRef,
class: vue.normalizeClass(["bp-verifycode-inner"]),
spellcheck: false,
disabled: _ctx.disabled,
readonly: _ctx.readonly,
maxlength: 1,
onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
onKeydown: [
_cache[1] || (_cache[1] = (...args) => _ctx.onKeydown && _ctx.onKeydown(...args)),
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(() => {
}, ["prevent"]), ["space"]))
],
onPaste: _cache[3] || (_cache[3] = (...args) => _ctx.onPaste && _ctx.onPaste(...args)),
onInput: ($event) => _ctx.onInput($event, v - 1)
}, null, 40, _hoisted_1)), [
[
vue.vModelDynamic,
_ctx.globalValue[v - 1],
void 0,
{ trim: true }
]
]);
}), 256))
], 2);
}
const verifyCode = /* @__PURE__ */ _pluginVue_exportHelper(verifyCode_vue_vue_type_script_lang, [["render", _sfc_render]]);
module.exports = verifyCode;