diff --git a/packages/uni-mp-alipay/dist/uni.mp.esm.js b/packages/uni-mp-alipay/dist/uni.mp.esm.js index 7a85d894e1277d441180ee51583677fbf92b587c..90ad90314b8cecc1791054d04b816570aa777daa 100644 --- a/packages/uni-mp-alipay/dist/uni.mp.esm.js +++ b/packages/uni-mp-alipay/dist/uni.mp.esm.js @@ -623,7 +623,7 @@ function parsePropType(key, type, defaultValue) { function initDefaultProps(isBehavior = false) { const properties = {}; if (!isBehavior) { - properties.vueId = { + properties.vI = { type: String, value: '', }; @@ -1357,7 +1357,7 @@ function initVm(mpInstance, createComponent) { return; } const properties = mpInstance.props; - initVueIds(properties.vueId, mpInstance); + initVueIds(properties.vI, mpInstance); const relationOptions = { vuePid: mpInstance._$vuePid, mpInstance, diff --git a/packages/uni-mp-alipay/src/runtime/createComponent.ts b/packages/uni-mp-alipay/src/runtime/createComponent.ts index 1483df99229a0d0ff5950c59e27a45d7a81c5109..5e9e09dd9b4c851023302be573452764f6955ead 100644 --- a/packages/uni-mp-alipay/src/runtime/createComponent.ts +++ b/packages/uni-mp-alipay/src/runtime/createComponent.ts @@ -53,7 +53,7 @@ function initVm( return } const properties = mpInstance.props - initVueIds(properties.vueId, mpInstance as any) + initVueIds(properties.vI, mpInstance as any) const relationOptions: RelationOptions = { vuePid: mpInstance._$vuePid, mpInstance, diff --git a/packages/uni-mp-baidu/dist/uni.mp.esm.js b/packages/uni-mp-baidu/dist/uni.mp.esm.js index 1d7a80a3686a1e89a435fe997baed15025625264..bf19bd1e490342cadfec2b1d08bf32f3ef9b849d 100644 --- a/packages/uni-mp-baidu/dist/uni.mp.esm.js +++ b/packages/uni-mp-baidu/dist/uni.mp.esm.js @@ -175,8 +175,8 @@ function initRefs(instance, mpInstance) { Object.defineProperty(instance, 'refs', { get() { const $refs = {}; - selectAllComponents(mpInstance, '.vue-ref', $refs); - const forComponents = mpInstance.selectAllComponents('.vue-ref-in-for'); + selectAllComponents(mpInstance, '.v-r', $refs); + const forComponents = mpInstance.selectAllComponents('.v-r-i-f'); forComponents.forEach((component) => { const ref = component.dataset.ref; if (!$refs[ref]) { @@ -662,7 +662,7 @@ function parsePropType(key, type, defaultValue) { function initDefaultProps(isBehavior = false) { const properties = {}; if (!isBehavior) { - properties.vueId = { + properties.vI = { type: String, value: '', }; @@ -1234,7 +1234,7 @@ function initLifetimes({ mocks, isPage, initRelation, vueOptions, }) { return { attached() { const properties = this.properties; - initVueIds(properties.vueId, this); + initVueIds(properties.vI, this); const relationOptions = { vuePid: this._$vuePid, }; diff --git a/packages/uni-mp-compiler/__tests__/component.spec.ts b/packages/uni-mp-compiler/__tests__/component.spec.ts index 8884f419f1aa27cea79178258e23ea86c702a116..a16459803a1c0146cb7b17ceacd6ce97431293e6 100644 --- a/packages/uni-mp-compiler/__tests__/component.spec.ts +++ b/packages/uni-mp-compiler/__tests__/component.spec.ts @@ -5,7 +5,7 @@ describe('compiler: transform component', () => { // test('basic', () => { // assert( // ``, - // ``, + // ``, // `(_ctx, _cache) => { // return {} // }`, @@ -17,7 +17,7 @@ describe('compiler: transform component', () => { test('component + component', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return {} }`, @@ -29,7 +29,7 @@ describe('compiler: transform component', () => { test('component + component + component', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return {} }`, @@ -41,7 +41,7 @@ describe('compiler: transform component', () => { test('component with v-for', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _vFor(_ctx.items, (item, k0, i0) => { return { a: '2a9ec0b0-0' + '-' + i0 }; }) } }`, @@ -51,7 +51,7 @@ describe('compiler: transform component', () => { ) assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _vFor(_ctx.items, (item, key, index) => { return { a: '2a9ec0b0-0' + '-' + index }; }) } }`, @@ -63,7 +63,7 @@ describe('compiler: transform component', () => { test('component + component with v-for', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _vFor(_ctx.items, (item, k0, i0) => { return { a: '2a9ec0b0-1' + '-' + i0 + ',' + '2a9ec0b0-0' }; }) } }`, @@ -75,7 +75,7 @@ describe('compiler: transform component', () => { test('component with v-for + component', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _vFor(_ctx.items, (item, k0, i0) => { return { a: '2a9ec0b0-1' + '-' + i0 + ',' + ('2a9ec0b0-0' + '-' + i0), b: '2a9ec0b0-0' + '-' + i0 }; }) } }`, @@ -87,7 +87,7 @@ describe('compiler: transform component', () => { test('component with v-for + component with v-for', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _vFor(_ctx.items, (item, k0, i0) => { return { a: _vFor(item.items, (item1, k1, i1) => { return { a: '2a9ec0b0-1' + '-' + i0 + '-' + i1 + ',' + ('2a9ec0b0-0' + '-' + i0) }; }), b: '2a9ec0b0-0' + '-' + i0 }; }) } }`, diff --git a/packages/uni-mp-compiler/__tests__/ref.spec.ts b/packages/uni-mp-compiler/__tests__/ref.spec.ts index 2022c5be2ebcb87c50de525b5ca9410af4250c13..782a455efda4fa73a9ce2042f632d8d94ac2d929 100644 --- a/packages/uni-mp-compiler/__tests__/ref.spec.ts +++ b/packages/uni-mp-compiler/__tests__/ref.spec.ts @@ -1,26 +1,26 @@ import { assert } from './testUtils' describe('compiler: transform ref', () => { - test('vue-ref', () => { + test('v-r', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return {} }` ) assert( ``, - ``, + ``, `(_ctx, _cache) => { return {} }` ) }) - test('vue-ref-in-for', () => { + test('v-r-i-f', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _vFor(_ctx.items, (item, k0, i0) => { return { a: '2a9ec0b0-0' + '-' + i0 }; }) } }` @@ -29,7 +29,7 @@ describe('compiler: transform ref', () => { test('static ref', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return {} }` @@ -38,7 +38,7 @@ describe('compiler: transform ref', () => { test('dynamic ref', () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _ctx.custom } }` diff --git a/packages/uni-mp-compiler/__tests__/vModel.spec.ts b/packages/uni-mp-compiler/__tests__/vModel.spec.ts index af14891ebb42c464c03d6746f33112176744af66..43c3785b26e2ecb7ddbb1f0afda494a3a50d6471 100644 --- a/packages/uni-mp-compiler/__tests__/vModel.spec.ts +++ b/packages/uni-mp-compiler/__tests__/vModel.spec.ts @@ -4,7 +4,7 @@ describe('compiler: transform v-model', () => { test(`component v-model`, () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _ctx.model, b: _vOn($event => _ctx.model = $event) } }` @@ -13,7 +13,7 @@ describe('compiler: transform v-model', () => { test(`component v-model with cache`, () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return { a: _ctx.model, b: _vOn($event => _ctx.model = $event) } }`, diff --git a/packages/uni-mp-compiler/__tests__/vSlot.spec.ts b/packages/uni-mp-compiler/__tests__/vSlot.spec.ts index a323faa8b59b7f8dd46dca754dcd28039cdb80fa..d016c43745d1f8a397feb59373fa3af2e3963ce9 100644 --- a/packages/uni-mp-compiler/__tests__/vSlot.spec.ts +++ b/packages/uni-mp-compiler/__tests__/vSlot.spec.ts @@ -4,14 +4,14 @@ describe('compiler: transform v-slot', () => { test('default slot', () => { assert( `