mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-13 15:41:01 +00:00
18 lines
417 B
TypeScript
18 lines
417 B
TypeScript
// Copyright 2017-2023 @polkadot/vue-identicon authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { version } from 'vue';
|
|
|
|
const isV3 = version.startsWith('3.');
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* Adjust attributes to be usable in both Vue 2 and Vue 3 components.
|
|
*/
|
|
export function adaptVNodeAttrs (data: Record<string, unknown>): Record<string, unknown> {
|
|
return isV3
|
|
? data
|
|
: { attrs: data };
|
|
}
|