Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@her-activity-components/el-any

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@her-activity-components/el-any - npm Package Compare versions

Comparing version
0.1.13
to
0.2.0
+2
-2
dist/consumer.js

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

var _her_activity_components_el_any_0_1_13 = (function (exports) {
var _her_activity_components_el_any_0_2_0 = (function (exports) {
'use strict';

@@ -71,3 +71,3 @@

if ($Vue) {
$Vue.component("@her-activity-components/el-any@0.1.13", component);
$Vue.component("@her-activity-components/el-any@0.2.0", component);
}

@@ -74,0 +74,0 @@

@@ -1,1 +0,1 @@

var _her_activity_components_el_any_0_1_13=function(n){"use strict";var e,t=0,i=[],r={style:{height:"40px",lineHeight:"40px",textAlign:"center"}},s={props:{name:String,data:Object},data:function(){return{ready:2===t}},mounted:function(){var n,e=this;!this.ready&&(n=function(){return e.ready=!0},2===t?n():1===t?i.push(n):(t=1,i.push(n),$script(["https://cdn.jsdelivr.net/npm/fg-loadcss@2.0.1/dist/loadCSS.min.js","https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/index.js"],function(){loadCSS("https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/theme-chalk/index.css"),t=2,i.forEach(function(n){return n()}),i=[]})))},render:function(n){if(!this.ready)return n("div",r,[n("i",{class:"el-icon-loading"})]);var t=this.$slots,e=Object.keys(t).reduce(function(n,e){return n.concat(t[e])},[]);return n(this.name,Object.assign({},this.data),e)}};return"undefined"!=typeof window?e=window.Vue:"undefined"!=typeof global&&(e=global.Vue),e&&e.component("@her-activity-components/el-any@0.1.13",s),n.$=s,n}({});
var _her_activity_components_el_any_0_2_0=function(n){"use strict";var e,t=0,i=[],r={style:{height:"40px",lineHeight:"40px",textAlign:"center"}},s={props:{name:String,data:Object},data:function(){return{ready:2===t}},mounted:function(){var n,e=this;!this.ready&&(n=function(){return e.ready=!0},2===t?n():1===t?i.push(n):(t=1,i.push(n),$script(["https://cdn.jsdelivr.net/npm/fg-loadcss@2.0.1/dist/loadCSS.min.js","https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/index.js"],function(){loadCSS("https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/theme-chalk/index.css"),t=2,i.forEach(function(n){return n()}),i=[]})))},render:function(n){if(!this.ready)return n("div",r,[n("i",{class:"el-icon-loading"})]);var t=this.$slots,e=Object.keys(t).reduce(function(n,e){return n.concat(t[e])},[]);return n(this.name,Object.assign({},this.data),e)}};return"undefined"!=typeof window?e=window.Vue:"undefined"!=typeof global&&(e=global.Vue),e&&e.component("@her-activity-components/el-any@0.2.0",s),n.$=s,n}({});

@@ -1,75 +0,86 @@

var _her_activity_components_el_any_0_1_13 = (function (exports) {
var _her_activity_components_el_any_0_2_0 = (function (exports) {
'use strict';
function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
function createProvider (options) {
var keys = Object.keys(options);
var props = {};
var rules = {};
var watch = {};
keys.forEach(function (key) {
var ref = options[key];
var rule = ref.rule;
var rest = objectWithoutProperties( ref, ["rule"] );
var prop = rest;
props[key] = prop;
rules[key] = rule;
watch[key] = function (value) {
this.model[key] = value;
};
});
return {
props: props,
data: function data() {
var this$1 = this;
var model = {};
keys.forEach(function (key) {
model[key] = this$1[key];
});
return {
model: model,
rules: rules,
}
},
watch: watch,
methods: {
onSubmit: function onSubmit() {
var this$1 = this;
this.$refs.form.validate(function (valid) {
if (!valid) {
return false
}
this$1.$emit('save', { props: this$1.model });
});
},
onCancel: function onCancel() {
this.$refs.form.resetFields();
},
}
}
}
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var ElementUI = window.ELEMENT;
var components = Object.keys(ElementUI).reduce(function (arr, key) {
var model = ElementUI[key];
if (model.name && key !== 'install') {
arr.push({
label: key,
name: model.name,
});
}
return arr
}, []);
var components = Object.keys(ElementUI)
.filter(function (key) { return key !== 'install' && ElementUI[key].name; })
.map(function (key) { return ({ label: key, name: ElementUI[key].name }); });
var script = {
props: {
name: String,
data: Object,
},
data: function data() {
return {
model: {
name: this.name,
data: this.data,
mixins: [
createProvider({
name: {
type: String,
rule: [
{ required: true, message: '请选择组件' } ],
},
rules: {
name: [
{ required: true, message: '请选择组件' } ],
data: [
data: {
type: Object,
rule: [
{ type: 'object', message: '请检查配置格式', trigger: 'blur' } ],
},
})
],
data: function data() {
return {
components: components,
}
},
methods: {
onSubmit: function onSubmit() {
var this$1 = this;
this.$refs.form.validate(function (valid) {
if (!valid) {
return false
}
this$1.$emit('save', { props: this$1.model });
});
},
onCancel: function onCancel() {
this.$refs.form.resetFields();
},
}
};

@@ -212,3 +223,3 @@

if ($Vue) {
$Vue.component("@her-activity-components/el-any@0.1.13", component);
$Vue.component("@her-activity-components/el-any@0.2.0", component);
}

@@ -215,0 +226,0 @@

@@ -1,1 +0,1 @@

var _her_activity_components_el_any_0_1_13=function(e){"use strict";var a=window.ELEMENT,t=Object.keys(a).reduce(function(e,t){var n=a[t];return n.name&&"install"!==t&&e.push({label:t,name:n.name}),e},[]),n={props:{name:String,data:Object},data:function(){return{model:{name:this.name,data:this.data},rules:{name:[{required:!0,message:"\u8bf7\u9009\u62e9\u7ec4\u4ef6"}],data:[{type:"object",message:"\u8bf7\u68c0\u67e5\u914d\u7f6e\u683c\u5f0f",trigger:"blur"}]},components:t}},methods:{onSubmit:function(){var t=this;this.$refs.form.validate(function(e){if(!e)return!1;t.$emit("save",{props:t.model})})},onCancel:function(){this.$refs.form.resetFields()}}};var o,r,l,i,s,m,d=(l=void 0,i=!(o={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-form",{ref:"form",attrs:{model:t.model,rules:t.rules,"label-width":"120px"}},[n("el-form-item",{attrs:{label:"Element \u7ec4\u4ef6\u540d",prop:"name"}},[n("el-select",{attrs:{filterable:"",placeholder:"\u8bf7\u9009\u62e9"},model:{value:t.model.name,callback:function(e){t.$set(t.model,"name",e)},expression:"model.name"}},t._l(t.components,function(e){return n("el-option",{key:e.name,attrs:{label:e.label,value:e.name}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"\u7ec4\u4ef6\u914d\u7f6e",prop:"data"}},[n("json-input",{model:{value:t.model.data,callback:function(e){t.$set(t.model,"data",e)},expression:"model.data"}})],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("\u4fdd\u5b58")]),t._v(" "),n("el-button",{on:{click:t.onCancel}},[t._v("\u53d6\u6d88")])],1)],1)},staticRenderFns:[]}),(s=("function"==typeof(r=n)?r.options:r)||{}).__file="provider.vue",s.render||(s.render=o.render,s.staticRenderFns=o.staticRenderFns,s._compiled=!0,i&&(s.functional=!0)),s._scopeId=l,s);return"undefined"!=typeof window?m=window.Vue:"undefined"!=typeof global&&(m=global.Vue),m&&m.component("@her-activity-components/el-any@0.1.13",d),e.$=d,e}({});
var _her_activity_components_el_any_0_2_0=function(e){"use strict";var o,r,a,l,i,t=window.ELEMENT,n=Object.keys(t).filter(function(e){return"install"!==e&&t[e].name}).map(function(e){return{label:e,name:t[e].name}}),s={mixins:[(o={name:{type:String,rule:[{required:!0,message:"\u8bf7\u9009\u62e9\u7ec4\u4ef6"}]},data:{type:Object,rule:[{type:"object",message:"\u8bf7\u68c0\u67e5\u914d\u7f6e\u683c\u5f0f",trigger:"blur"}]}},r=Object.keys(o),a={},l={},i={},r.forEach(function(t){var e=o[t],n=e.rule,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["rule"]);a[t]=r,l[t]=n,i[t]=function(e){this.model[t]=e}}),{props:a,data:function(){var t=this,n={};return r.forEach(function(e){n[e]=t[e]}),{model:n,rules:l}},watch:i,methods:{onSubmit:function(){var t=this;this.$refs.form.validate(function(e){if(!e)return!1;t.$emit("save",{props:t.model})})},onCancel:function(){this.$refs.form.resetFields()}}})],data:function(){return{components:n}}};var c,m,u,d,f,p,v=(u=void 0,d=!(c={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-form",{ref:"form",attrs:{model:t.model,rules:t.rules,"label-width":"120px"}},[n("el-form-item",{attrs:{label:"Element \u7ec4\u4ef6\u540d",prop:"name"}},[n("el-select",{attrs:{filterable:"",placeholder:"\u8bf7\u9009\u62e9"},model:{value:t.model.name,callback:function(e){t.$set(t.model,"name",e)},expression:"model.name"}},t._l(t.components,function(e){return n("el-option",{key:e.name,attrs:{label:e.label,value:e.name}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"\u7ec4\u4ef6\u914d\u7f6e",prop:"data"}},[n("json-input",{model:{value:t.model.data,callback:function(e){t.$set(t.model,"data",e)},expression:"model.data"}})],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("\u4fdd\u5b58")]),t._v(" "),n("el-button",{on:{click:t.onCancel}},[t._v("\u53d6\u6d88")])],1)],1)},staticRenderFns:[]}),(f=("function"==typeof(m=s)?m.options:m)||{}).__file="provider.vue",f.render||(f.render=c.render,f.staticRenderFns=c.staticRenderFns,f._compiled=!0,d&&(f.functional=!0)),f._scopeId=u,f);return"undefined"!=typeof window?p=window.Vue:"undefined"!=typeof global&&(p=global.Vue),p&&p.component("@her-activity-components/el-any@0.2.0",v),e.$=v,e}({});
{
"name": "@her-activity-components/el-any",
"version": "0.1.13",
"version": "0.2.0",
"publishConfig": {

@@ -10,3 +10,3 @@ "access": "public"

],
"gitHead": "a528f0678b41e812759375ea2d0200aea3571ac5"
"gitHead": "0293cbfe650e0d8cc5c436a316f5fdf1a1ab445c"
}