UNPKG

@aplus-frontend/ui

Version:

35 lines (34 loc) 1.03 kB
import { defineComponent as r, createElementBlock as o, unref as a, openBlock as l, Fragment as n, createTextVNode as p, toDisplayString as i } from "vue"; import { isNil as d } from "lodash-unified"; import { getOptionValue as m, getOptionLabel as u } from "./helper.mjs"; const g = /* @__PURE__ */ r({ name: "ApFieldCheckboxRead", __name: "read", props: { mode: { default: "edit" }, class: {}, style: {}, defaultValue: {}, value: {}, onChange: {}, "onUpdate:value": {}, name: {}, prefixCls: {}, options: { default: () => [] }, disabled: { type: Boolean, default: void 0 }, id: {}, emptyText: { default: "--" }, request: {}, vertical: { type: Boolean } }, setup(s) { return (e, f) => a(d)(e.value) ? (l(), o(n, { key: 0 }, [ p(i(e.emptyText), 1) ], 64)) : (l(), o(n, { key: 1 }, [ p(i(e.options?.filter((t) => e.value.indexOf(a(m)(t)) > -1).map((t) => a(u)(t)).join("、") || e.emptyText), 1) ], 64)); } }); export { g as default };