Skip to content

Commit f468ea4

Browse files
committed
杂项修改
1 parent 0dc1bf3 commit f468ea4

File tree

17 files changed

+43
-84
lines changed

17 files changed

+43
-84
lines changed

src/assets/themes/default.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@
184184
}
185185

186186
.cm-tab::before {
187-
position: absolute;
187+
/* position: absolute;
188188
content: '•';
189-
color: #3d3e3d;
189+
color: #3d3e3d; */
190190
/* left: 20%; */
191191
}
192192

src/components/alert.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<v-btn @click="cancel" v-if="showCancel">
1010
{{cancelText}}
1111
</v-btn>
12-
<v-btn @click="ok" :color="okColor">
12+
<v-btn @click="ok" :color="okColor" :loading="loading">
1313
{{okText}}
1414
</v-btn>
1515
</v-card-actions>
@@ -65,6 +65,7 @@ export default {
6565
data() {
6666
return {
6767
visible: true,
68+
loading: false,
6869
}
6970
},
7071
methods: {

src/components/dialog/instanceConfig.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<span class="form-item-title">实例标签</span>
1414
<span class="text-describe">添加或修改实例标签,标签最多三个,每个标签长度小于15</span>
1515
<v-combobox class="form-item-input" v-model="form.tags" :items="tagList" background-color="info" clearable
16-
multiple chips solo label="选择标签..." hide-selected :disable-lookup="form.tags.length>=3" @change="tagsChange"
16+
multiple chips solo label="添加实例标签..." hide-selected :disable-lookup="form.tags.length>=3" @change="tagsChange"
1717
:rules="rules.tags">
1818
<template v-slot:selection="{ attrs, item, select, selected }">
1919
<v-chip v-bind="attrs" color="#1a1a1a" :input-value="selected" close @click="select"
@@ -55,7 +55,7 @@ export default {
5555
},
5656
],
5757
},
58-
tagList: ['CSS', 'HTML', 'JS', 'cd'],
58+
tagList: [],
5959
loading: false,
6060
}
6161
},

src/service/env.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ const isProd = ['production', 'prod'].includes(process.env.NODE_ENV)
33
const env = {
44
dev: {
55
// server: 'http://www.firstbird.asia:8090',
6-
server: 'http://192.168.10.53:8090',
7-
client: 'http://localhost:8080'
6+
server: 'http://192.168.10.58:8090',
7+
// server: 'http://192.169.1.33:8090',
8+
client: 'http://localhost:8080',
89
},
910
prod: {
10-
server: '',
11-
client: ''
11+
server: 'http://www.firstbird.asia:8090',
12+
client: 'https://www.lliiooiill.cn',
1213
}
1314
}
1415

src/service/request.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ axios.interceptors.request.use(async config => {
1818
// config.cancelToken = new axios.CancelToken(cancel => {
1919
// store.commit('cancelRequest/pushToken', { cancelToken: cancel })
2020
// })
21-
console.log(config)
2221
const loginState = store.state.loginState
2322
if (loginState) {
2423
const token = cookie.get('AUTH_TOKEN')
2524
if (token) {
2625
config.headers.token = token
2726
}
28-
} else if (config.requireAuth && !loginState) {
29-
return Promise.reject({ response: { status: 401 } })
3027
}
3128
return config
3229
}, error => {

src/store/modules/alertMsg.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ import Vue from 'vue'
77
const alertMsg = {
88
namespaced: true,
99
state: {
10+
id: 0,
1011
alertPool: [],
1112
},
1213
mutations: {
1314
message (state, opts) {
14-
state.alertPool.push(opts)
15+
state.alertPool.push({
16+
...opts,
17+
id: state.id++
18+
})
1519
setTimeout(() => {
1620
state.alertPool.shift()
1721
}, opts.timeout)

src/store/mutations/instance.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,16 @@ const instance = {
6969
setCurInstanceDetail: (state, detail) => {
7070
state.curInstanceDetail = Object.assign({}, state.curInstanceDetail, detail)
7171
},
72+
setIframeInit: (state, isInit) => {
73+
state.iframeInit = isInit
74+
},
7275
resetInstanceState: (state) => {
7376
// 重置部分instance属性至初始状态
77+
state.instanceCode = {
78+
HTML: '',
79+
CSS: '',
80+
JavaScript: '',
81+
}
7482
state.instanceSetting = {
7583
delayTime: 500,
7684
autoExecute: true,

src/store/state/instance.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,15 @@ const instance = {
5353
/* 当前实例详情 */
5454
curInstanceDetail: {
5555
username: '',
56+
nickname: '',
5657
title: '',
5758
tags: '',
5859
liked: false,
5960
id: '',
6061
saved: true // 当前实例是否被保存了
6162
},
63+
64+
iframeInit: false // iframe是否被初始化过
6265
}
6366

6467
export default instance

src/utils/algorithms.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/utils/editor/console.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class Console {
5050
break
5151
}
5252
case 'clear': {
53-
this.clear()
53+
Console.clear()
5454
break
5555
}
5656
case 'assert': {
@@ -93,8 +93,8 @@ export default class Console {
9393
/**
9494
* 清除控制台所有日志
9595
*/
96-
clear () {
97-
const consoleInfo = this.consoleInfo
96+
static clear () {
97+
const consoleInfo = this.instance.consoleInfo
9898
consoleInfo.splice(0, consoleInfo.length, '')
9999
consoleInfo.pop()
100100
}
@@ -126,11 +126,6 @@ export default class Console {
126126
let result
127127
this.console.log(cmd)
128128
try {
129-
// if (/^(let|const)+( )/.test(cmd)) {
130-
// result = this.window.eval(cmd)
131-
// } else {
132-
// result = this.window.exeJSEncoderConsoleCmd(cmd)
133-
// }
134129
if (cmd === 'window' || cmd === 'console') {
135130
this.consoleInfo.push({
136131
type: 'error',

0 commit comments

Comments
 (0)