@dcloudio/uni-mp-toutiao 3.0.0-alpha-3021320211123002 → 3.0.0-alpha-3030020211129001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,15 @@
1
1
  import { assert } from './testUtils'
2
2
 
3
3
  describe('mp-baidu: transform component', () => {
4
+ test(`component with v-show`, () => {
5
+ assert(
6
+ `<custom v-show="ok"/>`,
7
+ `<custom bind:-data-c-h="{{!a}}" u-i="2a9ec0b0-0" bind:__l="__l"/>`,
8
+ `(_ctx, _cache) => {
9
+ return { a: _ctx.ok }
10
+ }`
11
+ )
12
+ })
4
13
  test(`match-media`, () => {
5
14
  assert(
6
15
  `<match-media/>`,
@@ -81,6 +81,9 @@ const miniProgram = {
81
81
  dynamicSlotNames: true,
82
82
  },
83
83
  directive: 'tt:',
84
+ component: {
85
+ vShow: uniCliShared.COMPONENT_CUSTOM_HIDDEN_BIND,
86
+ },
84
87
  };
85
88
  const options = {
86
89
  vite: {
@@ -108,6 +108,12 @@ function stringifyQuery(obj, encodeStr = encode) {
108
108
  return res ? `?${res}` : '';
109
109
  }
110
110
 
111
+ function hasLeadingSlash(str) {
112
+ return str.indexOf('/') === 0;
113
+ }
114
+ function addLeadingSlash(str) {
115
+ return hasLeadingSlash(str) ? str : '/' + str;
116
+ }
111
117
  const invokeArrayFns = (fns, arg) => {
112
118
  let ret;
113
119
  for (let i = 0; i < fns.length; i++) {
@@ -772,7 +778,7 @@ function parsePage(vueOptions, parseOptions) {
772
778
  methods.onLoad = function (query) {
773
779
  this.options = query;
774
780
  this.$page = {
775
- fullPath: '/' + this.route + stringifyQuery(query),
781
+ fullPath: addLeadingSlash(this.route + stringifyQuery(query)),
776
782
  };
777
783
  return this.$vm && this.$vm.$callHook(ON_LOAD, query);
778
784
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-mp-toutiao",
3
- "version": "3.0.0-alpha-3021320211123002",
3
+ "version": "3.0.0-alpha-3030020211129001",
4
4
  "description": "uni-app mp-toutiao",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
24
24
  "dependencies": {
25
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3021320211123002",
26
- "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3021320211123002",
27
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-3021320211123002",
28
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-3021320211123002",
29
- "@dcloudio/uni-shared": "3.0.0-alpha-3021320211123002",
30
- "@vue/compiler-core": "3.2.22"
25
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030020211129001",
26
+ "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3030020211129001",
27
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3030020211129001",
28
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3030020211129001",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3030020211129001",
30
+ "@vue/compiler-core": "3.2.23"
31
31
  }
32
32
  }
@@ -1,6 +1,7 @@
1
1
  import path from 'path'
2
2
  import type { CompilerOptions } from '@vue/compiler-core'
3
3
  import {
4
+ COMPONENT_CUSTOM_HIDDEN_BIND,
4
5
  MiniProgramCompilerOptions,
5
6
  transformComponentLink,
6
7
  transformMatchMedia,
@@ -32,6 +33,9 @@ export const miniProgram: MiniProgramCompilerOptions = {
32
33
  dynamicSlotNames: true,
33
34
  },
34
35
  directive: 'tt:',
36
+ component: {
37
+ vShow: COMPONENT_CUSTOM_HIDDEN_BIND,
38
+ },
35
39
  }
36
40
 
37
41
  export const options: UniMiniProgramPluginOptions = {