|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
import "@/lib/array.js"
|
|
import "@/lib/array.js"
|
|
import useUtils from "@/utils/utils.js"
|
|
import useUtils from "@/utils/utils.js"
|
|
-import { inject, ref, watch } from "vue"
|
|
|
|
|
|
+import {inject, ref, watch} from "vue"
|
|
import TLabel from "@/components/ui/TLabel.vue";
|
|
import TLabel from "@/components/ui/TLabel.vue";
|
|
import TDivider from "@/components/ui/TDivider.vue";
|
|
import TDivider from "@/components/ui/TDivider.vue";
|
|
import TInputText from "@/components/ui/TInputText.vue";
|
|
import TInputText from "@/components/ui/TInputText.vue";
|
|
@@ -15,7 +15,7 @@ const props = defineProps(["v-server-names", "autoSubmit"])
|
|
|
|
|
|
const serverNamesRef = ref()
|
|
const serverNamesRef = ref()
|
|
const keywordRef = ref()
|
|
const keywordRef = ref()
|
|
-const { serverNames, isSearching, keyword } = (function () {
|
|
|
|
|
|
+const {serverNames, isSearching, keyword} = (function () {
|
|
let serverNames = props.vServerNames;
|
|
let serverNames = props.vServerNames;
|
|
if (serverNames == null) {
|
|
if (serverNames == null) {
|
|
serverNames = []
|
|
serverNames = []
|
|
@@ -141,78 +141,15 @@ defineExpose({
|
|
<div class="ui field"><a href="" @click.prevent="addServerName()">添加域名绑定</a></div>
|
|
<div class="ui field"><a href="" @click.prevent="addServerName()">添加域名绑定</a></div>
|
|
<div class="ui field" v-if="serverNames.length > 0"><span class="grey">|</span></div>
|
|
<div class="ui field" v-if="serverNames.length > 0"><span class="grey">|</span></div>
|
|
<div class="ui field" v-if="serverNames.length > 0">
|
|
<div class="ui field" v-if="serverNames.length > 0">
|
|
- <!-- <span class="grey">|</span> -->
|
|
|
|
- <span class="separator"></span>
|
|
|
|
- </div>
|
|
|
|
- <div class="ui field" v-if="serverNames.length > 0">
|
|
|
|
- <a href="" @click.prevent="showSearchBox()" v-if="!isSearching">
|
|
|
|
- 搜索域名
|
|
|
|
- </a>
|
|
|
|
|
|
+ <a href="" @click.prevent="showSearchBox()" v-if="!isSearching"><i class="icon search small"></i></a>
|
|
<a href="" @click.prevent="showSearchBox()" v-if="isSearching"><i class="icon close small"></i></a>
|
|
<a href="" @click.prevent="showSearchBox()" v-if="isSearching"><i class="icon close small"></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="ui field" v-if="isSearching">
|
|
<div class="ui field" v-if="isSearching">
|
|
- <TInputText type="text" placeholder="搜索域名" ref="keywordRef" v-model="keyword" />
|
|
|
|
|
|
+ <TInputText type="text" placeholder="搜索域名" ref="keywordRef" v-model="keyword"/>
|
|
</div>
|
|
</div>
|
|
- <TDivider></TDivider>
|
|
|
|
- </div>
|
|
|
|
- <div v-if="serverNames.length > 0" class="label-group">
|
|
|
|
- <TLabel outlined="" v-for="(serverName, index) in serverNames"
|
|
|
|
- :class="{ hidden: serverName.isShowing === false }">
|
|
|
|
- <em v-if="serverName.type != 'full'">{{ serverName.type }}</em>
|
|
|
|
- <span v-if="serverName.subNames == null || serverName.subNames.length == 0"
|
|
|
|
- :class="{ disabled: serverName.isShowing === false }">{{ serverName.name }}</span>
|
|
|
|
- <span v-else :class="{ disabled: serverName.isShowing === false }">{{ serverName.subNames[0] }}等{{
|
|
|
|
- serverName.subNames.length }}个域名</span>
|
|
|
|
- <a href="" title="修改" @click.prevent="updateServerName(index, serverName)">
|
|
|
|
- <svg style="display: inline-block;" width="14" height="14" viewBox="0 0 14 14" fill="none"
|
|
|
|
- xmlns="http://www.w3.org/2000/svg">
|
|
|
|
- <path d="M2.04175 12.25H12.5417" stroke="#657080" stroke-linecap="round"
|
|
|
|
- stroke-linejoin="round" />
|
|
|
|
- <path d="M3.20825 7.7933V9.91667H5.34244L11.3749 3.88153L9.24432 1.75L3.20825 7.7933Z"
|
|
|
|
- stroke="#657080" stroke-linejoin="round" />
|
|
|
|
- </svg>
|
|
|
|
- </a>
|
|
|
|
- <a href="" title="删除" @click.prevent="removeServerName(index)">
|
|
|
|
- <svg style="display: inline-block;" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
- <path d="M4.08325 4.08325L9.91659 9.91659" stroke="#657080" stroke-linecap="round"
|
|
|
|
- stroke-linejoin="round" />
|
|
|
|
- <path d="M4.08325 9.91659L9.91659 4.08325" stroke="#657080" stroke-linecap="round"
|
|
|
|
- stroke-linejoin="round" />
|
|
|
|
- </svg>
|
|
|
|
- </a>
|
|
|
|
- </TLabel>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
-.server-name-box {
|
|
|
|
- font-family: Source Han Sans SC;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.box-actions {
|
|
|
|
- font-weight: 400;
|
|
|
|
- font-size: 14px;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- color: rgba(30, 101, 255, 1);
|
|
|
|
- gap: 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.separator {
|
|
|
|
- display: inline-block;
|
|
|
|
- width: 1px;
|
|
|
|
- height: 18px;
|
|
|
|
- background-color: rgba(229, 232, 242, 1);
|
|
|
|
- margin: 0 20px;
|
|
|
|
- transform: translateY(2px);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-:deep(.p-chip.outlined) {
|
|
|
|
- background-color: rgba(238, 242, 250, 1);
|
|
|
|
- color: rgba(101, 112, 128, 1);
|
|
|
|
- font-family: Source Han Sans SC;
|
|
|
|
- font-weight: 400;
|
|
|
|
- font-size: 14px;
|
|
|
|
- border: 1px solid rgba(238, 242, 250, 1)
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|