Skip to content

Commit 6314a04

Browse files
update:update ui
1 parent 7983a29 commit 6314a04

File tree

10 files changed

+506
-6
lines changed

10 files changed

+506
-6
lines changed

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
[
77
'prismjs',
88
{
9-
languages: ['javascript', 'css', 'json'],
9+
languages: ['javascript', 'css', 'json', 'xml', 'html'],
1010
plugins: [],
1111
theme: 'coy',
1212
css: true,

quasar.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,20 @@ module.exports = configure((ctx) => {
9595
extendViteConf(viteConf) {
9696
viteConf.build.chunkSizeWarningLimit = 50000;
9797
viteConf.base = ctx.dev ? '/' : '/v3-admin/';
98+
viteConf.css = {
99+
preprocessorOptions: {
100+
scss: {
101+
sourceMap: false,
102+
additionalData(source, fp) {
103+
// All scss files ending with imports.scss
104+
// will not re-import additionalData
105+
if (fp.endsWith('variables.scss')) return source;
106+
// Use additionalData from legacy nuxt scss options
107+
return `@import "src/css/quasar.variables.scss"; ${source}`;
108+
},
109+
},
110+
},
111+
};
98112
},
99113
// viteVuePluginOptions: {},
100114

src/i18n/en-US/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
md: 'Markdown',
2121
splitter: 'Splitter',
2222
jsonEditor: 'Json Editor',
23+
jsonView: 'Json View',
2324
tabs: 'Tabs',
2425
sticky: 'Sticky',
2526
carousel: 'Carousel',

src/i18n/zh-CN/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
md: 'Markdown',
2121
splitter: '分割条',
2222
jsonEditor: 'JSON编辑器',
23+
jsonView: 'JSON预览',
2324
tabs: '选项卡',
2425
sticky: 'Sticky',
2526
carousel: '跑马灯',

src/pages/components/color.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@ export default class myComponentColor extends Vue {
3636
];
3737
}
3838
</script>
39-
40-
<style scoped lang='scss'>
41-
</style>

src/pages/components/jsonEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
v-model="json"
55
v-bind="{
66
mode: 'text',
7-
readOnly: true,
7+
readOnly: false,
88
onChange: onJsonChange,
99
/* local props & attrs */
1010
}"

src/pages/components/jsonView.vue

Lines changed: 473 additions & 0 deletions
Large diffs are not rendered by default.

src/pages/convert/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<template v-slot:after>
2828
<div class="q-pa-md">
2929
<div class="text-h4 q-mb-md">css</div>
30-
3130
<pre class="language-js"><code v-text="convertCss"></code></pre>
3231
</div>
3332
</template>

src/router/routes.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export const asyncRoutes: RouteRecordRaw[] = [
156156
'components-md',
157157
'components-splitter',
158158
'components-jsonEditor',
159+
'components-jsonView',
159160
'components-tabs',
160161
'components-colors',
161162
'components-sticky',
@@ -221,6 +222,19 @@ export const asyncRoutes: RouteRecordRaw[] = [
221222
/* webpackChunkName: "jsonEditor" */ 'src/pages/components/jsonEditor.vue'
222223
),
223224
},
225+
{
226+
path: 'jsonView',
227+
name: 'jsonView',
228+
meta: {
229+
title: 'jsonView',
230+
icon: 'label',
231+
pagePermissionId: ['components-jsonView'],
232+
},
233+
component: () =>
234+
import(
235+
/* webpackChunkName: "jsonEditor" */ 'src/pages/components/jsonView.vue'
236+
),
237+
},
224238
{
225239
path: 'tabs',
226240
name: 'Tabs',

src/setting.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"components-md",
2525
"components-splitter",
2626
"components-jsonEditor",
27+
"components-jsonView",
2728
"components-tabs",
2829
"components-colors",
2930
"components-sticky",

0 commit comments

Comments
 (0)