Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rax-image

Package Overview
Dependencies
Maintainers
9
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-image - npm Package Compare versions

Comparing version 1.1.3-beta.2 to 1.1.3-beta.3

10

lib/miniapp-wechat/index.js

@@ -9,3 +9,3 @@ "use strict";

data: {
styleSheet: ''
style: ''
},

@@ -17,3 +17,3 @@ properties: {

},
style: {
styleSheet: {
type: String,

@@ -61,3 +61,3 @@ value: ''

},
initImage: function () {
initImage: function initImage() {
var _ref = this.properties.source || {},

@@ -69,7 +69,7 @@ _ref$width = _ref.width,

var style = this.properties.style || '';
var style = this.properties.styleSheet || '';
if (width) style += 'width:' + width + 'rpx;';
if (height) style += 'height:' + height + 'rpx;';
this.setData({
styleSheet: style
style: style
});

@@ -76,0 +76,0 @@ }

@@ -7,2 +7,4 @@ "use strict";

var noop = function () {};
Component({

@@ -20,5 +22,5 @@ data: {

lazyLoad: false,
onClick: function onClick() {},
onLoad: function onLoad() {},
onError: function onError() {}
onClick: noop,
onLoad: noop,
onError: noop
},

@@ -28,3 +30,3 @@ onInit: function onInit() {

},
didMount: function () {
didMount: function didMount() {
if (!my.canIUse('component2')) {

@@ -35,15 +37,15 @@ this.initImage();

methods: {
onClick: function (e) {
onClick: function onClick(e) {
var event = (0, _fmtEvent.default)(this.props, e);
this.props.onClick(event);
},
onLoad: function (e) {
onLoad: function onLoad(e) {
var event = (0, _fmtEvent.default)(this.props, e);
this.props.onLoad(event);
},
onError: function (e) {
onError: function onError(e) {
var event = (0, _fmtEvent.default)(this.props, e);
this.props.onError(event);
},
initImage: function () {
initImage: function initImage() {
var _ref = this.props.source || {},

@@ -50,0 +52,0 @@ _ref$width = _ref.width,

{
"name": "rax-image",
"version": "1.1.3-beta.2",
"version": "1.1.3-beta.3",
"description": "Image component for Rax.",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -5,3 +5,3 @@ import fmtEvent from './fmtEvent';

data: {
styleSheet: ''
style: ''
},

@@ -13,3 +13,3 @@ properties: {

},
style: {
styleSheet: {
type: String,

@@ -45,17 +45,17 @@ value: ''

methods: {
onError: function(e) {
onError(e) {
const event = fmtEvent(this.properties, e);
this.triggerEvent('onError', event);
},
onLoad: function(e) {
onLoad(e) {
const event = fmtEvent(this.properties, e);
this.triggerEvent('onLoad', event);
},
onTap: function(e) {
onTap(e) {
const event = fmtEvent(this.properties, e);
this.triggerEvent('onClick', event);
},
initImage: function initImage(e) {
initImage() {
const { width = null, height = null } = this.properties.source || {};
let style = this.properties.style || '';
let style = this.properties.styleSheet || '';
if (width) style += 'width:' + width + 'rpx;';

@@ -65,3 +65,3 @@ if (height) style += 'height:' + height + 'rpx;';

this.setData({
styleSheet: style
style
});

@@ -68,0 +68,0 @@ }

import fmtEvent from './fmtEvent';
const noop = () => {};
Component({

@@ -15,5 +16,5 @@ data: {

lazyLoad: false,
onClick: e => {},
onLoad: e => {},
onError: e => {}
onClick: noop,
onLoad: noop,
onError: noop
},

@@ -23,3 +24,3 @@ onInit() {

},
didMount: function didMount() {
didMount() {
if (!my.canIUse('component2')) {

@@ -30,15 +31,15 @@ this.initImage();

methods: {
onClick: function onClick(e) {
onClick(e) {
const event = fmtEvent(this.props, e);
this.props.onClick(event);
},
onLoad: function onLoad(e) {
onLoad(e) {
const event = fmtEvent(this.props, e);
this.props.onLoad(event);
},
onError: function onError(e) {
onError(e) {
const event = fmtEvent(this.props, e);
this.props.onError(event);
},
initImage: function initImage(e) {
initImage() {
const { width = null, height = null } = this.props.source || {};

@@ -45,0 +46,0 @@ let style = this.props.style || '';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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