0.0.5 • Published 1 year ago

second-com v0.0.5

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Vue 3 + TypeScript + Vite

引入npm i second-com 全局注册

优点:多个弹窗可以自由拖动并且可以拖拽放大缩小,被拖拽弹窗始终放置在最上一层

使用

<button @click="dig"><</button>
<RDialog :show-dialog="parentMsg" @positive-click="onPositiveClick" @negative-click="onNegativeClick" >
      <template v-slot:header>
        封装弹窗
       </template>
         可以随意插入弹窗所需内容
    <template #button>
      可自由插入footer其他按钮;默认是取消和关闭
    </template>
    </RDialog>

    <script setup lang="ts">
const dig2 =() => {
  parentMsg.value = true
}
    const parentMsg  =ref(false)
    const onPositiveClick2 = () => {
  parentMsg.value = false
};
const onNegativeClick2 = () => {
  parentMsg.value = false
};
    </script>

Recommended IDE Setup

Type Support For .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.
0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago