@dcloudio/uni-mp-toutiao 3.0.0-alpha-4000720240326001 → 3.0.0-alpha-4010120240329001

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.
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
384
384
  function invokeFail(id, name, errMsg, errRes = {}) {
385
385
  const apiErrMsg = name + ':fail' + (errMsg ? ' ' + errMsg : '');
386
386
  delete errRes.errCode;
387
- return invokeCallback(id, typeof UniError !== 'undefined'
388
- ? typeof errRes.errCode !== 'undefined'
389
- ? new UniError(name, errRes.errCode, apiErrMsg)
390
- : new UniError(apiErrMsg, errRes)
391
- : extend({ errMsg: apiErrMsg }, errRes));
387
+ let res = extend({ errMsg: apiErrMsg }, errRes);
388
+ return invokeCallback(id, res);
392
389
  }
393
390
  function beforeInvokeApi(name, args, protocol, options) {
394
391
  if ((process.env.NODE_ENV !== 'production')) {
@@ -33,7 +33,7 @@ var source = {
33
33
  };
34
34
 
35
35
  function transformSwiper(node) {
36
- if (node.type !== 1 /* NodeTypes.ELEMENT */ || node.tag !== 'swiper') {
36
+ if (node.type !== compilerCore.NodeTypes.ELEMENT || node.tag !== 'swiper') {
37
37
  return;
38
38
  }
39
39
  const disableTouchProp = compilerCore.findProp(node, 'disable-touch', false, true);
@@ -41,7 +41,7 @@ function transformSwiper(node) {
41
41
  return;
42
42
  }
43
43
  const { props } = node;
44
- if (disableTouchProp.type === 6 /* NodeTypes.ATTRIBUTE */) {
44
+ if (disableTouchProp.type === compilerCore.NodeTypes.ATTRIBUTE) {
45
45
  // <swiper disable-touch/> => <swiper :touchable="false"/>
46
46
  props.splice(props.indexOf(disableTouchProp), 1, uniCliShared.createBindDirectiveNode('touchable', 'false'));
47
47
  }
@@ -49,7 +49,7 @@ function transformSwiper(node) {
49
49
  if (disableTouchProp.exp) {
50
50
  // <swiper :disable-touch="true"/> => <swiper :touchable="!(true)"/>
51
51
  let touchable = '';
52
- if (disableTouchProp.exp.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */) {
52
+ if (disableTouchProp.exp.type === compilerCore.NodeTypes.SIMPLE_EXPRESSION) {
53
53
  if (disableTouchProp.exp.content === 'true') {
54
54
  touchable = 'false';
55
55
  }
@@ -204,7 +204,7 @@ function parseApp(instance, parseAppOptions) {
204
204
  }
205
205
  const appOptions = {
206
206
  globalData: (instance.$options && instance.$options.globalData) || {},
207
- $vm: instance,
207
+ $vm: instance, // mp-alipay 组件 data 初始化比 onLaunch 早,提前挂载
208
208
  onLaunch(options) {
209
209
  this.$vm = instance; // 飞书小程序可能会把 AppOptions 序列化,导致 $vm 对象部分属性丢失
210
210
  const ctx = internalInstance.ctx;
@@ -439,7 +439,7 @@ function initDefaultProps(options, isBehavior = false) {
439
439
  }
440
440
  if (options.behaviors) {
441
441
  // wx://form-field
442
- if (options.behaviors.includes('tt://form-field')) {
442
+ if (options.behaviors.includes('__GLOBAL__://form-field')) {
443
443
  if (!options.properties || !options.properties.name) {
444
444
  properties.name = {
445
445
  type: null,
@@ -637,7 +637,7 @@ function initBehaviors(vueOptions) {
637
637
  const behaviors = [];
638
638
  if (isArray(vueBehaviors)) {
639
639
  vueBehaviors.forEach((behavior) => {
640
- behaviors.push(behavior.replace('uni://', 'tt://'));
640
+ behaviors.push(behavior.replace('uni://', '__GLOBAL__://'));
641
641
  if (behavior === 'uni://form-field') {
642
642
  if (isArray(vueProps)) {
643
643
  vueProps.push('name');
@@ -954,7 +954,7 @@ function initLifetimes$1({ mocks, isPage, initRelation, vueOptions, }) {
954
954
  }, {
955
955
  mpType,
956
956
  mpInstance,
957
- slots: properties.uS || {},
957
+ slots: properties.uS || {}, // vueSlots
958
958
  parentComponent: relationOptions.parent && relationOptions.parent.$,
959
959
  onBeforeSetup(instance, options) {
960
960
  initRefs(instance, mpInstance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-mp-toutiao",
3
- "version": "3.0.0-alpha-4000720240326001",
3
+ "version": "3.0.0-alpha-4010120240329001",
4
4
  "description": "uni-app mp-toutiao",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
27
27
  "dependencies": {
28
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-4000720240326001",
29
- "@dcloudio/uni-mp-compiler": "3.0.0-alpha-4000720240326001",
30
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-4000720240326001",
31
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-4000720240326001",
32
- "@dcloudio/uni-shared": "3.0.0-alpha-4000720240326001",
33
- "@vue/shared": "3.3.11",
34
- "@vue/compiler-core": "3.3.11"
28
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-4010120240329001",
29
+ "@dcloudio/uni-mp-compiler": "3.0.0-alpha-4010120240329001",
30
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-4010120240329001",
31
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-4010120240329001",
32
+ "@dcloudio/uni-shared": "3.0.0-alpha-4010120240329001",
33
+ "@vue/shared": "3.4.21",
34
+ "@vue/compiler-core": "3.4.21"
35
35
  }
36
36
  }