Browse Source

优化,切换皮肤的时候当前皮肤显示也随之变化

master
wen 2 years ago
parent
commit
67a3a0384a
  1. 2
      dist/index.html
  2. 0
      dist/static/css/chunk-21359588.d185d2a3.css
  3. 1
      dist/static/js/app.79669312.js
  4. 1
      dist/static/js/app.ddece848.js
  5. 1
      dist/static/js/chunk-21359588.fa3c756c.js
  6. 1
      dist/static/js/chunk-755f3784.57a0ed31.js
  7. 9
      src/store/modules/settings.js
  8. 1
      src/views/systme/switchtheme.vue

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

0
dist/static/css/chunk-755f3784.d185d2a3.css → dist/static/css/chunk-21359588.d185d2a3.css vendored

1
dist/static/js/app.79669312.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/app.ddece848.js vendored

File diff suppressed because one or more lines are too long

1
dist/static/js/chunk-21359588.fa3c756c.js vendored

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21359588"],{"1e39":function(e,n,t){"use strict";t.r(n);var i=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"seitchtheme_m"},[t("h5",[e._v("更换皮肤以查看不同皮肤的前端网站")]),t("div",[t("span",[e._v("更换皮肤:")]),t("el-select",{attrs:{placeholder:"请选择皮肤"},on:{change:e.selectbian},model:{value:e.skinvalue,callback:function(n){e.skinvalue=n},expression:"skinvalue"}},e._l(e.options,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),t("div",{staticClass:"Submit1"},[t("el-button",{attrs:{loading:e.skinloading,type:"primary"},on:{click:e.skinSubmit}},[e._v("提交")]),e.skinAsk?t("a",{staticClass:"to_front_web",attrs:{target:"_blank",href:e.skinLink}},[t("el-button",{attrs:{type:"success",round:""}},[e._v("查看"+e._s(e.skinlabel)+"站点")])],1):e._e()],1)],1)])},s=[],a=(t("d3b7"),t("159b"),t("9911"),t("c24f")),l=t("4a9d"),o={data:function(){return{options:[{value:"manual",label:"文档站",link:"/?"},{value:"webdirectory",label:"导航站",link:"/?"},{value:"googleimage",label:"图片站",link:"/?"},{value:"videoblog",label:"视频站",link:"/?"}],skinvalue:"",skinlabel:"",skinLink:"",skinAsk:!1,skinloading:!1,skinForm:{theme:""}}},created:function(){},methods:{skinSubmit:function(){var e=this,n=this;this.skinloading=!0,this.skinForm.theme=this.skinvalue,Object(a["k"])(this.skinForm).then((function(t){var i=t.data;1==i.code?(e.$store.dispatch("settings/thmename",e.skinlabel),n.$message({showClose:!0,message:i.msg,type:"success"}),e.skinAsk=!0,l["a"].$emit("mkdirSuccess")):n.$message({showClose:!0,message:i.err,type:"error"}),e.skinloading=!1})).catch((function(n){e.skinloading=!1,Object(a["i"])(e,n)}))},selectbian:function(e){var n=this;this.options.forEach((function(t){t.value==e&&(n.skinlabel=t.label,n.skinLink=t.link+Math.round(1e3*Math.random()))})),this.skinAsk=!1}}},r=o,u=(t("4e75"),t("2877")),c=Object(u["a"])(r,i,s,!1,null,null,null);n["default"]=c.exports},"4e75":function(e,n,t){"use strict";t("7b94")},"7b94":function(e,n,t){},"857a":function(e,n,t){var i=t("1d80"),s=/"/g;e.exports=function(e,n,t,a){var l=String(i(e)),o="<"+n;return""!==t&&(o+=" "+t+'="'+String(a).replace(s,"&quot;")+'"'),o+">"+l+"</"+n+">"}},9911:function(e,n,t){"use strict";var i=t("23e7"),s=t("857a"),a=t("af03");i({target:"String",proto:!0,forced:a("link")},{link:function(e){return s(this,"a","href",e)}})},af03:function(e,n,t){var i=t("d039");e.exports=function(e){return i((function(){var n=""[e]('"');return n!==n.toLowerCase()||n.split('"').length>3}))}}}]);

1
dist/static/js/chunk-755f3784.57a0ed31.js vendored

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-755f3784"],{"1e39":function(n,e,t){"use strict";t.r(e);var i=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"seitchtheme_m"},[t("h5",[n._v("更换皮肤以查看不同皮肤的前端网站")]),t("div",[t("span",[n._v("更换皮肤:")]),t("el-select",{attrs:{placeholder:"请选择皮肤"},on:{change:n.selectbian},model:{value:n.skinvalue,callback:function(e){n.skinvalue=e},expression:"skinvalue"}},n._l(n.options,(function(n){return t("el-option",{key:n.value,attrs:{label:n.label,value:n.value}})})),1),t("div",{staticClass:"Submit1"},[t("el-button",{attrs:{loading:n.skinloading,type:"primary"},on:{click:n.skinSubmit}},[n._v("提交")]),n.skinAsk?t("a",{staticClass:"to_front_web",attrs:{target:"_blank",href:n.skinLink}},[t("el-button",{attrs:{type:"success",round:""}},[n._v("查看"+n._s(n.skinlabel)+"站点")])],1):n._e()],1)],1)])},s=[],a=(t("d3b7"),t("159b"),t("9911"),t("c24f")),l=t("4a9d"),o={data:function(){return{options:[{value:"manual",label:"文档站",link:"/?"},{value:"webdirectory",label:"导航站",link:"/?"},{value:"googleimage",label:"图片站",link:"/?"},{value:"videoblog",label:"视频站",link:"/?"}],skinvalue:"",skinlabel:"",skinLink:"",skinAsk:!1,skinloading:!1,skinForm:{theme:""}}},created:function(){},methods:{skinSubmit:function(){var n=this,e=this;this.skinloading=!0,this.skinForm.theme=this.skinvalue,Object(a["k"])(this.skinForm).then((function(t){var i=t.data;1==i.code?(e.$message({showClose:!0,message:i.msg,type:"success"}),n.skinAsk=!0,l["a"].$emit("mkdirSuccess")):e.$message({showClose:!0,message:i.err,type:"error"}),n.skinloading=!1})).catch((function(e){n.skinloading=!1,Object(a["i"])(n,e)}))},selectbian:function(n){var e=this;this.options.forEach((function(t){t.value==n&&(e.skinlabel=t.label,e.skinLink=t.link+Math.round(1e3*Math.random()))})),this.skinAsk=!1}}},r=o,u=(t("5129"),t("2877")),c=Object(u["a"])(r,i,s,!1,null,null,null);e["default"]=c.exports},5129:function(n,e,t){"use strict";t("97b4")},"857a":function(n,e,t){var i=t("1d80"),s=/"/g;n.exports=function(n,e,t,a){var l=String(i(n)),o="<"+e;return""!==t&&(o+=" "+t+'="'+String(a).replace(s,"&quot;")+'"'),o+">"+l+"</"+e+">"}},"97b4":function(n,e,t){},9911:function(n,e,t){"use strict";var i=t("23e7"),s=t("857a"),a=t("af03");i({target:"String",proto:!0,forced:a("link")},{link:function(n){return s(this,"a","href",n)}})},af03:function(n,e,t){var i=t("d039");n.exports=function(n){return i((function(){var e=""[n]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}}}]);

9
src/store/modules/settings.js

@ -30,6 +30,10 @@ const mutations = {
state.configMain.admin_supportedFileTypes = configdata.admin_supportedFileTypes state.configMain.admin_supportedFileTypes = configdata.admin_supportedFileTypes
state.configMain.admin_maxUploadFileSize = configdata.admin_maxUploadFileSize state.configMain.admin_maxUploadFileSize = configdata.admin_maxUploadFileSize
state.configMain.admin_maxUploadFileNumber = configdata.admin_maxUploadFileNumber state.configMain.admin_maxUploadFileNumber = configdata.admin_maxUploadFileNumber
},
THME_NAME: (state, name) => {
state.configMain.supportedThemes = name
} }
} }
@ -40,6 +44,11 @@ const actions = {
configMain({ commit }, configdata) { configMain({ commit }, configdata) {
//console.log(configdata); //console.log(configdata);
commit('CONFIG_DATA', configdata) commit('CONFIG_DATA', configdata)
},
thmename({ commit }, name) {
//console.log(configdata);
commit('THME_NAME', name)
} }
} }

1
src/views/systme/switchtheme.vue

@ -74,6 +74,7 @@ export default {
let datamain = response.data; let datamain = response.data;
if (datamain.code == 1) { if (datamain.code == 1) {
this.$store.dispatch('settings/thmename', this.skinlabel)
thiss.$message({showClose: true,message: datamain.msg,type: 'success'}); thiss.$message({showClose: true,message: datamain.msg,type: 'success'});
//this.subloading = false; //this.subloading = false;
this.skinAsk = true; this.skinAsk = true;

Loading…
Cancel
Save