118 lines
3.3 KiB
Vue
Raw Normal View History

2019-03-15 10:08:39 +08:00
<template>
2021-04-01 17:47:56 +08:00
<div id="popup">
2019-03-16 11:27:49 +08:00
<div style="display: flex;flex-direction: row;align-items: center;">
2021-04-01 17:47:56 +08:00
<h3 v-show="false"> title </h3>
2019-03-16 11:27:49 +08:00
<div style="flex: 1"></div>
<el-button size="mini" @click="onClickOptions">设置</el-button>
<el-button size="mini" @click="onMsgToBg">To-Bg</el-button>
2019-03-16 18:44:32 +08:00
<el-button size="mini" @click="onSendMsg">Msg</el-button>
2019-03-16 11:27:49 +08:00
</div>
2019-03-15 10:08:39 +08:00
<div style="text-align: center;width: 100%; color: #6d6d6d;">
<span>支持作者</span>
</div>
<br/>
<div style="margin:0 auto;width:100%;">
<div style="width: 200px; margin: 0 auto;" v-show="isShowMoneyPng">
2019-03-16 12:31:00 +08:00
<img style="width: 100%;height: auto;" src="./res/money.jpg">
2019-03-15 10:08:39 +08:00
</div>
</div>
<br/>
<div id="foot" style="height: 30px;">
<span style="font-size: 14px;float: left;text-align: center;line-height: 30px;color: #6d6d6d;">联系方式:</span>
<div style="height: 100%;float: right;margin-right: 10px;">
<a href="https://github.com/tidys/CocosCreatorPlugins/tree/master/CocosCreatorInspector" target="_blank">
2021-04-01 17:47:56 +08:00
<img v-show="false" src="./res/github.png" style="height: 100%;">
2019-03-15 10:08:39 +08:00
</a>
</div>
<div style="height: 100%;float: right;margin-right: 10px;">
<a href="https://jq.qq.com/?_wv=1027&k=5SdPdy2" target="_blank">
2021-04-01 17:47:56 +08:00
<img v-show="false" src="./res/qq.png" style="height: 100%;">
2019-03-15 10:08:39 +08:00
</a>
</div>
<div style="height: 100%;float: right;margin-right: 10px;">
<a href="http://forum.cocos.com/t/chrome-creator/55669" target="_blank">
2021-04-01 17:47:56 +08:00
<img v-show="false" src="./res/tiezi.png" style="height: 100%;">
2019-03-15 10:08:39 +08:00
</a>
</div>
</div>
</div>
</template>
2021-04-01 17:47:56 +08:00
<script lang="ts">
import Vue from 'vue'
import 'vue-awesome/icons/flag'
import 'vue-awesome/icons'
import Icon from 'vue-awesome/components/Icon'
import {Component} from 'vue-property-decorator'
import chrome from 'chrome'
import {Button} from 'element-ui'
2019-03-15 10:08:39 +08:00
2021-04-01 17:47:56 +08:00
@Component({
components: {
Icon,
Button,
2019-03-15 10:08:39 +08:00
}
2021-04-01 17:47:56 +08:00
})
export default class Index extends Vue {
longConn: chrome.runtime.Port = false
// data() {
// return {
// title: "cc-inspector",
// isShowMoneyPng: true,
// }
// }
//
// created() {
// this._initLongConn();
// }
//
// onBtnClickGitHub() {
// console.log("onBtnClickGitHub");
// }
//
// onClickOptions() {
// chrome.tabs.create({url: 'pages/options.html'})
// }
//
// _initLongConn() {
// if (!this.longConn) {
// console.log("[popup] 初始化长连接");
// this.longConn = chrome.runtime.connect({name: "popup"});
// this.longConn.onMessage.addListener(function (data, sender) {
// this._onLongConnMsg(data, sender);
// }.bind(this))
// }
// }
//
// _onLongConnMsg(data, sender) {
// // console.log(this.title);
// }
//
// onMsgToBg() {
// // 因为webpack的原因,这种方式可能拿不到里面的function, var
// // chrome.extension.getBackgroundPage();
//
// // 发送消息到background.js
// chrome.runtime.sendMessage('content msg', function (data) {
// console.log(data);
// });
// }
//
// onSendMsg() {
// if (this.longConn) {
// this.longConn.postMessage({send: "hello"});
// //@import "../index.less";
// //#popup{
// // width: auto;
// //}
// }
// }
}
2019-03-15 10:08:39 +08:00
</script>
2021-04-01 17:47:56 +08:00
<style scoped lang="less">
2019-03-15 10:08:39 +08:00
</style>