// npm 패키지
@antv/f2-my
F2 for alipay mini-program
버전
63
메인테이너
51
라이선스
MIT
최초 publish
2021-12-06
publisher
zengyue
tarball
18,444 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-10-28
// publisher 캠페인by zengyue
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @4.0.52· 2 files flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @4.0.52··AUTO-PUBLISHED·publisher: zengyueheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3894child-process-spawn
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· 2 files flaggedpatterns: 1
--- package/lib/index.js (excerpt) --- "use strict"; var _f = require("@antv/f2"); var _f2Context = require("@antv/f2-context"); function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function () {}; } return e; } var getPixelRatio = function getPixelRatio() { return my.getSystemInfoSync().pixelRatio; }; // 判断是否是新版 canvas 所支持的调用方法(AppX 2.7.0 及以上) var isAppX2CanvasEnv = function isAppX2CanvasEnv() { return my.canIUse('canvas.onReady') && my.canIUse('createSelectorQuery.return.node'); }; Component({ props: { onRender: function onRender(_props) {}, // width height 会作为元素兜底的宽高使用 width: null, height: null, type: '2d', onError: function onError(error) {} }, /** * 组件创建时触发 * 注意: * 使用该生命周期,项目配置需启用:"component2": true */ onInit: function onInit() { this.setCanvasId(); }, didMount: function didMount() { var _this = this; if (isAppX2CanvasEnv()) { return; } var id = this.data.id; var onError = this.props.onError; try { var query = my.createSelectorQuery({ page: this.$page }); query.select("#".concat(id)).boundingClientRect().exec(function (res) { // 获取画布实际宽高, 用props的宽高做失败兜底 var _ref = res && res[0] ? res[0] : _this.props, width = _ref.width, height = _ref.height; var pixelRatio = getPixelRatio(); // 高清解决方案 _this.setData({ width: width * pixelRatio, height: height * pixelRatio }, function --- package/es/index.js (excerpt) --- import { Canvas } from '@antv/f2'; import { my as F2Context } from '@antv/f2-context'; function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function () {}; } return e; } var getPixelRatio = function getPixelRatio() { return my.getSystemInfoSync().pixelRatio; }; // 判断是否是新版 canvas 所支持的调用方法(AppX 2.7.0 及以上) var isAppX2CanvasEnv = function isAppX2CanvasEnv() { return my.canIUse('canvas.onReady') && my.canIUse('createSelectorQuery.return.node'); }; Component({ props: { onRender: function onRender(_props) {}, // width height 会作为元素兜底的宽高使用 width: null, height: null, type: '2d', onError: function onError(error) {} }, /** * 组件创建时触发 * 注意: * 使用该生命周期,项目配置需启用:"component2": true */ onInit: function onInit() { this.setCanvasId(); }, didMount: function didMount() { var _this = this; if (isAppX2CanvasEnv()) { return; } var id = this.data.id; var onError = this.props.onError; try { var query = my.createSelectorQuery({ page: this.$page }); query.select("#".concat(id)).boundingClientRect().exec(function (res) { // 获取画布实际宽高, 用props的宽高做失败兜底 var _ref = res && res[0] ? res[0] : _this.props, width = _ref.width, height = _ref.height; var pixelRatio = getPixelRatio(); // 高清解决方案 _this.setData({ width: width * pixelRatio, height: height * pixelRatio }, function ()
