-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from daichen-daisy/main
feat: add code field to org type, enterprise and branch
- Loading branch information
Showing
9 changed files
with
235 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Notify } from 'quasar'; | ||
import { boot } from 'quasar/wrappers'; | ||
|
||
declare module '@vue/runtime-core' { | ||
interface ComponentCustomProperties { | ||
$utils: { | ||
copyToClipboard: (text: string) => void; | ||
}; | ||
} | ||
} | ||
|
||
export default boot(({ app }) => { | ||
app.config.globalProperties.$utils = { | ||
async copyToClipboard(text: string) { | ||
try { | ||
if (!navigator.clipboard) { | ||
Notify.create({ | ||
message: '您的浏览器不支持复制到剪切板', | ||
color: 'negative', | ||
position: 'top', | ||
classes: 'text-caption', | ||
timeout: 1000, | ||
}); | ||
} else { | ||
await navigator.clipboard.writeText(text); | ||
Notify.create({ | ||
message: '复制成功', | ||
color: 'info', | ||
textColor: 'primary', | ||
position: 'top', | ||
classes: 'text-caption', | ||
timeout: 1000, | ||
}); | ||
} | ||
} catch (e) { | ||
throw e; | ||
} | ||
}, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<q-item-label class="text-caption hint-label"> | ||
{{ name }} | ||
<q-icon | ||
v-if="required" | ||
name="emergency" | ||
size="8px" | ||
color="negative" | ||
style="vertical-align: top" | ||
/> | ||
<q-icon | ||
v-if="hint" | ||
name="error_outline" | ||
size="14px" | ||
class="q-ml-xs" | ||
style="vertical-align: top" | ||
> | ||
<q-tooltip anchor="center right" self="center start"> | ||
{{ hint }} | ||
</q-tooltip> | ||
</q-icon> | ||
</q-item-label> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
export default defineComponent({ | ||
name: 'FieldLabel', | ||
props: { | ||
name: { | ||
type: String, | ||
default: '', | ||
}, | ||
required: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
hint: { | ||
type: String, | ||
default: '', | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.