tdesign-vue
Version:
50 lines (44 loc) • 2.19 kB
JavaScript
/**
* tdesign v1.15.0
* (c) 2026 tdesign
* @license MIT
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var VueCompositionAPI = require('@vue/composition-api');
var descriptions_interface = require('../interface.js');
var isString = require('../../_chunks/dep-a2217d56.js');
var isFunction = require('../../_chunks/dep-8d206316.js');
require('../../_chunks/dep-3b2292ce.js');
require('@babel/runtime/helpers/typeof');
require('../../_chunks/dep-10fcb46d.js');
require('../../_chunks/dep-ba7f5924.js');
require('../../_chunks/dep-2bc87cc8.js');
function renderCustomNode(node) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (isString.isString(node)) {
return node;
}
if (isFunction.isFunction(node)) {
return node(VueCompositionAPI.h, params);
}
if (isFunction.isFunction(node.render)) {
return VueCompositionAPI.h(node);
}
return node;
}
function renderVNodeTNode(node, name1, name2) {
var _node$componentOption, _node$data$scopedSlot, _node$data$scopedSlot2, _node$data$scopedSlot3, _node$data$scopedSlot4;
var prop = (_node$componentOption = node.componentOptions.propsData) === null || _node$componentOption === void 0 ? void 0 : _node$componentOption[name1];
if (prop) return prop;
var slot = ((_node$data$scopedSlot = node.data.scopedSlots) === null || _node$data$scopedSlot === void 0 || (_node$data$scopedSlot2 = _node$data$scopedSlot[name1]) === null || _node$data$scopedSlot2 === void 0 ? void 0 : _node$data$scopedSlot2.call(_node$data$scopedSlot)) || ((_node$data$scopedSlot3 = node.data.scopedSlots) === null || _node$data$scopedSlot3 === void 0 || (_node$data$scopedSlot4 = _node$data$scopedSlot3[name2]) === null || _node$data$scopedSlot4 === void 0 ? void 0 : _node$data$scopedSlot4.call(_node$data$scopedSlot3));
if (slot) return slot;
return node.componentOptions.children;
}
function itemTypeIsProps(itemsType, item) {
return itemsType === descriptions_interface.ItemsType.props;
}
exports.itemTypeIsProps = itemTypeIsProps;
exports.renderCustomNode = renderCustomNode;
exports.renderVNodeTNode = renderVNodeTNode;
//# sourceMappingURL=index.js.map