mirror of https://github.com/rocboss/paopao-ce
commit
eb9fd0fbf5
@ -1,3 +1,4 @@
|
||||
*.ts linguist-language=go
|
||||
*.js linguist-language=go
|
||||
*.css linguist-language=go
|
||||
*.vue linguist-language=go
|
||||
|
@ -0,0 +1,37 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# build frontend
|
||||
FROM node:19-alpine as frontend
|
||||
ARG API_HOST
|
||||
ARG USE_API_HOST=yes
|
||||
ARG EMBED_UI=yes
|
||||
ARG USE_DIST=no
|
||||
WORKDIR /web
|
||||
COPY web/ ./
|
||||
RUN [ $EMBED_UI != yes ] || [ $USE_API_HOST != yes ] || echo "VITE_HOST='$API_HOST'">.env.local
|
||||
RUN [ $EMBED_UI != yes ] || [ $USE_DIST != no ] || (yarn && yarn build)
|
||||
RUN [ $EMBED_UI = yes ] || mkdir dist || echo ""
|
||||
|
||||
# build backend
|
||||
FROM bitbus/paopao-ce-backend-builder:latest AS backend
|
||||
ARG API_HOST
|
||||
ARG USE_API_HOST=yes
|
||||
ARG EMBED_UI=yes
|
||||
ARG USE_DIST=no
|
||||
|
||||
WORKDIR /paopao-ce
|
||||
COPY . .
|
||||
COPY --from=frontend /web/dist ./web/dist
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
RUN --mount=type=cache,target=$GOPATH/go/pkg,id=paopao-ce-gopkg [ $EMBED_UI != yes ] || make buildx TAGS='go_json migration'
|
||||
RUN --mount=type=cache,target=$GOPATH/go/pkg,id=paopao-ce-gopkg [ $EMBED_UI = yes ] || make buildx TAGS='slim embed go_json migration'
|
||||
|
||||
FROM bitbus/paopao-ce-allinone-runner:latest
|
||||
ARG API_HOST
|
||||
ARG USE_API_HOST=yes
|
||||
ARG EMBED_UI=yes
|
||||
ARG USE_DIST=no
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=backend /paopao-ce/release/paopao .
|
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# eg.1 : sh build-image.sh
|
||||
# eg.2, set image: sh build-image.sh bitbus/paopao-ce
|
||||
|
||||
VERSION=`git describe --tags --always | cut -f1,2 -d "-"` # eg.: 0.2.5
|
||||
IMAGE="bitbus/paopao-ce"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
IMAGE="$1"
|
||||
fi
|
||||
if [ -n "$2" ]; then
|
||||
VERSION="$2"
|
||||
fi
|
||||
|
||||
# build image
|
||||
docker buildx build \
|
||||
--build-arg USE_DIST="yes" \
|
||||
--tag "$IMAGE:all-in-one-${VERSION}" \
|
||||
--tag "$IMAGE:all-in-one-latest" \
|
||||
. -f Dockerfile.allinone
|
||||
|
||||
# push to image rep
|
||||
# if [ -n "$1" ]; then
|
||||
# docker push "$IMAGE:${VERSION}"
|
||||
# docker push "$IMAGE:latest"
|
||||
# fi
|
@ -0,0 +1,3 @@
|
||||
# Docker for paopao-ce
|
||||
|
||||
TODO;
|
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -xe
|
||||
|
||||
# Create paopao user for paopao-ce
|
||||
addgroup -S paopao
|
||||
adduser -G paopao -H -D -g 'paopao User' paopao -h /app -s /bin/sh && usermod -p '*' paopao && passwd -u paopao
|
||||
# echo "export PAOPAO_CUSTOM=${PAOPAO_CUSTOM}" >> /etc/profile
|
||||
|
||||
# Final cleaning
|
||||
mv /app/docker/config.yaml /app/config.yaml
|
||||
rm -rf /app/docker/build
|
||||
rm /app/docker/README.md
|
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
# do nothing now
|
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f ./setup; then
|
||||
# shellcheck disable=SC2039,SC1091,SC3046
|
||||
source ./setup
|
||||
fi
|
||||
|
||||
exec gosu ${USER} /bin/meilisearch
|
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /app/meili_data || exit 1
|
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f ./setup; then
|
||||
# shellcheck disable=SC2039,SC1091,SC3046
|
||||
source ./setup
|
||||
fi
|
||||
|
||||
exec gosu ${USER} /app/paopao serve
|
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -f ./setup; then
|
||||
# shellcheck disable=SC2039,SC1091,SC3046
|
||||
source ./setup
|
||||
fi
|
||||
|
||||
exec docker-entrypoint.sh redis-server
|
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
create_volume_subfolder() {
|
||||
# only change ownership if needed, if using an nfs mount this could be expensive
|
||||
if [ "$USER:$USER" != "$(stat /app -c '%U:%G')" ]
|
||||
then
|
||||
# Modify the owner of /app dir, make $USER(paopao) user have permission to create sub-dir in /app.
|
||||
chown -R "$USER:$USER" /app
|
||||
fi
|
||||
|
||||
# Create VOLUME subfolder
|
||||
for f in /app/custom /app/meili_data; do
|
||||
if ! test -d $f; then
|
||||
gosu "$USER" mkdir -p $f
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
setids() {
|
||||
export USER=paopao
|
||||
PUID=${PUID:-1000}
|
||||
PGID=${PGID:-1000}
|
||||
groupmod -o -g "$PGID" $USER
|
||||
usermod -o -u "$PUID" $USER
|
||||
}
|
||||
|
||||
setids
|
||||
create_volume_subfolder
|
||||
|
||||
# Exec CMD or S6 by default if nothing present
|
||||
if [ $# -gt 0 ];then
|
||||
exec "$@"
|
||||
else
|
||||
exec /bin/s6-svscan /app/gogs/docker/s6/
|
||||
fi
|
@ -0,0 +1,38 @@
|
||||
// Copyright 2023 ROC. All rights reserved.
|
||||
// Use of this source code is governed by a MIT style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package statistics
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/rocboss/paopao-ce/internal/core"
|
||||
)
|
||||
|
||||
var (
|
||||
_metricCache core.MetricCache
|
||||
_onceMetricCache sync.Once
|
||||
)
|
||||
|
||||
type metricCache struct {
|
||||
eventTempWorkerCount map[string]int32
|
||||
}
|
||||
|
||||
func (m *metricCache) SetEventTempWorkerCount(name string, count int32) {
|
||||
// 直接赋值,不需要加锁,因为这仅仅是一个统计信息
|
||||
m.eventTempWorkerCount[name] = count
|
||||
}
|
||||
|
||||
func (m *metricCache) GetEventTempWorkerCount(name string) int32 {
|
||||
return m.eventTempWorkerCount[name]
|
||||
}
|
||||
|
||||
func NewMetricCache() core.MetricCache {
|
||||
_onceMetricCache.Do(func() {
|
||||
_metricCache = &metricCache{
|
||||
eventTempWorkerCount: make(map[string]int32),
|
||||
}
|
||||
})
|
||||
return _metricCache
|
||||
}
|
@ -0,0 +1,157 @@
|
||||
// Copyright 2023 ROC. All rights reserved.
|
||||
// Use of this source code is governed by a MIT style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/RoaringBitmap/roaring/roaring64"
|
||||
"github.com/alimy/tryst/types"
|
||||
)
|
||||
|
||||
type roaringBitmap struct {
|
||||
Map *roaring.Bitmap
|
||||
}
|
||||
|
||||
type roaring64Bitmap struct {
|
||||
Map *roaring64.Bitmap
|
||||
}
|
||||
|
||||
func (m *roaringBitmap) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte{}, nil
|
||||
}
|
||||
return m.Map.MarshalBinary()
|
||||
}
|
||||
|
||||
func (m *roaringBitmap) UnmarshalBinary(data []byte) (res *roaringBitmap, err error) {
|
||||
res = &roaringBitmap{
|
||||
Map: roaring.New(),
|
||||
}
|
||||
err = res.Map.UnmarshalBinary(data)
|
||||
return
|
||||
}
|
||||
|
||||
func (m *roaring64Bitmap) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte{}, nil
|
||||
}
|
||||
return m.Map.MarshalBinary()
|
||||
}
|
||||
|
||||
func (m *roaring64Bitmap) UnmarshalBinary(data []byte) (res *roaring64Bitmap, err error) {
|
||||
res = &roaring64Bitmap{
|
||||
Map: roaring64.New(),
|
||||
}
|
||||
err = res.Map.UnmarshalBinary(data)
|
||||
return
|
||||
}
|
||||
|
||||
// Bitmap alias type of types.Binary[*roaringBitmap]
|
||||
type Bitmap = types.Binary[*roaringBitmap]
|
||||
|
||||
// NullBitmap alias type of types.NullBinary[*roaringBitmap]
|
||||
type NullBitmap = types.NullBinary[*roaringBitmap]
|
||||
|
||||
// Bitmap64 alias type of types.Binary[*roaring64Bitmap]
|
||||
type Bitmap64 = types.Binary[*roaring64Bitmap]
|
||||
|
||||
// NullBitmap64 alias type of types.NullBinary[*roaring64Bitmap]
|
||||
type NullBitmap64 = types.NullBinary[*roaring64Bitmap]
|
||||
|
||||
// NewBitmap create a Bitmap instance
|
||||
func NewBitmap() (res *Bitmap) {
|
||||
return &types.Binary[*roaringBitmap]{
|
||||
Data: &roaringBitmap{
|
||||
Map: roaring.New(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewNullBitmap create a NullBitmap instance
|
||||
func NewNullBitmap() *NullBitmap {
|
||||
return &types.NullBinary[*roaringBitmap]{
|
||||
Data: &roaringBitmap{
|
||||
Map: roaring.New(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewBitmap64 create a Bitmap64 instance
|
||||
func NewBitmap64() *Bitmap64 {
|
||||
return &types.Binary[*roaring64Bitmap]{
|
||||
Data: &roaring64Bitmap{
|
||||
Map: roaring64.New(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewNullBitmap64 create a NullBitmap64 instance
|
||||
func NewNullBitmap64() *NullBitmap64 {
|
||||
return &types.NullBinary[*roaring64Bitmap]{
|
||||
Data: &roaring64Bitmap{
|
||||
Map: roaring64.New(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// MustBitmap create a Bitmap instance
|
||||
func MustBitmap(data ...[]byte) (res *Bitmap) {
|
||||
res = &types.Binary[*roaringBitmap]{
|
||||
Data: &roaringBitmap{
|
||||
Map: roaring.New(),
|
||||
},
|
||||
}
|
||||
if len(data) > 0 && len(data[0]) > 0 {
|
||||
if err := res.Data.Map.UnmarshalBinary(data[0]); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// MustNullBitmap create a NullBitmap instance
|
||||
func MustNullBitmap(data ...[]byte) (res *NullBitmap) {
|
||||
res = &types.NullBinary[*roaringBitmap]{
|
||||
Data: &roaringBitmap{
|
||||
Map: roaring.New(),
|
||||
},
|
||||
}
|
||||
if len(data) > 0 && len(data[0]) > 0 {
|
||||
if err := res.Data.Map.UnmarshalBinary(data[0]); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// MustBitmap64 create a Bitmap64 instance
|
||||
func MustBitmap64(data ...[]byte) (res *Bitmap64) {
|
||||
res = &types.Binary[*roaring64Bitmap]{
|
||||
Data: &roaring64Bitmap{
|
||||
Map: roaring64.New(),
|
||||
},
|
||||
}
|
||||
if len(data) > 0 && len(data[0]) > 0 {
|
||||
if err := res.Data.Map.UnmarshalBinary(data[0]); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// MustNullBitmap64 create a NullBitmap64 instance
|
||||
func MustNullBitmap64(data ...[]byte) (res *NullBitmap64) {
|
||||
res = &types.NullBinary[*roaring64Bitmap]{
|
||||
Data: &roaring64Bitmap{
|
||||
Map: roaring64.New(),
|
||||
},
|
||||
}
|
||||
if len(data) > 0 && len(data[0]) > 0 {
|
||||
if err := res.Data.Map.UnmarshalBinary(data[0]); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// Copyright 2023 ROC. All rights reserved.
|
||||
// Use of this source code is governed by a MIT style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package types_test
|
||||
|
||||
import (
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/rocboss/paopao-ce/pkg/types"
|
||||
)
|
||||
|
||||
var _ = Describe("Bitmap", Ordered, func() {
|
||||
It("sql scaner for Bitmap", func() {
|
||||
bitmap := types.NewBitmap()
|
||||
bitmap.Data.Map.Add(128)
|
||||
value, err := bitmap.Value()
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
var bm types.Bitmap
|
||||
bm.Scan(value)
|
||||
Expect(bm.Data.Map.Contains(128)).To(BeTrue())
|
||||
})
|
||||
|
||||
It("sql scaner for Bitmap64", func() {
|
||||
bitmap := types.NewBitmap64()
|
||||
bitmap.Data.Map.Add(128)
|
||||
value, err := bitmap.Value()
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
var bm types.Bitmap64
|
||||
bm.Scan(value)
|
||||
Expect(bm.Data.Map.Contains(128)).To(BeTrue())
|
||||
})
|
||||
})
|
@ -0,0 +1,24 @@
|
||||
// Copyright 2024 ROC. All rights reserved.
|
||||
// Use of this source code is governed by a MIT style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
type readerWrap struct {
|
||||
r io.Reader
|
||||
}
|
||||
|
||||
func (rw *readerWrap) Read(p []byte) (n int, err error) {
|
||||
return rw.r.Read(p)
|
||||
}
|
||||
|
||||
// PureReader wrap a pure io.Reader object
|
||||
func PureReader(r io.Reader) io.Reader {
|
||||
return &readerWrap{
|
||||
r: r,
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
// Copyright 2024 ROC. All rights reserved.
|
||||
// Use of this source code is governed by a MIT style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
type PasswordProvider interface {
|
||||
Generate(password []byte) ([]byte, error)
|
||||
Compare(hashedPassword, password []byte) error
|
||||
}
|
||||
|
||||
func NewBcryptPasswordProvider(cost int) PasswordProvider {
|
||||
return &bcryptPasswordProvider{
|
||||
cost: cost,
|
||||
}
|
||||
}
|
||||
|
||||
type bcryptPasswordProvider struct {
|
||||
cost int
|
||||
}
|
||||
|
||||
func (p *bcryptPasswordProvider) Generate(password []byte) ([]byte, error) {
|
||||
return bcrypt.GenerateFromPassword(password, p.cost)
|
||||
}
|
||||
|
||||
func (p *bcryptPasswordProvider) Compare(hashedPassword, password []byte) error {
|
||||
return bcrypt.CompareHashAndPassword(hashedPassword, password)
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM getmeili/meilisearch:v1.5 as meilisearch
|
||||
|
||||
FROM redis:7.2-alpine3.18
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
|
||||
RUN apk update --quiet \
|
||||
&& apk -q --no-cache --no-progress add \
|
||||
ca-certificates \
|
||||
libgcc \
|
||||
curl \
|
||||
s6 \
|
||||
&& update-ca-certificates
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./docker ./docker
|
||||
|
||||
# add meilisearch and meilitool to the `/bin` so you can run it from anywhere
|
||||
# and it's easy to find.
|
||||
COPY --from=meilisearch /bin/meilisearch /bin/meilisearch
|
||||
COPY --from=meilisearch /bin/meilitool /bin/meilitool
|
||||
# To stay compatible with the older version of the container (pre v0.27.0) we're
|
||||
# going to symlink the meilisearch binary in the path to `/meilisearch`
|
||||
RUN ln -s /bin/meilisearch /meilisearch
|
||||
ENV MEILI_HTTP_ADDR 0.0.0.0:7700
|
||||
ENV MEILI_SERVER_PROVIDER docker
|
||||
ENV MEILI_DB_PATH=/app/meili_data
|
||||
ENV MEILI_MASTER_KEY=paopao-meilisearch
|
||||
|
||||
RUN ./docker/build/finalize.sh
|
||||
|
||||
# Configure Docker Container
|
||||
VOLUME ["/app/meili_data", "/app/custom"]
|
||||
EXPOSE 7700/tcp 6379 8008
|
||||
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD ps -ef | grep paopao || exit 1
|
||||
ENTRYPOINT ["/app/docker/start.sh"]
|
||||
CMD ["/bin/s6-svscan", "/app/docker/s6/"]
|
@ -1,4 +1,5 @@
|
||||
FROM golang:1.21-alpine
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM golang:1.21-alpine3.18
|
||||
RUN apk --no-cache --no-progress add --virtual \
|
||||
build-deps \
|
||||
build-base \
|
@ -1,3 +1,4 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM alpine:3.18
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
|
@ -1,6 +1,7 @@
|
||||
### Dockerfile builer pre-build images
|
||||
|
||||
```sh
|
||||
docker build -t bitbus/paopao-ce-backend-builder:latest -f Dockerfile-backend-builder .
|
||||
docker build -t bitbus/paopao-ce-backend-runner:latest -f Dockerfile-backend-runner .
|
||||
docker buildx build -t bitbus/paopao-ce-backend-builder:latest -f Dockerfile.backend-builder .
|
||||
docker buildx build -t bitbus/paopao-ce-backend-runner:latest -f Dockerfile.backend-runner .
|
||||
cd ../../ && docker buildx build -t bitbus/paopao-ce-allinone-runner:latest -f scripts/docker/Dockerfile.allinone-runner .
|
||||
```
|
@ -0,0 +1,2 @@
|
||||
ALTER TABLE `p_topic_user` DROP COLUMN `is_pin`;
|
||||
DROP INDEX IF EXISTS `idx_topic_user_uid_ispin`;
|
@ -0,0 +1,2 @@
|
||||
ALTER TABLE `p_topic_user` ADD COLUMN `is_pin` TINYINT NOT NULL DEFAULT 0 COMMENT '是否钉住 0 为未钉住、1 为已钉住';
|
||||
CREATE INDEX `idx_topic_user_uid_ispin` ON `p_topic_user` (`user_id`, `is_pin`) USING BTREE;
|
@ -0,0 +1,2 @@
|
||||
ALTER TABLE p_topic_user DROP COLUMN is_pin;
|
||||
DROP INDEX IF EXISTS idx_topic_user_uid_ispin;
|
@ -0,0 +1,2 @@
|
||||
ALTER TABLE p_topic_user ADD COLUMN is_pin SMALLINT NOT NULL DEFAULT 0; -- 是否钉住 0 为未钉住、1 为已钉住
|
||||
CREATE INDEX idx_topic_user_uid_ispin ON p_topic_user USING btree ( user_id, is_pin );
|
@ -0,0 +1,2 @@
|
||||
ALTER TABLE "p_topic_user" DROP COLUMN "is_pin";
|
||||
DROP INDEX IF EXISTS "idx_topic_user_uid_ispin";
|
@ -0,0 +1,6 @@
|
||||
ALTER TABLE "p_topic_user" ADD COLUMN "is_pin" integer NOT NULL DEFAULT 0;
|
||||
CREATE INDEX "main"."idx_topic_user_uid_ispin"
|
||||
ON "p_topic_user" (
|
||||
"user_id" ASC,
|
||||
"is_pin" ASC
|
||||
);
|
@ -1 +0,0 @@
|
||||
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-0ad26703.js";import{u as i}from"./vue-router-e5a2430e.js";import{G as a,e as c,a2 as u}from"./naive-ui-eecf2ec3.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-1e276b8f.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default};
|
@ -0,0 +1 @@
|
||||
import{_ as i}from"./main-nav.vue_vue_type_style_index_0_lang-DmAlkpQJ.js";import{u as s}from"./vue-router-zwGLnBy5.js";import{G as a,e as c,a2 as u}from"./naive-ui-DNcWoFGl.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-CQsYufSu.js";import{_ as g}from"./index-v3l9hw1O.js";import"./vuex-DNAxYlmG.js";import"./vooks-BQzJqMzq.js";import"./evtd-CI_DDEu_.js";import"./@vicons-C3A8jsfr.js";import"./seemly-B7f2tHrf.js";import"./vueuc-CbQ6ZCvR.js";import"./@css-render-CQdyXCYJ.js";import"./vdirs-DL8EOfHr.js";import"./@juggle-C8OzoCMD.js";import"./css-render-Ct37b3-v.js";import"./@emotion-WldOFDRm.js";import"./lodash-es-i05dkx59.js";import"./treemate-HRdUPn5m.js";import"./async-validator-DKvM95Vc.js";import"./date-fns-x7VUUoCw.js";import"./axios-Bo0ATomq.js";import"./moment-BqTRGcJI.js";/* empty css */const h=l({__name:"404",setup(k){const n=s(),e=()=>{n.push({path:"/"})};return(w,v)=>{const r=i,p=c,_=u,m=a;return f(),d("div",null,[t(r,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(_,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:e},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}}),O=g(h,[["__scopeId","data-v-e62daa85"]]);export{O as default};
|
@ -1,3 +0,0 @@
|
||||
import{i as d}from"./@vue-a481fc63.js";function C(i){let r=".",s="__",m="--",f;if(i){let e=i.blockPrefix;e&&(r=e),e=i.elementPrefix,e&&(s=e),e=i.modifierPrefix,e&&(m=e)}const b={install(e){f=e.c;const l=e.context;l.bem={},l.bem.b=null,l.bem.els=null}};function y(e){let l,n;return{before(t){l=t.bem.b,n=t.bem.els,t.bem.els=null},after(t){t.bem.b=l,t.bem.els=n},$({context:t,props:u}){return e=typeof e=="string"?e:e({context:t,props:u}),t.bem.b=e,`${(u==null?void 0:u.bPrefix)||r}${t.bem.b}`}}}function v(e){let l;return{before(n){l=n.bem.els},after(n){n.bem.els=l},$({context:n,props:t}){return e=typeof e=="string"?e:e({context:n,props:t}),n.bem.els=e.split(",").map(u=>u.trim()),n.bem.els.map(u=>`${(t==null?void 0:t.bPrefix)||r}${n.bem.b}${s}${u}`).join(", ")}}}function P(e){return{$({context:l,props:n}){e=typeof e=="string"?e:e({context:l,props:n});const t=e.split(",").map(o=>o.trim());function u(o){return t.map(x=>`&${(n==null?void 0:n.bPrefix)||r}${l.bem.b}${o!==void 0?`${s}${o}`:""}${m}${x}`).join(", ")}const c=l.bem.els;return c!==null?u(c[0]):u()}}}function _(e){return{$({context:l,props:n}){e=typeof e=="string"?e:e({context:l,props:n});const t=l.bem.els;return`&:not(${(n==null?void 0:n.bPrefix)||r}${l.bem.b}${t!==null&&t.length>0?`${s}${t[0]}`:""}${m}${e})`}}}return Object.assign(b,{cB:(...e)=>f(y(e[0]),e[1],e[2]),cE:(...e)=>f(v(e[0]),e[1],e[2]),cM:(...e)=>f(P(e[0]),e[1],e[2]),cNotM:(...e)=>f(_(e[0]),e[1],e[2])}),b}const $=Symbol("@css-render/vue3-ssr");function M(i,r){return`<style cssr-id="${i}">
|
||||
${r}
|
||||
</style>`}function S(i,r){const s=d($,null);if(s===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}const{styles:m,ids:f}=s;f.has(i)||m!==null&&(f.add(i),m.push(M(i,r)))}const j=typeof document<"u";function N(){if(j)return;const i=d($,null);if(i!==null)return{adapter:S,context:i}}export{C as p,N as u};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue