mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-10 18:02:53 +00:00
feat(vue-runtime-help): 去掉vue2的兼容
This commit is contained in:
parent
d039cee913
commit
2a7ab4e916
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"name": "@tmagic/react-runtime-help",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
@ -31,8 +31,8 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"lodash-es": "^4.17.21",
|
||||
"@tmagic/core": ">=1.6.0-beta.0",
|
||||
"@tmagic/stage": ">=1.6.0-beta.0",
|
||||
"@tmagic/core": ">=1.7.0",
|
||||
"@tmagic/stage": ">=1.7.0",
|
||||
"react": ">=18.3.1",
|
||||
"typescript": "catalog:"
|
||||
},
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.2.3",
|
||||
"version": "2.0.0",
|
||||
"name": "@tmagic/vue-runtime-help",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
@ -26,20 +26,13 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/Tencent/tmagic-editor.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue-demi": "^0.14.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@tmagic/core": ">=1.6.0-beta.0",
|
||||
"@tmagic/stage": ">=1.6.0-beta.0",
|
||||
"@vue/composition-api": ">=1.7.2",
|
||||
"@tmagic/core": ">=1.7.0",
|
||||
"@tmagic/stage": ">=1.7.0",
|
||||
"typescript": "catalog:",
|
||||
"vue": ">=2.6.0 || >=3.5.0"
|
||||
"vue": ">=3.5.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@vue/composition-api": {
|
||||
"optional": true
|
||||
},
|
||||
"@tmagic/core": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { inject, onBeforeUnmount, onMounted } from 'vue-demi';
|
||||
import { inject, onBeforeUnmount, onMounted } from 'vue';
|
||||
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import type { Id, MNodeInstance, Node as TMagicNode } from '@tmagic/core';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { computed, inject, onScopeDispose, ref, shallowReactive, watchEffect } from 'vue-demi';
|
||||
import { computed, inject, onScopeDispose, ref, shallowReactive, watchEffect } from 'vue';
|
||||
|
||||
import type TMagicCore from '@tmagic/core';
|
||||
import { type MComponent, type StyleSchema, toLine } from '@tmagic/core';
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ConcreteComponent, inject } from 'vue-demi';
|
||||
import { ConcreteComponent, inject } from 'vue';
|
||||
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import { toLine } from '@tmagic/core';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { inject, nextTick, onBeforeUnmount, reactive, ref } from 'vue-demi';
|
||||
import { inject, nextTick, onBeforeUnmount, reactive, ref } from 'vue';
|
||||
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import type { ChangeEvent, Id, MNode } from '@tmagic/core';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { computed, inject, nextTick, reactive, ref, watch } from 'vue-demi';
|
||||
import { computed, inject, nextTick, reactive, ref, watch } from 'vue';
|
||||
|
||||
import type TMagicApp from '@tmagic/core';
|
||||
import type { Id, MApp, MNode } from '@tmagic/core';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { h } from 'vue-demi';
|
||||
import { h } from 'vue';
|
||||
|
||||
import type { Id, MComponent, StyleSchema } from '@tmagic/core';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { defineComponent, isVue3, provide } from 'vue-demi';
|
||||
import { defineComponent, provide } from 'vue';
|
||||
import { mount } from '@vue/test-utils';
|
||||
|
||||
import Core from '@tmagic/core';
|
||||
@ -34,7 +34,7 @@ describe('useComponent', () => {
|
||||
});
|
||||
|
||||
// node_modules中的vue版本不是3.0.0,所以跳过
|
||||
test.runIf(isVue3).skip('auto inject and empty para', () => {
|
||||
test('auto inject and empty para', () => {
|
||||
const child = defineComponent({
|
||||
setup() {
|
||||
const component = useComponent();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user