New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zan-choose-dialog

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zan-choose-dialog - npm Package Compare versions

Comparing version 4.1.5-beta3.0 to 4.1.5

28

lib/ChooseMenu.js

@@ -8,2 +8,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -112,3 +114,3 @@

link: '外链',
weappFeature: '小程序微页面'
weappfeature: '小程序微页面'
};

@@ -131,3 +133,3 @@

var ITEM_LINK_TYPE = ['feature', 'category', 'goods', 'tag', 'guaguale', 'wheel', 'zodiac', 'crazyguess', 'survey', 'paidcolumn', 'paidcontent'];
var ITEM_LINK_TYPE = ['feature', 'category', 'goods', 'tag', 'guaguale', 'wheel', 'zodiac', 'crazyguess', 'survey', 'paidcolumn', 'paidcontent', 'weappfeature'];
var STATIC_LINK_TYPE = ['history', 'homepage', 'usercenter', 'mypaidcontent'];

@@ -178,2 +180,11 @@ var CUSTOM_LINK_TYPE = ['link'];

// 获取小程序微页面的url,需要保存但不可点击
// 小程序微页面 type: weappfeature
function getLinkUrl(type, value) {
if (type === 'weappfeature') {
return 'pages/home/feature/index?id=' + value.id;
}
return value.url;
}
function normalizeLinkValue(type, value, config) {

@@ -186,3 +197,3 @@ return new Promise(function (resolve, reject) {

link_title: value.title || '',
link_url: value.url || '',
link_url: getLinkUrl(type, value) || '',
alias: value.alias || ''

@@ -305,3 +316,3 @@ });

multiple: false,
typeMap: 'feature'
typeMap: 'weappfeature'
})

@@ -373,7 +384,14 @@ };

var items = this.state.items;
var type = value.link_type;
var presentValue = _extends({}, value);
// 去掉小程序微页面的link_url,需要上传但不可点击
if (type === 'weappfeature') {
presentValue.link_url = '';
}
return _react2['default'].createElement(_zanChooseLinkMenu2['default'], {
menuHideDelay: 250,
value: value,
value: presentValue,
menuItems: items,

@@ -380,0 +398,0 @@ trigger: trigger,

2

package.json
{
"name": "zan-choose-dialog",
"version": "4.1.5-beta3.0",
"version": "4.1.5",
"description": "这是一个React组件",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -189,3 +189,4 @@ ## zan-choose-dialog

MyPaidContent: '我购买的专栏、内容',
Link: '自定义链接'
Link: '自定义链接',
WeappFeature: '小程序微页面'
}

@@ -192,0 +193,0 @@ ```

@@ -40,3 +40,3 @@ /* eslint-disable no-underscore-dangle */

link: '外链',
weappFeature: '小程序微页面'
weappfeature: '小程序微页面'
};

@@ -70,3 +70,4 @@

'paidcolumn',
'paidcontent'
'paidcontent',
'weappfeature'
];

@@ -122,2 +123,11 @@ const STATIC_LINK_TYPE = ['history', 'homepage', 'usercenter', 'mypaidcontent'];

// 获取小程序微页面的url,需要保存但不可点击
// 小程序微页面 type: weappfeature
function getLinkUrl(type, value) {
if (type === 'weappfeature') {
return `pages/home/feature/index?id=${value.id}`;
}
return value.url;
}
function normalizeLinkValue(type, value, config) {

@@ -130,3 +140,3 @@ return new Promise((resolve, reject) => {

link_title: value.title || '',
link_url: value.url || '',
link_url: getLinkUrl(type, value) || '',
alias: value.alias || ''

@@ -249,3 +259,3 @@ });

multiple: false,
typeMap: 'feature'
typeMap: 'weappfeature'
})

@@ -309,7 +319,14 @@ };

const { items } = this.state;
const { link_type: type } = value;
let presentValue = { ...value };
// 去掉小程序微页面的link_url,需要上传但不可点击
if (type === 'weappfeature') {
presentValue.link_url = '';
}
return (
<ChooseLinkMenu
menuHideDelay={250}
value={value}
value={presentValue}
menuItems={items}

@@ -316,0 +333,0 @@ trigger={trigger}

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc