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

@smt-ui/component

Package Overview
Dependencies
Maintainers
10
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smt-ui/component - npm Package Compare versions

Comparing version 1.1.78 to 1.1.79

src/clfe-chart/atomic-index-demo.json

6

package.json
{
"name": "@smt-ui/component",
"version": "1.1.78",
"version": "1.1.79",
"description": "extension base",

@@ -21,3 +21,3 @@ "author": "jialipeng <jialipeng@baidu.com>",

"devtools": "sh ./test/index.sh",
"test:component": "mocha -t 180000 test/case/component/anchor-img/*.spec.js --exclude **/preview/* --reporter mochawesome",
"test:component": "mocha -t 180000 test/case/component/clfe-chart/*.spec.js --exclude **/preview/* --reporter mochawesome",
"test:utils": "mocha -t 180000 --require intelli-espower-loader --require @babel/register test/case/utils/* --reporter mochawesome"

@@ -49,3 +49,3 @@ },

},
"gitHead": "2a927d52c92fcef146e8477e8e49d10b092e4dc6"
"gitHead": "c021fd0d496d9f5069726274084b8fffd1583c54"
}
{
"name": "anchor-img",
"version": "1.0.0",
"description": "锚点图片",
"description": "标签图片",
"main": "./src/index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -5,3 +5,3 @@ #### 组件名称

#### 解释:
锚点图片
标签图片

@@ -11,13 +11,13 @@ #### 属性说明:

|---|---|---|---|---|
|url |String |是||锚点图片地址|
|url |String |是||标签图片地址|
|originWidth |Number |是|&#39;0&#39;|图片原始宽度|
|originHeight |Number |是|0|图片原始高度|
|list |Array |是||锚点数组(例:[{type: &#39;default&#39;,ordinate: 100,abscissa: 200, position: &#39;left&#39;,text: &#39;测试&#39;}])|
|mode |String |否|widthFix|锚点图片模式(目前只支持widthFix和aspectFit)|
|showAnchor |Boolean |否|true|是否默认展开锚点|
|list |Array |是||标签数组(例:[{type: &#39;default&#39;,ordinate: 100,abscissa: 200, position: &#39;left&#39;,text: &#39;测试&#39;}])|
|mode |String |否|widthFix|标签图片模式(目前只支持widthFix和aspectFit)|
|showAnchor |Boolean |否|true|是否默认展开标签|
|maxFontCount |Number |否|6|允许显示的标签最大字数,多余省略;position为空时用于计算左右方向|
|textColor |String |否|#fff|锚点文本颜色(目前只支持hex)|
|tagColor |Boolean |否|#333|锚点标签背景色|
|fontSize |Number |否|12|锚点字号大小|
|roundSize |Number |否|12|锚点圆直径,与锚点连线长度一致|
|textColor |String |否|#fff|标签文本颜色(目前只支持hex)|
|tagColor |Boolean |否|#333|标签背景色|
|fontSize |Number |否|12|标签字号大小|
|roundSize |Number |否|12|原点直径,与标签连线长度一致|
|needHandler |Boolean |否|12|是否需要控制器|

@@ -96,3 +96,3 @@ |handlerSize |Number |否|15|控制器图标宽&#x2F;高|

swan.showModal({
title: '当前点击锚点信息',
title: '当前点击标签信息',
content: JSON.stringify(state),

@@ -99,0 +99,0 @@ showCancel: false

/**
* @file 锚点组件js
* @file 标签组件js
* @author chaiyixin (chaiyixin@baidu.com)

@@ -12,3 +12,3 @@ */

properties: {
mode: { // 锚点图片模式
mode: { // 标签图片模式
type: String, // heightFix:按高宽比例,高度不变自适应; widthFix:按高宽比例,宽度不变自适应;

@@ -29,3 +29,3 @@ value: 'widthFix'

},
showAnchor: { // 是否默认展开锚点
showAnchor: { // 是否默认展开标签
type: Boolean,

@@ -38,15 +38,15 @@ value: true

},
textColor: { // 锚点文本颜色
textColor: { // 标签文本颜色
type: String,
value: '#fff'
},
tagColor: { // 锚点标签背景色
tagColor: { // 标签背景色
type: String,
value: 'rgba(0,0,0,.6)'
},
fontSize: { // 锚点字号大小
fontSize: { // 标签字号大小
type: Number,
value: 12
},
roundSize: { // 锚点圆直径,与锚点连线长度一致
roundSize: { // 原点直径,与标签连线长度一致
type: Number,

@@ -64,3 +64,3 @@ value: 10

},
list: { // 锚点数组
list: { // 标签数组
type: Array,

@@ -111,3 +111,3 @@ value: []

},
// 控制锚点显示与隐藏
// 控制标签显示与隐藏
changeVisable() {

@@ -118,3 +118,3 @@ this.setData({

},
// 点击某一锚点,state是当前锚点数据
// 点击某一标签,state是当前标签数据
activeAnchor(e) {

@@ -121,0 +121,0 @@ const state = e.currentTarget.dataset.anchor.state;

/**
* @file 锚点图片相关Ui及数据处理逻辑
* @file 标签图片相关Ui及数据处理逻辑
* @author chaiyixin

@@ -8,5 +8,5 @@ */

/**
* 锚点文本截断
* 标签文本截断
*
* @param {string} str 锚点文本
* @param {string} str 标签文本
* @param {number} fontCount 文本最大字数

@@ -20,8 +20,8 @@ * @return {string}

/**
* 获取锚点定位
* 获取标签定位
*
* @param {Object} anchor 锚点对象
* @param {ANCHOR_TYPE} anchor.type 锚点类型
* @param {string} anchor.type 锚点类型
* @param {number} anchor.ordinate 锚点类型
* @param {Object} anchor 标签对象
* @param {ANCHOR_TYPE} anchor.type 标签类型
* @param {string} anchor.type 标签类型
* @param {number} anchor.ordinate 标签类型
* @param {number} anchor.abscissa 原图宽

@@ -32,3 +32,3 @@ * @param {number} anchor.position 原图高

* @param {number} imgRadio 原图宽/实际展示宽
* @return {string} 锚点方向'left/right'
* @return {string} 标签方向'left/right'
*/

@@ -59,7 +59,7 @@ function getCalcPosition(anchor, {maxFontCount, fontSize, roundSize, originWidth}, imgRadio) {

/**
* 设置锚点样式
* 设置标签样式
*
* @param {Object} anchor 锚点对象
* @param {Object} anchor 标签对象
* @param {number} imgRadio 原图宽/实际展示宽
* @param {number} roundSize 锚点圆直径
* @param {number} roundSize 标签圆直径
* @return {Object}

@@ -77,3 +77,3 @@ */

/**
* 获取锚点背景图片实际大小
* 获取标签背景图片实际大小
*

@@ -115,5 +115,5 @@ * @param {number} radio 原图宽/实际展示宽

/**
* 获取真实的锚点列表
* 获取真实的标签列表
*
* @param {Array} list 锚点列表
* @param {Array} list 标签列表
* @param {Object} props 组件属性

@@ -120,0 +120,0 @@ * @param {number} imgRadio 原图宽/实际展示宽

@@ -103,3 +103,3 @@ /**

// 锚点样式风格
// 标签样式风格
export const ANCHOR_TYPE = {

@@ -110,3 +110,3 @@ PRIMARY: 'primary',

// 锚点图片模式
// 标签图片模式
export const IMG_MODE = {

@@ -113,0 +113,0 @@ WIDTH_FIX: 'widthFix',

@@ -1,1 +0,1 @@

{"name":"component","label":"布局组件","type":"component","configPath":"./smart-design-config.json","version":"1.1.77"}
{"name":"component","label":"布局组件","type":"component","configPath":"./smart-design-config.json","version":"1.1.78"}

Sorry, the diff of this file is too big to display

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