@opentiny/vue-action-sheet
Advanced tools
Comparing version 2.6.7 to 2.7.0
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
import ActionSheet from './src/index.vue'; | ||
import ActionSheet from './src/index'; | ||
export default ActionSheet; |
191
lib/index.js
@@ -1,62 +0,30 @@ | ||
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"; | ||
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) { | ||
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports; | ||
if (render) { | ||
options.render = render; | ||
options.staticRenderFns = staticRenderFns; | ||
options._compiled = true; | ||
} | ||
if (functionalTemplate) { | ||
options.functional = true; | ||
} | ||
if (scopeId) { | ||
options._scopeId = "data-v-" + scopeId; | ||
} | ||
var hook; | ||
if (moduleIdentifier) { | ||
hook = function hook2(context) { | ||
context = context || // cached call | ||
this.$vnode && this.$vnode.ssrContext || // stateful | ||
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") { | ||
context = __VUE_SSR_CONTEXT__; | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
if (injectStyles) { | ||
injectStyles.call(this, context); | ||
} | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; | ||
options._ssrRegister = hook; | ||
} else if (injectStyles) { | ||
hook = shadowMode ? function() { | ||
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot); | ||
} : injectStyles; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
options._injectStyles = hook; | ||
var originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} else { | ||
var existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return { | ||
exports: scriptExports, | ||
options | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
var __vue2_script = defineComponent({ | ||
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import MobileTemplate from "./mobile.js"; | ||
import MobileFirstTemplate from "./mobile-first.js"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) { | ||
return MobileTemplate; | ||
} | ||
if ("mobile-first" === (process.env.TINY_MODE || mode)) { | ||
return MobileFirstTemplate; | ||
} | ||
return MobileTemplate; | ||
}; | ||
var ActionSheet = defineComponent({ | ||
name: $prefix + "ActionSheet", | ||
props: { | ||
props: _extends({}, $props, { | ||
menus: { | ||
@@ -68,3 +36,3 @@ type: Array, | ||
}, | ||
modelValue: [Number, String], | ||
modelValue: [Number, String, Array], | ||
visible: { | ||
@@ -82,2 +50,33 @@ type: Boolean, | ||
}, | ||
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: { | ||
@@ -89,80 +88,16 @@ type: Boolean, | ||
type: Object, | ||
default: {} | ||
default: function _default2() { | ||
return {}; | ||
} | ||
} | ||
}, | ||
}), | ||
setup: function setup(props, context) { | ||
return _setup({ | ||
return $setup({ | ||
props, | ||
context, | ||
renderless, | ||
api, | ||
mono: true, | ||
extendOptions: { | ||
BScroll | ||
} | ||
template | ||
}); | ||
} | ||
}); | ||
var render = function render2() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c("div", { | ||
directives: [{ | ||
name: "show", | ||
rawName: "v-show", | ||
value: _vm.visible, | ||
expression: "visible" | ||
}], | ||
staticClass: "tiny-mobile-action-sheet", | ||
on: { | ||
"click": _vm.visibleHandle | ||
} | ||
}, [!_vm.contentPosition ? _c("div", { | ||
staticClass: "tiny-mobile-action-sheet__mask", | ||
style: _vm.state.sheetMaskStyle | ||
}) : _vm._e(), _c("div", { | ||
ref: "scrollMenu", | ||
class: ["tiny-mobile-action-sheet__content", _vm.state.toggle ? "is-toggle" : "", _vm.contentPosition ? "" : "is-not-content"], | ||
style: [_vm.state.sheetContentStyle] | ||
}, [_c("div", { | ||
class: ["tiny-mobile-action-sheet__menu", _vm.ellipsis ? "is-ellipsis" : ""] | ||
}, _vm._l(_vm.menus, function(item, index) { | ||
return _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" : ""], | ||
style: _vm.state.contentStyle, | ||
on: { | ||
"click": function click($event) { | ||
return _vm.menuHandle(item, index); | ||
} | ||
} | ||
}, [_vm._t("item", function() { | ||
return [_vm._v(" " + _vm._s(item.label) + " ")]; | ||
}, { | ||
"item": item | ||
})], 2); | ||
}), 0)]), _vm.contentPosition ? _c("div", { | ||
staticClass: "tiny-mobile-action-sheet__action" | ||
}, [_vm._t("action", function() { | ||
return [_c("div", { | ||
staticClass: "tiny-mobile-action-sheet__cancel", | ||
on: { | ||
"click": _vm.visibleHandle | ||
} | ||
}, [_vm._v(" " + _vm._s(_vm.t("ui.actionSheet.cancel")) + " ")])]; | ||
})], 2) : _vm._e()]); | ||
}; | ||
var staticRenderFns = []; | ||
var __cssModules = {}; | ||
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null); | ||
function __vue2_injectStyles(context) { | ||
for (var o in __cssModules) { | ||
this[o] = __cssModules[o]; | ||
} | ||
} | ||
var ActionSheet = /* @__PURE__ */ function() { | ||
return __component__.exports; | ||
}(); | ||
var version = "3.7.0"; | ||
var version = "2.7.0"; | ||
ActionSheet.model = { | ||
@@ -169,0 +104,0 @@ prop: "modelValue", |
{ | ||
"name": "@opentiny/vue-action-sheet", | ||
"version": "2.6.7", | ||
"version": "2.7.0", | ||
"description": "", | ||
"main": "./lib/index.js", | ||
"module": "./lib/index.js", | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@opentiny/vue-common": "~2.6.7", | ||
"@opentiny/vue-renderless": "~3.6.6", | ||
"@opentiny/vue-common": "~2.7.0", | ||
"@opentiny/vue-drawer": "~2.7.0", | ||
"@opentiny/vue-icon": "~2.7.0", | ||
"@opentiny/vue-renderless": "~3.9.0", | ||
"@better-scroll/core": "2.5.0" | ||
@@ -10,0 +14,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20504
9
622
5
3
1
+ Added@opentiny/vue-drawer@~2.7.0
+ Added@opentiny/vue-icon@~2.7.0
+ Added@opentiny/vue-button@2.7.0(transitive)
+ Added@opentiny/vue-common@2.7.0(transitive)
+ Added@opentiny/vue-drawer@2.7.0(transitive)
+ Added@opentiny/vue-icon@2.7.1(transitive)
+ Added@opentiny/vue-locale@2.7.0(transitive)
+ Added@opentiny/vue-renderless@3.9.3(transitive)
+ Added@opentiny/vue-theme@3.9.4(transitive)
+ Added@opentiny/vue-theme-mobile@3.9.0(transitive)
+ Addedtailwind-merge@1.14.0(transitive)
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/parser@7.26.2(transitive)
- Removed@babel/types@7.26.0(transitive)
- Removed@opentiny/vue-common@2.6.7(transitive)
- Removed@opentiny/vue-locale@2.6.7(transitive)
- Removed@opentiny/vue-renderless@3.6.8(transitive)
- Removed@opentiny/vue-theme@3.6.7(transitive)
- Removed@opentiny/vue-theme-mobile@3.6.6(transitive)
- Removed@vue/compiler-sfc@2.7.16(transitive)
- Removed@vue/composition-api@1.2.4(transitive)
- Removedcsstype@3.1.3(transitive)
- Removednanoid@3.3.7(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpostcss@8.4.47(transitive)
- Removedprettier@2.8.8(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-js@1.2.1(transitive)
- Removedtslib@2.8.1(transitive)
- Removedvue@2.7.16(transitive)
Updated@opentiny/vue-common@~2.7.0