1 | import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2 | import * as components from './components';
|
3 | export function initVue3Components(app) {
|
4 | app.config.isCustomElement = function (tag) {
|
5 | return /^taro-/.test(tag) || tag === 'root' || tag === 'block';
|
6 | };
|
7 |
|
8 | Object.entries(components).forEach(function (_ref) {
|
9 | var _ref2 = _slicedToArray(_ref, 2),
|
10 | name = _ref2[0],
|
11 | component = _ref2[1];
|
12 |
|
13 | if (component) {
|
14 | var tagName = 'taro' + name.replace(new RegExp('([A-Z])', 'g'), '-$1').toLowerCase();
|
15 | app.component(tagName, component);
|
16 | }
|
17 | });
|
18 | }
|
19 | export * from './components'; |
\ | No newline at end of file |