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

@opentiny/vue-action-sheet

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-action-sheet - npm Package Compare versions

Comparing version 3.6.0 to 3.6.1-alpha.0

LICENSE

0

index.d.ts

@@ -0,0 +0,0 @@ /**

207

lib/index.js

@@ -1,9 +0,53 @@

import { renderless, api } from '@opentiny/vue-renderless/action-sheet/vue';
import { $prefix, setup } from '@opentiny/vue-common';
import '@opentiny/vue-theme-mobile/action-sheet/index.css';
import BScroll from '@better-scroll/core';
import { withDirectives, openBlock, createElementBlock, normalizeStyle, createCommentVNode, createElementVNode, normalizeClass, Fragment, renderList, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';
import { renderless, api } from "@opentiny/vue-renderless/action-sheet/vue";
import { defineComponent, $prefix, setup as _setup } from "@opentiny/vue-common";
import "@opentiny/vue-theme-mobile/action-sheet/index.css";
import BScroll from "@better-scroll/core";
import { withDirectives, openBlock, createElementBlock, normalizeStyle, createCommentVNode, createElementVNode, normalizeClass, Fragment, renderList, renderSlot, createTextVNode, toDisplayString, vShow } from "vue";
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it)
return (it = it.call(o)).next.bind(it);
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it)
o = it;
var i = 0;
return function() {
if (i >= o.length)
return { done: true };
return { done: false, value: o[i++] };
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _unsupportedIterableToArray(o, minLen) {
if (!o)
return;
if (typeof o === "string")
return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor)
n = o.constructor.name;
if (n === "Map" || n === "Set")
return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length)
len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++)
arr2[i] = arr[i];
return arr2;
}
var _export_sfc = function _export_sfc2(sfc, props) {
var target = sfc.__vccOpts || sfc;
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
target[key] = val;
}
return target;
};
var script = {
name: $prefix + 'ActionSheet',
var _sfc_main = /* @__PURE__ */ defineComponent({
name: $prefix + "ActionSheet",
props: {

@@ -27,3 +71,3 @@ menus: {

type: String,
default: '200px'
default: "200px"
},

@@ -35,16 +79,15 @@ contentPosition: {

},
setup: function setup$1(props, context) {
return setup({
props: props,
context: context,
renderless: renderless,
api: api,
setup: function setup(props, context) {
return _setup({
props,
context,
renderless,
api,
mono: true,
extendOptions: {
BScroll: BScroll
BScroll
}
});
}
};
});
var _hoisted_1 = ["onClick"];

@@ -55,51 +98,91 @@ var _hoisted_2 = {

};
function render(_ctx, _cache, $props, $setup, $data, $options) {
return withDirectives((openBlock(), createElementBlock("div", {
class: "tiny-mobile-action-sheet",
onClick: _cache[1] || (_cache[1] = function () {
return _ctx.visibleHandle && _ctx.visibleHandle.apply(_ctx, arguments);
})
}, [!$props.contentPosition ? (openBlock(), createElementBlock("div", {
key: 0,
class: "tiny-mobile-action-sheet__mask",
style: normalizeStyle(_ctx.state.sheetMaskStyle)
}, null, 4)) : createCommentVNode("", true), createElementVNode("div", {
class: normalizeClass(['tiny-mobile-action-sheet__content', _ctx.state.toggle ? 'is-toggle' : '', $props.contentPosition ? '' : 'is-not-content']),
style: normalizeStyle([_ctx.state.sheetContentStyle]),
ref: "scrollMenu"
}, [createElementVNode("div", {
class: normalizeClass(['tiny-mobile-action-sheet__menu', $props.ellipsis ? 'is-ellipsis' : ''])
}, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.menus, function (item, index) {
return openBlock(), createElementBlock("div", {
class: normalizeClass(['tiny-mobile-action-sheet__item', item.warn ? 'is-warn' : '', item.id === $props.modelValue || item.id === _ctx.state.active ? 'is-active' : '']),
key: index,
onClick: function onClick($event) {
return _ctx.menuHandle(item, index);
}
}, [renderSlot(_ctx.$slots, "item", {
item: item
}, function () {
return [createTextVNode(toDisplayString(item.label), 1)];
})], 10, _hoisted_1);
}), 128))], 2)], 6), $props.contentPosition ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "action", {}, function () {
return [createElementVNode("div", {
class: "tiny-mobile-action-sheet__cancel",
onClick: _cache[0] || (_cache[0] = function () {
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return withDirectives((openBlock(), createElementBlock(
"div",
{
class: "tiny-mobile-action-sheet",
onClick: _cache[1] || (_cache[1] = function() {
return _ctx.visibleHandle && _ctx.visibleHandle.apply(_ctx, arguments);
})
}, toDisplayString(_ctx.t('ui.actionSheet.cancel')), 1)];
})])) : createCommentVNode("", true)], 512)), [[vShow, $props.visible]]);
},
[!_ctx.contentPosition ? (openBlock(), createElementBlock(
"div",
{
key: 0,
class: "tiny-mobile-action-sheet__mask",
style: normalizeStyle(_ctx.state.sheetMaskStyle)
},
null,
4
/* STYLE */
)) : createCommentVNode("v-if", true), createElementVNode(
"div",
{
class: normalizeClass(["tiny-mobile-action-sheet__content", _ctx.state.toggle ? "is-toggle" : "", _ctx.contentPosition ? "" : "is-not-content"]),
style: normalizeStyle([_ctx.state.sheetContentStyle]),
ref: "scrollMenu"
},
[createElementVNode(
"div",
{
class: normalizeClass(["tiny-mobile-action-sheet__menu", _ctx.ellipsis ? "is-ellipsis" : ""])
},
[(openBlock(true), createElementBlock(
Fragment,
null,
renderList(_ctx.menus, function(item, index) {
return openBlock(), createElementBlock("div", {
class: normalizeClass(["tiny-mobile-action-sheet__item", item.warn ? "is-warn" : "", item.id === _ctx.modelValue || item.id === _ctx.state.active ? "is-active" : ""]),
key: index,
onClick: function onClick($event) {
return _ctx.menuHandle(item, index);
}
}, [renderSlot(_ctx.$slots, "item", {
item
}, function() {
return [createTextVNode(
toDisplayString(item.label),
1
/* TEXT */
)];
})], 10, _hoisted_1);
}),
128
/* KEYED_FRAGMENT */
))],
2
/* CLASS */
)],
6
/* CLASS, STYLE */
), _ctx.contentPosition ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "action", {}, function() {
return [createElementVNode(
"div",
{
class: "tiny-mobile-action-sheet__cancel",
onClick: _cache[0] || (_cache[0] = function() {
return _ctx.visibleHandle && _ctx.visibleHandle.apply(_ctx, arguments);
})
},
toDisplayString(_ctx.t("ui.actionSheet.cancel")),
1
/* TEXT */
)];
})])) : createCommentVNode("v-if", true)],
512
/* NEED_PATCH */
)), [[vShow, _ctx.visible]]);
}
script.render = render;
script.model = {
prop: 'modelValue',
event: 'update:modelValue'
var ActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
var version = "3.7.0";
ActionSheet.model = {
prop: "modelValue",
event: "update:modelValue"
};
script.install = function (Vue) {
Vue.component(script.name, script);
ActionSheet.install = function(Vue) {
Vue.component(ActionSheet.name, ActionSheet);
};
script.version = '3.6.0';
export { script as default };
ActionSheet.version = version;
export {
ActionSheet as default
};
{
"name": "@opentiny/vue-action-sheet",
"version": "3.6.0",
"version": "3.6.1-alpha.0",
"description": "",
"main": "lib/index.js",
"scripts": {
"lint": "eslint src/**/*{.js,.html,.vue} --quiet",
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js",
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js"
},
"main": "./lib/index.js",
"dependencies": {
"@opentiny/vue-common": "~3.6.0",
"@opentiny/vue-renderless": "~3.6.0",
"@better-scroll/core": "2.5.0",
"@opentiny/vue-icon": "~3.6.0",
"@opentiny/vue-theme": "~3.6.0",
"@opentiny/vue-theme-mobile": "~3.6.0"
"@opentiny/vue-common": "~3.6.1-alpha.0",
"@opentiny/vue-renderless": "~3.6.1-alpha.0",
"@better-scroll/core": "2.5.0"
},
"license": "MIT",
"types": "index.d.ts",
"sideEffects": false
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
}
}

@@ -1,3 +0,2 @@

import '@opentiny/vue-theme-mobile/action-sheet/index.css';
declare const _default: import("vue").DefineComponent<{
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<{
menus: {

@@ -16,4 +15,12 @@ type: ArrayConstructor;

};
height: {
type: StringConstructor;
default: string;
};
contentPosition: {
type: BooleanConstructor;
default: boolean;
};
}, {
t: any;
t: (this: any, path: any, options?: any) => any;
vm: any;

@@ -24,3 +31,3 @@ f: (props: any, attrs?: {}) => {};

dp: (props: any) => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
menus: {

@@ -39,2 +46,10 @@ type: ArrayConstructor;

};
height: {
type: StringConstructor;
default: string;
};
contentPosition: {
type: BooleanConstructor;
default: boolean;
};
}>>, {

@@ -44,3 +59,5 @@ menus: unknown[];

ellipsis: boolean;
height: string;
contentPosition: boolean;
}>;
export default _default;
export default _sfc_main;
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