Commit 197562d0 authored by 郭铭瑶's avatar 郭铭瑶 🤘

布置开发环境

parent 99bb0d33
...@@ -9,11 +9,8 @@ import replace from '@rollup/plugin-replace' ...@@ -9,11 +9,8 @@ import replace from '@rollup/plugin-replace'
import babel from '@rollup/plugin-babel' import babel from '@rollup/plugin-babel'
import PostCSS from 'rollup-plugin-postcss' import PostCSS from 'rollup-plugin-postcss'
import { terser } from 'rollup-plugin-terser' import { terser } from 'rollup-plugin-terser'
// import ttypescript from 'ttypescript'
// import typescript from 'rollup-plugin-typescript2'
import typescript from '@rollup/plugin-typescript' import typescript from '@rollup/plugin-typescript'
import minimist from 'minimist' import minimist from 'minimist'
// import postcssImport from 'postcss-import'
import image from '@rollup/plugin-image' import image from '@rollup/plugin-image'
// Get browserslist config and remove ie from es build targets // Get browserslist config and remove ie from es build targets
......
import { createApp } from 'vue'; import { createApp } from 'vue'
import Dev from './serve.vue'; import Dev from './serve.vue'
// To register individual components where they are used (serve.vue) instead of using the import MyComponent from '@/components/MyComponent'
// library as a whole, comment/remove this import and it's corresponding "app.use" call
import Com from '@/entry.esm';
const app = createApp(Dev); createApp(Dev).use(MyComponent).mount('#app')
app.use(Com);
app.mount('#app');
<script lang="ts"> <template>
import { defineComponent } from 'vue'; <div id="main">
// Uncomment import and local "components" registration if library is not registered globally. <div v-for="(component, key) in components" :key="key" class="box">
// import { ComSample } from '@/entry.esm'; <component :is="component" />
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({ export default defineComponent({
name: 'ServeDev', name: 'ServeDev',
// components: { })
// ComSample, </script>
// } <script lang="ts" setup>
}); import * as components from '@/lib/index'
</script> </script>
<template> <style lang="stylus" scoped>
<div id="app"> #main
<com-sample /> width 100%
</div> max-height 100%
</template> box-sizing border-box
padding .05rem
-moz-column-count 4
-webkit-column-count 4
column-count 4
-moz-column-gap @padding
-webkit-column-gap @padding
column-gap @padding
>.box
-moz-page-break-inside avoid
-webkit-column-break-inside avoid
break-inside avoid
margin-bottom .05rem
</style>
<style lang="stylus">
@font-face
font-family DIN
src url(../src/assets/font/DIN-Medium.otf)
@font-face
font-family Pangmenzhengdao
src url(../src/assets/font/pangmenzhengdao.ttf)
html, body
background #000
font-family DIN, Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
width 100%
height 100%
user-select none
font-size 16vh
line-height 1.5
p
margin 0
#app
width 100%
height 100%
overflow hidden
font-size .1rem
background url('../src/assets/images/background.jpg') center/100% 100% no-repeat
color #fff
.orange-count
font-size .14rem
font-weight bold
background-clip text
-webkit-background-clip text
-webkit-text-fill-color transparent
background-image linear-gradient(to bottom, #FFD1B2, #FF8635)
/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: .04rem;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
background:rgba(91, 213, 255, 0.3)
-webkit-box-shadow:inset006pxrgba(0,0,0,0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
background:rgba(91, 213, 255, 0.3)
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -16,7 +16,12 @@ ...@@ -16,7 +16,12 @@
<p :title="step"> <p :title="step">
{{ step }} {{ step }}
</p> </p>
<div v-if="i <= current" ref="iconRef" class="icon" /> <div
v-if="i <= current"
ref="iconRef"
class="icon"
:style="`url(${TrueIcon}) center center / 60% 60% no-repeat`"
/>
<div v-else class="none"></div> <div v-else class="none"></div>
<span class="msg" :title="msg[i]" v-html="msg[i]" /> <span class="msg" :title="msg[i]" v-html="msg[i]" />
</div> </div>
...@@ -32,6 +37,7 @@ import { ...@@ -32,6 +37,7 @@ import {
PropType, PropType,
ref, ref,
} from 'vue' } from 'vue'
import TrueIcon from '@/assets/images/true.png'
export default defineComponent({ export default defineComponent({
name: 'MyStep', name: 'MyStep',
...@@ -76,6 +82,7 @@ export default defineComponent({ ...@@ -76,6 +82,7 @@ export default defineComponent({
doneWidth, doneWidth,
undoneWidth, undoneWidth,
iconTop, iconTop,
TrueIcon,
} }
}, },
}) })
...@@ -111,7 +118,7 @@ export default defineComponent({ ...@@ -111,7 +118,7 @@ export default defineComponent({
width .1rem width .1rem
height @width height @width
border-radius 50% border-radius 50%
background url('@/assets/images/true.png') center center / 60% 60% no-repeat // background url('@/assets/images/true.png') center center / 60% 60% no-repeat
background-color $edge background-color $edge
.none .none
width .06rem width .06rem
......
import { App, Plugin } from 'vue' import { App, Plugin } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import ch from 'dayjs/locale/zh-cn' import ch from 'dayjs/locale/zh-cn'
import LocalizedFormat from 'dayjs/plugin/LocalizedFormat' // import LocalizedFormat from 'dayjs/plugin/LocalizedFormat'
dayjs.extend(LocalizedFormat) // dayjs.extend(LocalizedFormat)
dayjs.locale(ch) dayjs.locale(ch)
export const withInstall = <T>(comp: T): T & Plugin => { export const withInstall = <T>(comp: T): T & Plugin => {
...@@ -13,8 +13,8 @@ export const withInstall = <T>(comp: T): T & Plugin => { ...@@ -13,8 +13,8 @@ export const withInstall = <T>(comp: T): T & Plugin => {
return comp as T & Plugin return comp as T & Plugin
} }
export const getDate = (): string => dayjs().format('ll') // export const getDate = (): string => dayjs().format('ll')
// export const getDate = (): string => dayjs().format('YYYY-MM-DD dddd') export const getDate = (): string => dayjs().format('YYYY-MM-DD dddd')
export const getTime = (): string => dayjs().format('LTS') export const getTime = (): string => dayjs().format('LTS')
export const toRGB = (c: string, opacity = 1): string => { export const toRGB = (c: string, opacity = 1): string => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment