UNPKG

yanzhen-design-vue

Version:

53 lines (52 loc) 2.97 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue = require("vue"); const core = require("@vueuse/core"); require("./other-table.vue.cjs"); require("./other-table-select.vue.cjs"); const otherTables = require("./other-tables.cjs"); require("./hooks/index.cjs"); const common = require("./constants/common.cjs"); const useOtherTableConfig = require("./hooks/use-other-table-config.cjs"); const otherTableSelect_vue_vue_type_script_setup_true_lang = require("./other-table-select.vue2.cjs"); const otherTable_vue_vue_type_script_setup_true_lang = require("./other-table.vue2.cjs"); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: otherTables.otherTablesName }, __name: "other-tables", props: otherTables.otherTablesProps, emits: otherTables.otherTablesEmits, setup(__props, { emit: __emit }) { const { ns } = otherTables.otherTablesOptions; const config = useOtherTableConfig.useOtherTablesConfig(); const props = __props; const emit = __emit; const _modelValue = core.useVModel(props, "value", emit); const Attributes = vue.computed(() => props); const isCx1AndTc = vue.computed(() => { switch (String(props.relBizObjectStorageMode)) { case common.OTHER_TABLES_RELEVANCE.TC: case common.OTHER_TABLES_RELEVANCE.CX1: return true; } return false; }); const useCx1Select = vue.computed(() => { return common.OTHER_TABLES_RELEVANCE.CX1 === String(props.relBizObjectStorageMode) && props.sourceBizObjectModelCode === props.relBizObjectModelCode && !common.OTHER_TABLES_USE_ORIGIN_COMPONENT.includes(String(props.relBizObjectColumnBizType)); }); return (_ctx, _cache) => { var _a; return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass([vue.unref(ns).b()]) }, [ useCx1Select.value ? (vue.openBlock(), vue.createBlock(otherTableSelect_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 0 }, props, { value: vue.unref(_modelValue), "onUpdate:value": _cache[0] || (_cache[0] = ($event) => vue.isRef(_modelValue) ? _modelValue.value = $event : null) }), null, 16, ["value"])) : isCx1AndTc.value ? (vue.openBlock(), vue.createBlock(otherTable_vue_vue_type_script_setup_true_lang.default, vue.mergeProps({ key: 1 }, props, { value: vue.unref(_modelValue), "onUpdate:value": _cache[1] || (_cache[1] = ($event) => vue.isRef(_modelValue) ? _modelValue.value = $event : null) }), null, 16, ["value"])) : ((_a = vue.unref(config)) == null ? void 0 : _a.component) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(config).component), vue.mergeProps({ key: 2 }, props, { Attributes: Attributes.value }), null, 16, ["Attributes"])) : vue.createCommentVNode("", true) ], 2); }; } }); exports.default = _sfc_main;