Socket
Socket
Sign inDemoInstall

@opentiny/vue-action-sheet

Package Overview
Dependencies
Maintainers
1
Versions
59
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 2.13.0 to 2.14.0

150

lib/index.js

@@ -15,3 +15,3 @@ function _extends() {

}
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
import { defineComponent, $prefix, $setup, $props } from "@opentiny/vue-common";
import MobileTemplate from "./mobile.js";

@@ -30,66 +30,88 @@ import MobileFirstTemplate from "./mobile-first.js";

};
var actionSheetProps = _extends({}, $props, {
menus: {
type: Array,
default: function _default() {
return [];
}
},
modelValue: [Number, String, Array],
beforeClose: Function,
visible: {
type: Boolean,
default: false
},
ellipsis: {
type: Boolean,
default: false
},
height: {
type: String,
default: "100%"
},
valueField: {
type: String,
default: "id"
},
textField: {
type: String,
default: "label"
},
title: String,
showHeader: {
type: Boolean,
default: true
},
showFooter: {
type: Boolean,
default: false
},
showClose: {
type: Boolean,
default: function _default2() {
return true;
}
},
fullscreen: {
type: Boolean,
default: function _default3() {
return false;
}
},
customClass: [String, Object, Array],
contentClass: String,
type: {
type: String,
default: "normal"
},
mask: {
type: Boolean,
default: true
},
maskClosable: {
type: Boolean,
default: true
},
lockScroll: {
type: Boolean,
default: true
},
flex: {
type: Boolean,
default: true
},
contentPosition: {
type: Boolean,
default: false
},
contentStyle: {
type: Object,
default: function _default4() {
return {};
}
}
});
var ActionSheet = defineComponent({
name: $prefix + "ActionSheet",
props: _extends({}, $props, {
menus: {
type: Array,
default: function _default() {
return [];
}
},
modelValue: [Number, String, Array],
visible: {
type: Boolean,
default: false
},
ellipsis: {
type: Boolean,
default: false
},
height: {
type: String,
default: "100%"
},
valueField: {
type: String,
default: "id"
},
textField: {
type: String,
default: "label"
},
title: String,
showHeader: {
type: Boolean,
default: true
},
showFooter: {
type: Boolean,
default: false
},
customClass: [String, Object, Array],
contentClass: String,
type: {
type: String,
default: "normal"
},
mask: {
type: Boolean,
default: true
},
maskClosable: {
type: Boolean,
default: true
},
contentPosition: {
type: Boolean,
default: false
},
contentStyle: {
type: Object,
default: function _default2() {
return {};
}
}
}),
props: actionSheetProps,
setup: function setup(props, context) {

@@ -103,3 +125,3 @@ return $setup({

});
var version = "2.13.0";
var version = "2.14.0";
ActionSheet.model = {

@@ -106,0 +128,0 @@ prop: "modelValue",

@@ -67,3 +67,4 @@ import { renderless, api } from "@opentiny/vue-renderless/action-sheet/vue";

},
props: [].concat(props, ["modelValue", "visible", "title", "showHeader", "showFooter", "customClass", "menus", "type", "mask", "maskClosable"]),
emits: ["update:modelValue", "update:visible", "hide", "close", "click"],
props: [].concat(props, ["modelValue", "visible", "title", "showHeader", "showFooter", "showClose", "fullscreen", "customClass", "menus", "type", "mask", "maskClosable", "lockScroll", "flex", "beforeClose"]),
setup: function setup(props2, context) {

@@ -95,7 +96,14 @@ return _setup({

"mask": _vm.mask,
"flex": "",
"before-close": _vm.beforeClose,
"mask-closable": _vm.maskClosable,
"lock-scroll": _vm.lockScroll,
"show-header": false,
"custom-class": _vm.m("max-h-[95%] rounded-t-lg", {
"min-h-[15.625rem]": _vm.type !== "action"
"custom-class": _vm.m("rounded-t-lg", {
"h-full": _vm.fullscreen
}, {
"max-h-[90%]": !_vm.fullscreen
}, {
"min-h-[theme(spacing.64)]": _vm.type !== "action"
}, {
"py-4": _vm.showHeader && _vm.type !== "action"

@@ -113,3 +121,3 @@ }, _vm.customClass),

ref: "header",
staticClass: "flex leading-6 pb-4 px-4 text-base items-center",
staticClass: "flex flex-none leading-6 pb-4 px-4 text-base items-center",
attrs: {

@@ -121,7 +129,7 @@ "data-tag": "action-sheet-header"

}, [_vm._t("header-left")], 2), _c("div", {
staticClass: "min-w-[50%] max-w-[80%] px-4 text-center truncate"
staticClass: "min-w-[50%] max-w-[80%] px-4 text-center truncate font-bold"
}, [_vm._v(_vm._s(_vm.title))]), _c("div", {
staticClass: "flex-1 flex items-center justify-end"
}, [_vm._t("header-right", function() {
return [_c("IconClose", {
return [_vm.showClose ? _c("icon-close", {
attrs: {

@@ -133,6 +141,8 @@ "custom-class": "h-5 w-5 cursor-pointer"

}
})];
})], 2)]) : _vm._e(), _c("div", {
}) : _vm._e()];
})], 2)]) : _vm._e(), _vm._t("body-top"), _c("div", {
ref: "body",
staticClass: "flex-auto overflow-auto",
class: ["flex-auto overflow-auto scrollbar-size-0", {
"flex flex-col": _vm.flex
}],
attrs: {

@@ -154,7 +164,7 @@ "data-tag": "action-sheet-body"

}, [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _c("div", {
staticClass: "flex-auto min-h-[3.5rem]"
staticClass: "flex-auto min-h-[theme(spacing.12)]"
}, _vm._l(_vm.menus, function(item, index) {
return _c("div", {
key: index,
staticClass: "flex-none flex items-center justify-center h-14 text-base border-b-0.5 border-color-bg-2 cursor-pointer",
staticClass: "flex-none flex items-center justify-center h-12 text-base border-b-0.5 border-color-bg-2 cursor-pointer",
on: {

@@ -182,5 +192,5 @@ "click": function click($event) {

}
}, [_vm._v(" " + _vm._s(_vm.t("ui.base.cancel")) + " ")])])] : [_vm._t("default")]], 2), _vm.showFooter ? _c("div", {
}, [_vm._v(" " + _vm._s(_vm.t("ui.base.cancel")) + " ")])])] : [_vm._t("default")]], 2), _vm._t("body-bottom"), _vm.showFooter ? _c("div", {
ref: "footer",
staticClass: "flex px-3 pt-2 justify-center",
staticClass: "flex flex-none pt-2 justify-center",
attrs: {

@@ -191,3 +201,3 @@ "data-tag": "action-sheet-footer"

return [_c("tiny-button", {
staticClass: "flex-1",
staticClass: "flex-1 mx-4 sm:mx-0",
attrs: {

@@ -201,3 +211,5 @@ "tiny_mode": "mobile-first",

}, [_vm._v(_vm._s(_vm.t("ui.button.confirm")))])];
})], 2) : _vm._e()])], 1);
}, {
"beforeClose": _vm.beforeClose
})], 2) : _vm._e()], 2)], 1);
};

@@ -204,0 +216,0 @@ var staticRenderFns = [];

@@ -61,3 +61,3 @@ import { renderless, api } from "@opentiny/vue-renderless/action-sheet/vue";

name: $prefix + "ActionSheet",
props: [].concat(props, ["menus", "modelValue", "visible", "ellipsis", "height", "contentPosition", "contentStyle"]),
props: [].concat(props, ["menus", "modelValue", "visible", "ellipsis", "contentPosition", "contentStyle", "height", "valueField", "textField", "contentClass"]),
setup: function setup(props2, context) {

@@ -88,3 +88,3 @@ return _setup({

on: {
"click": _vm.visibleHandle
"click": _vm.hide
}

@@ -103,11 +103,11 @@ }, [!_vm.contentPosition ? _c("div", {

key: index,
class: ["tiny-mobile-action-sheet__item", item.warn ? "is-warn" : "", item.id === _vm.modelValue || item.id === _vm.state.active ? "is-active" : ""],
class: ["tiny-mobile-action-sheet__item", item.warn ? "is-warn" : "", item[_vm.valueField] === _vm.modelValue ? "is-active" : ""],
style: _vm.state.contentStyle,
on: {
"click": function click($event) {
return _vm.menuHandle(item, index);
return _vm.selectOption(item, index);
}
}
}, [_vm._t("item", function() {
return [_vm._v(" " + _vm._s(item.label) + " ")];
return [_vm._v(" " + _vm._s(item[_vm.textField]) + " ")];
}, {

@@ -122,3 +122,3 @@ "item": item

on: {
"click": _vm.visibleHandle
"click": _vm.hide
}

@@ -125,0 +125,0 @@ }, [_vm._v(" " + _vm._s(_vm.t("ui.actionSheet.cancel")) + " ")])];

{
"name": "@opentiny/vue-action-sheet",
"version": "2.13.0",
"version": "2.14.0",
"description": "",

@@ -10,7 +10,9 @@ "main": "./lib/index.js",

"dependencies": {
"@opentiny/vue-common": "~2.13.0",
"@opentiny/vue-drawer": "~2.13.0",
"@opentiny/vue-icon": "~2.13.0",
"@opentiny/vue-renderless": "~3.13.0",
"@better-scroll/core": "2.5.0"
"@opentiny/vue-common": "~2.14.0",
"@opentiny/vue-drawer": "~2.14.0",
"@opentiny/vue-icon": "~2.14.0",
"@opentiny/vue-renderless": "~3.14.0",
"@better-scroll/core": "2.5.0",
"@opentiny/vue-button": "~2.14.0",
"@opentiny/vue-theme-mobile": "~3.14.0"
},

@@ -17,0 +19,0 @@ "license": "MIT",

@@ -0,2 +1,83 @@

export declare const actionSheetProps: {
menus: {
type: ArrayConstructor;
default: () => never[];
};
modelValue: (ArrayConstructor | StringConstructor | NumberConstructor)[];
beforeClose: FunctionConstructor;
visible: {
type: BooleanConstructor;
default: boolean;
};
ellipsis: {
type: BooleanConstructor;
default: boolean;
};
height: {
type: StringConstructor;
default: string;
};
valueField: {
type: StringConstructor;
default: string;
};
textField: {
type: StringConstructor;
default: string;
};
title: StringConstructor;
showHeader: {
type: BooleanConstructor;
default: boolean;
};
showFooter: {
type: BooleanConstructor;
default: boolean;
};
showClose: {
type: BooleanConstructor;
default: () => boolean;
};
fullscreen: {
type: BooleanConstructor;
default: () => boolean;
};
customClass: (ArrayConstructor | ObjectConstructor | StringConstructor)[];
contentClass: StringConstructor;
type: {
type: StringConstructor;
default: string;
};
mask: {
type: BooleanConstructor;
default: boolean;
};
maskClosable: {
type: BooleanConstructor;
default: boolean;
};
lockScroll: {
type: BooleanConstructor;
default: boolean;
};
flex: {
type: BooleanConstructor;
default: boolean;
};
contentPosition: {
type: BooleanConstructor;
default: boolean;
};
contentStyle: {
type: ObjectConstructor;
default: () => {};
};
tiny_mode: StringConstructor;
tiny_mode_root: BooleanConstructor;
tiny_template: (ObjectConstructor | FunctionConstructor)[];
tiny_renderless: FunctionConstructor;
tiny_theme: StringConstructor;
tiny_chart_theme: ObjectConstructor;
};
declare const _default: any;
export default _default;
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