tnblog
首页
视频
资源
登录

使用uni-app list聊天示例

9760人阅读 2022/2/8 14:55 总访问:688232 评论:0 收藏:0 手机
分类: 前端

要先加入uni-list-chat组件,没有的话可以从官网的插件直接导入,也可以把代码直接复制进去。

uni-list-chat.vue:

  1. <template>
  2. <!-- #ifdef APP-NVUE -->
  3. <cell>
  4. <!-- #endif -->
  5. <view :hover-class="!clickable && !link ? '' : 'uni-list-chat--hover'" class="uni-list-chat" @click.stop="onClick">
  6. <view :class="{ 'uni-list--border': border, 'uni-list-chat--first': isFirstChild }"></view>
  7. <view class="uni-list-chat__container">
  8. <view class="uni-list-chat__header-warp">
  9. <view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
  10. <image class="uni-list-chat__header-image" :src="avatar" mode="aspectFill"></image>
  11. </view>
  12. <!-- 头像组 -->
  13. <view v-else class="uni-list-chat__header">
  14. <view v-for="(item, index) in avatarList" :key="index" class="uni-list-chat__header-box" :class="computedAvatar"
  15. :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }">
  16. <image class="uni-list-chat__header-image" :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }" :src="item.url"
  17. mode="aspectFill"></image>
  18. </view>
  19. </view>
  20. </view>
  21. <view v-if="badgeText && badgePositon === 'left'" class="uni-list-chat__badge uni-list-chat__badge-pos" :class="[isSingle]">
  22. <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
  23. </view>
  24. <view class="uni-list-chat__content">
  25. <view class="uni-list-chat__content-main">
  26. <text class="uni-list-chat__content-title uni-ellipsis">{{ title }}</text>
  27. <text class="uni-list-chat__content-note uni-ellipsis">{{ note }}</text>
  28. </view>
  29. <view class="uni-list-chat__content-extra">
  30. <slot>
  31. <text class="uni-list-chat__content-extra-text">{{ time }}</text>
  32. <view v-if="badgeText && badgePositon === 'right'" class="uni-list-chat__badge" :class="[isSingle, badgePositon === 'right' ? 'uni-list-chat--right' : '']">
  33. <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
  34. </view>
  35. </slot>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- #ifdef APP-NVUE -->
  41. </cell>
  42. <!-- #endif -->
  43. </template>
  44. <script>
  45. // 头像大小
  46. const avatarWidth = 45;
  47. /**
  48. * ListChat 聊天列表
  49. * @description 聊天列表,用于创建聊天类列表
  50. * @tutorial https://ext.dcloud.net.cn/plugin?id=24
  51. * @property {String} title 标题
  52. * @property {String} note 描述
  53. * @property {Boolean} clickable = [true|false] 是否开启点击反馈,默认为false
  54. * @property {String} badgeText 数字角标内容
  55. * @property {String} badgePositon = [left|right] 角标位置,默认为 right
  56. * @property {String} link = [false|navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈,默认为false
  57. * @value false 不开启
  58. * @value navigateTo 同 uni.navigateTo()
  59. * @value redirectTo 同 uni.redirectTo()
  60. * @value reLaunch 同 uni.reLaunch()
  61. * @value switchTab 同 uni.switchTab()
  62. * @property {String | PageURIString} to 跳转目标页面
  63. * @property {String} time 右侧时间显示
  64. * @property {Boolean} avatarCircle = [true|false] 是否显示圆形头像,默认为false
  65. * @property {String} avatar 头像地址,avatarCircle 不填时生效
  66. * @property {Array} avatarList 头像组,格式为 [{url:''}]
  67. * @event {Function} click 点击 uniListChat 触发事件
  68. */
  69. export default {
  70. name: 'UniListChat',
  71. emits:['click'],
  72. props: {
  73. title: {
  74. type: String,
  75. default: ''
  76. },
  77. note: {
  78. type: String,
  79. default: ''
  80. },
  81. clickable: {
  82. type: Boolean,
  83. default: false
  84. },
  85. link: {
  86. type: [Boolean, String],
  87. default: false
  88. },
  89. to: {
  90. type: String,
  91. default: ''
  92. },
  93. badgeText: {
  94. type: [String, Number],
  95. default: ''
  96. },
  97. badgePositon: {
  98. type: String,
  99. default: 'right'
  100. },
  101. time: {
  102. type: String,
  103. default: ''
  104. },
  105. avatarCircle: {
  106. type: Boolean,
  107. default: false
  108. },
  109. avatar: {
  110. type: String,
  111. default: ''
  112. },
  113. avatarList: {
  114. type: Array,
  115. default () {
  116. return [];
  117. }
  118. }
  119. },
  120. // inject: ['list'],
  121. computed: {
  122. isSingle() {
  123. if (this.badgeText === 'dot') {
  124. return 'uni-badge--dot';
  125. } else {
  126. const badgeText = this.badgeText.toString();
  127. if (badgeText.length > 1) {
  128. return 'uni-badge--complex';
  129. } else {
  130. return 'uni-badge--single';
  131. }
  132. }
  133. },
  134. computedAvatar() {
  135. if (this.avatarList.length > 4) {
  136. this.imageWidth = avatarWidth * 0.31;
  137. return 'avatarItem--3';
  138. } else if (this.avatarList.length > 1) {
  139. this.imageWidth = avatarWidth * 0.47;
  140. return 'avatarItem--2';
  141. } else {
  142. this.imageWidth = avatarWidth;
  143. return 'avatarItem--1';
  144. }
  145. }
  146. },
  147. data() {
  148. return {
  149. isFirstChild: false,
  150. border: true,
  151. // avatarList: 3,
  152. imageWidth: 50
  153. };
  154. },
  155. mounted() {
  156. this.list = this.getForm()
  157. if (this.list) {
  158. if (!this.list.firstChildAppend) {
  159. this.list.firstChildAppend = true;
  160. this.isFirstChild = true;
  161. }
  162. this.border = this.list.border;
  163. }
  164. },
  165. methods: {
  166. /**
  167. * 获取父元素实例
  168. */
  169. getForm(name = 'uniList') {
  170. let parent = this.$parent;
  171. let parentName = parent.$options.name;
  172. while (parentName !== name) {
  173. parent = parent.$parent;
  174. if (!parent) return false
  175. parentName = parent.$options.name;
  176. }
  177. return parent;
  178. },
  179. onClick() {
  180. if (this.to !== '') {
  181. this.openPage();
  182. return;
  183. }
  184. if (this.clickable || this.link) {
  185. this.$emit('click', {
  186. data: {}
  187. });
  188. }
  189. },
  190. openPage() {
  191. if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
  192. this.pageApi(this.link);
  193. } else {
  194. this.pageApi('navigateTo');
  195. }
  196. },
  197. pageApi(api) {
  198. uni[api]({
  199. url: this.to,
  200. success: res => {
  201. this.$emit('click', {
  202. data: res
  203. });
  204. },
  205. fail: err => {
  206. this.$emit('click', {
  207. data: err
  208. });
  209. console.error(err.errMsg);
  210. }
  211. });
  212. }
  213. }
  214. };
  215. </script>
  216. <style lang="scss" scoped>
  217. $uni-font-size-lg:16px;
  218. $uni-spacing-row-sm: 5px;
  219. $uni-spacing-row-base: 10px;
  220. $uni-spacing-row-lg: 15px;
  221. $background-color: #fff;
  222. $divide-line-color: #e5e5e5;
  223. $avatar-width: 45px;
  224. $avatar-border-radius: 5px;
  225. $avatar-border-color: #eee;
  226. $avatar-border-width: 1px;
  227. $title-size: 16px;
  228. $title-color: #3b4144;
  229. $title-weight: normal;
  230. $note-size: 12px;
  231. $note-color: #999;
  232. $note-weight: normal;
  233. $right-text-size: 12px;
  234. $right-text-color: #999;
  235. $right-text-weight: normal;
  236. $badge-left: 0px;
  237. $badge-top: 0px;
  238. $dot-width: 10px;
  239. $dot-height: 10px;
  240. $badge-size: 18px;
  241. $badge-font: 12px;
  242. $badge-color: #fff;
  243. $badge-background-color: #ff5a5f;
  244. $badge-space: 6px;
  245. $hover: #f5f5f5;
  246. .uni-list-chat {
  247. font-size: $uni-font-size-lg;
  248. position: relative;
  249. flex-direction: column;
  250. justify-content: space-between;
  251. background-color: $background-color;
  252. }
  253. // .uni-list-chat--disabled {
  254. // opacity: 0.3;
  255. // }
  256. .uni-list-chat--hover {
  257. background-color: $hover;
  258. }
  259. .uni-list--border {
  260. position: relative;
  261. margin-left: $uni-spacing-row-lg;
  262. /* #ifdef APP-PLUS */
  263. border-top-color: $divide-line-color;
  264. border-top-style: solid;
  265. border-top-width: 0.5px;
  266. /* #endif */
  267. }
  268. /* #ifndef APP-NVUE */
  269. .uni-list--border:after {
  270. position: absolute;
  271. top: 0;
  272. right: 0;
  273. left: 0;
  274. height: 1px;
  275. content: '';
  276. -webkit-transform: scaleY(0.5);
  277. transform: scaleY(0.5);
  278. background-color: $divide-line-color;
  279. }
  280. .uni-list-item--first:after {
  281. height: 0px;
  282. }
  283. /* #endif */
  284. .uni-list-chat--first {
  285. border-top-width: 0px;
  286. }
  287. .uni-ellipsis {
  288. /* #ifndef APP-NVUE */
  289. overflow: hidden;
  290. white-space: nowrap;
  291. text-overflow: ellipsis;
  292. /* #endif */
  293. /* #ifdef APP-NVUE */
  294. lines: 1;
  295. /* #endif */
  296. }
  297. .uni-ellipsis-2 {
  298. /* #ifndef APP-NVUE */
  299. overflow: hidden;
  300. text-overflow: ellipsis;
  301. display: -webkit-box;
  302. -webkit-line-clamp: 2;
  303. -webkit-box-orient: vertical;
  304. /* #endif */
  305. /* #ifdef APP-NVUE */
  306. lines: 2;
  307. /* #endif */
  308. }
  309. .uni-list-chat__container {
  310. position: relative;
  311. /* #ifndef APP-NVUE */
  312. display: flex;
  313. /* #endif */
  314. flex-direction: row;
  315. flex: 1;
  316. padding: $uni-spacing-row-base $uni-spacing-row-lg;
  317. position: relative;
  318. overflow: hidden;
  319. }
  320. .uni-list-chat__header-warp {
  321. position: relative;
  322. }
  323. .uni-list-chat__header {
  324. /* #ifndef APP-NVUE */
  325. display: flex;
  326. align-content: center;
  327. /* #endif */
  328. flex-direction: row;
  329. justify-content: center;
  330. align-items: center;
  331. flex-wrap: wrap-reverse;
  332. /* #ifdef APP-NVUE */
  333. width: 50px;
  334. height: 50px;
  335. /* #endif */
  336. /* #ifndef APP-NVUE */
  337. width: $avatar-width;
  338. height: $avatar-width;
  339. /* #endif */
  340. border-radius: $avatar-border-radius;
  341. border-color: $avatar-border-color;
  342. border-width: $avatar-border-width;
  343. border-style: solid;
  344. overflow: hidden;
  345. }
  346. .uni-list-chat__header-box {
  347. /* #ifndef APP-PLUS */
  348. box-sizing: border-box;
  349. display: flex;
  350. width: $avatar-width;
  351. height: $avatar-width;
  352. /* #endif */
  353. /* #ifdef APP-NVUE */
  354. width: 50px;
  355. height: 50px;
  356. /* #endif */
  357. overflow: hidden;
  358. border-radius: 2px;
  359. }
  360. .uni-list-chat__header-image {
  361. margin: 1px;
  362. /* #ifdef APP-NVUE */
  363. width: 50px;
  364. height: 50px;
  365. /* #endif */
  366. /* #ifndef APP-NVUE */
  367. width: $avatar-width;
  368. height: $avatar-width;
  369. /* #endif */
  370. }
  371. /* #ifndef APP-NVUE */
  372. .uni-list-chat__header-image {
  373. display: block;
  374. width: 100%;
  375. height: 100%;
  376. }
  377. .avatarItem--1 {
  378. width: 100%;
  379. height: 100%;
  380. }
  381. .avatarItem--2 {
  382. width: 47%;
  383. height: 47%;
  384. }
  385. .avatarItem--3 {
  386. width: 32%;
  387. height: 32%;
  388. }
  389. /* #endif */
  390. .header--circle {
  391. border-radius: 50%;
  392. }
  393. .uni-list-chat__content {
  394. /* #ifndef APP-NVUE */
  395. display: flex;
  396. /* #endif */
  397. flex-direction: row;
  398. flex: 1;
  399. overflow: hidden;
  400. padding: 2px 0;
  401. }
  402. .uni-list-chat__content-main {
  403. /* #ifndef APP-NVUE */
  404. display: flex;
  405. /* #endif */
  406. flex-direction: column;
  407. justify-content: space-between;
  408. padding-left: $uni-spacing-row-base;
  409. flex: 1;
  410. overflow: hidden;
  411. }
  412. .uni-list-chat__content-title {
  413. font-size: $title-size;
  414. color: $title-color;
  415. font-weight: $title-weight;
  416. overflow: hidden;
  417. }
  418. .uni-list-chat__content-note {
  419. margin-top: 3px;
  420. color: $note-color;
  421. font-size: $note-size;
  422. font-weight: $title-weight;
  423. overflow: hidden;
  424. }
  425. .uni-list-chat__content-extra {
  426. /* #ifndef APP-NVUE */
  427. flex-shrink: 0;
  428. display: flex;
  429. /* #endif */
  430. flex-direction: column;
  431. justify-content: space-between;
  432. align-items: flex-end;
  433. margin-left: 5px;
  434. }
  435. .uni-list-chat__content-extra-text {
  436. color: $right-text-color;
  437. font-size: $right-text-size;
  438. font-weight: $right-text-weight;
  439. overflow: hidden;
  440. }
  441. .uni-list-chat__badge-pos {
  442. position: absolute;
  443. /* #ifdef APP-NVUE */
  444. left: 55px;
  445. top: 3px;
  446. /* #endif */
  447. /* #ifndef APP-NVUE */
  448. left: calc(#{$avatar-width} + 10px - #{$badge-space} + #{$badge-left});
  449. top: calc(#{$uni-spacing-row-base}/ 2 + 1px + #{$badge-top});
  450. /* #endif */
  451. }
  452. .uni-list-chat__badge {
  453. /* #ifndef APP-NVUE */
  454. display: flex;
  455. /* #endif */
  456. justify-content: center;
  457. align-items: center;
  458. border-radius: 100px;
  459. background-color: $badge-background-color;
  460. }
  461. .uni-list-chat__badge-text {
  462. color: $badge-color;
  463. font-size: $badge-font;
  464. }
  465. .uni-badge--single {
  466. /* #ifndef APP-NVUE */
  467. // left: calc(#{$avatar-width} + 7px + #{$badge-left});
  468. /* #endif */
  469. width: $badge-size;
  470. height: $badge-size;
  471. }
  472. .uni-badge--complex {
  473. /* #ifdef APP-NVUE */
  474. left: 50px;
  475. /* #endif */
  476. /* #ifndef APP-NVUE */
  477. width: auto;
  478. /* #endif */
  479. height: $badge-size;
  480. padding: 0 $badge-space;
  481. }
  482. .uni-badge--dot {
  483. /* #ifdef APP-NVUE */
  484. left: 60px;
  485. top: 6px;
  486. /* #endif */
  487. /* #ifndef APP-NVUE */
  488. left: calc(#{$avatar-width} + 15px - #{$dot-width}/ 2 + 1px + #{$badge-left});
  489. /* #endif */
  490. width: $dot-width;
  491. height: $dot-height;
  492. padding: 0;
  493. }
  494. .uni-list-chat--right {
  495. /* #ifdef APP-NVUE */
  496. left: 0;
  497. /* #endif */
  498. }
  499. </style>

uni-list-chat.scss:

  1. /**
  2. * 这里是 uni-list 组件内置的常用样式变量
  3. * 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码
  4. *
  5. */
  6. // 背景色
  7. $background-color : #fff;
  8. // 分割线颜色
  9. $divide-line-color : #e5e5e5;
  10. // 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像
  11. // nvue 页面不支持修改头像大小
  12. $avatar-width : 45px ;
  13. // 头像边框
  14. $avatar-border-radius: 5px;
  15. $avatar-border-color: #eee;
  16. $avatar-border-width: 1px;
  17. // 标题文字样式
  18. $title-size : 16px;
  19. $title-color : #3b4144;
  20. $title-weight : normal;
  21. // 描述文字样式
  22. $note-size : 12px;
  23. $note-color : #999;
  24. $note-weight : normal;
  25. // 右侧额外内容默认样式
  26. $right-text-size : 12px;
  27. $right-text-color : #999;
  28. $right-text-weight : normal;
  29. // 角标样式
  30. // nvue 页面不支持修改圆点位置以及大小
  31. // 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动
  32. $badge-left: 0px;
  33. $badge-top: 0px;
  34. // 显示圆点时,圆点大小
  35. $dot-width: 10px;
  36. $dot-height: 10px;
  37. // 显示角标时,角标大小和字体大小
  38. $badge-size : 18px;
  39. $badge-font : 12px;
  40. // 显示角标时,角标前景色
  41. $badge-color : #fff;
  42. // 显示角标时,角标背景色
  43. $badge-background-color : #ff5a5f;
  44. // 显示角标时,角标左右间距
  45. $badge-space : 6px;
  46. // 状态样式
  47. // 选中颜色
  48. $hover : #f5f5f5;

使用示例:

  1. <template>
  2. <view>
  3. <uni-list>
  4. <uni-list :border="true">
  5. <!-- 显示圆形头像 -->
  6. <uni-list-chat :avatar-circle="true" title="uni-app"
  7. avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
  8. note="您收到一条新的消息" time="2020-02-02 20:20"></uni-list-chat>
  9. <!-- 右侧带角标 -->
  10. <uni-list-chat title="uni-app"
  11. avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
  12. note="您收到一条新的消息" time="2020-02-02 20:20" badge-text="12"></uni-list-chat>
  13. <!-- 头像显示圆点 -->
  14. <uni-list-chat title="uni-app"
  15. avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
  16. note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat>
  17. <!-- 头像显示角标 -->
  18. <uni-list-chat title="uni-app"
  19. avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
  20. note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="99"></uni-list-chat>
  21. <!-- 显示多头像 -->
  22. <uni-list-chat title="uni-app" :avatar-list="avatarList" note="您收到一条新的消息" time="2020-02-02 20:20"
  23. badge-positon="left" badge-text="dot"></uni-list-chat>
  24. <!-- 自定义右侧内容 -->
  25. <uni-list-chat title="uni-app" :avatar-list="avatarList" note="您收到一条新的消息" time="2020-02-02 20:20"
  26. badge-positon="left" badge-text="dot">
  27. <view class="chat-custom-right">
  28. <text class="chat-custom-text">刚刚</text>
  29. <!-- 需要使用 uni-icons 请自行引入 -->
  30. <uni-icons type="star-filled" color="#999" size="18"></uni-icons>
  31. </view>
  32. </uni-list-chat>
  33. </uni-list>
  34. </uni-list>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. avatarList: [{
  42. url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png'
  43. }, {
  44. url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png'
  45. }, {
  46. url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png'
  47. }]
  48. };
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .chat-custom-right {
  54. flex: 1;
  55. /* #ifndef APP-NVUE */
  56. display: flex;
  57. /* #endif */
  58. flex-direction: column;
  59. justify-content: space-between;
  60. align-items: flex-end;
  61. }
  62. .chat-custom-text {
  63. font-size: 12px;
  64. color: #999;
  65. }
  66. </style>

欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739。有需要软件开发,或者学习软件技术的朋友可以和我联系~(Q:815170684)

评价

NET Core 使用 EF Code First

下面这些内容很老了看这篇:https://www.tnblog.net/aojiancc2/article/details/5365 项目使用多层,把数据库访问...

使用OLEDB读取不同版本Excel的连接字符串设置

使用OleBD读取excel的时候,excel不同的版本,连接字符串的写法也会不一样。///&lt;summary&gt; ///读取excel ///&lt;/su...

C 使用CancellationTokenSource取消多线程

有时间我们在使用多线程的时候,需要取消线程的执行,可以使用CancellationTokenSource来取消对Task开辟多线程的取消如下:...

使用爬虫刷csdn博客访问量

首先了解一下常见反爬虫的检测方法频率监测:有些网站会设置一种频率监测的机制,对于同一IP,若在一定时间内访问的速度超...

Idea下使用maven搭建SSM(一):SpringMVC

Spring MVC是一款基于MVC架构模式的轻量级Web框架,其目的是将Web开发模块化,对整体架构进行解耦,简化Web开发流程。下面...

Idea下使用maven搭建SSM(二):MyBatis

开发Web应用,数据的存储和处理往往离不开数据库和SQL语句。在使用Java开发的Web应用中,自然也少不了连接数据库的步骤。在...

使用 微软自带语音合成类库

//引入语音合成名称空间 usingSystem.Speech.Synthesis; classA { voidtest1() { //实例化并指定字符串播放合成读音 ...

如何使用图标像使用文字一样,使用文本图标的方法

1.首先在Iconfont-阿里巴巴矢量图标库上面找到你需要的图标然后加入你的购物车然后选择图标;注意:每个类型的图标会大小不...

使用七牛云的cdn服务,提高图片的加载速度

CDN介绍CDN的全称是Content Delivery Network,即内容分发网络。CDN加速主要是加速静态资源,如网站上面上传的图片、媒体,...

.net core 使用session

tip:net core 2.2后可以直接启用session了,不用在自己添加一次session依赖,本身就添加了使用nuget添加引用Microsoft.AspN...

使用OutLook发送邮件

publicstaticvoidOutlook(stringSubject,stringTextBody,stringFromAdd,stringFromPass,stringTo,stringCC,List&lt;string&...

SQL Server 中使用游标

--声明一个游标 DECLAREMyCursorCURSOR FORSELECTTOP5FBookName,FBookCodingFROMTBookInfo//定义一个叫MyCursor的游标,...

Windows使用wireshark抓包小心得

wireshrak是个网络抓包工具,常用。但是在数据较大的网络环境中直接使用软件抓包会导致wireshark卡死。为什么呢 ?网卡瞬间...

Oracle自定义函数的简单使用

一.最最最简单的返回一个数字的函数createorreplacefunctionfun_show returnint--申明返回值 as begin return1; end;...

Oracle事务的简单使用

事务:  事务是一个整体,这些操作要么全部执行成功,要么全部不执行。使用事务的原因:保证数据的安全有效。事务的四个特...

Oracle使用游标

其实游标就是把查询的结果放入游标中,然后在去游标里边读取。相当于使用游标做了一个中转,而游标是可以作为参数进行传递...
如果有缘,错过了还会重来,如果无缘,相遇了也会离开
排名
9
文章
115
粉丝
5
评论
5
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术