mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 08:17:33 +00:00
feat: copy link
This commit is contained in:
parent
b9dbc19a51
commit
5635a6ee36
@ -28,7 +28,14 @@ limitations under the License. -->
|
||||
/>
|
||||
</div>
|
||||
<el-button size="small" type="primary" class="mt-20" @click="getLink">{{ t("generateLink") }}</el-button>
|
||||
<div v-show="widgetLink" class="link mt-10" @click="viewPage">{{ host + widgetLink }}</div>
|
||||
<div v-show="widgetLink" class="link mt-10">
|
||||
<span @click="viewPage">
|
||||
{{ host + widgetLink }}
|
||||
</span>
|
||||
<span>
|
||||
<Icon class="cp ml-5" iconName="copy" @click="copyLink" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@ -38,6 +45,7 @@ limitations under the License. -->
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import { useSelectorStore } from "@/store/modules/selectors";
|
||||
import router from "@/router";
|
||||
import copy from "@/utils/copy";
|
||||
|
||||
const { t } = useI18n();
|
||||
const appStore = useAppStoreWithOut();
|
||||
@ -82,6 +90,9 @@ limitations under the License. -->
|
||||
const routeUrl = router.resolve({ path: widgetLink.value });
|
||||
window.open(routeUrl.href, "_blank");
|
||||
}
|
||||
function copyLink() {
|
||||
copy(host + widgetLink.value);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.link {
|
||||
|
Loading…
Reference in New Issue
Block a user