mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-05-24 12:29:01 +00:00
added unzip in admin editor
This commit is contained in:
parent
051ed277f1
commit
390b42066b
1 changed files with 9 additions and 3 deletions
|
|
@ -18,6 +18,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
const cssZip = () => import("@/utils/cssZip");
|
||||||
|
|
||||||
import "codemirror/mode/css/css.js";
|
import "codemirror/mode/css/css.js";
|
||||||
|
|
||||||
import "codemirror/addon/merge/merge.js";
|
import "codemirror/addon/merge/merge.js";
|
||||||
|
|
@ -90,9 +93,12 @@ export default {
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const { ok, result } = await AdminService.fetchTheme(this.popoutDetails.id);
|
const { ok, result } = await AdminService.fetchTheme(this.popoutDetails.id);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
this.cmOptions.orig = result.data.css;
|
cssZip().then(utils => {
|
||||||
this.cmOptions.value = result.data.updatedCss;
|
this.cmOptions.orig = utils.unzip(result.data.css) || result.data.css;
|
||||||
this.details = result.data;
|
this.cmOptions.value = utils.unzip(result.data.updatedCss) || result.data.updatedCss;
|
||||||
|
this.details = result.data;
|
||||||
|
this.details.css = utils.unzip(this.details.css) || this.details.css;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue