mirror of https://github.com/stilleshan/subweb.git
optimize dialog components
This commit is contained in:
parent
d5ed7dfb5e
commit
68879fd8f1
|
@ -1,23 +0,0 @@
|
||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
/dist
|
|
||||||
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env.local
|
|
||||||
.env.*.local
|
|
||||||
|
|
||||||
# Log files
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
pnpm-debug.log*
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.idea
|
|
||||||
.vscode
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.sw?
|
|
|
@ -35,8 +35,8 @@ docker run -d --name subweb --restart always \
|
||||||
stilleshan/subweb
|
stilleshan/subweb
|
||||||
```
|
```
|
||||||
|
|
||||||
同时也可以不挂载目录,直接通过`-e`环境变量来修改`API 地址`,`短链接地址`和`站点名称`,但是无法修改`导航链接`.
|
同时也可以不挂载目录,直接通过`-e`环境变量来修改`API 地址`,`短链接地址`和`站点名称`,但是无法修改`导航链接`.
|
||||||
`注意:以下域名请严格填写 http/https 协议,结尾不要 /`
|
`注意:以下域名请严格填写 http 或 https 协议,结尾不要 / 斜杠符号.`
|
||||||
```shell
|
```shell
|
||||||
docker run -d --name subweb --restart always \
|
docker run -d --name subweb --restart always \
|
||||||
-p 18080:80 \
|
-p 18080:80 \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" top="30vh" width="40%">
|
<el-dialog v-model="isShow" top="30vh" width="40%">
|
||||||
<span>
|
<span>
|
||||||
<p style="text-align: center">{{ message }}</p>
|
<p style="text-align: center">{{ message }}</p>
|
||||||
</span>
|
</span>
|
||||||
|
@ -15,15 +15,17 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
ElDialog,
|
ElDialog,
|
||||||
},
|
},
|
||||||
props: {
|
data() {
|
||||||
dialogVisible: {
|
return {
|
||||||
type: Boolean,
|
isShow: false,
|
||||||
default: false,
|
message: '',
|
||||||
},
|
};
|
||||||
message: {
|
},
|
||||||
type: String,
|
created() {
|
||||||
default: '这是一个封装好的弹窗组建',
|
this.emitter.on('DialogLayOut', (DialogLayOut) => {
|
||||||
},
|
this.isShow = true;
|
||||||
|
this.message = DialogLayOut;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
const dialogOut = function (that, Msg) {
|
||||||
|
that.emitter.emit('DialogLayOut', Msg);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default dialogOut;
|
|
@ -5,11 +5,13 @@
|
||||||
<header-view />
|
<header-view />
|
||||||
<content-view />
|
<content-view />
|
||||||
<footer-view />
|
<footer-view />
|
||||||
|
<dialog-lay-out />
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DialogLayOut from 'components/common/dialog/DialogLayOut.vue';
|
||||||
import NavBarMobile from './components/header/NavBarMobile';
|
import NavBarMobile from './components/header/NavBarMobile';
|
||||||
import HeaderView from './HeaderView';
|
import HeaderView from './HeaderView';
|
||||||
import ContentView from './ContentView';
|
import ContentView from './ContentView';
|
||||||
|
@ -22,6 +24,7 @@ export default {
|
||||||
HeaderView,
|
HeaderView,
|
||||||
ContentView,
|
ContentView,
|
||||||
FooterView,
|
FooterView,
|
||||||
|
DialogLayOut,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -147,22 +147,14 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<DialogLayOut
|
|
||||||
:dialogVisible="dialogVisible"
|
|
||||||
@closed="resetDialog"
|
|
||||||
:message="dialogMessage"
|
|
||||||
></DialogLayOut>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { request } from 'network';
|
import { request } from 'network';
|
||||||
import utils from './utils.js';
|
import utils from './utils.js';
|
||||||
import DialogLayOut from 'components/common/dialog/DialogLayOut.vue';
|
import dialogOut from 'components/common/dialog';
|
||||||
export default {
|
export default {
|
||||||
name: 'HomeForm',
|
name: 'HomeForm',
|
||||||
components: {
|
|
||||||
DialogLayOut,
|
|
||||||
},
|
|
||||||
setup() {
|
setup() {
|
||||||
const ENV = {
|
const ENV = {
|
||||||
DEFAULT_MORECONFIG: {
|
DEFAULT_MORECONFIG: {
|
||||||
|
@ -219,8 +211,6 @@ export default {
|
||||||
{ value: 'ssr', text: 'SSR' },
|
{ value: 'ssr', text: 'SSR' },
|
||||||
{ value: 'loon', text: 'Loon' },
|
{ value: 'loon', text: 'Loon' },
|
||||||
],
|
],
|
||||||
dialogVisible: false,
|
|
||||||
dialogMessage: '',
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -234,12 +224,8 @@ export default {
|
||||||
this.isShowMoreConfig = true;
|
this.isShowMoreConfig = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showDialog(msg) {
|
showDialog(Msg) {
|
||||||
this.dialogMessage = msg;
|
dialogOut(this, Msg);
|
||||||
this.dialogVisible = true;
|
|
||||||
},
|
|
||||||
resetDialog() {
|
|
||||||
this.dialogVisible = false;
|
|
||||||
},
|
},
|
||||||
selectApi(event) {
|
selectApi(event) {
|
||||||
if (event.target.value == 'manual') {
|
if (event.target.value == 'manual') {
|
||||||
|
|
Loading…
Reference in New Issue