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/rules-widget

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@her-activity-components/rules-widget - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+18
-32
dist/consumer.js

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

var _her_activity_components_rules_widget_0_0_1 = (function (exports) {
var _her_activity_components_rules_widget_0_0_2 = (function (exports) {
'use strict';

@@ -17,8 +17,6 @@

props: {
title: String,
titleColor: String,
content: String,
copyright: {
type: String,
default: '本活动最终解释权归阅文集团所有',
},
copyright: String,
copyrightColor: String,

@@ -29,13 +27,2 @@ },

},
methods: {
getStyle: function getStyle(obj) {
var style = {};
Object.keys(obj).forEach(function (key) {
if (obj[key] != null) {
style[key] = obj[key];
}
});
return Object.keys(style).length ? style : null
},
},
};

@@ -52,7 +39,7 @@

return _c("div", { staticClass: "rules-widget" }, [
_c(
"h5",
{ staticClass: "title", style: _vm.getStyle({ color: _vm.titleColor }) },
[_vm._v("活动规则")]
),
_vm.title
? _c("h5", { staticClass: "title", style: { color: _vm.titleColor } }, [
_vm._v(_vm._s(_vm.title))
])
: _vm._e(),
_vm._v(" "),

@@ -64,10 +51,9 @@ _c("div", {

_vm._v(" "),
_c(
"p",
{
staticClass: "copyright",
style: _vm.getStyle({ color: _vm.copyrightColor })
},
[_vm._v(_vm._s(_vm.copyright))]
)
_vm.copyright
? _c(
"p",
{ staticClass: "copyright", style: { color: _vm.copyrightColor } },
[_vm._v(_vm._s(_vm.copyright))]
)
: _vm._e()
])

@@ -81,7 +67,7 @@ };

if (!inject) { return }
inject("data-v-e851fcfa_0", { source: "\n.rules-widget[data-v-e851fcfa] {\n padding: 20px 16px 30px;\n}\n.trigger[data-v-e851fcfa] {\n border-bottom: 1px solid currentColor;\n display: inline-block;\n font-size: px2rem(14px);\n line-height: 1;\n padding-bottom: 1px;\n vertical-align: top;\n}\n.title[data-v-e851fcfa] {\n font-size: 20px;\n font-weight: bold;\n line-height: 1;\n margin-bottom: 11px;\n text-align: center;\n}\n.content[data-v-e851fcfa] {\n font-size: 14px;\n}\n.copyright[data-v-e851fcfa] {\n font-size: 12px;\n line-height: 1;\n margin-top: 30px;\n text-align: center;\n}\n", map: {"version":3,"sources":["/Users/zhangchengrong/Projects/readx/her-activity/components/rules-widget/src/consumer.vue"],"names":[],"mappings":";AA6CA;EACA,wBAAA;CACA;AAEA;EACA,sCAAA;EACA,sBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;EACA,oBAAA;CACA;AAEA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,oBAAA;EACA,mBAAA;CACA;AAEA;EACA,gBAAA;CACA;AAEA;EACA,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;CACA","file":"consumer.vue","sourcesContent":["<template>\n <div\n class=\"rules-widget\"\n >\n <h5 class=\"title\" :style=\"getStyle({ color: titleColor })\">活动规则</h5>\n <div class=\"content\" v-html=\"content\" />\n <p class=\"copyright\" :style=\"getStyle({ color: copyrightColor })\">{{copyright}}</p>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n titleColor: String,\n content: String,\n copyright: {\n type: String,\n default: '本活动最终解释权归阅文集团所有',\n },\n copyrightColor: String,\n },\n filter: {\n color() {},\n },\n methods: {\n getStyle(obj) {\n const style = {}\n Object.keys(obj).forEach((key) => {\n if (obj[key] != null) {\n style[key] = obj[key]\n }\n })\n return Object.keys(style).length ? style : null\n },\n },\n};\n</script>\n\n<!-- <style>\n.rules-widget .content p {\n margin-bottom: 3.2%;\n}\n</style> -->\n\n<style scoped>\n.rules-widget {\n padding: 20px 16px 30px;\n}\n\n.trigger {\n border-bottom: 1px solid currentColor;\n display: inline-block;\n font-size: px2rem(14px);\n line-height: 1;\n padding-bottom: 1px;\n vertical-align: top;\n}\n\n.title {\n font-size: 20px;\n font-weight: bold;\n line-height: 1;\n margin-bottom: 11px;\n text-align: center;\n}\n\n.content {\n font-size: 14px;\n}\n\n.copyright {\n font-size: 12px;\n line-height: 1;\n margin-top: 30px;\n text-align: center;\n}\n</style>\n"]}, media: undefined });
inject("data-v-548e4772_0", { source: "\n.rules-widget[data-v-548e4772] {\n font-size: 100px;\n padding: 0.2em 0.16em;\n}\n.title[data-v-548e4772] {\n font-size: 0.2em;\n font-weight: bold;\n line-height: 1;\n margin-bottom: 1em;\n text-align: center;\n}\n.content[data-v-548e4772] {\n font-size: 0.14em;\n}\n.copyright[data-v-548e4772] {\n font-size: 0.12em;\n line-height: 1;\n margin-bottom: 0.8333em;;\n margin-top: 2.5em;\n text-align: center;\n}\n.rem-16 .rules-widget[data-v-548e4772] {\n font-size: 6.25rem;\n}\n", map: {"version":3,"sources":["/Users/zhangchengrong/Projects/readx/her-activity/components/rules-widget/src/consumer.vue"],"names":[],"mappings":";AA0BA;EACA,iBAAA;EACA,sBAAA;CACA;AAEA;EACA,iBAAA;EACA,kBAAA;EACA,eAAA;EACA,mBAAA;EACA,mBAAA;CACA;AAEA;EACA,kBAAA;CACA;AAEA;EACA,kBAAA;EACA,eAAA;EACA,wBAAA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,mBAAA;CACA","file":"consumer.vue","sourcesContent":["<template>\n <div\n class=\"rules-widget\"\n >\n <h5 v-if=\"title\" class=\"title\" :style=\"{ color: titleColor }\">{{title}}</h5>\n <div class=\"content\" v-html=\"content\" />\n <p v-if=\"copyright\" class=\"copyright\" :style=\"{ color: copyrightColor }\">{{copyright}}</p>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n title: String,\n titleColor: String,\n content: String,\n copyright: String,\n copyrightColor: String,\n },\n filter: {\n color() {},\n },\n};\n</script>\n\n<style scoped>\n.rules-widget {\n font-size: 100px;\n padding: em(20, 100) em(16, 100);\n}\n\n.title {\n font-size: em(20, 100);\n font-weight: bold;\n line-height: 1;\n margin-bottom: em(20, 20);\n text-align: center;\n}\n\n.content {\n font-size: em(14, 100);\n}\n\n.copyright {\n font-size: em(12, 100);\n line-height: 1;\n margin-bottom: em(10, 12);;\n margin-top: em(30, 12);\n text-align: center;\n}\n\n.rem-16 .rules-widget {\n font-size: rem(200);\n}\n</style>\n"]}, media: undefined });
};
/* scoped */
var __vue_scope_id__ = "data-v-e851fcfa";
var __vue_scope_id__ = "data-v-548e4772";
/* module identifier */

@@ -218,3 +204,3 @@ var __vue_module_identifier__ = undefined;

if ($Vue) {
$Vue.component("@her-activity-components/rules-widget@0.0.1", component);
$Vue.component("@her-activity-components/rules-widget@0.0.2", component);
}

@@ -221,0 +207,0 @@

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

var _her_activity_components_rules_widget_0_0_1 = (function (exports) {
var _her_activity_components_rules_widget_0_0_2 = (function (exports) {
'use strict';

@@ -27,2 +27,5 @@

//
//
//
//

@@ -38,2 +41,6 @@ var editInitOptions = {

props: {
title: {
type: String,
default: '活动规则',
},
titleColor: String,

@@ -63,2 +70,3 @@ content: String,

model: {
title: this.title, // 标题可能是图片,那就直接由 editor 编辑出来,所以没有必填 rule
titleColor: this.titleColor,

@@ -72,4 +80,2 @@ content: this.content,

{ required: true, message: '请输入活动说明' } ],
copyright: [
{ required: true, message: '请输入版权文案' } ],
},

@@ -137,2 +143,19 @@ }

"el-form-item",
{ attrs: { label: "标题" } },
[
_c("el-input", {
model: {
value: _vm.model.title,
callback: function($$v) {
_vm.$set(_vm.model, "title", $$v);
},
expression: "model.title"
}
})
],
1
),
_vm._v(" "),
_c(
"el-form-item",
{ attrs: { label: "标题颜色" } },

@@ -241,8 +264,8 @@ [

if (!inject) { return }
inject("data-v-9b418778_0", { source: "\n.mce-branding {\n display: none !important;\n}\n", map: {"version":3,"sources":["/Users/zhangchengrong/Projects/readx/her-activity/components/rules-widget/src/provider.vue"],"names":[],"mappings":";AAkHA;EACA,yBAAA;CACA","file":"provider.vue","sourcesContent":["<template>\n <el-form ref=\"form\" :model=\"model\" :rules=\"rules\" label-width=\"120px\">\n <el-form-item label=\"标题颜色\">\n <el-color-picker v-model=\"model.titleColor\" show-alpha />\n </el-form-item>\n <el-form-item label=\"活动说明\" prop=\"content\">\n <div class=\"editor\">\n <editor v-if=\"editorLoaded\" v-bind=\"editorOptions\" v-model=\"model.content\" />\n </div>\n </el-form-item>\n <el-form-item label=\"版权文案\" prop=\"copyright\">\n <el-input v-model=\"model.copyright\" />\n </el-form-item>\n <el-form-item label=\"版权文案颜色\">\n <el-color-picker v-model=\"model.copyrightColor\" show-alpha />\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">保存</el-button>\n <el-button @click=\"onCancel\">取消</el-button>\n </el-form-item>\n </el-form>\n</template>\n\n<script>\nconst editInitOptions = {\n height: 300,\n language: 'zh_CN',\n plugins: ['code', 'colorpicker', 'fullscreen', 'link', 'lists', 'image', 'preview', 'textcolor'],\n toolbar: 'undo redo | fontsizeselect | bold italic | forecolor | alignleft aligncenter alignright | bullist numlist | link image media',\n}\n\nexport default {\n props: {\n titleColor: String,\n content: String,\n copyright: {\n type: String,\n default: '本活动法律范围内最终解释权归阅文集团所有',\n },\n copyrightColor: String,\n },\n data() {\n return {\n editorLoaded: false,\n editorOptions: {\n init: {\n ...editInitOptions,\n images_upload_handler: (blobInfo, success, failure) => {\n const form = new FormData()\n form.append('lbf-file-upload', blobInfo.blob(), blobInfo.filename())\n\n this.$ajax.post('/her/ajax/general/file/files', form)\n .then(res => success(res.data.url), failure)\n },\n },\n },\n model: {\n titleColor: this.titleColor,\n content: this.content,\n copyright: this.copyright,\n copyrightColor: this.copyrightColor,\n },\n rules: {\n content: [\n { required: true, message: '请输入活动说明' },\n ],\n copyright: [\n { required: true, message: '请输入版权文案' },\n ],\n },\n }\n },\n mounted() {\n loadEditor().then((Editor) => {\n if (!Vue.component('editor')) {\n Vue.component('editor', Editor)\n }\n this.editorLoaded = true\n })\n },\n methods: {\n onSubmit() {\n this.$refs.form.validate((valid) => {\n if (!valid) {\n return false\n }\n\n this.$emit('save', { props: this.model })\n });\n },\n onCancel() {\n this.$refs.form.resetFields()\n },\n }\n}\n\nfunction loadEditor() {\n return new Promise((resolve) => {\n const BASE_URL = 'https://cdn.jsdelivr.net/npm/'\n const loadScripts = window.$script\n loadScripts([\n `${BASE_URL}tinymce@4.9.1/tinymce.min.js`,\n `${BASE_URL}@tinymce/tinymce-vue@1.1.0/lib/browser/tinymce-vue.min.js`,\n ], () => {\n loadScripts(`${BASE_URL}tinymce-i18n@18.11.18/langs/zh_CN.js`, () => {\n resolve(window.Editor)\n })\n })\n })\n}\n</script>\n\n\n<style>\n.mce-branding {\n display: none !important;\n}\n</style>\n\n<style scoped>\n.editor {\n height: 400px;\n}\n</style>"]}, media: undefined })
,inject("data-v-9b418778_1", { source: "\n.editor[data-v-9b418778] {\n height: 400px;\n}\n", map: {"version":3,"sources":["/Users/zhangchengrong/Projects/readx/her-activity/components/rules-widget/src/provider.vue"],"names":[],"mappings":";AAwHA;EACA,cAAA;CACA","file":"provider.vue","sourcesContent":["<template>\n <el-form ref=\"form\" :model=\"model\" :rules=\"rules\" label-width=\"120px\">\n <el-form-item label=\"标题颜色\">\n <el-color-picker v-model=\"model.titleColor\" show-alpha />\n </el-form-item>\n <el-form-item label=\"活动说明\" prop=\"content\">\n <div class=\"editor\">\n <editor v-if=\"editorLoaded\" v-bind=\"editorOptions\" v-model=\"model.content\" />\n </div>\n </el-form-item>\n <el-form-item label=\"版权文案\" prop=\"copyright\">\n <el-input v-model=\"model.copyright\" />\n </el-form-item>\n <el-form-item label=\"版权文案颜色\">\n <el-color-picker v-model=\"model.copyrightColor\" show-alpha />\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">保存</el-button>\n <el-button @click=\"onCancel\">取消</el-button>\n </el-form-item>\n </el-form>\n</template>\n\n<script>\nconst editInitOptions = {\n height: 300,\n language: 'zh_CN',\n plugins: ['code', 'colorpicker', 'fullscreen', 'link', 'lists', 'image', 'preview', 'textcolor'],\n toolbar: 'undo redo | fontsizeselect | bold italic | forecolor | alignleft aligncenter alignright | bullist numlist | link image media',\n}\n\nexport default {\n props: {\n titleColor: String,\n content: String,\n copyright: {\n type: String,\n default: '本活动法律范围内最终解释权归阅文集团所有',\n },\n copyrightColor: String,\n },\n data() {\n return {\n editorLoaded: false,\n editorOptions: {\n init: {\n ...editInitOptions,\n images_upload_handler: (blobInfo, success, failure) => {\n const form = new FormData()\n form.append('lbf-file-upload', blobInfo.blob(), blobInfo.filename())\n\n this.$ajax.post('/her/ajax/general/file/files', form)\n .then(res => success(res.data.url), failure)\n },\n },\n },\n model: {\n titleColor: this.titleColor,\n content: this.content,\n copyright: this.copyright,\n copyrightColor: this.copyrightColor,\n },\n rules: {\n content: [\n { required: true, message: '请输入活动说明' },\n ],\n copyright: [\n { required: true, message: '请输入版权文案' },\n ],\n },\n }\n },\n mounted() {\n loadEditor().then((Editor) => {\n if (!Vue.component('editor')) {\n Vue.component('editor', Editor)\n }\n this.editorLoaded = true\n })\n },\n methods: {\n onSubmit() {\n this.$refs.form.validate((valid) => {\n if (!valid) {\n return false\n }\n\n this.$emit('save', { props: this.model })\n });\n },\n onCancel() {\n this.$refs.form.resetFields()\n },\n }\n}\n\nfunction loadEditor() {\n return new Promise((resolve) => {\n const BASE_URL = 'https://cdn.jsdelivr.net/npm/'\n const loadScripts = window.$script\n loadScripts([\n `${BASE_URL}tinymce@4.9.1/tinymce.min.js`,\n `${BASE_URL}@tinymce/tinymce-vue@1.1.0/lib/browser/tinymce-vue.min.js`,\n ], () => {\n loadScripts(`${BASE_URL}tinymce-i18n@18.11.18/langs/zh_CN.js`, () => {\n resolve(window.Editor)\n })\n })\n })\n}\n</script>\n\n\n<style>\n.mce-branding {\n display: none !important;\n}\n</style>\n\n<style scoped>\n.editor {\n height: 400px;\n}\n</style>"]}, media: undefined });
inject("data-v-3e3bfd19_0", { source: "\n.mce-branding {\n display: none !important;\n}\n", map: {"version":3,"sources":["/Users/zhangchengrong/Projects/readx/her-activity/components/rules-widget/src/provider.vue"],"names":[],"mappings":";AAuHA;EACA,yBAAA;CACA","file":"provider.vue","sourcesContent":["<template>\n <el-form ref=\"form\" :model=\"model\" :rules=\"rules\" label-width=\"120px\">\n <el-form-item label=\"标题\">\n <el-input v-model=\"model.title\" />\n </el-form-item>\n <el-form-item label=\"标题颜色\">\n <el-color-picker v-model=\"model.titleColor\" show-alpha />\n </el-form-item>\n <el-form-item label=\"活动说明\" prop=\"content\">\n <div class=\"editor\">\n <editor v-if=\"editorLoaded\" v-bind=\"editorOptions\" v-model=\"model.content\" />\n </div>\n </el-form-item>\n <el-form-item label=\"版权文案\" prop=\"copyright\">\n <el-input v-model=\"model.copyright\" />\n </el-form-item>\n <el-form-item label=\"版权文案颜色\">\n <el-color-picker v-model=\"model.copyrightColor\" show-alpha />\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">保存</el-button>\n <el-button @click=\"onCancel\">取消</el-button>\n </el-form-item>\n </el-form>\n</template>\n\n<script>\nconst editInitOptions = {\n height: 300,\n language: 'zh_CN',\n plugins: ['code', 'colorpicker', 'fullscreen', 'link', 'lists', 'image', 'preview', 'textcolor'],\n toolbar: 'undo redo | fontsizeselect | bold italic | forecolor | alignleft aligncenter alignright | bullist numlist | link image media',\n}\n\nexport default {\n props: {\n title: {\n type: String,\n default: '活动规则',\n },\n titleColor: String,\n content: String,\n copyright: {\n type: String,\n default: '本活动法律范围内最终解释权归阅文集团所有',\n },\n copyrightColor: String,\n },\n data() {\n return {\n editorLoaded: false,\n editorOptions: {\n init: {\n ...editInitOptions,\n images_upload_handler: (blobInfo, success, failure) => {\n const form = new FormData()\n form.append('lbf-file-upload', blobInfo.blob(), blobInfo.filename())\n\n this.$ajax.post('/her/ajax/general/file/files', form)\n .then(res => success(res.data.url), failure)\n },\n },\n },\n model: {\n title: this.title, // 标题可能是图片,那就直接由 editor 编辑出来,所以没有必填 rule\n titleColor: this.titleColor,\n content: this.content,\n copyright: this.copyright,\n copyrightColor: this.copyrightColor,\n },\n rules: {\n content: [\n { required: true, message: '请输入活动说明' },\n ],\n },\n }\n },\n mounted() {\n loadEditor().then((Editor) => {\n if (!Vue.component('editor')) {\n Vue.component('editor', Editor)\n }\n this.editorLoaded = true\n })\n },\n methods: {\n onSubmit() {\n this.$refs.form.validate((valid) => {\n if (!valid) {\n return false\n }\n\n this.$emit('save', { props: this.model })\n });\n },\n onCancel() {\n this.$refs.form.resetFields()\n },\n }\n}\n\nfunction loadEditor() {\n return new Promise((resolve) => {\n const BASE_URL = 'https://cdn.jsdelivr.net/npm/'\n const loadScripts = window.$script\n loadScripts([\n `${BASE_URL}tinymce@4.9.1/tinymce.min.js`,\n `${BASE_URL}@tinymce/tinymce-vue@1.1.0/lib/browser/tinymce-vue.min.js`,\n ], () => {\n loadScripts(`${BASE_URL}tinymce-i18n@18.11.18/langs/zh_CN.js`, () => {\n resolve(window.Editor)\n })\n })\n })\n}\n</script>\n\n\n<style>\n.mce-branding {\n display: none !important;\n}\n</style>\n\n<style scoped>\n.editor {\n height: 400px;\n}\n</style>"]}, media: undefined })
,inject("data-v-3e3bfd19_1", { source: "\n.editor[data-v-3e3bfd19] {\n height: 400px;\n}\n", map: {"version":3,"sources":["/Users/zhangchengrong/Projects/readx/her-activity/components/rules-widget/src/provider.vue"],"names":[],"mappings":";AA6HA;EACA,cAAA;CACA","file":"provider.vue","sourcesContent":["<template>\n <el-form ref=\"form\" :model=\"model\" :rules=\"rules\" label-width=\"120px\">\n <el-form-item label=\"标题\">\n <el-input v-model=\"model.title\" />\n </el-form-item>\n <el-form-item label=\"标题颜色\">\n <el-color-picker v-model=\"model.titleColor\" show-alpha />\n </el-form-item>\n <el-form-item label=\"活动说明\" prop=\"content\">\n <div class=\"editor\">\n <editor v-if=\"editorLoaded\" v-bind=\"editorOptions\" v-model=\"model.content\" />\n </div>\n </el-form-item>\n <el-form-item label=\"版权文案\" prop=\"copyright\">\n <el-input v-model=\"model.copyright\" />\n </el-form-item>\n <el-form-item label=\"版权文案颜色\">\n <el-color-picker v-model=\"model.copyrightColor\" show-alpha />\n </el-form-item>\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit\">保存</el-button>\n <el-button @click=\"onCancel\">取消</el-button>\n </el-form-item>\n </el-form>\n</template>\n\n<script>\nconst editInitOptions = {\n height: 300,\n language: 'zh_CN',\n plugins: ['code', 'colorpicker', 'fullscreen', 'link', 'lists', 'image', 'preview', 'textcolor'],\n toolbar: 'undo redo | fontsizeselect | bold italic | forecolor | alignleft aligncenter alignright | bullist numlist | link image media',\n}\n\nexport default {\n props: {\n title: {\n type: String,\n default: '活动规则',\n },\n titleColor: String,\n content: String,\n copyright: {\n type: String,\n default: '本活动法律范围内最终解释权归阅文集团所有',\n },\n copyrightColor: String,\n },\n data() {\n return {\n editorLoaded: false,\n editorOptions: {\n init: {\n ...editInitOptions,\n images_upload_handler: (blobInfo, success, failure) => {\n const form = new FormData()\n form.append('lbf-file-upload', blobInfo.blob(), blobInfo.filename())\n\n this.$ajax.post('/her/ajax/general/file/files', form)\n .then(res => success(res.data.url), failure)\n },\n },\n },\n model: {\n title: this.title, // 标题可能是图片,那就直接由 editor 编辑出来,所以没有必填 rule\n titleColor: this.titleColor,\n content: this.content,\n copyright: this.copyright,\n copyrightColor: this.copyrightColor,\n },\n rules: {\n content: [\n { required: true, message: '请输入活动说明' },\n ],\n },\n }\n },\n mounted() {\n loadEditor().then((Editor) => {\n if (!Vue.component('editor')) {\n Vue.component('editor', Editor)\n }\n this.editorLoaded = true\n })\n },\n methods: {\n onSubmit() {\n this.$refs.form.validate((valid) => {\n if (!valid) {\n return false\n }\n\n this.$emit('save', { props: this.model })\n });\n },\n onCancel() {\n this.$refs.form.resetFields()\n },\n }\n}\n\nfunction loadEditor() {\n return new Promise((resolve) => {\n const BASE_URL = 'https://cdn.jsdelivr.net/npm/'\n const loadScripts = window.$script\n loadScripts([\n `${BASE_URL}tinymce@4.9.1/tinymce.min.js`,\n `${BASE_URL}@tinymce/tinymce-vue@1.1.0/lib/browser/tinymce-vue.min.js`,\n ], () => {\n loadScripts(`${BASE_URL}tinymce-i18n@18.11.18/langs/zh_CN.js`, () => {\n resolve(window.Editor)\n })\n })\n })\n}\n</script>\n\n\n<style>\n.mce-branding {\n display: none !important;\n}\n</style>\n\n<style scoped>\n.editor {\n height: 400px;\n}\n</style>"]}, media: undefined });
};
/* scoped */
var __vue_scope_id__ = "data-v-9b418778";
var __vue_scope_id__ = "data-v-3e3bfd19";
/* module identifier */

@@ -379,3 +402,3 @@ var __vue_module_identifier__ = undefined;

if ($Vue) {
$Vue.component("@her-activity-components/rules-widget@0.0.1", component);
$Vue.component("@her-activity-components/rules-widget@0.0.2", component);
}

@@ -382,0 +405,0 @@

{
"name": "@her-activity-components/rules-widget",
"version": "0.0.1",
"version": "0.0.2",
"publishConfig": {

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

],
"gitHead": "f0b13f21ca6c5f65055993045782ec4b11686d6c"
"gitHead": "844106e1e97139d9c64aca9d3b6f3dda82d5103e"
}
var _her_activity_components_rules_widget_0_0_1=function(e){"use strict";var t,n=function(e,t,n,i,o,r,a,c){var s,l=("function"==typeof n?n.options:n)||{};if(l.__file="consumer.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,o&&(l.functional=!0)),l._scopeId=i,t&&(s=function(e){t.call(this,a(e))}),void 0!==s)if(l.functional){var d=l.render;l.render=function(e,t){return s.call(t),d(e,t)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,s):[s]}return l}({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rules-widget"},[n("h5",{staticClass:"title",style:e.getStyle({color:e.titleColor})},[e._v("\u6d3b\u52a8\u89c4\u5219")]),e._v(" "),n("div",{staticClass:"content",domProps:{innerHTML:e._s(e.content)}}),e._v(" "),n("p",{staticClass:"copyright",style:e.getStyle({color:e.copyrightColor})},[e._v(e._s(e.copyright))])])},staticRenderFns:[]},function(e){e&&e("data-v-1dc5c5c0_0",{source:"\n.rules-widget[data-v-1dc5c5c0]{padding:20px 16px 30px\n}\n.trigger[data-v-1dc5c5c0]{border-bottom:1px solid currentColor;display:inline-block;font-size:px2rem(14px);line-height:1;padding-bottom:1px;vertical-align:top\n}\n.title[data-v-1dc5c5c0]{font-size:20px;font-weight:700;line-height:1;margin-bottom:11px;text-align:center\n}\n.content[data-v-1dc5c5c0]{font-size:14px\n}\n.copyright[data-v-1dc5c5c0]{font-size:12px;line-height:1;margin-top:30px;text-align:center\n}",map:void 0,media:void 0})},{props:{titleColor:String,content:String,copyright:{type:String,default:"\u672c\u6d3b\u52a8\u6700\u7ec8\u89e3\u91ca\u6743\u5f52\u9605\u6587\u96c6\u56e2\u6240\u6709"},copyrightColor:String},filter:{color:function(){}},methods:{getStyle:function(t){var n={};return Object.keys(t).forEach(function(e){null!=t[e]&&(n[e]=t[e])}),Object.keys(n).length?n:null}}},"data-v-1dc5c5c0",!1,0,function e(){var l=document.head||document.getElementsByTagName("head")[0],d=e.styles||(e.styles={}),u="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,t){if(!document.querySelector('style[data-vue-ssr-id~="'+e+'"]')){var n=u?t.media||"default":e,i=d[n]||(d[n]={ids:[],parts:[],element:void 0});if(!i.ids.includes(e)){var o=t.source,r=i.ids.length;if(i.ids.push(e),t.map&&(o+="\n/*# sourceURL="+t.map.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),u&&(i.element=i.element||document.querySelector("style[data-group="+n+"]")),!i.element){var a=i.element=document.createElement("style");a.type="text/css",t.media&&a.setAttribute("media",t.media),u&&(a.setAttribute("data-group",n),a.setAttribute("data-next-index","0")),l.appendChild(a)}if(u&&(r=parseInt(i.element.getAttribute("data-next-index")),i.element.setAttribute("data-next-index",r+1)),i.element.styleSheet)i.parts.push(o),i.element.styleSheet.cssText=i.parts.filter(Boolean).join("\n");else{var c=document.createTextNode(o),s=i.element.childNodes;s[r]&&i.element.removeChild(s[r]),s.length?i.element.insertBefore(c,s[r]):i.element.appendChild(c)}}}}});return"undefined"!=typeof window?t=window.Vue:"undefined"!=typeof global&&(t=global.Vue),t&&t.component("@her-activity-components/rules-widget@0.0.1",n),e.$=n,e}({});
var _her_activity_components_rules_widget_0_0_1=function(e){"use strict";var t={height:300,language:"zh_CN",plugins:["code","colorpicker","fullscreen","link","lists","image","preview","textcolor"],toolbar:"undo redo | fontsizeselect | bold italic | forecolor | alignleft aligncenter alignright | bullist numlist | link image media"};var o,n=function(e,t,o,n,i,r,l,a){var s,d=("function"==typeof o?o.options:o)||{};if(d.__file="provider.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),d._scopeId=n,t&&(s=function(e){t.call(this,l(e))}),void 0!==s)if(d.functional){var c=d.render;d.render=function(e,t){return s.call(t),c(e,t)}}else{var m=d.beforeCreate;d.beforeCreate=m?[].concat(m,s):[s]}return d}({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-form",{ref:"form",attrs:{model:t.model,rules:t.rules,"label-width":"120px"}},[o("el-form-item",{attrs:{label:"\u6807\u9898\u989c\u8272"}},[o("el-color-picker",{attrs:{"show-alpha":""},model:{value:t.model.titleColor,callback:function(e){t.$set(t.model,"titleColor",e)},expression:"model.titleColor"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"\u6d3b\u52a8\u8bf4\u660e",prop:"content"}},[o("div",{staticClass:"editor"},[t.editorLoaded?o("editor",t._b({model:{value:t.model.content,callback:function(e){t.$set(t.model,"content",e)},expression:"model.content"}},"editor",t.editorOptions,!1)):t._e()],1)]),t._v(" "),o("el-form-item",{attrs:{label:"\u7248\u6743\u6587\u6848",prop:"copyright"}},[o("el-input",{model:{value:t.model.copyright,callback:function(e){t.$set(t.model,"copyright",e)},expression:"model.copyright"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"\u7248\u6743\u6587\u6848\u989c\u8272"}},[o("el-color-picker",{attrs:{"show-alpha":""},model:{value:t.model.copyrightColor,callback:function(e){t.$set(t.model,"copyrightColor",e)},expression:"model.copyrightColor"}})],1),t._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("\u4fdd\u5b58")]),t._v(" "),o("el-button",{on:{click:t.onCancel}},[t._v("\u53d6\u6d88")])],1)],1)},staticRenderFns:[]},function(e){e&&(e("data-v-6e8ebdc1_0",{source:"\n.mce-branding{display:none!important\n}",map:void 0,media:void 0}),e("data-v-6e8ebdc1_1",{source:"\n.editor[data-v-6e8ebdc1]{height:400px\n}",map:void 0,media:void 0}))},{props:{titleColor:String,content:String,copyright:{type:String,default:"\u672c\u6d3b\u52a8\u6cd5\u5f8b\u8303\u56f4\u5185\u6700\u7ec8\u89e3\u91ca\u6743\u5f52\u9605\u6587\u96c6\u56e2\u6240\u6709"},copyrightColor:String},data:function(){var i=this;return{editorLoaded:!1,editorOptions:{init:Object.assign({},t,{images_upload_handler:function(e,t,o){var n=new FormData;n.append("lbf-file-upload",e.blob(),e.filename()),i.$ajax.post("/her/ajax/general/file/files",n).then(function(e){return t(e.data.url)},o)}})},model:{titleColor:this.titleColor,content:this.content,copyright:this.copyright,copyrightColor:this.copyrightColor},rules:{content:[{required:!0,message:"\u8bf7\u8f93\u5165\u6d3b\u52a8\u8bf4\u660e"}],copyright:[{required:!0,message:"\u8bf7\u8f93\u5165\u7248\u6743\u6587\u6848"}]}}},mounted:function(){var t=this;new Promise(function(e){var t="https://cdn.jsdelivr.net/npm/",o=window.$script;o([t+"tinymce@4.9.1/tinymce.min.js",t+"@tinymce/tinymce-vue@1.1.0/lib/browser/tinymce-vue.min.js"],function(){o(t+"tinymce-i18n@18.11.18/langs/zh_CN.js",function(){e(window.Editor)})})}).then(function(e){Vue.component("editor")||Vue.component("editor",e),t.editorLoaded=!0})},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-v-6e8ebdc1",!1,0,function e(){var d=document.head||document.getElementsByTagName("head")[0],c=e.styles||(e.styles={}),m="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,t){if(!document.querySelector('style[data-vue-ssr-id~="'+e+'"]')){var o=m?t.media||"default":e,n=c[o]||(c[o]={ids:[],parts:[],element:void 0});if(!n.ids.includes(e)){var i=t.source,r=n.ids.length;if(n.ids.push(e),t.map&&(i+="\n/*# sourceURL="+t.map.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),m&&(n.element=n.element||document.querySelector("style[data-group="+o+"]")),!n.element){var l=n.element=document.createElement("style");l.type="text/css",t.media&&l.setAttribute("media",t.media),m&&(l.setAttribute("data-group",o),l.setAttribute("data-next-index","0")),d.appendChild(l)}if(m&&(r=parseInt(n.element.getAttribute("data-next-index")),n.element.setAttribute("data-next-index",r+1)),n.element.styleSheet)n.parts.push(i),n.element.styleSheet.cssText=n.parts.filter(Boolean).join("\n");else{var a=document.createTextNode(i),s=n.element.childNodes;s[r]&&n.element.removeChild(s[r]),s.length?n.element.insertBefore(a,s[r]):n.element.appendChild(a)}}}}});return"undefined"!=typeof window?o=window.Vue:"undefined"!=typeof global&&(o=global.Vue),o&&o.component("@her-activity-components/rules-widget@0.0.1",n),e.$=n,e}({});