vxe-pc-ui
Version:
A vue based PC component library
46 lines (45 loc) • 1.28 kB
JavaScript
import { defineComponent, ref, h, reactive } from 'vue';
import XEUtils from 'xe-utils';
import { createEvent } from '../../ui';
export default defineComponent({
name: 'VxeSteps',
props: {},
emits: [],
setup(props, context) {
const { emit } = context;
const xID = XEUtils.uniqueId();
const refElem = ref();
const reactData = reactive({});
const refMaps = {
refElem
};
const computeMaps = {};
const $xeSteps = {
xID,
props,
context,
reactData,
getRefMaps: () => refMaps,
getComputeMaps: () => computeMaps
};
const dispatchEvent = (type, params, evnt) => {
emit(type, createEvent(evnt, { $steps: $xeSteps }, params));
};
const stepsMethods = {
dispatchEvent
};
const stepsPrivateMethods = {};
Object.assign($xeSteps, stepsMethods, stepsPrivateMethods);
const renderVN = () => {
return h('div', {
ref: refElem,
class: 'vxe-steps'
}, []);
};
$xeSteps.renderVN = renderVN;
return $xeSteps;
},
render() {
return this.renderVN();
}
});